diff --git a/CHANGELOG.md b/CHANGELOG.md index 19fd2535a..5cc743f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,8 +56,14 @@ to now use "Extras | Tag." * [#2324](https://github.com/digitalocean/netbox/issues/2324) - Add `color` option for tags * [#2643](https://github.com/digitalocean/netbox/issues/2643) - Add `description` field to console/power components and device bays * [#2791](https://github.com/digitalocean/netbox/issues/2791) - Add a `comment` field for tags +* [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type` * [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add changelog to the Tag model +## API Changes + +* dcim.Interface: `form_factor` has been renamed to `type`. Backward-compatibile support for `form_factor` will be maintained until NetBox v2.7. +* dcim.Interface: The `type` filter has been renamed to `kind`. + ## Bug Fixes * [#2968](https://github.com/digitalocean/netbox/issues/2968) - Correct API documentation for SerializerMethodFields diff --git a/netbox/dcim/filters.py b/netbox/dcim/filters.py index c1fc76191..eb7636c94 100644 --- a/netbox/dcim/filters.py +++ b/netbox/dcim/filters.py @@ -753,10 +753,9 @@ class InterfaceFilter(django_filters.FilterSet): lookup_expr='isnull', exclude=True ) - class_ = django_filters.CharFilter( - field_name='class', - method='filter_type', - label='Interface type', + kind = django_filters.CharFilter( + method='filter_kind', + label='Kind of interface', ) lag_id = django_filters.ModelMultipleChoiceFilter( field_name='lag', @@ -819,7 +818,7 @@ class InterfaceFilter(django_filters.FilterSet): Q(tagged_vlans__vid=value) ) - def filter_type(self, queryset, name, value): + def filter_kind(self, queryset, name, value): value = value.strip().lower() return { 'physical': queryset.exclude(type__in=NONCONNECTABLE_IFACE_TYPES),