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

PowerFeed.status to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-25 21:21:35 -05:00
parent 2dc07ca30d
commit 8c7f6c62b0
6 changed files with 68 additions and 31 deletions

View File

@@ -878,6 +878,28 @@ class CableLengthUnitChoices(ChoiceSet):
# PowerFeeds
#
class PowerFeedStatusChoices(ChoiceSet):
STATUS_OFFLINE = 'offline'
STATUS_ACTIVE = 'active'
STATUS_PLANNED = 'planned'
STATUS_FAILED = 'failed'
CHOICES = (
(STATUS_OFFLINE, 'Offline'),
(STATUS_ACTIVE, 'Active'),
(STATUS_PLANNED, 'Planned'),
(STATUS_FAILED, 'Failed'),
)
LEGACY_MAP = {
STATUS_OFFLINE: 0,
STATUS_ACTIVE: 1,
STATUS_PLANNED: 2,
STATUS_FAILED: 4,
}
class PowerFeedTypeChoices(ChoiceSet):
TYPE_PRIMARY = 'primary'