Service.protocol to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-27 22:27:06 -05:00
parent b22a5616d4
commit f710335361
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,
}