frogml 1.2.42__py3-none-any.whl → 1.2.44__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.
- frogml/__init__.py +1 -1
- frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2.py +52 -0
- frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2.pyi +208 -0
- frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2_grpc.py +237 -0
- frogml/_proto/qwak/administration/v1/environments/environment_pb2.py +29 -0
- frogml/_proto/qwak/administration/v1/environments/environment_pb2.pyi +35 -0
- frogml/_proto/qwak/administration/v1/environments/environment_pb2_grpc.py +4 -0
- frogml/_proto/qwak/administration/v1/environments/environment_service_pb2.py +33 -0
- frogml/_proto/qwak/administration/v1/environments/environment_service_pb2.pyi +59 -0
- frogml/_proto/qwak/administration/v1/environments/environment_service_pb2_grpc.py +67 -0
- frogml/core/clients/administration/cluster_v2/__init__.py +1 -0
- frogml/core/clients/administration/cluster_v2/client.py +122 -0
- frogml/core/clients/administration/environment/client.py +28 -0
- frogml/core/clients/administration/environment_v1/__init__.py +1 -0
- frogml/core/clients/administration/environment_v1/client.py +53 -0
- {frogml-1.2.42.dist-info → frogml-1.2.44.dist-info}/METADATA +1 -1
- {frogml-1.2.42.dist-info → frogml-1.2.44.dist-info}/RECORD +23 -7
- frogml_services_mock/mocks/cluster_v2_service.py +146 -0
- frogml_services_mock/mocks/environment_v0_service.py +175 -0
- frogml_services_mock/mocks/environment_v1_service.py +37 -0
- frogml_services_mock/mocks/frogml_mocks.py +6 -0
- frogml_services_mock/services_mock.py +33 -0
- {frogml-1.2.42.dist-info → frogml-1.2.44.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import builtins
|
|
7
|
+
import google.protobuf.descriptor
|
|
8
|
+
import google.protobuf.message
|
|
9
|
+
import frogml._proto.qwak.administration.v0.environments.environment_pb2
|
|
10
|
+
import frogml._proto.qwak.administration.v1.environments.environment_pb2
|
|
11
|
+
import typing
|
|
12
|
+
|
|
13
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
14
|
+
|
|
15
|
+
@typing.final
|
|
16
|
+
class CreateEnvironmentRequest(google.protobuf.message.Message):
|
|
17
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
18
|
+
|
|
19
|
+
ENVIRONMENT_NAME_FIELD_NUMBER: builtins.int
|
|
20
|
+
CLUSTER_ID_FIELD_NUMBER: builtins.int
|
|
21
|
+
SPEC_FIELD_NUMBER: builtins.int
|
|
22
|
+
environment_name: builtins.str
|
|
23
|
+
"""Environment name"""
|
|
24
|
+
cluster_id: builtins.str
|
|
25
|
+
"""The JFrogML Cluster the environment is deployed in."""
|
|
26
|
+
@property
|
|
27
|
+
def spec(self) -> frogml._proto.qwak.administration.v1.environments.environment_pb2.EnvironmentRuntimeConfigSpec:
|
|
28
|
+
"""Environment configuration"""
|
|
29
|
+
|
|
30
|
+
def __init__(
|
|
31
|
+
self,
|
|
32
|
+
*,
|
|
33
|
+
environment_name: builtins.str = ...,
|
|
34
|
+
cluster_id: builtins.str = ...,
|
|
35
|
+
spec: frogml._proto.qwak.administration.v1.environments.environment_pb2.EnvironmentRuntimeConfigSpec | None = ...,
|
|
36
|
+
) -> None: ...
|
|
37
|
+
def HasField(self, field_name: typing.Literal["spec", b"spec"]) -> builtins.bool: ...
|
|
38
|
+
def ClearField(self, field_name: typing.Literal["cluster_id", b"cluster_id", "environment_name", b"environment_name", "spec", b"spec"]) -> None: ...
|
|
39
|
+
|
|
40
|
+
global___CreateEnvironmentRequest = CreateEnvironmentRequest
|
|
41
|
+
|
|
42
|
+
@typing.final
|
|
43
|
+
class CreateEnvironmentResponse(google.protobuf.message.Message):
|
|
44
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
45
|
+
|
|
46
|
+
ENVIRONMENT_FIELD_NUMBER: builtins.int
|
|
47
|
+
@property
|
|
48
|
+
def environment(self) -> frogml._proto.qwak.administration.v0.environments.environment_pb2.QwakEnvironment:
|
|
49
|
+
"""Created environment"""
|
|
50
|
+
|
|
51
|
+
def __init__(
|
|
52
|
+
self,
|
|
53
|
+
*,
|
|
54
|
+
environment: frogml._proto.qwak.administration.v0.environments.environment_pb2.QwakEnvironment | None = ...,
|
|
55
|
+
) -> None: ...
|
|
56
|
+
def HasField(self, field_name: typing.Literal["environment", b"environment"]) -> builtins.bool: ...
|
|
57
|
+
def ClearField(self, field_name: typing.Literal["environment", b"environment"]) -> None: ...
|
|
58
|
+
|
|
59
|
+
global___CreateEnvironmentResponse = CreateEnvironmentResponse
|
|
@@ -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 frogml._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)
|
|
@@ -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 frogml._proto.qwak.administration.cluster.v2.cluster_pb2 import (
|
|
7
|
+
ClusterSpec,
|
|
8
|
+
)
|
|
9
|
+
from frogml._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 frogml._proto.qwak.administration.cluster.v2.cluster_service_pb2_grpc import (
|
|
24
|
+
ClusterServiceStub,
|
|
25
|
+
)
|
|
26
|
+
from dependency_injector.wiring import Provide
|
|
27
|
+
from frogml.core.inner.di_configuration import FrogmlContainer
|
|
28
|
+
from frogml.core.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[FrogmlContainer.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)
|
|
@@ -4,17 +4,23 @@ from dependency_injector.wiring import Provide
|
|
|
4
4
|
from frogml._proto.qwak.administration.v0.environments.environment_pb2 import (
|
|
5
5
|
QwakEnvironmentStatus,
|
|
6
6
|
)
|
|
7
|
+
from frogml._proto.qwak.administration.v0.environments.configuration_pb2 import (
|
|
8
|
+
QwakEnvironmentConfiguration,
|
|
9
|
+
)
|
|
7
10
|
from frogml._proto.qwak.administration.v0.environments.environment_service_pb2 import (
|
|
8
11
|
GetEnvironmentApplicationUserCredentialsRequest,
|
|
9
12
|
GetEnvironmentApplicationUserCredentialsResponse,
|
|
10
13
|
ListEnvironmentsRequest,
|
|
11
14
|
ListEnvironmentsResponse,
|
|
15
|
+
UpdateEnvironmentConfigurationRequest,
|
|
16
|
+
UpdateEnvironmentConfigurationResponse,
|
|
12
17
|
)
|
|
13
18
|
from frogml._proto.qwak.administration.v0.environments.environment_service_pb2_grpc import (
|
|
14
19
|
EnvironmentServiceStub,
|
|
15
20
|
)
|
|
16
21
|
from frogml.core.exceptions import FrogmlException
|
|
17
22
|
from frogml.core.inner.di_configuration import FrogmlContainer
|
|
23
|
+
from frogml.core.inner.tool.grpc.grpc_try_wrapping import grpc_try_catch_wrapper
|
|
18
24
|
|
|
19
25
|
|
|
20
26
|
class EnvironmentClient:
|
|
@@ -75,3 +81,25 @@ class EnvironmentClient:
|
|
|
75
81
|
raise FrogmlException(
|
|
76
82
|
f"Failed to get application user, error is {e.details()}"
|
|
77
83
|
)
|
|
84
|
+
|
|
85
|
+
@grpc_try_catch_wrapper(
|
|
86
|
+
"Failed to update environment configuration for {environment_id}"
|
|
87
|
+
)
|
|
88
|
+
def update_environment_configuration(
|
|
89
|
+
self, environment_id: str, configuration: QwakEnvironmentConfiguration
|
|
90
|
+
) -> UpdateEnvironmentConfigurationResponse:
|
|
91
|
+
"""
|
|
92
|
+
Update environment configuration.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
environment_id: The environment ID to update.
|
|
96
|
+
configuration: The new environment configuration.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
UpdateEnvironmentConfigurationResponse
|
|
100
|
+
"""
|
|
101
|
+
request = UpdateEnvironmentConfigurationRequest(
|
|
102
|
+
environment_id=environment_id,
|
|
103
|
+
configuration=configuration,
|
|
104
|
+
)
|
|
105
|
+
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 frogml._proto.qwak.administration.v1.environments.environment_pb2 import (
|
|
7
|
+
EnvironmentRuntimeConfigSpec,
|
|
8
|
+
)
|
|
9
|
+
from frogml._proto.qwak.administration.v1.environments.environment_service_pb2 import (
|
|
10
|
+
CreateEnvironmentRequest,
|
|
11
|
+
CreateEnvironmentResponse,
|
|
12
|
+
)
|
|
13
|
+
from frogml._proto.qwak.administration.v1.environments.environment_service_pb2_grpc import (
|
|
14
|
+
EnvironmentServiceStub,
|
|
15
|
+
)
|
|
16
|
+
from dependency_injector.wiring import Provide
|
|
17
|
+
from frogml.core.inner.di_configuration import FrogmlContainer
|
|
18
|
+
from frogml.core.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[FrogmlContainer.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)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
frogml/__init__.py,sha256=
|
|
1
|
+
frogml/__init__.py,sha256=jRkOZMd727GgKh3ZSEEs-cNVuwnimIo8NbArOnSrmp4,741
|
|
2
2
|
frogml/_proto/com/jfrog/ml/model/deployment/v1/auto_scaling_pb2.py,sha256=-SD6RYgn5DFBLlwTpH9YkV8aW_zYymBI68Y-12Fn0I0,4193
|
|
3
3
|
frogml/_proto/com/jfrog/ml/model/deployment/v1/auto_scaling_pb2.pyi,sha256=s0rdjIYw_dOfmuentpri79ls5dC3NqoUq__-XeavaXE,9688
|
|
4
4
|
frogml/_proto/com/jfrog/ml/model/deployment/v1/auto_scaling_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -83,6 +83,9 @@ frogml/_proto/qwak/administration/authenticated_user/v1/details_pb2_grpc.py,sha2
|
|
|
83
83
|
frogml/_proto/qwak/administration/cluster/v2/cluster_pb2.py,sha256=mn2N1ewXavzKj6fYOW7mtW3skdJHsIyDk0PoHGjV7xA,7710
|
|
84
84
|
frogml/_proto/qwak/administration/cluster/v2/cluster_pb2.pyi,sha256=4dP_rJkV6nnxGkeJghFeq04mSaenDhKjrLsbk-ww6gA,17336
|
|
85
85
|
frogml/_proto/qwak/administration/cluster/v2/cluster_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
86
|
+
frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2.py,sha256=LO7i_xO2JCj3O5Jk1GonvuH47tmYqkcOxuANRNbGHh0,5388
|
|
87
|
+
frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2.pyi,sha256=7Vn_OEVzdqDS2zcRez-IdsbftalVAkTI6IZZKxq3Pls,7344
|
|
88
|
+
frogml/_proto/qwak/administration/cluster/v2/cluster_service_pb2_grpc.py,sha256=UDuRQ_AIKghmnp8z--FqG5mLlH26aVLBLQqj4jMSM74,12944
|
|
86
89
|
frogml/_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.py,sha256=Qrxc5jKlR90Yi0sU7poq8NRUf4sZf0_TUTUab71XPis,2853
|
|
87
90
|
frogml/_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.pyi,sha256=a_K7CSexEa3ewJUCsuX4ym0DUy4Qti0WGVC7TBN7NxE,2534
|
|
88
91
|
frogml/_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -164,6 +167,12 @@ frogml/_proto/qwak/administration/v0/environments/personalization_pb2_grpc.py,sh
|
|
|
164
167
|
frogml/_proto/qwak/administration/v0/users/user_pb2.py,sha256=VCv_1ojHeRH26hQmhzL9lomfDw1JRLseI75Le4Eo-6s,4795
|
|
165
168
|
frogml/_proto/qwak/administration/v0/users/user_pb2.pyi,sha256=eUHlh367Qz0nQSvgxkkiOt3Qiy_1Rtm34_eaxUC2WKo,10514
|
|
166
169
|
frogml/_proto/qwak/administration/v0/users/user_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
170
|
+
frogml/_proto/qwak/administration/v1/environments/environment_pb2.py,sha256=CvQOXO8keOc2EJAW2rbP9976pF_dsyupnYyxe0pRkyo,2478
|
|
171
|
+
frogml/_proto/qwak/administration/v1/environments/environment_pb2.pyi,sha256=0sxjj4w8G_AzSsEa7isLjaQPcssJKaxzHxBq5gknCSE,2015
|
|
172
|
+
frogml/_proto/qwak/administration/v1/environments/environment_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
173
|
+
frogml/_proto/qwak/administration/v1/environments/environment_service_pb2.py,sha256=eEKQjLsLzh8q0aJBOiO8bc7sANQRjdjF_fFifpmKtig,2867
|
|
174
|
+
frogml/_proto/qwak/administration/v1/environments/environment_service_pb2.pyi,sha256=k8bq8klAQyw2Luy-2XKSq6V5b2b0pDaXQlLQAGffGsE,2320
|
|
175
|
+
frogml/_proto/qwak/administration/v1/environments/environment_service_pb2_grpc.py,sha256=TuyAgZpEVHoR7QNjZhUtI6bWBmwxPO5nyVyizem1L-s,3163
|
|
167
176
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2.py,sha256=U8KCZxLbs_wlrHyUr9ZMqsBz4_47yiqsrnuOMqh6Gj0,5180
|
|
168
177
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2.pyi,sha256=3bLfqt8Ciki7n0jP_NiNcgtNWliBfrqG_HzsGSQMC3Q,10250
|
|
169
178
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -665,11 +674,15 @@ frogml/core/clients/administration/authenticated_user/__init__.py,sha256=47DEQpj
|
|
|
665
674
|
frogml/core/clients/administration/authenticated_user/client.py,sha256=ouN4YxbZs4uYDI8O0DaJZxfUoXgqESrJCDRTlfuNk5s,1486
|
|
666
675
|
frogml/core/clients/administration/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
667
676
|
frogml/core/clients/administration/authentication/client.py,sha256=BzfCb5laJ3Vci5t3owrcpuVvF4o9bsiKtOFfYWM1Nno,1200
|
|
677
|
+
frogml/core/clients/administration/cluster_v2/__init__.py,sha256=qsxlbOhYg9p5U-0RStC1CIJ86lEZ5UNIWuFPnL-8wGw,36
|
|
678
|
+
frogml/core/clients/administration/cluster_v2/client.py,sha256=m4CTSYjxxSeed118VxCanDQivMLXg5o1jxyDmSeMHUM,4217
|
|
668
679
|
frogml/core/clients/administration/eco_system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
669
680
|
frogml/core/clients/administration/eco_system/client.py,sha256=b2MYJVlbU4ehhwBWWkCwwl24xVw4K-_t7xMuGSMQ2uo,5379
|
|
670
681
|
frogml/core/clients/administration/eco_system/eco_system_utils.py,sha256=iSyCJv7z65DI2c3qsREzBM_S8ZUGOG4ISjhrfL_t4_Y,521
|
|
671
682
|
frogml/core/clients/administration/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
672
|
-
frogml/core/clients/administration/environment/client.py,sha256=
|
|
683
|
+
frogml/core/clients/administration/environment/client.py,sha256=YlfaKvoMXGAvcYj480PtXlAqc8GG6qSGv3KvPqtYh0o,3807
|
|
684
|
+
frogml/core/clients/administration/environment_v1/__init__.py,sha256=15_J34QBVU9X0d9_A6stiwYc6oLwkvuCCviROwROPXo,40
|
|
685
|
+
frogml/core/clients/administration/environment_v1/client.py,sha256=pEvE7dKv_QhYgOi-Aggc6oWAJq-80-Qw_Hsddn60upA,1924
|
|
673
686
|
frogml/core/clients/administration/self_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
674
687
|
frogml/core/clients/administration/self_service/client.py,sha256=znZgDkUzSLgtKx1yrUNU72_BiFtPbpCratD73B316bU,2648
|
|
675
688
|
frogml/core/clients/alert_management/__init__.py,sha256=zAfCPJTj6oAMoj3vciLjRy8ULTTHCmmrdISuDCHASvk,43
|
|
@@ -1143,9 +1156,12 @@ frogml_services_mock/mocks/batch_job_manager_service.py,sha256=CYkNs1SkuTji0QHdv
|
|
|
1143
1156
|
frogml_services_mock/mocks/build_orchestrator_build_api.py,sha256=_9ZmgkAH_yp0yWZlqnMPT9rlj9ctfsMIlIJxG_a2Jc4,5002
|
|
1144
1157
|
frogml_services_mock/mocks/build_orchestrator_build_settings_api.py,sha256=c5_X7Q4EYP5krrLFdWbnml7_asdgLKB_6_VkwEOR8_A,1218
|
|
1145
1158
|
frogml_services_mock/mocks/build_orchestrator_service_api.py,sha256=7mZzOahph29ZLGh_qQaE2QqF4Bs5YwTaFj8QJxd4TkA,5345
|
|
1159
|
+
frogml_services_mock/mocks/cluster_v2_service.py,sha256=r4A2A4UUIEpyGrBEI9JSMQc1bzpzqBU_Vu22MIKP2do,5690
|
|
1146
1160
|
frogml_services_mock/mocks/data_versioning_service.py,sha256=8DzV5oxH7DXZAu_ZBiPEwW9m1AwbOlYOO1PFPjkq_Dk,2470
|
|
1147
1161
|
frogml_services_mock/mocks/deployment_management_service.py,sha256=wofBAw-2NKToTiFYxHqjR3QDrvplpV8NWNZMiIX6U_Q,20583
|
|
1148
1162
|
frogml_services_mock/mocks/ecosystem_service_api.py,sha256=saJYdT43nGVNyozWeDVc6HIXAsNvCdU5J1i-NNrnOr4,2089
|
|
1163
|
+
frogml_services_mock/mocks/environment_v0_service.py,sha256=xKKxKiD4_sqRfyNEpEdqZz-LQ7sJKop80JtvGTReI7s,7522
|
|
1164
|
+
frogml_services_mock/mocks/environment_v1_service.py,sha256=_5WPuVTchhopXrZyHSnh_TAprtTgTjt3Jkpprl0cHsk,1404
|
|
1149
1165
|
frogml_services_mock/mocks/execution_management_service.py,sha256=pRX_DWzayMhwbw7zQVRx2blVpiubqVWpZng2Xn8ZgI0,1205
|
|
1150
1166
|
frogml_services_mock/mocks/feature_store_data_sources_manager_api.py,sha256=YNd-0abshQH6bfrIEr1z0awIde_SYabfuZHV83LmcJ4,5249
|
|
1151
1167
|
frogml_services_mock/mocks/feature_store_entities_manager_api.py,sha256=fF3hhJvbd7PDPyghvqtiJudISOR1GasP6MDs5X44Tic,3355
|
|
@@ -1155,7 +1171,7 @@ frogml_services_mock/mocks/features_operator_v3_service.py,sha256=v6XdUpiI5T5mog
|
|
|
1155
1171
|
frogml_services_mock/mocks/features_set_state_service_api.py,sha256=YaF3X12gCFDKFYFUAH3ZsK2jjbxU1aYYyExwe-F1Zdg,2293
|
|
1156
1172
|
frogml_services_mock/mocks/feedback_service.py,sha256=yHItKZnlrN75F7D2rIGVrffipRaBCyMIvxK5ZmMVckE,1142
|
|
1157
1173
|
frogml_services_mock/mocks/file_versioning_service.py,sha256=PF_XyipSF5I8SfCNDYv298p3lMCizgDTZORlSuo4RYQ,2609
|
|
1158
|
-
frogml_services_mock/mocks/frogml_mocks.py,sha256=
|
|
1174
|
+
frogml_services_mock/mocks/frogml_mocks.py,sha256=eyJ76XwrRaSrBasdjyLGnlXWAmBXR1lJDJUqMBGLU90,6755
|
|
1159
1175
|
frogml_services_mock/mocks/fs_offline_serving_service.py,sha256=rzxL_G8t3PIM-IFuchqkHuUUzlOZfiP5A5IMSeSQynA,2096
|
|
1160
1176
|
frogml_services_mock/mocks/instance_template_management_service.py,sha256=AZ-QCzrx4d4g5E4XIPqFNhOJPBwb4S90mfVzsn6oNe4,4766
|
|
1161
1177
|
frogml_services_mock/mocks/integration_management_service.py,sha256=cw45A8EadycTyq3Okx1sgcuWZ-Lz2iPMRin6f4e_0Ws,2775
|
|
@@ -1177,9 +1193,9 @@ frogml_services_mock/mocks/system_secret_service.py,sha256=ceOR1nfQOGW4ZBcry4Q_l
|
|
|
1177
1193
|
frogml_services_mock/mocks/user_application_instance_service_api.py,sha256=Es3s9MnutY0Qsd_FOq_ctKvT-3wHn7-fxah1fvr5Jv4,4100
|
|
1178
1194
|
frogml_services_mock/mocks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1179
1195
|
frogml_services_mock/mocks/utils/exception_handlers.py,sha256=k_8mez3cwjNjKE9yGQRJUuK95qNQyk_slotIF08IIEE,308
|
|
1180
|
-
frogml_services_mock/services_mock.py,sha256=
|
|
1196
|
+
frogml_services_mock/services_mock.py,sha256=cVydasU1hXNbvz6K_M57GIZJ285i0s2fcMATzH2HH6I,21378
|
|
1181
1197
|
frogml_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1182
1198
|
frogml_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
|
|
1183
|
-
frogml-1.2.
|
|
1184
|
-
frogml-1.2.
|
|
1185
|
-
frogml-1.2.
|
|
1199
|
+
frogml-1.2.44.dist-info/METADATA,sha256=mVB2P67U5CNBghRdTmbGzuXM5r2Hysi6YgClWlmi6BE,5599
|
|
1200
|
+
frogml-1.2.44.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
1201
|
+
frogml-1.2.44.dist-info/RECORD,,
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from frogml._proto.qwak.administration.cluster.v2.cluster_pb2 import (
|
|
6
|
+
ClusterState,
|
|
7
|
+
)
|
|
8
|
+
from frogml._proto.qwak.administration.cluster.v2.cluster_service_pb2 import (
|
|
9
|
+
CreateClusterCreationRequestResponse,
|
|
10
|
+
DeleteClusterResponse,
|
|
11
|
+
GetClusterResponse,
|
|
12
|
+
GetClusterStateResponse,
|
|
13
|
+
ListClustersResponse,
|
|
14
|
+
UpdateClusterConfigurationResponse,
|
|
15
|
+
)
|
|
16
|
+
from frogml._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")
|