Bläddra i källkod

19724 change from old to V1

Arthur 3 månader sedan
förälder
incheckning
76caae12fa

+ 1 - 1
netbox/circuits/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class CircuitsQueryOld:
+class CircuitsQueryV1:
     circuit: CircuitType = strawberry_django.field()
     circuit: CircuitType = strawberry_django.field()
     circuit_list: List[CircuitType] = strawberry_django.field()
     circuit_list: List[CircuitType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/core/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class CoreQueryOld:
+class CoreQueryV1:
     data_file: DataFileType = strawberry_django.field()
     data_file: DataFileType = strawberry_django.field()
     data_file_list: List[DataFileType] = strawberry_django.field()
     data_file_list: List[DataFileType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/dcim/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class DCIMQueryOld:
+class DCIMQueryV1:
     cable: CableType = strawberry_django.field()
     cable: CableType = strawberry_django.field()
     cable_list: List[CableType] = strawberry_django.field()
     cable_list: List[CableType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/extras/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class ExtrasQueryOld:
+class ExtrasQueryV1:
     config_context: ConfigContextType = strawberry_django.field()
     config_context: ConfigContextType = strawberry_django.field()
     config_context_list: List[ConfigContextType] = strawberry_django.field()
     config_context_list: List[ConfigContextType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/ipam/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class IPAMQueryOld:
+class IPAMQueryV1:
     asn: ASNType = strawberry_django.field()
     asn: ASNType = strawberry_django.field()
     asn_list: List[ASNType] = strawberry_django.field()
     asn_list: List[ASNType] = strawberry_django.field()
 
 

+ 20 - 20
netbox/netbox/graphql/schema.py

@@ -4,17 +4,17 @@ from strawberry_django.optimizer import DjangoOptimizerExtension
 from strawberry.extensions import MaxAliasesLimiter
 from strawberry.extensions import MaxAliasesLimiter
 from strawberry.schema.config import StrawberryConfig
 from strawberry.schema.config import StrawberryConfig
 
 
-from circuits.graphql.schema import CircuitsQuery, CircuitsQueryOld
-from core.graphql.schema import CoreQuery, CoreQueryOld
-from dcim.graphql.schema import DCIMQuery, DCIMQueryOld
-from extras.graphql.schema import ExtrasQuery, ExtrasQueryOld
-from ipam.graphql.schema import IPAMQuery, IPAMQueryOld
+from circuits.graphql.schema import CircuitsQuery, CircuitsQueryV1
+from core.graphql.schema import CoreQuery, CoreQueryV1
+from dcim.graphql.schema import DCIMQuery, DCIMQueryV1
+from extras.graphql.schema import ExtrasQuery, ExtrasQueryV1
+from ipam.graphql.schema import IPAMQuery, IPAMQueryV1
 from netbox.registry import registry
 from netbox.registry import registry
-from tenancy.graphql.schema import TenancyQuery, TenancyQueryOld
-from users.graphql.schema import UsersQuery, UsersQueryOld
-from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryOld
-from vpn.graphql.schema import VPNQuery, VPNQueryOld
-from wireless.graphql.schema import WirelessQuery, WirelessQueryOld
+from tenancy.graphql.schema import TenancyQuery, TenancyQueryV1
+from users.graphql.schema import UsersQuery, UsersQueryV1
+from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryV1
+from vpn.graphql.schema import VPNQuery, VPNQueryV1
+from wireless.graphql.schema import WirelessQuery, WirelessQueryV1
 
 
 __all__ = (
 __all__ = (
     'Query',
     'Query',
@@ -27,16 +27,16 @@ __all__ = (
 
 
 @strawberry.type
 @strawberry.type
 class QueryV1(
 class QueryV1(
-    UsersQueryOld,
-    CircuitsQueryOld,
-    CoreQueryOld,
-    DCIMQueryOld,
-    ExtrasQueryOld,
-    IPAMQueryOld,
-    TenancyQueryOld,
-    VirtualizationQueryOld,
-    VPNQueryOld,
-    WirelessQueryOld,
+    UsersQueryV1,
+    CircuitsQueryV1,
+    CoreQueryV1,
+    DCIMQueryV1,
+    ExtrasQueryV1,
+    IPAMQueryV1,
+    TenancyQueryV1,
+    VirtualizationQueryV1,
+    VPNQueryV1,
+    WirelessQueryV1,
     *registry['plugins']['graphql_schemas'],  # Append plugin schemas
     *registry['plugins']['graphql_schemas'],  # Append plugin schemas
 ):
 ):
     """Query class for GraphQL API v1"""
     """Query class for GraphQL API v1"""

+ 1 - 1
netbox/tenancy/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class TenancyQueryOld:
+class TenancyQueryV1:
     tenant: TenantType = strawberry_django.field()
     tenant: TenantType = strawberry_django.field()
     tenant_list: List[TenantType] = strawberry_django.field()
     tenant_list: List[TenantType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/users/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class UsersQueryOld:
+class UsersQueryV1:
     group: GroupType = strawberry_django.field()
     group: GroupType = strawberry_django.field()
     group_list: List[GroupType] = strawberry_django.field()
     group_list: List[GroupType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/virtualization/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class VirtualizationQueryOld:
+class VirtualizationQueryV1:
     cluster: ClusterType = strawberry_django.field()
     cluster: ClusterType = strawberry_django.field()
     cluster_list: List[ClusterType] = strawberry_django.field()
     cluster_list: List[ClusterType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/vpn/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class VPNQueryOld:
+class VPNQueryV1:
     ike_policy: IKEPolicyType = strawberry_django.field()
     ike_policy: IKEPolicyType = strawberry_django.field()
     ike_policy_list: List[IKEPolicyType] = strawberry_django.field()
     ike_policy_list: List[IKEPolicyType] = strawberry_django.field()
 
 

+ 1 - 1
netbox/wireless/graphql/schema.py

@@ -8,7 +8,7 @@ from .types import *
 
 
 
 
 @strawberry.type(name="Query")
 @strawberry.type(name="Query")
-class WirelessQueryOld:
+class WirelessQueryV1:
     wireless_lan: WirelessLANType = strawberry_django.field()
     wireless_lan: WirelessLANType = strawberry_django.field()
     wireless_lan_list: List[WirelessLANType] = strawberry_django.field()
     wireless_lan_list: List[WirelessLANType] = strawberry_django.field()