mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Fixes #4093: Add decommissioning for vms
This commit is contained in:
parent
f7762dd40c
commit
3ed22fd1ae
@ -37,6 +37,7 @@
|
|||||||
* [#3313](https://github.com/netbox-community/netbox/issues/3313) - Toggle config context display between JSON and YAML
|
* [#3313](https://github.com/netbox-community/netbox/issues/3313) - Toggle config context display between JSON and YAML
|
||||||
* [#3886](https://github.com/netbox-community/netbox/issues/3886) - Enable assigning config contexts by cluster and cluster group
|
* [#3886](https://github.com/netbox-community/netbox/issues/3886) - Enable assigning config contexts by cluster and cluster group
|
||||||
* [#4051](https://github.com/netbox-community/netbox/issues/4051) - Disable the `makemigrations` management command
|
* [#4051](https://github.com/netbox-community/netbox/issues/4051) - Disable the `makemigrations` management command
|
||||||
|
* [#4093](https://github.com/netbox-community/netbox/issues/4093) - Add decommissioning status for VMs
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
|
@ -11,17 +11,20 @@ class VirtualMachineStatusChoices(ChoiceSet):
|
|||||||
STATUS_ACTIVE = 'active'
|
STATUS_ACTIVE = 'active'
|
||||||
STATUS_OFFLINE = 'offline'
|
STATUS_OFFLINE = 'offline'
|
||||||
STATUS_STAGED = 'staged'
|
STATUS_STAGED = 'staged'
|
||||||
|
STATUS_DECOMMISSIONING = 'decommissioning'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
(STATUS_ACTIVE, 'Active'),
|
(STATUS_ACTIVE, 'Active'),
|
||||||
(STATUS_OFFLINE, 'Offline'),
|
(STATUS_OFFLINE, 'Offline'),
|
||||||
(STATUS_STAGED, 'Staged'),
|
(STATUS_STAGED, 'Staged'),
|
||||||
|
(STATUS_DECOMMISSIONING, 'Decommissioning'),
|
||||||
)
|
)
|
||||||
|
|
||||||
LEGACY_MAP = {
|
LEGACY_MAP = {
|
||||||
STATUS_OFFLINE: 0,
|
STATUS_OFFLINE: 0,
|
||||||
STATUS_ACTIVE: 1,
|
STATUS_ACTIVE: 1,
|
||||||
STATUS_STAGED: 3,
|
STATUS_STAGED: 3,
|
||||||
|
STATUS_DECOMMISSIONING: 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,9 +267,10 @@ class VirtualMachine(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
|
|||||||
]
|
]
|
||||||
|
|
||||||
STATUS_CLASS_MAP = {
|
STATUS_CLASS_MAP = {
|
||||||
'active': 'success',
|
VirtualMachineStatusChoices.STATUS_ACTIVE: 'success',
|
||||||
'offline': 'warning',
|
VirtualMachineStatusChoices.STATUS_OFFLINE: 'warning',
|
||||||
'staged': 'primary',
|
VirtualMachineStatusChoices.STATUS_STAGED: 'primary',
|
||||||
|
VirtualMachineStatusChoices.STATUS_DECOMMISSIONING: 'warning',
|
||||||
}
|
}
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user