tccli 3.0.896.1__py2.py3-none-any.whl → 3.0.898.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/cdb/v20170320/CreateDatabase.md +22 -0
- tccli/examples/cdn/v20180606/ModifyDomainConfig.md +88 -0
- tccli/examples/ckafka/v20190819/CreatePostPaidInstance.md +154 -0
- tccli/examples/cynosdb/v20190107/DescribeProxySpecs.md +56 -0
- tccli/examples/cynosdb/v20190107/DescribeSupportProxyVersion.md +24 -0
- tccli/examples/ess/v20201111/CreateFlowApprovers.md +3 -1
- tccli/examples/ess/v20201111/DescribeThirdPartyAuthCode.md +1 -1
- tccli/examples/postgres/v20170312/CreateReadOnlyDBInstance.md +1 -1
- tccli/examples/postgres/v20170312/UpgradeDBInstanceKernelVersion.md +1 -1
- tccli/examples/sqlserver/v20180328/DescribeDBInstancesAttribute.md +6 -1
- tccli/examples/sqlserver/v20180328/DescribeDBs.md +1 -1
- tccli/examples/tdmq/v20200217/CreateCmqQueue.md +2 -2
- tccli/examples/tke/v20180525/CreateClusterEndpointVip.md +1 -1
- tccli/examples/trp/v20210515/CreateCodeBatch.md +11 -5
- tccli/examples/trp/v20210515/DescribeScanLogs.md +1 -1
- tccli/examples/trp/v20210515/DescribeTraceCodeById.md +16 -11
- tccli/examples/trp/v20210515/ModifyCodeBatch.md +3 -3
- tccli/examples/vod/v20180717/CreateQualityInspectTemplate.md +24 -0
- tccli/examples/vod/v20180717/DeleteQualityInspectTemplate.md +20 -0
- tccli/examples/vod/v20180717/DescribeQualityInspectTemplates.md +44 -0
- tccli/examples/vod/v20180717/DescribeTaskDetail.md +4 -0
- tccli/examples/vod/v20180717/InspectMediaQuality.md +22 -0
- tccli/examples/vod/v20180717/ModifyQualityInspectTemplate.md +21 -0
- tccli/examples/yinsuda/v20220527/DescribeKTVMusicAccompanySegmentUrl.md +70 -0
- tccli/services/cdb/cdb_client.py +57 -4
- tccli/services/cdb/v20170320/api.json +52 -0
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/cdn/cdn_client.py +57 -4
- tccli/services/cdn/v20180606/api.json +52 -0
- tccli/services/cdn/v20180606/examples.json +26 -0
- tccli/services/ckafka/ckafka_client.py +61 -8
- tccli/services/ckafka/v20190819/api.json +303 -7
- tccli/services/ckafka/v20190819/examples.json +20 -0
- tccli/services/clb/v20180317/api.json +3 -1
- tccli/services/cynosdb/cynosdb_client.py +106 -0
- tccli/services/cynosdb/v20190107/api.json +134 -0
- tccli/services/cynosdb/v20190107/examples.json +22 -0
- tccli/services/emr/v20190103/api.json +6 -2
- tccli/services/ess/v20201111/api.json +42 -11
- tccli/services/ess/v20201111/examples.json +3 -3
- tccli/services/essbasic/v20210526/api.json +27 -1
- tccli/services/ocr/v20181119/api.json +4 -2
- tccli/services/postgres/v20170312/api.json +2 -31
- tccli/services/postgres/v20170312/examples.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +72 -15
- tccli/services/sqlserver/v20180328/examples.json +3 -3
- tccli/services/tbaas/tbaas_client.py +4 -322
- tccli/services/tbaas/v20180416/api.json +108 -810
- tccli/services/tbaas/v20180416/examples.json +0 -48
- tccli/services/tbp/v20190311/api.json +10 -10
- tccli/services/tdid/tdid_client.py +67 -1551
- tccli/services/tdid/v20210519/api.json +331 -3504
- tccli/services/tdid/v20210519/examples.json +0 -224
- tccli/services/tdmq/v20200217/api.json +2 -19
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tione/v20211111/api.json +24 -2
- tccli/services/tke/v20180525/api.json +4 -6
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/trp/v20210515/api.json +285 -113
- tccli/services/trp/v20210515/examples.json +6 -6
- tccli/services/vod/v20180717/api.json +1346 -2
- tccli/services/vod/v20180717/examples.json +44 -4
- tccli/services/vod/vod_client.py +287 -22
- tccli/services/yinsuda/v20220527/api.json +159 -0
- tccli/services/yinsuda/v20220527/examples.json +14 -0
- tccli/services/yinsuda/yinsuda_client.py +53 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/METADATA +2 -2
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/RECORD +72 -61
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.896.1.dist-info → tccli-3.0.898.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,58 +17,6 @@ from tencentcloud.tbaas.v20180416 import models as models_v20180416
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def doInvokeBcosTrans(args, parsed_globals):
|
21
|
-
g_param = parse_global_arg(parsed_globals)
|
22
|
-
|
23
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
-
cred = credential.CVMRoleCredential()
|
25
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
-
cred = credential.STSAssumeRoleCredential(
|
27
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
29
|
-
)
|
30
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
31
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
-
else:
|
33
|
-
cred = credential.Credential(
|
34
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
-
)
|
36
|
-
http_profile = HttpProfile(
|
37
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
-
reqMethod="POST",
|
39
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
-
)
|
42
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
-
if g_param[OptionsDefine.Language]:
|
44
|
-
profile.language = g_param[OptionsDefine.Language]
|
45
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.InvokeBcosTransRequest()
|
50
|
-
model.from_json_string(json.dumps(args))
|
51
|
-
start_time = time.time()
|
52
|
-
while True:
|
53
|
-
rsp = client.InvokeBcosTrans(model)
|
54
|
-
result = rsp.to_json_string()
|
55
|
-
try:
|
56
|
-
json_obj = json.loads(result)
|
57
|
-
except TypeError as e:
|
58
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
-
break
|
61
|
-
cur_time = time.time()
|
62
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
-
else:
|
67
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
-
|
71
|
-
|
72
20
|
def doQueryChainMakerTransaction(args, parsed_globals):
|
73
21
|
g_param = parse_global_arg(parsed_globals)
|
74
22
|
|
@@ -121,58 +69,6 @@ def doQueryChainMakerTransaction(args, parsed_globals):
|
|
121
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
70
|
|
123
71
|
|
124
|
-
def doGetBcosBlockByNumber(args, parsed_globals):
|
125
|
-
g_param = parse_global_arg(parsed_globals)
|
126
|
-
|
127
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
-
cred = credential.CVMRoleCredential()
|
129
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
-
cred = credential.STSAssumeRoleCredential(
|
131
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
133
|
-
)
|
134
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
135
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
-
else:
|
137
|
-
cred = credential.Credential(
|
138
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
-
)
|
140
|
-
http_profile = HttpProfile(
|
141
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
-
reqMethod="POST",
|
143
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
-
)
|
146
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
-
if g_param[OptionsDefine.Language]:
|
148
|
-
profile.language = g_param[OptionsDefine.Language]
|
149
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.GetBcosBlockByNumberRequest()
|
154
|
-
model.from_json_string(json.dumps(args))
|
155
|
-
start_time = time.time()
|
156
|
-
while True:
|
157
|
-
rsp = client.GetBcosBlockByNumber(model)
|
158
|
-
result = rsp.to_json_string()
|
159
|
-
try:
|
160
|
-
json_obj = json.loads(result)
|
161
|
-
except TypeError as e:
|
162
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
163
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
164
|
-
break
|
165
|
-
cur_time = time.time()
|
166
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
167
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
168
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
169
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
170
|
-
else:
|
171
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
172
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
173
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
|
-
|
175
|
-
|
176
72
|
def doApplyChainMakerBatchUserCert(args, parsed_globals):
|
177
73
|
g_param = parse_global_arg(parsed_globals)
|
178
74
|
|
@@ -277,7 +173,7 @@ def doGetChaincodeLogForUser(args, parsed_globals):
|
|
277
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
174
|
|
279
175
|
|
280
|
-
def
|
176
|
+
def doQueryChainMakerDemoTransaction(args, parsed_globals):
|
281
177
|
g_param = parse_global_arg(parsed_globals)
|
282
178
|
|
283
179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +202,11 @@ def doGetBcosTransByHash(args, parsed_globals):
|
|
306
202
|
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
307
203
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
205
|
+
model = models.QueryChainMakerDemoTransactionRequest()
|
310
206
|
model.from_json_string(json.dumps(args))
|
311
207
|
start_time = time.time()
|
312
208
|
while True:
|
313
|
-
rsp = client.
|
209
|
+
rsp = client.QueryChainMakerDemoTransaction(model)
|
314
210
|
result = rsp.to_json_string()
|
315
211
|
try:
|
316
212
|
json_obj = json.loads(result)
|
@@ -381,58 +277,6 @@ def doGetClusterListForUser(args, parsed_globals):
|
|
381
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
278
|
|
383
279
|
|
384
|
-
def doGetBcosBlockList(args, parsed_globals):
|
385
|
-
g_param = parse_global_arg(parsed_globals)
|
386
|
-
|
387
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
388
|
-
cred = credential.CVMRoleCredential()
|
389
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
|
-
cred = credential.STSAssumeRoleCredential(
|
391
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
393
|
-
)
|
394
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
395
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
396
|
-
else:
|
397
|
-
cred = credential.Credential(
|
398
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
399
|
-
)
|
400
|
-
http_profile = HttpProfile(
|
401
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
402
|
-
reqMethod="POST",
|
403
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
404
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
405
|
-
)
|
406
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
407
|
-
if g_param[OptionsDefine.Language]:
|
408
|
-
profile.language = g_param[OptionsDefine.Language]
|
409
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
410
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.GetBcosBlockListRequest()
|
414
|
-
model.from_json_string(json.dumps(args))
|
415
|
-
start_time = time.time()
|
416
|
-
while True:
|
417
|
-
rsp = client.GetBcosBlockList(model)
|
418
|
-
result = rsp.to_json_string()
|
419
|
-
try:
|
420
|
-
json_obj = json.loads(result)
|
421
|
-
except TypeError as e:
|
422
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
423
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
424
|
-
break
|
425
|
-
cur_time = time.time()
|
426
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
427
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
428
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
429
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
430
|
-
else:
|
431
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
432
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
433
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
|
-
|
435
|
-
|
436
280
|
def doQueryChainMakerContract(args, parsed_globals):
|
437
281
|
g_param = parse_global_arg(parsed_globals)
|
438
282
|
|
@@ -693,58 +537,6 @@ def doGetPeerLogForUser(args, parsed_globals):
|
|
693
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
538
|
|
695
539
|
|
696
|
-
def doDeployDynamicBcosContract(args, parsed_globals):
|
697
|
-
g_param = parse_global_arg(parsed_globals)
|
698
|
-
|
699
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
700
|
-
cred = credential.CVMRoleCredential()
|
701
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
|
-
cred = credential.STSAssumeRoleCredential(
|
703
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
705
|
-
)
|
706
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
707
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
708
|
-
else:
|
709
|
-
cred = credential.Credential(
|
710
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
711
|
-
)
|
712
|
-
http_profile = HttpProfile(
|
713
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
714
|
-
reqMethod="POST",
|
715
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
716
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
717
|
-
)
|
718
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
719
|
-
if g_param[OptionsDefine.Language]:
|
720
|
-
profile.language = g_param[OptionsDefine.Language]
|
721
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
722
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.DeployDynamicBcosContractRequest()
|
726
|
-
model.from_json_string(json.dumps(args))
|
727
|
-
start_time = time.time()
|
728
|
-
while True:
|
729
|
-
rsp = client.DeployDynamicBcosContract(model)
|
730
|
-
result = rsp.to_json_string()
|
731
|
-
try:
|
732
|
-
json_obj = json.loads(result)
|
733
|
-
except TypeError as e:
|
734
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
-
break
|
737
|
-
cur_time = time.time()
|
738
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
-
else:
|
743
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
-
|
747
|
-
|
748
540
|
def doGetLatestTransactionList(args, parsed_globals):
|
749
541
|
g_param = parse_global_arg(parsed_globals)
|
750
542
|
|
@@ -901,58 +693,6 @@ def doCreateChaincodeAndInstallForUser(args, parsed_globals):
|
|
901
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
694
|
|
903
695
|
|
904
|
-
def doQueryChainMakerDemoTransaction(args, parsed_globals):
|
905
|
-
g_param = parse_global_arg(parsed_globals)
|
906
|
-
|
907
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
908
|
-
cred = credential.CVMRoleCredential()
|
909
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
910
|
-
cred = credential.STSAssumeRoleCredential(
|
911
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
912
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
913
|
-
)
|
914
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
915
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
916
|
-
else:
|
917
|
-
cred = credential.Credential(
|
918
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
919
|
-
)
|
920
|
-
http_profile = HttpProfile(
|
921
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
922
|
-
reqMethod="POST",
|
923
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
924
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
925
|
-
)
|
926
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
927
|
-
if g_param[OptionsDefine.Language]:
|
928
|
-
profile.language = g_param[OptionsDefine.Language]
|
929
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
930
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
931
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
932
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.QueryChainMakerDemoTransactionRequest()
|
934
|
-
model.from_json_string(json.dumps(args))
|
935
|
-
start_time = time.time()
|
936
|
-
while True:
|
937
|
-
rsp = client.QueryChainMakerDemoTransaction(model)
|
938
|
-
result = rsp.to_json_string()
|
939
|
-
try:
|
940
|
-
json_obj = json.loads(result)
|
941
|
-
except TypeError as e:
|
942
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
943
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
944
|
-
break
|
945
|
-
cur_time = time.time()
|
946
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
947
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
948
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
949
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
950
|
-
else:
|
951
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
952
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
953
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
|
-
|
955
|
-
|
956
696
|
def doGetLatesdTransactionList(args, parsed_globals):
|
957
697
|
g_param = parse_global_arg(parsed_globals)
|
958
698
|
|
@@ -1525,58 +1265,6 @@ def doSrvInvoke(args, parsed_globals):
|
|
1525
1265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1266
|
|
1527
1267
|
|
1528
|
-
def doGetBcosTransList(args, parsed_globals):
|
1529
|
-
g_param = parse_global_arg(parsed_globals)
|
1530
|
-
|
1531
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1532
|
-
cred = credential.CVMRoleCredential()
|
1533
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1534
|
-
cred = credential.STSAssumeRoleCredential(
|
1535
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1536
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1537
|
-
)
|
1538
|
-
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1539
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1540
|
-
else:
|
1541
|
-
cred = credential.Credential(
|
1542
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1543
|
-
)
|
1544
|
-
http_profile = HttpProfile(
|
1545
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1546
|
-
reqMethod="POST",
|
1547
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
1548
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1549
|
-
)
|
1550
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1551
|
-
if g_param[OptionsDefine.Language]:
|
1552
|
-
profile.language = g_param[OptionsDefine.Language]
|
1553
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1554
|
-
client = mod.TbaasClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
1556
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
-
model = models.GetBcosTransListRequest()
|
1558
|
-
model.from_json_string(json.dumps(args))
|
1559
|
-
start_time = time.time()
|
1560
|
-
while True:
|
1561
|
-
rsp = client.GetBcosTransList(model)
|
1562
|
-
result = rsp.to_json_string()
|
1563
|
-
try:
|
1564
|
-
json_obj = json.loads(result)
|
1565
|
-
except TypeError as e:
|
1566
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1567
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1568
|
-
break
|
1569
|
-
cur_time = time.time()
|
1570
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1571
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1572
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1573
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1574
|
-
else:
|
1575
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1576
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1577
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
|
-
|
1579
|
-
|
1580
1268
|
def doInvokeChainMakerDemoContract(args, parsed_globals):
|
1581
1269
|
g_param = parse_global_arg(parsed_globals)
|
1582
1270
|
|
@@ -1848,24 +1536,19 @@ MODELS_MAP = {
|
|
1848
1536
|
}
|
1849
1537
|
|
1850
1538
|
ACTION_MAP = {
|
1851
|
-
"InvokeBcosTrans": doInvokeBcosTrans,
|
1852
1539
|
"QueryChainMakerTransaction": doQueryChainMakerTransaction,
|
1853
|
-
"GetBcosBlockByNumber": doGetBcosBlockByNumber,
|
1854
1540
|
"ApplyChainMakerBatchUserCert": doApplyChainMakerBatchUserCert,
|
1855
1541
|
"GetChaincodeLogForUser": doGetChaincodeLogForUser,
|
1856
|
-
"
|
1542
|
+
"QueryChainMakerDemoTransaction": doQueryChainMakerDemoTransaction,
|
1857
1543
|
"GetClusterListForUser": doGetClusterListForUser,
|
1858
|
-
"GetBcosBlockList": doGetBcosBlockList,
|
1859
1544
|
"QueryChainMakerContract": doQueryChainMakerContract,
|
1860
1545
|
"GetTransactionDetailForUser": doGetTransactionDetailForUser,
|
1861
1546
|
"Invoke": doInvoke,
|
1862
1547
|
"GetClusterSummary": doGetClusterSummary,
|
1863
1548
|
"GetPeerLogForUser": doGetPeerLogForUser,
|
1864
|
-
"DeployDynamicBcosContract": doDeployDynamicBcosContract,
|
1865
1549
|
"GetLatestTransactionList": doGetLatestTransactionList,
|
1866
1550
|
"DownloadUserCert": doDownloadUserCert,
|
1867
1551
|
"CreateChaincodeAndInstallForUser": doCreateChaincodeAndInstallForUser,
|
1868
|
-
"QueryChainMakerDemoTransaction": doQueryChainMakerDemoTransaction,
|
1869
1552
|
"GetLatesdTransactionList": doGetLatesdTransactionList,
|
1870
1553
|
"ApplyUserCert": doApplyUserCert,
|
1871
1554
|
"InvokeChainMakerContract": doInvokeChainMakerContract,
|
@@ -1877,7 +1560,6 @@ ACTION_MAP = {
|
|
1877
1560
|
"QueryChainMakerDemoContract": doQueryChainMakerDemoContract,
|
1878
1561
|
"QueryChainMakerDemoBlockTransaction": doQueryChainMakerDemoBlockTransaction,
|
1879
1562
|
"SrvInvoke": doSrvInvoke,
|
1880
|
-
"GetBcosTransList": doGetBcosTransList,
|
1881
1563
|
"InvokeChainMakerDemoContract": doInvokeChainMakerDemoContract,
|
1882
1564
|
"GetChaincodeCompileLogForUser": doGetChaincodeCompileLogForUser,
|
1883
1565
|
"GetBlockTransactionListForUser": doGetBlockTransactionListForUser,
|