mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Prefix.status to slug (#3569)
This commit is contained in:
27
netbox/ipam/choices.py
Normal file
27
netbox/ipam/choices.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from utilities.choices import ChoiceSet
|
||||
|
||||
|
||||
#
|
||||
# Prefixes
|
||||
#
|
||||
|
||||
class PrefixStatusChoices(ChoiceSet):
|
||||
|
||||
STATUS_CONTAINER = 'container'
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
|
||||
CHOICES = (
|
||||
(STATUS_CONTAINER, 'Container'),
|
||||
(STATUS_ACTIVE, 'Active'),
|
||||
(STATUS_RESERVED, 'Reserved'),
|
||||
(STATUS_DEPRECATED, 'Deprecated'),
|
||||
)
|
||||
|
||||
LEGACY_MAP = {
|
||||
STATUS_CONTAINER: 0,
|
||||
STATUS_ACTIVE: 1,
|
||||
STATUS_RESERVED: 2,
|
||||
STATUS_DEPRECATED: 3,
|
||||
}
|
||||
Reference in New Issue
Block a user