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

Closes #8779: Enable the use of ChoiceSet by plugins

This commit is contained in:
jeremystretch
2022-03-02 11:43:28 -05:00
parent 638d89e73b
commit 5f8af6ad66
6 changed files with 87 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ from utilities.choices import ChoiceSet
#
class SiteStatusChoices(ChoiceSet):
key = 'dcim.Site.status'
key = 'Site.status'
STATUS_PLANNED = 'planned'
STATUS_STAGING = 'staging'
@@ -60,7 +60,7 @@ class RackWidthChoices(ChoiceSet):
class RackStatusChoices(ChoiceSet):
key = 'dcim.Rack.status'
key = 'Rack.status'
STATUS_RESERVED = 'reserved'
STATUS_AVAILABLE = 'available'
@@ -130,7 +130,7 @@ class DeviceFaceChoices(ChoiceSet):
class DeviceStatusChoices(ChoiceSet):
key = 'dcim.Device.status'
key = 'Device.status'
STATUS_OFFLINE = 'offline'
STATUS_ACTIVE = 'active'
@@ -1175,7 +1175,7 @@ class CableLengthUnitChoices(ChoiceSet):
#
class PowerFeedStatusChoices(ChoiceSet):
key = 'dcim.PowerFeed.status'
key = 'PowerFeed.status'
STATUS_OFFLINE = 'offline'
STATUS_ACTIVE = 'active'