frogml 1.2.41__py3-none-any.whl → 1.2.47__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/_proto/qwak/admiral/secret/v0/account_secret_pb2.py +33 -0
- frogml/_proto/qwak/admiral/secret/v0/account_secret_pb2.pyi +76 -0
- frogml/_proto/qwak/admiral/secret/v0/account_secret_pb2_grpc.py +4 -0
- frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.py +28 -15
- frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.pyi +89 -0
- frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2_grpc.py +102 -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/core/inner/di_configuration/dependency_wiring.py +18 -16
- {frogml-1.2.41.dist-info → frogml-1.2.47.dist-info}/METADATA +1 -1
- {frogml-1.2.41.dist-info → frogml-1.2.47.dist-info}/RECORD +30 -11
- 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.41.dist-info → frogml-1.2.47.dist-info}/WHEEL +0 -0
|
@@ -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)
|
|
@@ -27,29 +27,30 @@ def wire_dependencies() -> FrogmlContainer:
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
from frogml.core.clients import (
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
administration,
|
|
31
|
+
alert_management,
|
|
32
|
+
alerts_registry,
|
|
32
33
|
analytics,
|
|
33
|
-
|
|
34
|
+
audience,
|
|
35
|
+
automation_management,
|
|
34
36
|
autoscaling,
|
|
35
|
-
build_orchestrator,
|
|
36
37
|
batch_job_management,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
build_orchestrator,
|
|
39
|
+
data_versioning,
|
|
39
40
|
deployment,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
feature_store,
|
|
42
|
+
file_versioning,
|
|
43
|
+
instance_template,
|
|
43
44
|
integration_management,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
data_versioning,
|
|
45
|
+
jfrog_gateway,
|
|
46
|
+
kube_deployment_captain,
|
|
47
47
|
logging_client,
|
|
48
|
-
|
|
49
|
-
file_versioning,
|
|
50
|
-
alerts_registry,
|
|
51
|
-
administration,
|
|
48
|
+
model_deployment_manager,
|
|
52
49
|
model_group_management,
|
|
50
|
+
model_management,
|
|
51
|
+
model_version_manager,
|
|
52
|
+
system_secret,
|
|
53
|
+
user_application_instance,
|
|
53
54
|
)
|
|
54
55
|
|
|
55
56
|
container.wire(
|
|
@@ -77,6 +78,7 @@ def wire_dependencies() -> FrogmlContainer:
|
|
|
77
78
|
model_version_manager,
|
|
78
79
|
jfrog_gateway,
|
|
79
80
|
model_group_management,
|
|
81
|
+
model_deployment_manager,
|
|
80
82
|
]
|
|
81
83
|
)
|
|
82
84
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
frogml/__init__.py,sha256=
|
|
1
|
+
frogml/__init__.py,sha256=nvwO4HCXHk0dxYeR0cagpgioYfR0AhrIPIVdCPaco5g,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,15 +167,24 @@ 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
|
|
176
|
+
frogml/_proto/qwak/admiral/secret/v0/account_secret_pb2.py,sha256=Owd4zpaBIh3BytZy3-2ioU8vioULkXzmVV6BD9FoCuo,2543
|
|
177
|
+
frogml/_proto/qwak/admiral/secret/v0/account_secret_pb2.pyi,sha256=ONAvrjhRLkbRAfY-dulJb2S2w0Enm4vq2z7DZRmbq3U,2736
|
|
178
|
+
frogml/_proto/qwak/admiral/secret/v0/account_secret_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
167
179
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2.py,sha256=U8KCZxLbs_wlrHyUr9ZMqsBz4_47yiqsrnuOMqh6Gj0,5180
|
|
168
180
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2.pyi,sha256=3bLfqt8Ciki7n0jP_NiNcgtNWliBfrqG_HzsGSQMC3Q,10250
|
|
169
181
|
frogml/_proto/qwak/admiral/secret/v0/secret_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
170
182
|
frogml/_proto/qwak/admiral/secret/v0/secret_service_pb2.py,sha256=V5_l2ipfgimZ-V3BawNz_h2u31e7LiF6f9XBnHZznXk,3425
|
|
171
183
|
frogml/_proto/qwak/admiral/secret/v0/secret_service_pb2.pyi,sha256=LHBpsDVvWBFG-K5_ZQR_698sKKce7qwQqEd40yJwkaA,3343
|
|
172
184
|
frogml/_proto/qwak/admiral/secret/v0/secret_service_pb2_grpc.py,sha256=95auDdnyLijxuVsxlU213MXYF595jjWvz1L5i-HVd1Y,6873
|
|
173
|
-
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.py,sha256=
|
|
174
|
-
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.pyi,sha256
|
|
175
|
-
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2_grpc.py,sha256=
|
|
185
|
+
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.py,sha256=oXHMyMj9bWjGbMIRnEx5v0pvlArb3HYQwvxDzy5QXnQ,5594
|
|
186
|
+
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2.pyi,sha256=-fyHIVVv5Aa7pbv1EEmzYpYsnwDKFlnEfF5XFQI8VI4,7653
|
|
187
|
+
frogml/_proto/qwak/admiral/secret/v0/system_secret_service_pb2_grpc.py,sha256=Jl8KPDxhIcl3JwTuBi1Q-i9TCVaKI4FR4tCtIi9S19Y,13074
|
|
176
188
|
frogml/_proto/qwak/admiral/user_application_instance/v0/user_application_instance_pb2.py,sha256=nPksL4ROLEgchP1YtL-BSAcmBvb3NcEdsNBxVInxDNI,8028
|
|
177
189
|
frogml/_proto/qwak/admiral/user_application_instance/v0/user_application_instance_pb2.pyi,sha256=TVQAGe8Sil6DyMFJbWOioYhdqRYHp26WouKjMbCgDnk,20646
|
|
178
190
|
frogml/_proto/qwak/admiral/user_application_instance/v0/user_application_instance_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -665,11 +677,15 @@ frogml/core/clients/administration/authenticated_user/__init__.py,sha256=47DEQpj
|
|
|
665
677
|
frogml/core/clients/administration/authenticated_user/client.py,sha256=ouN4YxbZs4uYDI8O0DaJZxfUoXgqESrJCDRTlfuNk5s,1486
|
|
666
678
|
frogml/core/clients/administration/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
667
679
|
frogml/core/clients/administration/authentication/client.py,sha256=BzfCb5laJ3Vci5t3owrcpuVvF4o9bsiKtOFfYWM1Nno,1200
|
|
680
|
+
frogml/core/clients/administration/cluster_v2/__init__.py,sha256=qsxlbOhYg9p5U-0RStC1CIJ86lEZ5UNIWuFPnL-8wGw,36
|
|
681
|
+
frogml/core/clients/administration/cluster_v2/client.py,sha256=m4CTSYjxxSeed118VxCanDQivMLXg5o1jxyDmSeMHUM,4217
|
|
668
682
|
frogml/core/clients/administration/eco_system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
669
683
|
frogml/core/clients/administration/eco_system/client.py,sha256=b2MYJVlbU4ehhwBWWkCwwl24xVw4K-_t7xMuGSMQ2uo,5379
|
|
670
684
|
frogml/core/clients/administration/eco_system/eco_system_utils.py,sha256=iSyCJv7z65DI2c3qsREzBM_S8ZUGOG4ISjhrfL_t4_Y,521
|
|
671
685
|
frogml/core/clients/administration/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
672
|
-
frogml/core/clients/administration/environment/client.py,sha256=
|
|
686
|
+
frogml/core/clients/administration/environment/client.py,sha256=YlfaKvoMXGAvcYj480PtXlAqc8GG6qSGv3KvPqtYh0o,3807
|
|
687
|
+
frogml/core/clients/administration/environment_v1/__init__.py,sha256=15_J34QBVU9X0d9_A6stiwYc6oLwkvuCCviROwROPXo,40
|
|
688
|
+
frogml/core/clients/administration/environment_v1/client.py,sha256=pEvE7dKv_QhYgOi-Aggc6oWAJq-80-Qw_Hsddn60upA,1924
|
|
673
689
|
frogml/core/clients/administration/self_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
674
690
|
frogml/core/clients/administration/self_service/client.py,sha256=znZgDkUzSLgtKx1yrUNU72_BiFtPbpCratD73B316bU,2648
|
|
675
691
|
frogml/core/clients/alert_management/__init__.py,sha256=zAfCPJTj6oAMoj3vciLjRy8ULTTHCmmrdISuDCHASvk,43
|
|
@@ -860,7 +876,7 @@ frogml/core/inner/di_configuration/__init__.py,sha256=GQKLaDPpBQ78h0gbwxaW3JkKbN
|
|
|
860
876
|
frogml/core/inner/di_configuration/account.py,sha256=YbQBmZ-roybEZJ1fmGk9TLQ5CEjLWcP9NuxS6WSSrbI,3016
|
|
861
877
|
frogml/core/inner/di_configuration/config.yml,sha256=GUvaZMWIDIR_d7hFcPVG_kHdCwpERKH1AFDakG3vqI4,242
|
|
862
878
|
frogml/core/inner/di_configuration/containers.py,sha256=8rEMnLSFvlfjEnfvbm9hOizCGWXX9F8S9QEYF5sX48E,1495
|
|
863
|
-
frogml/core/inner/di_configuration/dependency_wiring.py,sha256=
|
|
879
|
+
frogml/core/inner/di_configuration/dependency_wiring.py,sha256=sbgR4wJo08UDO9MQR6ub2lIq8HRzb9QBucvGVRRYQ4Y,2786
|
|
864
880
|
frogml/core/inner/instance_template/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
865
881
|
frogml/core/inner/instance_template/verify_template_id.py,sha256=SSVReUkx9t0FkXaSh0MKXOKdjd_55wE3NjAPOt6DGIM,1952
|
|
866
882
|
frogml/core/inner/model_loggers_utils.py,sha256=mGBZQ1CbiEePaoftFEH_yfLlsxP8fcPcu83Cb8Ut8cM,2465
|
|
@@ -1143,9 +1159,12 @@ frogml_services_mock/mocks/batch_job_manager_service.py,sha256=CYkNs1SkuTji0QHdv
|
|
|
1143
1159
|
frogml_services_mock/mocks/build_orchestrator_build_api.py,sha256=_9ZmgkAH_yp0yWZlqnMPT9rlj9ctfsMIlIJxG_a2Jc4,5002
|
|
1144
1160
|
frogml_services_mock/mocks/build_orchestrator_build_settings_api.py,sha256=c5_X7Q4EYP5krrLFdWbnml7_asdgLKB_6_VkwEOR8_A,1218
|
|
1145
1161
|
frogml_services_mock/mocks/build_orchestrator_service_api.py,sha256=7mZzOahph29ZLGh_qQaE2QqF4Bs5YwTaFj8QJxd4TkA,5345
|
|
1162
|
+
frogml_services_mock/mocks/cluster_v2_service.py,sha256=r4A2A4UUIEpyGrBEI9JSMQc1bzpzqBU_Vu22MIKP2do,5690
|
|
1146
1163
|
frogml_services_mock/mocks/data_versioning_service.py,sha256=8DzV5oxH7DXZAu_ZBiPEwW9m1AwbOlYOO1PFPjkq_Dk,2470
|
|
1147
1164
|
frogml_services_mock/mocks/deployment_management_service.py,sha256=wofBAw-2NKToTiFYxHqjR3QDrvplpV8NWNZMiIX6U_Q,20583
|
|
1148
1165
|
frogml_services_mock/mocks/ecosystem_service_api.py,sha256=saJYdT43nGVNyozWeDVc6HIXAsNvCdU5J1i-NNrnOr4,2089
|
|
1166
|
+
frogml_services_mock/mocks/environment_v0_service.py,sha256=xKKxKiD4_sqRfyNEpEdqZz-LQ7sJKop80JtvGTReI7s,7522
|
|
1167
|
+
frogml_services_mock/mocks/environment_v1_service.py,sha256=_5WPuVTchhopXrZyHSnh_TAprtTgTjt3Jkpprl0cHsk,1404
|
|
1149
1168
|
frogml_services_mock/mocks/execution_management_service.py,sha256=pRX_DWzayMhwbw7zQVRx2blVpiubqVWpZng2Xn8ZgI0,1205
|
|
1150
1169
|
frogml_services_mock/mocks/feature_store_data_sources_manager_api.py,sha256=YNd-0abshQH6bfrIEr1z0awIde_SYabfuZHV83LmcJ4,5249
|
|
1151
1170
|
frogml_services_mock/mocks/feature_store_entities_manager_api.py,sha256=fF3hhJvbd7PDPyghvqtiJudISOR1GasP6MDs5X44Tic,3355
|
|
@@ -1155,7 +1174,7 @@ frogml_services_mock/mocks/features_operator_v3_service.py,sha256=v6XdUpiI5T5mog
|
|
|
1155
1174
|
frogml_services_mock/mocks/features_set_state_service_api.py,sha256=YaF3X12gCFDKFYFUAH3ZsK2jjbxU1aYYyExwe-F1Zdg,2293
|
|
1156
1175
|
frogml_services_mock/mocks/feedback_service.py,sha256=yHItKZnlrN75F7D2rIGVrffipRaBCyMIvxK5ZmMVckE,1142
|
|
1157
1176
|
frogml_services_mock/mocks/file_versioning_service.py,sha256=PF_XyipSF5I8SfCNDYv298p3lMCizgDTZORlSuo4RYQ,2609
|
|
1158
|
-
frogml_services_mock/mocks/frogml_mocks.py,sha256=
|
|
1177
|
+
frogml_services_mock/mocks/frogml_mocks.py,sha256=eyJ76XwrRaSrBasdjyLGnlXWAmBXR1lJDJUqMBGLU90,6755
|
|
1159
1178
|
frogml_services_mock/mocks/fs_offline_serving_service.py,sha256=rzxL_G8t3PIM-IFuchqkHuUUzlOZfiP5A5IMSeSQynA,2096
|
|
1160
1179
|
frogml_services_mock/mocks/instance_template_management_service.py,sha256=AZ-QCzrx4d4g5E4XIPqFNhOJPBwb4S90mfVzsn6oNe4,4766
|
|
1161
1180
|
frogml_services_mock/mocks/integration_management_service.py,sha256=cw45A8EadycTyq3Okx1sgcuWZ-Lz2iPMRin6f4e_0Ws,2775
|
|
@@ -1177,9 +1196,9 @@ frogml_services_mock/mocks/system_secret_service.py,sha256=ceOR1nfQOGW4ZBcry4Q_l
|
|
|
1177
1196
|
frogml_services_mock/mocks/user_application_instance_service_api.py,sha256=Es3s9MnutY0Qsd_FOq_ctKvT-3wHn7-fxah1fvr5Jv4,4100
|
|
1178
1197
|
frogml_services_mock/mocks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1179
1198
|
frogml_services_mock/mocks/utils/exception_handlers.py,sha256=k_8mez3cwjNjKE9yGQRJUuK95qNQyk_slotIF08IIEE,308
|
|
1180
|
-
frogml_services_mock/services_mock.py,sha256=
|
|
1199
|
+
frogml_services_mock/services_mock.py,sha256=cVydasU1hXNbvz6K_M57GIZJ285i0s2fcMATzH2HH6I,21378
|
|
1181
1200
|
frogml_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1182
1201
|
frogml_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
|
|
1183
|
-
frogml-1.2.
|
|
1184
|
-
frogml-1.2.
|
|
1185
|
-
frogml-1.2.
|
|
1202
|
+
frogml-1.2.47.dist-info/METADATA,sha256=q8fKfEVudZ2jPcKn3gO_I07sbIuuT3Dh_Ul-QPXzpcQ,5599
|
|
1203
|
+
frogml-1.2.47.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
1204
|
+
frogml-1.2.47.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")
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from frogml._proto.qwak.administration.v0.environments.environment_pb2 import (
|
|
6
|
+
QwakEnvironment,
|
|
7
|
+
)
|
|
8
|
+
from frogml._proto.qwak.administration.v0.environments.environment_service_pb2 import (
|
|
9
|
+
CreateEnvironmentResponse,
|
|
10
|
+
GetEnvironmentApplicationUserCredentialsResponse,
|
|
11
|
+
GetEnvironmentResponse,
|
|
12
|
+
ListEnvironmentsResponse,
|
|
13
|
+
SetEnvironmentApplicationUserCredentialsResponse,
|
|
14
|
+
UpdateEnvironmentConfigurationResponse,
|
|
15
|
+
UpdateEnvironmentPersonalizationResponse,
|
|
16
|
+
)
|
|
17
|
+
from frogml._proto.qwak.administration.v0.environments.environment_service_pb2_grpc import (
|
|
18
|
+
EnvironmentServiceServicer,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class EnvironmentV0ServiceMock(EnvironmentServiceServicer):
|
|
23
|
+
def __init__(self):
|
|
24
|
+
super().__init__()
|
|
25
|
+
self.__create_environment_response: Optional[CreateEnvironmentResponse] = None
|
|
26
|
+
self.__create_environment_error: Optional[grpc.StatusCode] = None
|
|
27
|
+
|
|
28
|
+
self.__get_environment_response: Optional[GetEnvironmentResponse] = None
|
|
29
|
+
self.__get_environment_error: Optional[grpc.StatusCode] = None
|
|
30
|
+
|
|
31
|
+
self.__update_environment_configuration_response: Optional[
|
|
32
|
+
UpdateEnvironmentConfigurationResponse
|
|
33
|
+
] = None
|
|
34
|
+
self.__update_environment_configuration_error: Optional[grpc.StatusCode] = None
|
|
35
|
+
|
|
36
|
+
self.__update_environment_personalization_response: Optional[
|
|
37
|
+
UpdateEnvironmentPersonalizationResponse
|
|
38
|
+
] = None
|
|
39
|
+
self.__update_environment_personalization_error: Optional[grpc.StatusCode] = (
|
|
40
|
+
None
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
self.__list_environments_response: Optional[ListEnvironmentsResponse] = None
|
|
44
|
+
self.__list_environments_error: Optional[grpc.StatusCode] = None
|
|
45
|
+
|
|
46
|
+
self.__get_credentials_response: Optional[
|
|
47
|
+
GetEnvironmentApplicationUserCredentialsResponse
|
|
48
|
+
] = None
|
|
49
|
+
self.__get_credentials_error: Optional[grpc.StatusCode] = None
|
|
50
|
+
|
|
51
|
+
self.__set_credentials_response: Optional[
|
|
52
|
+
SetEnvironmentApplicationUserCredentialsResponse
|
|
53
|
+
] = None
|
|
54
|
+
self.__set_credentials_error: Optional[grpc.StatusCode] = None
|
|
55
|
+
|
|
56
|
+
def given_create_environment(
|
|
57
|
+
self,
|
|
58
|
+
response: Optional[CreateEnvironmentResponse] = None,
|
|
59
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
60
|
+
):
|
|
61
|
+
self.__create_environment_response = response
|
|
62
|
+
self.__create_environment_error = error_code
|
|
63
|
+
|
|
64
|
+
def given_get_environment(
|
|
65
|
+
self,
|
|
66
|
+
response: Optional[GetEnvironmentResponse] = None,
|
|
67
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
68
|
+
):
|
|
69
|
+
self.__get_environment_response = response
|
|
70
|
+
self.__get_environment_error = error_code
|
|
71
|
+
|
|
72
|
+
def given_update_environment_configuration(
|
|
73
|
+
self,
|
|
74
|
+
response: Optional[UpdateEnvironmentConfigurationResponse] = None,
|
|
75
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
76
|
+
):
|
|
77
|
+
self.__update_environment_configuration_response = response
|
|
78
|
+
self.__update_environment_configuration_error = error_code
|
|
79
|
+
|
|
80
|
+
def given_update_environment_personalization(
|
|
81
|
+
self,
|
|
82
|
+
response: Optional[UpdateEnvironmentPersonalizationResponse] = None,
|
|
83
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
84
|
+
):
|
|
85
|
+
self.__update_environment_personalization_response = response
|
|
86
|
+
self.__update_environment_personalization_error = error_code
|
|
87
|
+
|
|
88
|
+
def given_list_environments(
|
|
89
|
+
self,
|
|
90
|
+
response: Optional[ListEnvironmentsResponse] = None,
|
|
91
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
92
|
+
):
|
|
93
|
+
self.__list_environments_response = response
|
|
94
|
+
self.__list_environments_error = error_code
|
|
95
|
+
|
|
96
|
+
def given_get_credentials(
|
|
97
|
+
self,
|
|
98
|
+
response: Optional[GetEnvironmentApplicationUserCredentialsResponse] = None,
|
|
99
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
100
|
+
):
|
|
101
|
+
self.__get_credentials_response = response
|
|
102
|
+
self.__get_credentials_error = error_code
|
|
103
|
+
|
|
104
|
+
def given_set_credentials(
|
|
105
|
+
self,
|
|
106
|
+
response: Optional[SetEnvironmentApplicationUserCredentialsResponse] = None,
|
|
107
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
108
|
+
):
|
|
109
|
+
self.__set_credentials_response = response
|
|
110
|
+
self.__set_credentials_error = error_code
|
|
111
|
+
|
|
112
|
+
def CreateEnvironment(self, request, context):
|
|
113
|
+
if self.__create_environment_error:
|
|
114
|
+
context.set_code(self.__create_environment_error)
|
|
115
|
+
context.set_details("Failed to create environment")
|
|
116
|
+
return CreateEnvironmentResponse()
|
|
117
|
+
if self.__create_environment_response:
|
|
118
|
+
return self.__create_environment_response
|
|
119
|
+
return CreateEnvironmentResponse(environment=QwakEnvironment(id="mock-env-id"))
|
|
120
|
+
|
|
121
|
+
def GetEnvironment(self, request, context):
|
|
122
|
+
if self.__get_environment_error:
|
|
123
|
+
context.set_code(self.__get_environment_error)
|
|
124
|
+
context.set_details("Failed to get environment")
|
|
125
|
+
return GetEnvironmentResponse()
|
|
126
|
+
if self.__get_environment_response:
|
|
127
|
+
return self.__get_environment_response
|
|
128
|
+
return GetEnvironmentResponse(
|
|
129
|
+
environment=QwakEnvironment(id=request.environment_id)
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
def UpdateEnvironmentConfiguration(self, request, context):
|
|
133
|
+
if self.__update_environment_configuration_error:
|
|
134
|
+
context.set_code(self.__update_environment_configuration_error)
|
|
135
|
+
context.set_details("Failed to update environment configuration")
|
|
136
|
+
return UpdateEnvironmentConfigurationResponse()
|
|
137
|
+
if self.__update_environment_configuration_response:
|
|
138
|
+
return self.__update_environment_configuration_response
|
|
139
|
+
return UpdateEnvironmentConfigurationResponse()
|
|
140
|
+
|
|
141
|
+
def UpdateEnvironmentPersonalization(self, request, context):
|
|
142
|
+
if self.__update_environment_personalization_error:
|
|
143
|
+
context.set_code(self.__update_environment_personalization_error)
|
|
144
|
+
context.set_details("Failed to update environment personalization")
|
|
145
|
+
return UpdateEnvironmentPersonalizationResponse()
|
|
146
|
+
if self.__update_environment_personalization_response:
|
|
147
|
+
return self.__update_environment_personalization_response
|
|
148
|
+
return UpdateEnvironmentPersonalizationResponse()
|
|
149
|
+
|
|
150
|
+
def ListEnvironments(self, request, context):
|
|
151
|
+
if self.__list_environments_error:
|
|
152
|
+
context.set_code(self.__list_environments_error)
|
|
153
|
+
context.set_details("Failed to list environments")
|
|
154
|
+
return ListEnvironmentsResponse()
|
|
155
|
+
if self.__list_environments_response:
|
|
156
|
+
return self.__list_environments_response
|
|
157
|
+
return ListEnvironmentsResponse()
|
|
158
|
+
|
|
159
|
+
def GetEnvironmentApplicationUserCredentials(self, request, context):
|
|
160
|
+
if self.__get_credentials_error:
|
|
161
|
+
context.set_code(self.__get_credentials_error)
|
|
162
|
+
context.set_details("Failed to get credentials")
|
|
163
|
+
return GetEnvironmentApplicationUserCredentialsResponse()
|
|
164
|
+
if self.__get_credentials_response:
|
|
165
|
+
return self.__get_credentials_response
|
|
166
|
+
return GetEnvironmentApplicationUserCredentialsResponse()
|
|
167
|
+
|
|
168
|
+
def SetEnvironmentApplicationUserCredentials(self, request, context):
|
|
169
|
+
if self.__set_credentials_error:
|
|
170
|
+
context.set_code(self.__set_credentials_error)
|
|
171
|
+
context.set_details("Failed to set credentials")
|
|
172
|
+
return SetEnvironmentApplicationUserCredentialsResponse()
|
|
173
|
+
if self.__set_credentials_response:
|
|
174
|
+
return self.__set_credentials_response
|
|
175
|
+
return SetEnvironmentApplicationUserCredentialsResponse()
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from frogml._proto.qwak.administration.v0.environments.environment_pb2 import (
|
|
6
|
+
QwakEnvironment,
|
|
7
|
+
)
|
|
8
|
+
from frogml._proto.qwak.administration.v1.environments.environment_service_pb2 import (
|
|
9
|
+
CreateEnvironmentResponse,
|
|
10
|
+
)
|
|
11
|
+
from frogml._proto.qwak.administration.v1.environments.environment_service_pb2_grpc import (
|
|
12
|
+
EnvironmentServiceServicer,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class EnvironmentV1ServiceMock(EnvironmentServiceServicer):
|
|
17
|
+
def __init__(self):
|
|
18
|
+
super().__init__()
|
|
19
|
+
self.__create_environment_response: Optional[CreateEnvironmentResponse] = None
|
|
20
|
+
self.__create_environment_error: Optional[grpc.StatusCode] = None
|
|
21
|
+
|
|
22
|
+
def given_create_environment(
|
|
23
|
+
self,
|
|
24
|
+
response: Optional[CreateEnvironmentResponse] = None,
|
|
25
|
+
error_code: Optional[grpc.StatusCode] = None,
|
|
26
|
+
):
|
|
27
|
+
self.__create_environment_response = response
|
|
28
|
+
self.__create_environment_error = error_code
|
|
29
|
+
|
|
30
|
+
def CreateEnvironment(self, request, context):
|
|
31
|
+
if self.__create_environment_error:
|
|
32
|
+
context.set_code(self.__create_environment_error)
|
|
33
|
+
context.set_details("Failed to create environment")
|
|
34
|
+
return CreateEnvironmentResponse()
|
|
35
|
+
if self.__create_environment_response:
|
|
36
|
+
return self.__create_environment_response
|
|
37
|
+
return CreateEnvironmentResponse(environment=QwakEnvironment(id="mock-env-id"))
|
|
@@ -23,11 +23,14 @@ from frogml_services_mock.mocks.build_orchestrator_build_settings_api import (
|
|
|
23
23
|
from frogml_services_mock.mocks.build_orchestrator_service_api import (
|
|
24
24
|
BuildOrchestratorServiceApiMock,
|
|
25
25
|
)
|
|
26
|
+
from frogml_services_mock.mocks.cluster_v2_service import ClusterV2ServiceMock
|
|
26
27
|
from frogml_services_mock.mocks.data_versioning_service import DataVersioningServiceMock
|
|
27
28
|
from frogml_services_mock.mocks.deployment_management_service import (
|
|
28
29
|
DeploymentManagementServiceMock,
|
|
29
30
|
)
|
|
30
31
|
from frogml_services_mock.mocks.ecosystem_service_api import EcoSystemServiceMock
|
|
32
|
+
from frogml_services_mock.mocks.environment_v0_service import EnvironmentV0ServiceMock
|
|
33
|
+
from frogml_services_mock.mocks.environment_v1_service import EnvironmentV1ServiceMock
|
|
31
34
|
from frogml_services_mock.mocks.execution_management_service import (
|
|
32
35
|
ExecutionManagementServiceMock,
|
|
33
36
|
)
|
|
@@ -135,3 +138,6 @@ class FrogmlMocks:
|
|
|
135
138
|
location_discovery_service: LocationDiscoveryServiceApiMock
|
|
136
139
|
jfrog_tenant_info_service: JFrogTenantInfoServiceMock
|
|
137
140
|
model_deployment_manager_mock: ModelDeploymentManagerMock
|
|
141
|
+
cluster_v2_service_mock: ClusterV2ServiceMock
|
|
142
|
+
environment_v0_service_mock: EnvironmentV0ServiceMock
|
|
143
|
+
environment_v1_service_mock: EnvironmentV1ServiceMock
|