1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

3839: Add airflow field to DeviceType

This commit is contained in:
jeremystretch
2021-10-14 15:38:29 -04:00
parent 176bd2396b
commit 2c2c2e9060
13 changed files with 81 additions and 10 deletions

View File

@@ -115,6 +115,12 @@ class DeviceType(PrimaryModel):
help_text='Parent devices house child devices in device bays. Leave blank '
'if this device type is neither a parent nor a child.'
)
airflow = models.CharField(
max_length=50,
choices=DeviceAirflowChoices,
blank=True,
verbose_name='Airflow direction'
)
front_image = models.ImageField(
upload_to='devicetype-images',
blank=True
@@ -130,7 +136,7 @@ class DeviceType(PrimaryModel):
objects = RestrictedQuerySet.as_manager()
clone_fields = [
'manufacturer', 'u_height', 'is_full_depth', 'subdevice_role',
'manufacturer', 'u_height', 'is_full_depth', 'subdevice_role', 'airflow',
]
class Meta:
@@ -165,6 +171,7 @@ class DeviceType(PrimaryModel):
('u_height', self.u_height),
('is_full_depth', self.is_full_depth),
('subdevice_role', self.subdevice_role),
('airflow', self.airflow),
('comments', self.comments),
))