prelude-sdk-beta 1401__py3-none-any.whl → 1402__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.
Potentially problematic release.
This version of prelude-sdk-beta might be problematic. Click here for more details.
- prelude_sdk_beta/controllers/scm_controller.py +40 -5
- {prelude_sdk_beta-1401.dist-info → prelude_sdk_beta-1402.dist-info}/METADATA +1 -1
- {prelude_sdk_beta-1401.dist-info → prelude_sdk_beta-1402.dist-info}/RECORD +6 -6
- {prelude_sdk_beta-1401.dist-info → prelude_sdk_beta-1402.dist-info}/WHEEL +0 -0
- {prelude_sdk_beta-1401.dist-info → prelude_sdk_beta-1402.dist-info}/licenses/LICENSE +0 -0
- {prelude_sdk_beta-1401.dist-info → prelude_sdk_beta-1402.dist-info}/top_level.txt +0 -0
|
@@ -10,7 +10,7 @@ from prelude_sdk_beta.models.codes import (
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ScmController(HttpController):
|
|
13
|
-
default = -1
|
|
13
|
+
default = "-1"
|
|
14
14
|
|
|
15
15
|
def __init__(self, account):
|
|
16
16
|
super().__init__(account)
|
|
@@ -211,10 +211,10 @@ class ScmController(HttpController):
|
|
|
211
211
|
return res.json()
|
|
212
212
|
|
|
213
213
|
@verify_credentials
|
|
214
|
-
def
|
|
215
|
-
self, partner: Control,
|
|
214
|
+
def create_policy_exception(
|
|
215
|
+
self, partner: Control, instance_id: str, policy_id, setting_names, expires=None
|
|
216
216
|
):
|
|
217
|
-
"""
|
|
217
|
+
"""Create policy exceptions"""
|
|
218
218
|
body = dict(
|
|
219
219
|
control=partner.name,
|
|
220
220
|
expires=expires,
|
|
@@ -222,7 +222,7 @@ class ScmController(HttpController):
|
|
|
222
222
|
policy_id=policy_id,
|
|
223
223
|
setting_names=setting_names,
|
|
224
224
|
)
|
|
225
|
-
res = self.
|
|
225
|
+
res = self.post(
|
|
226
226
|
f"{self.account.hq}/scm/exceptions/policies",
|
|
227
227
|
json=body,
|
|
228
228
|
headers=self.account.headers,
|
|
@@ -230,6 +230,41 @@ class ScmController(HttpController):
|
|
|
230
230
|
)
|
|
231
231
|
return res.json()
|
|
232
232
|
|
|
233
|
+
@verify_credentials
|
|
234
|
+
def update_policy_exception(
|
|
235
|
+
self,
|
|
236
|
+
partner: Control,
|
|
237
|
+
instance_id: str,
|
|
238
|
+
policy_id,
|
|
239
|
+
expires=default,
|
|
240
|
+
setting_names=None,
|
|
241
|
+
):
|
|
242
|
+
"""Update policy exceptions"""
|
|
243
|
+
body = dict(control=partner.name, instance_id=instance_id)
|
|
244
|
+
if expires != self.default:
|
|
245
|
+
body["expires"] = expires
|
|
246
|
+
if setting_names:
|
|
247
|
+
body["setting_names"] = setting_names
|
|
248
|
+
res = self.post(
|
|
249
|
+
f"{self.account.hq}/scm/exceptions/policies/{policy_id}",
|
|
250
|
+
json=body,
|
|
251
|
+
headers=self.account.headers,
|
|
252
|
+
timeout=10,
|
|
253
|
+
)
|
|
254
|
+
return res.json()
|
|
255
|
+
|
|
256
|
+
@verify_credentials
|
|
257
|
+
def delete_policy_exception(self, instance_id: str, policy_id: str):
|
|
258
|
+
"""Delete policy exceptions"""
|
|
259
|
+
body = dict(instance_id=instance_id)
|
|
260
|
+
res = self.delete(
|
|
261
|
+
f"{self.account.hq}/scm/exceptions/policies/{policy_id}",
|
|
262
|
+
json=body,
|
|
263
|
+
headers=self.account.headers,
|
|
264
|
+
timeout=10,
|
|
265
|
+
)
|
|
266
|
+
return res.json()
|
|
267
|
+
|
|
233
268
|
@verify_credentials
|
|
234
269
|
def list_views(self):
|
|
235
270
|
"""List views"""
|
|
@@ -9,12 +9,12 @@ prelude_sdk_beta/controllers/iam_controller.py,sha256=w40NO1kxPxLMFDICx32pqfZbTf
|
|
|
9
9
|
prelude_sdk_beta/controllers/jobs_controller.py,sha256=dwoBGX-gAVNKE8sbx1N_4jUJVDVSdNRYD826G0pfix0,765
|
|
10
10
|
prelude_sdk_beta/controllers/partner_controller.py,sha256=WV51CY-Bsf8Ms59y7RjtfvCmsArBoXt5-AHqrN8Eras,5128
|
|
11
11
|
prelude_sdk_beta/controllers/probe_controller.py,sha256=d2Aa74Css1uMNgBKGWqavbkEbXtVcOkYIIWbhDxzLS0,411
|
|
12
|
-
prelude_sdk_beta/controllers/scm_controller.py,sha256=
|
|
12
|
+
prelude_sdk_beta/controllers/scm_controller.py,sha256=QEGFBFUbDZ5Ne3JwhcT38sZLdgokm3oEuc89dMEQkuo,14629
|
|
13
13
|
prelude_sdk_beta/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
prelude_sdk_beta/models/account.py,sha256=ksyTZDOZpbT8XDu-Ygs_51ZG25oBd8qiwjO6-L6HH9Y,8734
|
|
15
15
|
prelude_sdk_beta/models/codes.py,sha256=oDdHSR1Y0DfOxCUVdEbntkKGPEhazCactuZe-xT7e8s,13978
|
|
16
|
-
prelude_sdk_beta-
|
|
17
|
-
prelude_sdk_beta-
|
|
18
|
-
prelude_sdk_beta-
|
|
19
|
-
prelude_sdk_beta-
|
|
20
|
-
prelude_sdk_beta-
|
|
16
|
+
prelude_sdk_beta-1402.dist-info/licenses/LICENSE,sha256=ttdT5omfN6LNmtQoIjUhkkFhz6i44SDMRNwKrbfyTf8,1069
|
|
17
|
+
prelude_sdk_beta-1402.dist-info/METADATA,sha256=4QphiFRZAUL0b1j2VWN1S9uuTl85ypQrlgNFSSL3Us8,1190
|
|
18
|
+
prelude_sdk_beta-1402.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
prelude_sdk_beta-1402.dist-info/top_level.txt,sha256=pqXTtEd5ElvJKoO6HAz232H9FW5j6X7gW4kEEakfSFM,17
|
|
20
|
+
prelude_sdk_beta-1402.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|