diff --git a/netbox/circuits/graphql/filters.py b/netbox/circuits/graphql/filters.py index 966849fd0..d6ef2976d 100644 --- a/netbox/circuits/graphql/filters.py +++ b/netbox/circuits/graphql/filters.py @@ -41,7 +41,7 @@ __all__ = ( ) -@strawberry_django.filter(models.CircuitTermination, lookups=True) +@strawberry_django.filter_type(models.CircuitTermination, lookups=True) class CircuitTerminationFilter( BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, @@ -87,7 +87,7 @@ class CircuitTerminationFilter( ) -@strawberry_django.filter(models.Circuit, lookups=True) +@strawberry_django.filter_type(models.Circuit, lookups=True) class CircuitFilter( ContactFilterMixin, ImageAttachmentFilterMixin, @@ -121,17 +121,17 @@ class CircuitFilter( ) -@strawberry_django.filter(models.CircuitType, lookups=True) +@strawberry_django.filter_type(models.CircuitType, lookups=True) class CircuitTypeFilter(BaseCircuitTypeFilterMixin): pass -@strawberry_django.filter(models.CircuitGroup, lookups=True) +@strawberry_django.filter_type(models.CircuitGroup, lookups=True) class CircuitGroupFilter(TenancyFilterMixin, OrganizationalModelFilterMixin): pass -@strawberry_django.filter(models.CircuitGroupAssignment, lookups=True) +@strawberry_django.filter_type(models.CircuitGroupAssignment, lookups=True) class CircuitGroupAssignmentFilter( BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin ): @@ -148,7 +148,7 @@ class CircuitGroupAssignmentFilter( ) -@strawberry_django.filter(models.Provider, lookups=True) +@strawberry_django.filter_type(models.Provider, lookups=True) class ProviderFilter(ContactFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -158,7 +158,7 @@ class ProviderFilter(ContactFilterMixin, PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.ProviderAccount, lookups=True) +@strawberry_django.filter_type(models.ProviderAccount, lookups=True) class ProviderAccountFilter(ContactFilterMixin, PrimaryModelFilterMixin): provider: Annotated['ProviderFilter', strawberry.lazy('circuits.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -168,7 +168,7 @@ class ProviderAccountFilter(ContactFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ProviderNetwork, lookups=True) +@strawberry_django.filter_type(models.ProviderNetwork, lookups=True) class ProviderNetworkFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() provider: Annotated['ProviderFilter', strawberry.lazy('circuits.graphql.filters')] | None = ( @@ -178,12 +178,12 @@ class ProviderNetworkFilter(PrimaryModelFilterMixin): service_id: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.VirtualCircuitType, lookups=True) +@strawberry_django.filter_type(models.VirtualCircuitType, lookups=True) class VirtualCircuitTypeFilter(BaseCircuitTypeFilterMixin): pass -@strawberry_django.filter(models.VirtualCircuit, lookups=True) +@strawberry_django.filter_type(models.VirtualCircuit, lookups=True) class VirtualCircuitFilter(TenancyFilterMixin, PrimaryModelFilterMixin): cid: FilterLookup[str] | None = strawberry_django.filter_field() provider_network: Annotated['ProviderNetworkFilter', strawberry.lazy('circuits.graphql.filters')] | None = ( @@ -206,7 +206,7 @@ class VirtualCircuitFilter(TenancyFilterMixin, PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.VirtualCircuitTermination, lookups=True) +@strawberry_django.filter_type(models.VirtualCircuitTermination, lookups=True) class VirtualCircuitTerminationFilter( BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin ): diff --git a/netbox/core/graphql/filters.py b/netbox/core/graphql/filters.py index e5d44674a..76ace2362 100644 --- a/netbox/core/graphql/filters.py +++ b/netbox/core/graphql/filters.py @@ -23,7 +23,7 @@ __all__ = ( ) -@strawberry_django.filter(models.DataFile, lookups=True) +@strawberry_django.filter_type(models.DataFile, lookups=True) class DataFileFilter(BaseFilterMixin): id: ID | None = strawberry_django.filter_field() created: DatetimeFilterLookup[datetime] | None = strawberry_django.filter_field() @@ -39,7 +39,7 @@ class DataFileFilter(BaseFilterMixin): hash: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.DataSource, lookups=True) +@strawberry_django.filter_type(models.DataSource, lookups=True) class DataSourceFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() type: FilterLookup[str] | None = strawberry_django.filter_field() @@ -56,7 +56,7 @@ class DataSourceFilter(PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.ObjectChange, lookups=True) +@strawberry_django.filter_type(models.ObjectChange, lookups=True) class ObjectChangeFilter(BaseFilterMixin): id: ID | None = strawberry_django.filter_field() time: DatetimeFilterLookup[datetime] | None = strawberry_django.filter_field() @@ -82,7 +82,7 @@ class ObjectChangeFilter(BaseFilterMixin): ) -@strawberry_django.filter(DjangoContentType, lookups=True) +@strawberry_django.filter_type(DjangoContentType, lookups=True) class ContentTypeFilter(BaseFilterMixin): id: ID | None = strawberry_django.filter_field() app_label: FilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox/dcim/graphql/filters.py b/netbox/dcim/graphql/filters.py index 77e7a53b9..a8a6c2a5e 100644 --- a/netbox/dcim/graphql/filters.py +++ b/netbox/dcim/graphql/filters.py @@ -90,7 +90,7 @@ __all__ = ( ) -@strawberry_django.filter(models.Cable, lookups=True) +@strawberry_django.filter_type(models.Cable, lookups=True) class CableFilter(PrimaryModelFilterMixin, TenancyFilterMixin): type: Annotated['CableTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() status: Annotated['LinkStatusEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() @@ -107,7 +107,7 @@ class CableFilter(PrimaryModelFilterMixin, TenancyFilterMixin): ) -@strawberry_django.filter(models.CableTermination, lookups=True) +@strawberry_django.filter_type(models.CableTermination, lookups=True) class CableTerminationFilter(ChangeLogFilterMixin): cable: Annotated['CableFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() cable_id: ID | None = strawberry_django.filter_field() @@ -120,7 +120,7 @@ class CableTerminationFilter(ChangeLogFilterMixin): termination_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ConsolePort, lookups=True) +@strawberry_django.filter_type(models.ConsolePort, lookups=True) class ConsolePortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['ConsolePortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -130,14 +130,14 @@ class ConsolePortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilte ) -@strawberry_django.filter(models.ConsolePortTemplate, lookups=True) +@strawberry_django.filter_type(models.ConsolePortTemplate, lookups=True) class ConsolePortTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['ConsolePortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.ConsoleServerPort, lookups=True) +@strawberry_django.filter_type(models.ConsoleServerPort, lookups=True) class ConsoleServerPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['ConsolePortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -147,14 +147,14 @@ class ConsoleServerPortFilter(ModularComponentModelFilterMixin, CabledObjectMode ) -@strawberry_django.filter(models.ConsoleServerPortTemplate, lookups=True) +@strawberry_django.filter_type(models.ConsoleServerPortTemplate, lookups=True) class ConsoleServerPortTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['ConsolePortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.Device, lookups=True) +@strawberry_django.filter_type(models.Device, lookups=True) class DeviceFilter( ContactFilterMixin, TenancyFilterMixin, @@ -271,7 +271,7 @@ class DeviceFilter( inventory_item_count: FilterLookup[int] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.DeviceBay, lookups=True) +@strawberry_django.filter_type(models.DeviceBay, lookups=True) class DeviceBayFilter(ComponentModelFilterMixin): installed_device: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -279,12 +279,12 @@ class DeviceBayFilter(ComponentModelFilterMixin): installed_device_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.DeviceBayTemplate, lookups=True) +@strawberry_django.filter_type(models.DeviceBayTemplate, lookups=True) class DeviceBayTemplateFilter(ComponentTemplateFilterMixin): pass -@strawberry_django.filter(models.InventoryItemTemplate, lookups=True) +@strawberry_django.filter_type(models.InventoryItemTemplate, lookups=True) class InventoryItemTemplateFilter(ComponentTemplateFilterMixin): parent: Annotated['InventoryItemTemplateFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -304,13 +304,13 @@ class InventoryItemTemplateFilter(ComponentTemplateFilterMixin): part_id: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.DeviceRole, lookups=True) +@strawberry_django.filter_type(models.DeviceRole, lookups=True) class DeviceRoleFilter(OrganizationalModelFilterMixin, RenderConfigFilterMixin): color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() vm_role: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.DeviceType, lookups=True) +@strawberry_django.filter_type(models.DeviceType, lookups=True) class DeviceTypeFilter(ImageAttachmentFilterMixin, PrimaryModelFilterMixin, WeightFilterMixin): manufacturer: Annotated['ManufacturerFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -382,7 +382,7 @@ class DeviceTypeFilter(ImageAttachmentFilterMixin, PrimaryModelFilterMixin, Weig inventory_item_template_count: FilterLookup[int] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.FrontPort, lookups=True) +@strawberry_django.filter_type(models.FrontPort, lookups=True) class FrontPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['PortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() @@ -395,7 +395,7 @@ class FrontPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterM ) -@strawberry_django.filter(models.FrontPortTemplate, lookups=True) +@strawberry_django.filter_type(models.FrontPortTemplate, lookups=True) class FrontPortTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['PortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() @@ -408,7 +408,7 @@ class FrontPortTemplateFilter(ModularComponentTemplateFilterMixin): ) -@strawberry_django.filter(models.MACAddress, lookups=True) +@strawberry_django.filter_type(models.MACAddress, lookups=True) class MACAddressFilter(PrimaryModelFilterMixin): mac_address: FilterLookup[str] | None = strawberry_django.filter_field() assigned_object_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( @@ -417,7 +417,7 @@ class MACAddressFilter(PrimaryModelFilterMixin): assigned_object_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Interface, lookups=True) +@strawberry_django.filter_type(models.Interface, lookups=True) class InterfaceFilter(ModularComponentModelFilterMixin, InterfaceBaseFilterMixin, CabledObjectModelFilterMixin): vcdcs: Annotated['VirtualDeviceContextFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -486,7 +486,7 @@ class InterfaceFilter(ModularComponentModelFilterMixin, InterfaceBaseFilterMixin ) -@strawberry_django.filter(models.InterfaceTemplate, lookups=True) +@strawberry_django.filter_type(models.InterfaceTemplate, lookups=True) class InterfaceTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['InterfaceTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -508,7 +508,7 @@ class InterfaceTemplateFilter(ModularComponentTemplateFilterMixin): ) -@strawberry_django.filter(models.InventoryItem, lookups=True) +@strawberry_django.filter_type(models.InventoryItem, lookups=True) class InventoryItemFilter(ComponentModelFilterMixin): parent: Annotated['InventoryItemFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -535,12 +535,12 @@ class InventoryItemFilter(ComponentModelFilterMixin): discovered: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.InventoryItemRole, lookups=True) +@strawberry_django.filter_type(models.InventoryItemRole, lookups=True) class InventoryItemRoleFilter(OrganizationalModelFilterMixin): color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Location, lookups=True) +@strawberry_django.filter_type(models.Location, lookups=True) class LocationFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilterMixin, NestedGroupModelFilterMixin): site: Annotated['SiteFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() site_id: ID | None = strawberry_django.filter_field() @@ -556,12 +556,12 @@ class LocationFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilt ) -@strawberry_django.filter(models.Manufacturer, lookups=True) +@strawberry_django.filter_type(models.Manufacturer, lookups=True) class ManufacturerFilter(ContactFilterMixin, OrganizationalModelFilterMixin): pass -@strawberry_django.filter(models.Module, lookups=True) +@strawberry_django.filter_type(models.Module, lookups=True) class ModuleFilter(PrimaryModelFilterMixin, ConfigContextFilterMixin): device: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() device_id: ID | None = strawberry_django.filter_field() @@ -610,7 +610,7 @@ class ModuleFilter(PrimaryModelFilterMixin, ConfigContextFilterMixin): ) -@strawberry_django.filter(models.ModuleBay, lookups=True) +@strawberry_django.filter_type(models.ModuleBay, lookups=True) class ModuleBayFilter(ModularComponentModelFilterMixin): parent: Annotated['ModuleBayFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -619,17 +619,17 @@ class ModuleBayFilter(ModularComponentModelFilterMixin): position: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ModuleBayTemplate, lookups=True) +@strawberry_django.filter_type(models.ModuleBayTemplate, lookups=True) class ModuleBayTemplateFilter(ModularComponentTemplateFilterMixin): position: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ModuleTypeProfile, lookups=True) +@strawberry_django.filter_type(models.ModuleTypeProfile, lookups=True) class ModuleTypeProfileFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ModuleType, lookups=True) +@strawberry_django.filter_type(models.ModuleType, lookups=True) class ModuleTypeFilter(ImageAttachmentFilterMixin, PrimaryModelFilterMixin, WeightFilterMixin): manufacturer: Annotated['ManufacturerFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -676,7 +676,7 @@ class ModuleTypeFilter(ImageAttachmentFilterMixin, PrimaryModelFilterMixin, Weig ) = strawberry_django.filter_field() -@strawberry_django.filter(models.Platform, lookups=True) +@strawberry_django.filter_type(models.Platform, lookups=True) class PlatformFilter(OrganizationalModelFilterMixin): manufacturer: Annotated['ManufacturerFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -688,7 +688,7 @@ class PlatformFilter(OrganizationalModelFilterMixin): config_template_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.PowerFeed, lookups=True) +@strawberry_django.filter_type(models.PowerFeed, lookups=True) class PowerFeedFilter(CabledObjectModelFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): power_panel: Annotated['PowerPanelFilter', strawberry.lazy('dcim.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -723,7 +723,7 @@ class PowerFeedFilter(CabledObjectModelFilterMixin, TenancyFilterMixin, PrimaryM ) -@strawberry_django.filter(models.PowerOutlet, lookups=True) +@strawberry_django.filter_type(models.PowerOutlet, lookups=True) class PowerOutletFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['PowerOutletTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -738,7 +738,7 @@ class PowerOutletFilter(ModularComponentModelFilterMixin, CabledObjectModelFilte color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.PowerOutletTemplate, lookups=True) +@strawberry_django.filter_type(models.PowerOutletTemplate, lookups=True) class PowerOutletTemplateFilter(ModularComponentModelFilterMixin): type: Annotated['PowerOutletTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -752,7 +752,7 @@ class PowerOutletTemplateFilter(ModularComponentModelFilterMixin): ) -@strawberry_django.filter(models.PowerPanel, lookups=True) +@strawberry_django.filter_type(models.PowerPanel, lookups=True) class PowerPanelFilter(ContactFilterMixin, ImageAttachmentFilterMixin, PrimaryModelFilterMixin): site: Annotated['SiteFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() site_id: ID | None = strawberry_django.filter_field() @@ -765,7 +765,7 @@ class PowerPanelFilter(ContactFilterMixin, ImageAttachmentFilterMixin, PrimaryMo name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.PowerPort, lookups=True) +@strawberry_django.filter_type(models.PowerPort, lookups=True) class PowerPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['PowerPortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -778,7 +778,7 @@ class PowerPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterM ) -@strawberry_django.filter(models.PowerPortTemplate, lookups=True) +@strawberry_django.filter_type(models.PowerPortTemplate, lookups=True) class PowerPortTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['PowerPortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -791,7 +791,7 @@ class PowerPortTemplateFilter(ModularComponentTemplateFilterMixin): ) -@strawberry_django.filter(models.RackType, lookups=True) +@strawberry_django.filter_type(models.RackType, lookups=True) class RackTypeFilter(RackBaseFilterMixin): form_factor: Annotated['RackFormFactorEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -804,7 +804,7 @@ class RackTypeFilter(RackBaseFilterMixin): slug: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Rack, lookups=True) +@strawberry_django.filter_type(models.Rack, lookups=True) class RackFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilterMixin, RackBaseFilterMixin): form_factor: Annotated['RackFormFactorEnum', strawberry.lazy('dcim.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -836,7 +836,7 @@ class RackFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilterMi ) -@strawberry_django.filter(models.RackReservation, lookups=True) +@strawberry_django.filter_type(models.RackReservation, lookups=True) class RackReservationFilter(TenancyFilterMixin, PrimaryModelFilterMixin): rack: Annotated['RackFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() rack_id: ID | None = strawberry_django.filter_field() @@ -848,12 +848,12 @@ class RackReservationFilter(TenancyFilterMixin, PrimaryModelFilterMixin): description: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.RackRole, lookups=True) +@strawberry_django.filter_type(models.RackRole, lookups=True) class RackRoleFilter(OrganizationalModelFilterMixin): color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.RearPort, lookups=True) +@strawberry_django.filter_type(models.RearPort, lookups=True) class RearPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMixin): type: Annotated['PortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() @@ -862,7 +862,7 @@ class RearPortFilter(ModularComponentModelFilterMixin, CabledObjectModelFilterMi ) -@strawberry_django.filter(models.RearPortTemplate, lookups=True) +@strawberry_django.filter_type(models.RearPortTemplate, lookups=True) class RearPortTemplateFilter(ModularComponentTemplateFilterMixin): type: Annotated['PortTypeEnum', strawberry.lazy('dcim.graphql.enums')] | None = strawberry_django.filter_field() color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() @@ -871,7 +871,7 @@ class RearPortTemplateFilter(ModularComponentTemplateFilterMixin): ) -@strawberry_django.filter(models.Region, lookups=True) +@strawberry_django.filter_type(models.Region, lookups=True) class RegionFilter(ContactFilterMixin, NestedGroupModelFilterMixin): prefixes: Annotated['PrefixFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -881,7 +881,7 @@ class RegionFilter(ContactFilterMixin, NestedGroupModelFilterMixin): ) -@strawberry_django.filter(models.Site, lookups=True) +@strawberry_django.filter_type(models.Site, lookups=True) class SiteFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -915,7 +915,7 @@ class SiteFilter(ContactFilterMixin, ImageAttachmentFilterMixin, TenancyFilterMi ) -@strawberry_django.filter(models.SiteGroup, lookups=True) +@strawberry_django.filter_type(models.SiteGroup, lookups=True) class SiteGroupFilter(ContactFilterMixin, NestedGroupModelFilterMixin): prefixes: Annotated['PrefixFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -925,7 +925,7 @@ class SiteGroupFilter(ContactFilterMixin, NestedGroupModelFilterMixin): ) -@strawberry_django.filter(models.VirtualChassis, lookups=True) +@strawberry_django.filter_type(models.VirtualChassis, lookups=True) class VirtualChassisFilter(PrimaryModelFilterMixin): master: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() master_id: ID | None = strawberry_django.filter_field() @@ -937,7 +937,7 @@ class VirtualChassisFilter(PrimaryModelFilterMixin): member_count: FilterLookup[int] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.VirtualDeviceContext, lookups=True) +@strawberry_django.filter_type(models.VirtualDeviceContext, lookups=True) class VirtualDeviceContextFilter(TenancyFilterMixin, PrimaryModelFilterMixin): device: Annotated['DeviceFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() device_id: ID | None = strawberry_django.filter_field() diff --git a/netbox/extras/graphql/filters.py b/netbox/extras/graphql/filters.py index 2798c4896..1712b7056 100644 --- a/netbox/extras/graphql/filters.py +++ b/netbox/extras/graphql/filters.py @@ -40,7 +40,7 @@ __all__ = ( ) -@strawberry_django.filter(models.ConfigContext, lookups=True) +@strawberry_django.filter_type(models.ConfigContext, lookups=True) class ConfigContextFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] = strawberry_django.filter_field() weight: Annotated['IntegerLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = ( @@ -97,7 +97,7 @@ class ConfigContextFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, Chan ) -@strawberry_django.filter(models.ConfigTemplate, lookups=True) +@strawberry_django.filter_type(models.ConfigTemplate, lookups=True) class ConfigTemplateFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -111,7 +111,7 @@ class ConfigTemplateFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, Cha as_attachment: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.CustomField, lookups=True) +@strawberry_django.filter_type(models.CustomField, lookups=True) class CustomFieldFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): type: Annotated['CustomFieldTypeEnum', strawberry.lazy('extras.graphql.enums')] | None = ( strawberry_django.filter_field() @@ -164,7 +164,7 @@ class CustomFieldFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): comments: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.CustomFieldChoiceSet, lookups=True) +@strawberry_django.filter_type(models.CustomFieldChoiceSet, lookups=True) class CustomFieldChoiceSetFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -177,7 +177,7 @@ class CustomFieldChoiceSetFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin order_alphabetically: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.CustomLink, lookups=True) +@strawberry_django.filter_type(models.CustomLink, lookups=True) class CustomLinkFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() enabled: FilterLookup[bool] | None = strawberry_django.filter_field() @@ -193,7 +193,7 @@ class CustomLinkFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): new_window: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ExportTemplate, lookups=True) +@strawberry_django.filter_type(models.ExportTemplate, lookups=True) class ExportTemplateFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -207,7 +207,7 @@ class ExportTemplateFilter(BaseObjectTypeFilterMixin, SyncedDataFilterMixin, Cha as_attachment: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ImageAttachment, lookups=True) +@strawberry_django.filter_type(models.ImageAttachment, lookups=True) class ImageAttachmentFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): object_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -222,7 +222,7 @@ class ImageAttachmentFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.JournalEntry, lookups=True) +@strawberry_django.filter_type(models.JournalEntry, lookups=True) class JournalEntryFilter(BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin): assigned_object_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -238,7 +238,7 @@ class JournalEntryFilter(BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, Tag comments: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.NotificationGroup, lookups=True) +@strawberry_django.filter_type(models.NotificationGroup, lookups=True) class NotificationGroupFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -246,7 +246,7 @@ class NotificationGroupFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): users: Annotated['UserFilter', strawberry.lazy('users.graphql.filters')] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.SavedFilter, lookups=True) +@strawberry_django.filter_type(models.SavedFilter, lookups=True) class SavedFilterFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -263,7 +263,7 @@ class SavedFilterFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): ) -@strawberry_django.filter(models.TableConfig, lookups=True) +@strawberry_django.filter_type(models.TableConfig, lookups=True) class TableConfigFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -276,13 +276,13 @@ class TableConfigFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): shared: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Tag, lookups=True) +@strawberry_django.filter_type(models.Tag, lookups=True) class TagFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin, TagBaseFilterMixin): color: Annotated['ColorEnum', strawberry.lazy('netbox.graphql.enums')] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Webhook, lookups=True) +@strawberry_django.filter_type(models.Webhook, lookups=True) class WebhookFilter(BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() @@ -301,7 +301,7 @@ class WebhookFilter(BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilt ) -@strawberry_django.filter(models.EventRule, lookups=True) +@strawberry_django.filter_type(models.EventRule, lookups=True) class EventRuleFilter(BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox/ipam/graphql/filters.py b/netbox/ipam/graphql/filters.py index 9d168f3d9..511d4d53c 100644 --- a/netbox/ipam/graphql/filters.py +++ b/netbox/ipam/graphql/filters.py @@ -46,7 +46,7 @@ __all__ = ( ) -@strawberry_django.filter(models.ASN, lookups=True) +@strawberry_django.filter_type(models.ASN, lookups=True) class ASNFilter(TenancyFilterMixin, PrimaryModelFilterMixin): rir: Annotated['RIRFilter', strawberry.lazy('ipam.graphql.filters')] | None = strawberry_django.filter_field() rir_id: ID | None = strawberry_django.filter_field() @@ -61,7 +61,7 @@ class ASNFilter(TenancyFilterMixin, PrimaryModelFilterMixin): ) = strawberry_django.filter_field() -@strawberry_django.filter(models.ASNRange, lookups=True) +@strawberry_django.filter_type(models.ASNRange, lookups=True) class ASNRangeFilter(TenancyFilterMixin, OrganizationalModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -75,7 +75,7 @@ class ASNRangeFilter(TenancyFilterMixin, OrganizationalModelFilterMixin): ) -@strawberry_django.filter(models.Aggregate, lookups=True) +@strawberry_django.filter_type(models.Aggregate, lookups=True) class AggregateFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): prefix: Annotated['PrefixFilter', strawberry.lazy('ipam.graphql.filters')] | None = strawberry_django.filter_field() prefix_id: ID | None = strawberry_django.filter_field() @@ -84,7 +84,7 @@ class AggregateFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilter date_added: DateFilterLookup[date] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.FHRPGroup, lookups=True) +@strawberry_django.filter_type(models.FHRPGroup, lookups=True) class FHRPGroupFilter(PrimaryModelFilterMixin): group_id: Annotated['IntegerLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = ( strawberry_django.filter_field() @@ -102,7 +102,7 @@ class FHRPGroupFilter(PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.FHRPGroupAssignment, lookups=True) +@strawberry_django.filter_type(models.FHRPGroupAssignment, lookups=True) class FHRPGroupAssignmentFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin): interface_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -117,7 +117,7 @@ class FHRPGroupAssignmentFilter(BaseObjectTypeFilterMixin, ChangeLogFilterMixin) ) -@strawberry_django.filter(models.IPAddress, lookups=True) +@strawberry_django.filter_type(models.IPAddress, lookups=True) class IPAddressFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): address: FilterLookup[str] | None = strawberry_django.filter_field() vrf: Annotated['VRFFilter', strawberry.lazy('ipam.graphql.filters')] | None = strawberry_django.filter_field() @@ -156,7 +156,7 @@ class IPAddressFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilter return q -@strawberry_django.filter(models.IPRange, lookups=True) +@strawberry_django.filter_type(models.IPRange, lookups=True) class IPRangeFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): start_address: FilterLookup[str] | None = strawberry_django.filter_field() end_address: FilterLookup[str] | None = strawberry_django.filter_field() @@ -185,7 +185,7 @@ class IPRangeFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMi return q -@strawberry_django.filter(models.Prefix, lookups=True) +@strawberry_django.filter_type(models.Prefix, lookups=True) class PrefixFilter(ContactFilterMixin, ScopedFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): prefix: FilterLookup[str] | None = strawberry_django.filter_field() vrf: Annotated['VRFFilter', strawberry.lazy('ipam.graphql.filters')] | None = strawberry_django.filter_field() @@ -201,19 +201,19 @@ class PrefixFilter(ContactFilterMixin, ScopedFilterMixin, TenancyFilterMixin, Pr mark_utilized: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.RIR, lookups=True) +@strawberry_django.filter_type(models.RIR, lookups=True) class RIRFilter(OrganizationalModelFilterMixin): is_private: FilterLookup[bool] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Role, lookups=True) +@strawberry_django.filter_type(models.Role, lookups=True) class RoleFilter(OrganizationalModelFilterMixin): weight: Annotated['IntegerLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.RouteTarget, lookups=True) +@strawberry_django.filter_type(models.RouteTarget, lookups=True) class RouteTargetFilter(TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() importing_vrfs: Annotated['VRFFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( @@ -230,7 +230,7 @@ class RouteTargetFilter(TenancyFilterMixin, PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.Service, lookups=True) +@strawberry_django.filter_type(models.Service, lookups=True) class ServiceFilter(ContactFilterMixin, ServiceBaseFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() ip_addresses: Annotated['IPAddressFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( @@ -242,12 +242,12 @@ class ServiceFilter(ContactFilterMixin, ServiceBaseFilterMixin, PrimaryModelFilt parent_object_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.ServiceTemplate, lookups=True) +@strawberry_django.filter_type(models.ServiceTemplate, lookups=True) class ServiceTemplateFilter(ServiceBaseFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.VLAN, lookups=True) +@strawberry_django.filter_type(models.VLAN, lookups=True) class VLANFilter(TenancyFilterMixin, PrimaryModelFilterMixin): site: Annotated['SiteFilter', strawberry.lazy('dcim.graphql.filters')] | None = strawberry_django.filter_field() site_id: ID | None = strawberry_django.filter_field() @@ -277,19 +277,19 @@ class VLANFilter(TenancyFilterMixin, PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.VLANGroup, lookups=True) +@strawberry_django.filter_type(models.VLANGroup, lookups=True) class VLANGroupFilter(ScopedFilterMixin, OrganizationalModelFilterMixin): vid_ranges: Annotated['IntegerArrayLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.VLANTranslationPolicy, lookups=True) +@strawberry_django.filter_type(models.VLANTranslationPolicy, lookups=True) class VLANTranslationPolicyFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.VLANTranslationRule, lookups=True) +@strawberry_django.filter_type(models.VLANTranslationRule, lookups=True) class VLANTranslationRuleFilter(NetBoxModelFilterMixin): policy: Annotated['VLANTranslationPolicyFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -304,7 +304,7 @@ class VLANTranslationRuleFilter(NetBoxModelFilterMixin): ) -@strawberry_django.filter(models.VRF, lookups=True) +@strawberry_django.filter_type(models.VRF, lookups=True) class VRFFilter(TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() rd: FilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox/tenancy/graphql/filters.py b/netbox/tenancy/graphql/filters.py index f215fd8ab..fb37359ef 100644 --- a/netbox/tenancy/graphql/filters.py +++ b/netbox/tenancy/graphql/filters.py @@ -56,7 +56,7 @@ __all__ = ( ) -@strawberry_django.filter(models.Tenant, lookups=True) +@strawberry_django.filter_type(models.Tenant, lookups=True) class TenantFilter(PrimaryModelFilterMixin, ContactFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -135,7 +135,7 @@ class TenantFilter(PrimaryModelFilterMixin, ContactFilterMixin): ) -@strawberry_django.filter(models.TenantGroup, lookups=True) +@strawberry_django.filter_type(models.TenantGroup, lookups=True) class TenantGroupFilter(OrganizationalModelFilterMixin): parent: Annotated['TenantGroupFilter', strawberry.lazy('tenancy.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -149,7 +149,7 @@ class TenantGroupFilter(OrganizationalModelFilterMixin): ) -@strawberry_django.filter(models.Contact, lookups=True) +@strawberry_django.filter_type(models.Contact, lookups=True) class ContactFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() title: FilterLookup[str] | None = strawberry_django.filter_field() @@ -165,19 +165,19 @@ class ContactFilter(PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.ContactRole, lookups=True) +@strawberry_django.filter_type(models.ContactRole, lookups=True) class ContactRoleFilter(OrganizationalModelFilterMixin): pass -@strawberry_django.filter(models.ContactGroup, lookups=True) +@strawberry_django.filter_type(models.ContactGroup, lookups=True) class ContactGroupFilter(NestedGroupModelFilterMixin): parent: Annotated['ContactGroupFilter', strawberry.lazy('tenancy.graphql.filters')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.ContactAssignment, lookups=True) +@strawberry_django.filter_type(models.ContactAssignment, lookups=True) class ContactAssignmentFilter(CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin): object_type: Annotated['ContentTypeFilter', strawberry.lazy('core.graphql.filters')] | None = ( strawberry_django.filter_field() diff --git a/netbox/users/graphql/filters.py b/netbox/users/graphql/filters.py index 8f8a8f946..60a80181b 100644 --- a/netbox/users/graphql/filters.py +++ b/netbox/users/graphql/filters.py @@ -14,13 +14,13 @@ __all__ = ( ) -@strawberry_django.filter(models.Group, lookups=True) +@strawberry_django.filter_type(models.Group, lookups=True) class GroupFilter(BaseObjectTypeFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() description: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.User, lookups=True) +@strawberry_django.filter_type(models.User, lookups=True) class UserFilter(BaseObjectTypeFilterMixin): username: FilterLookup[str] | None = strawberry_django.filter_field() first_name: FilterLookup[str] | None = strawberry_django.filter_field() diff --git a/netbox/virtualization/graphql/filters.py b/netbox/virtualization/graphql/filters.py index 2a09e86d1..a10ade5a2 100644 --- a/netbox/virtualization/graphql/filters.py +++ b/netbox/virtualization/graphql/filters.py @@ -39,7 +39,7 @@ __all__ = ( ) -@strawberry_django.filter(models.Cluster, lookups=True) +@strawberry_django.filter_type(models.Cluster, lookups=True) class ClusterFilter(ContactFilterMixin, ScopedFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() type: Annotated['ClusterTypeFilter', strawberry.lazy('virtualization.graphql.filters')] | None = ( @@ -58,19 +58,19 @@ class ClusterFilter(ContactFilterMixin, ScopedFilterMixin, TenancyFilterMixin, P ) -@strawberry_django.filter(models.ClusterGroup, lookups=True) +@strawberry_django.filter_type(models.ClusterGroup, lookups=True) class ClusterGroupFilter(ContactFilterMixin, OrganizationalModelFilterMixin): vlan_groups: Annotated['VLANGroupFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( strawberry_django.filter_field() ) -@strawberry_django.filter(models.ClusterType, lookups=True) +@strawberry_django.filter_type(models.ClusterType, lookups=True) class ClusterTypeFilter(OrganizationalModelFilterMixin): pass -@strawberry_django.filter(models.VirtualMachine, lookups=True) +@strawberry_django.filter_type(models.VirtualMachine, lookups=True) class VirtualMachineFilter( ContactFilterMixin, ImageAttachmentFilterMixin, @@ -130,7 +130,7 @@ class VirtualMachineFilter( ) -@strawberry_django.filter(models.VMInterface, lookups=True) +@strawberry_django.filter_type(models.VMInterface, lookups=True) class VMInterfaceFilter(VMComponentFilterMixin, InterfaceBaseFilterMixin): ip_addresses: Annotated['IPAddressFilter', strawberry.lazy('ipam.graphql.filters')] | None = ( strawberry_django.filter_field() @@ -155,7 +155,7 @@ class VMInterfaceFilter(VMComponentFilterMixin, InterfaceBaseFilterMixin): ) -@strawberry_django.filter(models.VirtualDisk, lookups=True) +@strawberry_django.filter_type(models.VirtualDisk, lookups=True) class VirtualDiskFilter(VMComponentFilterMixin): size: Annotated['IntegerLookup', strawberry.lazy('netbox.graphql.filter_lookups')] | None = ( strawberry_django.filter_field() diff --git a/netbox/vpn/graphql/filters.py b/netbox/vpn/graphql/filters.py index f3ee290fe..21adcd100 100644 --- a/netbox/vpn/graphql/filters.py +++ b/netbox/vpn/graphql/filters.py @@ -31,12 +31,12 @@ __all__ = ( ) -@strawberry_django.filter(models.TunnelGroup, lookups=True) +@strawberry_django.filter_type(models.TunnelGroup, lookups=True) class TunnelGroupFilter(OrganizationalModelFilterMixin): pass -@strawberry_django.filter(models.TunnelTermination, lookups=True) +@strawberry_django.filter_type(models.TunnelTermination, lookups=True) class TunnelTerminationFilter( BaseObjectTypeFilterMixin, CustomFieldsFilterMixin, TagsFilterMixin, ChangeLogFilterMixin ): @@ -56,7 +56,7 @@ class TunnelTerminationFilter( outside_ip_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.Tunnel, lookups=True) +@strawberry_django.filter_type(models.Tunnel, lookups=True) class TunnelFilter(TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() status: Annotated['TunnelStatusEnum', strawberry.lazy('vpn.graphql.enums')] | None = ( @@ -80,7 +80,7 @@ class TunnelFilter(TenancyFilterMixin, PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.IKEProposal, lookups=True) +@strawberry_django.filter_type(models.IKEProposal, lookups=True) class IKEProposalFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() authentication_method: Annotated['AuthenticationMethodEnum', strawberry.lazy('vpn.graphql.enums')] | None = ( @@ -101,7 +101,7 @@ class IKEProposalFilter(PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.IKEPolicy, lookups=True) +@strawberry_django.filter_type(models.IKEPolicy, lookups=True) class IKEPolicyFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() version: Annotated['IKEVersionEnum', strawberry.lazy('vpn.graphql.enums')] | None = strawberry_django.filter_field() @@ -112,7 +112,7 @@ class IKEPolicyFilter(PrimaryModelFilterMixin): preshared_key: FilterLookup[str] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.IPSecProposal, lookups=True) +@strawberry_django.filter_type(models.IPSecProposal, lookups=True) class IPSecProposalFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() encryption_algorithm: Annotated['EncryptionAlgorithmEnum', strawberry.lazy('vpn.graphql.enums')] | None = ( @@ -132,7 +132,7 @@ class IPSecProposalFilter(PrimaryModelFilterMixin): ) -@strawberry_django.filter(models.IPSecPolicy, lookups=True) +@strawberry_django.filter_type(models.IPSecPolicy, lookups=True) class IPSecPolicyFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() proposals: Annotated['IPSecProposalFilter', strawberry.lazy('vpn.graphql.filters')] | None = ( @@ -141,7 +141,7 @@ class IPSecPolicyFilter(PrimaryModelFilterMixin): pfs_group: Annotated['DHGroupEnum', strawberry.lazy('vpn.graphql.enums')] | None = strawberry_django.filter_field() -@strawberry_django.filter(models.IPSecProfile, lookups=True) +@strawberry_django.filter_type(models.IPSecProfile, lookups=True) class IPSecProfileFilter(PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() mode: Annotated['IPSecModeEnum', strawberry.lazy('vpn.graphql.enums')] | None = strawberry_django.filter_field() @@ -155,7 +155,7 @@ class IPSecProfileFilter(PrimaryModelFilterMixin): ipsec_policy_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.L2VPN, lookups=True) +@strawberry_django.filter_type(models.L2VPN, lookups=True) class L2VPNFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixin): name: FilterLookup[str] | None = strawberry_django.filter_field() slug: FilterLookup[str] | None = strawberry_django.filter_field() @@ -174,7 +174,7 @@ class L2VPNFilter(ContactFilterMixin, TenancyFilterMixin, PrimaryModelFilterMixi ) -@strawberry_django.filter(models.L2VPNTermination, lookups=True) +@strawberry_django.filter_type(models.L2VPNTermination, lookups=True) class L2VPNTerminationFilter(NetBoxModelFilterMixin): l2vpn: Annotated['L2VPNFilter', strawberry.lazy('vpn.graphql.filters')] | None = strawberry_django.filter_field() l2vpn_id: ID | None = strawberry_django.filter_field() diff --git a/netbox/wireless/graphql/filters.py b/netbox/wireless/graphql/filters.py index d71af7ae2..5bd22afab 100644 --- a/netbox/wireless/graphql/filters.py +++ b/netbox/wireless/graphql/filters.py @@ -23,12 +23,12 @@ __all__ = ( ) -@strawberry_django.filter(models.WirelessLANGroup, lookups=True) +@strawberry_django.filter_type(models.WirelessLANGroup, lookups=True) class WirelessLANGroupFilter(NestedGroupModelFilterMixin): pass -@strawberry_django.filter(models.WirelessLAN, lookups=True) +@strawberry_django.filter_type(models.WirelessLAN, lookups=True) class WirelessLANFilter( WirelessAuthenticationBaseFilterMixin, ScopedFilterMixin, @@ -47,7 +47,7 @@ class WirelessLANFilter( vlan_id: ID | None = strawberry_django.filter_field() -@strawberry_django.filter(models.WirelessLink, lookups=True) +@strawberry_django.filter_type(models.WirelessLink, lookups=True) class WirelessLinkFilter( WirelessAuthenticationBaseFilterMixin, DistanceFilterMixin,