mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-10 11:23:58 +02:00
For #18352, adds choices, model field, migration
Adds: - dcim.choices.PowerOutletStatusChoices - dcim.models.device_components.PowerOutlet.status field with `choices` set to PowerOutletStatusChoices - adds migration for PowerOutlet.status field - updates breaking view tests
This commit is contained in:
@@ -1627,6 +1627,23 @@ class PowerFeedPhaseChoices(ChoiceSet):
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# PowerOutlets
|
||||
#
|
||||
class PowerOutletStatusChoices(ChoiceSet):
|
||||
key = 'PowerOutlet.status'
|
||||
|
||||
STATUS_ENABLED = 'enabled'
|
||||
STATUS_DISABLED = 'disabled'
|
||||
STATUS_FAULTY = 'faulty'
|
||||
|
||||
CHOICES = [
|
||||
(STATUS_ENABLED, _('Enabled'), 'green'),
|
||||
(STATUS_DISABLED, _('Disabled'), 'red'),
|
||||
(STATUS_FAULTY, _('Faulty'), 'gray'),
|
||||
]
|
||||
|
||||
|
||||
#
|
||||
# VDC
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user