ark-sdk-python 2.0.7__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/auth/identity/ark_identity.py +1 -1
- ark_sdk_python/models/auth/ark_auth_method.py +2 -2
- ark_sdk_python/services/sia/workspaces/db/ark_sia_db_workspace_service.py +12 -3
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/METADATA +1 -1
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/RECORD +10 -10
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/WHEEL +1 -1
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-2.0.7.dist-info → ark_sdk_python-2.0.9.dist-info}/entry_points.txt +0 -0
ark_sdk_python/ark.py
CHANGED
|
@@ -316,7 +316,7 @@ class ArkIdentity:
|
|
|
316
316
|
def __pick_mechanism(self, challenge: Challenge) -> Mechanism:
|
|
317
317
|
factors = {
|
|
318
318
|
'otp': '📲 Push / Code',
|
|
319
|
-
'oath': '
|
|
319
|
+
'oath': '🔐 OATH Code',
|
|
320
320
|
'sms': '📟 SMS',
|
|
321
321
|
'email': '📧 Email',
|
|
322
322
|
'pf': '📞 Phone call',
|
|
@@ -20,8 +20,8 @@ class ArkAuthMethodSettings(ArkModel):
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class IdentityArkAuthMethodSettings(ArkAuthMethodSettings):
|
|
23
|
-
identity_mfa_method: Literal[('pf', 'sms', 'email', 'otp')] = Field(
|
|
24
|
-
description='MFA method if mfa is needed', default='email', alias='MFA Method to use by default [pf, sms, email, otp]'
|
|
23
|
+
identity_mfa_method: Literal[('pf', 'sms', 'email', 'otp', 'oath')] = Field(
|
|
24
|
+
description='MFA method if mfa is needed', default='email', alias='MFA Method to use by default [pf, sms, email, otp, oath]'
|
|
25
25
|
)
|
|
26
26
|
identity_mfa_interactive: bool = Field(description='Allow interactive MFA (passcodes)', alias='Allow Interactive MFA', default=True)
|
|
27
27
|
identity_application: Optional[str] = Field(
|
|
@@ -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,13 +10,13 @@ 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
|
|
17
17
|
ark_sdk_python/auth/ark_isp_auth.py,sha256=Xuf8J7-VgN6a6oJOem5Rf8LzOI5NCNqUeT5Snb4VNK4,9572
|
|
18
18
|
ark_sdk_python/auth/identity/__init__.py,sha256=2Yyc_Rrx-D4PsSdg-ESl5pFFTpqu6LUPSc4ZW59oOP8,328
|
|
19
|
-
ark_sdk_python/auth/identity/ark_identity.py,sha256=
|
|
19
|
+
ark_sdk_python/auth/identity/ark_identity.py,sha256=88_qZrF4JUxUyA6zcaRiGYQuZad9pHER9v8N6VP9rx4,32240
|
|
20
20
|
ark_sdk_python/auth/identity/ark_identity_fqdn_resolver.py,sha256=utO8mWF7rqfYhcPUthBp7t4M9t-_u3v84CRJeCogoHc,4797
|
|
21
21
|
ark_sdk_python/auth/identity/ark_identity_service_user.py,sha256=QlqUHGUh4iqmfqmV_YlXs6xNM_U-xz6VqW5hHZoxwSQ,7495
|
|
22
22
|
ark_sdk_python/cli_services/__init__.py,sha256=e9vdwqNiYqhZmK05Wgpz-Hf9SycK_3X-RS3CK9n2lIs,87
|
|
@@ -73,7 +73,7 @@ ark_sdk_python/models/ark_exceptions.py,sha256=lW4-kyHvHiKJEThl1j50mffmNGbv-anUi
|
|
|
73
73
|
ark_sdk_python/models/ark_model.py,sha256=dMY_iOUDMe8-gx5RlHc7Chnuv9ZQI_yG9KwV21IJjQ8,3361
|
|
74
74
|
ark_sdk_python/models/ark_profile.py,sha256=INhdKpriU_sSElBWsbOyYCHAGjO5jLZfyIxx25XAcUo,6625
|
|
75
75
|
ark_sdk_python/models/auth/__init__.py,sha256=zIRXj7AlSvPI2nanPM1tpc_lx8cwaYJUgI_FU4YjGzw,1065
|
|
76
|
-
ark_sdk_python/models/auth/ark_auth_method.py,sha256=
|
|
76
|
+
ark_sdk_python/models/auth/ark_auth_method.py,sha256=8sJQyIg1V__jE-kwuyo764MTLyGeALHItB11KhvbPhA,3259
|
|
77
77
|
ark_sdk_python/models/auth/ark_auth_profile.py,sha256=VyCZZI-0r-qontnhu3_jRO_fLS69ZDMwgDMi1y7Wd3g,1426
|
|
78
78
|
ark_sdk_python/models/auth/ark_secret.py,sha256=N2lVRZT4qkXQcA0Be8gEzFfyvjDm-8YPFvNs-CkgrxQ,259
|
|
79
79
|
ark_sdk_python/models/auth/ark_token.py,sha256=RwBeDAZDhz2JG8apGrB2H4Er7Gb0CeMu6047waPCo_E,1562
|
|
@@ -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
|