
* VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes * Change VLANTranslationPolicy to a PrimaryModel and make name unique * Add serializer classes to InterfaceSerializer * Remake migrations * Add GraphQL typing * Skip tagged models in test * Missing migration * Remove get_absolute_url methods * Remove package-lock.json * Rebuild migration and add constraints and field options * Rebuild migrations * Use DynamicModelChoiceField for policy field * Make vlan_translation_policy fields on filtersets more consistent with existing __name convention * Add vlan_translation_table to VMInterface detail page * Add vlan_translation_policy to VMInterfaceSerializer * Move vlan_translation_policy fields to model and filterset mixins * Protect in-use policies against deletion * Add vlan_translation_policy to fields in VMInterfaceSerializer * Cleanup indentation * Remove unnecessary ordering column * Rebuild migrations * Search methods and registration * Ensure 'id' column is present by default * Add graphql types/filters/schema for VLANTranslationRule * Filterset tests * View tests * API and viewset tests (incomplete) * Add tags to VLANTranslationRuleForm * Complete viewset tests for VLANTranslationRule * Make VLANTranslationRule.policy nullable (but still required) * Revert "Make VLANTranslationRule.policy nullable (but still required)" This reverts commit 4c1bb437ef1a0a3593e5fbb87f08a0f158ea8c47. * Revert nullability * Explicitly prefetch policy in graphql * Documentation of new and affected models * Add note about select_related in graphql * Rework policy/rule documentation * Move vlan_translation_policy into 802.1Q Switching fieldset * Remove redundant InterfaceVLANTranslationTable * Conditionally include vlan_translation_table in interface.html and vminterface.html * Add description field to VLANTranslationRule * Define vlan_translation_table conditionally * Add policy (name) filter to VLANTranslationRuleFilterSet * Revert changes to adding-models.md (moved to another PR) * Dynamic table for linked rules in vlantranslationpolicy.html * Misc cleanup --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
64 lines
2.4 KiB
Python
64 lines
2.4 KiB
Python
from typing import List
|
|
|
|
import strawberry
|
|
import strawberry_django
|
|
|
|
from .types import *
|
|
|
|
|
|
@strawberry.type(name="Query")
|
|
class IPAMQuery:
|
|
asn: ASNType = strawberry_django.field()
|
|
asn_list: List[ASNType] = strawberry_django.field()
|
|
|
|
asn_range: ASNRangeType = strawberry_django.field()
|
|
asn_range_list: List[ASNRangeType] = strawberry_django.field()
|
|
|
|
aggregate: AggregateType = strawberry_django.field()
|
|
aggregate_list: List[AggregateType] = strawberry_django.field()
|
|
|
|
ip_address: IPAddressType = strawberry_django.field()
|
|
ip_address_list: List[IPAddressType] = strawberry_django.field()
|
|
|
|
ip_range: IPRangeType = strawberry_django.field()
|
|
ip_range_list: List[IPRangeType] = strawberry_django.field()
|
|
|
|
prefix: PrefixType = strawberry_django.field()
|
|
prefix_list: List[PrefixType] = strawberry_django.field()
|
|
|
|
rir: RIRType = strawberry_django.field()
|
|
rir_list: List[RIRType] = strawberry_django.field()
|
|
|
|
role: RoleType = strawberry_django.field()
|
|
role_list: List[RoleType] = strawberry_django.field()
|
|
|
|
route_target: RouteTargetType = strawberry_django.field()
|
|
route_target_list: List[RouteTargetType] = strawberry_django.field()
|
|
|
|
service: ServiceType = strawberry_django.field()
|
|
service_list: List[ServiceType] = strawberry_django.field()
|
|
|
|
service_template: ServiceTemplateType = strawberry_django.field()
|
|
service_template_list: List[ServiceTemplateType] = strawberry_django.field()
|
|
|
|
fhrp_group: FHRPGroupType = strawberry_django.field()
|
|
fhrp_group_list: List[FHRPGroupType] = strawberry_django.field()
|
|
|
|
fhrp_group_assignment: FHRPGroupAssignmentType = strawberry_django.field()
|
|
fhrp_group_assignment_list: List[FHRPGroupAssignmentType] = strawberry_django.field()
|
|
|
|
vlan: VLANType = strawberry_django.field()
|
|
vlan_list: List[VLANType] = strawberry_django.field()
|
|
|
|
vlan_group: VLANGroupType = strawberry_django.field()
|
|
vlan_group_list: List[VLANGroupType] = strawberry_django.field()
|
|
|
|
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()
|