mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Device.face to slug (#3569)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from dcim.constants import DEVICE_STATUS_ACTIVE, DEVICE_STATUS_OFFLINE, DEVICE_STATUS_STAGED
|
||||
from dcim.choices import DeviceStatusChoices
|
||||
|
||||
# VirtualMachine statuses (replicated from Device statuses)
|
||||
VM_STATUS_CHOICES = [
|
||||
[DEVICE_STATUS_ACTIVE, 'Active'],
|
||||
[DEVICE_STATUS_OFFLINE, 'Offline'],
|
||||
[DEVICE_STATUS_STAGED, 'Staged'],
|
||||
[1, 'Active'],
|
||||
[0, 'Offline'],
|
||||
[3, 'Staged'],
|
||||
]
|
||||
|
||||
# Bootstrap CSS classes for VirtualMachine statuses
|
||||
|
||||
@@ -195,7 +195,7 @@ class VirtualMachine(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
|
||||
)
|
||||
status = models.PositiveSmallIntegerField(
|
||||
choices=VM_STATUS_CHOICES,
|
||||
default=DEVICE_STATUS_ACTIVE,
|
||||
default=1, # TODO: Replace with ChoiceSet value
|
||||
verbose_name='Status'
|
||||
)
|
||||
role = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user