qwak-core 0.6.6__py3-none-any.whl → 0.6.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2.py +52 -0
- _qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2.pyi +198 -0
- _qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2_grpc.py +237 -0
- _qwak_proto/qwak/administration/v1/environments/environment_pb2.py +29 -0
- _qwak_proto/qwak/administration/v1/environments/environment_pb2.pyi +38 -0
- _qwak_proto/qwak/administration/v1/environments/environment_pb2_grpc.py +4 -0
- _qwak_proto/qwak/administration/v1/environments/environment_service_pb2.py +33 -0
- _qwak_proto/qwak/administration/v1/environments/environment_service_pb2.pyi +59 -0
- _qwak_proto/qwak/administration/v1/environments/environment_service_pb2_grpc.py +67 -0
- qwak/__init__.py +1 -1
- qwak/clients/administration/cluster_v2/__init__.py +1 -0
- qwak/clients/administration/cluster_v2/client.py +122 -0
- qwak/clients/administration/environment/client.py +28 -0
- qwak/clients/administration/environment_v1/__init__.py +1 -0
- qwak/clients/administration/environment_v1/client.py +53 -0
- {qwak_core-0.6.6.dist-info → qwak_core-0.6.7.dist-info}/METADATA +1 -1
- {qwak_core-0.6.6.dist-info → qwak_core-0.6.7.dist-info}/RECORD +23 -7
- qwak_services_mock/mocks/cluster_v2_service.py +146 -0
- qwak_services_mock/mocks/environment_v0_service.py +175 -0
- qwak_services_mock/mocks/environment_v1_service.py +37 -0
- qwak_services_mock/mocks/qwak_mocks.py +6 -0
- qwak_services_mock/services_mock.py +38 -1
- {qwak_core-0.6.6.dist-info → qwak_core-0.6.7.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from _qwak_proto.qwak.administration.v1.environments import environment_service_pb2 as qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EnvironmentServiceStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.CreateEnvironment = channel.unary_unary(
|
|
18
|
+
'/qwak.administration.v1.environment.EnvironmentService/CreateEnvironment',
|
|
19
|
+
request_serializer=qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentRequest.SerializeToString,
|
|
20
|
+
response_deserializer=qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class EnvironmentServiceServicer(object):
|
|
25
|
+
"""Missing associated documentation comment in .proto file."""
|
|
26
|
+
|
|
27
|
+
def CreateEnvironment(self, request, context):
|
|
28
|
+
"""Create an environment
|
|
29
|
+
"""
|
|
30
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
31
|
+
context.set_details('Method not implemented!')
|
|
32
|
+
raise NotImplementedError('Method not implemented!')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def add_EnvironmentServiceServicer_to_server(servicer, server):
|
|
36
|
+
rpc_method_handlers = {
|
|
37
|
+
'CreateEnvironment': grpc.unary_unary_rpc_method_handler(
|
|
38
|
+
servicer.CreateEnvironment,
|
|
39
|
+
request_deserializer=qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentRequest.FromString,
|
|
40
|
+
response_serializer=qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentResponse.SerializeToString,
|
|
41
|
+
),
|
|
42
|
+
}
|
|
43
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
44
|
+
'qwak.administration.v1.environment.EnvironmentService', rpc_method_handlers)
|
|
45
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# This class is part of an EXPERIMENTAL API.
|
|
49
|
+
class EnvironmentService(object):
|
|
50
|
+
"""Missing associated documentation comment in .proto file."""
|
|
51
|
+
|
|
52
|
+
@staticmethod
|
|
53
|
+
def CreateEnvironment(request,
|
|
54
|
+
target,
|
|
55
|
+
options=(),
|
|
56
|
+
channel_credentials=None,
|
|
57
|
+
call_credentials=None,
|
|
58
|
+
insecure=False,
|
|
59
|
+
compression=None,
|
|
60
|
+
wait_for_ready=None,
|
|
61
|
+
timeout=None,
|
|
62
|
+
metadata=None):
|
|
63
|
+
return grpc.experimental.unary_unary(request, target, '/qwak.administration.v1.environment.EnvironmentService/CreateEnvironment',
|
|
64
|
+
qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentRequest.SerializeToString,
|
|
65
|
+
qwak_dot_administration_dot_v1_dot_environments_dot_environment__service__pb2.CreateEnvironmentResponse.FromString,
|
|
66
|
+
options, channel_credentials,
|
|
67
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
qwak/__init__.py
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .client import ClusterV2Client
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""Cluster V2 API client.
|
|
2
|
+
|
|
3
|
+
Provides wrapper methods for the Cluster V2 gRPC service with proper error handling.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_pb2 import (
|
|
7
|
+
ClusterSpec,
|
|
8
|
+
)
|
|
9
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_service_pb2 import (
|
|
10
|
+
CreateClusterCreationRequestRequest,
|
|
11
|
+
CreateClusterCreationRequestResponse,
|
|
12
|
+
DeleteClusterRequest,
|
|
13
|
+
DeleteClusterResponse,
|
|
14
|
+
GetClusterRequest,
|
|
15
|
+
GetClusterResponse,
|
|
16
|
+
GetClusterStateRequest,
|
|
17
|
+
GetClusterStateResponse,
|
|
18
|
+
ListClustersRequest,
|
|
19
|
+
ListClustersResponse,
|
|
20
|
+
UpdateClusterConfigurationRequest,
|
|
21
|
+
UpdateClusterConfigurationResponse,
|
|
22
|
+
)
|
|
23
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_service_pb2_grpc import (
|
|
24
|
+
ClusterServiceStub,
|
|
25
|
+
)
|
|
26
|
+
from dependency_injector.wiring import Provide
|
|
27
|
+
from qwak.inner.di_configuration import QwakContainer
|
|
28
|
+
from qwak.inner.tool.grpc.grpc_try_wrapping import grpc_try_catch_wrapper
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ClusterV2Client:
|
|
32
|
+
"""Client for interacting with the Cluster V2 API.
|
|
33
|
+
|
|
34
|
+
This client wraps the gRPC stub and provides methods with proper error handling
|
|
35
|
+
using the grpc_try_catch_wrapper decorator.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, grpc_channel=Provide[QwakContainer.core_grpc_channel]):
|
|
39
|
+
self.__cluster_service = ClusterServiceStub(grpc_channel)
|
|
40
|
+
|
|
41
|
+
@grpc_try_catch_wrapper("Failed to create cluster")
|
|
42
|
+
def create_cluster(
|
|
43
|
+
self, cluster_spec: ClusterSpec
|
|
44
|
+
) -> CreateClusterCreationRequestResponse:
|
|
45
|
+
"""Create a new cluster.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
cluster_spec: The cluster specification.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
CreateClusterCreationRequestResponse with the request_id.
|
|
52
|
+
"""
|
|
53
|
+
request = CreateClusterCreationRequestRequest(cluster_spec=cluster_spec)
|
|
54
|
+
return self.__cluster_service.CreateClusterCreationRequest(request)
|
|
55
|
+
|
|
56
|
+
@grpc_try_catch_wrapper("Failed to get cluster state for request {request_id}")
|
|
57
|
+
def get_cluster_state(self, request_id: str) -> GetClusterStateResponse:
|
|
58
|
+
"""Get cluster state by request ID.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
request_id: The request ID from create_cluster.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
GetClusterStateResponse with the cluster state.
|
|
65
|
+
"""
|
|
66
|
+
request = GetClusterStateRequest(request_id=request_id)
|
|
67
|
+
return self.__cluster_service.GetClusterState(request)
|
|
68
|
+
|
|
69
|
+
@grpc_try_catch_wrapper("Failed to get cluster {cluster_id}")
|
|
70
|
+
def get_cluster(self, cluster_id: str) -> GetClusterResponse:
|
|
71
|
+
"""Get cluster by ID.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
cluster_id: The cluster ID.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
GetClusterResponse with the cluster state.
|
|
78
|
+
"""
|
|
79
|
+
request = GetClusterRequest(cluster_id=cluster_id)
|
|
80
|
+
return self.__cluster_service.GetCluster(request)
|
|
81
|
+
|
|
82
|
+
@grpc_try_catch_wrapper("Failed to list clusters")
|
|
83
|
+
def list_clusters(self) -> ListClustersResponse:
|
|
84
|
+
"""List all clusters.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
ListClustersResponse with list of clusters.
|
|
88
|
+
"""
|
|
89
|
+
request = ListClustersRequest()
|
|
90
|
+
return self.__cluster_service.ListClusters(request)
|
|
91
|
+
|
|
92
|
+
@grpc_try_catch_wrapper("Failed to update cluster {cluster_id}")
|
|
93
|
+
def update_cluster(
|
|
94
|
+
self, cluster_id: str, cluster_spec: ClusterSpec
|
|
95
|
+
) -> UpdateClusterConfigurationResponse:
|
|
96
|
+
"""Update cluster configuration.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
cluster_id: The cluster ID to update.
|
|
100
|
+
cluster_spec: The updated cluster specification.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
UpdateClusterConfigurationResponse with the request_id.
|
|
104
|
+
"""
|
|
105
|
+
request = UpdateClusterConfigurationRequest(
|
|
106
|
+
cluster_id=cluster_id,
|
|
107
|
+
cluster_spec=cluster_spec,
|
|
108
|
+
)
|
|
109
|
+
return self.__cluster_service.UpdateClusterConfiguration(request)
|
|
110
|
+
|
|
111
|
+
@grpc_try_catch_wrapper("Failed to delete cluster {cluster_id}")
|
|
112
|
+
def delete_cluster(self, cluster_id: str) -> DeleteClusterResponse:
|
|
113
|
+
"""Delete cluster by ID.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
cluster_id: The cluster ID to delete.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
DeleteClusterResponse with the request_id.
|
|
120
|
+
"""
|
|
121
|
+
request = DeleteClusterRequest(cluster_id=cluster_id)
|
|
122
|
+
return self.__cluster_service.DeleteCluster(request)
|
|
@@ -2,6 +2,9 @@ import grpc
|
|
|
2
2
|
from _qwak_proto.qwak.administration.v0.environments.environment_pb2 import (
|
|
3
3
|
QwakEnvironmentStatus,
|
|
4
4
|
)
|
|
5
|
+
from _qwak_proto.qwak.administration.v0.environments.configuration_pb2 import (
|
|
6
|
+
QwakEnvironmentConfiguration,
|
|
7
|
+
)
|
|
5
8
|
from _qwak_proto.qwak.administration.v0.environments.environment_service_pb2 import (
|
|
6
9
|
GetEnvironmentApplicationUserCredentialsRequest,
|
|
7
10
|
GetEnvironmentApplicationUserCredentialsResponse,
|
|
@@ -9,6 +12,8 @@ from _qwak_proto.qwak.administration.v0.environments.environment_service_pb2 imp
|
|
|
9
12
|
ListEnvironmentsResponse,
|
|
10
13
|
GetEnvironmentResponse,
|
|
11
14
|
GetEnvironmentRequest,
|
|
15
|
+
UpdateEnvironmentConfigurationRequest,
|
|
16
|
+
UpdateEnvironmentConfigurationResponse,
|
|
12
17
|
)
|
|
13
18
|
from _qwak_proto.qwak.administration.v0.environments.environment_service_pb2_grpc import (
|
|
14
19
|
EnvironmentServiceStub,
|
|
@@ -16,6 +21,7 @@ from _qwak_proto.qwak.administration.v0.environments.environment_service_pb2_grp
|
|
|
16
21
|
from dependency_injector.wiring import Provide
|
|
17
22
|
from qwak.exceptions import QwakException
|
|
18
23
|
from qwak.inner.di_configuration import QwakContainer
|
|
24
|
+
from qwak.inner.tool.grpc.grpc_try_wrapping import grpc_try_catch_wrapper
|
|
19
25
|
|
|
20
26
|
|
|
21
27
|
class EnvironmentClient:
|
|
@@ -90,3 +96,25 @@ class EnvironmentClient:
|
|
|
90
96
|
raise QwakException(
|
|
91
97
|
f"Failed to get environment {environment_id}, error is {e}"
|
|
92
98
|
)
|
|
99
|
+
|
|
100
|
+
@grpc_try_catch_wrapper(
|
|
101
|
+
"Failed to update environment configuration for {environment_id}"
|
|
102
|
+
)
|
|
103
|
+
def update_environment_configuration(
|
|
104
|
+
self, environment_id: str, configuration: QwakEnvironmentConfiguration
|
|
105
|
+
) -> UpdateEnvironmentConfigurationResponse:
|
|
106
|
+
"""
|
|
107
|
+
Update environment configuration.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
environment_id: The environment ID to update.
|
|
111
|
+
configuration: The new environment configuration.
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
UpdateEnvironmentConfigurationResponse
|
|
115
|
+
"""
|
|
116
|
+
request = UpdateEnvironmentConfigurationRequest(
|
|
117
|
+
environment_id=environment_id,
|
|
118
|
+
configuration=configuration,
|
|
119
|
+
)
|
|
120
|
+
return self._environment_service.UpdateEnvironmentConfiguration(request)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .client import EnvironmentV1Client
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Environment V1 API client.
|
|
2
|
+
|
|
3
|
+
Provides wrapper methods for the Environment V1 gRPC service with proper error handling.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from _qwak_proto.qwak.administration.v1.environments.environment_pb2 import (
|
|
7
|
+
EnvironmentRuntimeConfigSpec,
|
|
8
|
+
)
|
|
9
|
+
from _qwak_proto.qwak.administration.v1.environments.environment_service_pb2 import (
|
|
10
|
+
CreateEnvironmentRequest,
|
|
11
|
+
CreateEnvironmentResponse,
|
|
12
|
+
)
|
|
13
|
+
from _qwak_proto.qwak.administration.v1.environments.environment_service_pb2_grpc import (
|
|
14
|
+
EnvironmentServiceStub,
|
|
15
|
+
)
|
|
16
|
+
from dependency_injector.wiring import Provide
|
|
17
|
+
from qwak.inner.di_configuration import QwakContainer
|
|
18
|
+
from qwak.inner.tool.grpc.grpc_try_wrapping import grpc_try_catch_wrapper
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class EnvironmentV1Client:
|
|
22
|
+
"""Client for interacting with the Environment V1 API.
|
|
23
|
+
|
|
24
|
+
This client wraps the gRPC stub and provides methods with proper error handling
|
|
25
|
+
using the grpc_try_catch_wrapper decorator.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, grpc_channel=Provide[QwakContainer.core_grpc_channel]):
|
|
29
|
+
self.__environment_service = EnvironmentServiceStub(grpc_channel)
|
|
30
|
+
|
|
31
|
+
@grpc_try_catch_wrapper("Failed to create environment {environment_name}")
|
|
32
|
+
def create_environment(
|
|
33
|
+
self,
|
|
34
|
+
environment_name: str,
|
|
35
|
+
cluster_id: str,
|
|
36
|
+
spec: EnvironmentRuntimeConfigSpec,
|
|
37
|
+
) -> CreateEnvironmentResponse:
|
|
38
|
+
"""Create a new environment.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
environment_name: The name of the environment.
|
|
42
|
+
cluster_id: The cluster ID the environment belongs to.
|
|
43
|
+
spec: The environment runtime configuration specification.
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
CreateEnvironmentResponse with the created environment.
|
|
47
|
+
"""
|
|
48
|
+
request = CreateEnvironmentRequest(
|
|
49
|
+
environment_name=environment_name,
|
|
50
|
+
cluster_id=cluster_id,
|
|
51
|
+
spec=spec,
|
|
52
|
+
)
|
|
53
|
+
return self.__environment_service.CreateEnvironment(request)
|
|
@@ -34,6 +34,9 @@ _qwak_proto/qwak/administration/authenticated_user/v1/details_pb2_grpc.py,sha256
|
|
|
34
34
|
_qwak_proto/qwak/administration/cluster/v2/cluster_pb2.py,sha256=UejDfmq-HJY76cJr6Dqp8rr2sioIXOBI4-MrINFM-iU,7635
|
|
35
35
|
_qwak_proto/qwak/administration/cluster/v2/cluster_pb2.pyi,sha256=uzek313Ky25mMDF9_OvMJNKT99duipycHnSXCMyRG9A,17386
|
|
36
36
|
_qwak_proto/qwak/administration/cluster/v2/cluster_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
37
|
+
_qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2.py,sha256=ZMZ45Ew_deUUyv8xbqHhvMmeWVfyyvmSovg7s5F8dpw,5315
|
|
38
|
+
_qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2.pyi,sha256=_QEpc-9_00aekgCOuO9saqhTCp7SbtAKVHLWWf8Qhf4,7315
|
|
39
|
+
_qwak_proto/qwak/administration/cluster/v2/cluster_service_pb2_grpc.py,sha256=WU6Q9Cfj8PrsPxXg45cnDnf3xQIyQpGu9hvYjqIvrrA,12942
|
|
37
40
|
_qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.py,sha256=7W970swdY_S44ffVrfNvYibBMI4TX4UnPY7lYTyY0aw,2780
|
|
38
41
|
_qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.pyi,sha256=rK7MO6WAjauQz8ShDsqhqYkc69cI_AEqUE42j9vbT4U,2640
|
|
39
42
|
_qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -115,6 +118,12 @@ _qwak_proto/qwak/administration/v0/environments/personalization_pb2_grpc.py,sha2
|
|
|
115
118
|
_qwak_proto/qwak/administration/v0/users/user_pb2.py,sha256=ZXt8_c_uIrDSBQfAmVqrNctab40U0E_XJ_gLN8RLeYo,4676
|
|
116
119
|
_qwak_proto/qwak/administration/v0/users/user_pb2.pyi,sha256=GFbJz424r1aTF1kC50ZDIvYTfgxO02C7OHu2SZyL-nc,10595
|
|
117
120
|
_qwak_proto/qwak/administration/v0/users/user_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
121
|
+
_qwak_proto/qwak/administration/v1/environments/environment_pb2.py,sha256=6C22w-7Ik12XDwS1Kru8FqTDcu19wcDmImvtfOKjSDc,2403
|
|
122
|
+
_qwak_proto/qwak/administration/v1/environments/environment_pb2.pyi,sha256=7L7jRonQENbdV1daHkyU8AGglaDdGyq5kQqPAPZG38A,2063
|
|
123
|
+
_qwak_proto/qwak/administration/v1/environments/environment_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
124
|
+
_qwak_proto/qwak/administration/v1/environments/environment_service_pb2.py,sha256=AcnKQXJkug4-wTaI1_bnHvnYt_JaH8kvYiXRmrwCPCM,2792
|
|
125
|
+
_qwak_proto/qwak/administration/v1/environments/environment_service_pb2.pyi,sha256=b-1XJDZf5pW3lF4UoZ2SQ_qGxvPodkRLTDJgXCHdIkE,2352
|
|
126
|
+
_qwak_proto/qwak/administration/v1/environments/environment_service_pb2_grpc.py,sha256=1Vms7ww0HBCoDyhMarxvoYtBpqBy7nNbcrk3BjWZKdw,3161
|
|
118
127
|
_qwak_proto/qwak/admiral/secret/v0/secret_pb2.py,sha256=HuEYHLETaK6KpVGO4gEwMXeyrPniUwKX3Uz6zFDzfIg,5085
|
|
119
128
|
_qwak_proto/qwak/admiral/secret/v0/secret_pb2.pyi,sha256=lQkF7UWO_JmvK5LdSsQ_D33Kzfr56e-i3rm31pT-fsU,10408
|
|
120
129
|
_qwak_proto/qwak/admiral/secret/v0/secret_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -619,7 +628,7 @@ _qwak_proto/qwak/workspace/workspace_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
|
|
|
619
628
|
_qwak_proto/qwak/workspace/workspace_service_pb2.py,sha256=93uNm83VVrkLG_XVsuBOBTPs4UJF91YD1xJTOEbRyig,9239
|
|
620
629
|
_qwak_proto/qwak/workspace/workspace_service_pb2.pyi,sha256=nKKCHwnovZhsy8TSVmdz-Vtl0nviOOoX56HD-41Xo08,13726
|
|
621
630
|
_qwak_proto/qwak/workspace/workspace_service_pb2_grpc.py,sha256=yKGuexxTBza99Ihe0DSTniV2ZSd_AG47inHenqfi890,27193
|
|
622
|
-
qwak/__init__.py,sha256=
|
|
631
|
+
qwak/__init__.py,sha256=phXeOFx9au7BigBlw_4AhvnwLKQAGbYB0M88pYmn75o,585
|
|
623
632
|
qwak/automations/__init__.py,sha256=qFZRvCxUUn8gcxkJR0v19ulHW2oJ0x6-Rif7HiheDP4,1522
|
|
624
633
|
qwak/automations/automation_executions.py,sha256=5MeH_epYYWb8NKXgAozwT_jPyyUDednBHG7izloi7RY,3228
|
|
625
634
|
qwak/automations/automations.py,sha256=2Wyrgj2mW5VmJzTKAXj3vQM_svYCuq_Bsu3_Vu9SdR4,12732
|
|
@@ -634,11 +643,15 @@ qwak/clients/administration/authenticated_user/__init__.py,sha256=47DEQpj8HBSa-_
|
|
|
634
643
|
qwak/clients/administration/authenticated_user/client.py,sha256=Rnj2_fr3mAWmF7OgKeK2nvBu6CoxKtJ3GL8o_WaHAeY,1456
|
|
635
644
|
qwak/clients/administration/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
636
645
|
qwak/clients/administration/authentication/client.py,sha256=ggoM1DFqS3HTP3WIys8sVPluGhKmRE8Lm_9oWPSoZKg,1076
|
|
646
|
+
qwak/clients/administration/cluster_v2/__init__.py,sha256=qsxlbOhYg9p5U-0RStC1CIJ86lEZ5UNIWuFPnL-8wGw,36
|
|
647
|
+
qwak/clients/administration/cluster_v2/client.py,sha256=b9NlvAmXLzYB3K-3Ia-WhISN3ry_WS78Rrs4vC0qgOg,4193
|
|
637
648
|
qwak/clients/administration/eco_system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
638
649
|
qwak/clients/administration/eco_system/client.py,sha256=fr3LGJQlheF9i8ZjvmcLti-8EfalKJ3fZNSnhV0OjQ8,5340
|
|
639
650
|
qwak/clients/administration/eco_system/eco_system_utils.py,sha256=eSRih37ORNyiC4sdH_PV6rd5GsWswb0Mwzr5TxzhQEg,514
|
|
640
651
|
qwak/clients/administration/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
641
|
-
qwak/clients/administration/environment/client.py,sha256=
|
|
652
|
+
qwak/clients/administration/environment/client.py,sha256=DFHOZjRPvJNsWijMztzjcgu3IOsT2vGtFfPneOaY1BI,4332
|
|
653
|
+
qwak/clients/administration/environment_v1/__init__.py,sha256=15_J34QBVU9X0d9_A6stiwYc6oLwkvuCCviROwROPXo,40
|
|
654
|
+
qwak/clients/administration/environment_v1/client.py,sha256=812PaRjl8BdqtvXVqqm70nWB4tqdBR59BAAOrPJH-v8,1900
|
|
642
655
|
qwak/clients/administration/self_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
643
656
|
qwak/clients/administration/self_service/client.py,sha256=Pb1ZuSyYlYLdxq34dks1jOjrSNRE-ewFOZOiQjXlFRk,2602
|
|
644
657
|
qwak/clients/alert_management/__init__.py,sha256=zAfCPJTj6oAMoj3vciLjRy8ULTTHCmmrdISuDCHASvk,43
|
|
@@ -1059,9 +1072,12 @@ qwak_services_mock/mocks/batch_job_manager_service.py,sha256=zVBBBkYdvWFwEXP_VHB
|
|
|
1059
1072
|
qwak_services_mock/mocks/build_orchestrator_build_api.py,sha256=mtb6wEZug9zCiMHZVrfsU0YOP59rgBrpvZDjEInG7B8,5004
|
|
1060
1073
|
qwak_services_mock/mocks/build_orchestrator_build_settings_api.py,sha256=oj_JTxY_3xj8FkgWkxQER_EoBFDqL2g21NPrU31fD6o,1379
|
|
1061
1074
|
qwak_services_mock/mocks/build_orchestrator_service_api.py,sha256=IlM6VzovSSV6o15u1dARv7ocOqwRIWgItWMEW_-Fx_g,5226
|
|
1075
|
+
qwak_services_mock/mocks/cluster_v2_service.py,sha256=643DqfDmOu0s89YMxMeaJ4I3l2Iw-sObS1_0fChtE0k,5684
|
|
1062
1076
|
qwak_services_mock/mocks/data_versioning_service.py,sha256=dUUrKwE3xc2bZtHa8YMg6wYn8zFa2BSZ5DaRsb1zT_Q,2453
|
|
1063
1077
|
qwak_services_mock/mocks/deployment_management_service.py,sha256=T4fmFC1sUgEh5sXH6ilwyPmfRfEBFqyYrGGljl_Abg8,20609
|
|
1064
1078
|
qwak_services_mock/mocks/ecosystem_service_api.py,sha256=f0-IeZMprFKvi1MvdW9aJZgO7BBdnJHQB8spDiVWy-A,1607
|
|
1079
|
+
qwak_services_mock/mocks/environment_v0_service.py,sha256=51Q68gyVCsh4XLsmFhQjB669oLfeSpDpxRXUOgs94HQ,7516
|
|
1080
|
+
qwak_services_mock/mocks/environment_v1_service.py,sha256=hV-YMoQ1OC4TxCIr4SYsw3Pa8w3QWE-pp2ZzNaf7d0w,1398
|
|
1065
1081
|
qwak_services_mock/mocks/execution_management_service.py,sha256=L6uSHniFNaJDZUwRuMnt_-j6NmpJoOsD0RwpoI6w9ag,1190
|
|
1066
1082
|
qwak_services_mock/mocks/feature_store_data_sources_manager_api.py,sha256=zfiq5x7xxg4IvBS1OndqSnFHDOckMW_-4K_Ajlko6no,5241
|
|
1067
1083
|
qwak_services_mock/mocks/feature_store_entities_manager_api.py,sha256=I9wsVEsb0qVcD8jgekeC-EG-Ke8SziRLUND8uF4OJbc,3349
|
|
@@ -1082,7 +1098,7 @@ qwak_services_mock/mocks/logging_service.py,sha256=rkOud7CFAvb0xfP6WXf3kP541eXdY
|
|
|
1082
1098
|
qwak_services_mock/mocks/model_management_service.py,sha256=H3bMTr7VLrGjZjIrjgrjBk3kNDy1UjQXOeUyL5eAL_o,4153
|
|
1083
1099
|
qwak_services_mock/mocks/project_manager_service.py,sha256=WzcYzN3O04kSpvuTwX0QIF0HCh_ggsV9-gMel_vQVuc,3090
|
|
1084
1100
|
qwak_services_mock/mocks/prompt_manager_service.py,sha256=tEhVUVwkvRy68r7MNX9V3V8ZBZ1ynqzr6v1zREMm0_s,9895
|
|
1085
|
-
qwak_services_mock/mocks/qwak_mocks.py,sha256=
|
|
1101
|
+
qwak_services_mock/mocks/qwak_mocks.py,sha256=Pbl70ILBE4eL_NGk0quDyF2j5PZQJj-Fpin3nlnm6Qg,6410
|
|
1086
1102
|
qwak_services_mock/mocks/secret_service.py,sha256=BwNyhNSTmxHDACzrr7NHjZ0YchX3wHWuJkl1ioi0Aig,1406
|
|
1087
1103
|
qwak_services_mock/mocks/self_service_user_service.py,sha256=UK22V-wAc0zHScXCE0QKDO0TdbrHf_uk7tEEIM47MpI,1205
|
|
1088
1104
|
qwak_services_mock/mocks/system_secret_service.py,sha256=S8MfGGEex7bs0AvnAf8SbPOzE-YDfCvePT1TxXWzHRQ,1896
|
|
@@ -1092,9 +1108,9 @@ qwak_services_mock/mocks/utils/exception_handlers.py,sha256=Fhi9cx_qNytDnl4BtZmE
|
|
|
1092
1108
|
qwak_services_mock/mocks/vector_serving_api.py,sha256=7ZSmDJVdw7_ne7BxLLrmy8eZkzVCeZ508gfL51wpKeY,5722
|
|
1093
1109
|
qwak_services_mock/mocks/vectors_management_api.py,sha256=ePh8l3MlDGzs7E4NuPZzF5xK-bC9AdMgDaNZrq3FkHc,3594
|
|
1094
1110
|
qwak_services_mock/mocks/workspace_manager_service_mock.py,sha256=O9ZSwln4T4kHVkR_usXnDQtarTeNfffSMON0P6wbT4g,7740
|
|
1095
|
-
qwak_services_mock/services_mock.py,sha256=
|
|
1111
|
+
qwak_services_mock/services_mock.py,sha256=8XyKtzEWxfvp4bVMSAlJ90GhkXKROZrgWeH25Iq3ETA,20601
|
|
1096
1112
|
qwak_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1097
1113
|
qwak_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
|
|
1098
|
-
qwak_core-0.6.
|
|
1099
|
-
qwak_core-0.6.
|
|
1100
|
-
qwak_core-0.6.
|
|
1114
|
+
qwak_core-0.6.7.dist-info/METADATA,sha256=oOduH81p6KeOQXYZNJO1FNgyUfq73YmOBk_ycs6zgdY,1986
|
|
1115
|
+
qwak_core-0.6.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
1116
|
+
qwak_core-0.6.7.dist-info/RECORD,,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_pb2 import (
|
|
6
|
+
ClusterState,
|
|
7
|
+
)
|
|
8
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_service_pb2 import (
|
|
9
|
+
CreateClusterCreationRequestResponse,
|
|
10
|
+
DeleteClusterResponse,
|
|
11
|
+
GetClusterResponse,
|
|
12
|
+
GetClusterStateResponse,
|
|
13
|
+
ListClustersResponse,
|
|
14
|
+
UpdateClusterConfigurationResponse,
|
|
15
|
+
)
|
|
16
|
+
from _qwak_proto.qwak.administration.cluster.v2.cluster_service_pb2_grpc import (
|
|
17
|
+
ClusterServiceServicer,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ClusterV2ServiceMock(ClusterServiceServicer):
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.__create_cluster_response: Optional[
|
|
25
|
+
CreateClusterCreationRequestResponse
|
|
26
|
+
] = None
|
|
27
|
+
self.__create_cluster_error: Optional[grpc.StatusCode] = None
|
|
28
|
+
|
|
29
|
+
self.__get_cluster_state_response: Optional[GetClusterStateResponse] = None
|
|
30
|
+
self.__get_cluster_state_error: Optional[grpc.StatusCode] = None
|
|
31
|
+
|
|
32
|
+
self.__get_cluster_response: Optional[GetClusterResponse] = None
|
|
33
|
+
self.__get_cluster_error: Optional[grpc.StatusCode] = None
|
|
34
|
+
|
|
35
|
+
self.__list_clusters_response: Optional[ListClustersResponse] = None
|
|
36
|
+
self.__list_clusters_error: Optional[grpc.StatusCode] = None
|
|
37
|
+
|
|
38
|
+
self.__update_cluster_response: Optional[UpdateClusterConfigurationResponse] = (
|
|
39
|
+
None
|
|
40
|
+
)
|
|
41
|
+
self.__update_cluster_error: Optional[grpc.StatusCode] = None
|
|
42
|
+
|
|
43
|
+
self.__delete_cluster_response: Optional[DeleteClusterResponse] = None
|
|
44
|
+
self.__delete_cluster_error: Optional[grpc.StatusCode] = None
|
|
45
|
+
|
|
46
|
+
def given_create_cluster(
|
|
47
|
+
self,
|
|
48
|
+
response: Optional[CreateClusterCreationRequestResponse] = None,
|
|
49
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
50
|
+
):
|
|
51
|
+
self.__create_cluster_response = response
|
|
52
|
+
self.__create_cluster_error = error_code
|
|
53
|
+
|
|
54
|
+
def given_get_cluster_state(
|
|
55
|
+
self,
|
|
56
|
+
response: Optional[GetClusterStateResponse] = None,
|
|
57
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
58
|
+
):
|
|
59
|
+
self.__get_cluster_state_response = response
|
|
60
|
+
self.__get_cluster_state_error = error_code
|
|
61
|
+
|
|
62
|
+
def given_get_cluster(
|
|
63
|
+
self,
|
|
64
|
+
response: Optional[GetClusterResponse] = None,
|
|
65
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
66
|
+
):
|
|
67
|
+
self.__get_cluster_response = response
|
|
68
|
+
self.__get_cluster_error = error_code
|
|
69
|
+
|
|
70
|
+
def given_list_clusters(
|
|
71
|
+
self,
|
|
72
|
+
response: Optional[ListClustersResponse] = None,
|
|
73
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
74
|
+
):
|
|
75
|
+
self.__list_clusters_response = response
|
|
76
|
+
self.__list_clusters_error = error_code
|
|
77
|
+
|
|
78
|
+
def given_update_cluster(
|
|
79
|
+
self,
|
|
80
|
+
response: Optional[UpdateClusterConfigurationResponse] = None,
|
|
81
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
82
|
+
):
|
|
83
|
+
self.__update_cluster_response = response
|
|
84
|
+
self.__update_cluster_error = error_code
|
|
85
|
+
|
|
86
|
+
def given_delete_cluster(
|
|
87
|
+
self,
|
|
88
|
+
response: Optional[DeleteClusterResponse] = None,
|
|
89
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
90
|
+
):
|
|
91
|
+
self.__delete_cluster_response = response
|
|
92
|
+
self.__delete_cluster_error = error_code
|
|
93
|
+
|
|
94
|
+
def CreateClusterCreationRequest(self, request, context):
|
|
95
|
+
if self.__create_cluster_error:
|
|
96
|
+
context.set_code(self.__create_cluster_error)
|
|
97
|
+
context.set_details("Failed to create cluster")
|
|
98
|
+
return CreateClusterCreationRequestResponse()
|
|
99
|
+
if self.__create_cluster_response:
|
|
100
|
+
return self.__create_cluster_response
|
|
101
|
+
return CreateClusterCreationRequestResponse(request_id="mock-request-id")
|
|
102
|
+
|
|
103
|
+
def GetClusterState(self, request, context):
|
|
104
|
+
if self.__get_cluster_state_error:
|
|
105
|
+
context.set_code(self.__get_cluster_state_error)
|
|
106
|
+
context.set_details("Failed to get cluster state")
|
|
107
|
+
return GetClusterStateResponse()
|
|
108
|
+
if self.__get_cluster_state_response:
|
|
109
|
+
return self.__get_cluster_state_response
|
|
110
|
+
return GetClusterStateResponse(cluster_state=ClusterState())
|
|
111
|
+
|
|
112
|
+
def GetCluster(self, request, context):
|
|
113
|
+
if self.__get_cluster_error:
|
|
114
|
+
context.set_code(self.__get_cluster_error)
|
|
115
|
+
context.set_details("Failed to get cluster")
|
|
116
|
+
return GetClusterResponse()
|
|
117
|
+
if self.__get_cluster_response:
|
|
118
|
+
return self.__get_cluster_response
|
|
119
|
+
return GetClusterResponse(cluster_state=ClusterState())
|
|
120
|
+
|
|
121
|
+
def ListClusters(self, request, context):
|
|
122
|
+
if self.__list_clusters_error:
|
|
123
|
+
context.set_code(self.__list_clusters_error)
|
|
124
|
+
context.set_details("Failed to list clusters")
|
|
125
|
+
return ListClustersResponse()
|
|
126
|
+
if self.__list_clusters_response:
|
|
127
|
+
return self.__list_clusters_response
|
|
128
|
+
return ListClustersResponse()
|
|
129
|
+
|
|
130
|
+
def UpdateClusterConfiguration(self, request, context):
|
|
131
|
+
if self.__update_cluster_error:
|
|
132
|
+
context.set_code(self.__update_cluster_error)
|
|
133
|
+
context.set_details("Failed to update cluster")
|
|
134
|
+
return UpdateClusterConfigurationResponse()
|
|
135
|
+
if self.__update_cluster_response:
|
|
136
|
+
return self.__update_cluster_response
|
|
137
|
+
return UpdateClusterConfigurationResponse(request_id="mock-request-id")
|
|
138
|
+
|
|
139
|
+
def DeleteCluster(self, request, context):
|
|
140
|
+
if self.__delete_cluster_error:
|
|
141
|
+
context.set_code(self.__delete_cluster_error)
|
|
142
|
+
context.set_details("Failed to delete cluster")
|
|
143
|
+
return DeleteClusterResponse()
|
|
144
|
+
if self.__delete_cluster_response:
|
|
145
|
+
return self.__delete_cluster_response
|
|
146
|
+
return DeleteClusterResponse(request_id="mock-request-id")
|