mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Add graphql types/filters/schema for VLANTranslationRule
This commit is contained in:
parent
a94fe018ac
commit
9da0191b09
@ -20,6 +20,7 @@ __all__ = (
|
||||
'VLANFilter',
|
||||
'VLANGroupFilter',
|
||||
'VLANTranslationPolicyFilter',
|
||||
'VLANTranslationRuleFilter',
|
||||
'VRFFilter',
|
||||
)
|
||||
|
||||
@ -120,6 +121,12 @@ class VLANTranslationPolicyFilter(BaseFilterMixin):
|
||||
pass
|
||||
|
||||
|
||||
@strawberry_django.filter(models.VLANTranslationRule, lookups=True)
|
||||
@autotype_decorator(filtersets.VLANTranslationRuleFilterSet)
|
||||
class VLANTranslationRuleFilter(BaseFilterMixin):
|
||||
pass
|
||||
|
||||
|
||||
@strawberry_django.filter(models.VRF, lookups=True)
|
||||
@autotype_decorator(filtersets.VRFFilterSet)
|
||||
class VRFFilter(BaseFilterMixin):
|
||||
|
@ -56,5 +56,8 @@ class IPAMQuery:
|
||||
vlan_translation_policy: VLANTranslationPolicyType = strawberry_django.field()
|
||||
vlan_translation_policy_list: List[VLANTranslationPolicyType] = strawberry_django.field()
|
||||
|
||||
vlan_translation_rule: VLANTranslationRuleType = strawberry_django.field()
|
||||
vlan_translation_rule_list: List[VLANTranslationRuleType] = strawberry_django.field()
|
||||
|
||||
vrf: VRFType = strawberry_django.field()
|
||||
vrf_list: List[VRFType] = strawberry_django.field()
|
||||
|
@ -28,6 +28,7 @@ __all__ = (
|
||||
'VLANType',
|
||||
'VLANGroupType',
|
||||
'VLANTranslationPolicyType',
|
||||
'VLANTranslationRuleType',
|
||||
'VRFType',
|
||||
)
|
||||
|
||||
@ -277,13 +278,22 @@ class VLANGroupType(OrganizationalObjectType):
|
||||
|
||||
@strawberry_django.type(
|
||||
models.VLANTranslationPolicy,
|
||||
exclude=('scope_type', 'scope_id'),
|
||||
fields='__all__',
|
||||
filters=VLANTranslationPolicyFilter
|
||||
)
|
||||
class VLANTranslationPolicyType(NetBoxObjectType):
|
||||
pass
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
models.VLANTranslationRule,
|
||||
fields='__all__',
|
||||
filters=VLANTranslationRuleFilter
|
||||
)
|
||||
class VLANTranslationRuleType(NetBoxObjectType):
|
||||
pass
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
models.VRF,
|
||||
fields='__all__',
|
||||
|
Loading…
Reference in New Issue
Block a user