strongdm 14.14.0__zip → 14.20.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-14.14.0 → strongdm-14.20.0}/PKG-INFO +2 -2
- {strongdm-14.14.0 → strongdm-14.20.0}/setup.py +2 -2
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/client.py +48 -31
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/drivers_pb2.py +98 -92
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/models.py +55 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/organization_history_pb2.py +8 -4
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/plumbing.py +12 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/queries_pb2.py +10 -8
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/svc.py +869 -483
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm.egg-info/PKG-INFO +2 -2
- {strongdm-14.14.0 → strongdm-14.20.0}/LICENSE +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/README.md +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/setup.cfg +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/__init__.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_request_events_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_request_events_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_requests_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_requests_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_requests_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/access_requests_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_attachments_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_attachments_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_attachments_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_attachments_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_grants_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_grants_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_grants_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_grants_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_permissions_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_permissions_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_resources_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_resources_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_resources_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/account_resources_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/accounts_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/accounts_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/accounts_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/accounts_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/activities_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/activities_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_approvers_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_approvers_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_approvers_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_approvers_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_steps_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_steps_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_steps_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflow_steps_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflows_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflows_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflows_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/approval_workflows_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/constants.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/control_panel_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/control_panel_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/drivers_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/errors.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/health_checks_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/health_checks_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_aliases_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_aliases_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_aliases_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_aliases_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_sets_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_sets_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_sets_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/identity_sets_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/managed_secrets_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/managed_secrets_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/nodes_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/nodes_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/nodes_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/nodes_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/options_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/options_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/organization_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_nodes_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_nodes_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_peers_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_peers_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_resources_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_group_resources_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_groups_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/peering_groups_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/policies_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/policies_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/policies_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/policies_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/proxy_cluster_keys_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/proxy_cluster_keys_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/queries_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identities_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identities_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identities_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identities_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identity_groups_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identity_groups_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identity_groups_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/remote_identity_groups_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/replays_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/replays_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/resources_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/resources_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/resources_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/resources_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/role_resources_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/role_resources_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/role_resources_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/role_resources_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/roles_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/roles_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/roles_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/roles_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engine_policy_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engine_policy_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engine_types_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engine_types_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engines_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_engines_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_store_healths_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_store_healths_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_store_types_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_store_types_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_stores_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_stores_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_stores_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/secret_stores_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/spec_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/spec_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/tags_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/tags_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_approvers_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_approvers_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_approvers_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_approvers_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_assignments_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_assignments_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_assignments_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_assignments_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_roles_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_roles_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_roles_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflow_roles_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflows_history_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflows_history_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflows_pb2.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm/workflows_pb2_grpc.py +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm.egg-info/SOURCES.txt +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm.egg-info/dependency_links.txt +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm.egg-info/requires.txt +0 -0
- {strongdm-14.14.0 → strongdm-14.20.0}/strongdm.egg-info/top_level.txt +0 -0
@@ -154,6 +154,7 @@ from .workflows_history_pb2 import *
|
|
154
154
|
from .workflows_history_pb2_grpc import *
|
155
155
|
import warnings
|
156
156
|
import functools
|
157
|
+
import time
|
157
158
|
|
158
159
|
|
159
160
|
def deprecated(func):
|
@@ -183,6 +184,7 @@ class AccessRequests:
|
|
183
184
|
'''
|
184
185
|
Lists existing access requests.
|
185
186
|
'''
|
187
|
+
deadline = None if timeout is None else time.time() + timeout
|
186
188
|
req = AccessRequestListRequest()
|
187
189
|
req.meta.CopyFrom(ListRequestMetadata())
|
188
190
|
if self.parent.page_limit > 0:
|
@@ -195,16 +197,18 @@ class AccessRequests:
|
|
195
197
|
def generator(svc, req):
|
196
198
|
tries = 0
|
197
199
|
while True:
|
200
|
+
t = None if deadline is None else deadline - time.time()
|
198
201
|
try:
|
199
202
|
plumbing_response = svc.stub.List(
|
200
203
|
req,
|
201
204
|
metadata=svc.parent.get_metadata(
|
202
205
|
'AccessRequests.List', req),
|
203
|
-
timeout=
|
206
|
+
timeout=t)
|
204
207
|
except Exception as e:
|
205
|
-
if self.parent.shouldRetry(tries, e):
|
208
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
206
209
|
tries += 1
|
207
|
-
|
210
|
+
time.sleep(
|
211
|
+
self.parent.exponentialBackoff(tries, deadline))
|
208
212
|
continue
|
209
213
|
raise plumbing.convert_error_to_porcelain(e) from e
|
210
214
|
tries = 0
|
@@ -246,6 +250,7 @@ class AccessRequestEventsHistory:
|
|
246
250
|
'''
|
247
251
|
List gets a list of AccessRequestEventHistory records matching a given set of criteria.
|
248
252
|
'''
|
253
|
+
deadline = None if timeout is None else time.time() + timeout
|
249
254
|
req = AccessRequestEventHistoryListRequest()
|
250
255
|
req.meta.CopyFrom(ListRequestMetadata())
|
251
256
|
if self.parent.page_limit > 0:
|
@@ -258,16 +263,18 @@ class AccessRequestEventsHistory:
|
|
258
263
|
def generator(svc, req):
|
259
264
|
tries = 0
|
260
265
|
while True:
|
266
|
+
t = None if deadline is None else deadline - time.time()
|
261
267
|
try:
|
262
268
|
plumbing_response = svc.stub.List(
|
263
269
|
req,
|
264
270
|
metadata=svc.parent.get_metadata(
|
265
271
|
'AccessRequestEventsHistory.List', req),
|
266
|
-
timeout=
|
272
|
+
timeout=t)
|
267
273
|
except Exception as e:
|
268
|
-
if self.parent.shouldRetry(tries, e):
|
274
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
269
275
|
tries += 1
|
270
|
-
|
276
|
+
time.sleep(
|
277
|
+
self.parent.exponentialBackoff(tries, deadline))
|
271
278
|
continue
|
272
279
|
raise plumbing.convert_error_to_porcelain(e) from e
|
273
280
|
tries = 0
|
@@ -294,6 +301,7 @@ class AccessRequestsHistory:
|
|
294
301
|
'''
|
295
302
|
List gets a list of AccessRequestHistory records matching a given set of criteria.
|
296
303
|
'''
|
304
|
+
deadline = None if timeout is None else time.time() + timeout
|
297
305
|
req = AccessRequestHistoryListRequest()
|
298
306
|
req.meta.CopyFrom(ListRequestMetadata())
|
299
307
|
if self.parent.page_limit > 0:
|
@@ -306,16 +314,18 @@ class AccessRequestsHistory:
|
|
306
314
|
def generator(svc, req):
|
307
315
|
tries = 0
|
308
316
|
while True:
|
317
|
+
t = None if deadline is None else deadline - time.time()
|
309
318
|
try:
|
310
319
|
plumbing_response = svc.stub.List(
|
311
320
|
req,
|
312
321
|
metadata=svc.parent.get_metadata(
|
313
322
|
'AccessRequestsHistory.List', req),
|
314
|
-
timeout=
|
323
|
+
timeout=t)
|
315
324
|
except Exception as e:
|
316
|
-
if self.parent.shouldRetry(tries, e):
|
325
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
317
326
|
tries += 1
|
318
|
-
|
327
|
+
time.sleep(
|
328
|
+
self.parent.exponentialBackoff(tries, deadline))
|
319
329
|
continue
|
320
330
|
raise plumbing.convert_error_to_porcelain(e) from e
|
321
331
|
tries = 0
|
@@ -342,6 +352,7 @@ class AccountAttachments:
|
|
342
352
|
'''
|
343
353
|
Create registers a new AccountAttachment.
|
344
354
|
'''
|
355
|
+
deadline = None if timeout is None else time.time() + timeout
|
345
356
|
req = AccountAttachmentCreateRequest()
|
346
357
|
|
347
358
|
if account_attachment is not None:
|
@@ -351,16 +362,17 @@ class AccountAttachments:
|
|
351
362
|
tries = 0
|
352
363
|
plumbing_response = None
|
353
364
|
while True:
|
365
|
+
t = None if deadline is None else deadline - time.time()
|
354
366
|
try:
|
355
367
|
plumbing_response = self.stub.Create(
|
356
368
|
req,
|
357
369
|
metadata=self.parent.get_metadata(
|
358
370
|
'AccountAttachments.Create', req),
|
359
|
-
timeout=
|
371
|
+
timeout=t)
|
360
372
|
except Exception as e:
|
361
|
-
if self.parent.shouldRetry(tries, e):
|
373
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
362
374
|
tries += 1
|
363
|
-
self.parent.
|
375
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
364
376
|
continue
|
365
377
|
raise plumbing.convert_error_to_porcelain(e) from e
|
366
378
|
break
|
@@ -378,6 +390,7 @@ class AccountAttachments:
|
|
378
390
|
'''
|
379
391
|
Get reads one AccountAttachment by ID.
|
380
392
|
'''
|
393
|
+
deadline = None if timeout is None else time.time() + timeout
|
381
394
|
req = AccountAttachmentGetRequest()
|
382
395
|
if self.parent.snapshot_datetime is not None:
|
383
396
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -387,16 +400,17 @@ class AccountAttachments:
|
|
387
400
|
tries = 0
|
388
401
|
plumbing_response = None
|
389
402
|
while True:
|
403
|
+
t = None if deadline is None else deadline - time.time()
|
390
404
|
try:
|
391
405
|
plumbing_response = self.stub.Get(
|
392
406
|
req,
|
393
407
|
metadata=self.parent.get_metadata('AccountAttachments.Get',
|
394
408
|
req),
|
395
|
-
timeout=
|
409
|
+
timeout=t)
|
396
410
|
except Exception as e:
|
397
|
-
if self.parent.shouldRetry(tries, e):
|
411
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
398
412
|
tries += 1
|
399
|
-
self.parent.
|
413
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
400
414
|
continue
|
401
415
|
raise plumbing.convert_error_to_porcelain(e) from e
|
402
416
|
break
|
@@ -414,22 +428,24 @@ class AccountAttachments:
|
|
414
428
|
'''
|
415
429
|
Delete removes a AccountAttachment by ID.
|
416
430
|
'''
|
431
|
+
deadline = None if timeout is None else time.time() + timeout
|
417
432
|
req = AccountAttachmentDeleteRequest()
|
418
433
|
|
419
434
|
req.id = (id)
|
420
435
|
tries = 0
|
421
436
|
plumbing_response = None
|
422
437
|
while True:
|
438
|
+
t = None if deadline is None else deadline - time.time()
|
423
439
|
try:
|
424
440
|
plumbing_response = self.stub.Delete(
|
425
441
|
req,
|
426
442
|
metadata=self.parent.get_metadata(
|
427
443
|
'AccountAttachments.Delete', req),
|
428
|
-
timeout=
|
444
|
+
timeout=t)
|
429
445
|
except Exception as e:
|
430
|
-
if self.parent.shouldRetry(tries, e):
|
446
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
431
447
|
tries += 1
|
432
|
-
self.parent.
|
448
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
433
449
|
continue
|
434
450
|
raise plumbing.convert_error_to_porcelain(e) from e
|
435
451
|
break
|
@@ -445,6 +461,7 @@ class AccountAttachments:
|
|
445
461
|
'''
|
446
462
|
List gets a list of AccountAttachments matching a given set of criteria.
|
447
463
|
'''
|
464
|
+
deadline = None if timeout is None else time.time() + timeout
|
448
465
|
req = AccountAttachmentListRequest()
|
449
466
|
req.meta.CopyFrom(ListRequestMetadata())
|
450
467
|
if self.parent.page_limit > 0:
|
@@ -457,16 +474,18 @@ class AccountAttachments:
|
|
457
474
|
def generator(svc, req):
|
458
475
|
tries = 0
|
459
476
|
while True:
|
477
|
+
t = None if deadline is None else deadline - time.time()
|
460
478
|
try:
|
461
479
|
plumbing_response = svc.stub.List(
|
462
480
|
req,
|
463
481
|
metadata=svc.parent.get_metadata(
|
464
482
|
'AccountAttachments.List', req),
|
465
|
-
timeout=
|
483
|
+
timeout=t)
|
466
484
|
except Exception as e:
|
467
|
-
if self.parent.shouldRetry(tries, e):
|
485
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
468
486
|
tries += 1
|
469
|
-
|
487
|
+
time.sleep(
|
488
|
+
self.parent.exponentialBackoff(tries, deadline))
|
470
489
|
continue
|
471
490
|
raise plumbing.convert_error_to_porcelain(e) from e
|
472
491
|
tries = 0
|
@@ -514,6 +533,7 @@ class AccountAttachmentsHistory:
|
|
514
533
|
'''
|
515
534
|
List gets a list of AccountAttachmentHistory records matching a given set of criteria.
|
516
535
|
'''
|
536
|
+
deadline = None if timeout is None else time.time() + timeout
|
517
537
|
req = AccountAttachmentHistoryListRequest()
|
518
538
|
req.meta.CopyFrom(ListRequestMetadata())
|
519
539
|
if self.parent.page_limit > 0:
|
@@ -526,16 +546,18 @@ class AccountAttachmentsHistory:
|
|
526
546
|
def generator(svc, req):
|
527
547
|
tries = 0
|
528
548
|
while True:
|
549
|
+
t = None if deadline is None else deadline - time.time()
|
529
550
|
try:
|
530
551
|
plumbing_response = svc.stub.List(
|
531
552
|
req,
|
532
553
|
metadata=svc.parent.get_metadata(
|
533
554
|
'AccountAttachmentsHistory.List', req),
|
534
|
-
timeout=
|
555
|
+
timeout=t)
|
535
556
|
except Exception as e:
|
536
|
-
if self.parent.shouldRetry(tries, e):
|
557
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
537
558
|
tries += 1
|
538
|
-
|
559
|
+
time.sleep(
|
560
|
+
self.parent.exponentialBackoff(tries, deadline))
|
539
561
|
continue
|
540
562
|
raise plumbing.convert_error_to_porcelain(e) from e
|
541
563
|
tries = 0
|
@@ -562,6 +584,7 @@ class AccountGrants:
|
|
562
584
|
'''
|
563
585
|
Create registers a new AccountGrant.
|
564
586
|
'''
|
587
|
+
deadline = None if timeout is None else time.time() + timeout
|
565
588
|
req = AccountGrantCreateRequest()
|
566
589
|
|
567
590
|
if account_grant is not None:
|
@@ -570,16 +593,17 @@ class AccountGrants:
|
|
570
593
|
tries = 0
|
571
594
|
plumbing_response = None
|
572
595
|
while True:
|
596
|
+
t = None if deadline is None else deadline - time.time()
|
573
597
|
try:
|
574
598
|
plumbing_response = self.stub.Create(
|
575
599
|
req,
|
576
600
|
metadata=self.parent.get_metadata('AccountGrants.Create',
|
577
601
|
req),
|
578
|
-
timeout=
|
602
|
+
timeout=t)
|
579
603
|
except Exception as e:
|
580
|
-
if self.parent.shouldRetry(tries, e):
|
604
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
581
605
|
tries += 1
|
582
|
-
self.parent.
|
606
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
583
607
|
continue
|
584
608
|
raise plumbing.convert_error_to_porcelain(e) from e
|
585
609
|
break
|
@@ -597,6 +621,7 @@ class AccountGrants:
|
|
597
621
|
'''
|
598
622
|
Get reads one AccountGrant by ID.
|
599
623
|
'''
|
624
|
+
deadline = None if timeout is None else time.time() + timeout
|
600
625
|
req = AccountGrantGetRequest()
|
601
626
|
if self.parent.snapshot_datetime is not None:
|
602
627
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -606,16 +631,17 @@ class AccountGrants:
|
|
606
631
|
tries = 0
|
607
632
|
plumbing_response = None
|
608
633
|
while True:
|
634
|
+
t = None if deadline is None else deadline - time.time()
|
609
635
|
try:
|
610
636
|
plumbing_response = self.stub.Get(
|
611
637
|
req,
|
612
638
|
metadata=self.parent.get_metadata('AccountGrants.Get',
|
613
639
|
req),
|
614
|
-
timeout=
|
640
|
+
timeout=t)
|
615
641
|
except Exception as e:
|
616
|
-
if self.parent.shouldRetry(tries, e):
|
642
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
617
643
|
tries += 1
|
618
|
-
self.parent.
|
644
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
619
645
|
continue
|
620
646
|
raise plumbing.convert_error_to_porcelain(e) from e
|
621
647
|
break
|
@@ -633,22 +659,24 @@ class AccountGrants:
|
|
633
659
|
'''
|
634
660
|
Delete removes a AccountGrant by ID.
|
635
661
|
'''
|
662
|
+
deadline = None if timeout is None else time.time() + timeout
|
636
663
|
req = AccountGrantDeleteRequest()
|
637
664
|
|
638
665
|
req.id = (id)
|
639
666
|
tries = 0
|
640
667
|
plumbing_response = None
|
641
668
|
while True:
|
669
|
+
t = None if deadline is None else deadline - time.time()
|
642
670
|
try:
|
643
671
|
plumbing_response = self.stub.Delete(
|
644
672
|
req,
|
645
673
|
metadata=self.parent.get_metadata('AccountGrants.Delete',
|
646
674
|
req),
|
647
|
-
timeout=
|
675
|
+
timeout=t)
|
648
676
|
except Exception as e:
|
649
|
-
if self.parent.shouldRetry(tries, e):
|
677
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
650
678
|
tries += 1
|
651
|
-
self.parent.
|
679
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
652
680
|
continue
|
653
681
|
raise plumbing.convert_error_to_porcelain(e) from e
|
654
682
|
break
|
@@ -664,6 +692,7 @@ class AccountGrants:
|
|
664
692
|
'''
|
665
693
|
List gets a list of AccountGrants matching a given set of criteria.
|
666
694
|
'''
|
695
|
+
deadline = None if timeout is None else time.time() + timeout
|
667
696
|
req = AccountGrantListRequest()
|
668
697
|
req.meta.CopyFrom(ListRequestMetadata())
|
669
698
|
if self.parent.page_limit > 0:
|
@@ -676,16 +705,18 @@ class AccountGrants:
|
|
676
705
|
def generator(svc, req):
|
677
706
|
tries = 0
|
678
707
|
while True:
|
708
|
+
t = None if deadline is None else deadline - time.time()
|
679
709
|
try:
|
680
710
|
plumbing_response = svc.stub.List(
|
681
711
|
req,
|
682
712
|
metadata=svc.parent.get_metadata(
|
683
713
|
'AccountGrants.List', req),
|
684
|
-
timeout=
|
714
|
+
timeout=t)
|
685
715
|
except Exception as e:
|
686
|
-
if self.parent.shouldRetry(tries, e):
|
716
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
687
717
|
tries += 1
|
688
|
-
|
718
|
+
time.sleep(
|
719
|
+
self.parent.exponentialBackoff(tries, deadline))
|
689
720
|
continue
|
690
721
|
raise plumbing.convert_error_to_porcelain(e) from e
|
691
722
|
tries = 0
|
@@ -733,6 +764,7 @@ class AccountGrantsHistory:
|
|
733
764
|
'''
|
734
765
|
List gets a list of AccountGrantHistory records matching a given set of criteria.
|
735
766
|
'''
|
767
|
+
deadline = None if timeout is None else time.time() + timeout
|
736
768
|
req = AccountGrantHistoryListRequest()
|
737
769
|
req.meta.CopyFrom(ListRequestMetadata())
|
738
770
|
if self.parent.page_limit > 0:
|
@@ -745,16 +777,18 @@ class AccountGrantsHistory:
|
|
745
777
|
def generator(svc, req):
|
746
778
|
tries = 0
|
747
779
|
while True:
|
780
|
+
t = None if deadline is None else deadline - time.time()
|
748
781
|
try:
|
749
782
|
plumbing_response = svc.stub.List(
|
750
783
|
req,
|
751
784
|
metadata=svc.parent.get_metadata(
|
752
785
|
'AccountGrantsHistory.List', req),
|
753
|
-
timeout=
|
786
|
+
timeout=t)
|
754
787
|
except Exception as e:
|
755
|
-
if self.parent.shouldRetry(tries, e):
|
788
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
756
789
|
tries += 1
|
757
|
-
|
790
|
+
time.sleep(
|
791
|
+
self.parent.exponentialBackoff(tries, deadline))
|
758
792
|
continue
|
759
793
|
raise plumbing.convert_error_to_porcelain(e) from e
|
760
794
|
tries = 0
|
@@ -782,6 +816,7 @@ class AccountPermissions:
|
|
782
816
|
'''
|
783
817
|
List gets a list of Permission records matching a given set of criteria.
|
784
818
|
'''
|
819
|
+
deadline = None if timeout is None else time.time() + timeout
|
785
820
|
req = AccountPermissionListRequest()
|
786
821
|
req.meta.CopyFrom(ListRequestMetadata())
|
787
822
|
if self.parent.page_limit > 0:
|
@@ -794,16 +829,18 @@ class AccountPermissions:
|
|
794
829
|
def generator(svc, req):
|
795
830
|
tries = 0
|
796
831
|
while True:
|
832
|
+
t = None if deadline is None else deadline - time.time()
|
797
833
|
try:
|
798
834
|
plumbing_response = svc.stub.List(
|
799
835
|
req,
|
800
836
|
metadata=svc.parent.get_metadata(
|
801
837
|
'AccountPermissions.List', req),
|
802
|
-
timeout=
|
838
|
+
timeout=t)
|
803
839
|
except Exception as e:
|
804
|
-
if self.parent.shouldRetry(tries, e):
|
840
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
805
841
|
tries += 1
|
806
|
-
|
842
|
+
time.sleep(
|
843
|
+
self.parent.exponentialBackoff(tries, deadline))
|
807
844
|
continue
|
808
845
|
raise plumbing.convert_error_to_porcelain(e) from e
|
809
846
|
tries = 0
|
@@ -846,6 +883,7 @@ class AccountResources:
|
|
846
883
|
'''
|
847
884
|
List gets a list of AccountResource records matching a given set of criteria.
|
848
885
|
'''
|
886
|
+
deadline = None if timeout is None else time.time() + timeout
|
849
887
|
req = AccountResourceListRequest()
|
850
888
|
req.meta.CopyFrom(ListRequestMetadata())
|
851
889
|
if self.parent.page_limit > 0:
|
@@ -858,16 +896,18 @@ class AccountResources:
|
|
858
896
|
def generator(svc, req):
|
859
897
|
tries = 0
|
860
898
|
while True:
|
899
|
+
t = None if deadline is None else deadline - time.time()
|
861
900
|
try:
|
862
901
|
plumbing_response = svc.stub.List(
|
863
902
|
req,
|
864
903
|
metadata=svc.parent.get_metadata(
|
865
904
|
'AccountResources.List', req),
|
866
|
-
timeout=
|
905
|
+
timeout=t)
|
867
906
|
except Exception as e:
|
868
|
-
if self.parent.shouldRetry(tries, e):
|
907
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
869
908
|
tries += 1
|
870
|
-
|
909
|
+
time.sleep(
|
910
|
+
self.parent.exponentialBackoff(tries, deadline))
|
871
911
|
continue
|
872
912
|
raise plumbing.convert_error_to_porcelain(e) from e
|
873
913
|
tries = 0
|
@@ -909,6 +949,7 @@ class AccountResourcesHistory:
|
|
909
949
|
'''
|
910
950
|
List gets a list of AccountResourceHistory records matching a given set of criteria.
|
911
951
|
'''
|
952
|
+
deadline = None if timeout is None else time.time() + timeout
|
912
953
|
req = AccountResourceHistoryListRequest()
|
913
954
|
req.meta.CopyFrom(ListRequestMetadata())
|
914
955
|
if self.parent.page_limit > 0:
|
@@ -921,16 +962,18 @@ class AccountResourcesHistory:
|
|
921
962
|
def generator(svc, req):
|
922
963
|
tries = 0
|
923
964
|
while True:
|
965
|
+
t = None if deadline is None else deadline - time.time()
|
924
966
|
try:
|
925
967
|
plumbing_response = svc.stub.List(
|
926
968
|
req,
|
927
969
|
metadata=svc.parent.get_metadata(
|
928
970
|
'AccountResourcesHistory.List', req),
|
929
|
-
timeout=
|
971
|
+
timeout=t)
|
930
972
|
except Exception as e:
|
931
|
-
if self.parent.shouldRetry(tries, e):
|
973
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
932
974
|
tries += 1
|
933
|
-
|
975
|
+
time.sleep(
|
976
|
+
self.parent.exponentialBackoff(tries, deadline))
|
934
977
|
continue
|
935
978
|
raise plumbing.convert_error_to_porcelain(e) from e
|
936
979
|
tries = 0
|
@@ -963,6 +1006,7 @@ class Accounts:
|
|
963
1006
|
'''
|
964
1007
|
Create registers a new Account.
|
965
1008
|
'''
|
1009
|
+
deadline = None if timeout is None else time.time() + timeout
|
966
1010
|
req = AccountCreateRequest()
|
967
1011
|
|
968
1012
|
if account is not None:
|
@@ -970,15 +1014,16 @@ class Accounts:
|
|
970
1014
|
tries = 0
|
971
1015
|
plumbing_response = None
|
972
1016
|
while True:
|
1017
|
+
t = None if deadline is None else deadline - time.time()
|
973
1018
|
try:
|
974
1019
|
plumbing_response = self.stub.Create(
|
975
1020
|
req,
|
976
1021
|
metadata=self.parent.get_metadata('Accounts.Create', req),
|
977
|
-
timeout=
|
1022
|
+
timeout=t)
|
978
1023
|
except Exception as e:
|
979
|
-
if self.parent.shouldRetry(tries, e):
|
1024
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
980
1025
|
tries += 1
|
981
|
-
self.parent.
|
1026
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
982
1027
|
continue
|
983
1028
|
raise plumbing.convert_error_to_porcelain(e) from e
|
984
1029
|
break
|
@@ -999,6 +1044,7 @@ class Accounts:
|
|
999
1044
|
'''
|
1000
1045
|
Get reads one Account by ID.
|
1001
1046
|
'''
|
1047
|
+
deadline = None if timeout is None else time.time() + timeout
|
1002
1048
|
req = AccountGetRequest()
|
1003
1049
|
if self.parent.snapshot_datetime is not None:
|
1004
1050
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -1008,15 +1054,16 @@ class Accounts:
|
|
1008
1054
|
tries = 0
|
1009
1055
|
plumbing_response = None
|
1010
1056
|
while True:
|
1057
|
+
t = None if deadline is None else deadline - time.time()
|
1011
1058
|
try:
|
1012
1059
|
plumbing_response = self.stub.Get(
|
1013
1060
|
req,
|
1014
1061
|
metadata=self.parent.get_metadata('Accounts.Get', req),
|
1015
|
-
timeout=
|
1062
|
+
timeout=t)
|
1016
1063
|
except Exception as e:
|
1017
|
-
if self.parent.shouldRetry(tries, e):
|
1064
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1018
1065
|
tries += 1
|
1019
|
-
self.parent.
|
1066
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1020
1067
|
continue
|
1021
1068
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1022
1069
|
break
|
@@ -1034,6 +1081,7 @@ class Accounts:
|
|
1034
1081
|
'''
|
1035
1082
|
Update replaces all the fields of an Account by ID.
|
1036
1083
|
'''
|
1084
|
+
deadline = None if timeout is None else time.time() + timeout
|
1037
1085
|
req = AccountUpdateRequest()
|
1038
1086
|
|
1039
1087
|
if account is not None:
|
@@ -1041,15 +1089,16 @@ class Accounts:
|
|
1041
1089
|
tries = 0
|
1042
1090
|
plumbing_response = None
|
1043
1091
|
while True:
|
1092
|
+
t = None if deadline is None else deadline - time.time()
|
1044
1093
|
try:
|
1045
1094
|
plumbing_response = self.stub.Update(
|
1046
1095
|
req,
|
1047
1096
|
metadata=self.parent.get_metadata('Accounts.Update', req),
|
1048
|
-
timeout=
|
1097
|
+
timeout=t)
|
1049
1098
|
except Exception as e:
|
1050
|
-
if self.parent.shouldRetry(tries, e):
|
1099
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1051
1100
|
tries += 1
|
1052
|
-
self.parent.
|
1101
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1053
1102
|
continue
|
1054
1103
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1055
1104
|
break
|
@@ -1067,21 +1116,23 @@ class Accounts:
|
|
1067
1116
|
'''
|
1068
1117
|
Delete removes an Account by ID.
|
1069
1118
|
'''
|
1119
|
+
deadline = None if timeout is None else time.time() + timeout
|
1070
1120
|
req = AccountDeleteRequest()
|
1071
1121
|
|
1072
1122
|
req.id = (id)
|
1073
1123
|
tries = 0
|
1074
1124
|
plumbing_response = None
|
1075
1125
|
while True:
|
1126
|
+
t = None if deadline is None else deadline - time.time()
|
1076
1127
|
try:
|
1077
1128
|
plumbing_response = self.stub.Delete(
|
1078
1129
|
req,
|
1079
1130
|
metadata=self.parent.get_metadata('Accounts.Delete', req),
|
1080
|
-
timeout=
|
1131
|
+
timeout=t)
|
1081
1132
|
except Exception as e:
|
1082
|
-
if self.parent.shouldRetry(tries, e):
|
1133
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1083
1134
|
tries += 1
|
1084
|
-
self.parent.
|
1135
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1085
1136
|
continue
|
1086
1137
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1087
1138
|
break
|
@@ -1097,6 +1148,7 @@ class Accounts:
|
|
1097
1148
|
'''
|
1098
1149
|
List gets a list of Accounts matching a given set of criteria.
|
1099
1150
|
'''
|
1151
|
+
deadline = None if timeout is None else time.time() + timeout
|
1100
1152
|
req = AccountListRequest()
|
1101
1153
|
req.meta.CopyFrom(ListRequestMetadata())
|
1102
1154
|
if self.parent.page_limit > 0:
|
@@ -1109,15 +1161,17 @@ class Accounts:
|
|
1109
1161
|
def generator(svc, req):
|
1110
1162
|
tries = 0
|
1111
1163
|
while True:
|
1164
|
+
t = None if deadline is None else deadline - time.time()
|
1112
1165
|
try:
|
1113
1166
|
plumbing_response = svc.stub.List(
|
1114
1167
|
req,
|
1115
1168
|
metadata=svc.parent.get_metadata('Accounts.List', req),
|
1116
|
-
timeout=
|
1169
|
+
timeout=t)
|
1117
1170
|
except Exception as e:
|
1118
|
-
if self.parent.shouldRetry(tries, e):
|
1171
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1119
1172
|
tries += 1
|
1120
|
-
|
1173
|
+
time.sleep(
|
1174
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1121
1175
|
continue
|
1122
1176
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1123
1177
|
tries = 0
|
@@ -1164,6 +1218,7 @@ class AccountsHistory:
|
|
1164
1218
|
'''
|
1165
1219
|
List gets a list of AccountHistory records matching a given set of criteria.
|
1166
1220
|
'''
|
1221
|
+
deadline = None if timeout is None else time.time() + timeout
|
1167
1222
|
req = AccountHistoryListRequest()
|
1168
1223
|
req.meta.CopyFrom(ListRequestMetadata())
|
1169
1224
|
if self.parent.page_limit > 0:
|
@@ -1176,16 +1231,18 @@ class AccountsHistory:
|
|
1176
1231
|
def generator(svc, req):
|
1177
1232
|
tries = 0
|
1178
1233
|
while True:
|
1234
|
+
t = None if deadline is None else deadline - time.time()
|
1179
1235
|
try:
|
1180
1236
|
plumbing_response = svc.stub.List(
|
1181
1237
|
req,
|
1182
1238
|
metadata=svc.parent.get_metadata(
|
1183
1239
|
'AccountsHistory.List', req),
|
1184
|
-
timeout=
|
1240
|
+
timeout=t)
|
1185
1241
|
except Exception as e:
|
1186
|
-
if self.parent.shouldRetry(tries, e):
|
1242
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1187
1243
|
tries += 1
|
1188
|
-
|
1244
|
+
time.sleep(
|
1245
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1189
1246
|
continue
|
1190
1247
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1191
1248
|
tries = 0
|
@@ -1214,6 +1271,7 @@ class Activities:
|
|
1214
1271
|
'''
|
1215
1272
|
Get reads one Activity by ID.
|
1216
1273
|
'''
|
1274
|
+
deadline = None if timeout is None else time.time() + timeout
|
1217
1275
|
req = ActivityGetRequest()
|
1218
1276
|
if self.parent.snapshot_datetime is not None:
|
1219
1277
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -1223,15 +1281,16 @@ class Activities:
|
|
1223
1281
|
tries = 0
|
1224
1282
|
plumbing_response = None
|
1225
1283
|
while True:
|
1284
|
+
t = None if deadline is None else deadline - time.time()
|
1226
1285
|
try:
|
1227
1286
|
plumbing_response = self.stub.Get(
|
1228
1287
|
req,
|
1229
1288
|
metadata=self.parent.get_metadata('Activities.Get', req),
|
1230
|
-
timeout=
|
1289
|
+
timeout=t)
|
1231
1290
|
except Exception as e:
|
1232
|
-
if self.parent.shouldRetry(tries, e):
|
1291
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1233
1292
|
tries += 1
|
1234
|
-
self.parent.
|
1293
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1235
1294
|
continue
|
1236
1295
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1237
1296
|
break
|
@@ -1252,6 +1311,7 @@ class Activities:
|
|
1252
1311
|
range of the output activities. If not provided, one week of back
|
1253
1312
|
of activities will be returned.
|
1254
1313
|
'''
|
1314
|
+
deadline = None if timeout is None else time.time() + timeout
|
1255
1315
|
req = ActivityListRequest()
|
1256
1316
|
req.meta.CopyFrom(ListRequestMetadata())
|
1257
1317
|
if self.parent.page_limit > 0:
|
@@ -1264,16 +1324,18 @@ class Activities:
|
|
1264
1324
|
def generator(svc, req):
|
1265
1325
|
tries = 0
|
1266
1326
|
while True:
|
1327
|
+
t = None if deadline is None else deadline - time.time()
|
1267
1328
|
try:
|
1268
1329
|
plumbing_response = svc.stub.List(
|
1269
1330
|
req,
|
1270
1331
|
metadata=svc.parent.get_metadata(
|
1271
1332
|
'Activities.List', req),
|
1272
|
-
timeout=
|
1333
|
+
timeout=t)
|
1273
1334
|
except Exception as e:
|
1274
|
-
if self.parent.shouldRetry(tries, e):
|
1335
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1275
1336
|
tries += 1
|
1276
|
-
|
1337
|
+
time.sleep(
|
1338
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1277
1339
|
continue
|
1278
1340
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1279
1341
|
tries = 0
|
@@ -1299,6 +1361,7 @@ class ApprovalWorkflowApprovers:
|
|
1299
1361
|
'''
|
1300
1362
|
Deprecated: Create creates a new approval workflow approver.
|
1301
1363
|
'''
|
1364
|
+
deadline = None if timeout is None else time.time() + timeout
|
1302
1365
|
req = ApprovalWorkflowApproverCreateRequest()
|
1303
1366
|
|
1304
1367
|
if approval_workflow_approver is not None:
|
@@ -1308,16 +1371,17 @@ class ApprovalWorkflowApprovers:
|
|
1308
1371
|
tries = 0
|
1309
1372
|
plumbing_response = None
|
1310
1373
|
while True:
|
1374
|
+
t = None if deadline is None else deadline - time.time()
|
1311
1375
|
try:
|
1312
1376
|
plumbing_response = self.stub.Create(
|
1313
1377
|
req,
|
1314
1378
|
metadata=self.parent.get_metadata(
|
1315
1379
|
'ApprovalWorkflowApprovers.Create', req),
|
1316
|
-
timeout=
|
1380
|
+
timeout=t)
|
1317
1381
|
except Exception as e:
|
1318
|
-
if self.parent.shouldRetry(tries, e):
|
1382
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1319
1383
|
tries += 1
|
1320
|
-
self.parent.
|
1384
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1321
1385
|
continue
|
1322
1386
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1323
1387
|
break
|
@@ -1333,6 +1397,7 @@ class ApprovalWorkflowApprovers:
|
|
1333
1397
|
'''
|
1334
1398
|
Deprecated: Get reads one approval workflow approver by ID.
|
1335
1399
|
'''
|
1400
|
+
deadline = None if timeout is None else time.time() + timeout
|
1336
1401
|
req = ApprovalWorkflowApproverGetRequest()
|
1337
1402
|
if self.parent.snapshot_datetime is not None:
|
1338
1403
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -1342,16 +1407,17 @@ class ApprovalWorkflowApprovers:
|
|
1342
1407
|
tries = 0
|
1343
1408
|
plumbing_response = None
|
1344
1409
|
while True:
|
1410
|
+
t = None if deadline is None else deadline - time.time()
|
1345
1411
|
try:
|
1346
1412
|
plumbing_response = self.stub.Get(
|
1347
1413
|
req,
|
1348
1414
|
metadata=self.parent.get_metadata(
|
1349
1415
|
'ApprovalWorkflowApprovers.Get', req),
|
1350
|
-
timeout=
|
1416
|
+
timeout=t)
|
1351
1417
|
except Exception as e:
|
1352
|
-
if self.parent.shouldRetry(tries, e):
|
1418
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1353
1419
|
tries += 1
|
1354
|
-
self.parent.
|
1420
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1355
1421
|
continue
|
1356
1422
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1357
1423
|
break
|
@@ -1369,22 +1435,24 @@ class ApprovalWorkflowApprovers:
|
|
1369
1435
|
'''
|
1370
1436
|
Deprecated: Delete deletes an existing approval workflow approver.
|
1371
1437
|
'''
|
1438
|
+
deadline = None if timeout is None else time.time() + timeout
|
1372
1439
|
req = ApprovalWorkflowApproverDeleteRequest()
|
1373
1440
|
|
1374
1441
|
req.id = (id)
|
1375
1442
|
tries = 0
|
1376
1443
|
plumbing_response = None
|
1377
1444
|
while True:
|
1445
|
+
t = None if deadline is None else deadline - time.time()
|
1378
1446
|
try:
|
1379
1447
|
plumbing_response = self.stub.Delete(
|
1380
1448
|
req,
|
1381
1449
|
metadata=self.parent.get_metadata(
|
1382
1450
|
'ApprovalWorkflowApprovers.Delete', req),
|
1383
|
-
timeout=
|
1451
|
+
timeout=t)
|
1384
1452
|
except Exception as e:
|
1385
|
-
if self.parent.shouldRetry(tries, e):
|
1453
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1386
1454
|
tries += 1
|
1387
|
-
self.parent.
|
1455
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1388
1456
|
continue
|
1389
1457
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1390
1458
|
break
|
@@ -1399,6 +1467,7 @@ class ApprovalWorkflowApprovers:
|
|
1399
1467
|
'''
|
1400
1468
|
Deprecated: Lists existing approval workflow approvers.
|
1401
1469
|
'''
|
1470
|
+
deadline = None if timeout is None else time.time() + timeout
|
1402
1471
|
req = ApprovalWorkflowApproverListRequest()
|
1403
1472
|
req.meta.CopyFrom(ListRequestMetadata())
|
1404
1473
|
if self.parent.page_limit > 0:
|
@@ -1411,16 +1480,18 @@ class ApprovalWorkflowApprovers:
|
|
1411
1480
|
def generator(svc, req):
|
1412
1481
|
tries = 0
|
1413
1482
|
while True:
|
1483
|
+
t = None if deadline is None else deadline - time.time()
|
1414
1484
|
try:
|
1415
1485
|
plumbing_response = svc.stub.List(
|
1416
1486
|
req,
|
1417
1487
|
metadata=svc.parent.get_metadata(
|
1418
1488
|
'ApprovalWorkflowApprovers.List', req),
|
1419
|
-
timeout=
|
1489
|
+
timeout=t)
|
1420
1490
|
except Exception as e:
|
1421
|
-
if self.parent.shouldRetry(tries, e):
|
1491
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1422
1492
|
tries += 1
|
1423
|
-
|
1493
|
+
time.sleep(
|
1494
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1424
1495
|
continue
|
1425
1496
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1426
1497
|
tries = 0
|
@@ -1470,6 +1541,7 @@ class ApprovalWorkflowApproversHistory:
|
|
1470
1541
|
'''
|
1471
1542
|
List gets a list of ApprovalWorkflowApproverHistory records matching a given set of criteria.
|
1472
1543
|
'''
|
1544
|
+
deadline = None if timeout is None else time.time() + timeout
|
1473
1545
|
req = ApprovalWorkflowApproverHistoryListRequest()
|
1474
1546
|
req.meta.CopyFrom(ListRequestMetadata())
|
1475
1547
|
if self.parent.page_limit > 0:
|
@@ -1482,16 +1554,18 @@ class ApprovalWorkflowApproversHistory:
|
|
1482
1554
|
def generator(svc, req):
|
1483
1555
|
tries = 0
|
1484
1556
|
while True:
|
1557
|
+
t = None if deadline is None else deadline - time.time()
|
1485
1558
|
try:
|
1486
1559
|
plumbing_response = svc.stub.List(
|
1487
1560
|
req,
|
1488
1561
|
metadata=svc.parent.get_metadata(
|
1489
1562
|
'ApprovalWorkflowApproversHistory.List', req),
|
1490
|
-
timeout=
|
1563
|
+
timeout=t)
|
1491
1564
|
except Exception as e:
|
1492
|
-
if self.parent.shouldRetry(tries, e):
|
1565
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1493
1566
|
tries += 1
|
1494
|
-
|
1567
|
+
time.sleep(
|
1568
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1495
1569
|
continue
|
1496
1570
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1497
1571
|
tries = 0
|
@@ -1518,6 +1592,7 @@ class ApprovalWorkflowSteps:
|
|
1518
1592
|
'''
|
1519
1593
|
Deprecated: Create creates a new approval workflow step.
|
1520
1594
|
'''
|
1595
|
+
deadline = None if timeout is None else time.time() + timeout
|
1521
1596
|
req = ApprovalWorkflowStepCreateRequest()
|
1522
1597
|
|
1523
1598
|
if approval_workflow_step is not None:
|
@@ -1527,16 +1602,17 @@ class ApprovalWorkflowSteps:
|
|
1527
1602
|
tries = 0
|
1528
1603
|
plumbing_response = None
|
1529
1604
|
while True:
|
1605
|
+
t = None if deadline is None else deadline - time.time()
|
1530
1606
|
try:
|
1531
1607
|
plumbing_response = self.stub.Create(
|
1532
1608
|
req,
|
1533
1609
|
metadata=self.parent.get_metadata(
|
1534
1610
|
'ApprovalWorkflowSteps.Create', req),
|
1535
|
-
timeout=
|
1611
|
+
timeout=t)
|
1536
1612
|
except Exception as e:
|
1537
|
-
if self.parent.shouldRetry(tries, e):
|
1613
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1538
1614
|
tries += 1
|
1539
|
-
self.parent.
|
1615
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1540
1616
|
continue
|
1541
1617
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1542
1618
|
break
|
@@ -1552,6 +1628,7 @@ class ApprovalWorkflowSteps:
|
|
1552
1628
|
'''
|
1553
1629
|
Deprecated: Get reads one approval workflow step by ID.
|
1554
1630
|
'''
|
1631
|
+
deadline = None if timeout is None else time.time() + timeout
|
1555
1632
|
req = ApprovalWorkflowStepGetRequest()
|
1556
1633
|
if self.parent.snapshot_datetime is not None:
|
1557
1634
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -1561,16 +1638,17 @@ class ApprovalWorkflowSteps:
|
|
1561
1638
|
tries = 0
|
1562
1639
|
plumbing_response = None
|
1563
1640
|
while True:
|
1641
|
+
t = None if deadline is None else deadline - time.time()
|
1564
1642
|
try:
|
1565
1643
|
plumbing_response = self.stub.Get(
|
1566
1644
|
req,
|
1567
1645
|
metadata=self.parent.get_metadata(
|
1568
1646
|
'ApprovalWorkflowSteps.Get', req),
|
1569
|
-
timeout=
|
1647
|
+
timeout=t)
|
1570
1648
|
except Exception as e:
|
1571
|
-
if self.parent.shouldRetry(tries, e):
|
1649
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1572
1650
|
tries += 1
|
1573
|
-
self.parent.
|
1651
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1574
1652
|
continue
|
1575
1653
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1576
1654
|
break
|
@@ -1588,22 +1666,24 @@ class ApprovalWorkflowSteps:
|
|
1588
1666
|
'''
|
1589
1667
|
Deprecated: Delete deletes an existing approval workflow step.
|
1590
1668
|
'''
|
1669
|
+
deadline = None if timeout is None else time.time() + timeout
|
1591
1670
|
req = ApprovalWorkflowStepDeleteRequest()
|
1592
1671
|
|
1593
1672
|
req.id = (id)
|
1594
1673
|
tries = 0
|
1595
1674
|
plumbing_response = None
|
1596
1675
|
while True:
|
1676
|
+
t = None if deadline is None else deadline - time.time()
|
1597
1677
|
try:
|
1598
1678
|
plumbing_response = self.stub.Delete(
|
1599
1679
|
req,
|
1600
1680
|
metadata=self.parent.get_metadata(
|
1601
1681
|
'ApprovalWorkflowSteps.Delete', req),
|
1602
|
-
timeout=
|
1682
|
+
timeout=t)
|
1603
1683
|
except Exception as e:
|
1604
|
-
if self.parent.shouldRetry(tries, e):
|
1684
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1605
1685
|
tries += 1
|
1606
|
-
self.parent.
|
1686
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1607
1687
|
continue
|
1608
1688
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1609
1689
|
break
|
@@ -1618,6 +1698,7 @@ class ApprovalWorkflowSteps:
|
|
1618
1698
|
'''
|
1619
1699
|
Deprecated: Lists existing approval workflow steps.
|
1620
1700
|
'''
|
1701
|
+
deadline = None if timeout is None else time.time() + timeout
|
1621
1702
|
req = ApprovalWorkflowStepListRequest()
|
1622
1703
|
req.meta.CopyFrom(ListRequestMetadata())
|
1623
1704
|
if self.parent.page_limit > 0:
|
@@ -1630,16 +1711,18 @@ class ApprovalWorkflowSteps:
|
|
1630
1711
|
def generator(svc, req):
|
1631
1712
|
tries = 0
|
1632
1713
|
while True:
|
1714
|
+
t = None if deadline is None else deadline - time.time()
|
1633
1715
|
try:
|
1634
1716
|
plumbing_response = svc.stub.List(
|
1635
1717
|
req,
|
1636
1718
|
metadata=svc.parent.get_metadata(
|
1637
1719
|
'ApprovalWorkflowSteps.List', req),
|
1638
|
-
timeout=
|
1720
|
+
timeout=t)
|
1639
1721
|
except Exception as e:
|
1640
|
-
if self.parent.shouldRetry(tries, e):
|
1722
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1641
1723
|
tries += 1
|
1642
|
-
|
1724
|
+
time.sleep(
|
1725
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1643
1726
|
continue
|
1644
1727
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1645
1728
|
tries = 0
|
@@ -1689,6 +1772,7 @@ class ApprovalWorkflowStepsHistory:
|
|
1689
1772
|
'''
|
1690
1773
|
List gets a list of ApprovalWorkflowStepHistory records matching a given set of criteria.
|
1691
1774
|
'''
|
1775
|
+
deadline = None if timeout is None else time.time() + timeout
|
1692
1776
|
req = ApprovalWorkflowStepHistoryListRequest()
|
1693
1777
|
req.meta.CopyFrom(ListRequestMetadata())
|
1694
1778
|
if self.parent.page_limit > 0:
|
@@ -1701,16 +1785,18 @@ class ApprovalWorkflowStepsHistory:
|
|
1701
1785
|
def generator(svc, req):
|
1702
1786
|
tries = 0
|
1703
1787
|
while True:
|
1788
|
+
t = None if deadline is None else deadline - time.time()
|
1704
1789
|
try:
|
1705
1790
|
plumbing_response = svc.stub.List(
|
1706
1791
|
req,
|
1707
1792
|
metadata=svc.parent.get_metadata(
|
1708
1793
|
'ApprovalWorkflowStepsHistory.List', req),
|
1709
|
-
timeout=
|
1794
|
+
timeout=t)
|
1710
1795
|
except Exception as e:
|
1711
|
-
if self.parent.shouldRetry(tries, e):
|
1796
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1712
1797
|
tries += 1
|
1713
|
-
|
1798
|
+
time.sleep(
|
1799
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1714
1800
|
continue
|
1715
1801
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1716
1802
|
tries = 0
|
@@ -1738,6 +1824,7 @@ class ApprovalWorkflows:
|
|
1738
1824
|
'''
|
1739
1825
|
Create creates a new approval workflow and requires a name and approval mode for the approval workflow.
|
1740
1826
|
'''
|
1827
|
+
deadline = None if timeout is None else time.time() + timeout
|
1741
1828
|
req = ApprovalWorkflowCreateRequest()
|
1742
1829
|
|
1743
1830
|
if approval_workflow is not None:
|
@@ -1747,16 +1834,17 @@ class ApprovalWorkflows:
|
|
1747
1834
|
tries = 0
|
1748
1835
|
plumbing_response = None
|
1749
1836
|
while True:
|
1837
|
+
t = None if deadline is None else deadline - time.time()
|
1750
1838
|
try:
|
1751
1839
|
plumbing_response = self.stub.Create(
|
1752
1840
|
req,
|
1753
1841
|
metadata=self.parent.get_metadata(
|
1754
1842
|
'ApprovalWorkflows.Create', req),
|
1755
|
-
timeout=
|
1843
|
+
timeout=t)
|
1756
1844
|
except Exception as e:
|
1757
|
-
if self.parent.shouldRetry(tries, e):
|
1845
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1758
1846
|
tries += 1
|
1759
|
-
self.parent.
|
1847
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1760
1848
|
continue
|
1761
1849
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1762
1850
|
break
|
@@ -1772,6 +1860,7 @@ class ApprovalWorkflows:
|
|
1772
1860
|
'''
|
1773
1861
|
Get reads one approval workflow by ID.
|
1774
1862
|
'''
|
1863
|
+
deadline = None if timeout is None else time.time() + timeout
|
1775
1864
|
req = ApprovalWorkflowGetRequest()
|
1776
1865
|
if self.parent.snapshot_datetime is not None:
|
1777
1866
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -1781,16 +1870,17 @@ class ApprovalWorkflows:
|
|
1781
1870
|
tries = 0
|
1782
1871
|
plumbing_response = None
|
1783
1872
|
while True:
|
1873
|
+
t = None if deadline is None else deadline - time.time()
|
1784
1874
|
try:
|
1785
1875
|
plumbing_response = self.stub.Get(
|
1786
1876
|
req,
|
1787
1877
|
metadata=self.parent.get_metadata('ApprovalWorkflows.Get',
|
1788
1878
|
req),
|
1789
|
-
timeout=
|
1879
|
+
timeout=t)
|
1790
1880
|
except Exception as e:
|
1791
|
-
if self.parent.shouldRetry(tries, e):
|
1881
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1792
1882
|
tries += 1
|
1793
|
-
self.parent.
|
1883
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1794
1884
|
continue
|
1795
1885
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1796
1886
|
break
|
@@ -1808,22 +1898,24 @@ class ApprovalWorkflows:
|
|
1808
1898
|
'''
|
1809
1899
|
Delete deletes an existing approval workflow.
|
1810
1900
|
'''
|
1901
|
+
deadline = None if timeout is None else time.time() + timeout
|
1811
1902
|
req = ApprovalWorkflowDeleteRequest()
|
1812
1903
|
|
1813
1904
|
req.id = (id)
|
1814
1905
|
tries = 0
|
1815
1906
|
plumbing_response = None
|
1816
1907
|
while True:
|
1908
|
+
t = None if deadline is None else deadline - time.time()
|
1817
1909
|
try:
|
1818
1910
|
plumbing_response = self.stub.Delete(
|
1819
1911
|
req,
|
1820
1912
|
metadata=self.parent.get_metadata(
|
1821
1913
|
'ApprovalWorkflows.Delete', req),
|
1822
|
-
timeout=
|
1914
|
+
timeout=t)
|
1823
1915
|
except Exception as e:
|
1824
|
-
if self.parent.shouldRetry(tries, e):
|
1916
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1825
1917
|
tries += 1
|
1826
|
-
self.parent.
|
1918
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1827
1919
|
continue
|
1828
1920
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1829
1921
|
break
|
@@ -1838,6 +1930,7 @@ class ApprovalWorkflows:
|
|
1838
1930
|
'''
|
1839
1931
|
Update updates an existing approval workflow.
|
1840
1932
|
'''
|
1933
|
+
deadline = None if timeout is None else time.time() + timeout
|
1841
1934
|
req = ApprovalWorkflowUpdateRequest()
|
1842
1935
|
|
1843
1936
|
if approval_workflow is not None:
|
@@ -1847,16 +1940,17 @@ class ApprovalWorkflows:
|
|
1847
1940
|
tries = 0
|
1848
1941
|
plumbing_response = None
|
1849
1942
|
while True:
|
1943
|
+
t = None if deadline is None else deadline - time.time()
|
1850
1944
|
try:
|
1851
1945
|
plumbing_response = self.stub.Update(
|
1852
1946
|
req,
|
1853
1947
|
metadata=self.parent.get_metadata(
|
1854
1948
|
'ApprovalWorkflows.Update', req),
|
1855
|
-
timeout=
|
1949
|
+
timeout=t)
|
1856
1950
|
except Exception as e:
|
1857
|
-
if self.parent.shouldRetry(tries, e):
|
1951
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1858
1952
|
tries += 1
|
1859
|
-
self.parent.
|
1953
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
1860
1954
|
continue
|
1861
1955
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1862
1956
|
break
|
@@ -1872,6 +1966,7 @@ class ApprovalWorkflows:
|
|
1872
1966
|
'''
|
1873
1967
|
Lists existing approval workflows.
|
1874
1968
|
'''
|
1969
|
+
deadline = None if timeout is None else time.time() + timeout
|
1875
1970
|
req = ApprovalWorkflowListRequest()
|
1876
1971
|
req.meta.CopyFrom(ListRequestMetadata())
|
1877
1972
|
if self.parent.page_limit > 0:
|
@@ -1884,16 +1979,18 @@ class ApprovalWorkflows:
|
|
1884
1979
|
def generator(svc, req):
|
1885
1980
|
tries = 0
|
1886
1981
|
while True:
|
1982
|
+
t = None if deadline is None else deadline - time.time()
|
1887
1983
|
try:
|
1888
1984
|
plumbing_response = svc.stub.List(
|
1889
1985
|
req,
|
1890
1986
|
metadata=svc.parent.get_metadata(
|
1891
1987
|
'ApprovalWorkflows.List', req),
|
1892
|
-
timeout=
|
1988
|
+
timeout=t)
|
1893
1989
|
except Exception as e:
|
1894
|
-
if self.parent.shouldRetry(tries, e):
|
1990
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1895
1991
|
tries += 1
|
1896
|
-
|
1992
|
+
time.sleep(
|
1993
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1897
1994
|
continue
|
1898
1995
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1899
1996
|
tries = 0
|
@@ -1941,6 +2038,7 @@ class ApprovalWorkflowsHistory:
|
|
1941
2038
|
'''
|
1942
2039
|
List gets a list of ApprovalWorkflowHistory records matching a given set of criteria.
|
1943
2040
|
'''
|
2041
|
+
deadline = None if timeout is None else time.time() + timeout
|
1944
2042
|
req = ApprovalWorkflowHistoryListRequest()
|
1945
2043
|
req.meta.CopyFrom(ListRequestMetadata())
|
1946
2044
|
if self.parent.page_limit > 0:
|
@@ -1953,16 +2051,18 @@ class ApprovalWorkflowsHistory:
|
|
1953
2051
|
def generator(svc, req):
|
1954
2052
|
tries = 0
|
1955
2053
|
while True:
|
2054
|
+
t = None if deadline is None else deadline - time.time()
|
1956
2055
|
try:
|
1957
2056
|
plumbing_response = svc.stub.List(
|
1958
2057
|
req,
|
1959
2058
|
metadata=svc.parent.get_metadata(
|
1960
2059
|
'ApprovalWorkflowsHistory.List', req),
|
1961
|
-
timeout=
|
2060
|
+
timeout=t)
|
1962
2061
|
except Exception as e:
|
1963
|
-
if self.parent.shouldRetry(tries, e):
|
2062
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
1964
2063
|
tries += 1
|
1965
|
-
|
2064
|
+
time.sleep(
|
2065
|
+
self.parent.exponentialBackoff(tries, deadline))
|
1966
2066
|
continue
|
1967
2067
|
raise plumbing.convert_error_to_porcelain(e) from e
|
1968
2068
|
tries = 0
|
@@ -1988,21 +2088,23 @@ class ControlPanel:
|
|
1988
2088
|
'''
|
1989
2089
|
GetSSHCAPublicKey retrieves the SSH CA public key.
|
1990
2090
|
'''
|
2091
|
+
deadline = None if timeout is None else time.time() + timeout
|
1991
2092
|
req = ControlPanelGetSSHCAPublicKeyRequest()
|
1992
2093
|
|
1993
2094
|
tries = 0
|
1994
2095
|
plumbing_response = None
|
1995
2096
|
while True:
|
2097
|
+
t = None if deadline is None else deadline - time.time()
|
1996
2098
|
try:
|
1997
2099
|
plumbing_response = self.stub.GetSSHCAPublicKey(
|
1998
2100
|
req,
|
1999
2101
|
metadata=self.parent.get_metadata(
|
2000
2102
|
'ControlPanel.GetSSHCAPublicKey', req),
|
2001
|
-
timeout=
|
2103
|
+
timeout=t)
|
2002
2104
|
except Exception as e:
|
2003
|
-
if self.parent.shouldRetry(tries, e):
|
2105
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2004
2106
|
tries += 1
|
2005
|
-
self.parent.
|
2107
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2006
2108
|
continue
|
2007
2109
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2008
2110
|
break
|
@@ -2019,21 +2121,23 @@ class ControlPanel:
|
|
2019
2121
|
'''
|
2020
2122
|
GetRDPCAPublicKey retrieves the RDP CA public key.
|
2021
2123
|
'''
|
2124
|
+
deadline = None if timeout is None else time.time() + timeout
|
2022
2125
|
req = ControlPanelGetRDPCAPublicKeyRequest()
|
2023
2126
|
|
2024
2127
|
tries = 0
|
2025
2128
|
plumbing_response = None
|
2026
2129
|
while True:
|
2130
|
+
t = None if deadline is None else deadline - time.time()
|
2027
2131
|
try:
|
2028
2132
|
plumbing_response = self.stub.GetRDPCAPublicKey(
|
2029
2133
|
req,
|
2030
2134
|
metadata=self.parent.get_metadata(
|
2031
2135
|
'ControlPanel.GetRDPCAPublicKey', req),
|
2032
|
-
timeout=
|
2136
|
+
timeout=t)
|
2033
2137
|
except Exception as e:
|
2034
|
-
if self.parent.shouldRetry(tries, e):
|
2138
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2035
2139
|
tries += 1
|
2036
|
-
self.parent.
|
2140
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2037
2141
|
continue
|
2038
2142
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2039
2143
|
break
|
@@ -2050,22 +2154,24 @@ class ControlPanel:
|
|
2050
2154
|
'''
|
2051
2155
|
VerifyJWT reports whether the given JWT token (x-sdm-token) is valid.
|
2052
2156
|
'''
|
2157
|
+
deadline = None if timeout is None else time.time() + timeout
|
2053
2158
|
req = ControlPanelVerifyJWTRequest()
|
2054
2159
|
|
2055
2160
|
req.token = (token)
|
2056
2161
|
tries = 0
|
2057
2162
|
plumbing_response = None
|
2058
2163
|
while True:
|
2164
|
+
t = None if deadline is None else deadline - time.time()
|
2059
2165
|
try:
|
2060
2166
|
plumbing_response = self.stub.VerifyJWT(
|
2061
2167
|
req,
|
2062
2168
|
metadata=self.parent.get_metadata('ControlPanel.VerifyJWT',
|
2063
2169
|
req),
|
2064
|
-
timeout=
|
2170
|
+
timeout=t)
|
2065
2171
|
except Exception as e:
|
2066
|
-
if self.parent.shouldRetry(tries, e):
|
2172
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2067
2173
|
tries += 1
|
2068
|
-
self.parent.
|
2174
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2069
2175
|
continue
|
2070
2176
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2071
2177
|
break
|
@@ -2093,6 +2199,7 @@ class HealthChecks:
|
|
2093
2199
|
'''
|
2094
2200
|
List gets a list of Healthchecks matching a given set of criteria.
|
2095
2201
|
'''
|
2202
|
+
deadline = None if timeout is None else time.time() + timeout
|
2096
2203
|
req = HealthcheckListRequest()
|
2097
2204
|
req.meta.CopyFrom(ListRequestMetadata())
|
2098
2205
|
if self.parent.page_limit > 0:
|
@@ -2105,16 +2212,18 @@ class HealthChecks:
|
|
2105
2212
|
def generator(svc, req):
|
2106
2213
|
tries = 0
|
2107
2214
|
while True:
|
2215
|
+
t = None if deadline is None else deadline - time.time()
|
2108
2216
|
try:
|
2109
2217
|
plumbing_response = svc.stub.List(
|
2110
2218
|
req,
|
2111
2219
|
metadata=svc.parent.get_metadata(
|
2112
2220
|
'HealthChecks.List', req),
|
2113
|
-
timeout=
|
2221
|
+
timeout=t)
|
2114
2222
|
except Exception as e:
|
2115
|
-
if self.parent.shouldRetry(tries, e):
|
2223
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2116
2224
|
tries += 1
|
2117
|
-
|
2225
|
+
time.sleep(
|
2226
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2118
2227
|
continue
|
2119
2228
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2120
2229
|
tries = 0
|
@@ -2142,6 +2251,7 @@ class IdentityAliases:
|
|
2142
2251
|
'''
|
2143
2252
|
Create registers a new IdentityAlias.
|
2144
2253
|
'''
|
2254
|
+
deadline = None if timeout is None else time.time() + timeout
|
2145
2255
|
req = IdentityAliasCreateRequest()
|
2146
2256
|
|
2147
2257
|
if identity_alias is not None:
|
@@ -2150,16 +2260,17 @@ class IdentityAliases:
|
|
2150
2260
|
tries = 0
|
2151
2261
|
plumbing_response = None
|
2152
2262
|
while True:
|
2263
|
+
t = None if deadline is None else deadline - time.time()
|
2153
2264
|
try:
|
2154
2265
|
plumbing_response = self.stub.Create(
|
2155
2266
|
req,
|
2156
2267
|
metadata=self.parent.get_metadata('IdentityAliases.Create',
|
2157
2268
|
req),
|
2158
|
-
timeout=
|
2269
|
+
timeout=t)
|
2159
2270
|
except Exception as e:
|
2160
|
-
if self.parent.shouldRetry(tries, e):
|
2271
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2161
2272
|
tries += 1
|
2162
|
-
self.parent.
|
2273
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2163
2274
|
continue
|
2164
2275
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2165
2276
|
break
|
@@ -2177,6 +2288,7 @@ class IdentityAliases:
|
|
2177
2288
|
'''
|
2178
2289
|
Get reads one IdentityAlias by ID.
|
2179
2290
|
'''
|
2291
|
+
deadline = None if timeout is None else time.time() + timeout
|
2180
2292
|
req = IdentityAliasGetRequest()
|
2181
2293
|
if self.parent.snapshot_datetime is not None:
|
2182
2294
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -2186,16 +2298,17 @@ class IdentityAliases:
|
|
2186
2298
|
tries = 0
|
2187
2299
|
plumbing_response = None
|
2188
2300
|
while True:
|
2301
|
+
t = None if deadline is None else deadline - time.time()
|
2189
2302
|
try:
|
2190
2303
|
plumbing_response = self.stub.Get(
|
2191
2304
|
req,
|
2192
2305
|
metadata=self.parent.get_metadata('IdentityAliases.Get',
|
2193
2306
|
req),
|
2194
|
-
timeout=
|
2307
|
+
timeout=t)
|
2195
2308
|
except Exception as e:
|
2196
|
-
if self.parent.shouldRetry(tries, e):
|
2309
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2197
2310
|
tries += 1
|
2198
|
-
self.parent.
|
2311
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2199
2312
|
continue
|
2200
2313
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2201
2314
|
break
|
@@ -2213,6 +2326,7 @@ class IdentityAliases:
|
|
2213
2326
|
'''
|
2214
2327
|
Update replaces all the fields of a IdentityAlias by ID.
|
2215
2328
|
'''
|
2329
|
+
deadline = None if timeout is None else time.time() + timeout
|
2216
2330
|
req = IdentityAliasUpdateRequest()
|
2217
2331
|
|
2218
2332
|
if identity_alias is not None:
|
@@ -2221,16 +2335,17 @@ class IdentityAliases:
|
|
2221
2335
|
tries = 0
|
2222
2336
|
plumbing_response = None
|
2223
2337
|
while True:
|
2338
|
+
t = None if deadline is None else deadline - time.time()
|
2224
2339
|
try:
|
2225
2340
|
plumbing_response = self.stub.Update(
|
2226
2341
|
req,
|
2227
2342
|
metadata=self.parent.get_metadata('IdentityAliases.Update',
|
2228
2343
|
req),
|
2229
|
-
timeout=
|
2344
|
+
timeout=t)
|
2230
2345
|
except Exception as e:
|
2231
|
-
if self.parent.shouldRetry(tries, e):
|
2346
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2232
2347
|
tries += 1
|
2233
|
-
self.parent.
|
2348
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2234
2349
|
continue
|
2235
2350
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2236
2351
|
break
|
@@ -2248,22 +2363,24 @@ class IdentityAliases:
|
|
2248
2363
|
'''
|
2249
2364
|
Delete removes a IdentityAlias by ID.
|
2250
2365
|
'''
|
2366
|
+
deadline = None if timeout is None else time.time() + timeout
|
2251
2367
|
req = IdentityAliasDeleteRequest()
|
2252
2368
|
|
2253
2369
|
req.id = (id)
|
2254
2370
|
tries = 0
|
2255
2371
|
plumbing_response = None
|
2256
2372
|
while True:
|
2373
|
+
t = None if deadline is None else deadline - time.time()
|
2257
2374
|
try:
|
2258
2375
|
plumbing_response = self.stub.Delete(
|
2259
2376
|
req,
|
2260
2377
|
metadata=self.parent.get_metadata('IdentityAliases.Delete',
|
2261
2378
|
req),
|
2262
|
-
timeout=
|
2379
|
+
timeout=t)
|
2263
2380
|
except Exception as e:
|
2264
|
-
if self.parent.shouldRetry(tries, e):
|
2381
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2265
2382
|
tries += 1
|
2266
|
-
self.parent.
|
2383
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2267
2384
|
continue
|
2268
2385
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2269
2386
|
break
|
@@ -2279,6 +2396,7 @@ class IdentityAliases:
|
|
2279
2396
|
'''
|
2280
2397
|
List gets a list of IdentityAliases matching a given set of criteria.
|
2281
2398
|
'''
|
2399
|
+
deadline = None if timeout is None else time.time() + timeout
|
2282
2400
|
req = IdentityAliasListRequest()
|
2283
2401
|
req.meta.CopyFrom(ListRequestMetadata())
|
2284
2402
|
if self.parent.page_limit > 0:
|
@@ -2291,16 +2409,18 @@ class IdentityAliases:
|
|
2291
2409
|
def generator(svc, req):
|
2292
2410
|
tries = 0
|
2293
2411
|
while True:
|
2412
|
+
t = None if deadline is None else deadline - time.time()
|
2294
2413
|
try:
|
2295
2414
|
plumbing_response = svc.stub.List(
|
2296
2415
|
req,
|
2297
2416
|
metadata=svc.parent.get_metadata(
|
2298
2417
|
'IdentityAliases.List', req),
|
2299
|
-
timeout=
|
2418
|
+
timeout=t)
|
2300
2419
|
except Exception as e:
|
2301
|
-
if self.parent.shouldRetry(tries, e):
|
2420
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2302
2421
|
tries += 1
|
2303
|
-
|
2422
|
+
time.sleep(
|
2423
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2304
2424
|
continue
|
2305
2425
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2306
2426
|
tries = 0
|
@@ -2348,6 +2468,7 @@ class IdentityAliasesHistory:
|
|
2348
2468
|
'''
|
2349
2469
|
List gets a list of IdentityAliasHistory records matching a given set of criteria.
|
2350
2470
|
'''
|
2471
|
+
deadline = None if timeout is None else time.time() + timeout
|
2351
2472
|
req = IdentityAliasHistoryListRequest()
|
2352
2473
|
req.meta.CopyFrom(ListRequestMetadata())
|
2353
2474
|
if self.parent.page_limit > 0:
|
@@ -2360,16 +2481,18 @@ class IdentityAliasesHistory:
|
|
2360
2481
|
def generator(svc, req):
|
2361
2482
|
tries = 0
|
2362
2483
|
while True:
|
2484
|
+
t = None if deadline is None else deadline - time.time()
|
2363
2485
|
try:
|
2364
2486
|
plumbing_response = svc.stub.List(
|
2365
2487
|
req,
|
2366
2488
|
metadata=svc.parent.get_metadata(
|
2367
2489
|
'IdentityAliasesHistory.List', req),
|
2368
|
-
timeout=
|
2490
|
+
timeout=t)
|
2369
2491
|
except Exception as e:
|
2370
|
-
if self.parent.shouldRetry(tries, e):
|
2492
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2371
2493
|
tries += 1
|
2372
|
-
|
2494
|
+
time.sleep(
|
2495
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2373
2496
|
continue
|
2374
2497
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2375
2498
|
tries = 0
|
@@ -2397,6 +2520,7 @@ class IdentitySets:
|
|
2397
2520
|
'''
|
2398
2521
|
Create registers a new IdentitySet.
|
2399
2522
|
'''
|
2523
|
+
deadline = None if timeout is None else time.time() + timeout
|
2400
2524
|
req = IdentitySetCreateRequest()
|
2401
2525
|
|
2402
2526
|
if identity_set is not None:
|
@@ -2405,16 +2529,17 @@ class IdentitySets:
|
|
2405
2529
|
tries = 0
|
2406
2530
|
plumbing_response = None
|
2407
2531
|
while True:
|
2532
|
+
t = None if deadline is None else deadline - time.time()
|
2408
2533
|
try:
|
2409
2534
|
plumbing_response = self.stub.Create(
|
2410
2535
|
req,
|
2411
2536
|
metadata=self.parent.get_metadata('IdentitySets.Create',
|
2412
2537
|
req),
|
2413
|
-
timeout=
|
2538
|
+
timeout=t)
|
2414
2539
|
except Exception as e:
|
2415
|
-
if self.parent.shouldRetry(tries, e):
|
2540
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2416
2541
|
tries += 1
|
2417
|
-
self.parent.
|
2542
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2418
2543
|
continue
|
2419
2544
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2420
2545
|
break
|
@@ -2432,6 +2557,7 @@ class IdentitySets:
|
|
2432
2557
|
'''
|
2433
2558
|
Get reads one IdentitySet by ID.
|
2434
2559
|
'''
|
2560
|
+
deadline = None if timeout is None else time.time() + timeout
|
2435
2561
|
req = IdentitySetGetRequest()
|
2436
2562
|
if self.parent.snapshot_datetime is not None:
|
2437
2563
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -2441,15 +2567,16 @@ class IdentitySets:
|
|
2441
2567
|
tries = 0
|
2442
2568
|
plumbing_response = None
|
2443
2569
|
while True:
|
2570
|
+
t = None if deadline is None else deadline - time.time()
|
2444
2571
|
try:
|
2445
2572
|
plumbing_response = self.stub.Get(
|
2446
2573
|
req,
|
2447
2574
|
metadata=self.parent.get_metadata('IdentitySets.Get', req),
|
2448
|
-
timeout=
|
2575
|
+
timeout=t)
|
2449
2576
|
except Exception as e:
|
2450
|
-
if self.parent.shouldRetry(tries, e):
|
2577
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2451
2578
|
tries += 1
|
2452
|
-
self.parent.
|
2579
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2453
2580
|
continue
|
2454
2581
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2455
2582
|
break
|
@@ -2467,6 +2594,7 @@ class IdentitySets:
|
|
2467
2594
|
'''
|
2468
2595
|
Update replaces all the fields of a IdentitySet by ID.
|
2469
2596
|
'''
|
2597
|
+
deadline = None if timeout is None else time.time() + timeout
|
2470
2598
|
req = IdentitySetUpdateRequest()
|
2471
2599
|
|
2472
2600
|
if identity_set is not None:
|
@@ -2475,16 +2603,17 @@ class IdentitySets:
|
|
2475
2603
|
tries = 0
|
2476
2604
|
plumbing_response = None
|
2477
2605
|
while True:
|
2606
|
+
t = None if deadline is None else deadline - time.time()
|
2478
2607
|
try:
|
2479
2608
|
plumbing_response = self.stub.Update(
|
2480
2609
|
req,
|
2481
2610
|
metadata=self.parent.get_metadata('IdentitySets.Update',
|
2482
2611
|
req),
|
2483
|
-
timeout=
|
2612
|
+
timeout=t)
|
2484
2613
|
except Exception as e:
|
2485
|
-
if self.parent.shouldRetry(tries, e):
|
2614
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2486
2615
|
tries += 1
|
2487
|
-
self.parent.
|
2616
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2488
2617
|
continue
|
2489
2618
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2490
2619
|
break
|
@@ -2502,22 +2631,24 @@ class IdentitySets:
|
|
2502
2631
|
'''
|
2503
2632
|
Delete removes a IdentitySet by ID.
|
2504
2633
|
'''
|
2634
|
+
deadline = None if timeout is None else time.time() + timeout
|
2505
2635
|
req = IdentitySetDeleteRequest()
|
2506
2636
|
|
2507
2637
|
req.id = (id)
|
2508
2638
|
tries = 0
|
2509
2639
|
plumbing_response = None
|
2510
2640
|
while True:
|
2641
|
+
t = None if deadline is None else deadline - time.time()
|
2511
2642
|
try:
|
2512
2643
|
plumbing_response = self.stub.Delete(
|
2513
2644
|
req,
|
2514
2645
|
metadata=self.parent.get_metadata('IdentitySets.Delete',
|
2515
2646
|
req),
|
2516
|
-
timeout=
|
2647
|
+
timeout=t)
|
2517
2648
|
except Exception as e:
|
2518
|
-
if self.parent.shouldRetry(tries, e):
|
2649
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2519
2650
|
tries += 1
|
2520
|
-
self.parent.
|
2651
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2521
2652
|
continue
|
2522
2653
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2523
2654
|
break
|
@@ -2533,6 +2664,7 @@ class IdentitySets:
|
|
2533
2664
|
'''
|
2534
2665
|
List gets a list of IdentitySets matching a given set of criteria.
|
2535
2666
|
'''
|
2667
|
+
deadline = None if timeout is None else time.time() + timeout
|
2536
2668
|
req = IdentitySetListRequest()
|
2537
2669
|
req.meta.CopyFrom(ListRequestMetadata())
|
2538
2670
|
if self.parent.page_limit > 0:
|
@@ -2545,16 +2677,18 @@ class IdentitySets:
|
|
2545
2677
|
def generator(svc, req):
|
2546
2678
|
tries = 0
|
2547
2679
|
while True:
|
2680
|
+
t = None if deadline is None else deadline - time.time()
|
2548
2681
|
try:
|
2549
2682
|
plumbing_response = svc.stub.List(
|
2550
2683
|
req,
|
2551
2684
|
metadata=svc.parent.get_metadata(
|
2552
2685
|
'IdentitySets.List', req),
|
2553
|
-
timeout=
|
2686
|
+
timeout=t)
|
2554
2687
|
except Exception as e:
|
2555
|
-
if self.parent.shouldRetry(tries, e):
|
2688
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2556
2689
|
tries += 1
|
2557
|
-
|
2690
|
+
time.sleep(
|
2691
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2558
2692
|
continue
|
2559
2693
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2560
2694
|
tries = 0
|
@@ -2602,6 +2736,7 @@ class IdentitySetsHistory:
|
|
2602
2736
|
'''
|
2603
2737
|
List gets a list of IdentitySetHistory records matching a given set of criteria.
|
2604
2738
|
'''
|
2739
|
+
deadline = None if timeout is None else time.time() + timeout
|
2605
2740
|
req = IdentitySetHistoryListRequest()
|
2606
2741
|
req.meta.CopyFrom(ListRequestMetadata())
|
2607
2742
|
if self.parent.page_limit > 0:
|
@@ -2614,16 +2749,18 @@ class IdentitySetsHistory:
|
|
2614
2749
|
def generator(svc, req):
|
2615
2750
|
tries = 0
|
2616
2751
|
while True:
|
2752
|
+
t = None if deadline is None else deadline - time.time()
|
2617
2753
|
try:
|
2618
2754
|
plumbing_response = svc.stub.List(
|
2619
2755
|
req,
|
2620
2756
|
metadata=svc.parent.get_metadata(
|
2621
2757
|
'IdentitySetsHistory.List', req),
|
2622
|
-
timeout=
|
2758
|
+
timeout=t)
|
2623
2759
|
except Exception as e:
|
2624
|
-
if self.parent.shouldRetry(tries, e):
|
2760
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2625
2761
|
tries += 1
|
2626
|
-
|
2762
|
+
time.sleep(
|
2763
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2627
2764
|
continue
|
2628
2765
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2629
2766
|
tries = 0
|
@@ -2652,6 +2789,7 @@ class ManagedSecrets:
|
|
2652
2789
|
'''
|
2653
2790
|
List returns Managed Secrets from a Secret Engine.
|
2654
2791
|
'''
|
2792
|
+
deadline = None if timeout is None else time.time() + timeout
|
2655
2793
|
req = ManagedSecretListRequest()
|
2656
2794
|
req.meta.CopyFrom(ListRequestMetadata())
|
2657
2795
|
if self.parent.page_limit > 0:
|
@@ -2664,16 +2802,18 @@ class ManagedSecrets:
|
|
2664
2802
|
def generator(svc, req):
|
2665
2803
|
tries = 0
|
2666
2804
|
while True:
|
2805
|
+
t = None if deadline is None else deadline - time.time()
|
2667
2806
|
try:
|
2668
2807
|
plumbing_response = svc.stub.List(
|
2669
2808
|
req,
|
2670
2809
|
metadata=svc.parent.get_metadata(
|
2671
2810
|
'ManagedSecrets.List', req),
|
2672
|
-
timeout=
|
2811
|
+
timeout=t)
|
2673
2812
|
except Exception as e:
|
2674
|
-
if self.parent.shouldRetry(tries, e):
|
2813
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2675
2814
|
tries += 1
|
2676
|
-
|
2815
|
+
time.sleep(
|
2816
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2677
2817
|
continue
|
2678
2818
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2679
2819
|
tries = 0
|
@@ -2690,6 +2830,7 @@ class ManagedSecrets:
|
|
2690
2830
|
'''
|
2691
2831
|
List returns Managed Secrets for an Actor from a Secret Engine.
|
2692
2832
|
'''
|
2833
|
+
deadline = None if timeout is None else time.time() + timeout
|
2693
2834
|
req = ManagedSecretListRequest()
|
2694
2835
|
req.meta.CopyFrom(ListRequestMetadata())
|
2695
2836
|
if self.parent.page_limit > 0:
|
@@ -2702,16 +2843,18 @@ class ManagedSecrets:
|
|
2702
2843
|
def generator(svc, req):
|
2703
2844
|
tries = 0
|
2704
2845
|
while True:
|
2846
|
+
t = None if deadline is None else deadline - time.time()
|
2705
2847
|
try:
|
2706
2848
|
plumbing_response = svc.stub.ListByActor(
|
2707
2849
|
req,
|
2708
2850
|
metadata=svc.parent.get_metadata(
|
2709
2851
|
'ManagedSecrets.ListByActor', req),
|
2710
|
-
timeout=
|
2852
|
+
timeout=t)
|
2711
2853
|
except Exception as e:
|
2712
|
-
if self.parent.shouldRetry(tries, e):
|
2854
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2713
2855
|
tries += 1
|
2714
|
-
|
2856
|
+
time.sleep(
|
2857
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2715
2858
|
continue
|
2716
2859
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2717
2860
|
tries = 0
|
@@ -2728,6 +2871,7 @@ class ManagedSecrets:
|
|
2728
2871
|
'''
|
2729
2872
|
Create creates a Managed Secret
|
2730
2873
|
'''
|
2874
|
+
deadline = None if timeout is None else time.time() + timeout
|
2731
2875
|
req = ManagedSecretCreateRequest()
|
2732
2876
|
|
2733
2877
|
if managed_secret is not None:
|
@@ -2736,16 +2880,17 @@ class ManagedSecrets:
|
|
2736
2880
|
tries = 0
|
2737
2881
|
plumbing_response = None
|
2738
2882
|
while True:
|
2883
|
+
t = None if deadline is None else deadline - time.time()
|
2739
2884
|
try:
|
2740
2885
|
plumbing_response = self.stub.Create(
|
2741
2886
|
req,
|
2742
2887
|
metadata=self.parent.get_metadata('ManagedSecrets.Create',
|
2743
2888
|
req),
|
2744
|
-
timeout=
|
2889
|
+
timeout=t)
|
2745
2890
|
except Exception as e:
|
2746
|
-
if self.parent.shouldRetry(tries, e):
|
2891
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2747
2892
|
tries += 1
|
2748
|
-
self.parent.
|
2893
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2749
2894
|
continue
|
2750
2895
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2751
2896
|
break
|
@@ -2763,6 +2908,7 @@ class ManagedSecrets:
|
|
2763
2908
|
'''
|
2764
2909
|
Update updates a Managed Secret
|
2765
2910
|
'''
|
2911
|
+
deadline = None if timeout is None else time.time() + timeout
|
2766
2912
|
req = ManagedSecretUpdateRequest()
|
2767
2913
|
|
2768
2914
|
if managed_secret is not None:
|
@@ -2771,16 +2917,17 @@ class ManagedSecrets:
|
|
2771
2917
|
tries = 0
|
2772
2918
|
plumbing_response = None
|
2773
2919
|
while True:
|
2920
|
+
t = None if deadline is None else deadline - time.time()
|
2774
2921
|
try:
|
2775
2922
|
plumbing_response = self.stub.Update(
|
2776
2923
|
req,
|
2777
2924
|
metadata=self.parent.get_metadata('ManagedSecrets.Update',
|
2778
2925
|
req),
|
2779
|
-
timeout=
|
2926
|
+
timeout=t)
|
2780
2927
|
except Exception as e:
|
2781
|
-
if self.parent.shouldRetry(tries, e):
|
2928
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2782
2929
|
tries += 1
|
2783
|
-
self.parent.
|
2930
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2784
2931
|
continue
|
2785
2932
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2786
2933
|
break
|
@@ -2798,22 +2945,24 @@ class ManagedSecrets:
|
|
2798
2945
|
'''
|
2799
2946
|
Rotate forces rotation of Managed Secret
|
2800
2947
|
'''
|
2948
|
+
deadline = None if timeout is None else time.time() + timeout
|
2801
2949
|
req = ManagedSecretRotateRequest()
|
2802
2950
|
|
2803
2951
|
req.id = (id)
|
2804
2952
|
tries = 0
|
2805
2953
|
plumbing_response = None
|
2806
2954
|
while True:
|
2955
|
+
t = None if deadline is None else deadline - time.time()
|
2807
2956
|
try:
|
2808
2957
|
plumbing_response = self.stub.Rotate(
|
2809
2958
|
req,
|
2810
2959
|
metadata=self.parent.get_metadata('ManagedSecrets.Rotate',
|
2811
2960
|
req),
|
2812
|
-
timeout=
|
2961
|
+
timeout=t)
|
2813
2962
|
except Exception as e:
|
2814
|
-
if self.parent.shouldRetry(tries, e):
|
2963
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2815
2964
|
tries += 1
|
2816
|
-
self.parent.
|
2965
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2817
2966
|
continue
|
2818
2967
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2819
2968
|
break
|
@@ -2829,22 +2978,24 @@ class ManagedSecrets:
|
|
2829
2978
|
'''
|
2830
2979
|
Delete deletes a Managed Secret
|
2831
2980
|
'''
|
2981
|
+
deadline = None if timeout is None else time.time() + timeout
|
2832
2982
|
req = ManagedSecretDeleteRequest()
|
2833
2983
|
|
2834
2984
|
req.id = (id)
|
2835
2985
|
tries = 0
|
2836
2986
|
plumbing_response = None
|
2837
2987
|
while True:
|
2988
|
+
t = None if deadline is None else deadline - time.time()
|
2838
2989
|
try:
|
2839
2990
|
plumbing_response = self.stub.Delete(
|
2840
2991
|
req,
|
2841
2992
|
metadata=self.parent.get_metadata('ManagedSecrets.Delete',
|
2842
2993
|
req),
|
2843
|
-
timeout=
|
2994
|
+
timeout=t)
|
2844
2995
|
except Exception as e:
|
2845
|
-
if self.parent.shouldRetry(tries, e):
|
2996
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2846
2997
|
tries += 1
|
2847
|
-
self.parent.
|
2998
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2848
2999
|
continue
|
2849
3000
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2850
3001
|
break
|
@@ -2858,6 +3009,7 @@ class ManagedSecrets:
|
|
2858
3009
|
'''
|
2859
3010
|
Get gets details of a Managed Secret without sensitive data
|
2860
3011
|
'''
|
3012
|
+
deadline = None if timeout is None else time.time() + timeout
|
2861
3013
|
req = ManagedSecretGetRequest()
|
2862
3014
|
if self.parent.snapshot_datetime is not None:
|
2863
3015
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -2867,16 +3019,17 @@ class ManagedSecrets:
|
|
2867
3019
|
tries = 0
|
2868
3020
|
plumbing_response = None
|
2869
3021
|
while True:
|
3022
|
+
t = None if deadline is None else deadline - time.time()
|
2870
3023
|
try:
|
2871
3024
|
plumbing_response = self.stub.Get(
|
2872
3025
|
req,
|
2873
3026
|
metadata=self.parent.get_metadata('ManagedSecrets.Get',
|
2874
3027
|
req),
|
2875
|
-
timeout=
|
3028
|
+
timeout=t)
|
2876
3029
|
except Exception as e:
|
2877
|
-
if self.parent.shouldRetry(tries, e):
|
3030
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2878
3031
|
tries += 1
|
2879
|
-
self.parent.
|
3032
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2880
3033
|
continue
|
2881
3034
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2882
3035
|
break
|
@@ -2894,6 +3047,7 @@ class ManagedSecrets:
|
|
2894
3047
|
'''
|
2895
3048
|
Retrieve returns Managed Secret with sensitive data
|
2896
3049
|
'''
|
3050
|
+
deadline = None if timeout is None else time.time() + timeout
|
2897
3051
|
req = ManagedSecretRetrieveRequest()
|
2898
3052
|
|
2899
3053
|
req.id = (id)
|
@@ -2901,16 +3055,17 @@ class ManagedSecrets:
|
|
2901
3055
|
tries = 0
|
2902
3056
|
plumbing_response = None
|
2903
3057
|
while True:
|
3058
|
+
t = None if deadline is None else deadline - time.time()
|
2904
3059
|
try:
|
2905
3060
|
plumbing_response = self.stub.Retrieve(
|
2906
3061
|
req,
|
2907
3062
|
metadata=self.parent.get_metadata(
|
2908
3063
|
'ManagedSecrets.Retrieve', req),
|
2909
|
-
timeout=
|
3064
|
+
timeout=t)
|
2910
3065
|
except Exception as e:
|
2911
|
-
if self.parent.shouldRetry(tries, e):
|
3066
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2912
3067
|
tries += 1
|
2913
|
-
self.parent.
|
3068
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2914
3069
|
continue
|
2915
3070
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2916
3071
|
break
|
@@ -2929,22 +3084,24 @@ class ManagedSecrets:
|
|
2929
3084
|
Validate returns the result of testing the stored credential against the
|
2930
3085
|
secret engine.
|
2931
3086
|
'''
|
3087
|
+
deadline = None if timeout is None else time.time() + timeout
|
2932
3088
|
req = ManagedSecretValidateRequest()
|
2933
3089
|
|
2934
3090
|
req.id = (id)
|
2935
3091
|
tries = 0
|
2936
3092
|
plumbing_response = None
|
2937
3093
|
while True:
|
3094
|
+
t = None if deadline is None else deadline - time.time()
|
2938
3095
|
try:
|
2939
3096
|
plumbing_response = self.stub.Validate(
|
2940
3097
|
req,
|
2941
3098
|
metadata=self.parent.get_metadata(
|
2942
3099
|
'ManagedSecrets.Validate', req),
|
2943
|
-
timeout=
|
3100
|
+
timeout=t)
|
2944
3101
|
except Exception as e:
|
2945
|
-
if self.parent.shouldRetry(tries, e):
|
3102
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2946
3103
|
tries += 1
|
2947
|
-
self.parent.
|
3104
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
2948
3105
|
continue
|
2949
3106
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2950
3107
|
break
|
@@ -2963,6 +3120,7 @@ class ManagedSecrets:
|
|
2963
3120
|
Logs returns the audit records for the managed secret. This may be replaced
|
2964
3121
|
in the future.
|
2965
3122
|
'''
|
3123
|
+
deadline = None if timeout is None else time.time() + timeout
|
2966
3124
|
req = ManagedSecretLogsRequest()
|
2967
3125
|
req.meta.CopyFrom(ListRequestMetadata())
|
2968
3126
|
if self.parent.page_limit > 0:
|
@@ -2975,16 +3133,18 @@ class ManagedSecrets:
|
|
2975
3133
|
def generator(svc, req):
|
2976
3134
|
tries = 0
|
2977
3135
|
while True:
|
3136
|
+
t = None if deadline is None else deadline - time.time()
|
2978
3137
|
try:
|
2979
3138
|
plumbing_response = svc.stub.Logs(
|
2980
3139
|
req,
|
2981
3140
|
metadata=svc.parent.get_metadata(
|
2982
3141
|
'ManagedSecrets.Logs', req),
|
2983
|
-
timeout=
|
3142
|
+
timeout=t)
|
2984
3143
|
except Exception as e:
|
2985
|
-
if self.parent.shouldRetry(tries, e):
|
3144
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
2986
3145
|
tries += 1
|
2987
|
-
|
3146
|
+
time.sleep(
|
3147
|
+
self.parent.exponentialBackoff(tries, deadline))
|
2988
3148
|
continue
|
2989
3149
|
raise plumbing.convert_error_to_porcelain(e) from e
|
2990
3150
|
tries = 0
|
@@ -3016,6 +3176,7 @@ class Nodes:
|
|
3016
3176
|
'''
|
3017
3177
|
Create registers a new Node.
|
3018
3178
|
'''
|
3179
|
+
deadline = None if timeout is None else time.time() + timeout
|
3019
3180
|
req = NodeCreateRequest()
|
3020
3181
|
|
3021
3182
|
if node is not None:
|
@@ -3023,15 +3184,16 @@ class Nodes:
|
|
3023
3184
|
tries = 0
|
3024
3185
|
plumbing_response = None
|
3025
3186
|
while True:
|
3187
|
+
t = None if deadline is None else deadline - time.time()
|
3026
3188
|
try:
|
3027
3189
|
plumbing_response = self.stub.Create(
|
3028
3190
|
req,
|
3029
3191
|
metadata=self.parent.get_metadata('Nodes.Create', req),
|
3030
|
-
timeout=
|
3192
|
+
timeout=t)
|
3031
3193
|
except Exception as e:
|
3032
|
-
if self.parent.shouldRetry(tries, e):
|
3194
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3033
3195
|
tries += 1
|
3034
|
-
self.parent.
|
3196
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3035
3197
|
continue
|
3036
3198
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3037
3199
|
break
|
@@ -3049,6 +3211,7 @@ class Nodes:
|
|
3049
3211
|
'''
|
3050
3212
|
Get reads one Node by ID.
|
3051
3213
|
'''
|
3214
|
+
deadline = None if timeout is None else time.time() + timeout
|
3052
3215
|
req = NodeGetRequest()
|
3053
3216
|
if self.parent.snapshot_datetime is not None:
|
3054
3217
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -3058,15 +3221,16 @@ class Nodes:
|
|
3058
3221
|
tries = 0
|
3059
3222
|
plumbing_response = None
|
3060
3223
|
while True:
|
3224
|
+
t = None if deadline is None else deadline - time.time()
|
3061
3225
|
try:
|
3062
3226
|
plumbing_response = self.stub.Get(
|
3063
3227
|
req,
|
3064
3228
|
metadata=self.parent.get_metadata('Nodes.Get', req),
|
3065
|
-
timeout=
|
3229
|
+
timeout=t)
|
3066
3230
|
except Exception as e:
|
3067
|
-
if self.parent.shouldRetry(tries, e):
|
3231
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3068
3232
|
tries += 1
|
3069
|
-
self.parent.
|
3233
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3070
3234
|
continue
|
3071
3235
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3072
3236
|
break
|
@@ -3083,6 +3247,7 @@ class Nodes:
|
|
3083
3247
|
'''
|
3084
3248
|
Update replaces all the fields of a Node by ID.
|
3085
3249
|
'''
|
3250
|
+
deadline = None if timeout is None else time.time() + timeout
|
3086
3251
|
req = NodeUpdateRequest()
|
3087
3252
|
|
3088
3253
|
if node is not None:
|
@@ -3090,15 +3255,16 @@ class Nodes:
|
|
3090
3255
|
tries = 0
|
3091
3256
|
plumbing_response = None
|
3092
3257
|
while True:
|
3258
|
+
t = None if deadline is None else deadline - time.time()
|
3093
3259
|
try:
|
3094
3260
|
plumbing_response = self.stub.Update(
|
3095
3261
|
req,
|
3096
3262
|
metadata=self.parent.get_metadata('Nodes.Update', req),
|
3097
|
-
timeout=
|
3263
|
+
timeout=t)
|
3098
3264
|
except Exception as e:
|
3099
|
-
if self.parent.shouldRetry(tries, e):
|
3265
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3100
3266
|
tries += 1
|
3101
|
-
self.parent.
|
3267
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3102
3268
|
continue
|
3103
3269
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3104
3270
|
break
|
@@ -3115,21 +3281,23 @@ class Nodes:
|
|
3115
3281
|
'''
|
3116
3282
|
Delete removes a Node by ID.
|
3117
3283
|
'''
|
3284
|
+
deadline = None if timeout is None else time.time() + timeout
|
3118
3285
|
req = NodeDeleteRequest()
|
3119
3286
|
|
3120
3287
|
req.id = (id)
|
3121
3288
|
tries = 0
|
3122
3289
|
plumbing_response = None
|
3123
3290
|
while True:
|
3291
|
+
t = None if deadline is None else deadline - time.time()
|
3124
3292
|
try:
|
3125
3293
|
plumbing_response = self.stub.Delete(
|
3126
3294
|
req,
|
3127
3295
|
metadata=self.parent.get_metadata('Nodes.Delete', req),
|
3128
|
-
timeout=
|
3296
|
+
timeout=t)
|
3129
3297
|
except Exception as e:
|
3130
|
-
if self.parent.shouldRetry(tries, e):
|
3298
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3131
3299
|
tries += 1
|
3132
|
-
self.parent.
|
3300
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3133
3301
|
continue
|
3134
3302
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3135
3303
|
break
|
@@ -3145,6 +3313,7 @@ class Nodes:
|
|
3145
3313
|
'''
|
3146
3314
|
List gets a list of Nodes matching a given set of criteria.
|
3147
3315
|
'''
|
3316
|
+
deadline = None if timeout is None else time.time() + timeout
|
3148
3317
|
req = NodeListRequest()
|
3149
3318
|
req.meta.CopyFrom(ListRequestMetadata())
|
3150
3319
|
if self.parent.page_limit > 0:
|
@@ -3157,15 +3326,17 @@ class Nodes:
|
|
3157
3326
|
def generator(svc, req):
|
3158
3327
|
tries = 0
|
3159
3328
|
while True:
|
3329
|
+
t = None if deadline is None else deadline - time.time()
|
3160
3330
|
try:
|
3161
3331
|
plumbing_response = svc.stub.List(
|
3162
3332
|
req,
|
3163
3333
|
metadata=svc.parent.get_metadata('Nodes.List', req),
|
3164
|
-
timeout=
|
3334
|
+
timeout=t)
|
3165
3335
|
except Exception as e:
|
3166
|
-
if self.parent.shouldRetry(tries, e):
|
3336
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3167
3337
|
tries += 1
|
3168
|
-
|
3338
|
+
time.sleep(
|
3339
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3169
3340
|
continue
|
3170
3341
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3171
3342
|
tries = 0
|
@@ -3212,6 +3383,7 @@ class NodesHistory:
|
|
3212
3383
|
'''
|
3213
3384
|
List gets a list of NodeHistory records matching a given set of criteria.
|
3214
3385
|
'''
|
3386
|
+
deadline = None if timeout is None else time.time() + timeout
|
3215
3387
|
req = NodeHistoryListRequest()
|
3216
3388
|
req.meta.CopyFrom(ListRequestMetadata())
|
3217
3389
|
if self.parent.page_limit > 0:
|
@@ -3224,16 +3396,18 @@ class NodesHistory:
|
|
3224
3396
|
def generator(svc, req):
|
3225
3397
|
tries = 0
|
3226
3398
|
while True:
|
3399
|
+
t = None if deadline is None else deadline - time.time()
|
3227
3400
|
try:
|
3228
3401
|
plumbing_response = svc.stub.List(
|
3229
3402
|
req,
|
3230
3403
|
metadata=svc.parent.get_metadata(
|
3231
3404
|
'NodesHistory.List', req),
|
3232
|
-
timeout=
|
3405
|
+
timeout=t)
|
3233
3406
|
except Exception as e:
|
3234
|
-
if self.parent.shouldRetry(tries, e):
|
3407
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3235
3408
|
tries += 1
|
3236
|
-
|
3409
|
+
time.sleep(
|
3410
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3237
3411
|
continue
|
3238
3412
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3239
3413
|
tries = 0
|
@@ -3260,6 +3434,7 @@ class OrganizationHistory:
|
|
3260
3434
|
'''
|
3261
3435
|
List gets a list of OrganizationHistory records matching a given set of criteria.
|
3262
3436
|
'''
|
3437
|
+
deadline = None if timeout is None else time.time() + timeout
|
3263
3438
|
req = OrganizationHistoryListRequest()
|
3264
3439
|
req.meta.CopyFrom(ListRequestMetadata())
|
3265
3440
|
if self.parent.page_limit > 0:
|
@@ -3272,16 +3447,18 @@ class OrganizationHistory:
|
|
3272
3447
|
def generator(svc, req):
|
3273
3448
|
tries = 0
|
3274
3449
|
while True:
|
3450
|
+
t = None if deadline is None else deadline - time.time()
|
3275
3451
|
try:
|
3276
3452
|
plumbing_response = svc.stub.List(
|
3277
3453
|
req,
|
3278
3454
|
metadata=svc.parent.get_metadata(
|
3279
3455
|
'OrganizationHistory.List', req),
|
3280
|
-
timeout=
|
3456
|
+
timeout=t)
|
3281
3457
|
except Exception as e:
|
3282
|
-
if self.parent.shouldRetry(tries, e):
|
3458
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3283
3459
|
tries += 1
|
3284
|
-
|
3460
|
+
time.sleep(
|
3461
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3285
3462
|
continue
|
3286
3463
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3287
3464
|
tries = 0
|
@@ -3308,6 +3485,7 @@ class PeeringGroupNodes:
|
|
3308
3485
|
'''
|
3309
3486
|
Create attaches a Node to a PeeringGroup
|
3310
3487
|
'''
|
3488
|
+
deadline = None if timeout is None else time.time() + timeout
|
3311
3489
|
req = PeeringGroupNodeCreateRequest()
|
3312
3490
|
|
3313
3491
|
if peering_group_node is not None:
|
@@ -3317,16 +3495,17 @@ class PeeringGroupNodes:
|
|
3317
3495
|
tries = 0
|
3318
3496
|
plumbing_response = None
|
3319
3497
|
while True:
|
3498
|
+
t = None if deadline is None else deadline - time.time()
|
3320
3499
|
try:
|
3321
3500
|
plumbing_response = self.stub.Create(
|
3322
3501
|
req,
|
3323
3502
|
metadata=self.parent.get_metadata(
|
3324
3503
|
'PeeringGroupNodes.Create', req),
|
3325
|
-
timeout=
|
3504
|
+
timeout=t)
|
3326
3505
|
except Exception as e:
|
3327
|
-
if self.parent.shouldRetry(tries, e):
|
3506
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3328
3507
|
tries += 1
|
3329
|
-
self.parent.
|
3508
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3330
3509
|
continue
|
3331
3510
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3332
3511
|
break
|
@@ -3344,22 +3523,24 @@ class PeeringGroupNodes:
|
|
3344
3523
|
'''
|
3345
3524
|
Delete detaches a Node to a PeeringGroup.
|
3346
3525
|
'''
|
3526
|
+
deadline = None if timeout is None else time.time() + timeout
|
3347
3527
|
req = PeeringGroupNodeDeleteRequest()
|
3348
3528
|
|
3349
3529
|
req.id = (id)
|
3350
3530
|
tries = 0
|
3351
3531
|
plumbing_response = None
|
3352
3532
|
while True:
|
3533
|
+
t = None if deadline is None else deadline - time.time()
|
3353
3534
|
try:
|
3354
3535
|
plumbing_response = self.stub.Delete(
|
3355
3536
|
req,
|
3356
3537
|
metadata=self.parent.get_metadata(
|
3357
3538
|
'PeeringGroupNodes.Delete', req),
|
3358
|
-
timeout=
|
3539
|
+
timeout=t)
|
3359
3540
|
except Exception as e:
|
3360
|
-
if self.parent.shouldRetry(tries, e):
|
3541
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3361
3542
|
tries += 1
|
3362
|
-
self.parent.
|
3543
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3363
3544
|
continue
|
3364
3545
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3365
3546
|
break
|
@@ -3375,6 +3556,7 @@ class PeeringGroupNodes:
|
|
3375
3556
|
'''
|
3376
3557
|
Get reads the information of one peering group to node attachment.
|
3377
3558
|
'''
|
3559
|
+
deadline = None if timeout is None else time.time() + timeout
|
3378
3560
|
req = PeeringGroupNodeGetRequest()
|
3379
3561
|
if self.parent.snapshot_datetime is not None:
|
3380
3562
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -3384,16 +3566,17 @@ class PeeringGroupNodes:
|
|
3384
3566
|
tries = 0
|
3385
3567
|
plumbing_response = None
|
3386
3568
|
while True:
|
3569
|
+
t = None if deadline is None else deadline - time.time()
|
3387
3570
|
try:
|
3388
3571
|
plumbing_response = self.stub.Get(
|
3389
3572
|
req,
|
3390
3573
|
metadata=self.parent.get_metadata('PeeringGroupNodes.Get',
|
3391
3574
|
req),
|
3392
|
-
timeout=
|
3575
|
+
timeout=t)
|
3393
3576
|
except Exception as e:
|
3394
|
-
if self.parent.shouldRetry(tries, e):
|
3577
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3395
3578
|
tries += 1
|
3396
|
-
self.parent.
|
3579
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3397
3580
|
continue
|
3398
3581
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3399
3582
|
break
|
@@ -3411,6 +3594,7 @@ class PeeringGroupNodes:
|
|
3411
3594
|
'''
|
3412
3595
|
List gets a list of peering group node attachments.
|
3413
3596
|
'''
|
3597
|
+
deadline = None if timeout is None else time.time() + timeout
|
3414
3598
|
req = PeeringGroupNodeListRequest()
|
3415
3599
|
req.meta.CopyFrom(ListRequestMetadata())
|
3416
3600
|
if self.parent.page_limit > 0:
|
@@ -3423,16 +3607,18 @@ class PeeringGroupNodes:
|
|
3423
3607
|
def generator(svc, req):
|
3424
3608
|
tries = 0
|
3425
3609
|
while True:
|
3610
|
+
t = None if deadline is None else deadline - time.time()
|
3426
3611
|
try:
|
3427
3612
|
plumbing_response = svc.stub.List(
|
3428
3613
|
req,
|
3429
3614
|
metadata=svc.parent.get_metadata(
|
3430
3615
|
'PeeringGroupNodes.List', req),
|
3431
|
-
timeout=
|
3616
|
+
timeout=t)
|
3432
3617
|
except Exception as e:
|
3433
|
-
if self.parent.shouldRetry(tries, e):
|
3618
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3434
3619
|
tries += 1
|
3435
|
-
|
3620
|
+
time.sleep(
|
3621
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3436
3622
|
continue
|
3437
3623
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3438
3624
|
tries = 0
|
@@ -3459,6 +3645,7 @@ class PeeringGroupPeers:
|
|
3459
3645
|
'''
|
3460
3646
|
Create links two peering groups.
|
3461
3647
|
'''
|
3648
|
+
deadline = None if timeout is None else time.time() + timeout
|
3462
3649
|
req = PeeringGroupPeerCreateRequest()
|
3463
3650
|
|
3464
3651
|
if peering_group_peer is not None:
|
@@ -3468,16 +3655,17 @@ class PeeringGroupPeers:
|
|
3468
3655
|
tries = 0
|
3469
3656
|
plumbing_response = None
|
3470
3657
|
while True:
|
3658
|
+
t = None if deadline is None else deadline - time.time()
|
3471
3659
|
try:
|
3472
3660
|
plumbing_response = self.stub.Create(
|
3473
3661
|
req,
|
3474
3662
|
metadata=self.parent.get_metadata(
|
3475
3663
|
'PeeringGroupPeers.Create', req),
|
3476
|
-
timeout=
|
3664
|
+
timeout=t)
|
3477
3665
|
except Exception as e:
|
3478
|
-
if self.parent.shouldRetry(tries, e):
|
3666
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3479
3667
|
tries += 1
|
3480
|
-
self.parent.
|
3668
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3481
3669
|
continue
|
3482
3670
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3483
3671
|
break
|
@@ -3495,22 +3683,24 @@ class PeeringGroupPeers:
|
|
3495
3683
|
'''
|
3496
3684
|
Delete unlinks two peering groups.
|
3497
3685
|
'''
|
3686
|
+
deadline = None if timeout is None else time.time() + timeout
|
3498
3687
|
req = PeeringGroupPeerDeleteRequest()
|
3499
3688
|
|
3500
3689
|
req.id = (id)
|
3501
3690
|
tries = 0
|
3502
3691
|
plumbing_response = None
|
3503
3692
|
while True:
|
3693
|
+
t = None if deadline is None else deadline - time.time()
|
3504
3694
|
try:
|
3505
3695
|
plumbing_response = self.stub.Delete(
|
3506
3696
|
req,
|
3507
3697
|
metadata=self.parent.get_metadata(
|
3508
3698
|
'PeeringGroupPeers.Delete', req),
|
3509
|
-
timeout=
|
3699
|
+
timeout=t)
|
3510
3700
|
except Exception as e:
|
3511
|
-
if self.parent.shouldRetry(tries, e):
|
3701
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3512
3702
|
tries += 1
|
3513
|
-
self.parent.
|
3703
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3514
3704
|
continue
|
3515
3705
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3516
3706
|
break
|
@@ -3526,6 +3716,7 @@ class PeeringGroupPeers:
|
|
3526
3716
|
'''
|
3527
3717
|
Get reads the information of one peering group link.
|
3528
3718
|
'''
|
3719
|
+
deadline = None if timeout is None else time.time() + timeout
|
3529
3720
|
req = PeeringGroupPeerGetRequest()
|
3530
3721
|
if self.parent.snapshot_datetime is not None:
|
3531
3722
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -3535,16 +3726,17 @@ class PeeringGroupPeers:
|
|
3535
3726
|
tries = 0
|
3536
3727
|
plumbing_response = None
|
3537
3728
|
while True:
|
3729
|
+
t = None if deadline is None else deadline - time.time()
|
3538
3730
|
try:
|
3539
3731
|
plumbing_response = self.stub.Get(
|
3540
3732
|
req,
|
3541
3733
|
metadata=self.parent.get_metadata('PeeringGroupPeers.Get',
|
3542
3734
|
req),
|
3543
|
-
timeout=
|
3735
|
+
timeout=t)
|
3544
3736
|
except Exception as e:
|
3545
|
-
if self.parent.shouldRetry(tries, e):
|
3737
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3546
3738
|
tries += 1
|
3547
|
-
self.parent.
|
3739
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3548
3740
|
continue
|
3549
3741
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3550
3742
|
break
|
@@ -3562,6 +3754,7 @@ class PeeringGroupPeers:
|
|
3562
3754
|
'''
|
3563
3755
|
List gets a list of peering group links.
|
3564
3756
|
'''
|
3757
|
+
deadline = None if timeout is None else time.time() + timeout
|
3565
3758
|
req = PeeringGroupPeerListRequest()
|
3566
3759
|
req.meta.CopyFrom(ListRequestMetadata())
|
3567
3760
|
if self.parent.page_limit > 0:
|
@@ -3574,16 +3767,18 @@ class PeeringGroupPeers:
|
|
3574
3767
|
def generator(svc, req):
|
3575
3768
|
tries = 0
|
3576
3769
|
while True:
|
3770
|
+
t = None if deadline is None else deadline - time.time()
|
3577
3771
|
try:
|
3578
3772
|
plumbing_response = svc.stub.List(
|
3579
3773
|
req,
|
3580
3774
|
metadata=svc.parent.get_metadata(
|
3581
3775
|
'PeeringGroupPeers.List', req),
|
3582
|
-
timeout=
|
3776
|
+
timeout=t)
|
3583
3777
|
except Exception as e:
|
3584
|
-
if self.parent.shouldRetry(tries, e):
|
3778
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3585
3779
|
tries += 1
|
3586
|
-
|
3780
|
+
time.sleep(
|
3781
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3587
3782
|
continue
|
3588
3783
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3589
3784
|
tries = 0
|
@@ -3610,6 +3805,7 @@ class PeeringGroupResources:
|
|
3610
3805
|
'''
|
3611
3806
|
Create attaches a Resource to a PeeringGroup
|
3612
3807
|
'''
|
3808
|
+
deadline = None if timeout is None else time.time() + timeout
|
3613
3809
|
req = PeeringGroupResourceCreateRequest()
|
3614
3810
|
|
3615
3811
|
if peering_group_resource is not None:
|
@@ -3619,16 +3815,17 @@ class PeeringGroupResources:
|
|
3619
3815
|
tries = 0
|
3620
3816
|
plumbing_response = None
|
3621
3817
|
while True:
|
3818
|
+
t = None if deadline is None else deadline - time.time()
|
3622
3819
|
try:
|
3623
3820
|
plumbing_response = self.stub.Create(
|
3624
3821
|
req,
|
3625
3822
|
metadata=self.parent.get_metadata(
|
3626
3823
|
'PeeringGroupResources.Create', req),
|
3627
|
-
timeout=
|
3824
|
+
timeout=t)
|
3628
3825
|
except Exception as e:
|
3629
|
-
if self.parent.shouldRetry(tries, e):
|
3826
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3630
3827
|
tries += 1
|
3631
|
-
self.parent.
|
3828
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3632
3829
|
continue
|
3633
3830
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3634
3831
|
break
|
@@ -3646,22 +3843,24 @@ class PeeringGroupResources:
|
|
3646
3843
|
'''
|
3647
3844
|
Delete detaches a Resource to a PeeringGroup
|
3648
3845
|
'''
|
3846
|
+
deadline = None if timeout is None else time.time() + timeout
|
3649
3847
|
req = PeeringGroupResourceDeleteRequest()
|
3650
3848
|
|
3651
3849
|
req.id = (id)
|
3652
3850
|
tries = 0
|
3653
3851
|
plumbing_response = None
|
3654
3852
|
while True:
|
3853
|
+
t = None if deadline is None else deadline - time.time()
|
3655
3854
|
try:
|
3656
3855
|
plumbing_response = self.stub.Delete(
|
3657
3856
|
req,
|
3658
3857
|
metadata=self.parent.get_metadata(
|
3659
3858
|
'PeeringGroupResources.Delete', req),
|
3660
|
-
timeout=
|
3859
|
+
timeout=t)
|
3661
3860
|
except Exception as e:
|
3662
|
-
if self.parent.shouldRetry(tries, e):
|
3861
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3663
3862
|
tries += 1
|
3664
|
-
self.parent.
|
3863
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3665
3864
|
continue
|
3666
3865
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3667
3866
|
break
|
@@ -3677,6 +3876,7 @@ class PeeringGroupResources:
|
|
3677
3876
|
'''
|
3678
3877
|
Get reads the information of one peering group to resource attachment.
|
3679
3878
|
'''
|
3879
|
+
deadline = None if timeout is None else time.time() + timeout
|
3680
3880
|
req = PeeringGroupResourceGetRequest()
|
3681
3881
|
if self.parent.snapshot_datetime is not None:
|
3682
3882
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -3686,16 +3886,17 @@ class PeeringGroupResources:
|
|
3686
3886
|
tries = 0
|
3687
3887
|
plumbing_response = None
|
3688
3888
|
while True:
|
3889
|
+
t = None if deadline is None else deadline - time.time()
|
3689
3890
|
try:
|
3690
3891
|
plumbing_response = self.stub.Get(
|
3691
3892
|
req,
|
3692
3893
|
metadata=self.parent.get_metadata(
|
3693
3894
|
'PeeringGroupResources.Get', req),
|
3694
|
-
timeout=
|
3895
|
+
timeout=t)
|
3695
3896
|
except Exception as e:
|
3696
|
-
if self.parent.shouldRetry(tries, e):
|
3897
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3697
3898
|
tries += 1
|
3698
|
-
self.parent.
|
3899
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3699
3900
|
continue
|
3700
3901
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3701
3902
|
break
|
@@ -3713,6 +3914,7 @@ class PeeringGroupResources:
|
|
3713
3914
|
'''
|
3714
3915
|
List gets a list of peering group resource attachments.
|
3715
3916
|
'''
|
3917
|
+
deadline = None if timeout is None else time.time() + timeout
|
3716
3918
|
req = PeeringGroupResourceListRequest()
|
3717
3919
|
req.meta.CopyFrom(ListRequestMetadata())
|
3718
3920
|
if self.parent.page_limit > 0:
|
@@ -3725,16 +3927,18 @@ class PeeringGroupResources:
|
|
3725
3927
|
def generator(svc, req):
|
3726
3928
|
tries = 0
|
3727
3929
|
while True:
|
3930
|
+
t = None if deadline is None else deadline - time.time()
|
3728
3931
|
try:
|
3729
3932
|
plumbing_response = svc.stub.List(
|
3730
3933
|
req,
|
3731
3934
|
metadata=svc.parent.get_metadata(
|
3732
3935
|
'PeeringGroupResources.List', req),
|
3733
|
-
timeout=
|
3936
|
+
timeout=t)
|
3734
3937
|
except Exception as e:
|
3735
|
-
if self.parent.shouldRetry(tries, e):
|
3938
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3736
3939
|
tries += 1
|
3737
|
-
|
3940
|
+
time.sleep(
|
3941
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3738
3942
|
continue
|
3739
3943
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3740
3944
|
tries = 0
|
@@ -3761,6 +3965,7 @@ class PeeringGroups:
|
|
3761
3965
|
'''
|
3762
3966
|
Create registers a new PeeringGroup.
|
3763
3967
|
'''
|
3968
|
+
deadline = None if timeout is None else time.time() + timeout
|
3764
3969
|
req = PeeringGroupCreateRequest()
|
3765
3970
|
|
3766
3971
|
if peering_group is not None:
|
@@ -3769,16 +3974,17 @@ class PeeringGroups:
|
|
3769
3974
|
tries = 0
|
3770
3975
|
plumbing_response = None
|
3771
3976
|
while True:
|
3977
|
+
t = None if deadline is None else deadline - time.time()
|
3772
3978
|
try:
|
3773
3979
|
plumbing_response = self.stub.Create(
|
3774
3980
|
req,
|
3775
3981
|
metadata=self.parent.get_metadata('PeeringGroups.Create',
|
3776
3982
|
req),
|
3777
|
-
timeout=
|
3983
|
+
timeout=t)
|
3778
3984
|
except Exception as e:
|
3779
|
-
if self.parent.shouldRetry(tries, e):
|
3985
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3780
3986
|
tries += 1
|
3781
|
-
self.parent.
|
3987
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3782
3988
|
continue
|
3783
3989
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3784
3990
|
break
|
@@ -3796,22 +4002,24 @@ class PeeringGroups:
|
|
3796
4002
|
'''
|
3797
4003
|
Delete removes a PeeringGroup by ID.
|
3798
4004
|
'''
|
4005
|
+
deadline = None if timeout is None else time.time() + timeout
|
3799
4006
|
req = PeeringGroupDeleteRequest()
|
3800
4007
|
|
3801
4008
|
req.id = (id)
|
3802
4009
|
tries = 0
|
3803
4010
|
plumbing_response = None
|
3804
4011
|
while True:
|
4012
|
+
t = None if deadline is None else deadline - time.time()
|
3805
4013
|
try:
|
3806
4014
|
plumbing_response = self.stub.Delete(
|
3807
4015
|
req,
|
3808
4016
|
metadata=self.parent.get_metadata('PeeringGroups.Delete',
|
3809
4017
|
req),
|
3810
|
-
timeout=
|
4018
|
+
timeout=t)
|
3811
4019
|
except Exception as e:
|
3812
|
-
if self.parent.shouldRetry(tries, e):
|
4020
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3813
4021
|
tries += 1
|
3814
|
-
self.parent.
|
4022
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3815
4023
|
continue
|
3816
4024
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3817
4025
|
break
|
@@ -3827,6 +4035,7 @@ class PeeringGroups:
|
|
3827
4035
|
'''
|
3828
4036
|
Get reads one PeeringGroup by ID. It will load all its dependencies.
|
3829
4037
|
'''
|
4038
|
+
deadline = None if timeout is None else time.time() + timeout
|
3830
4039
|
req = PeeringGroupGetRequest()
|
3831
4040
|
if self.parent.snapshot_datetime is not None:
|
3832
4041
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -3836,16 +4045,17 @@ class PeeringGroups:
|
|
3836
4045
|
tries = 0
|
3837
4046
|
plumbing_response = None
|
3838
4047
|
while True:
|
4048
|
+
t = None if deadline is None else deadline - time.time()
|
3839
4049
|
try:
|
3840
4050
|
plumbing_response = self.stub.Get(
|
3841
4051
|
req,
|
3842
4052
|
metadata=self.parent.get_metadata('PeeringGroups.Get',
|
3843
4053
|
req),
|
3844
|
-
timeout=
|
4054
|
+
timeout=t)
|
3845
4055
|
except Exception as e:
|
3846
|
-
if self.parent.shouldRetry(tries, e):
|
4056
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3847
4057
|
tries += 1
|
3848
|
-
self.parent.
|
4058
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3849
4059
|
continue
|
3850
4060
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3851
4061
|
break
|
@@ -3863,6 +4073,7 @@ class PeeringGroups:
|
|
3863
4073
|
'''
|
3864
4074
|
List gets a list of Peering Groups.
|
3865
4075
|
'''
|
4076
|
+
deadline = None if timeout is None else time.time() + timeout
|
3866
4077
|
req = PeeringGroupListRequest()
|
3867
4078
|
req.meta.CopyFrom(ListRequestMetadata())
|
3868
4079
|
if self.parent.page_limit > 0:
|
@@ -3875,16 +4086,18 @@ class PeeringGroups:
|
|
3875
4086
|
def generator(svc, req):
|
3876
4087
|
tries = 0
|
3877
4088
|
while True:
|
4089
|
+
t = None if deadline is None else deadline - time.time()
|
3878
4090
|
try:
|
3879
4091
|
plumbing_response = svc.stub.List(
|
3880
4092
|
req,
|
3881
4093
|
metadata=svc.parent.get_metadata(
|
3882
4094
|
'PeeringGroups.List', req),
|
3883
|
-
timeout=
|
4095
|
+
timeout=t)
|
3884
4096
|
except Exception as e:
|
3885
|
-
if self.parent.shouldRetry(tries, e):
|
4097
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3886
4098
|
tries += 1
|
3887
|
-
|
4099
|
+
time.sleep(
|
4100
|
+
self.parent.exponentialBackoff(tries, deadline))
|
3888
4101
|
continue
|
3889
4102
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3890
4103
|
tries = 0
|
@@ -3912,6 +4125,7 @@ class Policies:
|
|
3912
4125
|
'''
|
3913
4126
|
Create creates a new Policy.
|
3914
4127
|
'''
|
4128
|
+
deadline = None if timeout is None else time.time() + timeout
|
3915
4129
|
req = PolicyCreateRequest()
|
3916
4130
|
|
3917
4131
|
if policy is not None:
|
@@ -3919,15 +4133,16 @@ class Policies:
|
|
3919
4133
|
tries = 0
|
3920
4134
|
plumbing_response = None
|
3921
4135
|
while True:
|
4136
|
+
t = None if deadline is None else deadline - time.time()
|
3922
4137
|
try:
|
3923
4138
|
plumbing_response = self.stub.Create(
|
3924
4139
|
req,
|
3925
4140
|
metadata=self.parent.get_metadata('Policies.Create', req),
|
3926
|
-
timeout=
|
4141
|
+
timeout=t)
|
3927
4142
|
except Exception as e:
|
3928
|
-
if self.parent.shouldRetry(tries, e):
|
4143
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3929
4144
|
tries += 1
|
3930
|
-
self.parent.
|
4145
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3931
4146
|
continue
|
3932
4147
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3933
4148
|
break
|
@@ -3943,21 +4158,23 @@ class Policies:
|
|
3943
4158
|
'''
|
3944
4159
|
Delete removes a Policy by ID.
|
3945
4160
|
'''
|
4161
|
+
deadline = None if timeout is None else time.time() + timeout
|
3946
4162
|
req = PolicyDeleteRequest()
|
3947
4163
|
|
3948
4164
|
req.id = (id)
|
3949
4165
|
tries = 0
|
3950
4166
|
plumbing_response = None
|
3951
4167
|
while True:
|
4168
|
+
t = None if deadline is None else deadline - time.time()
|
3952
4169
|
try:
|
3953
4170
|
plumbing_response = self.stub.Delete(
|
3954
4171
|
req,
|
3955
4172
|
metadata=self.parent.get_metadata('Policies.Delete', req),
|
3956
|
-
timeout=
|
4173
|
+
timeout=t)
|
3957
4174
|
except Exception as e:
|
3958
|
-
if self.parent.shouldRetry(tries, e):
|
4175
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3959
4176
|
tries += 1
|
3960
|
-
self.parent.
|
4177
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3961
4178
|
continue
|
3962
4179
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3963
4180
|
break
|
@@ -3971,6 +4188,7 @@ class Policies:
|
|
3971
4188
|
'''
|
3972
4189
|
Update replaces all the fields of a Policy by ID.
|
3973
4190
|
'''
|
4191
|
+
deadline = None if timeout is None else time.time() + timeout
|
3974
4192
|
req = PolicyUpdateRequest()
|
3975
4193
|
|
3976
4194
|
if policy is not None:
|
@@ -3978,15 +4196,16 @@ class Policies:
|
|
3978
4196
|
tries = 0
|
3979
4197
|
plumbing_response = None
|
3980
4198
|
while True:
|
4199
|
+
t = None if deadline is None else deadline - time.time()
|
3981
4200
|
try:
|
3982
4201
|
plumbing_response = self.stub.Update(
|
3983
4202
|
req,
|
3984
4203
|
metadata=self.parent.get_metadata('Policies.Update', req),
|
3985
|
-
timeout=
|
4204
|
+
timeout=t)
|
3986
4205
|
except Exception as e:
|
3987
|
-
if self.parent.shouldRetry(tries, e):
|
4206
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
3988
4207
|
tries += 1
|
3989
|
-
self.parent.
|
4208
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
3990
4209
|
continue
|
3991
4210
|
raise plumbing.convert_error_to_porcelain(e) from e
|
3992
4211
|
break
|
@@ -4002,6 +4221,7 @@ class Policies:
|
|
4002
4221
|
'''
|
4003
4222
|
Get reads one Policy by ID.
|
4004
4223
|
'''
|
4224
|
+
deadline = None if timeout is None else time.time() + timeout
|
4005
4225
|
req = PolicyGetRequest()
|
4006
4226
|
if self.parent.snapshot_datetime is not None:
|
4007
4227
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -4011,15 +4231,16 @@ class Policies:
|
|
4011
4231
|
tries = 0
|
4012
4232
|
plumbing_response = None
|
4013
4233
|
while True:
|
4234
|
+
t = None if deadline is None else deadline - time.time()
|
4014
4235
|
try:
|
4015
4236
|
plumbing_response = self.stub.Get(
|
4016
4237
|
req,
|
4017
4238
|
metadata=self.parent.get_metadata('Policies.Get', req),
|
4018
|
-
timeout=
|
4239
|
+
timeout=t)
|
4019
4240
|
except Exception as e:
|
4020
|
-
if self.parent.shouldRetry(tries, e):
|
4241
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4021
4242
|
tries += 1
|
4022
|
-
self.parent.
|
4243
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4023
4244
|
continue
|
4024
4245
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4025
4246
|
break
|
@@ -4037,6 +4258,7 @@ class Policies:
|
|
4037
4258
|
'''
|
4038
4259
|
List gets a list of Policy matching a given set of criteria
|
4039
4260
|
'''
|
4261
|
+
deadline = None if timeout is None else time.time() + timeout
|
4040
4262
|
req = PolicyListRequest()
|
4041
4263
|
req.meta.CopyFrom(ListRequestMetadata())
|
4042
4264
|
if self.parent.page_limit > 0:
|
@@ -4049,15 +4271,17 @@ class Policies:
|
|
4049
4271
|
def generator(svc, req):
|
4050
4272
|
tries = 0
|
4051
4273
|
while True:
|
4274
|
+
t = None if deadline is None else deadline - time.time()
|
4052
4275
|
try:
|
4053
4276
|
plumbing_response = svc.stub.List(
|
4054
4277
|
req,
|
4055
4278
|
metadata=svc.parent.get_metadata('Policies.List', req),
|
4056
|
-
timeout=
|
4279
|
+
timeout=t)
|
4057
4280
|
except Exception as e:
|
4058
|
-
if self.parent.shouldRetry(tries, e):
|
4281
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4059
4282
|
tries += 1
|
4060
|
-
|
4283
|
+
time.sleep(
|
4284
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4061
4285
|
continue
|
4062
4286
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4063
4287
|
tries = 0
|
@@ -4104,6 +4328,7 @@ class PoliciesHistory:
|
|
4104
4328
|
'''
|
4105
4329
|
List gets a list of PolicyHistory records matching a given set of criteria.
|
4106
4330
|
'''
|
4331
|
+
deadline = None if timeout is None else time.time() + timeout
|
4107
4332
|
req = PoliciesHistoryListRequest()
|
4108
4333
|
req.meta.CopyFrom(ListRequestMetadata())
|
4109
4334
|
if self.parent.page_limit > 0:
|
@@ -4116,16 +4341,18 @@ class PoliciesHistory:
|
|
4116
4341
|
def generator(svc, req):
|
4117
4342
|
tries = 0
|
4118
4343
|
while True:
|
4344
|
+
t = None if deadline is None else deadline - time.time()
|
4119
4345
|
try:
|
4120
4346
|
plumbing_response = svc.stub.List(
|
4121
4347
|
req,
|
4122
4348
|
metadata=svc.parent.get_metadata(
|
4123
4349
|
'PoliciesHistory.List', req),
|
4124
|
-
timeout=
|
4350
|
+
timeout=t)
|
4125
4351
|
except Exception as e:
|
4126
|
-
if self.parent.shouldRetry(tries, e):
|
4352
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4127
4353
|
tries += 1
|
4128
|
-
|
4354
|
+
time.sleep(
|
4355
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4129
4356
|
continue
|
4130
4357
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4131
4358
|
tries = 0
|
@@ -4154,6 +4381,7 @@ class ProxyClusterKeys:
|
|
4154
4381
|
'''
|
4155
4382
|
Create registers a new ProxyClusterKey.
|
4156
4383
|
'''
|
4384
|
+
deadline = None if timeout is None else time.time() + timeout
|
4157
4385
|
req = ProxyClusterKeyCreateRequest()
|
4158
4386
|
|
4159
4387
|
if proxy_cluster_key is not None:
|
@@ -4163,16 +4391,17 @@ class ProxyClusterKeys:
|
|
4163
4391
|
tries = 0
|
4164
4392
|
plumbing_response = None
|
4165
4393
|
while True:
|
4394
|
+
t = None if deadline is None else deadline - time.time()
|
4166
4395
|
try:
|
4167
4396
|
plumbing_response = self.stub.Create(
|
4168
4397
|
req,
|
4169
4398
|
metadata=self.parent.get_metadata(
|
4170
4399
|
'ProxyClusterKeys.Create', req),
|
4171
|
-
timeout=
|
4400
|
+
timeout=t)
|
4172
4401
|
except Exception as e:
|
4173
|
-
if self.parent.shouldRetry(tries, e):
|
4402
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4174
4403
|
tries += 1
|
4175
|
-
self.parent.
|
4404
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4176
4405
|
continue
|
4177
4406
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4178
4407
|
break
|
@@ -4191,6 +4420,7 @@ class ProxyClusterKeys:
|
|
4191
4420
|
'''
|
4192
4421
|
Get reads one ProxyClusterKey by ID.
|
4193
4422
|
'''
|
4423
|
+
deadline = None if timeout is None else time.time() + timeout
|
4194
4424
|
req = ProxyClusterKeyGetRequest()
|
4195
4425
|
if self.parent.snapshot_datetime is not None:
|
4196
4426
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -4200,16 +4430,17 @@ class ProxyClusterKeys:
|
|
4200
4430
|
tries = 0
|
4201
4431
|
plumbing_response = None
|
4202
4432
|
while True:
|
4433
|
+
t = None if deadline is None else deadline - time.time()
|
4203
4434
|
try:
|
4204
4435
|
plumbing_response = self.stub.Get(
|
4205
4436
|
req,
|
4206
4437
|
metadata=self.parent.get_metadata('ProxyClusterKeys.Get',
|
4207
4438
|
req),
|
4208
|
-
timeout=
|
4439
|
+
timeout=t)
|
4209
4440
|
except Exception as e:
|
4210
|
-
if self.parent.shouldRetry(tries, e):
|
4441
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4211
4442
|
tries += 1
|
4212
|
-
self.parent.
|
4443
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4213
4444
|
continue
|
4214
4445
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4215
4446
|
break
|
@@ -4227,22 +4458,24 @@ class ProxyClusterKeys:
|
|
4227
4458
|
'''
|
4228
4459
|
Delete removes a ProxyClusterKey by ID.
|
4229
4460
|
'''
|
4461
|
+
deadline = None if timeout is None else time.time() + timeout
|
4230
4462
|
req = ProxyClusterKeyDeleteRequest()
|
4231
4463
|
|
4232
4464
|
req.id = (id)
|
4233
4465
|
tries = 0
|
4234
4466
|
plumbing_response = None
|
4235
4467
|
while True:
|
4468
|
+
t = None if deadline is None else deadline - time.time()
|
4236
4469
|
try:
|
4237
4470
|
plumbing_response = self.stub.Delete(
|
4238
4471
|
req,
|
4239
4472
|
metadata=self.parent.get_metadata(
|
4240
4473
|
'ProxyClusterKeys.Delete', req),
|
4241
|
-
timeout=
|
4474
|
+
timeout=t)
|
4242
4475
|
except Exception as e:
|
4243
|
-
if self.parent.shouldRetry(tries, e):
|
4476
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4244
4477
|
tries += 1
|
4245
|
-
self.parent.
|
4478
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4246
4479
|
continue
|
4247
4480
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4248
4481
|
break
|
@@ -4258,6 +4491,7 @@ class ProxyClusterKeys:
|
|
4258
4491
|
'''
|
4259
4492
|
List gets a list of ProxyClusterKeys matching a given set of criteria.
|
4260
4493
|
'''
|
4494
|
+
deadline = None if timeout is None else time.time() + timeout
|
4261
4495
|
req = ProxyClusterKeyListRequest()
|
4262
4496
|
req.meta.CopyFrom(ListRequestMetadata())
|
4263
4497
|
if self.parent.page_limit > 0:
|
@@ -4270,16 +4504,18 @@ class ProxyClusterKeys:
|
|
4270
4504
|
def generator(svc, req):
|
4271
4505
|
tries = 0
|
4272
4506
|
while True:
|
4507
|
+
t = None if deadline is None else deadline - time.time()
|
4273
4508
|
try:
|
4274
4509
|
plumbing_response = svc.stub.List(
|
4275
4510
|
req,
|
4276
4511
|
metadata=svc.parent.get_metadata(
|
4277
4512
|
'ProxyClusterKeys.List', req),
|
4278
|
-
timeout=
|
4513
|
+
timeout=t)
|
4279
4514
|
except Exception as e:
|
4280
|
-
if self.parent.shouldRetry(tries, e):
|
4515
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4281
4516
|
tries += 1
|
4282
|
-
|
4517
|
+
time.sleep(
|
4518
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4283
4519
|
continue
|
4284
4520
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4285
4521
|
tries = 0
|
@@ -4329,6 +4565,7 @@ class Queries:
|
|
4329
4565
|
'''
|
4330
4566
|
List gets a list of Queries matching a given set of criteria.
|
4331
4567
|
'''
|
4568
|
+
deadline = None if timeout is None else time.time() + timeout
|
4332
4569
|
req = QueryListRequest()
|
4333
4570
|
req.meta.CopyFrom(ListRequestMetadata())
|
4334
4571
|
if self.parent.page_limit > 0:
|
@@ -4341,15 +4578,17 @@ class Queries:
|
|
4341
4578
|
def generator(svc, req):
|
4342
4579
|
tries = 0
|
4343
4580
|
while True:
|
4581
|
+
t = None if deadline is None else deadline - time.time()
|
4344
4582
|
try:
|
4345
4583
|
plumbing_response = svc.stub.List(
|
4346
4584
|
req,
|
4347
4585
|
metadata=svc.parent.get_metadata('Queries.List', req),
|
4348
|
-
timeout=
|
4586
|
+
timeout=t)
|
4349
4587
|
except Exception as e:
|
4350
|
-
if self.parent.shouldRetry(tries, e):
|
4588
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4351
4589
|
tries += 1
|
4352
|
-
|
4590
|
+
time.sleep(
|
4591
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4353
4592
|
continue
|
4354
4593
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4355
4594
|
tries = 0
|
@@ -4375,6 +4614,7 @@ class RemoteIdentities:
|
|
4375
4614
|
'''
|
4376
4615
|
Create registers a new RemoteIdentity.
|
4377
4616
|
'''
|
4617
|
+
deadline = None if timeout is None else time.time() + timeout
|
4378
4618
|
req = RemoteIdentityCreateRequest()
|
4379
4619
|
|
4380
4620
|
if remote_identity is not None:
|
@@ -4383,16 +4623,17 @@ class RemoteIdentities:
|
|
4383
4623
|
tries = 0
|
4384
4624
|
plumbing_response = None
|
4385
4625
|
while True:
|
4626
|
+
t = None if deadline is None else deadline - time.time()
|
4386
4627
|
try:
|
4387
4628
|
plumbing_response = self.stub.Create(
|
4388
4629
|
req,
|
4389
4630
|
metadata=self.parent.get_metadata(
|
4390
4631
|
'RemoteIdentities.Create', req),
|
4391
|
-
timeout=
|
4632
|
+
timeout=t)
|
4392
4633
|
except Exception as e:
|
4393
|
-
if self.parent.shouldRetry(tries, e):
|
4634
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4394
4635
|
tries += 1
|
4395
|
-
self.parent.
|
4636
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4396
4637
|
continue
|
4397
4638
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4398
4639
|
break
|
@@ -4410,6 +4651,7 @@ class RemoteIdentities:
|
|
4410
4651
|
'''
|
4411
4652
|
Get reads one RemoteIdentity by ID.
|
4412
4653
|
'''
|
4654
|
+
deadline = None if timeout is None else time.time() + timeout
|
4413
4655
|
req = RemoteIdentityGetRequest()
|
4414
4656
|
if self.parent.snapshot_datetime is not None:
|
4415
4657
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -4419,16 +4661,17 @@ class RemoteIdentities:
|
|
4419
4661
|
tries = 0
|
4420
4662
|
plumbing_response = None
|
4421
4663
|
while True:
|
4664
|
+
t = None if deadline is None else deadline - time.time()
|
4422
4665
|
try:
|
4423
4666
|
plumbing_response = self.stub.Get(
|
4424
4667
|
req,
|
4425
4668
|
metadata=self.parent.get_metadata('RemoteIdentities.Get',
|
4426
4669
|
req),
|
4427
|
-
timeout=
|
4670
|
+
timeout=t)
|
4428
4671
|
except Exception as e:
|
4429
|
-
if self.parent.shouldRetry(tries, e):
|
4672
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4430
4673
|
tries += 1
|
4431
|
-
self.parent.
|
4674
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4432
4675
|
continue
|
4433
4676
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4434
4677
|
break
|
@@ -4446,6 +4689,7 @@ class RemoteIdentities:
|
|
4446
4689
|
'''
|
4447
4690
|
Update replaces all the fields of a RemoteIdentity by ID.
|
4448
4691
|
'''
|
4692
|
+
deadline = None if timeout is None else time.time() + timeout
|
4449
4693
|
req = RemoteIdentityUpdateRequest()
|
4450
4694
|
|
4451
4695
|
if remote_identity is not None:
|
@@ -4454,16 +4698,17 @@ class RemoteIdentities:
|
|
4454
4698
|
tries = 0
|
4455
4699
|
plumbing_response = None
|
4456
4700
|
while True:
|
4701
|
+
t = None if deadline is None else deadline - time.time()
|
4457
4702
|
try:
|
4458
4703
|
plumbing_response = self.stub.Update(
|
4459
4704
|
req,
|
4460
4705
|
metadata=self.parent.get_metadata(
|
4461
4706
|
'RemoteIdentities.Update', req),
|
4462
|
-
timeout=
|
4707
|
+
timeout=t)
|
4463
4708
|
except Exception as e:
|
4464
|
-
if self.parent.shouldRetry(tries, e):
|
4709
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4465
4710
|
tries += 1
|
4466
|
-
self.parent.
|
4711
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4467
4712
|
continue
|
4468
4713
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4469
4714
|
break
|
@@ -4481,22 +4726,24 @@ class RemoteIdentities:
|
|
4481
4726
|
'''
|
4482
4727
|
Delete removes a RemoteIdentity by ID.
|
4483
4728
|
'''
|
4729
|
+
deadline = None if timeout is None else time.time() + timeout
|
4484
4730
|
req = RemoteIdentityDeleteRequest()
|
4485
4731
|
|
4486
4732
|
req.id = (id)
|
4487
4733
|
tries = 0
|
4488
4734
|
plumbing_response = None
|
4489
4735
|
while True:
|
4736
|
+
t = None if deadline is None else deadline - time.time()
|
4490
4737
|
try:
|
4491
4738
|
plumbing_response = self.stub.Delete(
|
4492
4739
|
req,
|
4493
4740
|
metadata=self.parent.get_metadata(
|
4494
4741
|
'RemoteIdentities.Delete', req),
|
4495
|
-
timeout=
|
4742
|
+
timeout=t)
|
4496
4743
|
except Exception as e:
|
4497
|
-
if self.parent.shouldRetry(tries, e):
|
4744
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4498
4745
|
tries += 1
|
4499
|
-
self.parent.
|
4746
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4500
4747
|
continue
|
4501
4748
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4502
4749
|
break
|
@@ -4512,6 +4759,7 @@ class RemoteIdentities:
|
|
4512
4759
|
'''
|
4513
4760
|
List gets a list of RemoteIdentities matching a given set of criteria.
|
4514
4761
|
'''
|
4762
|
+
deadline = None if timeout is None else time.time() + timeout
|
4515
4763
|
req = RemoteIdentityListRequest()
|
4516
4764
|
req.meta.CopyFrom(ListRequestMetadata())
|
4517
4765
|
if self.parent.page_limit > 0:
|
@@ -4524,16 +4772,18 @@ class RemoteIdentities:
|
|
4524
4772
|
def generator(svc, req):
|
4525
4773
|
tries = 0
|
4526
4774
|
while True:
|
4775
|
+
t = None if deadline is None else deadline - time.time()
|
4527
4776
|
try:
|
4528
4777
|
plumbing_response = svc.stub.List(
|
4529
4778
|
req,
|
4530
4779
|
metadata=svc.parent.get_metadata(
|
4531
4780
|
'RemoteIdentities.List', req),
|
4532
|
-
timeout=
|
4781
|
+
timeout=t)
|
4533
4782
|
except Exception as e:
|
4534
|
-
if self.parent.shouldRetry(tries, e):
|
4783
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4535
4784
|
tries += 1
|
4536
|
-
|
4785
|
+
time.sleep(
|
4786
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4537
4787
|
continue
|
4538
4788
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4539
4789
|
tries = 0
|
@@ -4581,6 +4831,7 @@ class RemoteIdentitiesHistory:
|
|
4581
4831
|
'''
|
4582
4832
|
List gets a list of RemoteIdentityHistory records matching a given set of criteria.
|
4583
4833
|
'''
|
4834
|
+
deadline = None if timeout is None else time.time() + timeout
|
4584
4835
|
req = RemoteIdentityHistoryListRequest()
|
4585
4836
|
req.meta.CopyFrom(ListRequestMetadata())
|
4586
4837
|
if self.parent.page_limit > 0:
|
@@ -4593,16 +4844,18 @@ class RemoteIdentitiesHistory:
|
|
4593
4844
|
def generator(svc, req):
|
4594
4845
|
tries = 0
|
4595
4846
|
while True:
|
4847
|
+
t = None if deadline is None else deadline - time.time()
|
4596
4848
|
try:
|
4597
4849
|
plumbing_response = svc.stub.List(
|
4598
4850
|
req,
|
4599
4851
|
metadata=svc.parent.get_metadata(
|
4600
4852
|
'RemoteIdentitiesHistory.List', req),
|
4601
|
-
timeout=
|
4853
|
+
timeout=t)
|
4602
4854
|
except Exception as e:
|
4603
|
-
if self.parent.shouldRetry(tries, e):
|
4855
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4604
4856
|
tries += 1
|
4605
|
-
|
4857
|
+
time.sleep(
|
4858
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4606
4859
|
continue
|
4607
4860
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4608
4861
|
tries = 0
|
@@ -4630,6 +4883,7 @@ class RemoteIdentityGroups:
|
|
4630
4883
|
'''
|
4631
4884
|
Get reads one RemoteIdentityGroup by ID.
|
4632
4885
|
'''
|
4886
|
+
deadline = None if timeout is None else time.time() + timeout
|
4633
4887
|
req = RemoteIdentityGroupGetRequest()
|
4634
4888
|
if self.parent.snapshot_datetime is not None:
|
4635
4889
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -4639,16 +4893,17 @@ class RemoteIdentityGroups:
|
|
4639
4893
|
tries = 0
|
4640
4894
|
plumbing_response = None
|
4641
4895
|
while True:
|
4896
|
+
t = None if deadline is None else deadline - time.time()
|
4642
4897
|
try:
|
4643
4898
|
plumbing_response = self.stub.Get(
|
4644
4899
|
req,
|
4645
4900
|
metadata=self.parent.get_metadata(
|
4646
4901
|
'RemoteIdentityGroups.Get', req),
|
4647
|
-
timeout=
|
4902
|
+
timeout=t)
|
4648
4903
|
except Exception as e:
|
4649
|
-
if self.parent.shouldRetry(tries, e):
|
4904
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4650
4905
|
tries += 1
|
4651
|
-
self.parent.
|
4906
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4652
4907
|
continue
|
4653
4908
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4654
4909
|
break
|
@@ -4666,6 +4921,7 @@ class RemoteIdentityGroups:
|
|
4666
4921
|
'''
|
4667
4922
|
List gets a list of RemoteIdentityGroups matching a given set of criteria.
|
4668
4923
|
'''
|
4924
|
+
deadline = None if timeout is None else time.time() + timeout
|
4669
4925
|
req = RemoteIdentityGroupListRequest()
|
4670
4926
|
req.meta.CopyFrom(ListRequestMetadata())
|
4671
4927
|
if self.parent.page_limit > 0:
|
@@ -4678,16 +4934,18 @@ class RemoteIdentityGroups:
|
|
4678
4934
|
def generator(svc, req):
|
4679
4935
|
tries = 0
|
4680
4936
|
while True:
|
4937
|
+
t = None if deadline is None else deadline - time.time()
|
4681
4938
|
try:
|
4682
4939
|
plumbing_response = svc.stub.List(
|
4683
4940
|
req,
|
4684
4941
|
metadata=svc.parent.get_metadata(
|
4685
4942
|
'RemoteIdentityGroups.List', req),
|
4686
|
-
timeout=
|
4943
|
+
timeout=t)
|
4687
4944
|
except Exception as e:
|
4688
|
-
if self.parent.shouldRetry(tries, e):
|
4945
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4689
4946
|
tries += 1
|
4690
|
-
|
4947
|
+
time.sleep(
|
4948
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4691
4949
|
continue
|
4692
4950
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4693
4951
|
tries = 0
|
@@ -4735,6 +4993,7 @@ class RemoteIdentityGroupsHistory:
|
|
4735
4993
|
'''
|
4736
4994
|
List gets a list of RemoteIdentityGroupHistory records matching a given set of criteria.
|
4737
4995
|
'''
|
4996
|
+
deadline = None if timeout is None else time.time() + timeout
|
4738
4997
|
req = RemoteIdentityGroupHistoryListRequest()
|
4739
4998
|
req.meta.CopyFrom(ListRequestMetadata())
|
4740
4999
|
if self.parent.page_limit > 0:
|
@@ -4747,16 +5006,18 @@ class RemoteIdentityGroupsHistory:
|
|
4747
5006
|
def generator(svc, req):
|
4748
5007
|
tries = 0
|
4749
5008
|
while True:
|
5009
|
+
t = None if deadline is None else deadline - time.time()
|
4750
5010
|
try:
|
4751
5011
|
plumbing_response = svc.stub.List(
|
4752
5012
|
req,
|
4753
5013
|
metadata=svc.parent.get_metadata(
|
4754
5014
|
'RemoteIdentityGroupsHistory.List', req),
|
4755
|
-
timeout=
|
5015
|
+
timeout=t)
|
4756
5016
|
except Exception as e:
|
4757
|
-
if self.parent.shouldRetry(tries, e):
|
5017
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4758
5018
|
tries += 1
|
4759
|
-
|
5019
|
+
time.sleep(
|
5020
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4760
5021
|
continue
|
4761
5022
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4762
5023
|
tries = 0
|
@@ -4784,6 +5045,7 @@ class Replays:
|
|
4784
5045
|
'''
|
4785
5046
|
List gets a list of ReplayChunks for the Query ID specified by the filter criteria.
|
4786
5047
|
'''
|
5048
|
+
deadline = None if timeout is None else time.time() + timeout
|
4787
5049
|
req = ReplayListRequest()
|
4788
5050
|
req.meta.CopyFrom(ListRequestMetadata())
|
4789
5051
|
if self.parent.page_limit > 0:
|
@@ -4796,15 +5058,17 @@ class Replays:
|
|
4796
5058
|
def generator(svc, req):
|
4797
5059
|
tries = 0
|
4798
5060
|
while True:
|
5061
|
+
t = None if deadline is None else deadline - time.time()
|
4799
5062
|
try:
|
4800
5063
|
plumbing_response = svc.stub.List(
|
4801
5064
|
req,
|
4802
5065
|
metadata=svc.parent.get_metadata('Replays.List', req),
|
4803
|
-
timeout=
|
5066
|
+
timeout=t)
|
4804
5067
|
except Exception as e:
|
4805
|
-
if self.parent.shouldRetry(tries, e):
|
5068
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4806
5069
|
tries += 1
|
4807
|
-
|
5070
|
+
time.sleep(
|
5071
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4808
5072
|
continue
|
4809
5073
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4810
5074
|
tries = 0
|
@@ -4938,6 +5202,7 @@ class Resources:
|
|
4938
5202
|
'''
|
4939
5203
|
EnumerateTags gets a list of the filter matching tags.
|
4940
5204
|
'''
|
5205
|
+
deadline = None if timeout is None else time.time() + timeout
|
4941
5206
|
req = EnumerateTagsRequest()
|
4942
5207
|
req.meta.CopyFrom(ListRequestMetadata())
|
4943
5208
|
if self.parent.page_limit > 0:
|
@@ -4950,16 +5215,18 @@ class Resources:
|
|
4950
5215
|
def generator(svc, req):
|
4951
5216
|
tries = 0
|
4952
5217
|
while True:
|
5218
|
+
t = None if deadline is None else deadline - time.time()
|
4953
5219
|
try:
|
4954
5220
|
plumbing_response = svc.stub.EnumerateTags(
|
4955
5221
|
req,
|
4956
5222
|
metadata=svc.parent.get_metadata(
|
4957
5223
|
'Resources.EnumerateTags', req),
|
4958
|
-
timeout=
|
5224
|
+
timeout=t)
|
4959
5225
|
except Exception as e:
|
4960
|
-
if self.parent.shouldRetry(tries, e):
|
5226
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4961
5227
|
tries += 1
|
4962
|
-
|
5228
|
+
time.sleep(
|
5229
|
+
self.parent.exponentialBackoff(tries, deadline))
|
4963
5230
|
continue
|
4964
5231
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4965
5232
|
tries = 0
|
@@ -4975,6 +5242,7 @@ class Resources:
|
|
4975
5242
|
'''
|
4976
5243
|
Create registers a new Resource.
|
4977
5244
|
'''
|
5245
|
+
deadline = None if timeout is None else time.time() + timeout
|
4978
5246
|
req = ResourceCreateRequest()
|
4979
5247
|
|
4980
5248
|
if resource is not None:
|
@@ -4983,15 +5251,16 @@ class Resources:
|
|
4983
5251
|
tries = 0
|
4984
5252
|
plumbing_response = None
|
4985
5253
|
while True:
|
5254
|
+
t = None if deadline is None else deadline - time.time()
|
4986
5255
|
try:
|
4987
5256
|
plumbing_response = self.stub.Create(
|
4988
5257
|
req,
|
4989
5258
|
metadata=self.parent.get_metadata('Resources.Create', req),
|
4990
|
-
timeout=
|
5259
|
+
timeout=t)
|
4991
5260
|
except Exception as e:
|
4992
|
-
if self.parent.shouldRetry(tries, e):
|
5261
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
4993
5262
|
tries += 1
|
4994
|
-
self.parent.
|
5263
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
4995
5264
|
continue
|
4996
5265
|
raise plumbing.convert_error_to_porcelain(e) from e
|
4997
5266
|
break
|
@@ -5009,6 +5278,7 @@ class Resources:
|
|
5009
5278
|
'''
|
5010
5279
|
Get reads one Resource by ID.
|
5011
5280
|
'''
|
5281
|
+
deadline = None if timeout is None else time.time() + timeout
|
5012
5282
|
req = ResourceGetRequest()
|
5013
5283
|
if self.parent.snapshot_datetime is not None:
|
5014
5284
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -5018,15 +5288,16 @@ class Resources:
|
|
5018
5288
|
tries = 0
|
5019
5289
|
plumbing_response = None
|
5020
5290
|
while True:
|
5291
|
+
t = None if deadline is None else deadline - time.time()
|
5021
5292
|
try:
|
5022
5293
|
plumbing_response = self.stub.Get(
|
5023
5294
|
req,
|
5024
5295
|
metadata=self.parent.get_metadata('Resources.Get', req),
|
5025
|
-
timeout=
|
5296
|
+
timeout=t)
|
5026
5297
|
except Exception as e:
|
5027
|
-
if self.parent.shouldRetry(tries, e):
|
5298
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5028
5299
|
tries += 1
|
5029
|
-
self.parent.
|
5300
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5030
5301
|
continue
|
5031
5302
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5032
5303
|
break
|
@@ -5044,6 +5315,7 @@ class Resources:
|
|
5044
5315
|
'''
|
5045
5316
|
Update replaces all the fields of a Resource by ID.
|
5046
5317
|
'''
|
5318
|
+
deadline = None if timeout is None else time.time() + timeout
|
5047
5319
|
req = ResourceUpdateRequest()
|
5048
5320
|
|
5049
5321
|
if resource is not None:
|
@@ -5052,15 +5324,16 @@ class Resources:
|
|
5052
5324
|
tries = 0
|
5053
5325
|
plumbing_response = None
|
5054
5326
|
while True:
|
5327
|
+
t = None if deadline is None else deadline - time.time()
|
5055
5328
|
try:
|
5056
5329
|
plumbing_response = self.stub.Update(
|
5057
5330
|
req,
|
5058
5331
|
metadata=self.parent.get_metadata('Resources.Update', req),
|
5059
|
-
timeout=
|
5332
|
+
timeout=t)
|
5060
5333
|
except Exception as e:
|
5061
|
-
if self.parent.shouldRetry(tries, e):
|
5334
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5062
5335
|
tries += 1
|
5063
|
-
self.parent.
|
5336
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5064
5337
|
continue
|
5065
5338
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5066
5339
|
break
|
@@ -5078,21 +5351,23 @@ class Resources:
|
|
5078
5351
|
'''
|
5079
5352
|
Delete removes a Resource by ID.
|
5080
5353
|
'''
|
5354
|
+
deadline = None if timeout is None else time.time() + timeout
|
5081
5355
|
req = ResourceDeleteRequest()
|
5082
5356
|
|
5083
5357
|
req.id = (id)
|
5084
5358
|
tries = 0
|
5085
5359
|
plumbing_response = None
|
5086
5360
|
while True:
|
5361
|
+
t = None if deadline is None else deadline - time.time()
|
5087
5362
|
try:
|
5088
5363
|
plumbing_response = self.stub.Delete(
|
5089
5364
|
req,
|
5090
5365
|
metadata=self.parent.get_metadata('Resources.Delete', req),
|
5091
|
-
timeout=
|
5366
|
+
timeout=t)
|
5092
5367
|
except Exception as e:
|
5093
|
-
if self.parent.shouldRetry(tries, e):
|
5368
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5094
5369
|
tries += 1
|
5095
|
-
self.parent.
|
5370
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5096
5371
|
continue
|
5097
5372
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5098
5373
|
break
|
@@ -5108,6 +5383,7 @@ class Resources:
|
|
5108
5383
|
'''
|
5109
5384
|
List gets a list of Resources matching a given set of criteria.
|
5110
5385
|
'''
|
5386
|
+
deadline = None if timeout is None else time.time() + timeout
|
5111
5387
|
req = ResourceListRequest()
|
5112
5388
|
req.meta.CopyFrom(ListRequestMetadata())
|
5113
5389
|
if self.parent.page_limit > 0:
|
@@ -5120,16 +5396,18 @@ class Resources:
|
|
5120
5396
|
def generator(svc, req):
|
5121
5397
|
tries = 0
|
5122
5398
|
while True:
|
5399
|
+
t = None if deadline is None else deadline - time.time()
|
5123
5400
|
try:
|
5124
5401
|
plumbing_response = svc.stub.List(
|
5125
5402
|
req,
|
5126
5403
|
metadata=svc.parent.get_metadata(
|
5127
5404
|
'Resources.List', req),
|
5128
|
-
timeout=
|
5405
|
+
timeout=t)
|
5129
5406
|
except Exception as e:
|
5130
|
-
if self.parent.shouldRetry(tries, e):
|
5407
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5131
5408
|
tries += 1
|
5132
|
-
|
5409
|
+
time.sleep(
|
5410
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5133
5411
|
continue
|
5134
5412
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5135
5413
|
tries = 0
|
@@ -5147,22 +5425,24 @@ class Resources:
|
|
5147
5425
|
large network of Nodes. The call will return immediately, and the updated health of the
|
5148
5426
|
Resource can be retrieved via Get or List.
|
5149
5427
|
'''
|
5428
|
+
deadline = None if timeout is None else time.time() + timeout
|
5150
5429
|
req = ResourceHealthcheckRequest()
|
5151
5430
|
|
5152
5431
|
req.id = (id)
|
5153
5432
|
tries = 0
|
5154
5433
|
plumbing_response = None
|
5155
5434
|
while True:
|
5435
|
+
t = None if deadline is None else deadline - time.time()
|
5156
5436
|
try:
|
5157
5437
|
plumbing_response = self.stub.Healthcheck(
|
5158
5438
|
req,
|
5159
5439
|
metadata=self.parent.get_metadata('Resources.Healthcheck',
|
5160
5440
|
req),
|
5161
|
-
timeout=
|
5441
|
+
timeout=t)
|
5162
5442
|
except Exception as e:
|
5163
|
-
if self.parent.shouldRetry(tries, e):
|
5443
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5164
5444
|
tries += 1
|
5165
|
-
self.parent.
|
5445
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5166
5446
|
continue
|
5167
5447
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5168
5448
|
break
|
@@ -5209,6 +5489,7 @@ class ResourcesHistory:
|
|
5209
5489
|
'''
|
5210
5490
|
List gets a list of ResourceHistory records matching a given set of criteria.
|
5211
5491
|
'''
|
5492
|
+
deadline = None if timeout is None else time.time() + timeout
|
5212
5493
|
req = ResourceHistoryListRequest()
|
5213
5494
|
req.meta.CopyFrom(ListRequestMetadata())
|
5214
5495
|
if self.parent.page_limit > 0:
|
@@ -5221,16 +5502,18 @@ class ResourcesHistory:
|
|
5221
5502
|
def generator(svc, req):
|
5222
5503
|
tries = 0
|
5223
5504
|
while True:
|
5505
|
+
t = None if deadline is None else deadline - time.time()
|
5224
5506
|
try:
|
5225
5507
|
plumbing_response = svc.stub.List(
|
5226
5508
|
req,
|
5227
5509
|
metadata=svc.parent.get_metadata(
|
5228
5510
|
'ResourcesHistory.List', req),
|
5229
|
-
timeout=
|
5511
|
+
timeout=t)
|
5230
5512
|
except Exception as e:
|
5231
|
-
if self.parent.shouldRetry(tries, e):
|
5513
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5232
5514
|
tries += 1
|
5233
|
-
|
5515
|
+
time.sleep(
|
5516
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5234
5517
|
continue
|
5235
5518
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5236
5519
|
tries = 0
|
@@ -5258,6 +5541,7 @@ class RoleResources:
|
|
5258
5541
|
'''
|
5259
5542
|
List gets a list of RoleResource records matching a given set of criteria.
|
5260
5543
|
'''
|
5544
|
+
deadline = None if timeout is None else time.time() + timeout
|
5261
5545
|
req = RoleResourceListRequest()
|
5262
5546
|
req.meta.CopyFrom(ListRequestMetadata())
|
5263
5547
|
if self.parent.page_limit > 0:
|
@@ -5270,16 +5554,18 @@ class RoleResources:
|
|
5270
5554
|
def generator(svc, req):
|
5271
5555
|
tries = 0
|
5272
5556
|
while True:
|
5557
|
+
t = None if deadline is None else deadline - time.time()
|
5273
5558
|
try:
|
5274
5559
|
plumbing_response = svc.stub.List(
|
5275
5560
|
req,
|
5276
5561
|
metadata=svc.parent.get_metadata(
|
5277
5562
|
'RoleResources.List', req),
|
5278
|
-
timeout=
|
5563
|
+
timeout=t)
|
5279
5564
|
except Exception as e:
|
5280
|
-
if self.parent.shouldRetry(tries, e):
|
5565
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5281
5566
|
tries += 1
|
5282
|
-
|
5567
|
+
time.sleep(
|
5568
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5283
5569
|
continue
|
5284
5570
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5285
5571
|
tries = 0
|
@@ -5321,6 +5607,7 @@ class RoleResourcesHistory:
|
|
5321
5607
|
'''
|
5322
5608
|
List gets a list of RoleResourceHistory records matching a given set of criteria.
|
5323
5609
|
'''
|
5610
|
+
deadline = None if timeout is None else time.time() + timeout
|
5324
5611
|
req = RoleResourceHistoryListRequest()
|
5325
5612
|
req.meta.CopyFrom(ListRequestMetadata())
|
5326
5613
|
if self.parent.page_limit > 0:
|
@@ -5333,16 +5620,18 @@ class RoleResourcesHistory:
|
|
5333
5620
|
def generator(svc, req):
|
5334
5621
|
tries = 0
|
5335
5622
|
while True:
|
5623
|
+
t = None if deadline is None else deadline - time.time()
|
5336
5624
|
try:
|
5337
5625
|
plumbing_response = svc.stub.List(
|
5338
5626
|
req,
|
5339
5627
|
metadata=svc.parent.get_metadata(
|
5340
5628
|
'RoleResourcesHistory.List', req),
|
5341
|
-
timeout=
|
5629
|
+
timeout=t)
|
5342
5630
|
except Exception as e:
|
5343
|
-
if self.parent.shouldRetry(tries, e):
|
5631
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5344
5632
|
tries += 1
|
5345
|
-
|
5633
|
+
time.sleep(
|
5634
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5346
5635
|
continue
|
5347
5636
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5348
5637
|
tries = 0
|
@@ -5371,6 +5660,7 @@ class Roles:
|
|
5371
5660
|
'''
|
5372
5661
|
Create registers a new Role.
|
5373
5662
|
'''
|
5663
|
+
deadline = None if timeout is None else time.time() + timeout
|
5374
5664
|
req = RoleCreateRequest()
|
5375
5665
|
|
5376
5666
|
if role is not None:
|
@@ -5378,15 +5668,16 @@ class Roles:
|
|
5378
5668
|
tries = 0
|
5379
5669
|
plumbing_response = None
|
5380
5670
|
while True:
|
5671
|
+
t = None if deadline is None else deadline - time.time()
|
5381
5672
|
try:
|
5382
5673
|
plumbing_response = self.stub.Create(
|
5383
5674
|
req,
|
5384
5675
|
metadata=self.parent.get_metadata('Roles.Create', req),
|
5385
|
-
timeout=
|
5676
|
+
timeout=t)
|
5386
5677
|
except Exception as e:
|
5387
|
-
if self.parent.shouldRetry(tries, e):
|
5678
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5388
5679
|
tries += 1
|
5389
|
-
self.parent.
|
5680
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5390
5681
|
continue
|
5391
5682
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5392
5683
|
break
|
@@ -5403,6 +5694,7 @@ class Roles:
|
|
5403
5694
|
'''
|
5404
5695
|
Get reads one Role by ID.
|
5405
5696
|
'''
|
5697
|
+
deadline = None if timeout is None else time.time() + timeout
|
5406
5698
|
req = RoleGetRequest()
|
5407
5699
|
if self.parent.snapshot_datetime is not None:
|
5408
5700
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -5412,15 +5704,16 @@ class Roles:
|
|
5412
5704
|
tries = 0
|
5413
5705
|
plumbing_response = None
|
5414
5706
|
while True:
|
5707
|
+
t = None if deadline is None else deadline - time.time()
|
5415
5708
|
try:
|
5416
5709
|
plumbing_response = self.stub.Get(
|
5417
5710
|
req,
|
5418
5711
|
metadata=self.parent.get_metadata('Roles.Get', req),
|
5419
|
-
timeout=
|
5712
|
+
timeout=t)
|
5420
5713
|
except Exception as e:
|
5421
|
-
if self.parent.shouldRetry(tries, e):
|
5714
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5422
5715
|
tries += 1
|
5423
|
-
self.parent.
|
5716
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5424
5717
|
continue
|
5425
5718
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5426
5719
|
break
|
@@ -5437,6 +5730,7 @@ class Roles:
|
|
5437
5730
|
'''
|
5438
5731
|
Update replaces all the fields of a Role by ID.
|
5439
5732
|
'''
|
5733
|
+
deadline = None if timeout is None else time.time() + timeout
|
5440
5734
|
req = RoleUpdateRequest()
|
5441
5735
|
|
5442
5736
|
if role is not None:
|
@@ -5444,15 +5738,16 @@ class Roles:
|
|
5444
5738
|
tries = 0
|
5445
5739
|
plumbing_response = None
|
5446
5740
|
while True:
|
5741
|
+
t = None if deadline is None else deadline - time.time()
|
5447
5742
|
try:
|
5448
5743
|
plumbing_response = self.stub.Update(
|
5449
5744
|
req,
|
5450
5745
|
metadata=self.parent.get_metadata('Roles.Update', req),
|
5451
|
-
timeout=
|
5746
|
+
timeout=t)
|
5452
5747
|
except Exception as e:
|
5453
|
-
if self.parent.shouldRetry(tries, e):
|
5748
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5454
5749
|
tries += 1
|
5455
|
-
self.parent.
|
5750
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5456
5751
|
continue
|
5457
5752
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5458
5753
|
break
|
@@ -5469,21 +5764,23 @@ class Roles:
|
|
5469
5764
|
'''
|
5470
5765
|
Delete removes a Role by ID.
|
5471
5766
|
'''
|
5767
|
+
deadline = None if timeout is None else time.time() + timeout
|
5472
5768
|
req = RoleDeleteRequest()
|
5473
5769
|
|
5474
5770
|
req.id = (id)
|
5475
5771
|
tries = 0
|
5476
5772
|
plumbing_response = None
|
5477
5773
|
while True:
|
5774
|
+
t = None if deadline is None else deadline - time.time()
|
5478
5775
|
try:
|
5479
5776
|
plumbing_response = self.stub.Delete(
|
5480
5777
|
req,
|
5481
5778
|
metadata=self.parent.get_metadata('Roles.Delete', req),
|
5482
|
-
timeout=
|
5779
|
+
timeout=t)
|
5483
5780
|
except Exception as e:
|
5484
|
-
if self.parent.shouldRetry(tries, e):
|
5781
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5485
5782
|
tries += 1
|
5486
|
-
self.parent.
|
5783
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5487
5784
|
continue
|
5488
5785
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5489
5786
|
break
|
@@ -5499,6 +5796,7 @@ class Roles:
|
|
5499
5796
|
'''
|
5500
5797
|
List gets a list of Roles matching a given set of criteria.
|
5501
5798
|
'''
|
5799
|
+
deadline = None if timeout is None else time.time() + timeout
|
5502
5800
|
req = RoleListRequest()
|
5503
5801
|
req.meta.CopyFrom(ListRequestMetadata())
|
5504
5802
|
if self.parent.page_limit > 0:
|
@@ -5511,15 +5809,17 @@ class Roles:
|
|
5511
5809
|
def generator(svc, req):
|
5512
5810
|
tries = 0
|
5513
5811
|
while True:
|
5812
|
+
t = None if deadline is None else deadline - time.time()
|
5514
5813
|
try:
|
5515
5814
|
plumbing_response = svc.stub.List(
|
5516
5815
|
req,
|
5517
5816
|
metadata=svc.parent.get_metadata('Roles.List', req),
|
5518
|
-
timeout=
|
5817
|
+
timeout=t)
|
5519
5818
|
except Exception as e:
|
5520
|
-
if self.parent.shouldRetry(tries, e):
|
5819
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5521
5820
|
tries += 1
|
5522
|
-
|
5821
|
+
time.sleep(
|
5822
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5523
5823
|
continue
|
5524
5824
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5525
5825
|
tries = 0
|
@@ -5566,6 +5866,7 @@ class RolesHistory:
|
|
5566
5866
|
'''
|
5567
5867
|
List gets a list of RoleHistory records matching a given set of criteria.
|
5568
5868
|
'''
|
5869
|
+
deadline = None if timeout is None else time.time() + timeout
|
5569
5870
|
req = RoleHistoryListRequest()
|
5570
5871
|
req.meta.CopyFrom(ListRequestMetadata())
|
5571
5872
|
if self.parent.page_limit > 0:
|
@@ -5578,16 +5879,18 @@ class RolesHistory:
|
|
5578
5879
|
def generator(svc, req):
|
5579
5880
|
tries = 0
|
5580
5881
|
while True:
|
5882
|
+
t = None if deadline is None else deadline - time.time()
|
5581
5883
|
try:
|
5582
5884
|
plumbing_response = svc.stub.List(
|
5583
5885
|
req,
|
5584
5886
|
metadata=svc.parent.get_metadata(
|
5585
5887
|
'RolesHistory.List', req),
|
5586
|
-
timeout=
|
5888
|
+
timeout=t)
|
5587
5889
|
except Exception as e:
|
5588
|
-
if self.parent.shouldRetry(tries, e):
|
5890
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5589
5891
|
tries += 1
|
5590
|
-
|
5892
|
+
time.sleep(
|
5893
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5591
5894
|
continue
|
5592
5895
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5593
5896
|
tries = 0
|
@@ -5634,6 +5937,7 @@ class SecretStores:
|
|
5634
5937
|
self.stub = SecretStoresStub(channel)
|
5635
5938
|
|
5636
5939
|
def create(self, secret_store, timeout=None):
|
5940
|
+
deadline = None if timeout is None else time.time() + timeout
|
5637
5941
|
req = SecretStoreCreateRequest()
|
5638
5942
|
|
5639
5943
|
if secret_store is not None:
|
@@ -5642,16 +5946,17 @@ class SecretStores:
|
|
5642
5946
|
tries = 0
|
5643
5947
|
plumbing_response = None
|
5644
5948
|
while True:
|
5949
|
+
t = None if deadline is None else deadline - time.time()
|
5645
5950
|
try:
|
5646
5951
|
plumbing_response = self.stub.Create(
|
5647
5952
|
req,
|
5648
5953
|
metadata=self.parent.get_metadata('SecretStores.Create',
|
5649
5954
|
req),
|
5650
|
-
timeout=
|
5955
|
+
timeout=t)
|
5651
5956
|
except Exception as e:
|
5652
|
-
if self.parent.shouldRetry(tries, e):
|
5957
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5653
5958
|
tries += 1
|
5654
|
-
self.parent.
|
5959
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5655
5960
|
continue
|
5656
5961
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5657
5962
|
break
|
@@ -5669,6 +5974,7 @@ class SecretStores:
|
|
5669
5974
|
'''
|
5670
5975
|
Get reads one SecretStore by ID.
|
5671
5976
|
'''
|
5977
|
+
deadline = None if timeout is None else time.time() + timeout
|
5672
5978
|
req = SecretStoreGetRequest()
|
5673
5979
|
if self.parent.snapshot_datetime is not None:
|
5674
5980
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -5678,15 +5984,16 @@ class SecretStores:
|
|
5678
5984
|
tries = 0
|
5679
5985
|
plumbing_response = None
|
5680
5986
|
while True:
|
5987
|
+
t = None if deadline is None else deadline - time.time()
|
5681
5988
|
try:
|
5682
5989
|
plumbing_response = self.stub.Get(
|
5683
5990
|
req,
|
5684
5991
|
metadata=self.parent.get_metadata('SecretStores.Get', req),
|
5685
|
-
timeout=
|
5992
|
+
timeout=t)
|
5686
5993
|
except Exception as e:
|
5687
|
-
if self.parent.shouldRetry(tries, e):
|
5994
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5688
5995
|
tries += 1
|
5689
|
-
self.parent.
|
5996
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5690
5997
|
continue
|
5691
5998
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5692
5999
|
break
|
@@ -5704,6 +6011,7 @@ class SecretStores:
|
|
5704
6011
|
'''
|
5705
6012
|
Update replaces all the fields of a SecretStore by ID.
|
5706
6013
|
'''
|
6014
|
+
deadline = None if timeout is None else time.time() + timeout
|
5707
6015
|
req = SecretStoreUpdateRequest()
|
5708
6016
|
|
5709
6017
|
if secret_store is not None:
|
@@ -5712,16 +6020,17 @@ class SecretStores:
|
|
5712
6020
|
tries = 0
|
5713
6021
|
plumbing_response = None
|
5714
6022
|
while True:
|
6023
|
+
t = None if deadline is None else deadline - time.time()
|
5715
6024
|
try:
|
5716
6025
|
plumbing_response = self.stub.Update(
|
5717
6026
|
req,
|
5718
6027
|
metadata=self.parent.get_metadata('SecretStores.Update',
|
5719
6028
|
req),
|
5720
|
-
timeout=
|
6029
|
+
timeout=t)
|
5721
6030
|
except Exception as e:
|
5722
|
-
if self.parent.shouldRetry(tries, e):
|
6031
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5723
6032
|
tries += 1
|
5724
|
-
self.parent.
|
6033
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5725
6034
|
continue
|
5726
6035
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5727
6036
|
break
|
@@ -5739,22 +6048,24 @@ class SecretStores:
|
|
5739
6048
|
'''
|
5740
6049
|
Delete removes a SecretStore by ID.
|
5741
6050
|
'''
|
6051
|
+
deadline = None if timeout is None else time.time() + timeout
|
5742
6052
|
req = SecretStoreDeleteRequest()
|
5743
6053
|
|
5744
6054
|
req.id = (id)
|
5745
6055
|
tries = 0
|
5746
6056
|
plumbing_response = None
|
5747
6057
|
while True:
|
6058
|
+
t = None if deadline is None else deadline - time.time()
|
5748
6059
|
try:
|
5749
6060
|
plumbing_response = self.stub.Delete(
|
5750
6061
|
req,
|
5751
6062
|
metadata=self.parent.get_metadata('SecretStores.Delete',
|
5752
6063
|
req),
|
5753
|
-
timeout=
|
6064
|
+
timeout=t)
|
5754
6065
|
except Exception as e:
|
5755
|
-
if self.parent.shouldRetry(tries, e):
|
6066
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5756
6067
|
tries += 1
|
5757
|
-
self.parent.
|
6068
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5758
6069
|
continue
|
5759
6070
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5760
6071
|
break
|
@@ -5770,6 +6081,7 @@ class SecretStores:
|
|
5770
6081
|
'''
|
5771
6082
|
List gets a list of SecretStores matching a given set of criteria.
|
5772
6083
|
'''
|
6084
|
+
deadline = None if timeout is None else time.time() + timeout
|
5773
6085
|
req = SecretStoreListRequest()
|
5774
6086
|
req.meta.CopyFrom(ListRequestMetadata())
|
5775
6087
|
if self.parent.page_limit > 0:
|
@@ -5782,16 +6094,18 @@ class SecretStores:
|
|
5782
6094
|
def generator(svc, req):
|
5783
6095
|
tries = 0
|
5784
6096
|
while True:
|
6097
|
+
t = None if deadline is None else deadline - time.time()
|
5785
6098
|
try:
|
5786
6099
|
plumbing_response = svc.stub.List(
|
5787
6100
|
req,
|
5788
6101
|
metadata=svc.parent.get_metadata(
|
5789
6102
|
'SecretStores.List', req),
|
5790
|
-
timeout=
|
6103
|
+
timeout=t)
|
5791
6104
|
except Exception as e:
|
5792
|
-
if self.parent.shouldRetry(tries, e):
|
6105
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5793
6106
|
tries += 1
|
5794
|
-
|
6107
|
+
time.sleep(
|
6108
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5795
6109
|
continue
|
5796
6110
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5797
6111
|
tries = 0
|
@@ -5841,6 +6155,7 @@ class SecretEngines:
|
|
5841
6155
|
'''
|
5842
6156
|
List returns a list of Secret Engines
|
5843
6157
|
'''
|
6158
|
+
deadline = None if timeout is None else time.time() + timeout
|
5844
6159
|
req = SecretEngineListRequest()
|
5845
6160
|
req.meta.CopyFrom(ListRequestMetadata())
|
5846
6161
|
if self.parent.page_limit > 0:
|
@@ -5853,16 +6168,18 @@ class SecretEngines:
|
|
5853
6168
|
def generator(svc, req):
|
5854
6169
|
tries = 0
|
5855
6170
|
while True:
|
6171
|
+
t = None if deadline is None else deadline - time.time()
|
5856
6172
|
try:
|
5857
6173
|
plumbing_response = svc.stub.List(
|
5858
6174
|
req,
|
5859
6175
|
metadata=svc.parent.get_metadata(
|
5860
6176
|
'SecretEngines.List', req),
|
5861
|
-
timeout=
|
6177
|
+
timeout=t)
|
5862
6178
|
except Exception as e:
|
5863
|
-
if self.parent.shouldRetry(tries, e):
|
6179
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5864
6180
|
tries += 1
|
5865
|
-
|
6181
|
+
time.sleep(
|
6182
|
+
self.parent.exponentialBackoff(tries, deadline))
|
5866
6183
|
continue
|
5867
6184
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5868
6185
|
tries = 0
|
@@ -5879,6 +6196,7 @@ class SecretEngines:
|
|
5879
6196
|
'''
|
5880
6197
|
Get returns a secret engine details
|
5881
6198
|
'''
|
6199
|
+
deadline = None if timeout is None else time.time() + timeout
|
5882
6200
|
req = SecretEngineGetRequest()
|
5883
6201
|
if self.parent.snapshot_datetime is not None:
|
5884
6202
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -5888,16 +6206,17 @@ class SecretEngines:
|
|
5888
6206
|
tries = 0
|
5889
6207
|
plumbing_response = None
|
5890
6208
|
while True:
|
6209
|
+
t = None if deadline is None else deadline - time.time()
|
5891
6210
|
try:
|
5892
6211
|
plumbing_response = self.stub.Get(
|
5893
6212
|
req,
|
5894
6213
|
metadata=self.parent.get_metadata('SecretEngines.Get',
|
5895
6214
|
req),
|
5896
|
-
timeout=
|
6215
|
+
timeout=t)
|
5897
6216
|
except Exception as e:
|
5898
|
-
if self.parent.shouldRetry(tries, e):
|
6217
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5899
6218
|
tries += 1
|
5900
|
-
self.parent.
|
6219
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5901
6220
|
continue
|
5902
6221
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5903
6222
|
break
|
@@ -5915,6 +6234,7 @@ class SecretEngines:
|
|
5915
6234
|
'''
|
5916
6235
|
Create creates a secret engine
|
5917
6236
|
'''
|
6237
|
+
deadline = None if timeout is None else time.time() + timeout
|
5918
6238
|
req = SecretEngineCreateRequest()
|
5919
6239
|
|
5920
6240
|
if secret_engine is not None:
|
@@ -5923,16 +6243,17 @@ class SecretEngines:
|
|
5923
6243
|
tries = 0
|
5924
6244
|
plumbing_response = None
|
5925
6245
|
while True:
|
6246
|
+
t = None if deadline is None else deadline - time.time()
|
5926
6247
|
try:
|
5927
6248
|
plumbing_response = self.stub.Create(
|
5928
6249
|
req,
|
5929
6250
|
metadata=self.parent.get_metadata('SecretEngines.Create',
|
5930
6251
|
req),
|
5931
|
-
timeout=
|
6252
|
+
timeout=t)
|
5932
6253
|
except Exception as e:
|
5933
|
-
if self.parent.shouldRetry(tries, e):
|
6254
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5934
6255
|
tries += 1
|
5935
|
-
self.parent.
|
6256
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5936
6257
|
continue
|
5937
6258
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5938
6259
|
break
|
@@ -5950,6 +6271,7 @@ class SecretEngines:
|
|
5950
6271
|
'''
|
5951
6272
|
Update updates a secret engine
|
5952
6273
|
'''
|
6274
|
+
deadline = None if timeout is None else time.time() + timeout
|
5953
6275
|
req = SecretEngineUpdateRequest()
|
5954
6276
|
|
5955
6277
|
if secret_engine is not None:
|
@@ -5958,16 +6280,17 @@ class SecretEngines:
|
|
5958
6280
|
tries = 0
|
5959
6281
|
plumbing_response = None
|
5960
6282
|
while True:
|
6283
|
+
t = None if deadline is None else deadline - time.time()
|
5961
6284
|
try:
|
5962
6285
|
plumbing_response = self.stub.Update(
|
5963
6286
|
req,
|
5964
6287
|
metadata=self.parent.get_metadata('SecretEngines.Update',
|
5965
6288
|
req),
|
5966
|
-
timeout=
|
6289
|
+
timeout=t)
|
5967
6290
|
except Exception as e:
|
5968
|
-
if self.parent.shouldRetry(tries, e):
|
6291
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
5969
6292
|
tries += 1
|
5970
|
-
self.parent.
|
6293
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
5971
6294
|
continue
|
5972
6295
|
raise plumbing.convert_error_to_porcelain(e) from e
|
5973
6296
|
break
|
@@ -5985,22 +6308,24 @@ class SecretEngines:
|
|
5985
6308
|
'''
|
5986
6309
|
Delete deletes a secret engine
|
5987
6310
|
'''
|
6311
|
+
deadline = None if timeout is None else time.time() + timeout
|
5988
6312
|
req = SecretEngineDeleteRequest()
|
5989
6313
|
|
5990
6314
|
req.id = (id)
|
5991
6315
|
tries = 0
|
5992
6316
|
plumbing_response = None
|
5993
6317
|
while True:
|
6318
|
+
t = None if deadline is None else deadline - time.time()
|
5994
6319
|
try:
|
5995
6320
|
plumbing_response = self.stub.Delete(
|
5996
6321
|
req,
|
5997
6322
|
metadata=self.parent.get_metadata('SecretEngines.Delete',
|
5998
6323
|
req),
|
5999
|
-
timeout=
|
6324
|
+
timeout=t)
|
6000
6325
|
except Exception as e:
|
6001
|
-
if self.parent.shouldRetry(tries, e):
|
6326
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6002
6327
|
tries += 1
|
6003
|
-
self.parent.
|
6328
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6004
6329
|
continue
|
6005
6330
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6006
6331
|
break
|
@@ -6015,6 +6340,7 @@ class SecretEngines:
|
|
6015
6340
|
ListSecretStores returns a list of Secret Stores that can be used as a backing store
|
6016
6341
|
for Secret Engine
|
6017
6342
|
'''
|
6343
|
+
deadline = None if timeout is None else time.time() + timeout
|
6018
6344
|
req = SecretStoreListRequest()
|
6019
6345
|
req.meta.CopyFrom(ListRequestMetadata())
|
6020
6346
|
if self.parent.page_limit > 0:
|
@@ -6027,16 +6353,18 @@ class SecretEngines:
|
|
6027
6353
|
def generator(svc, req):
|
6028
6354
|
tries = 0
|
6029
6355
|
while True:
|
6356
|
+
t = None if deadline is None else deadline - time.time()
|
6030
6357
|
try:
|
6031
6358
|
plumbing_response = svc.stub.ListSecretStores(
|
6032
6359
|
req,
|
6033
6360
|
metadata=svc.parent.get_metadata(
|
6034
6361
|
'SecretEngines.ListSecretStores', req),
|
6035
|
-
timeout=
|
6362
|
+
timeout=t)
|
6036
6363
|
except Exception as e:
|
6037
|
-
if self.parent.shouldRetry(tries, e):
|
6364
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6038
6365
|
tries += 1
|
6039
|
-
|
6366
|
+
time.sleep(
|
6367
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6040
6368
|
continue
|
6041
6369
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6042
6370
|
tries = 0
|
@@ -6053,22 +6381,24 @@ class SecretEngines:
|
|
6053
6381
|
'''
|
6054
6382
|
GenerateKeys generates a private key, stores it in a secret store and stores a public key in a secret engine
|
6055
6383
|
'''
|
6384
|
+
deadline = None if timeout is None else time.time() + timeout
|
6056
6385
|
req = GenerateKeysRequest()
|
6057
6386
|
|
6058
6387
|
req.secret_engine_id = (secret_engine_id)
|
6059
6388
|
tries = 0
|
6060
6389
|
plumbing_response = None
|
6061
6390
|
while True:
|
6391
|
+
t = None if deadline is None else deadline - time.time()
|
6062
6392
|
try:
|
6063
6393
|
plumbing_response = self.stub.GenerateKeys(
|
6064
6394
|
req,
|
6065
6395
|
metadata=self.parent.get_metadata(
|
6066
6396
|
'SecretEngines.GenerateKeys', req),
|
6067
|
-
timeout=
|
6397
|
+
timeout=t)
|
6068
6398
|
except Exception as e:
|
6069
|
-
if self.parent.shouldRetry(tries, e):
|
6399
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6070
6400
|
tries += 1
|
6071
|
-
self.parent.
|
6401
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6072
6402
|
continue
|
6073
6403
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6074
6404
|
break
|
@@ -6082,22 +6412,24 @@ class SecretEngines:
|
|
6082
6412
|
'''
|
6083
6413
|
Healthcheck triggers a healthcheck for all nodes serving a secret engine
|
6084
6414
|
'''
|
6415
|
+
deadline = None if timeout is None else time.time() + timeout
|
6085
6416
|
req = HealthcheckRequest()
|
6086
6417
|
|
6087
6418
|
req.secret_engine_id = (secret_engine_id)
|
6088
6419
|
tries = 0
|
6089
6420
|
plumbing_response = None
|
6090
6421
|
while True:
|
6422
|
+
t = None if deadline is None else deadline - time.time()
|
6091
6423
|
try:
|
6092
6424
|
plumbing_response = self.stub.Healthcheck(
|
6093
6425
|
req,
|
6094
6426
|
metadata=self.parent.get_metadata(
|
6095
6427
|
'SecretEngines.Healthcheck', req),
|
6096
|
-
timeout=
|
6428
|
+
timeout=t)
|
6097
6429
|
except Exception as e:
|
6098
|
-
if self.parent.shouldRetry(tries, e):
|
6430
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6099
6431
|
tries += 1
|
6100
|
-
self.parent.
|
6432
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6101
6433
|
continue
|
6102
6434
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6103
6435
|
break
|
@@ -6113,6 +6445,7 @@ class SecretEngines:
|
|
6113
6445
|
'''
|
6114
6446
|
Rotate rotates secret engine's credentials
|
6115
6447
|
'''
|
6448
|
+
deadline = None if timeout is None else time.time() + timeout
|
6116
6449
|
req = SecretEngineRotateRequest()
|
6117
6450
|
|
6118
6451
|
req.id = (id)
|
@@ -6123,16 +6456,17 @@ class SecretEngines:
|
|
6123
6456
|
tries = 0
|
6124
6457
|
plumbing_response = None
|
6125
6458
|
while True:
|
6459
|
+
t = None if deadline is None else deadline - time.time()
|
6126
6460
|
try:
|
6127
6461
|
plumbing_response = self.stub.Rotate(
|
6128
6462
|
req,
|
6129
6463
|
metadata=self.parent.get_metadata('SecretEngines.Rotate',
|
6130
6464
|
req),
|
6131
|
-
timeout=
|
6465
|
+
timeout=t)
|
6132
6466
|
except Exception as e:
|
6133
|
-
if self.parent.shouldRetry(tries, e):
|
6467
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6134
6468
|
tries += 1
|
6135
|
-
self.parent.
|
6469
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6136
6470
|
continue
|
6137
6471
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6138
6472
|
break
|
@@ -6156,6 +6490,7 @@ class SecretStoreHealths:
|
|
6156
6490
|
'''
|
6157
6491
|
List reports the health status of node to secret store pairs.
|
6158
6492
|
'''
|
6493
|
+
deadline = None if timeout is None else time.time() + timeout
|
6159
6494
|
req = SecretStoreHealthListRequest()
|
6160
6495
|
req.meta.CopyFrom(ListRequestMetadata())
|
6161
6496
|
if self.parent.page_limit > 0:
|
@@ -6168,16 +6503,18 @@ class SecretStoreHealths:
|
|
6168
6503
|
def generator(svc, req):
|
6169
6504
|
tries = 0
|
6170
6505
|
while True:
|
6506
|
+
t = None if deadline is None else deadline - time.time()
|
6171
6507
|
try:
|
6172
6508
|
plumbing_response = svc.stub.List(
|
6173
6509
|
req,
|
6174
6510
|
metadata=svc.parent.get_metadata(
|
6175
6511
|
'SecretStoreHealths.List', req),
|
6176
|
-
timeout=
|
6512
|
+
timeout=t)
|
6177
6513
|
except Exception as e:
|
6178
|
-
if self.parent.shouldRetry(tries, e):
|
6514
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6179
6515
|
tries += 1
|
6180
|
-
|
6516
|
+
time.sleep(
|
6517
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6181
6518
|
continue
|
6182
6519
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6183
6520
|
tries = 0
|
@@ -6196,22 +6533,24 @@ class SecretStoreHealths:
|
|
6196
6533
|
to propagate across a large network of Nodes. The call will return immediately, and the
|
6197
6534
|
updated health of the Secret Store can be retrieved via List.
|
6198
6535
|
'''
|
6536
|
+
deadline = None if timeout is None else time.time() + timeout
|
6199
6537
|
req = SecretStoreHealthcheckRequest()
|
6200
6538
|
|
6201
6539
|
req.secret_store_id = (secret_store_id)
|
6202
6540
|
tries = 0
|
6203
6541
|
plumbing_response = None
|
6204
6542
|
while True:
|
6543
|
+
t = None if deadline is None else deadline - time.time()
|
6205
6544
|
try:
|
6206
6545
|
plumbing_response = self.stub.Healthcheck(
|
6207
6546
|
req,
|
6208
6547
|
metadata=self.parent.get_metadata(
|
6209
6548
|
'SecretStoreHealths.Healthcheck', req),
|
6210
|
-
timeout=
|
6549
|
+
timeout=t)
|
6211
6550
|
except Exception as e:
|
6212
|
-
if self.parent.shouldRetry(tries, e):
|
6551
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6213
6552
|
tries += 1
|
6214
|
-
self.parent.
|
6553
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6215
6554
|
continue
|
6216
6555
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6217
6556
|
break
|
@@ -6235,6 +6574,7 @@ class SecretStoresHistory:
|
|
6235
6574
|
'''
|
6236
6575
|
List gets a list of SecretStoreHistory records matching a given set of criteria.
|
6237
6576
|
'''
|
6577
|
+
deadline = None if timeout is None else time.time() + timeout
|
6238
6578
|
req = SecretStoreHistoryListRequest()
|
6239
6579
|
req.meta.CopyFrom(ListRequestMetadata())
|
6240
6580
|
if self.parent.page_limit > 0:
|
@@ -6247,16 +6587,18 @@ class SecretStoresHistory:
|
|
6247
6587
|
def generator(svc, req):
|
6248
6588
|
tries = 0
|
6249
6589
|
while True:
|
6590
|
+
t = None if deadline is None else deadline - time.time()
|
6250
6591
|
try:
|
6251
6592
|
plumbing_response = svc.stub.List(
|
6252
6593
|
req,
|
6253
6594
|
metadata=svc.parent.get_metadata(
|
6254
6595
|
'SecretStoresHistory.List', req),
|
6255
|
-
timeout=
|
6596
|
+
timeout=t)
|
6256
6597
|
except Exception as e:
|
6257
|
-
if self.parent.shouldRetry(tries, e):
|
6598
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6258
6599
|
tries += 1
|
6259
|
-
|
6600
|
+
time.sleep(
|
6601
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6260
6602
|
continue
|
6261
6603
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6262
6604
|
tries = 0
|
@@ -6283,6 +6625,7 @@ class WorkflowApprovers:
|
|
6283
6625
|
'''
|
6284
6626
|
Create creates a new workflow approver
|
6285
6627
|
'''
|
6628
|
+
deadline = None if timeout is None else time.time() + timeout
|
6286
6629
|
req = WorkflowApproversCreateRequest()
|
6287
6630
|
|
6288
6631
|
if workflow_approver is not None:
|
@@ -6292,16 +6635,17 @@ class WorkflowApprovers:
|
|
6292
6635
|
tries = 0
|
6293
6636
|
plumbing_response = None
|
6294
6637
|
while True:
|
6638
|
+
t = None if deadline is None else deadline - time.time()
|
6295
6639
|
try:
|
6296
6640
|
plumbing_response = self.stub.Create(
|
6297
6641
|
req,
|
6298
6642
|
metadata=self.parent.get_metadata(
|
6299
6643
|
'WorkflowApprovers.Create', req),
|
6300
|
-
timeout=
|
6644
|
+
timeout=t)
|
6301
6645
|
except Exception as e:
|
6302
|
-
if self.parent.shouldRetry(tries, e):
|
6646
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6303
6647
|
tries += 1
|
6304
|
-
self.parent.
|
6648
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6305
6649
|
continue
|
6306
6650
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6307
6651
|
break
|
@@ -6317,6 +6661,7 @@ class WorkflowApprovers:
|
|
6317
6661
|
'''
|
6318
6662
|
Get reads one workflow approver by ID.
|
6319
6663
|
'''
|
6664
|
+
deadline = None if timeout is None else time.time() + timeout
|
6320
6665
|
req = WorkflowApproverGetRequest()
|
6321
6666
|
if self.parent.snapshot_datetime is not None:
|
6322
6667
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -6326,16 +6671,17 @@ class WorkflowApprovers:
|
|
6326
6671
|
tries = 0
|
6327
6672
|
plumbing_response = None
|
6328
6673
|
while True:
|
6674
|
+
t = None if deadline is None else deadline - time.time()
|
6329
6675
|
try:
|
6330
6676
|
plumbing_response = self.stub.Get(
|
6331
6677
|
req,
|
6332
6678
|
metadata=self.parent.get_metadata('WorkflowApprovers.Get',
|
6333
6679
|
req),
|
6334
|
-
timeout=
|
6680
|
+
timeout=t)
|
6335
6681
|
except Exception as e:
|
6336
|
-
if self.parent.shouldRetry(tries, e):
|
6682
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6337
6683
|
tries += 1
|
6338
|
-
self.parent.
|
6684
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6339
6685
|
continue
|
6340
6686
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6341
6687
|
break
|
@@ -6353,22 +6699,24 @@ class WorkflowApprovers:
|
|
6353
6699
|
'''
|
6354
6700
|
Delete deletes a workflow approver
|
6355
6701
|
'''
|
6702
|
+
deadline = None if timeout is None else time.time() + timeout
|
6356
6703
|
req = WorkflowApproversDeleteRequest()
|
6357
6704
|
|
6358
6705
|
req.id = (id)
|
6359
6706
|
tries = 0
|
6360
6707
|
plumbing_response = None
|
6361
6708
|
while True:
|
6709
|
+
t = None if deadline is None else deadline - time.time()
|
6362
6710
|
try:
|
6363
6711
|
plumbing_response = self.stub.Delete(
|
6364
6712
|
req,
|
6365
6713
|
metadata=self.parent.get_metadata(
|
6366
6714
|
'WorkflowApprovers.Delete', req),
|
6367
|
-
timeout=
|
6715
|
+
timeout=t)
|
6368
6716
|
except Exception as e:
|
6369
|
-
if self.parent.shouldRetry(tries, e):
|
6717
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6370
6718
|
tries += 1
|
6371
|
-
self.parent.
|
6719
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6372
6720
|
continue
|
6373
6721
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6374
6722
|
break
|
@@ -6382,6 +6730,7 @@ class WorkflowApprovers:
|
|
6382
6730
|
'''
|
6383
6731
|
Lists existing workflow approvers.
|
6384
6732
|
'''
|
6733
|
+
deadline = None if timeout is None else time.time() + timeout
|
6385
6734
|
req = WorkflowApproversListRequest()
|
6386
6735
|
req.meta.CopyFrom(ListRequestMetadata())
|
6387
6736
|
if self.parent.page_limit > 0:
|
@@ -6394,16 +6743,18 @@ class WorkflowApprovers:
|
|
6394
6743
|
def generator(svc, req):
|
6395
6744
|
tries = 0
|
6396
6745
|
while True:
|
6746
|
+
t = None if deadline is None else deadline - time.time()
|
6397
6747
|
try:
|
6398
6748
|
plumbing_response = svc.stub.List(
|
6399
6749
|
req,
|
6400
6750
|
metadata=svc.parent.get_metadata(
|
6401
6751
|
'WorkflowApprovers.List', req),
|
6402
|
-
timeout=
|
6752
|
+
timeout=t)
|
6403
6753
|
except Exception as e:
|
6404
|
-
if self.parent.shouldRetry(tries, e):
|
6754
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6405
6755
|
tries += 1
|
6406
|
-
|
6756
|
+
time.sleep(
|
6757
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6407
6758
|
continue
|
6408
6759
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6409
6760
|
tries = 0
|
@@ -6451,6 +6802,7 @@ class WorkflowApproversHistory:
|
|
6451
6802
|
'''
|
6452
6803
|
List gets a list of WorkflowApproversHistory records matching a given set of criteria.
|
6453
6804
|
'''
|
6805
|
+
deadline = None if timeout is None else time.time() + timeout
|
6454
6806
|
req = WorkflowApproversHistoryListRequest()
|
6455
6807
|
req.meta.CopyFrom(ListRequestMetadata())
|
6456
6808
|
if self.parent.page_limit > 0:
|
@@ -6463,16 +6815,18 @@ class WorkflowApproversHistory:
|
|
6463
6815
|
def generator(svc, req):
|
6464
6816
|
tries = 0
|
6465
6817
|
while True:
|
6818
|
+
t = None if deadline is None else deadline - time.time()
|
6466
6819
|
try:
|
6467
6820
|
plumbing_response = svc.stub.List(
|
6468
6821
|
req,
|
6469
6822
|
metadata=svc.parent.get_metadata(
|
6470
6823
|
'WorkflowApproversHistory.List', req),
|
6471
|
-
timeout=
|
6824
|
+
timeout=t)
|
6472
6825
|
except Exception as e:
|
6473
|
-
if self.parent.shouldRetry(tries, e):
|
6826
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6474
6827
|
tries += 1
|
6475
|
-
|
6828
|
+
time.sleep(
|
6829
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6476
6830
|
continue
|
6477
6831
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6478
6832
|
tries = 0
|
@@ -6500,6 +6854,7 @@ class WorkflowAssignments:
|
|
6500
6854
|
'''
|
6501
6855
|
Lists existing workflow assignments.
|
6502
6856
|
'''
|
6857
|
+
deadline = None if timeout is None else time.time() + timeout
|
6503
6858
|
req = WorkflowAssignmentsListRequest()
|
6504
6859
|
req.meta.CopyFrom(ListRequestMetadata())
|
6505
6860
|
if self.parent.page_limit > 0:
|
@@ -6512,16 +6867,18 @@ class WorkflowAssignments:
|
|
6512
6867
|
def generator(svc, req):
|
6513
6868
|
tries = 0
|
6514
6869
|
while True:
|
6870
|
+
t = None if deadline is None else deadline - time.time()
|
6515
6871
|
try:
|
6516
6872
|
plumbing_response = svc.stub.List(
|
6517
6873
|
req,
|
6518
6874
|
metadata=svc.parent.get_metadata(
|
6519
6875
|
'WorkflowAssignments.List', req),
|
6520
|
-
timeout=
|
6876
|
+
timeout=t)
|
6521
6877
|
except Exception as e:
|
6522
|
-
if self.parent.shouldRetry(tries, e):
|
6878
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6523
6879
|
tries += 1
|
6524
|
-
|
6880
|
+
time.sleep(
|
6881
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6525
6882
|
continue
|
6526
6883
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6527
6884
|
tries = 0
|
@@ -6563,6 +6920,7 @@ class WorkflowAssignmentsHistory:
|
|
6563
6920
|
'''
|
6564
6921
|
List gets a list of WorkflowAssignmentsHistory records matching a given set of criteria.
|
6565
6922
|
'''
|
6923
|
+
deadline = None if timeout is None else time.time() + timeout
|
6566
6924
|
req = WorkflowAssignmentsHistoryListRequest()
|
6567
6925
|
req.meta.CopyFrom(ListRequestMetadata())
|
6568
6926
|
if self.parent.page_limit > 0:
|
@@ -6575,16 +6933,18 @@ class WorkflowAssignmentsHistory:
|
|
6575
6933
|
def generator(svc, req):
|
6576
6934
|
tries = 0
|
6577
6935
|
while True:
|
6936
|
+
t = None if deadline is None else deadline - time.time()
|
6578
6937
|
try:
|
6579
6938
|
plumbing_response = svc.stub.List(
|
6580
6939
|
req,
|
6581
6940
|
metadata=svc.parent.get_metadata(
|
6582
6941
|
'WorkflowAssignmentsHistory.List', req),
|
6583
|
-
timeout=
|
6942
|
+
timeout=t)
|
6584
6943
|
except Exception as e:
|
6585
|
-
if self.parent.shouldRetry(tries, e):
|
6944
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6586
6945
|
tries += 1
|
6587
|
-
|
6946
|
+
time.sleep(
|
6947
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6588
6948
|
continue
|
6589
6949
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6590
6950
|
tries = 0
|
@@ -6612,6 +6972,7 @@ class WorkflowRoles:
|
|
6612
6972
|
'''
|
6613
6973
|
Create creates a new workflow role
|
6614
6974
|
'''
|
6975
|
+
deadline = None if timeout is None else time.time() + timeout
|
6615
6976
|
req = WorkflowRolesCreateRequest()
|
6616
6977
|
|
6617
6978
|
if workflow_role is not None:
|
@@ -6620,16 +6981,17 @@ class WorkflowRoles:
|
|
6620
6981
|
tries = 0
|
6621
6982
|
plumbing_response = None
|
6622
6983
|
while True:
|
6984
|
+
t = None if deadline is None else deadline - time.time()
|
6623
6985
|
try:
|
6624
6986
|
plumbing_response = self.stub.Create(
|
6625
6987
|
req,
|
6626
6988
|
metadata=self.parent.get_metadata('WorkflowRoles.Create',
|
6627
6989
|
req),
|
6628
|
-
timeout=
|
6990
|
+
timeout=t)
|
6629
6991
|
except Exception as e:
|
6630
|
-
if self.parent.shouldRetry(tries, e):
|
6992
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6631
6993
|
tries += 1
|
6632
|
-
self.parent.
|
6994
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6633
6995
|
continue
|
6634
6996
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6635
6997
|
break
|
@@ -6645,6 +7007,7 @@ class WorkflowRoles:
|
|
6645
7007
|
'''
|
6646
7008
|
Get reads one workflow role by ID.
|
6647
7009
|
'''
|
7010
|
+
deadline = None if timeout is None else time.time() + timeout
|
6648
7011
|
req = WorkflowRoleGetRequest()
|
6649
7012
|
if self.parent.snapshot_datetime is not None:
|
6650
7013
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -6654,16 +7017,17 @@ class WorkflowRoles:
|
|
6654
7017
|
tries = 0
|
6655
7018
|
plumbing_response = None
|
6656
7019
|
while True:
|
7020
|
+
t = None if deadline is None else deadline - time.time()
|
6657
7021
|
try:
|
6658
7022
|
plumbing_response = self.stub.Get(
|
6659
7023
|
req,
|
6660
7024
|
metadata=self.parent.get_metadata('WorkflowRoles.Get',
|
6661
7025
|
req),
|
6662
|
-
timeout=
|
7026
|
+
timeout=t)
|
6663
7027
|
except Exception as e:
|
6664
|
-
if self.parent.shouldRetry(tries, e):
|
7028
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6665
7029
|
tries += 1
|
6666
|
-
self.parent.
|
7030
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6667
7031
|
continue
|
6668
7032
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6669
7033
|
break
|
@@ -6681,22 +7045,24 @@ class WorkflowRoles:
|
|
6681
7045
|
'''
|
6682
7046
|
Delete deletes a workflow role
|
6683
7047
|
'''
|
7048
|
+
deadline = None if timeout is None else time.time() + timeout
|
6684
7049
|
req = WorkflowRolesDeleteRequest()
|
6685
7050
|
|
6686
7051
|
req.id = (id)
|
6687
7052
|
tries = 0
|
6688
7053
|
plumbing_response = None
|
6689
7054
|
while True:
|
7055
|
+
t = None if deadline is None else deadline - time.time()
|
6690
7056
|
try:
|
6691
7057
|
plumbing_response = self.stub.Delete(
|
6692
7058
|
req,
|
6693
7059
|
metadata=self.parent.get_metadata('WorkflowRoles.Delete',
|
6694
7060
|
req),
|
6695
|
-
timeout=
|
7061
|
+
timeout=t)
|
6696
7062
|
except Exception as e:
|
6697
|
-
if self.parent.shouldRetry(tries, e):
|
7063
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6698
7064
|
tries += 1
|
6699
|
-
self.parent.
|
7065
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6700
7066
|
continue
|
6701
7067
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6702
7068
|
break
|
@@ -6710,6 +7076,7 @@ class WorkflowRoles:
|
|
6710
7076
|
'''
|
6711
7077
|
Lists existing workflow roles.
|
6712
7078
|
'''
|
7079
|
+
deadline = None if timeout is None else time.time() + timeout
|
6713
7080
|
req = WorkflowRolesListRequest()
|
6714
7081
|
req.meta.CopyFrom(ListRequestMetadata())
|
6715
7082
|
if self.parent.page_limit > 0:
|
@@ -6722,16 +7089,18 @@ class WorkflowRoles:
|
|
6722
7089
|
def generator(svc, req):
|
6723
7090
|
tries = 0
|
6724
7091
|
while True:
|
7092
|
+
t = None if deadline is None else deadline - time.time()
|
6725
7093
|
try:
|
6726
7094
|
plumbing_response = svc.stub.List(
|
6727
7095
|
req,
|
6728
7096
|
metadata=svc.parent.get_metadata(
|
6729
7097
|
'WorkflowRoles.List', req),
|
6730
|
-
timeout=
|
7098
|
+
timeout=t)
|
6731
7099
|
except Exception as e:
|
6732
|
-
if self.parent.shouldRetry(tries, e):
|
7100
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6733
7101
|
tries += 1
|
6734
|
-
|
7102
|
+
time.sleep(
|
7103
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6735
7104
|
continue
|
6736
7105
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6737
7106
|
tries = 0
|
@@ -6779,6 +7148,7 @@ class WorkflowRolesHistory:
|
|
6779
7148
|
'''
|
6780
7149
|
List gets a list of WorkflowRolesHistory records matching a given set of criteria.
|
6781
7150
|
'''
|
7151
|
+
deadline = None if timeout is None else time.time() + timeout
|
6782
7152
|
req = WorkflowRolesHistoryListRequest()
|
6783
7153
|
req.meta.CopyFrom(ListRequestMetadata())
|
6784
7154
|
if self.parent.page_limit > 0:
|
@@ -6791,16 +7161,18 @@ class WorkflowRolesHistory:
|
|
6791
7161
|
def generator(svc, req):
|
6792
7162
|
tries = 0
|
6793
7163
|
while True:
|
7164
|
+
t = None if deadline is None else deadline - time.time()
|
6794
7165
|
try:
|
6795
7166
|
plumbing_response = svc.stub.List(
|
6796
7167
|
req,
|
6797
7168
|
metadata=svc.parent.get_metadata(
|
6798
7169
|
'WorkflowRolesHistory.List', req),
|
6799
|
-
timeout=
|
7170
|
+
timeout=t)
|
6800
7171
|
except Exception as e:
|
6801
|
-
if self.parent.shouldRetry(tries, e):
|
7172
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6802
7173
|
tries += 1
|
6803
|
-
|
7174
|
+
time.sleep(
|
7175
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6804
7176
|
continue
|
6805
7177
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6806
7178
|
tries = 0
|
@@ -6829,6 +7201,7 @@ class Workflows:
|
|
6829
7201
|
'''
|
6830
7202
|
Create creates a new workflow and requires a name for the workflow.
|
6831
7203
|
'''
|
7204
|
+
deadline = None if timeout is None else time.time() + timeout
|
6832
7205
|
req = WorkflowCreateRequest()
|
6833
7206
|
|
6834
7207
|
if workflow is not None:
|
@@ -6837,15 +7210,16 @@ class Workflows:
|
|
6837
7210
|
tries = 0
|
6838
7211
|
plumbing_response = None
|
6839
7212
|
while True:
|
7213
|
+
t = None if deadline is None else deadline - time.time()
|
6840
7214
|
try:
|
6841
7215
|
plumbing_response = self.stub.Create(
|
6842
7216
|
req,
|
6843
7217
|
metadata=self.parent.get_metadata('Workflows.Create', req),
|
6844
|
-
timeout=
|
7218
|
+
timeout=t)
|
6845
7219
|
except Exception as e:
|
6846
|
-
if self.parent.shouldRetry(tries, e):
|
7220
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6847
7221
|
tries += 1
|
6848
|
-
self.parent.
|
7222
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6849
7223
|
continue
|
6850
7224
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6851
7225
|
break
|
@@ -6861,6 +7235,7 @@ class Workflows:
|
|
6861
7235
|
'''
|
6862
7236
|
Get reads one workflow by ID.
|
6863
7237
|
'''
|
7238
|
+
deadline = None if timeout is None else time.time() + timeout
|
6864
7239
|
req = WorkflowGetRequest()
|
6865
7240
|
if self.parent.snapshot_datetime is not None:
|
6866
7241
|
req.meta.CopyFrom(GetRequestMetadata())
|
@@ -6870,15 +7245,16 @@ class Workflows:
|
|
6870
7245
|
tries = 0
|
6871
7246
|
plumbing_response = None
|
6872
7247
|
while True:
|
7248
|
+
t = None if deadline is None else deadline - time.time()
|
6873
7249
|
try:
|
6874
7250
|
plumbing_response = self.stub.Get(
|
6875
7251
|
req,
|
6876
7252
|
metadata=self.parent.get_metadata('Workflows.Get', req),
|
6877
|
-
timeout=
|
7253
|
+
timeout=t)
|
6878
7254
|
except Exception as e:
|
6879
|
-
if self.parent.shouldRetry(tries, e):
|
7255
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6880
7256
|
tries += 1
|
6881
|
-
self.parent.
|
7257
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6882
7258
|
continue
|
6883
7259
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6884
7260
|
break
|
@@ -6896,21 +7272,23 @@ class Workflows:
|
|
6896
7272
|
'''
|
6897
7273
|
Delete deletes an existing workflow.
|
6898
7274
|
'''
|
7275
|
+
deadline = None if timeout is None else time.time() + timeout
|
6899
7276
|
req = WorkflowDeleteRequest()
|
6900
7277
|
|
6901
7278
|
req.id = (id)
|
6902
7279
|
tries = 0
|
6903
7280
|
plumbing_response = None
|
6904
7281
|
while True:
|
7282
|
+
t = None if deadline is None else deadline - time.time()
|
6905
7283
|
try:
|
6906
7284
|
plumbing_response = self.stub.Delete(
|
6907
7285
|
req,
|
6908
7286
|
metadata=self.parent.get_metadata('Workflows.Delete', req),
|
6909
|
-
timeout=
|
7287
|
+
timeout=t)
|
6910
7288
|
except Exception as e:
|
6911
|
-
if self.parent.shouldRetry(tries, e):
|
7289
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6912
7290
|
tries += 1
|
6913
|
-
self.parent.
|
7291
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6914
7292
|
continue
|
6915
7293
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6916
7294
|
break
|
@@ -6925,6 +7303,7 @@ class Workflows:
|
|
6925
7303
|
'''
|
6926
7304
|
Update updates an existing workflow.
|
6927
7305
|
'''
|
7306
|
+
deadline = None if timeout is None else time.time() + timeout
|
6928
7307
|
req = WorkflowUpdateRequest()
|
6929
7308
|
|
6930
7309
|
if workflow is not None:
|
@@ -6933,15 +7312,16 @@ class Workflows:
|
|
6933
7312
|
tries = 0
|
6934
7313
|
plumbing_response = None
|
6935
7314
|
while True:
|
7315
|
+
t = None if deadline is None else deadline - time.time()
|
6936
7316
|
try:
|
6937
7317
|
plumbing_response = self.stub.Update(
|
6938
7318
|
req,
|
6939
7319
|
metadata=self.parent.get_metadata('Workflows.Update', req),
|
6940
|
-
timeout=
|
7320
|
+
timeout=t)
|
6941
7321
|
except Exception as e:
|
6942
|
-
if self.parent.shouldRetry(tries, e):
|
7322
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6943
7323
|
tries += 1
|
6944
|
-
self.parent.
|
7324
|
+
time.sleep(self.parent.exponentialBackoff(tries, deadline))
|
6945
7325
|
continue
|
6946
7326
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6947
7327
|
break
|
@@ -6957,6 +7337,7 @@ class Workflows:
|
|
6957
7337
|
'''
|
6958
7338
|
Lists existing workflows.
|
6959
7339
|
'''
|
7340
|
+
deadline = None if timeout is None else time.time() + timeout
|
6960
7341
|
req = WorkflowListRequest()
|
6961
7342
|
req.meta.CopyFrom(ListRequestMetadata())
|
6962
7343
|
if self.parent.page_limit > 0:
|
@@ -6969,16 +7350,18 @@ class Workflows:
|
|
6969
7350
|
def generator(svc, req):
|
6970
7351
|
tries = 0
|
6971
7352
|
while True:
|
7353
|
+
t = None if deadline is None else deadline - time.time()
|
6972
7354
|
try:
|
6973
7355
|
plumbing_response = svc.stub.List(
|
6974
7356
|
req,
|
6975
7357
|
metadata=svc.parent.get_metadata(
|
6976
7358
|
'Workflows.List', req),
|
6977
|
-
timeout=
|
7359
|
+
timeout=t)
|
6978
7360
|
except Exception as e:
|
6979
|
-
if self.parent.shouldRetry(tries, e):
|
7361
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
6980
7362
|
tries += 1
|
6981
|
-
|
7363
|
+
time.sleep(
|
7364
|
+
self.parent.exponentialBackoff(tries, deadline))
|
6982
7365
|
continue
|
6983
7366
|
raise plumbing.convert_error_to_porcelain(e) from e
|
6984
7367
|
tries = 0
|
@@ -7025,6 +7408,7 @@ class WorkflowsHistory:
|
|
7025
7408
|
'''
|
7026
7409
|
List gets a list of WorkflowHistory records matching a given set of criteria.
|
7027
7410
|
'''
|
7411
|
+
deadline = None if timeout is None else time.time() + timeout
|
7028
7412
|
req = WorkflowHistoryListRequest()
|
7029
7413
|
req.meta.CopyFrom(ListRequestMetadata())
|
7030
7414
|
if self.parent.page_limit > 0:
|
@@ -7037,16 +7421,18 @@ class WorkflowsHistory:
|
|
7037
7421
|
def generator(svc, req):
|
7038
7422
|
tries = 0
|
7039
7423
|
while True:
|
7424
|
+
t = None if deadline is None else deadline - time.time()
|
7040
7425
|
try:
|
7041
7426
|
plumbing_response = svc.stub.List(
|
7042
7427
|
req,
|
7043
7428
|
metadata=svc.parent.get_metadata(
|
7044
7429
|
'WorkflowsHistory.List', req),
|
7045
|
-
timeout=
|
7430
|
+
timeout=t)
|
7046
7431
|
except Exception as e:
|
7047
|
-
if self.parent.shouldRetry(tries, e):
|
7432
|
+
if self.parent.shouldRetry(tries, e, deadline):
|
7048
7433
|
tries += 1
|
7049
|
-
|
7434
|
+
time.sleep(
|
7435
|
+
self.parent.exponentialBackoff(tries, deadline))
|
7050
7436
|
continue
|
7051
7437
|
raise plumbing.convert_error_to_porcelain(e) from e
|
7052
7438
|
tries = 0
|