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

Closes #4857: Drop support for legacy numeric choice field values

This commit is contained in:
Jeremy Stretch
2020-07-15 16:54:33 -04:00
parent 7461e76606
commit 19d0d6ff10
9 changed files with 4 additions and 337 deletions

View File

@@ -30,13 +30,6 @@ class PrefixStatusChoices(ChoiceSet):
(STATUS_DEPRECATED, 'Deprecated'),
)
LEGACY_MAP = {
STATUS_CONTAINER: 0,
STATUS_ACTIVE: 1,
STATUS_RESERVED: 2,
STATUS_DEPRECATED: 3,
}
#
# IPAddresses
@@ -56,13 +49,6 @@ class IPAddressStatusChoices(ChoiceSet):
(STATUS_DHCP, 'DHCP'),
)
LEGACY_MAP = {
STATUS_ACTIVE: 1,
STATUS_RESERVED: 2,
STATUS_DEPRECATED: 3,
STATUS_DHCP: 5,
}
class IPAddressRoleChoices(ChoiceSet):
@@ -86,17 +72,6 @@ class IPAddressRoleChoices(ChoiceSet):
(ROLE_CARP, 'CARP'),
)
LEGACY_MAP = {
ROLE_LOOPBACK: 10,
ROLE_SECONDARY: 20,
ROLE_ANYCAST: 30,
ROLE_VIP: 40,
ROLE_VRRP: 41,
ROLE_HSRP: 42,
ROLE_GLBP: 43,
ROLE_CARP: 44,
}
#
# VLANs
@@ -114,12 +89,6 @@ class VLANStatusChoices(ChoiceSet):
(STATUS_DEPRECATED, 'Deprecated'),
)
LEGACY_MAP = {
STATUS_ACTIVE: 1,
STATUS_RESERVED: 2,
STATUS_DEPRECATED: 3,
}
#
# Services
@@ -134,8 +103,3 @@ class ServiceProtocolChoices(ChoiceSet):
(PROTOCOL_TCP, 'TCP'),
(PROTOCOL_UDP, 'UDP'),
)
LEGACY_MAP = {
PROTOCOL_TCP: 6,
PROTOCOL_UDP: 17,
}