mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
IPAddress.status to slug (#3569)
This commit is contained in:
@@ -25,3 +25,29 @@ class PrefixStatusChoices(ChoiceSet):
|
||||
STATUS_RESERVED: 2,
|
||||
STATUS_DEPRECATED: 3,
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# IPAddresses
|
||||
#
|
||||
|
||||
class IPAddressStatusChoices(ChoiceSet):
|
||||
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
STATUS_DHCP = 'dhcp'
|
||||
|
||||
CHOICES = (
|
||||
(STATUS_ACTIVE, 'Active'),
|
||||
(STATUS_RESERVED, 'Reserved'),
|
||||
(STATUS_DEPRECATED, 'Deprecated'),
|
||||
(STATUS_DHCP, 'DHCP'),
|
||||
)
|
||||
|
||||
LEGACY_MAP = {
|
||||
STATUS_ACTIVE: 1,
|
||||
STATUS_RESERVED: 2,
|
||||
STATUS_DEPRECATED: 3,
|
||||
STATUS_DHCP: 5,
|
||||
}
|
||||
|
Reference in New Issue
Block a user