Arthur il y a 1 semaine
Parent
commit
a2fdaf8e63

+ 0 - 4
docs/models/dcim/coolingfeed.md

@@ -45,10 +45,6 @@ The coolant flow rate, in litres per minute (L/min).
 
 The operating pressure of the loop, in kilopascals (kPa).
 
-### Supply / Return Temperature
-
-The supply and return coolant temperatures, in degrees Celsius (°C).
-
 ### Mark Connected
 
 If selected, the cooling feed will be treated as if a cable has been connected.

+ 1 - 1
netbox/dcim/api/serializers_/cooling.py

@@ -79,7 +79,7 @@ class CoolingFeedSerializer(PrimaryModelSerializer, CabledObjectSerializer, Conn
         model = CoolingFeed
         fields = [
             'id', 'url', 'display_url', 'display', 'cooling_source', 'rack', 'name', 'status', 'type', 'fluid_type',
-            'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature', 'mark_connected',
+            'cooling_capacity', 'flow_rate', 'pressure', 'mark_connected',
             'cable', 'cable_end', 'link_peers', 'link_peers_type', 'connected_endpoints', 'connected_endpoints_type',
             'connected_endpoints_reachable', 'description', 'tenant', 'owner', 'comments', 'tags', 'custom_fields',
             'created', 'last_updated', '_occupied',

+ 1 - 1
netbox/dcim/filtersets.py

@@ -3305,7 +3305,7 @@ class CoolingFeedFilterSet(PrimaryModelFilterSet, CabledObjectFilterSet, PathEnd
     class Meta:
         model = CoolingFeed
         fields = (
-            'id', 'name', 'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature',
+            'id', 'name', 'cooling_capacity', 'flow_rate', 'pressure',
             'mark_connected', 'cable_end', 'cable_connector', 'description',
         )
 

+ 2 - 10
netbox/dcim/forms/bulk_edit.py

@@ -1154,14 +1154,6 @@ class CoolingFeedBulkEditForm(PrimaryModelBulkEditForm):
         min_value=0,
         required=False
     )
-    supply_temperature = forms.DecimalField(
-        label=_('Supply temperature'),
-        required=False
-    )
-    return_temperature = forms.DecimalField(
-        label=_('Return temperature'),
-        required=False
-    )
     mark_connected = forms.NullBooleanField(
         label=_('Mark connected'),
         required=False,
@@ -1176,12 +1168,12 @@ class CoolingFeedBulkEditForm(PrimaryModelBulkEditForm):
     fieldsets = (
         FieldSet('cooling_source', 'rack', 'status', 'type', 'fluid_type', 'mark_connected', 'description', 'tenant'),
         FieldSet(
-            'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature',
+            'cooling_capacity', 'flow_rate', 'pressure',
             name=_('Characteristics')
         ),
     )
     nullable_fields = (
-        'rack', 'fluid_type', 'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature',
+        'rack', 'fluid_type', 'cooling_capacity', 'flow_rate', 'pressure',
         'tenant', 'description', 'comments',
     )
 

+ 1 - 1
netbox/dcim/forms/bulk_import.py

@@ -2019,7 +2019,7 @@ class CoolingFeedImportForm(PrimaryModelImportForm):
         model = CoolingFeed
         fields = (
             'site', 'cooling_source', 'location', 'rack', 'name', 'status', 'type', 'mark_connected', 'fluid_type',
-            'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature', 'tenant',
+            'cooling_capacity', 'flow_rate', 'pressure', 'tenant',
             'description', 'owner', 'comments', 'tags',
         )
 

+ 5 - 6
netbox/dcim/forms/model_forms.py

@@ -437,8 +437,8 @@ class DeviceTypeForm(PrimaryModelForm):
     fieldsets = (
         FieldSet('manufacturer', 'model', 'slug', 'default_platform', 'description', 'tags', name=_('Device Type')),
         FieldSet(
-            'u_height', 'exclude_from_utilization', 'is_full_depth', 'part_number', 'subdevice_role', 'airflow',
-            'cooling_method', 'weight', 'weight_unit', name=_('Chassis')
+            'u_height', 'exclude_from_utilization', 'is_full_depth', 'part_number', 'subdevice_role',
+            'cooling_method', 'airflow', 'weight', 'weight_unit', name=_('Chassis')
         ),
         FieldSet('front_image', 'rear_image', name=_('Images')),
     )
@@ -447,7 +447,7 @@ class DeviceTypeForm(PrimaryModelForm):
         model = DeviceType
         fields = [
             'manufacturer', 'model', 'slug', 'default_platform', 'part_number', 'u_height', 'exclude_from_utilization',
-            'is_full_depth', 'subdevice_role', 'airflow', 'cooling_method', 'weight', 'weight_unit', 'front_image',
+            'is_full_depth', 'subdevice_role', 'cooling_method', 'airflow', 'weight', 'weight_unit', 'front_image',
             'rear_image', 'description', 'owner', 'comments', 'tags',
         ]
         widgets = {
@@ -1016,7 +1016,7 @@ class CoolingFeedForm(TenancyForm, PrimaryModelForm):
             name=_('Cooling Feed')
         ),
         FieldSet(
-            'cooling_capacity', 'flow_rate', 'pressure', 'supply_temperature', 'return_temperature',
+            'cooling_capacity', 'flow_rate', 'pressure',
             name=_('Characteristics')
         ),
         FieldSet('tenant_group', 'tenant', name=_('Tenancy')),
@@ -1026,8 +1026,7 @@ class CoolingFeedForm(TenancyForm, PrimaryModelForm):
         model = CoolingFeed
         fields = [
             'cooling_source', 'rack', 'name', 'status', 'type', 'mark_connected', 'fluid_type', 'cooling_capacity',
-            'flow_rate', 'pressure', 'supply_temperature', 'return_temperature', 'tenant_group', 'tenant',
-            'description', 'owner', 'comments', 'tags',
+            'flow_rate', 'pressure', 'tenant_group', 'tenant', 'description', 'owner', 'comments', 'tags',
         ]
 
 

+ 0 - 6
netbox/dcim/graphql/filters.py

@@ -964,12 +964,6 @@ class CoolingFeedFilter(CabledObjectModelFilterMixin, TenancyFilterMixin, Primar
     pressure: Annotated['FloatLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = (
         strawberry_django.filter_field()
     )
-    supply_temperature: Annotated['FloatLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = (
-        strawberry_django.filter_field()
-    )
-    return_temperature: Annotated['FloatLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = (
-        strawberry_django.filter_field()
-    )
 
 
 @strawberry_django.filter_type(models.CoolingOutlet, lookups=True)

+ 1 - 13
netbox/dcim/migrations/0241_device_cooling_method_device_cooling_outlet_count_and_more.py

@@ -1,4 +1,4 @@
-# Generated by Django 6.0.6 on 2026-06-23 20:57
+# Generated by Django 6.0.6 on 2026-06-23 22:31
 
 import django.contrib.postgres.fields
 import django.core.validators
@@ -815,18 +815,6 @@ class Migration(migrations.Migration):
                         validators=[django.core.validators.MinValueValidator(0)],
                     ),
                 ),
-                (
-                    "supply_temperature",
-                    models.DecimalField(
-                        blank=True, decimal_places=2, max_digits=5, null=True
-                    ),
-                ),
-                (
-                    "return_temperature",
-                    models.DecimalField(
-                        blank=True, decimal_places=2, max_digits=5, null=True
-                    ),
-                ),
                 (
                     "_path",
                     models.ForeignKey(

+ 1 - 17
netbox/dcim/models/cooling.py

@@ -180,22 +180,6 @@ class CoolingFeed(PrimaryModel, PathEndpoint, CabledObjectModel):
         validators=[MinValueValidator(0)],
         help_text=_('Operating pressure (kPa)')
     )
-    supply_temperature = models.DecimalField(
-        verbose_name=_('supply temperature'),
-        max_digits=5,
-        decimal_places=2,
-        blank=True,
-        null=True,
-        help_text=_('Supply temperature (°C)')
-    )
-    return_temperature = models.DecimalField(
-        verbose_name=_('return temperature'),
-        max_digits=5,
-        decimal_places=2,
-        blank=True,
-        null=True,
-        help_text=_('Return temperature (°C)')
-    )
     tenant = models.ForeignKey(
         to='tenancy.Tenant',
         on_delete=models.PROTECT,
@@ -206,7 +190,7 @@ class CoolingFeed(PrimaryModel, PathEndpoint, CabledObjectModel):
 
     clone_fields = (
         'cooling_source', 'rack', 'status', 'type', 'mark_connected', 'fluid_type', 'cooling_capacity', 'flow_rate',
-        'pressure', 'supply_temperature', 'return_temperature', 'tenant',
+        'pressure', 'tenant',
     )
     prerequisite_models = (
         'dcim.CoolingSource',

+ 2 - 9
netbox/dcim/tables/cooling.py

@@ -118,12 +118,6 @@ class CoolingFeedTable(TenancyColumnsMixin, CableTerminationTable, PrimaryModelT
     pressure = tables.Column(
         verbose_name=_('Pressure (kPa)')
     )
-    supply_temperature = tables.Column(
-        verbose_name=_('Supply Temperature (°C)')
-    )
-    return_temperature = tables.Column(
-        verbose_name=_('Return Temperature (°C)')
-    )
     tenant = tables.Column(
         linkify=True,
         verbose_name=_('Tenant')
@@ -141,9 +135,8 @@ class CoolingFeedTable(TenancyColumnsMixin, CableTerminationTable, PrimaryModelT
         model = CoolingFeed
         fields = (
             'pk', 'id', 'name', 'cooling_source', 'site', 'rack', 'status', 'type', 'fluid_type', 'cooling_capacity',
-            'flow_rate', 'pressure', 'supply_temperature', 'return_temperature', 'mark_connected', 'cable',
-            'cable_color', 'link_peer', 'tenant', 'tenant_group', 'description', 'comments', 'tags', 'created',
-            'last_updated',
+            'flow_rate', 'pressure', 'mark_connected', 'cable', 'cable_color', 'link_peer', 'tenant', 'tenant_group',
+            'description', 'comments', 'tags', 'created', 'last_updated',
         )
         default_columns = (
             'pk', 'name', 'cooling_source', 'rack', 'status', 'type', 'fluid_type', 'cooling_capacity', 'flow_rate',

+ 0 - 14
netbox/dcim/tests/test_filtersets.py

@@ -8392,8 +8392,6 @@ class CoolingFeedTestCase(TestCase, ChangeLoggedFilterSetTests):
                 cooling_capacity=100,
                 flow_rate=10,
                 pressure=100,
-                supply_temperature=18,
-                return_temperature=30,
                 description='foobar1'
             ),
             CoolingFeed(
@@ -8407,8 +8405,6 @@ class CoolingFeedTestCase(TestCase, ChangeLoggedFilterSetTests):
                 cooling_capacity=200,
                 flow_rate=20,
                 pressure=200,
-                supply_temperature=20,
-                return_temperature=32,
                 description='foobar2'
             ),
             CoolingFeed(
@@ -8422,8 +8418,6 @@ class CoolingFeedTestCase(TestCase, ChangeLoggedFilterSetTests):
                 cooling_capacity=300,
                 flow_rate=30,
                 pressure=300,
-                supply_temperature=22,
-                return_temperature=34,
                 description='foobar3'
             ),
         )
@@ -8473,14 +8467,6 @@ class CoolingFeedTestCase(TestCase, ChangeLoggedFilterSetTests):
         params = {'pressure': [100, 200]}
         self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
 
-    def test_supply_temperature(self):
-        params = {'supply_temperature': [18, 20]}
-        self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
-
-    def test_return_temperature(self):
-        params = {'return_temperature': [30, 32]}
-        self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
-
     def test_description(self):
         params = {'description': ['foobar1', 'foobar2']}
         self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)

+ 16 - 4
netbox/dcim/tests/test_views.py

@@ -988,6 +988,8 @@ inventory-items:
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1084,6 +1086,8 @@ inventory-items:
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1136,6 +1140,8 @@ module-bays:
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1172,6 +1178,8 @@ console-ports: {value}
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1274,6 +1282,8 @@ class ModuleTypeTestCase(ViewTestCases.PrimaryObjectViewTestCase):
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1290,6 +1300,8 @@ class ModuleTypeTestCase(ViewTestCases.PrimaryObjectViewTestCase):
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1311,6 +1323,8 @@ class ModuleTypeTestCase(ViewTestCases.PrimaryObjectViewTestCase):
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -1520,6 +1534,8 @@ module-bays:
             'dcim.add_consoleserverporttemplate',
             'dcim.add_powerporttemplate',
             'dcim.add_poweroutlettemplate',
+            'dcim.add_coolingporttemplate',
+            'dcim.add_coolingoutlettemplate',
             'dcim.add_interfacetemplate',
             'dcim.add_frontporttemplate',
             'dcim.add_rearporttemplate',
@@ -4573,8 +4589,6 @@ class CoolingFeedTestCase(ViewTestCases.PrimaryObjectViewTestCase):
             'cooling_capacity': 100,
             'flow_rate': 50,
             'pressure': 200,
-            'supply_temperature': 18,
-            'return_temperature': 30,
             'comments': 'New comments',
             'tags': [t.pk for t in tags],
         }
@@ -4602,8 +4616,6 @@ class CoolingFeedTestCase(ViewTestCases.PrimaryObjectViewTestCase):
             'cooling_capacity': 100,
             'flow_rate': 50,
             'pressure': 200,
-            'supply_temperature': 18,
-            'return_temperature': 30,
             'comments': 'New comments',
         }
 

+ 2 - 4
netbox/dcim/ui/panels.py

@@ -99,8 +99,8 @@ class DevicePanel(panels.ObjectAttributesPanel):
     gps_coordinates = attrs.GPSCoordinatesAttr()
     tenant = attrs.RelatedObjectAttr('tenant', linkify=True, grouped_by='group')
     description = attrs.TextAttr('description')
-    airflow = attrs.ChoiceAttr('airflow')
     cooling_method = attrs.ChoiceAttr('cooling_method')
+    airflow = attrs.ChoiceAttr('airflow')
     serial = attrs.TextAttr('serial', label=_('Serial number'), style='font-monospace', copy_button=True)
     asset_tag = attrs.TextAttr('asset_tag', style='font-monospace', copy_button=True)
     config_template = attrs.RelatedObjectAttr('config_template', linkify=True)
@@ -163,8 +163,8 @@ class DeviceTypePanel(panels.ObjectAttributesPanel):
     full_depth = attrs.BooleanAttr('is_full_depth')
     weight = attrs.WeightAttr('weight')
     subdevice_role = attrs.ChoiceAttr('subdevice_role', label=_('Parent/child'))
-    airflow = attrs.ChoiceAttr('airflow')
     cooling_method = attrs.ChoiceAttr('cooling_method')
+    airflow = attrs.ChoiceAttr('airflow')
     front_image = attrs.ImageAttr('front_image')
     rear_image = attrs.ImageAttr('rear_image')
 
@@ -426,8 +426,6 @@ class CoolingFeedElectricalPanel(panels.ObjectAttributesPanel):
     cooling_capacity = attrs.TextAttr('cooling_capacity', format_string=_('{} kW'))
     flow_rate = attrs.TextAttr('flow_rate', format_string=_('{} L/min'))
     pressure = attrs.TextAttr('pressure', format_string=_('{} kPa'))
-    supply_temperature = attrs.TextAttr('supply_temperature', format_string=_('{} °C'))
-    return_temperature = attrs.TextAttr('return_temperature', format_string=_('{} °C'))
 
 
 class VirtualDeviceContextPanel(panels.ObjectAttributesPanel):

+ 1 - 0
netbox/templates/dcim/device_edit.html

@@ -22,6 +22,7 @@
         <h2 class="col-9 offset-3">{% trans "Hardware" %}</h2>
       </div>
       {% render_field form.device_type %}
+      {% render_field form.cooling_method %}
       {% render_field form.airflow %}
       {% render_field form.serial %}
       {% render_field form.asset_tag %}