ark-sdk-python 2.0.8__py3-none-any.whl → 2.0.9__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.
- ark_sdk_python/ark.py +1 -1
- ark_sdk_python/services/sia/workspaces/db/ark_sia_db_workspace_service.py +12 -3
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/METADATA +1 -1
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/RECORD +8 -8
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/WHEEL +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.9.dist-info}/entry_points.txt +0 -0
ark_sdk_python/ark.py
CHANGED
|
@@ -109,7 +109,10 @@ class ArkSIADBWorkspaceService(ArkService):
|
|
|
109
109
|
ArkServiceException: _description_
|
|
110
110
|
"""
|
|
111
111
|
if delete_database.name and not delete_database.id:
|
|
112
|
-
|
|
112
|
+
databases = self.list_databases_by(ArkSIADBDatabasesFilter(name=delete_database.name))
|
|
113
|
+
if not databases.items or len(databases.items) != 1:
|
|
114
|
+
raise ArkServiceException(f'Failed to delete database - name [{delete_database.name}] not found')
|
|
115
|
+
delete_database.id = databases.items[0].id
|
|
113
116
|
self._logger.info(f'Deleting database [{delete_database.id}]')
|
|
114
117
|
resp: Response = self.__client.delete(RESOURCE_API.format(resource_id=delete_database.id))
|
|
115
118
|
if resp.status_code != HTTPStatus.NO_CONTENT:
|
|
@@ -132,11 +135,17 @@ class ArkSIADBWorkspaceService(ArkService):
|
|
|
132
135
|
databases = self.list_databases_by(ArkSIADBDatabasesFilter(name=update_database.name))
|
|
133
136
|
if not databases.items or len(databases.items) != 1:
|
|
134
137
|
raise ArkServiceException(f'Failed to update database - name [{update_database.name}] not found')
|
|
135
|
-
update_database.id =
|
|
138
|
+
update_database.id = databases.items[0].id
|
|
139
|
+
|
|
140
|
+
existing_database = self.database(ArkSIADBGetDatabase(id=update_database.id))
|
|
136
141
|
self._logger.info(f'Updating database [{update_database.id}]')
|
|
137
142
|
update_database_dict = update_database.model_dump(exclude={'name', 'new_name'}, exclude_none=True)
|
|
138
143
|
if update_database.new_name:
|
|
139
144
|
update_database_dict["name"] = update_database.new_name
|
|
145
|
+
elif update_database.name:
|
|
146
|
+
update_database_dict["name"] = update_database.name
|
|
147
|
+
else:
|
|
148
|
+
update_database_dict["name"] = existing_database.name
|
|
140
149
|
resp: Response = self.__client.put(RESOURCE_API.format(resource_id=update_database.id), json=update_database_dict)
|
|
141
150
|
if resp.status_code == HTTPStatus.OK:
|
|
142
151
|
try:
|
|
@@ -210,7 +219,7 @@ class ArkSIADBWorkspaceService(ArkService):
|
|
|
210
219
|
databases = self.list_databases_by(ArkSIADBDatabasesFilter(name=get_database.name))
|
|
211
220
|
if not databases.items or len(databases.items) != 1:
|
|
212
221
|
raise ArkServiceException(f'Failed to get database - name [{get_database.name}] not found')
|
|
213
|
-
get_database.id =
|
|
222
|
+
get_database.id = databases.items[0].id
|
|
214
223
|
self._logger.info(f'Getting database [{get_database.id}]')
|
|
215
224
|
resp: Response = self.__client.get(RESOURCE_API.format(resource_id=get_database.id))
|
|
216
225
|
if resp.status_code == HTTPStatus.OK:
|
|
@@ -10,7 +10,7 @@ ark_sdk_python/actions/ark_service_exec_action.py,sha256=IHIm9oISRThOD8WNJe4oJX-
|
|
|
10
10
|
ark_sdk_python/args/__init__.py,sha256=mCb4UrIRL4u58QyUbqqH2xAU0VN91pxjK5sa_UwCM_k,279
|
|
11
11
|
ark_sdk_python/args/ark_args_formatter.py,sha256=-Rs_rGMIr1bprD1SfYlMsLoSOFgr_RFrRdREvbmPU6k,9204
|
|
12
12
|
ark_sdk_python/args/ark_pydantic_argparse.py,sha256=uupNLnUmO5LrTrRZsBv7qRKgDsx4GaJMwOUh1TCc1-w,40083
|
|
13
|
-
ark_sdk_python/ark.py,sha256=
|
|
13
|
+
ark_sdk_python/ark.py,sha256=u4gcbxkgYaMl2t9dMDUQhg54eQtaF-KXTHNyqlU4Za0,1280
|
|
14
14
|
ark_sdk_python/ark_api.py,sha256=qEB2j-xf8kiSdAvTXrvEdqGDQ-l1aoEvktxnq7BYNRI,12486
|
|
15
15
|
ark_sdk_python/auth/__init__.py,sha256=1l29Rf3VhwmV8z3YROiQVcgrZYSeeCqVN4zna77tnlk,620
|
|
16
16
|
ark_sdk_python/auth/ark_auth.py,sha256=2fPlABM3AwWmb1h0lQPQAz93u1ZluYKv7axlfg4lq5Q,12988
|
|
@@ -475,14 +475,14 @@ ark_sdk_python/services/sia/sso/__init__.py,sha256=32pGT_H9wzKaqaimCWmPrJkCx3jds
|
|
|
475
475
|
ark_sdk_python/services/sia/sso/ark_sia_sso_service.py,sha256=obl1NU9UsrBs1akfQZm7cyyC3f2mjCRmK5vQ2DIxwn0,19514
|
|
476
476
|
ark_sdk_python/services/sia/workspaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
477
477
|
ark_sdk_python/services/sia/workspaces/db/__init__.py,sha256=7QYqbdDGn1TFywk7cbBJkkVvx32hSTgs9T6oiVK3-e8,148
|
|
478
|
-
ark_sdk_python/services/sia/workspaces/db/ark_sia_db_workspace_service.py,sha256=
|
|
478
|
+
ark_sdk_python/services/sia/workspaces/db/ark_sia_db_workspace_service.py,sha256=I5jYj1aBY6SlUpIsziQv0NmSISdY5FKWGLhcMm_XSBc,12938
|
|
479
479
|
ark_sdk_python/services/sia/workspaces/targetsets/__init__.py,sha256=UjHr81LMcMlGn1Q6F88OQFoSwApkLrUK3RFyry8dSHE,181
|
|
480
480
|
ark_sdk_python/services/sia/workspaces/targetsets/ark_sia_target_sets_workspace_service.py,sha256=o9_DzskTV94kkfc4m0Qk8lj5FV8rexRa5RzRwfe9Tbo,11254
|
|
481
481
|
ark_sdk_python/services/sm/__init__.py,sha256=jzKxEkZYOCW9y_byLfd_odae9m2sh1UfjaaKBVySWY0,95
|
|
482
482
|
ark_sdk_python/services/sm/ark_sm_service.py,sha256=Rh2dFjNz7VMJUnl43hxL07HEZ8_33KrU_lqfUrqUDn4,11517
|
|
483
|
-
ark_sdk_python-2.0.
|
|
484
|
-
ark_sdk_python-2.0.
|
|
485
|
-
ark_sdk_python-2.0.
|
|
486
|
-
ark_sdk_python-2.0.
|
|
487
|
-
ark_sdk_python-2.0.
|
|
488
|
-
ark_sdk_python-2.0.
|
|
483
|
+
ark_sdk_python-2.0.9.dist-info/LICENSE.txt,sha256=d4EzYx2apA3-GqrFY23wLtc6UmQNXG05gyLfZ3oWVRs,11358
|
|
484
|
+
ark_sdk_python-2.0.9.dist-info/METADATA,sha256=g6zZmrb3KPBtNkGRVd8bmFyV9b--4-ocPAwIiTA8D3E,20178
|
|
485
|
+
ark_sdk_python-2.0.9.dist-info/NOTICES.md,sha256=vRzFZEsfBw5q3H1_cgZV50AVhNTqF8Smz9fSvn49Y1E,125803
|
|
486
|
+
ark_sdk_python-2.0.9.dist-info/WHEEL,sha256=0IJoS5KyK2sZuSvGyrwXyRwSVwTkTkpEcRzz5xcYUMQ,110
|
|
487
|
+
ark_sdk_python-2.0.9.dist-info/entry_points.txt,sha256=v5bcuRn8w42ZKQspfvX3AliKmLVO6f7Zb_bma77p3vQ,47
|
|
488
|
+
ark_sdk_python-2.0.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|