mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Rename Interface type (classification) filter to kind
This commit is contained in:
parent
4acd842237
commit
533520ec1f
@ -56,8 +56,14 @@ to now use "Extras | Tag."
|
|||||||
* [#2324](https://github.com/digitalocean/netbox/issues/2324) - Add `color` option for tags
|
* [#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
|
* [#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
|
* [#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
|
* [#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
|
## Bug Fixes
|
||||||
|
|
||||||
* [#2968](https://github.com/digitalocean/netbox/issues/2968) - Correct API documentation for SerializerMethodFields
|
* [#2968](https://github.com/digitalocean/netbox/issues/2968) - Correct API documentation for SerializerMethodFields
|
||||||
|
@ -753,10 +753,9 @@ class InterfaceFilter(django_filters.FilterSet):
|
|||||||
lookup_expr='isnull',
|
lookup_expr='isnull',
|
||||||
exclude=True
|
exclude=True
|
||||||
)
|
)
|
||||||
class_ = django_filters.CharFilter(
|
kind = django_filters.CharFilter(
|
||||||
field_name='class',
|
method='filter_kind',
|
||||||
method='filter_type',
|
label='Kind of interface',
|
||||||
label='Interface type',
|
|
||||||
)
|
)
|
||||||
lag_id = django_filters.ModelMultipleChoiceFilter(
|
lag_id = django_filters.ModelMultipleChoiceFilter(
|
||||||
field_name='lag',
|
field_name='lag',
|
||||||
@ -819,7 +818,7 @@ class InterfaceFilter(django_filters.FilterSet):
|
|||||||
Q(tagged_vlans__vid=value)
|
Q(tagged_vlans__vid=value)
|
||||||
)
|
)
|
||||||
|
|
||||||
def filter_type(self, queryset, name, value):
|
def filter_kind(self, queryset, name, value):
|
||||||
value = value.strip().lower()
|
value = value.strip().lower()
|
||||||
return {
|
return {
|
||||||
'physical': queryset.exclude(type__in=NONCONNECTABLE_IFACE_TYPES),
|
'physical': queryset.exclude(type__in=NONCONNECTABLE_IFACE_TYPES),
|
||||||
|
Loading…
Reference in New Issue
Block a user