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
@@ -1585,7 +1585,13 @@ def action_caller():
|
|
1585
1585
|
|
1586
1586
|
def parse_global_arg(parsed_globals):
|
1587
1587
|
g_param = parsed_globals
|
1588
|
-
|
1588
|
+
cvm_role_flag = True
|
1589
|
+
for param in parsed_globals.keys():
|
1590
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1591
|
+
OptionsDefine.RoleSessionName]:
|
1592
|
+
if parsed_globals[param] is not None:
|
1593
|
+
cvm_role_flag = False
|
1594
|
+
break
|
1589
1595
|
is_exist_profile = True
|
1590
1596
|
if not parsed_globals["profile"]:
|
1591
1597
|
is_exist_profile = False
|
@@ -1616,6 +1622,7 @@ def parse_global_arg(parsed_globals):
|
|
1616
1622
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1617
1623
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1618
1624
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1625
|
+
cvm_role_flag = False
|
1619
1626
|
|
1620
1627
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1621
1628
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1623,6 +1630,11 @@ def parse_global_arg(parsed_globals):
|
|
1623
1630
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1624
1631
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1625
1632
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1633
|
+
cvm_role_flag = False
|
1634
|
+
|
1635
|
+
if cvm_role_flag:
|
1636
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1637
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1626
1638
|
|
1627
1639
|
for param in g_param.keys():
|
1628
1640
|
if g_param[param] is None:
|
@@ -1262,7 +1262,13 @@ def action_caller():
|
|
1262
1262
|
|
1263
1263
|
def parse_global_arg(parsed_globals):
|
1264
1264
|
g_param = parsed_globals
|
1265
|
-
|
1265
|
+
cvm_role_flag = True
|
1266
|
+
for param in parsed_globals.keys():
|
1267
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1268
|
+
OptionsDefine.RoleSessionName]:
|
1269
|
+
if parsed_globals[param] is not None:
|
1270
|
+
cvm_role_flag = False
|
1271
|
+
break
|
1266
1272
|
is_exist_profile = True
|
1267
1273
|
if not parsed_globals["profile"]:
|
1268
1274
|
is_exist_profile = False
|
@@ -1293,6 +1299,7 @@ def parse_global_arg(parsed_globals):
|
|
1293
1299
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1294
1300
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1295
1301
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1302
|
+
cvm_role_flag = False
|
1296
1303
|
|
1297
1304
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1298
1305
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1300,6 +1307,11 @@ def parse_global_arg(parsed_globals):
|
|
1300
1307
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1301
1308
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1302
1309
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1310
|
+
cvm_role_flag = False
|
1311
|
+
|
1312
|
+
if cvm_role_flag:
|
1313
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1314
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1303
1315
|
|
1304
1316
|
for param in g_param.keys():
|
1305
1317
|
if g_param[param] is None:
|
tccli/services/cii/cii_client.py
CHANGED
@@ -737,7 +737,13 @@ def action_caller():
|
|
737
737
|
|
738
738
|
def parse_global_arg(parsed_globals):
|
739
739
|
g_param = parsed_globals
|
740
|
-
|
740
|
+
cvm_role_flag = True
|
741
|
+
for param in parsed_globals.keys():
|
742
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
743
|
+
OptionsDefine.RoleSessionName]:
|
744
|
+
if parsed_globals[param] is not None:
|
745
|
+
cvm_role_flag = False
|
746
|
+
break
|
741
747
|
is_exist_profile = True
|
742
748
|
if not parsed_globals["profile"]:
|
743
749
|
is_exist_profile = False
|
@@ -768,6 +774,7 @@ def parse_global_arg(parsed_globals):
|
|
768
774
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
769
775
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
770
776
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
777
|
+
cvm_role_flag = False
|
771
778
|
|
772
779
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
773
780
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -775,6 +782,11 @@ def parse_global_arg(parsed_globals):
|
|
775
782
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
776
783
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
777
784
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
785
|
+
cvm_role_flag = False
|
786
|
+
|
787
|
+
if cvm_role_flag:
|
788
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
789
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
778
790
|
|
779
791
|
for param in g_param.keys():
|
780
792
|
if g_param[param] is None:
|
tccli/services/cim/cim_client.py
CHANGED
@@ -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:
|
tccli/services/cis/cis_client.py
CHANGED
@@ -414,7 +414,13 @@ def action_caller():
|
|
414
414
|
|
415
415
|
def parse_global_arg(parsed_globals):
|
416
416
|
g_param = parsed_globals
|
417
|
-
|
417
|
+
cvm_role_flag = True
|
418
|
+
for param in parsed_globals.keys():
|
419
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
420
|
+
OptionsDefine.RoleSessionName]:
|
421
|
+
if parsed_globals[param] is not None:
|
422
|
+
cvm_role_flag = False
|
423
|
+
break
|
418
424
|
is_exist_profile = True
|
419
425
|
if not parsed_globals["profile"]:
|
420
426
|
is_exist_profile = False
|
@@ -445,6 +451,7 @@ def parse_global_arg(parsed_globals):
|
|
445
451
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
446
452
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
447
453
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
454
|
+
cvm_role_flag = False
|
448
455
|
|
449
456
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
450
457
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -452,6 +459,11 @@ def parse_global_arg(parsed_globals):
|
|
452
459
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
453
460
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
454
461
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
462
|
+
cvm_role_flag = False
|
463
|
+
|
464
|
+
if cvm_role_flag:
|
465
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
466
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
455
467
|
|
456
468
|
for param in g_param.keys():
|
457
469
|
if g_param[param] is None:
|
@@ -4548,7 +4548,13 @@ def action_caller():
|
|
4548
4548
|
|
4549
4549
|
def parse_global_arg(parsed_globals):
|
4550
4550
|
g_param = parsed_globals
|
4551
|
-
|
4551
|
+
cvm_role_flag = True
|
4552
|
+
for param in parsed_globals.keys():
|
4553
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4554
|
+
OptionsDefine.RoleSessionName]:
|
4555
|
+
if parsed_globals[param] is not None:
|
4556
|
+
cvm_role_flag = False
|
4557
|
+
break
|
4552
4558
|
is_exist_profile = True
|
4553
4559
|
if not parsed_globals["profile"]:
|
4554
4560
|
is_exist_profile = False
|
@@ -4579,6 +4585,7 @@ def parse_global_arg(parsed_globals):
|
|
4579
4585
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4580
4586
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4581
4587
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4588
|
+
cvm_role_flag = False
|
4582
4589
|
|
4583
4590
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4584
4591
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4586,6 +4593,11 @@ def parse_global_arg(parsed_globals):
|
|
4586
4593
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4587
4594
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4588
4595
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4596
|
+
cvm_role_flag = False
|
4597
|
+
|
4598
|
+
if cvm_role_flag:
|
4599
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4600
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4589
4601
|
|
4590
4602
|
for param in g_param.keys():
|
4591
4603
|
if g_param[param] is None:
|
tccli/services/clb/clb_client.py
CHANGED
@@ -4601,7 +4601,13 @@ def action_caller():
|
|
4601
4601
|
|
4602
4602
|
def parse_global_arg(parsed_globals):
|
4603
4603
|
g_param = parsed_globals
|
4604
|
-
|
4604
|
+
cvm_role_flag = True
|
4605
|
+
for param in parsed_globals.keys():
|
4606
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4607
|
+
OptionsDefine.RoleSessionName]:
|
4608
|
+
if parsed_globals[param] is not None:
|
4609
|
+
cvm_role_flag = False
|
4610
|
+
break
|
4605
4611
|
is_exist_profile = True
|
4606
4612
|
if not parsed_globals["profile"]:
|
4607
4613
|
is_exist_profile = False
|
@@ -4632,6 +4638,7 @@ def parse_global_arg(parsed_globals):
|
|
4632
4638
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4633
4639
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4634
4640
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4641
|
+
cvm_role_flag = False
|
4635
4642
|
|
4636
4643
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4637
4644
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4639,6 +4646,11 @@ def parse_global_arg(parsed_globals):
|
|
4639
4646
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4640
4647
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4641
4648
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4649
|
+
cvm_role_flag = False
|
4650
|
+
|
4651
|
+
if cvm_role_flag:
|
4652
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4653
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4642
4654
|
|
4643
4655
|
for param in g_param.keys():
|
4644
4656
|
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:
|
@@ -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:
|
@@ -785,7 +785,13 @@ def action_caller():
|
|
785
785
|
|
786
786
|
def parse_global_arg(parsed_globals):
|
787
787
|
g_param = parsed_globals
|
788
|
-
|
788
|
+
cvm_role_flag = True
|
789
|
+
for param in parsed_globals.keys():
|
790
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
791
|
+
OptionsDefine.RoleSessionName]:
|
792
|
+
if parsed_globals[param] is not None:
|
793
|
+
cvm_role_flag = False
|
794
|
+
break
|
789
795
|
is_exist_profile = True
|
790
796
|
if not parsed_globals["profile"]:
|
791
797
|
is_exist_profile = False
|
@@ -816,6 +822,7 @@ def parse_global_arg(parsed_globals):
|
|
816
822
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
817
823
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
818
824
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
825
|
+
cvm_role_flag = False
|
819
826
|
|
820
827
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
821
828
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -823,6 +830,11 @@ def parse_global_arg(parsed_globals):
|
|
823
830
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
824
831
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
825
832
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
833
|
+
cvm_role_flag = False
|
834
|
+
|
835
|
+
if cvm_role_flag:
|
836
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
837
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
826
838
|
|
827
839
|
for param in g_param.keys():
|
828
840
|
if g_param[param] is None:
|
@@ -520,7 +520,13 @@ def action_caller():
|
|
520
520
|
|
521
521
|
def parse_global_arg(parsed_globals):
|
522
522
|
g_param = parsed_globals
|
523
|
-
|
523
|
+
cvm_role_flag = True
|
524
|
+
for param in parsed_globals.keys():
|
525
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
526
|
+
OptionsDefine.RoleSessionName]:
|
527
|
+
if parsed_globals[param] is not None:
|
528
|
+
cvm_role_flag = False
|
529
|
+
break
|
524
530
|
is_exist_profile = True
|
525
531
|
if not parsed_globals["profile"]:
|
526
532
|
is_exist_profile = False
|
@@ -551,6 +557,7 @@ def parse_global_arg(parsed_globals):
|
|
551
557
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
552
558
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
553
559
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
560
|
+
cvm_role_flag = False
|
554
561
|
|
555
562
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
556
563
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -558,6 +565,11 @@ def parse_global_arg(parsed_globals):
|
|
558
565
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
559
566
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
560
567
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
568
|
+
cvm_role_flag = False
|
569
|
+
|
570
|
+
if cvm_role_flag:
|
571
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
572
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
561
573
|
|
562
574
|
for param in g_param.keys():
|
563
575
|
if g_param[param] is None:
|
tccli/services/cls/cls_client.py
CHANGED
@@ -5827,7 +5827,13 @@ def action_caller():
|
|
5827
5827
|
|
5828
5828
|
def parse_global_arg(parsed_globals):
|
5829
5829
|
g_param = parsed_globals
|
5830
|
-
|
5830
|
+
cvm_role_flag = True
|
5831
|
+
for param in parsed_globals.keys():
|
5832
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
5833
|
+
OptionsDefine.RoleSessionName]:
|
5834
|
+
if parsed_globals[param] is not None:
|
5835
|
+
cvm_role_flag = False
|
5836
|
+
break
|
5831
5837
|
is_exist_profile = True
|
5832
5838
|
if not parsed_globals["profile"]:
|
5833
5839
|
is_exist_profile = False
|
@@ -5858,6 +5864,7 @@ def parse_global_arg(parsed_globals):
|
|
5858
5864
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
5859
5865
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
5860
5866
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
5867
|
+
cvm_role_flag = False
|
5861
5868
|
|
5862
5869
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
5863
5870
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -5865,6 +5872,11 @@ def parse_global_arg(parsed_globals):
|
|
5865
5872
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
5866
5873
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
5867
5874
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
5875
|
+
cvm_role_flag = False
|
5876
|
+
|
5877
|
+
if cvm_role_flag:
|
5878
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
5879
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
5868
5880
|
|
5869
5881
|
for param in g_param.keys():
|
5870
5882
|
if g_param[param] is None:
|
tccli/services/cme/cme_client.py
CHANGED
@@ -2693,7 +2693,13 @@ def action_caller():
|
|
2693
2693
|
|
2694
2694
|
def parse_global_arg(parsed_globals):
|
2695
2695
|
g_param = parsed_globals
|
2696
|
-
|
2696
|
+
cvm_role_flag = True
|
2697
|
+
for param in parsed_globals.keys():
|
2698
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2699
|
+
OptionsDefine.RoleSessionName]:
|
2700
|
+
if parsed_globals[param] is not None:
|
2701
|
+
cvm_role_flag = False
|
2702
|
+
break
|
2697
2703
|
is_exist_profile = True
|
2698
2704
|
if not parsed_globals["profile"]:
|
2699
2705
|
is_exist_profile = False
|
@@ -2724,6 +2730,7 @@ def parse_global_arg(parsed_globals):
|
|
2724
2730
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2725
2731
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2726
2732
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2733
|
+
cvm_role_flag = False
|
2727
2734
|
|
2728
2735
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2729
2736
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2731,6 +2738,11 @@ def parse_global_arg(parsed_globals):
|
|
2731
2738
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2732
2739
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2733
2740
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2741
|
+
cvm_role_flag = False
|
2742
|
+
|
2743
|
+
if cvm_role_flag:
|
2744
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2745
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2734
2746
|
|
2735
2747
|
for param in g_param.keys():
|
2736
2748
|
if g_param[param] is None:
|
tccli/services/cmq/cmq_client.py
CHANGED
@@ -944,7 +944,13 @@ def action_caller():
|
|
944
944
|
|
945
945
|
def parse_global_arg(parsed_globals):
|
946
946
|
g_param = parsed_globals
|
947
|
-
|
947
|
+
cvm_role_flag = True
|
948
|
+
for param in parsed_globals.keys():
|
949
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
950
|
+
OptionsDefine.RoleSessionName]:
|
951
|
+
if parsed_globals[param] is not None:
|
952
|
+
cvm_role_flag = False
|
953
|
+
break
|
948
954
|
is_exist_profile = True
|
949
955
|
if not parsed_globals["profile"]:
|
950
956
|
is_exist_profile = False
|
@@ -975,6 +981,7 @@ def parse_global_arg(parsed_globals):
|
|
975
981
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
976
982
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
977
983
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
984
|
+
cvm_role_flag = False
|
978
985
|
|
979
986
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
980
987
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -982,6 +989,11 @@ def parse_global_arg(parsed_globals):
|
|
982
989
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
983
990
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
984
991
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
992
|
+
cvm_role_flag = False
|
993
|
+
|
994
|
+
if cvm_role_flag:
|
995
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
996
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
985
997
|
|
986
998
|
for param in g_param.keys():
|
987
999
|
if g_param[param] is None:
|
tccli/services/cms/cms_client.py
CHANGED
@@ -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:
|
@@ -202,7 +202,13 @@ def action_caller():
|
|
202
202
|
|
203
203
|
def parse_global_arg(parsed_globals):
|
204
204
|
g_param = parsed_globals
|
205
|
-
|
205
|
+
cvm_role_flag = True
|
206
|
+
for param in parsed_globals.keys():
|
207
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
208
|
+
OptionsDefine.RoleSessionName]:
|
209
|
+
if parsed_globals[param] is not None:
|
210
|
+
cvm_role_flag = False
|
211
|
+
break
|
206
212
|
is_exist_profile = True
|
207
213
|
if not parsed_globals["profile"]:
|
208
214
|
is_exist_profile = False
|
@@ -233,6 +239,7 @@ def parse_global_arg(parsed_globals):
|
|
233
239
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
234
240
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
235
241
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
242
|
+
cvm_role_flag = False
|
236
243
|
|
237
244
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
238
245
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -240,6 +247,11 @@ def parse_global_arg(parsed_globals):
|
|
240
247
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
241
248
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
242
249
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
250
|
+
cvm_role_flag = False
|
251
|
+
|
252
|
+
if cvm_role_flag:
|
253
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
254
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
243
255
|
|
244
256
|
for param in g_param.keys():
|
245
257
|
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:
|
@@ -11650,7 +11650,13 @@ def action_caller():
|
|
11650
11650
|
|
11651
11651
|
def parse_global_arg(parsed_globals):
|
11652
11652
|
g_param = parsed_globals
|
11653
|
-
|
11653
|
+
cvm_role_flag = True
|
11654
|
+
for param in parsed_globals.keys():
|
11655
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
11656
|
+
OptionsDefine.RoleSessionName]:
|
11657
|
+
if parsed_globals[param] is not None:
|
11658
|
+
cvm_role_flag = False
|
11659
|
+
break
|
11654
11660
|
is_exist_profile = True
|
11655
11661
|
if not parsed_globals["profile"]:
|
11656
11662
|
is_exist_profile = False
|
@@ -11681,6 +11687,7 @@ def parse_global_arg(parsed_globals):
|
|
11681
11687
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
11682
11688
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
11683
11689
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
11690
|
+
cvm_role_flag = False
|
11684
11691
|
|
11685
11692
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
11686
11693
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -11688,6 +11695,11 @@ def parse_global_arg(parsed_globals):
|
|
11688
11695
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
11689
11696
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
11690
11697
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
11698
|
+
cvm_role_flag = False
|
11699
|
+
|
11700
|
+
if cvm_role_flag:
|
11701
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
11702
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
11691
11703
|
|
11692
11704
|
for param in g_param.keys():
|
11693
11705
|
if g_param[param] is None:
|