Skip to content

Move draft imports to draft folder #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions ydb/_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
ydb_topic_v1_pb2_grpc,
)

from ._grpc.v4.draft import (
ydb_dynamic_config_v1_pb2_grpc,
)

from ._grpc.v4.protos import (
ydb_status_codes_pb2,
ydb_discovery_pb2,
Expand All @@ -26,9 +22,6 @@
ydb_common_pb2,
)

from ._grpc.v4.draft.protos import (
ydb_dynamic_config_pb2,
)
else:
from ._grpc.common import (
ydb_cms_v1_pb2_grpc,
Expand All @@ -39,10 +32,6 @@
ydb_topic_v1_pb2_grpc,
)

from ._grpc.common.draft import (
ydb_dynamic_config_v1_pb2_grpc,
)

from ._grpc.common.protos import (
ydb_status_codes_pb2,
ydb_discovery_pb2,
Expand All @@ -53,10 +42,6 @@
ydb_common_pb2,
)

from ._grpc.common.draft.protos import (
ydb_dynamic_config_pb2,
)


StatusIds = ydb_status_codes_pb2.StatusIds
FeatureFlag = ydb_common_pb2.FeatureFlag
Expand All @@ -66,7 +51,6 @@
ydb_table = ydb_table_pb2
ydb_discovery = ydb_discovery_pb2
ydb_operation = ydb_operation_pb2
ydb_dynamic_config = ydb_dynamic_config_pb2


class CmsService(object):
Expand Down Expand Up @@ -127,12 +111,3 @@ class TopicService(object):
DropTopic = "DropTopic"
StreamRead = "StreamRead"
StreamWrite = "StreamWrite"


class DynamicConfigService(object):
Stub = ydb_dynamic_config_v1_pb2_grpc.DynamicConfigServiceStub

ReplaceConfig = "ReplaceConfig"
SetConfig = "SetConfig"
GetConfig = "GetConfig"
GetNodeLabels = "GetNodeLabels"
32 changes: 32 additions & 0 deletions ydb/draft/_apis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
import typing

# Workaround for good IDE and universal for runtime
if typing.TYPE_CHECKING:
from .._grpc.v4.draft import (
ydb_dynamic_config_v1_pb2_grpc,
)

from .._grpc.v4.draft.protos import (
ydb_dynamic_config_pb2,
)
else:
from .._grpc.common.draft import (
ydb_dynamic_config_v1_pb2_grpc,
)

from .._grpc.common.draft.protos import (
ydb_dynamic_config_pb2,
)


ydb_dynamic_config = ydb_dynamic_config_pb2


class DynamicConfigService(object):
Stub = ydb_dynamic_config_v1_pb2_grpc.DynamicConfigServiceStub

ReplaceConfig = "ReplaceConfig"
SetConfig = "SetConfig"
GetConfig = "GetConfig"
GetNodeLabels = "GetNodeLabels"
3 changes: 2 additions & 1 deletion ydb/draft/dynamic_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import abc
from abc import abstractmethod
from .. import issues, operation, _apis
from . import _apis
from .. import issues, operation


class IDynamicConfigClient(abc.ABC):
Expand Down
Loading