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
@@ -2110,7 +2110,13 @@ def action_caller():
|
|
2110
2110
|
|
2111
2111
|
def parse_global_arg(parsed_globals):
|
2112
2112
|
g_param = parsed_globals
|
2113
|
-
|
2113
|
+
cvm_role_flag = True
|
2114
|
+
for param in parsed_globals.keys():
|
2115
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2116
|
+
OptionsDefine.RoleSessionName]:
|
2117
|
+
if parsed_globals[param] is not None:
|
2118
|
+
cvm_role_flag = False
|
2119
|
+
break
|
2114
2120
|
is_exist_profile = True
|
2115
2121
|
if not parsed_globals["profile"]:
|
2116
2122
|
is_exist_profile = False
|
@@ -2141,6 +2147,7 @@ def parse_global_arg(parsed_globals):
|
|
2141
2147
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2142
2148
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2143
2149
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2150
|
+
cvm_role_flag = False
|
2144
2151
|
|
2145
2152
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2146
2153
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2148,6 +2155,11 @@ def parse_global_arg(parsed_globals):
|
|
2148
2155
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2149
2156
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2150
2157
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2158
|
+
cvm_role_flag = False
|
2159
|
+
|
2160
|
+
if cvm_role_flag:
|
2161
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2162
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2151
2163
|
|
2152
2164
|
for param in g_param.keys():
|
2153
2165
|
if g_param[param] is None:
|
tccli/services/ocr/ocr_client.py
CHANGED
@@ -4866,7 +4866,13 @@ def action_caller():
|
|
4866
4866
|
|
4867
4867
|
def parse_global_arg(parsed_globals):
|
4868
4868
|
g_param = parsed_globals
|
4869
|
-
|
4869
|
+
cvm_role_flag = True
|
4870
|
+
for param in parsed_globals.keys():
|
4871
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
4872
|
+
OptionsDefine.RoleSessionName]:
|
4873
|
+
if parsed_globals[param] is not None:
|
4874
|
+
cvm_role_flag = False
|
4875
|
+
break
|
4870
4876
|
is_exist_profile = True
|
4871
4877
|
if not parsed_globals["profile"]:
|
4872
4878
|
is_exist_profile = False
|
@@ -4897,6 +4903,7 @@ def parse_global_arg(parsed_globals):
|
|
4897
4903
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
4898
4904
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
4899
4905
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
4906
|
+
cvm_role_flag = False
|
4900
4907
|
|
4901
4908
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
4902
4909
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -4904,6 +4911,11 @@ def parse_global_arg(parsed_globals):
|
|
4904
4911
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
4905
4912
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
4906
4913
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
4914
|
+
cvm_role_flag = False
|
4915
|
+
|
4916
|
+
if cvm_role_flag:
|
4917
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
4918
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
4907
4919
|
|
4908
4920
|
for param in g_param.keys():
|
4909
4921
|
if g_param[param] is None:
|
@@ -1103,7 +1103,13 @@ def action_caller():
|
|
1103
1103
|
|
1104
1104
|
def parse_global_arg(parsed_globals):
|
1105
1105
|
g_param = parsed_globals
|
1106
|
-
|
1106
|
+
cvm_role_flag = True
|
1107
|
+
for param in parsed_globals.keys():
|
1108
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1109
|
+
OptionsDefine.RoleSessionName]:
|
1110
|
+
if parsed_globals[param] is not None:
|
1111
|
+
cvm_role_flag = False
|
1112
|
+
break
|
1107
1113
|
is_exist_profile = True
|
1108
1114
|
if not parsed_globals["profile"]:
|
1109
1115
|
is_exist_profile = False
|
@@ -1134,6 +1140,7 @@ def parse_global_arg(parsed_globals):
|
|
1134
1140
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1135
1141
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1136
1142
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1143
|
+
cvm_role_flag = False
|
1137
1144
|
|
1138
1145
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1139
1146
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1141,6 +1148,11 @@ def parse_global_arg(parsed_globals):
|
|
1141
1148
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1142
1149
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1143
1150
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1151
|
+
cvm_role_flag = False
|
1152
|
+
|
1153
|
+
if cvm_role_flag:
|
1154
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1155
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1144
1156
|
|
1145
1157
|
for param in g_param.keys():
|
1146
1158
|
if g_param[param] is None:
|
@@ -7256,7 +7256,13 @@ def action_caller():
|
|
7256
7256
|
|
7257
7257
|
def parse_global_arg(parsed_globals):
|
7258
7258
|
g_param = parsed_globals
|
7259
|
-
|
7259
|
+
cvm_role_flag = True
|
7260
|
+
for param in parsed_globals.keys():
|
7261
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
7262
|
+
OptionsDefine.RoleSessionName]:
|
7263
|
+
if parsed_globals[param] is not None:
|
7264
|
+
cvm_role_flag = False
|
7265
|
+
break
|
7260
7266
|
is_exist_profile = True
|
7261
7267
|
if not parsed_globals["profile"]:
|
7262
7268
|
is_exist_profile = False
|
@@ -7287,6 +7293,7 @@ def parse_global_arg(parsed_globals):
|
|
7287
7293
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
7288
7294
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
7289
7295
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
7296
|
+
cvm_role_flag = False
|
7290
7297
|
|
7291
7298
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
7292
7299
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -7294,6 +7301,11 @@ def parse_global_arg(parsed_globals):
|
|
7294
7301
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
7295
7302
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
7296
7303
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
7304
|
+
cvm_role_flag = False
|
7305
|
+
|
7306
|
+
if cvm_role_flag:
|
7307
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
7308
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
7297
7309
|
|
7298
7310
|
for param in g_param.keys():
|
7299
7311
|
if g_param[param] is None:
|
@@ -1103,7 +1103,13 @@ def action_caller():
|
|
1103
1103
|
|
1104
1104
|
def parse_global_arg(parsed_globals):
|
1105
1105
|
g_param = parsed_globals
|
1106
|
-
|
1106
|
+
cvm_role_flag = True
|
1107
|
+
for param in parsed_globals.keys():
|
1108
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1109
|
+
OptionsDefine.RoleSessionName]:
|
1110
|
+
if parsed_globals[param] is not None:
|
1111
|
+
cvm_role_flag = False
|
1112
|
+
break
|
1107
1113
|
is_exist_profile = True
|
1108
1114
|
if not parsed_globals["profile"]:
|
1109
1115
|
is_exist_profile = False
|
@@ -1134,6 +1140,7 @@ def parse_global_arg(parsed_globals):
|
|
1134
1140
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1135
1141
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1136
1142
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1143
|
+
cvm_role_flag = False
|
1137
1144
|
|
1138
1145
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1139
1146
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1141,6 +1148,11 @@ def parse_global_arg(parsed_globals):
|
|
1141
1148
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1142
1149
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1143
1150
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1151
|
+
cvm_role_flag = False
|
1152
|
+
|
1153
|
+
if cvm_role_flag:
|
1154
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1155
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1144
1156
|
|
1145
1157
|
for param in g_param.keys():
|
1146
1158
|
if g_param[param] is None:
|
tccli/services/pds/pds_client.py
CHANGED
@@ -149,7 +149,13 @@ def action_caller():
|
|
149
149
|
|
150
150
|
def parse_global_arg(parsed_globals):
|
151
151
|
g_param = parsed_globals
|
152
|
-
|
152
|
+
cvm_role_flag = True
|
153
|
+
for param in parsed_globals.keys():
|
154
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
155
|
+
OptionsDefine.RoleSessionName]:
|
156
|
+
if parsed_globals[param] is not None:
|
157
|
+
cvm_role_flag = False
|
158
|
+
break
|
153
159
|
is_exist_profile = True
|
154
160
|
if not parsed_globals["profile"]:
|
155
161
|
is_exist_profile = False
|
@@ -180,6 +186,7 @@ def parse_global_arg(parsed_globals):
|
|
180
186
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
181
187
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
182
188
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
189
|
+
cvm_role_flag = False
|
183
190
|
|
184
191
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
185
192
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -187,6 +194,11 @@ def parse_global_arg(parsed_globals):
|
|
187
194
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
188
195
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
189
196
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
197
|
+
cvm_role_flag = False
|
198
|
+
|
199
|
+
if cvm_role_flag:
|
200
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
201
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
190
202
|
|
191
203
|
for param in g_param.keys():
|
192
204
|
if g_param[param] is None:
|
@@ -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:
|
@@ -1845,7 +1845,13 @@ def action_caller():
|
|
1845
1845
|
|
1846
1846
|
def parse_global_arg(parsed_globals):
|
1847
1847
|
g_param = parsed_globals
|
1848
|
-
|
1848
|
+
cvm_role_flag = True
|
1849
|
+
for param in parsed_globals.keys():
|
1850
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1851
|
+
OptionsDefine.RoleSessionName]:
|
1852
|
+
if parsed_globals[param] is not None:
|
1853
|
+
cvm_role_flag = False
|
1854
|
+
break
|
1849
1855
|
is_exist_profile = True
|
1850
1856
|
if not parsed_globals["profile"]:
|
1851
1857
|
is_exist_profile = False
|
@@ -1876,6 +1882,7 @@ def parse_global_arg(parsed_globals):
|
|
1876
1882
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1877
1883
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1878
1884
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1885
|
+
cvm_role_flag = False
|
1879
1886
|
|
1880
1887
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1881
1888
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1883,6 +1890,11 @@ def parse_global_arg(parsed_globals):
|
|
1883
1890
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1884
1891
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1885
1892
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1893
|
+
cvm_role_flag = False
|
1894
|
+
|
1895
|
+
if cvm_role_flag:
|
1896
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1897
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1886
1898
|
|
1887
1899
|
for param in g_param.keys():
|
1888
1900
|
if g_param[param] is None:
|
tccli/services/pts/pts_client.py
CHANGED
@@ -2587,7 +2587,13 @@ def action_caller():
|
|
2587
2587
|
|
2588
2588
|
def parse_global_arg(parsed_globals):
|
2589
2589
|
g_param = parsed_globals
|
2590
|
-
|
2590
|
+
cvm_role_flag = True
|
2591
|
+
for param in parsed_globals.keys():
|
2592
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2593
|
+
OptionsDefine.RoleSessionName]:
|
2594
|
+
if parsed_globals[param] is not None:
|
2595
|
+
cvm_role_flag = False
|
2596
|
+
break
|
2591
2597
|
is_exist_profile = True
|
2592
2598
|
if not parsed_globals["profile"]:
|
2593
2599
|
is_exist_profile = False
|
@@ -2618,6 +2624,7 @@ def parse_global_arg(parsed_globals):
|
|
2618
2624
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2619
2625
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2620
2626
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2627
|
+
cvm_role_flag = False
|
2621
2628
|
|
2622
2629
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2623
2630
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2625,6 +2632,11 @@ def parse_global_arg(parsed_globals):
|
|
2625
2632
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2626
2633
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2627
2634
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2635
|
+
cvm_role_flag = False
|
2636
|
+
|
2637
|
+
if cvm_role_flag:
|
2638
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2639
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2628
2640
|
|
2629
2641
|
for param in g_param.keys():
|
2630
2642
|
if g_param[param] is None:
|
tccli/services/rce/rce_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:
|
@@ -5714,7 +5714,13 @@ def action_caller():
|
|
5714
5714
|
|
5715
5715
|
def parse_global_arg(parsed_globals):
|
5716
5716
|
g_param = parsed_globals
|
5717
|
-
|
5717
|
+
cvm_role_flag = True
|
5718
|
+
for param in parsed_globals.keys():
|
5719
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
5720
|
+
OptionsDefine.RoleSessionName]:
|
5721
|
+
if parsed_globals[param] is not None:
|
5722
|
+
cvm_role_flag = False
|
5723
|
+
break
|
5718
5724
|
is_exist_profile = True
|
5719
5725
|
if not parsed_globals["profile"]:
|
5720
5726
|
is_exist_profile = False
|
@@ -5745,6 +5751,7 @@ def parse_global_arg(parsed_globals):
|
|
5745
5751
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
5746
5752
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
5747
5753
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
5754
|
+
cvm_role_flag = False
|
5748
5755
|
|
5749
5756
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
5750
5757
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -5752,6 +5759,11 @@ def parse_global_arg(parsed_globals):
|
|
5752
5759
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
5753
5760
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
5754
5761
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
5762
|
+
cvm_role_flag = False
|
5763
|
+
|
5764
|
+
if cvm_role_flag:
|
5765
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
5766
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
5755
5767
|
|
5756
5768
|
for param in g_param.keys():
|
5757
5769
|
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:
|
tccli/services/rkp/rkp_client.py
CHANGED
@@ -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:
|
tccli/services/rp/rp_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/rum/rum_client.py
CHANGED
@@ -2905,7 +2905,13 @@ def action_caller():
|
|
2905
2905
|
|
2906
2906
|
def parse_global_arg(parsed_globals):
|
2907
2907
|
g_param = parsed_globals
|
2908
|
-
|
2908
|
+
cvm_role_flag = True
|
2909
|
+
for param in parsed_globals.keys():
|
2910
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2911
|
+
OptionsDefine.RoleSessionName]:
|
2912
|
+
if parsed_globals[param] is not None:
|
2913
|
+
cvm_role_flag = False
|
2914
|
+
break
|
2909
2915
|
is_exist_profile = True
|
2910
2916
|
if not parsed_globals["profile"]:
|
2911
2917
|
is_exist_profile = False
|
@@ -2936,6 +2942,7 @@ def parse_global_arg(parsed_globals):
|
|
2936
2942
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2937
2943
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2938
2944
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2945
|
+
cvm_role_flag = False
|
2939
2946
|
|
2940
2947
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2941
2948
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2943,6 +2950,11 @@ def parse_global_arg(parsed_globals):
|
|
2943
2950
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2944
2951
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2945
2952
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2953
|
+
cvm_role_flag = False
|
2954
|
+
|
2955
|
+
if cvm_role_flag:
|
2956
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2957
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2946
2958
|
|
2947
2959
|
for param in g_param.keys():
|
2948
2960
|
if g_param[param] is None:
|
tccli/services/scf/scf_client.py
CHANGED
@@ -2746,7 +2746,13 @@ def action_caller():
|
|
2746
2746
|
|
2747
2747
|
def parse_global_arg(parsed_globals):
|
2748
2748
|
g_param = parsed_globals
|
2749
|
-
|
2749
|
+
cvm_role_flag = True
|
2750
|
+
for param in parsed_globals.keys():
|
2751
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
2752
|
+
OptionsDefine.RoleSessionName]:
|
2753
|
+
if parsed_globals[param] is not None:
|
2754
|
+
cvm_role_flag = False
|
2755
|
+
break
|
2750
2756
|
is_exist_profile = True
|
2751
2757
|
if not parsed_globals["profile"]:
|
2752
2758
|
is_exist_profile = False
|
@@ -2777,6 +2783,7 @@ def parse_global_arg(parsed_globals):
|
|
2777
2783
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
2778
2784
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
2779
2785
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
2786
|
+
cvm_role_flag = False
|
2780
2787
|
|
2781
2788
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
2782
2789
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -2784,6 +2791,11 @@ def parse_global_arg(parsed_globals):
|
|
2784
2791
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
2785
2792
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
2786
2793
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
2794
|
+
cvm_role_flag = False
|
2795
|
+
|
2796
|
+
if cvm_role_flag:
|
2797
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
2798
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
2787
2799
|
|
2788
2800
|
for param in g_param.keys():
|
2789
2801
|
if g_param[param] is None:
|
tccli/services/ses/ses_client.py
CHANGED
@@ -1686,7 +1686,13 @@ def action_caller():
|
|
1686
1686
|
|
1687
1687
|
def parse_global_arg(parsed_globals):
|
1688
1688
|
g_param = parsed_globals
|
1689
|
-
|
1689
|
+
cvm_role_flag = True
|
1690
|
+
for param in parsed_globals.keys():
|
1691
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1692
|
+
OptionsDefine.RoleSessionName]:
|
1693
|
+
if parsed_globals[param] is not None:
|
1694
|
+
cvm_role_flag = False
|
1695
|
+
break
|
1690
1696
|
is_exist_profile = True
|
1691
1697
|
if not parsed_globals["profile"]:
|
1692
1698
|
is_exist_profile = False
|
@@ -1717,6 +1723,7 @@ def parse_global_arg(parsed_globals):
|
|
1717
1723
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1718
1724
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1719
1725
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1726
|
+
cvm_role_flag = False
|
1720
1727
|
|
1721
1728
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1722
1729
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1724,6 +1731,11 @@ def parse_global_arg(parsed_globals):
|
|
1724
1731
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1725
1732
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1726
1733
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1734
|
+
cvm_role_flag = False
|
1735
|
+
|
1736
|
+
if cvm_role_flag:
|
1737
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1738
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1727
1739
|
|
1728
1740
|
for param in g_param.keys():
|
1729
1741
|
if g_param[param] is None:
|
tccli/services/smh/smh_client.py
CHANGED
@@ -838,7 +838,13 @@ def action_caller():
|
|
838
838
|
|
839
839
|
def parse_global_arg(parsed_globals):
|
840
840
|
g_param = parsed_globals
|
841
|
-
|
841
|
+
cvm_role_flag = True
|
842
|
+
for param in parsed_globals.keys():
|
843
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
844
|
+
OptionsDefine.RoleSessionName]:
|
845
|
+
if parsed_globals[param] is not None:
|
846
|
+
cvm_role_flag = False
|
847
|
+
break
|
842
848
|
is_exist_profile = True
|
843
849
|
if not parsed_globals["profile"]:
|
844
850
|
is_exist_profile = False
|
@@ -869,6 +875,7 @@ def parse_global_arg(parsed_globals):
|
|
869
875
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
870
876
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
871
877
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
878
|
+
cvm_role_flag = False
|
872
879
|
|
873
880
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
874
881
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -876,6 +883,11 @@ def parse_global_arg(parsed_globals):
|
|
876
883
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
877
884
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
878
885
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
886
|
+
cvm_role_flag = False
|
887
|
+
|
888
|
+
if cvm_role_flag:
|
889
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
890
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
879
891
|
|
880
892
|
for param in g_param.keys():
|
881
893
|
if g_param[param] is None:
|