diff --git a/netbox/dcim/api/serializers.py b/netbox/dcim/api/serializers.py index e86a4549d..882e12310 100644 --- a/netbox/dcim/api/serializers.py +++ b/netbox/dcim/api/serializers.py @@ -220,7 +220,6 @@ class NestedManufacturerSerializer(WritableNestedSerializer): class DeviceTypeSerializer(TaggitSerializer, CustomFieldModelSerializer): manufacturer = NestedManufacturerSerializer() - interface_ordering = ChoiceField(choices=IFACE_ORDERING_CHOICES, required=False) subdevice_role = ChoiceField(choices=SUBDEVICE_ROLE_CHOICES, required=False, allow_null=True) instance_count = serializers.IntegerField(source='instances.count', read_only=True) tags = TagListSerializerField(required=False) @@ -228,8 +227,8 @@ class DeviceTypeSerializer(TaggitSerializer, CustomFieldModelSerializer): class Meta: model = DeviceType fields = [ - 'id', 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'interface_ordering', - 'subdevice_role', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'instance_count', + 'id', 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role', + 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'instance_count', ] diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 52f04ccff..e5c97c4a2 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -605,12 +605,9 @@ class DeviceTypeForm(BootstrapMixin, CustomFieldForm): class Meta: model = DeviceType fields = [ - 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role', - 'interface_ordering', 'comments', 'tags', + 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role', 'comments', + 'tags', ] - labels = { - 'interface_ordering': 'Order interfaces by', - } class DeviceTypeCSVForm(forms.ModelForm): @@ -628,11 +625,6 @@ class DeviceTypeCSVForm(forms.ModelForm): required=False, help_text='Parent/child status' ) - interface_ordering = CSVChoiceField( - choices=IFACE_ORDERING_CHOICES, - required=False, - help_text='Interface ordering' - ) class Meta: model = DeviceType @@ -648,7 +640,6 @@ class DeviceTypeBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkE manufacturer = forms.ModelChoiceField(queryset=Manufacturer.objects.all(), required=False) u_height = forms.IntegerField(min_value=1, required=False) is_full_depth = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is full depth') - interface_ordering = forms.ChoiceField(choices=add_blank_choice(IFACE_ORDERING_CHOICES), required=False) class Meta: nullable_fields = [] diff --git a/netbox/dcim/migrations/0067_device_type_remove_qualifiers.py b/netbox/dcim/migrations/0067_device_type_remove_qualifiers.py index 883f863fc..e78ccd8b6 100644 --- a/netbox/dcim/migrations/0067_device_type_remove_qualifiers.py +++ b/netbox/dcim/migrations/0067_device_type_remove_qualifiers.py @@ -22,4 +22,8 @@ class Migration(migrations.Migration): model_name='devicetype', name='is_pdu', ), + migrations.RemoveField( + model_name='devicetype', + name='interface_ordering', + ), ] diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 95f17fb37..e332dafd2 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -859,10 +859,6 @@ class DeviceType(ChangeLoggedModel, CustomFieldModel): verbose_name='Is full depth', help_text='Device consumes both front and rear rack faces' ) - interface_ordering = models.PositiveSmallIntegerField( - choices=IFACE_ORDERING_CHOICES, - default=IFACE_ORDERING_POSITION - ) subdevice_role = models.NullBooleanField( default=None, verbose_name='Parent/child status', @@ -882,8 +878,7 @@ class DeviceType(ChangeLoggedModel, CustomFieldModel): tags = TaggableManager() csv_headers = [ - 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role', - 'interface_ordering', 'comments', + 'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role', 'comments', ] class Meta: @@ -914,7 +909,6 @@ class DeviceType(ChangeLoggedModel, CustomFieldModel): self.u_height, self.is_full_depth, self.get_subdevice_role_display() if self.subdevice_role else None, - self.get_interface_ordering_display(), self.comments, ) diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html index 89225e7e6..1719e8f66 100644 --- a/netbox/templates/dcim/devicetype.html +++ b/netbox/templates/dcim/devicetype.html @@ -108,10 +108,6 @@ {% endif %} -