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
@@ -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:
|
@@ -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:
|
tccli/services/sms/sms_client.py
CHANGED
@@ -1002,7 +1002,13 @@ def action_caller():
|
|
1002
1002
|
|
1003
1003
|
def parse_global_arg(parsed_globals):
|
1004
1004
|
g_param = parsed_globals
|
1005
|
-
|
1005
|
+
cvm_role_flag = True
|
1006
|
+
for param in parsed_globals.keys():
|
1007
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1008
|
+
OptionsDefine.RoleSessionName]:
|
1009
|
+
if parsed_globals[param] is not None:
|
1010
|
+
cvm_role_flag = False
|
1011
|
+
break
|
1006
1012
|
is_exist_profile = True
|
1007
1013
|
if not parsed_globals["profile"]:
|
1008
1014
|
is_exist_profile = False
|
@@ -1033,6 +1039,7 @@ def parse_global_arg(parsed_globals):
|
|
1033
1039
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1034
1040
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1035
1041
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1042
|
+
cvm_role_flag = False
|
1036
1043
|
|
1037
1044
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1038
1045
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1040,6 +1047,11 @@ def parse_global_arg(parsed_globals):
|
|
1040
1047
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1041
1048
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1042
1049
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1050
|
+
cvm_role_flag = False
|
1051
|
+
|
1052
|
+
if cvm_role_flag:
|
1053
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1054
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1043
1055
|
|
1044
1056
|
for param in g_param.keys():
|
1045
1057
|
if g_param[param] is None:
|
tccli/services/soe/soe_client.py
CHANGED
@@ -255,7 +255,13 @@ def action_caller():
|
|
255
255
|
|
256
256
|
def parse_global_arg(parsed_globals):
|
257
257
|
g_param = parsed_globals
|
258
|
-
|
258
|
+
cvm_role_flag = True
|
259
|
+
for param in parsed_globals.keys():
|
260
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
261
|
+
OptionsDefine.RoleSessionName]:
|
262
|
+
if parsed_globals[param] is not None:
|
263
|
+
cvm_role_flag = False
|
264
|
+
break
|
259
265
|
is_exist_profile = True
|
260
266
|
if not parsed_globals["profile"]:
|
261
267
|
is_exist_profile = False
|
@@ -286,6 +292,7 @@ def parse_global_arg(parsed_globals):
|
|
286
292
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
287
293
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
288
294
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
295
|
+
cvm_role_flag = False
|
289
296
|
|
290
297
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
291
298
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -293,6 +300,11 @@ def parse_global_arg(parsed_globals):
|
|
293
300
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
294
301
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
295
302
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
303
|
+
cvm_role_flag = False
|
304
|
+
|
305
|
+
if cvm_role_flag:
|
306
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
307
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
296
308
|
|
297
309
|
for param in g_param.keys():
|
298
310
|
if g_param[param] is None:
|
@@ -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:
|
@@ -7887,7 +7887,13 @@ def action_caller():
|
|
7887
7887
|
|
7888
7888
|
def parse_global_arg(parsed_globals):
|
7889
7889
|
g_param = parsed_globals
|
7890
|
-
|
7890
|
+
cvm_role_flag = True
|
7891
|
+
for param in parsed_globals.keys():
|
7892
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
7893
|
+
OptionsDefine.RoleSessionName]:
|
7894
|
+
if parsed_globals[param] is not None:
|
7895
|
+
cvm_role_flag = False
|
7896
|
+
break
|
7891
7897
|
is_exist_profile = True
|
7892
7898
|
if not parsed_globals["profile"]:
|
7893
7899
|
is_exist_profile = False
|
@@ -7918,6 +7924,7 @@ def parse_global_arg(parsed_globals):
|
|
7918
7924
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
7919
7925
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
7920
7926
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
7927
|
+
cvm_role_flag = False
|
7921
7928
|
|
7922
7929
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
7923
7930
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -7925,6 +7932,11 @@ def parse_global_arg(parsed_globals):
|
|
7925
7932
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
7926
7933
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
7927
7934
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
7935
|
+
cvm_role_flag = False
|
7936
|
+
|
7937
|
+
if cvm_role_flag:
|
7938
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
7939
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
7928
7940
|
|
7929
7941
|
for param in g_param.keys():
|
7930
7942
|
if g_param[param] is None:
|
tccli/services/ssa/ssa_client.py
CHANGED
@@ -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/ssl/ssl_client.py
CHANGED
@@ -3223,7 +3223,13 @@ def action_caller():
|
|
3223
3223
|
|
3224
3224
|
def parse_global_arg(parsed_globals):
|
3225
3225
|
g_param = parsed_globals
|
3226
|
-
|
3226
|
+
cvm_role_flag = True
|
3227
|
+
for param in parsed_globals.keys():
|
3228
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
3229
|
+
OptionsDefine.RoleSessionName]:
|
3230
|
+
if parsed_globals[param] is not None:
|
3231
|
+
cvm_role_flag = False
|
3232
|
+
break
|
3227
3233
|
is_exist_profile = True
|
3228
3234
|
if not parsed_globals["profile"]:
|
3229
3235
|
is_exist_profile = False
|
@@ -3254,6 +3260,7 @@ def parse_global_arg(parsed_globals):
|
|
3254
3260
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
3255
3261
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
3256
3262
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
3263
|
+
cvm_role_flag = False
|
3257
3264
|
|
3258
3265
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
3259
3266
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -3261,6 +3268,11 @@ def parse_global_arg(parsed_globals):
|
|
3261
3268
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
3262
3269
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
3263
3270
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
3271
|
+
cvm_role_flag = False
|
3272
|
+
|
3273
|
+
if cvm_role_flag:
|
3274
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
3275
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
3264
3276
|
|
3265
3277
|
for param in g_param.keys():
|
3266
3278
|
if g_param[param] is None:
|
@@ -573,7 +573,13 @@ def action_caller():
|
|
573
573
|
|
574
574
|
def parse_global_arg(parsed_globals):
|
575
575
|
g_param = parsed_globals
|
576
|
-
|
576
|
+
cvm_role_flag = True
|
577
|
+
for param in parsed_globals.keys():
|
578
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
579
|
+
OptionsDefine.RoleSessionName]:
|
580
|
+
if parsed_globals[param] is not None:
|
581
|
+
cvm_role_flag = False
|
582
|
+
break
|
577
583
|
is_exist_profile = True
|
578
584
|
if not parsed_globals["profile"]:
|
579
585
|
is_exist_profile = False
|
@@ -604,6 +610,7 @@ def parse_global_arg(parsed_globals):
|
|
604
610
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
605
611
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
606
612
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
613
|
+
cvm_role_flag = False
|
607
614
|
|
608
615
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
609
616
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -611,6 +618,11 @@ def parse_global_arg(parsed_globals):
|
|
611
618
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
612
619
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
613
620
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
621
|
+
cvm_role_flag = False
|
622
|
+
|
623
|
+
if cvm_role_flag:
|
624
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
625
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
614
626
|
|
615
627
|
for param in g_param.keys():
|
616
628
|
if g_param[param] is None:
|
tccli/services/ssm/ssm_client.py
CHANGED
@@ -1315,7 +1315,13 @@ def action_caller():
|
|
1315
1315
|
|
1316
1316
|
def parse_global_arg(parsed_globals):
|
1317
1317
|
g_param = parsed_globals
|
1318
|
-
|
1318
|
+
cvm_role_flag = True
|
1319
|
+
for param in parsed_globals.keys():
|
1320
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1321
|
+
OptionsDefine.RoleSessionName]:
|
1322
|
+
if parsed_globals[param] is not None:
|
1323
|
+
cvm_role_flag = False
|
1324
|
+
break
|
1319
1325
|
is_exist_profile = True
|
1320
1326
|
if not parsed_globals["profile"]:
|
1321
1327
|
is_exist_profile = False
|
@@ -1346,6 +1352,7 @@ def parse_global_arg(parsed_globals):
|
|
1346
1352
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1347
1353
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1348
1354
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1355
|
+
cvm_role_flag = False
|
1349
1356
|
|
1350
1357
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1351
1358
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1353,6 +1360,11 @@ def parse_global_arg(parsed_globals):
|
|
1353
1360
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1354
1361
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1355
1362
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1363
|
+
cvm_role_flag = False
|
1364
|
+
|
1365
|
+
if cvm_role_flag:
|
1366
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1367
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1356
1368
|
|
1357
1369
|
for param in g_param.keys():
|
1358
1370
|
if g_param[param] is None:
|
tccli/services/sts/sts_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:
|
tccli/services/svp/svp_client.py
CHANGED
@@ -255,7 +255,13 @@ def action_caller():
|
|
255
255
|
|
256
256
|
def parse_global_arg(parsed_globals):
|
257
257
|
g_param = parsed_globals
|
258
|
-
|
258
|
+
cvm_role_flag = True
|
259
|
+
for param in parsed_globals.keys():
|
260
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
261
|
+
OptionsDefine.RoleSessionName]:
|
262
|
+
if parsed_globals[param] is not None:
|
263
|
+
cvm_role_flag = False
|
264
|
+
break
|
259
265
|
is_exist_profile = True
|
260
266
|
if not parsed_globals["profile"]:
|
261
267
|
is_exist_profile = False
|
@@ -286,6 +292,7 @@ def parse_global_arg(parsed_globals):
|
|
286
292
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
287
293
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
288
294
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
295
|
+
cvm_role_flag = False
|
289
296
|
|
290
297
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
291
298
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -293,6 +300,11 @@ def parse_global_arg(parsed_globals):
|
|
293
300
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
294
301
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
295
302
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
303
|
+
cvm_role_flag = False
|
304
|
+
|
305
|
+
if cvm_role_flag:
|
306
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
307
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
296
308
|
|
297
309
|
for param in g_param.keys():
|
298
310
|
if g_param[param] is None:
|
tccli/services/taf/taf_client.py
CHANGED
@@ -255,7 +255,13 @@ def action_caller():
|
|
255
255
|
|
256
256
|
def parse_global_arg(parsed_globals):
|
257
257
|
g_param = parsed_globals
|
258
|
-
|
258
|
+
cvm_role_flag = True
|
259
|
+
for param in parsed_globals.keys():
|
260
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
261
|
+
OptionsDefine.RoleSessionName]:
|
262
|
+
if parsed_globals[param] is not None:
|
263
|
+
cvm_role_flag = False
|
264
|
+
break
|
259
265
|
is_exist_profile = True
|
260
266
|
if not parsed_globals["profile"]:
|
261
267
|
is_exist_profile = False
|
@@ -286,6 +292,7 @@ def parse_global_arg(parsed_globals):
|
|
286
292
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
287
293
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
288
294
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
295
|
+
cvm_role_flag = False
|
289
296
|
|
290
297
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
291
298
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -293,6 +300,11 @@ def parse_global_arg(parsed_globals):
|
|
293
300
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
294
301
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
295
302
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
303
|
+
cvm_role_flag = False
|
304
|
+
|
305
|
+
if cvm_role_flag:
|
306
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
307
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
296
308
|
|
297
309
|
for param in g_param.keys():
|
298
310
|
if g_param[param] is None:
|
tccli/services/tag/tag_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/tan/tan_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/tat/tat_client.py
CHANGED
@@ -1580,7 +1580,13 @@ def action_caller():
|
|
1580
1580
|
|
1581
1581
|
def parse_global_arg(parsed_globals):
|
1582
1582
|
g_param = parsed_globals
|
1583
|
-
|
1583
|
+
cvm_role_flag = True
|
1584
|
+
for param in parsed_globals.keys():
|
1585
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1586
|
+
OptionsDefine.RoleSessionName]:
|
1587
|
+
if parsed_globals[param] is not None:
|
1588
|
+
cvm_role_flag = False
|
1589
|
+
break
|
1584
1590
|
is_exist_profile = True
|
1585
1591
|
if not parsed_globals["profile"]:
|
1586
1592
|
is_exist_profile = False
|
@@ -1611,6 +1617,7 @@ def parse_global_arg(parsed_globals):
|
|
1611
1617
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1612
1618
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1613
1619
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1620
|
+
cvm_role_flag = False
|
1614
1621
|
|
1615
1622
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1616
1623
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1618,6 +1625,11 @@ def parse_global_arg(parsed_globals):
|
|
1618
1625
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1619
1626
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1620
1627
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1628
|
+
cvm_role_flag = False
|
1629
|
+
|
1630
|
+
if cvm_role_flag:
|
1631
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1632
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1621
1633
|
|
1622
1634
|
for param in g_param.keys():
|
1623
1635
|
if g_param[param] is None:
|
tccli/services/tav/tav_client.py
CHANGED
@@ -255,7 +255,13 @@ def action_caller():
|
|
255
255
|
|
256
256
|
def parse_global_arg(parsed_globals):
|
257
257
|
g_param = parsed_globals
|
258
|
-
|
258
|
+
cvm_role_flag = True
|
259
|
+
for param in parsed_globals.keys():
|
260
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
261
|
+
OptionsDefine.RoleSessionName]:
|
262
|
+
if parsed_globals[param] is not None:
|
263
|
+
cvm_role_flag = False
|
264
|
+
break
|
259
265
|
is_exist_profile = True
|
260
266
|
if not parsed_globals["profile"]:
|
261
267
|
is_exist_profile = False
|
@@ -286,6 +292,7 @@ def parse_global_arg(parsed_globals):
|
|
286
292
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
287
293
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
288
294
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
295
|
+
cvm_role_flag = False
|
289
296
|
|
290
297
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
291
298
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -293,6 +300,11 @@ def parse_global_arg(parsed_globals):
|
|
293
300
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
294
301
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
295
302
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
303
|
+
cvm_role_flag = False
|
304
|
+
|
305
|
+
if cvm_role_flag:
|
306
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
307
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
296
308
|
|
297
309
|
for param in g_param.keys():
|
298
310
|
if g_param[param] is None:
|
@@ -1368,7 +1368,13 @@ def action_caller():
|
|
1368
1368
|
|
1369
1369
|
def parse_global_arg(parsed_globals):
|
1370
1370
|
g_param = parsed_globals
|
1371
|
-
|
1371
|
+
cvm_role_flag = True
|
1372
|
+
for param in parsed_globals.keys():
|
1373
|
+
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
1374
|
+
OptionsDefine.RoleSessionName]:
|
1375
|
+
if parsed_globals[param] is not None:
|
1376
|
+
cvm_role_flag = False
|
1377
|
+
break
|
1372
1378
|
is_exist_profile = True
|
1373
1379
|
if not parsed_globals["profile"]:
|
1374
1380
|
is_exist_profile = False
|
@@ -1399,6 +1405,7 @@ def parse_global_arg(parsed_globals):
|
|
1399
1405
|
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
1400
1406
|
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
1401
1407
|
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
1408
|
+
cvm_role_flag = False
|
1402
1409
|
|
1403
1410
|
if os.environ.get(OptionsDefine.ENV_REGION):
|
1404
1411
|
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
@@ -1406,6 +1413,11 @@ def parse_global_arg(parsed_globals):
|
|
1406
1413
|
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
1407
1414
|
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
1408
1415
|
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
1416
|
+
cvm_role_flag = False
|
1417
|
+
|
1418
|
+
if cvm_role_flag:
|
1419
|
+
if "type" in cred and cred["type"] == "cvm-role":
|
1420
|
+
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
1409
1421
|
|
1410
1422
|
for param in g_param.keys():
|
1411
1423
|
if g_param[param] is None:
|