1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Service.protocol to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-27 22:27:06 -05:00
parent 213bd1555a
commit 4ecbfc4e5e
10 changed files with 81 additions and 38 deletions

View File

@@ -108,3 +108,23 @@ class VLANStatusChoices(ChoiceSet):
STATUS_RESERVED: 2,
STATUS_DEPRECATED: 3,
}
#
# VLANs
#
class ServiceProtocolChoices(ChoiceSet):
PROTOCOL_TCP = 'tcp'
PROTOCOL_UDP = 'udp'
CHOICES = (
(PROTOCOL_TCP, 'TCP'),
(PROTOCOL_UDP, 'UDP'),
)
LEGACY_MAP = {
PROTOCOL_TCP: 6,
PROTOCOL_UDP: 17,
}