11969 remove airflow from racktype (#17324)

* 11969 remove airflow from racktype

* 11969 remove airflow from racktype

* 11969 update docs

* 11969 fix rack edit

* Rename migration

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson
2024-08-30 10:30:51 -07:00
committed by GitHub
parent b797fcc03d
commit 829bef041d
11 changed files with 18 additions and 52 deletions

View File

@@ -53,12 +53,6 @@ class RackBase(WeightMixin, PrimaryModel):
verbose_name=_('width'),
help_text=_('Rail-to-rail width')
)
airflow = models.CharField(
verbose_name=_('airflow'),
max_length=50,
choices=RackAirflowChoices,
blank=True
)
# Numbering
u_height = models.PositiveSmallIntegerField(
@@ -147,7 +141,7 @@ class RackType(RackBase):
)
clone_fields = (
'manufacturer', 'form_factor', 'width', 'u_height', 'airflow', 'desc_units', 'outer_width', 'outer_depth',
'manufacturer', 'form_factor', 'width', 'u_height', 'desc_units', 'outer_width', 'outer_depth',
'outer_unit', 'mounting_depth', 'weight', 'max_weight', 'weight_unit',
)
prerequisite_models = (
@@ -248,7 +242,7 @@ class Rack(ContactsMixin, ImageAttachmentsMixin, RackBase):
"""
# Fields which cannot be set locally if a RackType is assigned
RACKTYPE_FIELDS = (
'form_factor', 'width', 'airflow', 'u_height', 'starting_unit', 'desc_units', 'outer_width', 'outer_depth',
'form_factor', 'width', 'u_height', 'starting_unit', 'desc_units', 'outer_width', 'outer_depth',
'outer_unit', 'mounting_depth', 'weight', 'weight_unit', 'max_weight',
)
@@ -321,6 +315,12 @@ class Rack(ContactsMixin, ImageAttachmentsMixin, RackBase):
verbose_name=_('asset tag'),
help_text=_('A unique tag used to identify this rack')
)
airflow = models.CharField(
verbose_name=_('airflow'),
max_length=50,
choices=RackAirflowChoices,
blank=True
)
# Generic relations
vlan_groups = GenericRelation(