strongdm 6.8.0__zip → 6.9.0__zip
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.
- {strongdm-6.8.0 → strongdm-6.9.0}/PKG-INFO +2 -2
- {strongdm-6.8.0 → strongdm-6.9.0}/setup.py +2 -2
- strongdm-6.9.0/strongdm/approval_workflow_approvers_history_pb2.py +100 -0
- strongdm-6.9.0/strongdm/approval_workflow_approvers_history_pb2_grpc.py +84 -0
- strongdm-6.9.0/strongdm/approval_workflow_approvers_pb2.py +190 -0
- strongdm-6.9.0/strongdm/approval_workflow_approvers_pb2_grpc.py +186 -0
- strongdm-6.9.0/strongdm/approval_workflow_steps_history_pb2.py +100 -0
- strongdm-6.9.0/strongdm/approval_workflow_steps_history_pb2_grpc.py +84 -0
- strongdm-6.9.0/strongdm/approval_workflow_steps_pb2.py +184 -0
- strongdm-6.9.0/strongdm/approval_workflow_steps_pb2_grpc.py +186 -0
- strongdm-6.9.0/strongdm/approval_workflows_history_pb2.py +100 -0
- strongdm-6.9.0/strongdm/approval_workflows_history_pb2_grpc.py +84 -0
- strongdm-6.9.0/strongdm/approval_workflows_pb2.py +218 -0
- strongdm-6.9.0/strongdm/approval_workflows_pb2_grpc.py +223 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/client.py +70 -1
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/constants.py +1 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/models.py +924 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/plumbing.py +770 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/svc.py +702 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm.egg-info/PKG-INFO +2 -2
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm.egg-info/SOURCES.txt +12 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/LICENSE +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/README.md +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/setup.cfg +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/__init__.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_request_events_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_request_events_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_requests_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_requests_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_requests_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/access_requests_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_attachments_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_attachments_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_attachments_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_attachments_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_grants_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_grants_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_grants_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_grants_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_permissions_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_permissions_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_resources_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_resources_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_resources_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/account_resources_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/accounts_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/accounts_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/accounts_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/accounts_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/activities_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/activities_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/control_panel_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/control_panel_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/drivers_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/drivers_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/errors.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/nodes_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/nodes_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/nodes_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/nodes_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/options_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/options_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/organization_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/organization_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_nodes_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_nodes_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_peers_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_peers_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_resources_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_group_resources_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_groups_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/peering_groups_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/queries_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/queries_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identities_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identities_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identities_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identities_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identity_groups_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identity_groups_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identity_groups_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/remote_identity_groups_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/replays_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/replays_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/resources_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/resources_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/resources_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/resources_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/role_resources_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/role_resources_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/role_resources_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/role_resources_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/roles_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/roles_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/roles_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/roles_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_store_healths_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_store_healths_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_store_types_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_store_types_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_stores_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_stores_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_stores_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/secret_stores_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/spec_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/spec_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/tags_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/tags_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_approvers_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_approvers_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_approvers_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_approvers_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_assignments_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_assignments_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_assignments_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_assignments_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_roles_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_roles_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_roles_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflow_roles_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflows_history_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflows_history_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflows_pb2.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm/workflows_pb2_grpc.py +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm.egg-info/dependency_links.txt +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm.egg-info/requires.txt +0 -0
- {strongdm-6.8.0 → strongdm-6.9.0}/strongdm.egg-info/top_level.txt +0 -0
@@ -50,6 +50,18 @@ from .accounts_history_pb2 import *
|
|
50
50
|
from .accounts_history_pb2_grpc import *
|
51
51
|
from .activities_pb2 import *
|
52
52
|
from .activities_pb2_grpc import *
|
53
|
+
from .approval_workflow_approvers_pb2 import *
|
54
|
+
from .approval_workflow_approvers_pb2_grpc import *
|
55
|
+
from .approval_workflow_approvers_history_pb2 import *
|
56
|
+
from .approval_workflow_approvers_history_pb2_grpc import *
|
57
|
+
from .approval_workflow_steps_pb2 import *
|
58
|
+
from .approval_workflow_steps_pb2_grpc import *
|
59
|
+
from .approval_workflow_steps_history_pb2 import *
|
60
|
+
from .approval_workflow_steps_history_pb2_grpc import *
|
61
|
+
from .approval_workflows_pb2 import *
|
62
|
+
from .approval_workflows_pb2_grpc import *
|
63
|
+
from .approval_workflows_history_pb2 import *
|
64
|
+
from .approval_workflows_history_pb2_grpc import *
|
53
65
|
from .control_panel_pb2 import *
|
54
66
|
from .control_panel_pb2_grpc import *
|
55
67
|
from .drivers_pb2 import *
|
@@ -1246,6 +1258,696 @@ class Activities:
|
|
1246
1258
|
return generator(self, req)
|
1247
1259
|
|
1248
1260
|
|
1261
|
+
class ApprovalWorkflowApprovers:
|
1262
|
+
'''
|
1263
|
+
ApprovalWorkflowApprovers link approval workflow approvers to an ApprovalWorkflowStep
|
1264
|
+
See `strongdm.models.ApprovalWorkflowApprover`.
|
1265
|
+
'''
|
1266
|
+
def __init__(self, channel, client):
|
1267
|
+
self.parent = client
|
1268
|
+
self.stub = ApprovalWorkflowApproversStub(channel)
|
1269
|
+
|
1270
|
+
def create(self, approval_workflow_approver, timeout=None):
|
1271
|
+
'''
|
1272
|
+
Create creates a new approval workflow approver.
|
1273
|
+
'''
|
1274
|
+
req = ApprovalWorkflowApproverCreateRequest()
|
1275
|
+
|
1276
|
+
if approval_workflow_approver is not None:
|
1277
|
+
req.approval_workflow_approver.CopyFrom(
|
1278
|
+
plumbing.convert_approval_workflow_approver_to_plumbing(
|
1279
|
+
approval_workflow_approver))
|
1280
|
+
tries = 0
|
1281
|
+
plumbing_response = None
|
1282
|
+
while True:
|
1283
|
+
try:
|
1284
|
+
plumbing_response = self.stub.Create(
|
1285
|
+
req,
|
1286
|
+
metadata=self.parent.get_metadata(
|
1287
|
+
'ApprovalWorkflowApprovers.Create', req),
|
1288
|
+
timeout=timeout)
|
1289
|
+
except Exception as e:
|
1290
|
+
if self.parent.shouldRetry(tries, e):
|
1291
|
+
tries += 1
|
1292
|
+
self.parent.jitterSleep(tries)
|
1293
|
+
continue
|
1294
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1295
|
+
break
|
1296
|
+
|
1297
|
+
resp = models.ApprovalWorkflowApproverCreateResponse()
|
1298
|
+
resp.approval_workflow_approver = plumbing.convert_approval_workflow_approver_to_porcelain(
|
1299
|
+
plumbing_response.approval_workflow_approver)
|
1300
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1301
|
+
plumbing_response.rate_limit)
|
1302
|
+
return resp
|
1303
|
+
|
1304
|
+
def get(self, id, timeout=None):
|
1305
|
+
'''
|
1306
|
+
Get reads one approval workflow approver by ID.
|
1307
|
+
'''
|
1308
|
+
req = ApprovalWorkflowApproverGetRequest()
|
1309
|
+
if self.parent.snapshot_datetime is not None:
|
1310
|
+
req.meta.CopyFrom(GetRequestMetadata())
|
1311
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1312
|
+
|
1313
|
+
req.id = (id)
|
1314
|
+
tries = 0
|
1315
|
+
plumbing_response = None
|
1316
|
+
while True:
|
1317
|
+
try:
|
1318
|
+
plumbing_response = self.stub.Get(
|
1319
|
+
req,
|
1320
|
+
metadata=self.parent.get_metadata(
|
1321
|
+
'ApprovalWorkflowApprovers.Get', req),
|
1322
|
+
timeout=timeout)
|
1323
|
+
except Exception as e:
|
1324
|
+
if self.parent.shouldRetry(tries, e):
|
1325
|
+
tries += 1
|
1326
|
+
self.parent.jitterSleep(tries)
|
1327
|
+
continue
|
1328
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1329
|
+
break
|
1330
|
+
|
1331
|
+
resp = models.ApprovalWorkflowApproverGetResponse()
|
1332
|
+
resp.approval_workflow_approver = plumbing.convert_approval_workflow_approver_to_porcelain(
|
1333
|
+
plumbing_response.approval_workflow_approver)
|
1334
|
+
resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
|
1335
|
+
plumbing_response.meta)
|
1336
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1337
|
+
plumbing_response.rate_limit)
|
1338
|
+
return resp
|
1339
|
+
|
1340
|
+
def delete(self, id, timeout=None):
|
1341
|
+
'''
|
1342
|
+
Delete deletes an existing approval workflow approver.
|
1343
|
+
'''
|
1344
|
+
req = ApprovalWorkflowApproverDeleteRequest()
|
1345
|
+
|
1346
|
+
req.id = (id)
|
1347
|
+
tries = 0
|
1348
|
+
plumbing_response = None
|
1349
|
+
while True:
|
1350
|
+
try:
|
1351
|
+
plumbing_response = self.stub.Delete(
|
1352
|
+
req,
|
1353
|
+
metadata=self.parent.get_metadata(
|
1354
|
+
'ApprovalWorkflowApprovers.Delete', req),
|
1355
|
+
timeout=timeout)
|
1356
|
+
except Exception as e:
|
1357
|
+
if self.parent.shouldRetry(tries, e):
|
1358
|
+
tries += 1
|
1359
|
+
self.parent.jitterSleep(tries)
|
1360
|
+
continue
|
1361
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1362
|
+
break
|
1363
|
+
|
1364
|
+
resp = models.ApprovalWorkflowApproverDeleteResponse()
|
1365
|
+
resp.id = (plumbing_response.id)
|
1366
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1367
|
+
plumbing_response.rate_limit)
|
1368
|
+
return resp
|
1369
|
+
|
1370
|
+
def list(self, filter, *args, timeout=None):
|
1371
|
+
'''
|
1372
|
+
Lists existing approval workflow approvers.
|
1373
|
+
'''
|
1374
|
+
req = ApprovalWorkflowApproverListRequest()
|
1375
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1376
|
+
if self.parent.page_limit > 0:
|
1377
|
+
req.meta.limit = self.parent.page_limit
|
1378
|
+
if self.parent.snapshot_datetime is not None:
|
1379
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1380
|
+
|
1381
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1382
|
+
|
1383
|
+
def generator(svc, req):
|
1384
|
+
tries = 0
|
1385
|
+
while True:
|
1386
|
+
try:
|
1387
|
+
plumbing_response = svc.stub.List(
|
1388
|
+
req,
|
1389
|
+
metadata=svc.parent.get_metadata(
|
1390
|
+
'ApprovalWorkflowApprovers.List', req),
|
1391
|
+
timeout=timeout)
|
1392
|
+
except Exception as e:
|
1393
|
+
if self.parent.shouldRetry(tries, e):
|
1394
|
+
tries += 1
|
1395
|
+
self.parent.jitterSleep(tries)
|
1396
|
+
continue
|
1397
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1398
|
+
tries = 0
|
1399
|
+
for plumbing_item in plumbing_response.approval_workflow_approvers:
|
1400
|
+
yield plumbing.convert_approval_workflow_approver_to_porcelain(
|
1401
|
+
plumbing_item)
|
1402
|
+
if plumbing_response.meta.next_cursor == '':
|
1403
|
+
break
|
1404
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1405
|
+
|
1406
|
+
return generator(self, req)
|
1407
|
+
|
1408
|
+
|
1409
|
+
class SnapshotApprovalWorkflowApprovers:
|
1410
|
+
'''
|
1411
|
+
SnapshotApprovalWorkflowApprovers exposes the read only methods of the ApprovalWorkflowApprovers
|
1412
|
+
service for historical queries.
|
1413
|
+
'''
|
1414
|
+
def __init__(self, approval_workflow_approvers):
|
1415
|
+
self.approval_workflow_approvers = approval_workflow_approvers
|
1416
|
+
|
1417
|
+
def get(self, id, timeout=None):
|
1418
|
+
'''
|
1419
|
+
Get reads one approval workflow approver by ID.
|
1420
|
+
'''
|
1421
|
+
return self.approval_workflow_approvers.get(id, timeout=timeout)
|
1422
|
+
|
1423
|
+
def list(self, filter, *args, timeout=None):
|
1424
|
+
'''
|
1425
|
+
Lists existing approval workflow approvers.
|
1426
|
+
'''
|
1427
|
+
return self.approval_workflow_approvers.list(filter,
|
1428
|
+
*args,
|
1429
|
+
timeout=timeout)
|
1430
|
+
|
1431
|
+
|
1432
|
+
class ApprovalWorkflowApproversHistory:
|
1433
|
+
'''
|
1434
|
+
ApprovalWorkflowApproversHistory records all changes to the state of an ApprovalWorkflowApprover.
|
1435
|
+
See `strongdm.models.ApprovalWorkflowApproverHistory`.
|
1436
|
+
'''
|
1437
|
+
def __init__(self, channel, client):
|
1438
|
+
self.parent = client
|
1439
|
+
self.stub = ApprovalWorkflowApproversHistoryStub(channel)
|
1440
|
+
|
1441
|
+
def list(self, filter, *args, timeout=None):
|
1442
|
+
'''
|
1443
|
+
List gets a list of ApprovalWorkflowApproverHistory records matching a given set of criteria.
|
1444
|
+
'''
|
1445
|
+
req = ApprovalWorkflowApproverHistoryListRequest()
|
1446
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1447
|
+
if self.parent.page_limit > 0:
|
1448
|
+
req.meta.limit = self.parent.page_limit
|
1449
|
+
if self.parent.snapshot_datetime is not None:
|
1450
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1451
|
+
|
1452
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1453
|
+
|
1454
|
+
def generator(svc, req):
|
1455
|
+
tries = 0
|
1456
|
+
while True:
|
1457
|
+
try:
|
1458
|
+
plumbing_response = svc.stub.List(
|
1459
|
+
req,
|
1460
|
+
metadata=svc.parent.get_metadata(
|
1461
|
+
'ApprovalWorkflowApproversHistory.List', req),
|
1462
|
+
timeout=timeout)
|
1463
|
+
except Exception as e:
|
1464
|
+
if self.parent.shouldRetry(tries, e):
|
1465
|
+
tries += 1
|
1466
|
+
self.parent.jitterSleep(tries)
|
1467
|
+
continue
|
1468
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1469
|
+
tries = 0
|
1470
|
+
for plumbing_item in plumbing_response.history:
|
1471
|
+
yield plumbing.convert_approval_workflow_approver_history_to_porcelain(
|
1472
|
+
plumbing_item)
|
1473
|
+
if plumbing_response.meta.next_cursor == '':
|
1474
|
+
break
|
1475
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1476
|
+
|
1477
|
+
return generator(self, req)
|
1478
|
+
|
1479
|
+
|
1480
|
+
class ApprovalWorkflowSteps:
|
1481
|
+
'''
|
1482
|
+
ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow
|
1483
|
+
See `strongdm.models.ApprovalWorkflowStep`.
|
1484
|
+
'''
|
1485
|
+
def __init__(self, channel, client):
|
1486
|
+
self.parent = client
|
1487
|
+
self.stub = ApprovalWorkflowStepsStub(channel)
|
1488
|
+
|
1489
|
+
def create(self, approval_workflow_step, timeout=None):
|
1490
|
+
'''
|
1491
|
+
Create creates a new approval workflow step.
|
1492
|
+
'''
|
1493
|
+
req = ApprovalWorkflowStepCreateRequest()
|
1494
|
+
|
1495
|
+
if approval_workflow_step is not None:
|
1496
|
+
req.approval_workflow_step.CopyFrom(
|
1497
|
+
plumbing.convert_approval_workflow_step_to_plumbing(
|
1498
|
+
approval_workflow_step))
|
1499
|
+
tries = 0
|
1500
|
+
plumbing_response = None
|
1501
|
+
while True:
|
1502
|
+
try:
|
1503
|
+
plumbing_response = self.stub.Create(
|
1504
|
+
req,
|
1505
|
+
metadata=self.parent.get_metadata(
|
1506
|
+
'ApprovalWorkflowSteps.Create', req),
|
1507
|
+
timeout=timeout)
|
1508
|
+
except Exception as e:
|
1509
|
+
if self.parent.shouldRetry(tries, e):
|
1510
|
+
tries += 1
|
1511
|
+
self.parent.jitterSleep(tries)
|
1512
|
+
continue
|
1513
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1514
|
+
break
|
1515
|
+
|
1516
|
+
resp = models.ApprovalWorkflowStepCreateResponse()
|
1517
|
+
resp.approval_workflow_step = plumbing.convert_approval_workflow_step_to_porcelain(
|
1518
|
+
plumbing_response.approval_workflow_step)
|
1519
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1520
|
+
plumbing_response.rate_limit)
|
1521
|
+
return resp
|
1522
|
+
|
1523
|
+
def get(self, id, timeout=None):
|
1524
|
+
'''
|
1525
|
+
Get reads one approval workflow step by ID.
|
1526
|
+
'''
|
1527
|
+
req = ApprovalWorkflowStepGetRequest()
|
1528
|
+
if self.parent.snapshot_datetime is not None:
|
1529
|
+
req.meta.CopyFrom(GetRequestMetadata())
|
1530
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1531
|
+
|
1532
|
+
req.id = (id)
|
1533
|
+
tries = 0
|
1534
|
+
plumbing_response = None
|
1535
|
+
while True:
|
1536
|
+
try:
|
1537
|
+
plumbing_response = self.stub.Get(
|
1538
|
+
req,
|
1539
|
+
metadata=self.parent.get_metadata(
|
1540
|
+
'ApprovalWorkflowSteps.Get', req),
|
1541
|
+
timeout=timeout)
|
1542
|
+
except Exception as e:
|
1543
|
+
if self.parent.shouldRetry(tries, e):
|
1544
|
+
tries += 1
|
1545
|
+
self.parent.jitterSleep(tries)
|
1546
|
+
continue
|
1547
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1548
|
+
break
|
1549
|
+
|
1550
|
+
resp = models.ApprovalWorkflowStepGetResponse()
|
1551
|
+
resp.approval_workflow_step = plumbing.convert_approval_workflow_step_to_porcelain(
|
1552
|
+
plumbing_response.approval_workflow_step)
|
1553
|
+
resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
|
1554
|
+
plumbing_response.meta)
|
1555
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1556
|
+
plumbing_response.rate_limit)
|
1557
|
+
return resp
|
1558
|
+
|
1559
|
+
def delete(self, id, timeout=None):
|
1560
|
+
'''
|
1561
|
+
Delete deletes an existing approval workflow step.
|
1562
|
+
'''
|
1563
|
+
req = ApprovalWorkflowStepDeleteRequest()
|
1564
|
+
|
1565
|
+
req.id = (id)
|
1566
|
+
tries = 0
|
1567
|
+
plumbing_response = None
|
1568
|
+
while True:
|
1569
|
+
try:
|
1570
|
+
plumbing_response = self.stub.Delete(
|
1571
|
+
req,
|
1572
|
+
metadata=self.parent.get_metadata(
|
1573
|
+
'ApprovalWorkflowSteps.Delete', req),
|
1574
|
+
timeout=timeout)
|
1575
|
+
except Exception as e:
|
1576
|
+
if self.parent.shouldRetry(tries, e):
|
1577
|
+
tries += 1
|
1578
|
+
self.parent.jitterSleep(tries)
|
1579
|
+
continue
|
1580
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1581
|
+
break
|
1582
|
+
|
1583
|
+
resp = models.ApprovalWorkflowStepDeleteResponse()
|
1584
|
+
resp.id = (plumbing_response.id)
|
1585
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1586
|
+
plumbing_response.rate_limit)
|
1587
|
+
return resp
|
1588
|
+
|
1589
|
+
def list(self, filter, *args, timeout=None):
|
1590
|
+
'''
|
1591
|
+
Lists existing approval workflow steps.
|
1592
|
+
'''
|
1593
|
+
req = ApprovalWorkflowStepListRequest()
|
1594
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1595
|
+
if self.parent.page_limit > 0:
|
1596
|
+
req.meta.limit = self.parent.page_limit
|
1597
|
+
if self.parent.snapshot_datetime is not None:
|
1598
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1599
|
+
|
1600
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1601
|
+
|
1602
|
+
def generator(svc, req):
|
1603
|
+
tries = 0
|
1604
|
+
while True:
|
1605
|
+
try:
|
1606
|
+
plumbing_response = svc.stub.List(
|
1607
|
+
req,
|
1608
|
+
metadata=svc.parent.get_metadata(
|
1609
|
+
'ApprovalWorkflowSteps.List', req),
|
1610
|
+
timeout=timeout)
|
1611
|
+
except Exception as e:
|
1612
|
+
if self.parent.shouldRetry(tries, e):
|
1613
|
+
tries += 1
|
1614
|
+
self.parent.jitterSleep(tries)
|
1615
|
+
continue
|
1616
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1617
|
+
tries = 0
|
1618
|
+
for plumbing_item in plumbing_response.approval_workflow_steps:
|
1619
|
+
yield plumbing.convert_approval_workflow_step_to_porcelain(
|
1620
|
+
plumbing_item)
|
1621
|
+
if plumbing_response.meta.next_cursor == '':
|
1622
|
+
break
|
1623
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1624
|
+
|
1625
|
+
return generator(self, req)
|
1626
|
+
|
1627
|
+
|
1628
|
+
class SnapshotApprovalWorkflowSteps:
|
1629
|
+
'''
|
1630
|
+
SnapshotApprovalWorkflowSteps exposes the read only methods of the ApprovalWorkflowSteps
|
1631
|
+
service for historical queries.
|
1632
|
+
'''
|
1633
|
+
def __init__(self, approval_workflow_steps):
|
1634
|
+
self.approval_workflow_steps = approval_workflow_steps
|
1635
|
+
|
1636
|
+
def get(self, id, timeout=None):
|
1637
|
+
'''
|
1638
|
+
Get reads one approval workflow step by ID.
|
1639
|
+
'''
|
1640
|
+
return self.approval_workflow_steps.get(id, timeout=timeout)
|
1641
|
+
|
1642
|
+
def list(self, filter, *args, timeout=None):
|
1643
|
+
'''
|
1644
|
+
Lists existing approval workflow steps.
|
1645
|
+
'''
|
1646
|
+
return self.approval_workflow_steps.list(filter,
|
1647
|
+
*args,
|
1648
|
+
timeout=timeout)
|
1649
|
+
|
1650
|
+
|
1651
|
+
class ApprovalWorkflowStepsHistory:
|
1652
|
+
'''
|
1653
|
+
ApprovalWorkflowStepsHistory records all changes to the state of an ApprovalWorkflowStep.
|
1654
|
+
See `strongdm.models.ApprovalWorkflowStepHistory`.
|
1655
|
+
'''
|
1656
|
+
def __init__(self, channel, client):
|
1657
|
+
self.parent = client
|
1658
|
+
self.stub = ApprovalWorkflowStepsHistoryStub(channel)
|
1659
|
+
|
1660
|
+
def list(self, filter, *args, timeout=None):
|
1661
|
+
'''
|
1662
|
+
List gets a list of ApprovalWorkflowStepHistory records matching a given set of criteria.
|
1663
|
+
'''
|
1664
|
+
req = ApprovalWorkflowStepHistoryListRequest()
|
1665
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1666
|
+
if self.parent.page_limit > 0:
|
1667
|
+
req.meta.limit = self.parent.page_limit
|
1668
|
+
if self.parent.snapshot_datetime is not None:
|
1669
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1670
|
+
|
1671
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1672
|
+
|
1673
|
+
def generator(svc, req):
|
1674
|
+
tries = 0
|
1675
|
+
while True:
|
1676
|
+
try:
|
1677
|
+
plumbing_response = svc.stub.List(
|
1678
|
+
req,
|
1679
|
+
metadata=svc.parent.get_metadata(
|
1680
|
+
'ApprovalWorkflowStepsHistory.List', req),
|
1681
|
+
timeout=timeout)
|
1682
|
+
except Exception as e:
|
1683
|
+
if self.parent.shouldRetry(tries, e):
|
1684
|
+
tries += 1
|
1685
|
+
self.parent.jitterSleep(tries)
|
1686
|
+
continue
|
1687
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1688
|
+
tries = 0
|
1689
|
+
for plumbing_item in plumbing_response.history:
|
1690
|
+
yield plumbing.convert_approval_workflow_step_history_to_porcelain(
|
1691
|
+
plumbing_item)
|
1692
|
+
if plumbing_response.meta.next_cursor == '':
|
1693
|
+
break
|
1694
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1695
|
+
|
1696
|
+
return generator(self, req)
|
1697
|
+
|
1698
|
+
|
1699
|
+
class ApprovalWorkflows:
|
1700
|
+
'''
|
1701
|
+
ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized
|
1702
|
+
approvers and be approved or denied.
|
1703
|
+
See `strongdm.models.ApprovalWorkflow`.
|
1704
|
+
'''
|
1705
|
+
def __init__(self, channel, client):
|
1706
|
+
self.parent = client
|
1707
|
+
self.stub = ApprovalWorkflowsStub(channel)
|
1708
|
+
|
1709
|
+
def create(self, approval_workflow, timeout=None):
|
1710
|
+
'''
|
1711
|
+
Create creates a new approval workflow and requires a name and approval mode for the approval workflow.
|
1712
|
+
'''
|
1713
|
+
req = ApprovalWorkflowCreateRequest()
|
1714
|
+
|
1715
|
+
if approval_workflow is not None:
|
1716
|
+
req.approval_workflow.CopyFrom(
|
1717
|
+
plumbing.convert_approval_workflow_to_plumbing(
|
1718
|
+
approval_workflow))
|
1719
|
+
tries = 0
|
1720
|
+
plumbing_response = None
|
1721
|
+
while True:
|
1722
|
+
try:
|
1723
|
+
plumbing_response = self.stub.Create(
|
1724
|
+
req,
|
1725
|
+
metadata=self.parent.get_metadata(
|
1726
|
+
'ApprovalWorkflows.Create', req),
|
1727
|
+
timeout=timeout)
|
1728
|
+
except Exception as e:
|
1729
|
+
if self.parent.shouldRetry(tries, e):
|
1730
|
+
tries += 1
|
1731
|
+
self.parent.jitterSleep(tries)
|
1732
|
+
continue
|
1733
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1734
|
+
break
|
1735
|
+
|
1736
|
+
resp = models.ApprovalWorkflowCreateResponse()
|
1737
|
+
resp.approval_workflow = plumbing.convert_approval_workflow_to_porcelain(
|
1738
|
+
plumbing_response.approval_workflow)
|
1739
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1740
|
+
plumbing_response.rate_limit)
|
1741
|
+
return resp
|
1742
|
+
|
1743
|
+
def get(self, id, timeout=None):
|
1744
|
+
'''
|
1745
|
+
Get reads one approval workflow by ID.
|
1746
|
+
'''
|
1747
|
+
req = ApprovalWorkflowGetRequest()
|
1748
|
+
if self.parent.snapshot_datetime is not None:
|
1749
|
+
req.meta.CopyFrom(GetRequestMetadata())
|
1750
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1751
|
+
|
1752
|
+
req.id = (id)
|
1753
|
+
tries = 0
|
1754
|
+
plumbing_response = None
|
1755
|
+
while True:
|
1756
|
+
try:
|
1757
|
+
plumbing_response = self.stub.Get(
|
1758
|
+
req,
|
1759
|
+
metadata=self.parent.get_metadata('ApprovalWorkflows.Get',
|
1760
|
+
req),
|
1761
|
+
timeout=timeout)
|
1762
|
+
except Exception as e:
|
1763
|
+
if self.parent.shouldRetry(tries, e):
|
1764
|
+
tries += 1
|
1765
|
+
self.parent.jitterSleep(tries)
|
1766
|
+
continue
|
1767
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1768
|
+
break
|
1769
|
+
|
1770
|
+
resp = models.ApprovalWorkflowGetResponse()
|
1771
|
+
resp.approval_workflow = plumbing.convert_approval_workflow_to_porcelain(
|
1772
|
+
plumbing_response.approval_workflow)
|
1773
|
+
resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
|
1774
|
+
plumbing_response.meta)
|
1775
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1776
|
+
plumbing_response.rate_limit)
|
1777
|
+
return resp
|
1778
|
+
|
1779
|
+
def delete(self, id, timeout=None):
|
1780
|
+
'''
|
1781
|
+
Delete deletes an existing approval workflow.
|
1782
|
+
'''
|
1783
|
+
req = ApprovalWorkflowDeleteRequest()
|
1784
|
+
|
1785
|
+
req.id = (id)
|
1786
|
+
tries = 0
|
1787
|
+
plumbing_response = None
|
1788
|
+
while True:
|
1789
|
+
try:
|
1790
|
+
plumbing_response = self.stub.Delete(
|
1791
|
+
req,
|
1792
|
+
metadata=self.parent.get_metadata(
|
1793
|
+
'ApprovalWorkflows.Delete', req),
|
1794
|
+
timeout=timeout)
|
1795
|
+
except Exception as e:
|
1796
|
+
if self.parent.shouldRetry(tries, e):
|
1797
|
+
tries += 1
|
1798
|
+
self.parent.jitterSleep(tries)
|
1799
|
+
continue
|
1800
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1801
|
+
break
|
1802
|
+
|
1803
|
+
resp = models.ApprovalWorkflowDeleteResponse()
|
1804
|
+
resp.id = (plumbing_response.id)
|
1805
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1806
|
+
plumbing_response.rate_limit)
|
1807
|
+
return resp
|
1808
|
+
|
1809
|
+
def update(self, approval_workflow, timeout=None):
|
1810
|
+
'''
|
1811
|
+
Update updates an existing approval workflow.
|
1812
|
+
'''
|
1813
|
+
req = ApprovalWorkflowUpdateRequest()
|
1814
|
+
|
1815
|
+
if approval_workflow is not None:
|
1816
|
+
req.approval_workflow.CopyFrom(
|
1817
|
+
plumbing.convert_approval_workflow_to_plumbing(
|
1818
|
+
approval_workflow))
|
1819
|
+
tries = 0
|
1820
|
+
plumbing_response = None
|
1821
|
+
while True:
|
1822
|
+
try:
|
1823
|
+
plumbing_response = self.stub.Update(
|
1824
|
+
req,
|
1825
|
+
metadata=self.parent.get_metadata(
|
1826
|
+
'ApprovalWorkflows.Update', req),
|
1827
|
+
timeout=timeout)
|
1828
|
+
except Exception as e:
|
1829
|
+
if self.parent.shouldRetry(tries, e):
|
1830
|
+
tries += 1
|
1831
|
+
self.parent.jitterSleep(tries)
|
1832
|
+
continue
|
1833
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1834
|
+
break
|
1835
|
+
|
1836
|
+
resp = models.ApprovalWorkflowUpdateResponse()
|
1837
|
+
resp.approval_workflow = plumbing.convert_approval_workflow_to_porcelain(
|
1838
|
+
plumbing_response.approval_workflow)
|
1839
|
+
resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
|
1840
|
+
plumbing_response.rate_limit)
|
1841
|
+
return resp
|
1842
|
+
|
1843
|
+
def list(self, filter, *args, timeout=None):
|
1844
|
+
'''
|
1845
|
+
Lists existing approval workflows.
|
1846
|
+
'''
|
1847
|
+
req = ApprovalWorkflowListRequest()
|
1848
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1849
|
+
if self.parent.page_limit > 0:
|
1850
|
+
req.meta.limit = self.parent.page_limit
|
1851
|
+
if self.parent.snapshot_datetime is not None:
|
1852
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1853
|
+
|
1854
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1855
|
+
|
1856
|
+
def generator(svc, req):
|
1857
|
+
tries = 0
|
1858
|
+
while True:
|
1859
|
+
try:
|
1860
|
+
plumbing_response = svc.stub.List(
|
1861
|
+
req,
|
1862
|
+
metadata=svc.parent.get_metadata(
|
1863
|
+
'ApprovalWorkflows.List', req),
|
1864
|
+
timeout=timeout)
|
1865
|
+
except Exception as e:
|
1866
|
+
if self.parent.shouldRetry(tries, e):
|
1867
|
+
tries += 1
|
1868
|
+
self.parent.jitterSleep(tries)
|
1869
|
+
continue
|
1870
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1871
|
+
tries = 0
|
1872
|
+
for plumbing_item in plumbing_response.approval_workflows:
|
1873
|
+
yield plumbing.convert_approval_workflow_to_porcelain(
|
1874
|
+
plumbing_item)
|
1875
|
+
if plumbing_response.meta.next_cursor == '':
|
1876
|
+
break
|
1877
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1878
|
+
|
1879
|
+
return generator(self, req)
|
1880
|
+
|
1881
|
+
|
1882
|
+
class SnapshotApprovalWorkflows:
|
1883
|
+
'''
|
1884
|
+
SnapshotApprovalWorkflows exposes the read only methods of the ApprovalWorkflows
|
1885
|
+
service for historical queries.
|
1886
|
+
'''
|
1887
|
+
def __init__(self, approval_workflows):
|
1888
|
+
self.approval_workflows = approval_workflows
|
1889
|
+
|
1890
|
+
def get(self, id, timeout=None):
|
1891
|
+
'''
|
1892
|
+
Get reads one approval workflow by ID.
|
1893
|
+
'''
|
1894
|
+
return self.approval_workflows.get(id, timeout=timeout)
|
1895
|
+
|
1896
|
+
def list(self, filter, *args, timeout=None):
|
1897
|
+
'''
|
1898
|
+
Lists existing approval workflows.
|
1899
|
+
'''
|
1900
|
+
return self.approval_workflows.list(filter, *args, timeout=timeout)
|
1901
|
+
|
1902
|
+
|
1903
|
+
class ApprovalWorkflowsHistory:
|
1904
|
+
'''
|
1905
|
+
ApprovalWorkflowsHistory records all changes to the state of an ApprovalWorkflow.
|
1906
|
+
See `strongdm.models.ApprovalWorkflowHistory`.
|
1907
|
+
'''
|
1908
|
+
def __init__(self, channel, client):
|
1909
|
+
self.parent = client
|
1910
|
+
self.stub = ApprovalWorkflowsHistoryStub(channel)
|
1911
|
+
|
1912
|
+
def list(self, filter, *args, timeout=None):
|
1913
|
+
'''
|
1914
|
+
List gets a list of ApprovalWorkflowHistory records matching a given set of criteria.
|
1915
|
+
'''
|
1916
|
+
req = ApprovalWorkflowHistoryListRequest()
|
1917
|
+
req.meta.CopyFrom(ListRequestMetadata())
|
1918
|
+
if self.parent.page_limit > 0:
|
1919
|
+
req.meta.limit = self.parent.page_limit
|
1920
|
+
if self.parent.snapshot_datetime is not None:
|
1921
|
+
req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
|
1922
|
+
|
1923
|
+
req.filter = plumbing.quote_filter_args(filter, *args)
|
1924
|
+
|
1925
|
+
def generator(svc, req):
|
1926
|
+
tries = 0
|
1927
|
+
while True:
|
1928
|
+
try:
|
1929
|
+
plumbing_response = svc.stub.List(
|
1930
|
+
req,
|
1931
|
+
metadata=svc.parent.get_metadata(
|
1932
|
+
'ApprovalWorkflowsHistory.List', req),
|
1933
|
+
timeout=timeout)
|
1934
|
+
except Exception as e:
|
1935
|
+
if self.parent.shouldRetry(tries, e):
|
1936
|
+
tries += 1
|
1937
|
+
self.parent.jitterSleep(tries)
|
1938
|
+
continue
|
1939
|
+
raise plumbing.convert_error_to_porcelain(e) from e
|
1940
|
+
tries = 0
|
1941
|
+
for plumbing_item in plumbing_response.history:
|
1942
|
+
yield plumbing.convert_approval_workflow_history_to_porcelain(
|
1943
|
+
plumbing_item)
|
1944
|
+
if plumbing_response.meta.next_cursor == '':
|
1945
|
+
break
|
1946
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1947
|
+
|
1948
|
+
return generator(self, req)
|
1949
|
+
|
1950
|
+
|
1249
1951
|
class ControlPanel:
|
1250
1952
|
'''
|
1251
1953
|
ControlPanel contains all administrative controls.
|