mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-19 15:31:35 +02:00
16783 Add status field to InventoryItem (#17627)
* 16783 Add status field to InventoryItem * 16783 fix tests * 16783 fix tests * 16783 review changes
This commit is contained in:
@@ -1648,3 +1648,27 @@ class VirtualDeviceContextStatusChoices(ChoiceSet):
|
||||
(STATUS_PLANNED, _('Planned'), 'cyan'),
|
||||
(STATUS_OFFLINE, _('Offline'), 'red'),
|
||||
]
|
||||
|
||||
|
||||
#
|
||||
# InventoryItem
|
||||
#
|
||||
|
||||
class InventoryItemStatusChoices(ChoiceSet):
|
||||
key = 'InventoryItem.status'
|
||||
|
||||
STATUS_OFFLINE = 'offline'
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_PLANNED = 'planned'
|
||||
STATUS_STAGED = 'staged'
|
||||
STATUS_FAILED = 'failed'
|
||||
STATUS_DECOMMISSIONING = 'decommissioning'
|
||||
|
||||
CHOICES = [
|
||||
(STATUS_OFFLINE, _('Offline'), 'gray'),
|
||||
(STATUS_ACTIVE, _('Active'), 'green'),
|
||||
(STATUS_PLANNED, _('Planned'), 'cyan'),
|
||||
(STATUS_STAGED, _('Staged'), 'blue'),
|
||||
(STATUS_FAILED, _('Failed'), 'red'),
|
||||
(STATUS_DECOMMISSIONING, _('Decommissioning'), 'yellow'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user