mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
fix circular import
This commit is contained in:
parent
9abc11f187
commit
f750056ad8
|
@ -4,15 +4,21 @@ import strawberry
|
|||
from selfprivacy_api.graphql.common_types.dns import DnsRecord
|
||||
|
||||
from selfprivacy_api.graphql.common_types.storage_usage import (
|
||||
ServiceStorageUsage,
|
||||
StorageUsageInterface,
|
||||
StorageVolume,
|
||||
)
|
||||
from selfprivacy_api.graphql.queries.services import get_volume_by_id
|
||||
from selfprivacy_api.services import get_service_by_id, get_services_by_location
|
||||
from selfprivacy_api.services import Service as ServiceInterface
|
||||
from selfprivacy_api.utils.block_devices import BlockDevices
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class ServiceStorageUsage(StorageUsageInterface):
|
||||
"""Storage usage for a service"""
|
||||
|
||||
service: typing.Optional["Service"]
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class ServiceStatusEnum(Enum):
|
||||
RUNNING = "RUNNING"
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import typing
|
||||
import strawberry
|
||||
|
||||
from selfprivacy_api.graphql.common_types.service import Service
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class StorageVolume:
|
||||
|
@ -24,10 +22,3 @@ class StorageUsageInterface:
|
|||
used_space: str
|
||||
volume: typing.Optional[StorageVolume]
|
||||
title: str
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class ServiceStorageUsage(StorageUsageInterface):
|
||||
"""Storage usage for a service"""
|
||||
|
||||
service: typing.Optional["Service"]
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
import typing
|
||||
import strawberry
|
||||
from selfprivacy_api.graphql.common_types.service import (
|
||||
ServiceStorageUsage,
|
||||
service_to_graphql_service,
|
||||
get_volume_by_id,
|
||||
)
|
||||
from selfprivacy_api.graphql.common_types.storage_usage import (
|
||||
ServiceStorageUsage,
|
||||
StorageVolume,
|
||||
)
|
||||
from selfprivacy_api.services import get_services_by_location
|
||||
|
|
Loading…
Reference in a new issue