|
@@ -5,6 +5,7 @@ from dcim.graphql.mixins import CabledObjectMixin
|
|
|
from extras.graphql.mixins import CustomFieldsMixin, TagsMixin, ContactsMixin
|
|
from extras.graphql.mixins import CustomFieldsMixin, TagsMixin, ContactsMixin
|
|
|
from netbox.graphql.types import ObjectType, OrganizationalObjectType, NetBoxObjectType
|
|
from netbox.graphql.types import ObjectType, OrganizationalObjectType, NetBoxObjectType
|
|
|
from .filters import *
|
|
from .filters import *
|
|
|
|
|
+from typing import List
|
|
|
|
|
|
|
|
__all__ = (
|
|
__all__ = (
|
|
|
'CircuitTerminationType',
|
|
'CircuitTerminationType',
|
|
@@ -17,60 +18,54 @@ __all__ = (
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.CircuitTermination,
|
|
|
|
|
|
|
+ models.Provider,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=CircuitTerminationFilter
|
|
|
|
|
|
|
+ filters=ProviderFilter
|
|
|
)
|
|
)
|
|
|
-class CircuitTerminationType:
|
|
|
|
|
- # class CircuitTerminationType(CustomFieldsMixin, TagsMixin, CabledObjectMixin, ObjectType):
|
|
|
|
|
|
|
+class ProviderType(NetBoxObjectType, ContactsMixin):
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.Circuit,
|
|
|
|
|
|
|
+ models.ProviderAccount,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=CircuitFilter
|
|
|
|
|
|
|
+ filters=ProviderAccountFilter
|
|
|
)
|
|
)
|
|
|
-class CircuitType(NetBoxObjectType, ContactsMixin):
|
|
|
|
|
- # class CircuitType(NetBoxObjectType, ContactsMixin):
|
|
|
|
|
|
|
+class ProviderAccountType(NetBoxObjectType):
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.CircuitType,
|
|
|
|
|
|
|
+ models.ProviderNetwork,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=CircuitTypeFilter
|
|
|
|
|
|
|
+ filters=ProviderNetworkFilter
|
|
|
)
|
|
)
|
|
|
-class CircuitTypeType:
|
|
|
|
|
- # class CircuitTypeType(OrganizationalObjectType):
|
|
|
|
|
|
|
+class ProviderNetworkType(NetBoxObjectType):
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.Provider,
|
|
|
|
|
|
|
+ models.CircuitTermination,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ProviderFilter
|
|
|
|
|
|
|
+ filters=CircuitTerminationFilter
|
|
|
)
|
|
)
|
|
|
-class ProviderType:
|
|
|
|
|
- # class ProviderType(NetBoxObjectType, ContactsMixin):
|
|
|
|
|
|
|
+class CircuitTerminationType(CustomFieldsMixin, TagsMixin, CabledObjectMixin, ObjectType):
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.ProviderAccount,
|
|
|
|
|
|
|
+ models.Circuit,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ProviderAccountFilter
|
|
|
|
|
|
|
+ filters=CircuitFilter
|
|
|
)
|
|
)
|
|
|
-class ProviderAccountType:
|
|
|
|
|
- # class ProviderAccountType(NetBoxObjectType):
|
|
|
|
|
- pass
|
|
|
|
|
|
|
+class CircuitType(NetBoxObjectType, ContactsMixin):
|
|
|
|
|
+ provider: ProviderType
|
|
|
|
|
|
|
|
|
|
|
|
|
@strawberry.django.type(
|
|
@strawberry.django.type(
|
|
|
- models.ProviderNetwork,
|
|
|
|
|
|
|
+ models.CircuitType,
|
|
|
fields='__all__',
|
|
fields='__all__',
|
|
|
- filters=ProviderNetworkFilter
|
|
|
|
|
|
|
+ filters=CircuitTypeFilter
|
|
|
)
|
|
)
|
|
|
-class ProviderNetworkType:
|
|
|
|
|
- # class ProviderNetworkType(NetBoxObjectType):
|
|
|
|
|
|
|
+class CircuitTypeType(OrganizationalObjectType):
|
|
|
pass
|
|
pass
|