tccli 3.0.1217.1__py2.py3-none-any.whl → 3.0.1218.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/command.py +0 -1
- tccli/configure.py +11 -1
- tccli/services/aa/aa_client.py +13 -1
- tccli/services/aai/aai_client.py +13 -1
- tccli/services/acp/acp_client.py +13 -1
- tccli/services/advisor/advisor_client.py +13 -1
- tccli/services/af/af_client.py +13 -1
- tccli/services/afc/afc_client.py +13 -1
- tccli/services/aiart/aiart_client.py +13 -1
- tccli/services/ame/ame_client.py +13 -1
- tccli/services/ams/ams_client.py +13 -1
- tccli/services/anicloud/anicloud_client.py +13 -1
- tccli/services/antiddos/antiddos_client.py +13 -1
- tccli/services/apcas/apcas_client.py +13 -1
- tccli/services/ape/ape_client.py +13 -1
- tccli/services/api/api_client.py +13 -1
- tccli/services/apigateway/apigateway_client.py +13 -1
- tccli/services/apm/apm_client.py +13 -1
- tccli/services/asr/asr_client.py +13 -1
- tccli/services/asw/asw_client.py +13 -1
- tccli/services/autoscaling/autoscaling_client.py +13 -1
- tccli/services/ba/ba_client.py +13 -1
- tccli/services/batch/batch_client.py +13 -1
- tccli/services/bda/bda_client.py +13 -1
- tccli/services/bh/bh_client.py +13 -1
- tccli/services/bi/bi_client.py +13 -1
- tccli/services/billing/billing_client.py +13 -1
- tccli/services/bizlive/bizlive_client.py +13 -1
- tccli/services/bm/bm_client.py +13 -1
- tccli/services/bma/bma_client.py +13 -1
- tccli/services/bmeip/bmeip_client.py +13 -1
- tccli/services/bmlb/bmlb_client.py +13 -1
- tccli/services/bmvpc/bmvpc_client.py +13 -1
- tccli/services/bpaas/bpaas_client.py +13 -1
- tccli/services/bri/bri_client.py +13 -1
- tccli/services/bsca/bsca_client.py +13 -1
- tccli/services/btoe/btoe_client.py +13 -1
- tccli/services/ca/ca_client.py +13 -1
- tccli/services/cam/cam_client.py +13 -1
- tccli/services/captcha/captcha_client.py +13 -1
- tccli/services/car/car_client.py +13 -1
- tccli/services/cat/cat_client.py +13 -1
- tccli/services/cbs/cbs_client.py +13 -1
- tccli/services/ccc/ccc_client.py +13 -1
- tccli/services/cdb/cdb_client.py +13 -1
- tccli/services/cdc/cdc_client.py +13 -1
- tccli/services/cdn/cdn_client.py +13 -1
- tccli/services/cds/cds_client.py +13 -1
- tccli/services/cdwch/cdwch_client.py +13 -1
- tccli/services/cdwdoris/cdwdoris_client.py +13 -1
- tccli/services/cdwpg/cdwpg_client.py +13 -1
- tccli/services/cdz/cdz_client.py +13 -1
- tccli/services/cfg/cfg_client.py +13 -1
- tccli/services/cfs/cfs_client.py +13 -1
- tccli/services/cfw/cfw_client.py +13 -1
- tccli/services/chdfs/chdfs_client.py +13 -1
- tccli/services/ciam/ciam_client.py +13 -1
- tccli/services/cii/cii_client.py +13 -1
- tccli/services/cim/cim_client.py +13 -1
- tccli/services/cis/cis_client.py +13 -1
- tccli/services/ckafka/ckafka_client.py +13 -1
- tccli/services/clb/clb_client.py +13 -1
- tccli/services/cloudapp/cloudapp_client.py +13 -1
- tccli/services/cloudaudit/cloudaudit_client.py +13 -1
- tccli/services/cloudhsm/cloudhsm_client.py +13 -1
- tccli/services/cloudstudio/cloudstudio_client.py +13 -1
- tccli/services/cls/cls_client.py +13 -1
- tccli/services/cme/cme_client.py +13 -1
- tccli/services/cmq/cmq_client.py +13 -1
- tccli/services/cms/cms_client.py +13 -1
- tccli/services/config/config_client.py +13 -1
- tccli/services/controlcenter/controlcenter_client.py +13 -1
- tccli/services/cpdp/cpdp_client.py +13 -1
- tccli/services/csip/csip_client.py +13 -1
- tccli/services/csxg/csxg_client.py +13 -1
- tccli/services/cvm/cvm_client.py +13 -1
- tccli/services/cwp/cwp_client.py +13 -1
- tccli/services/cws/cws_client.py +13 -1
- tccli/services/cynosdb/cynosdb_client.py +13 -1
- tccli/services/dasb/dasb_client.py +13 -1
- tccli/services/dataintegration/dataintegration_client.py +13 -1
- tccli/services/dayu/dayu_client.py +13 -1
- tccli/services/dbbrain/dbbrain_client.py +13 -1
- tccli/services/dbdc/dbdc_client.py +13 -1
- tccli/services/dc/dc_client.py +13 -1
- tccli/services/dcdb/dcdb_client.py +13 -1
- tccli/services/dlc/dlc_client.py +13 -1
- tccli/services/dnspod/dnspod_client.py +13 -1
- tccli/services/domain/domain_client.py +13 -1
- tccli/services/drm/drm_client.py +13 -1
- tccli/services/ds/ds_client.py +13 -1
- tccli/services/dsgc/dsgc_client.py +13 -1
- tccli/services/dtf/dtf_client.py +13 -1
- tccli/services/dts/dts_client.py +13 -1
- tccli/services/eb/eb_client.py +13 -1
- tccli/services/ecc/ecc_client.py +13 -1
- tccli/services/ecdn/ecdn_client.py +13 -1
- tccli/services/ecm/ecm_client.py +13 -1
- tccli/services/eiam/eiam_client.py +13 -1
- tccli/services/eis/eis_client.py +13 -1
- tccli/services/emr/emr_client.py +13 -1
- tccli/services/es/es_client.py +13 -1
- tccli/services/ess/ess_client.py +13 -1
- tccli/services/essbasic/essbasic_client.py +13 -1
- tccli/services/facefusion/facefusion_client.py +13 -1
- tccli/services/faceid/faceid_client.py +13 -1
- tccli/services/fmu/fmu_client.py +13 -1
- tccli/services/ft/ft_client.py +13 -1
- tccli/services/gaap/gaap_client.py +13 -1
- tccli/services/gme/gme_client.py +13 -1
- tccli/services/goosefs/goosefs_client.py +13 -1
- tccli/services/gpm/gpm_client.py +13 -1
- tccli/services/gs/gs_client.py +13 -1
- tccli/services/gse/gse_client.py +13 -1
- tccli/services/gwlb/gwlb_client.py +13 -1
- tccli/services/habo/habo_client.py +13 -1
- tccli/services/hai/hai_client.py +13 -1
- tccli/services/hasim/hasim_client.py +13 -1
- tccli/services/hcm/hcm_client.py +13 -1
- tccli/services/hunyuan/hunyuan_client.py +13 -1
- tccli/services/iai/iai_client.py +13 -1
- tccli/services/ic/ic_client.py +13 -1
- tccli/services/icr/icr_client.py +13 -1
- tccli/services/ie/ie_client.py +13 -1
- tccli/services/iecp/iecp_client.py +13 -1
- tccli/services/ig/ig_client.py +13 -1
- tccli/services/iir/iir_client.py +13 -1
- tccli/services/ims/ims_client.py +13 -1
- tccli/services/ioa/ioa_client.py +13 -1
- tccli/services/iot/iot_client.py +13 -1
- tccli/services/iotcloud/iotcloud_client.py +13 -1
- tccli/services/iotexplorer/iotexplorer_client.py +13 -1
- tccli/services/iottid/iottid_client.py +13 -1
- tccli/services/iotvideo/iotvideo_client.py +13 -1
- tccli/services/iotvideoindustry/iotvideoindustry_client.py +13 -1
- tccli/services/irp/irp_client.py +13 -1
- tccli/services/iss/iss_client.py +13 -1
- tccli/services/ivld/ivld_client.py +13 -1
- tccli/services/keewidb/keewidb_client.py +13 -1
- tccli/services/kms/kms_client.py +13 -1
- tccli/services/lcic/lcic_client.py +13 -1
- tccli/services/lighthouse/lighthouse_client.py +13 -1
- tccli/services/live/live_client.py +13 -1
- tccli/services/lke/lke_client.py +13 -1
- tccli/services/lowcode/lowcode_client.py +13 -1
- tccli/services/lp/lp_client.py +13 -1
- tccli/services/mall/mall_client.py +13 -1
- tccli/services/mariadb/mariadb_client.py +13 -1
- tccli/services/market/market_client.py +13 -1
- tccli/services/memcached/memcached_client.py +13 -1
- tccli/services/mgobe/mgobe_client.py +13 -1
- tccli/services/mmps/mmps_client.py +13 -1
- tccli/services/mna/mna_client.py +13 -1
- tccli/services/mongodb/mongodb_client.py +13 -1
- tccli/services/monitor/monitor_client.py +13 -1
- tccli/services/mps/mps_client.py +13 -1
- tccli/services/mqtt/mqtt_client.py +13 -1
- tccli/services/mrs/mrs_client.py +13 -1
- tccli/services/ms/ms_client.py +13 -1
- tccli/services/msp/msp_client.py +13 -1
- tccli/services/mvj/mvj_client.py +13 -1
- tccli/services/nlp/nlp_client.py +13 -1
- tccli/services/npp/npp_client.py +13 -1
- tccli/services/oceanus/oceanus_client.py +13 -1
- tccli/services/ocr/ocr_client.py +13 -1
- tccli/services/omics/omics_client.py +13 -1
- tccli/services/organization/organization_client.py +13 -1
- tccli/services/partners/partners_client.py +13 -1
- tccli/services/pds/pds_client.py +13 -1
- tccli/services/postgres/postgres_client.py +13 -1
- tccli/services/privatedns/privatedns_client.py +13 -1
- tccli/services/pts/pts_client.py +13 -1
- tccli/services/rce/rce_client.py +13 -1
- tccli/services/redis/redis_client.py +13 -1
- tccli/services/region/region_client.py +13 -1
- tccli/services/rkp/rkp_client.py +13 -1
- tccli/services/rp/rp_client.py +13 -1
- tccli/services/rum/rum_client.py +13 -1
- tccli/services/scf/scf_client.py +13 -1
- tccli/services/ses/ses_client.py +13 -1
- tccli/services/smh/smh_client.py +13 -1
- tccli/services/smop/smop_client.py +13 -1
- tccli/services/smpn/smpn_client.py +13 -1
- tccli/services/sms/sms_client.py +13 -1
- tccli/services/soe/soe_client.py +13 -1
- tccli/services/solar/solar_client.py +13 -1
- tccli/services/sqlserver/sqlserver_client.py +13 -1
- tccli/services/ssa/ssa_client.py +13 -1
- tccli/services/ssl/ssl_client.py +13 -1
- tccli/services/sslpod/sslpod_client.py +13 -1
- tccli/services/ssm/ssm_client.py +13 -1
- tccli/services/sts/sts_client.py +13 -1
- tccli/services/svp/svp_client.py +13 -1
- tccli/services/taf/taf_client.py +13 -1
- tccli/services/tag/tag_client.py +13 -1
- tccli/services/tan/tan_client.py +13 -1
- tccli/services/tat/tat_client.py +13 -1
- tccli/services/tav/tav_client.py +13 -1
- tccli/services/tbaas/tbaas_client.py +13 -1
- tccli/services/tbm/tbm_client.py +13 -1
- tccli/services/tbp/tbp_client.py +13 -1
- tccli/services/tcaplusdb/tcaplusdb_client.py +13 -1
- tccli/services/tcb/tcb_client.py +13 -1
- tccli/services/tcbr/tcbr_client.py +13 -1
- tccli/services/tcex/tcex_client.py +13 -1
- tccli/services/tchd/tchd_client.py +13 -1
- tccli/services/tci/tci_client.py +13 -1
- tccli/services/tcm/tcm_client.py +13 -1
- tccli/services/tcr/tcr_client.py +13 -1
- tccli/services/tcss/tcss_client.py +13 -1
- tccli/services/tdcpg/tdcpg_client.py +13 -1
- tccli/services/tdid/tdid_client.py +13 -1
- tccli/services/tdmq/tdmq_client.py +13 -1
- tccli/services/tds/tds_client.py +13 -1
- tccli/services/tem/tem_client.py +13 -1
- tccli/services/teo/teo_client.py +13 -1
- tccli/services/thpc/thpc_client.py +13 -1
- tccli/services/tia/tia_client.py +13 -1
- tccli/services/tic/tic_client.py +13 -1
- tccli/services/ticm/ticm_client.py +13 -1
- tccli/services/tics/tics_client.py +13 -1
- tccli/services/tiems/tiems_client.py +13 -1
- tccli/services/tiia/tiia_client.py +13 -1
- tccli/services/tione/tione_client.py +13 -1
- tccli/services/tiw/tiw_client.py +13 -1
- tccli/services/tke/tke_client.py +13 -1
- tccli/services/tkgdq/tkgdq_client.py +13 -1
- tccli/services/tms/tms_client.py +13 -1
- tccli/services/tmt/tmt_client.py +13 -1
- tccli/services/tourism/tourism_client.py +13 -1
- tccli/services/trdp/trdp_client.py +13 -1
- tccli/services/trocket/trocket_client.py +13 -1
- tccli/services/trp/trp_client.py +13 -1
- tccli/services/trro/trro_client.py +13 -1
- tccli/services/trtc/trtc_client.py +13 -1
- tccli/services/tse/tse_client.py +13 -1
- tccli/services/tsf/tsf_client.py +13 -1
- tccli/services/tsi/tsi_client.py +13 -1
- tccli/services/tsw/tsw_client.py +13 -1
- tccli/services/tts/tts_client.py +13 -1
- tccli/services/ump/ump_client.py +13 -1
- tccli/services/vcg/vcg_client.py +13 -1
- tccli/services/vclm/vclm_client.py +13 -1
- tccli/services/vdb/vdb_client.py +13 -1
- tccli/services/vm/vm_client.py +13 -1
- tccli/services/vms/vms_client.py +13 -1
- tccli/services/vod/vod_client.py +13 -1
- tccli/services/vpc/vpc_client.py +13 -1
- tccli/services/vrs/vrs_client.py +13 -1
- tccli/services/vtc/vtc_client.py +13 -1
- tccli/services/waf/waf_client.py +13 -1
- tccli/services/wav/wav_client.py +13 -1
- tccli/services/wedata/wedata_client.py +13 -1
- tccli/services/weilingwith/weilingwith_client.py +13 -1
- tccli/services/wss/wss_client.py +13 -1
- tccli/services/yinsuda/yinsuda_client.py +13 -1
- tccli/services/youmall/youmall_client.py +13 -1
- tccli/services/yunjing/yunjing_client.py +13 -1
- tccli/services/yunsou/yunsou_client.py +13 -1
- tccli/utils.py +8 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/RECORD +266 -266
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1217.1.dist-info → tccli-3.0.1218.1.dist-info}/license_files/LICENSE +0 -0
@@ -2322,7 +2322,13 @@ def action_caller():
|
|
2322
2322
|
|
2323
2323
|
def parse_global_arg(parsed_globals):
|
2324
2324
|
g_param = parsed_globals
|
2325
|
-
|
2325
|
+
cvm_role_flag = True
|
2326
|
+
for param in parsed_globals.keys():
|
2327
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2328
|
+
OptionsDefine.RoleSessionName]:
|
2329
|
+
if parsed_globals[param] is not None:
|
2330
|
+
cvm_role_flag = False
|
2331
|
+
break
|
2326
2332
|
is_exist_profile = True
|
2327
2333
|
if not parsed_globals["profile"]:
|
2328
2334
|
is_exist_profile = False
|
@@ -2353,6 +2359,7 @@ def parse_global_arg(parsed_globals):
|
|
2353
2359
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2354
2360
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2355
2361
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2362
|
+
cvm_role_flag = False
|
2356
2363
|
|
2357
2364
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2358
2365
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2360,6 +2367,11 @@ def parse_global_arg(parsed_globals):
|
|
2360
2367
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2361
2368
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2362
2369
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2370
|
+
cvm_role_flag = False
|
2371
|
+
|
2372
|
+
if cvm_role_flag:
|
2373
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2374
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2363
2375
|
|
2364
2376
|
for param in g_param.keys():
|
2365
2377
|
if g_param[param] is None:
|
@@ -308,7 +308,13 @@ def action_caller():
|
|
308
308
|
|
309
309
|
def parse_global_arg(parsed_globals):
|
310
310
|
g_param = parsed_globals
|
311
|
-
|
311
|
+
cvm_role_flag = True
|
312
|
+
for param in parsed_globals.keys():
|
313
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
314
|
+
OptionsDefine.RoleSessionName]:
|
315
|
+
if parsed_globals[param] is not None:
|
316
|
+
cvm_role_flag = False
|
317
|
+
break
|
312
318
|
is_exist_profile = True
|
313
319
|
if not parsed_globals["profile"]:
|
314
320
|
is_exist_profile = False
|
@@ -339,6 +345,7 @@ def parse_global_arg(parsed_globals):
|
|
339
345
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
340
346
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
341
347
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
348
|
+
cvm_role_flag = False
|
342
349
|
|
343
350
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
344
351
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -346,6 +353,11 @@ def parse_global_arg(parsed_globals):
|
|
346
353
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
347
354
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
348
355
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
356
|
+
cvm_role_flag = False
|
357
|
+
|
358
|
+
if cvm_role_flag:
|
359
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
360
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
349
361
|
|
350
362
|
for param in g_param.keys():
|
351
363
|
if g_param[param] is None:
|
tccli/services/cvm/cvm_client.py
CHANGED
@@ -5396,7 +5396,13 @@ def action_caller():
|
|
5396
5396
|
|
5397
5397
|
def parse_global_arg(parsed_globals):
|
5398
5398
|
g_param = parsed_globals
|
5399
|
-
|
5399
|
+
cvm_role_flag = True
|
5400
|
+
for param in parsed_globals.keys():
|
5401
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
5402
|
+
OptionsDefine.RoleSessionName]:
|
5403
|
+
if parsed_globals[param] is not None:
|
5404
|
+
cvm_role_flag = False
|
5405
|
+
break
|
5400
5406
|
is_exist_profile = True
|
5401
5407
|
if not parsed_globals["profile"]:
|
5402
5408
|
is_exist_profile = False
|
@@ -5427,6 +5433,7 @@ def parse_global_arg(parsed_globals):
|
|
5427
5433
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
5428
5434
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
5429
5435
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
5436
|
+
cvm_role_flag = False
|
5430
5437
|
|
5431
5438
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
5432
5439
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -5434,6 +5441,11 @@ def parse_global_arg(parsed_globals):
|
|
5434
5441
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
5435
5442
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
5436
5443
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
5444
|
+
cvm_role_flag = False
|
5445
|
+
|
5446
|
+
if cvm_role_flag:
|
5447
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
5448
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
5437
5449
|
|
5438
5450
|
for param in g_param.keys():
|
5439
5451
|
if g_param[param] is None:
|
tccli/services/cwp/cwp_client.py
CHANGED
@@ -27285,7 +27285,13 @@ def action_caller():
|
|
27285
27285
|
|
27286
27286
|
def parse_global_arg(parsed_globals):
|
27287
27287
|
g_param = parsed_globals
|
27288
|
-
|
27288
|
+
cvm_role_flag = True
|
27289
|
+
for param in parsed_globals.keys():
|
27290
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
27291
|
+
OptionsDefine.RoleSessionName]:
|
27292
|
+
if parsed_globals[param] is not None:
|
27293
|
+
cvm_role_flag = False
|
27294
|
+
break
|
27289
27295
|
is_exist_profile = True
|
27290
27296
|
if not parsed_globals["profile"]:
|
27291
27297
|
is_exist_profile = False
|
@@ -27316,6 +27322,7 @@ def parse_global_arg(parsed_globals):
|
|
27316
27322
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
27317
27323
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
27318
27324
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
27325
|
+
cvm_role_flag = False
|
27319
27326
|
|
27320
27327
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
27321
27328
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -27323,6 +27330,11 @@ def parse_global_arg(parsed_globals):
|
|
27323
27330
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
27324
27331
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
27325
27332
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
27333
|
+
cvm_role_flag = False
|
27334
|
+
|
27335
|
+
if cvm_role_flag:
|
27336
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
27337
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
27326
27338
|
|
27327
27339
|
for param in g_param.keys():
|
27328
27340
|
if g_param[param] is None:
|
tccli/services/cws/cws_client.py
CHANGED
@@ -1050,7 +1050,13 @@ def action_caller():
|
|
1050
1050
|
|
1051
1051
|
def parse_global_arg(parsed_globals):
|
1052
1052
|
g_param = parsed_globals
|
1053
|
-
|
1053
|
+
cvm_role_flag = True
|
1054
|
+
for param in parsed_globals.keys():
|
1055
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1056
|
+
OptionsDefine.RoleSessionName]:
|
1057
|
+
if parsed_globals[param] is not None:
|
1058
|
+
cvm_role_flag = False
|
1059
|
+
break
|
1054
1060
|
is_exist_profile = True
|
1055
1061
|
if not parsed_globals["profile"]:
|
1056
1062
|
is_exist_profile = False
|
@@ -1081,6 +1087,7 @@ def parse_global_arg(parsed_globals):
|
|
1081
1087
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1082
1088
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1083
1089
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1090
|
+
cvm_role_flag = False
|
1084
1091
|
|
1085
1092
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1086
1093
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1088,6 +1095,11 @@ def parse_global_arg(parsed_globals):
|
|
1088
1095
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1089
1096
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1090
1097
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1098
|
+
cvm_role_flag = False
|
1099
|
+
|
1100
|
+
if cvm_role_flag:
|
1101
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1102
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1091
1103
|
|
1092
1104
|
for param in g_param.keys():
|
1093
1105
|
if g_param[param] is None:
|
@@ -7940,7 +7940,13 @@ def action_caller():
|
|
7940
7940
|
|
7941
7941
|
def parse_global_arg(parsed_globals):
|
7942
7942
|
g_param = parsed_globals
|
7943
|
-
|
7943
|
+
cvm_role_flag = True
|
7944
|
+
for param in parsed_globals.keys():
|
7945
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
7946
|
+
OptionsDefine.RoleSessionName]:
|
7947
|
+
if parsed_globals[param] is not None:
|
7948
|
+
cvm_role_flag = False
|
7949
|
+
break
|
7944
7950
|
is_exist_profile = True
|
7945
7951
|
if not parsed_globals["profile"]:
|
7946
7952
|
is_exist_profile = False
|
@@ -7971,6 +7977,7 @@ def parse_global_arg(parsed_globals):
|
|
7971
7977
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
7972
7978
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
7973
7979
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
7980
|
+
cvm_role_flag = False
|
7974
7981
|
|
7975
7982
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
7976
7983
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -7978,6 +7985,11 @@ def parse_global_arg(parsed_globals):
|
|
7978
7985
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
7979
7986
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
7980
7987
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
7988
|
+
cvm_role_flag = False
|
7989
|
+
|
7990
|
+
if cvm_role_flag:
|
7991
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
7992
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
7981
7993
|
|
7982
7994
|
for param in g_param.keys():
|
7983
7995
|
if g_param[param] is None:
|
@@ -3382,7 +3382,13 @@ def action_caller():
|
|
3382
3382
|
|
3383
3383
|
def parse_global_arg(parsed_globals):
|
3384
3384
|
g_param = parsed_globals
|
3385
|
-
|
3385
|
+
cvm_role_flag = True
|
3386
|
+
for param in parsed_globals.keys():
|
3387
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3388
|
+
OptionsDefine.RoleSessionName]:
|
3389
|
+
if parsed_globals[param] is not None:
|
3390
|
+
cvm_role_flag = False
|
3391
|
+
break
|
3386
3392
|
is_exist_profile = True
|
3387
3393
|
if not parsed_globals["profile"]:
|
3388
3394
|
is_exist_profile = False
|
@@ -3413,6 +3419,7 @@ def parse_global_arg(parsed_globals):
|
|
3413
3419
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3414
3420
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3415
3421
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3422
|
+
cvm_role_flag = False
|
3416
3423
|
|
3417
3424
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3418
3425
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3420,6 +3427,11 @@ def parse_global_arg(parsed_globals):
|
|
3420
3427
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3421
3428
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3422
3429
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3430
|
+
cvm_role_flag = False
|
3431
|
+
|
3432
|
+
if cvm_role_flag:
|
3433
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3434
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3423
3435
|
|
3424
3436
|
for param in g_param.keys():
|
3425
3437
|
if g_param[param] is None:
|
@@ -96,7 +96,13 @@ def action_caller():
|
|
96
96
|
|
97
97
|
def parse_global_arg(parsed_globals):
|
98
98
|
g_param = parsed_globals
|
99
|
-
|
99
|
+
cvm_role_flag = True
|
100
|
+
for param in parsed_globals.keys():
|
101
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
102
|
+
OptionsDefine.RoleSessionName]:
|
103
|
+
if parsed_globals[param] is not None:
|
104
|
+
cvm_role_flag = False
|
105
|
+
break
|
100
106
|
is_exist_profile = True
|
101
107
|
if not parsed_globals["profile"]:
|
102
108
|
is_exist_profile = False
|
@@ -127,6 +133,7 @@ def parse_global_arg(parsed_globals):
|
|
127
133
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
128
134
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
129
135
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
136
|
+
cvm_role_flag = False
|
130
137
|
|
131
138
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
132
139
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -134,6 +141,11 @@ def parse_global_arg(parsed_globals):
|
|
134
141
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
135
142
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
136
143
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
144
|
+
cvm_role_flag = False
|
145
|
+
|
146
|
+
if cvm_role_flag:
|
147
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
148
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
137
149
|
|
138
150
|
for param in g_param.keys():
|
139
151
|
if g_param[param] is None:
|
@@ -5979,7 +5979,13 @@ def action_caller():
|
|
5979
5979
|
|
5980
5980
|
def parse_global_arg(parsed_globals):
|
5981
5981
|
g_param = parsed_globals
|
5982
|
-
|
5982
|
+
cvm_role_flag = True
|
5983
|
+
for param in parsed_globals.keys():
|
5984
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
5985
|
+
OptionsDefine.RoleSessionName]:
|
5986
|
+
if parsed_globals[param] is not None:
|
5987
|
+
cvm_role_flag = False
|
5988
|
+
break
|
5983
5989
|
is_exist_profile = True
|
5984
5990
|
if not parsed_globals["profile"]:
|
5985
5991
|
is_exist_profile = False
|
@@ -6010,6 +6016,7 @@ def parse_global_arg(parsed_globals):
|
|
6010
6016
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
6011
6017
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
6012
6018
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
6019
|
+
cvm_role_flag = False
|
6013
6020
|
|
6014
6021
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
6015
6022
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -6017,6 +6024,11 @@ def parse_global_arg(parsed_globals):
|
|
6017
6024
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
6018
6025
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
6019
6026
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
6027
|
+
cvm_role_flag = False
|
6028
|
+
|
6029
|
+
if cvm_role_flag:
|
6030
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
6031
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
6020
6032
|
|
6021
6033
|
for param in g_param.keys():
|
6022
6034
|
if g_param[param] is None:
|
@@ -3387,7 +3387,13 @@ def action_caller():
|
|
3387
3387
|
|
3388
3388
|
def parse_global_arg(parsed_globals):
|
3389
3389
|
g_param = parsed_globals
|
3390
|
-
|
3390
|
+
cvm_role_flag = True
|
3391
|
+
for param in parsed_globals.keys():
|
3392
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3393
|
+
OptionsDefine.RoleSessionName]:
|
3394
|
+
if parsed_globals[param] is not None:
|
3395
|
+
cvm_role_flag = False
|
3396
|
+
break
|
3391
3397
|
is_exist_profile = True
|
3392
3398
|
if not parsed_globals["profile"]:
|
3393
3399
|
is_exist_profile = False
|
@@ -3418,6 +3424,7 @@ def parse_global_arg(parsed_globals):
|
|
3418
3424
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3419
3425
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3420
3426
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3427
|
+
cvm_role_flag = False
|
3421
3428
|
|
3422
3429
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3423
3430
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3425,6 +3432,11 @@ def parse_global_arg(parsed_globals):
|
|
3425
3432
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3426
3433
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3427
3434
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3435
|
+
cvm_role_flag = False
|
3436
|
+
|
3437
|
+
if cvm_role_flag:
|
3438
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3439
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3428
3440
|
|
3429
3441
|
for param in g_param.keys():
|
3430
3442
|
if g_param[param] is None:
|
@@ -361,7 +361,13 @@ def action_caller():
|
|
361
361
|
|
362
362
|
def parse_global_arg(parsed_globals):
|
363
363
|
g_param = parsed_globals
|
364
|
-
|
364
|
+
cvm_role_flag = True
|
365
|
+
for param in parsed_globals.keys():
|
366
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
367
|
+
OptionsDefine.RoleSessionName]:
|
368
|
+
if parsed_globals[param] is not None:
|
369
|
+
cvm_role_flag = False
|
370
|
+
break
|
365
371
|
is_exist_profile = True
|
366
372
|
if not parsed_globals["profile"]:
|
367
373
|
is_exist_profile = False
|
@@ -392,6 +398,7 @@ def parse_global_arg(parsed_globals):
|
|
392
398
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
393
399
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
394
400
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
401
|
+
cvm_role_flag = False
|
395
402
|
|
396
403
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
397
404
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -399,6 +406,11 @@ def parse_global_arg(parsed_globals):
|
|
399
406
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
400
407
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
401
408
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
409
|
+
cvm_role_flag = False
|
410
|
+
|
411
|
+
if cvm_role_flag:
|
412
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
413
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
402
414
|
|
403
415
|
for param in g_param.keys():
|
404
416
|
if g_param[param] is None:
|
tccli/services/dc/dc_client.py
CHANGED
@@ -1209,7 +1209,13 @@ def action_caller():
|
|
1209
1209
|
|
1210
1210
|
def parse_global_arg(parsed_globals):
|
1211
1211
|
g_param = parsed_globals
|
1212
|
-
|
1212
|
+
cvm_role_flag = True
|
1213
|
+
for param in parsed_globals.keys():
|
1214
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1215
|
+
OptionsDefine.RoleSessionName]:
|
1216
|
+
if parsed_globals[param] is not None:
|
1217
|
+
cvm_role_flag = False
|
1218
|
+
break
|
1213
1219
|
is_exist_profile = True
|
1214
1220
|
if not parsed_globals["profile"]:
|
1215
1221
|
is_exist_profile = False
|
@@ -1240,6 +1246,7 @@ def parse_global_arg(parsed_globals):
|
|
1240
1246
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1241
1247
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1242
1248
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1249
|
+
cvm_role_flag = False
|
1243
1250
|
|
1244
1251
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1245
1252
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1247,6 +1254,11 @@ def parse_global_arg(parsed_globals):
|
|
1247
1254
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1248
1255
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1249
1256
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1257
|
+
cvm_role_flag = False
|
1258
|
+
|
1259
|
+
if cvm_role_flag:
|
1260
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1261
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1250
1262
|
|
1251
1263
|
for param in g_param.keys():
|
1252
1264
|
if g_param[param] is None:
|
@@ -4124,7 +4124,13 @@ def action_caller():
|
|
4124
4124
|
|
4125
4125
|
def parse_global_arg(parsed_globals):
|
4126
4126
|
g_param = parsed_globals
|
4127
|
-
|
4127
|
+
cvm_role_flag = True
|
4128
|
+
for param in parsed_globals.keys():
|
4129
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4130
|
+
OptionsDefine.RoleSessionName]:
|
4131
|
+
if parsed_globals[param] is not None:
|
4132
|
+
cvm_role_flag = False
|
4133
|
+
break
|
4128
4134
|
is_exist_profile = True
|
4129
4135
|
if not parsed_globals["profile"]:
|
4130
4136
|
is_exist_profile = False
|
@@ -4155,6 +4161,7 @@ def parse_global_arg(parsed_globals):
|
|
4155
4161
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4156
4162
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4157
4163
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4164
|
+
cvm_role_flag = False
|
4158
4165
|
|
4159
4166
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4160
4167
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4162,6 +4169,11 @@ def parse_global_arg(parsed_globals):
|
|
4162
4169
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4163
4170
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4164
4171
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4172
|
+
cvm_role_flag = False
|
4173
|
+
|
4174
|
+
if cvm_role_flag:
|
4175
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4176
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4165
4177
|
|
4166
4178
|
for param in g_param.keys():
|
4167
4179
|
if g_param[param] is None:
|
tccli/services/dlc/dlc_client.py
CHANGED
@@ -7675,7 +7675,13 @@ def action_caller():
|
|
7675
7675
|
|
7676
7676
|
def parse_global_arg(parsed_globals):
|
7677
7677
|
g_param = parsed_globals
|
7678
|
-
|
7678
|
+
cvm_role_flag = True
|
7679
|
+
for param in parsed_globals.keys():
|
7680
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
7681
|
+
OptionsDefine.RoleSessionName]:
|
7682
|
+
if parsed_globals[param] is not None:
|
7683
|
+
cvm_role_flag = False
|
7684
|
+
break
|
7679
7685
|
is_exist_profile = True
|
7680
7686
|
if not parsed_globals["profile"]:
|
7681
7687
|
is_exist_profile = False
|
@@ -7706,6 +7712,7 @@ def parse_global_arg(parsed_globals):
|
|
7706
7712
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
7707
7713
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
7708
7714
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
7715
|
+
cvm_role_flag = False
|
7709
7716
|
|
7710
7717
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
7711
7718
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -7713,6 +7720,11 @@ def parse_global_arg(parsed_globals):
|
|
7713
7720
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
7714
7721
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
7715
7722
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
7723
|
+
cvm_role_flag = False
|
7724
|
+
|
7725
|
+
if cvm_role_flag:
|
7726
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
7727
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
7716
7728
|
|
7717
7729
|
for param in g_param.keys():
|
7718
7730
|
if g_param[param] is None:
|
@@ -4389,7 +4389,13 @@ def action_caller():
|
|
4389
4389
|
|
4390
4390
|
def parse_global_arg(parsed_globals):
|
4391
4391
|
g_param = parsed_globals
|
4392
|
-
|
4392
|
+
cvm_role_flag = True
|
4393
|
+
for param in parsed_globals.keys():
|
4394
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4395
|
+
OptionsDefine.RoleSessionName]:
|
4396
|
+
if parsed_globals[param] is not None:
|
4397
|
+
cvm_role_flag = False
|
4398
|
+
break
|
4393
4399
|
is_exist_profile = True
|
4394
4400
|
if not parsed_globals["profile"]:
|
4395
4401
|
is_exist_profile = False
|
@@ -4420,6 +4426,7 @@ def parse_global_arg(parsed_globals):
|
|
4420
4426
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4421
4427
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4422
4428
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4429
|
+
cvm_role_flag = False
|
4423
4430
|
|
4424
4431
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4425
4432
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4427,6 +4434,11 @@ def parse_global_arg(parsed_globals):
|
|
4427
4434
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4428
4435
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4429
4436
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4437
|
+
cvm_role_flag = False
|
4438
|
+
|
4439
|
+
if cvm_role_flag:
|
4440
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4441
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4430
4442
|
|
4431
4443
|
for param in g_param.keys():
|
4432
4444
|
if g_param[param] is None:
|
@@ -2958,7 +2958,13 @@ def action_caller():
|
|
2958
2958
|
|
2959
2959
|
def parse_global_arg(parsed_globals):
|
2960
2960
|
g_param = parsed_globals
|
2961
|
-
|
2961
|
+
cvm_role_flag = True
|
2962
|
+
for param in parsed_globals.keys():
|
2963
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2964
|
+
OptionsDefine.RoleSessionName]:
|
2965
|
+
if parsed_globals[param] is not None:
|
2966
|
+
cvm_role_flag = False
|
2967
|
+
break
|
2962
2968
|
is_exist_profile = True
|
2963
2969
|
if not parsed_globals["profile"]:
|
2964
2970
|
is_exist_profile = False
|
@@ -2989,6 +2995,7 @@ def parse_global_arg(parsed_globals):
|
|
2989
2995
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2990
2996
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2991
2997
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2998
|
+
cvm_role_flag = False
|
2992
2999
|
|
2993
3000
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2994
3001
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2996,6 +3003,11 @@ def parse_global_arg(parsed_globals):
|
|
2996
3003
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2997
3004
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2998
3005
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3006
|
+
cvm_role_flag = False
|
3007
|
+
|
3008
|
+
if cvm_role_flag:
|
3009
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3010
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2999
3011
|
|
3000
3012
|
for param in g_param.keys():
|
3001
3013
|
if g_param[param] is None:
|
tccli/services/drm/drm_client.py
CHANGED
@@ -626,7 +626,13 @@ def action_caller():
|
|
626
626
|
|
627
627
|
def parse_global_arg(parsed_globals):
|
628
628
|
g_param = parsed_globals
|
629
|
-
|
629
|
+
cvm_role_flag = True
|
630
|
+
for param in parsed_globals.keys():
|
631
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
632
|
+
OptionsDefine.RoleSessionName]:
|
633
|
+
if parsed_globals[param] is not None:
|
634
|
+
cvm_role_flag = False
|
635
|
+
break
|
630
636
|
is_exist_profile = True
|
631
637
|
if not parsed_globals["profile"]:
|
632
638
|
is_exist_profile = False
|
@@ -657,6 +663,7 @@ def parse_global_arg(parsed_globals):
|
|
657
663
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
658
664
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
659
665
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
666
|
+
cvm_role_flag = False
|
660
667
|
|
661
668
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
662
669
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -664,6 +671,11 @@ def parse_global_arg(parsed_globals):
|
|
664
671
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
665
672
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
666
673
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
674
|
+
cvm_role_flag = False
|
675
|
+
|
676
|
+
if cvm_role_flag:
|
677
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
678
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
667
679
|
|
668
680
|
for param in g_param.keys():
|
669
681
|
if g_param[param] is None:
|
tccli/services/ds/ds_client.py
CHANGED
@@ -679,7 +679,13 @@ def action_caller():
|
|
679
679
|
|
680
680
|
def parse_global_arg(parsed_globals):
|
681
681
|
g_param = parsed_globals
|
682
|
-
|
682
|
+
cvm_role_flag = True
|
683
|
+
for param in parsed_globals.keys():
|
684
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
685
|
+
OptionsDefine.RoleSessionName]:
|
686
|
+
if parsed_globals[param] is not None:
|
687
|
+
cvm_role_flag = False
|
688
|
+
break
|
683
689
|
is_exist_profile = True
|
684
690
|
if not parsed_globals["profile"]:
|
685
691
|
is_exist_profile = False
|
@@ -710,6 +716,7 @@ def parse_global_arg(parsed_globals):
|
|
710
716
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
711
717
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
712
718
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
719
|
+
cvm_role_flag = False
|
713
720
|
|
714
721
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
715
722
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -717,6 +724,11 @@ def parse_global_arg(parsed_globals):
|
|
717
724
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
718
725
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
719
726
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
727
|
+
cvm_role_flag = False
|
728
|
+
|
729
|
+
if cvm_role_flag:
|
730
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
731
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
720
732
|
|
721
733
|
for param in g_param.keys():
|
722
734
|
if g_param[param] is None:
|