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:
Jason Novinger
2025-02-26 15:58:46 -06:00
parent b9b42cd3b4
commit dbac09349b
4 changed files with 42 additions and 0 deletions

View File

@@ -449,6 +449,12 @@ class PowerOutlet(ModularComponentModel, CabledObjectModel, PathEndpoint, Tracki
"""
A physical power outlet (output) within a Device which provides power to a PowerPort.
"""
status = models.CharField(
verbose_name=_('status'),
max_length=50,
choices=PowerOutletStatusChoices,
default=PowerOutletStatusChoices.STATUS_ENABLED
)
type = models.CharField(
verbose_name=_('type'),
max_length=50,