ark-sdk-python 2.0.8__py3-none-any.whl → 2.0.10__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/models/services/pcloud/safes/ark_pcloud_safe.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.10.dist-info}/METADATA +1 -1
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.10.dist-info}/RECORD +9 -9
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.10.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.10.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.10.dist-info}/WHEEL +0 -0
- {ark_sdk_python-2.0.8.dist-info → ark_sdk_python-2.0.10.dist-info}/entry_points.txt +0 -0
ark_sdk_python/ark.py
CHANGED
|
@@ -14,7 +14,7 @@ class ArkPCloudBaseSafe(ArkCamelizedModel):
|
|
|
14
14
|
safe_name: Optional[str] = Field(description='Name of the safe', default=None)
|
|
15
15
|
description: Optional[str] = Field(description='Description about the safe', default=None)
|
|
16
16
|
location: Optional[str] = Field(description='Location of the safe in the vault', default="\\")
|
|
17
|
-
number_of_days_retention: Optional[
|
|
17
|
+
number_of_days_retention: Optional[int] = Field(description='Number of retention days on the safe objects', default=0)
|
|
18
18
|
number_of_versions_retention: Optional[int] = Field(description='Number of retention versions on the safe objects', default=None)
|
|
19
19
|
auto_purge_enabled: Optional[bool] = Field(description='Whether auto purge is enabled on the safe', default=False)
|
|
20
20
|
olac_enabled: Optional[bool] = Field(description='Whether object level access control is enabled', default=False)
|
|
@@ -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=nG-gYA4bCJKCTdoiPmLmcQN5Kybfxy2DilbCzsnYLZA,1281
|
|
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
|
|
@@ -268,7 +268,7 @@ ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe.py,sha256=k0bgO0
|
|
|
268
268
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe_member.py,sha256=1pk5_zfjk1Hz_ADfiV2Yq0xqMFDMWq-k7vDcsoGygYw,258
|
|
269
269
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe_members_stats.py,sha256=hSoZ6NCs2cgXsp3k4KmbUhlcdV3QhC6kpRLQBir9Lpg,200
|
|
270
270
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_list_safe_members.py,sha256=1DwEnxGUC70IZ4xRa8W4YAa31wA-a7NshmFR9Si0dOQ,192
|
|
271
|
-
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe.py,sha256=
|
|
271
|
+
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe.py,sha256=faY2mApGfjpGLX_9tzVr9WoS_C_kRyOHkKZA7qXW-4M,1827
|
|
272
272
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_member.py,sha256=mippDGYp68kdL1x7EUl8VXGJxp0OWslzRSJpgu7Qryg,4455
|
|
273
273
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_members_filter.py,sha256=Ja_TyNyddajoawFVOURoLVVYa_4SIAstyIxtuVK0psc,788
|
|
274
274
|
ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safes_filters.py,sha256=rcDRVoyaY8ofwGBEkq2ZtlYoHH7b_C-fatw2wQogV-A,475
|
|
@@ -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.10.dist-info/LICENSE.txt,sha256=d4EzYx2apA3-GqrFY23wLtc6UmQNXG05gyLfZ3oWVRs,11358
|
|
484
|
+
ark_sdk_python-2.0.10.dist-info/METADATA,sha256=IheUPFO1EgVur7FyFrLQfcYjiC58qdrYwSpgklYmol4,20179
|
|
485
|
+
ark_sdk_python-2.0.10.dist-info/NOTICES.md,sha256=vRzFZEsfBw5q3H1_cgZV50AVhNTqF8Smz9fSvn49Y1E,125803
|
|
486
|
+
ark_sdk_python-2.0.10.dist-info/WHEEL,sha256=0IJoS5KyK2sZuSvGyrwXyRwSVwTkTkpEcRzz5xcYUMQ,110
|
|
487
|
+
ark_sdk_python-2.0.10.dist-info/entry_points.txt,sha256=v5bcuRn8w42ZKQspfvX3AliKmLVO6f7Zb_bma77p3vQ,47
|
|
488
|
+
ark_sdk_python-2.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|