mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-19 03:42:25 -06:00
VirtualMachine.status to slug
This commit is contained in:
24
netbox/virtualization/choices.py
Normal file
24
netbox/virtualization/choices.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from utilities.choices import ChoiceSet
|
||||
|
||||
|
||||
#
|
||||
# VirtualMachines
|
||||
#
|
||||
|
||||
class VirtualMachineStatusChoices(ChoiceSet):
|
||||
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_OFFLINE = 'offline'
|
||||
STATUS_STAGED = 'staged'
|
||||
|
||||
CHOICES = (
|
||||
(STATUS_ACTIVE, 'Active'),
|
||||
(STATUS_OFFLINE, 'Offline'),
|
||||
(STATUS_STAGED, 'Staged'),
|
||||
)
|
||||
|
||||
LEGACY_MAP = {
|
||||
STATUS_OFFLINE: 0,
|
||||
STATUS_ACTIVE: 1,
|
||||
STATUS_STAGED: 3,
|
||||
}
|
||||
Reference in New Issue
Block a user