tccli 3.0.1341.1__py2.py3-none-any.whl → 3.0.1342.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/plugins/sso/__init__.py +14 -0
- tccli/plugins/sso/login.py +23 -6
- tccli/plugins/sso/texts.py +4 -0
- tccli/services/__init__.py +3 -0
- tccli/services/ams/v20201229/api.json +195 -185
- tccli/services/apm/v20210622/api.json +10 -0
- tccli/services/cdb/v20170320/api.json +15 -15
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/ctem/__init__.py +4 -0
- tccli/services/ctem/ctem_client.py +1479 -0
- tccli/services/ctem/v20231128/api.json +6138 -0
- tccli/services/ctem/v20231128/examples.json +205 -0
- tccli/services/dlc/v20210125/api.json +15 -6
- tccli/services/hunyuan/v20230901/api.json +10 -1
- tccli/services/ims/v20201229/api.json +30 -30
- tccli/services/iotexplorer/v20190423/api.json +2 -2
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/iotvideo/v20201215/api.json +2 -2
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +1 -1
- tccli/services/lke/v20231130/api.json +22 -1
- tccli/services/mongodb/v20190725/api.json +10 -0
- tccli/services/mps/v20190612/api.json +113 -25
- tccli/services/mqtt/mqtt_client.py +53 -0
- tccli/services/mqtt/v20240516/api.json +150 -0
- tccli/services/mqtt/v20240516/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +3 -3
- tccli/services/redis/v20180412/examples.json +19 -1
- tccli/services/tke/v20180525/api.json +10 -0
- tccli/services/trocket/v20230308/api.json +71 -71
- tccli/services/trocket/v20230308/examples.json +4 -4
- tccli/services/vm/v20210922/api.json +363 -333
- tccli/services/wedata/v20210820/api.json +128 -0
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1342.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1342.1.dist-info}/RECORD +42 -38
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1342.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1342.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1342.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1342.1'
|
tccli/plugins/sso/__init__.py
CHANGED
@@ -45,6 +45,20 @@ _spec = {
|
|
45
45
|
"required": False,
|
46
46
|
"document": "duration for credential",
|
47
47
|
},
|
48
|
+
{
|
49
|
+
"name": "uin",
|
50
|
+
"member": "string",
|
51
|
+
"type": "string",
|
52
|
+
"required": False,
|
53
|
+
"document": "Account uin to use",
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"name": "rolename",
|
57
|
+
"member": "string",
|
58
|
+
"type": "string",
|
59
|
+
"required": False,
|
60
|
+
"document": "Role to use",
|
61
|
+
},
|
48
62
|
],
|
49
63
|
},
|
50
64
|
"loginResponse": {"members": []},
|
tccli/plugins/sso/login.py
CHANGED
@@ -65,9 +65,17 @@ def login(args, profile, language):
|
|
65
65
|
print_message(_("no_account"))
|
66
66
|
return
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
specified_uin = args.get("uin", "")
|
69
|
+
if specified_uin:
|
70
|
+
account = next((x for x in accounts if str(x["Uin"]) == specified_uin), None)
|
71
|
+
if not account:
|
72
|
+
print_message(_("specified_uin_not_found") % (specified_uin, ",".join(str(x["Uin"]) for x in accounts)))
|
73
|
+
return
|
74
|
+
else:
|
75
|
+
idx = terminal.select_from_items(
|
76
|
+
_("account_select_prompt"), ["%s:%s" % (x["Name"], x["Uin"]) for x in accounts], 10)
|
77
|
+
account = accounts[idx]
|
78
|
+
|
71
79
|
print_message("uin: %s" % account["Uin"])
|
72
80
|
print_message("username: %s" % account["Name"])
|
73
81
|
|
@@ -76,9 +84,18 @@ def login(args, profile, language):
|
|
76
84
|
print_message(_("no_role"))
|
77
85
|
return
|
78
86
|
|
79
|
-
|
80
|
-
|
81
|
-
|
87
|
+
specified_role = args.get("rolename", "")
|
88
|
+
if specified_role:
|
89
|
+
role = next((x for x in roles if x["RoleConfigurationName"] == specified_role), None)
|
90
|
+
if not role:
|
91
|
+
print_message(
|
92
|
+
_("specified_role_not_found") % (specified_role, ",".join(x["RoleConfigurationName"] for x in roles)))
|
93
|
+
return
|
94
|
+
else:
|
95
|
+
idx = terminal.select_from_items(
|
96
|
+
_("role_select_prompt"), [x["RoleConfigurationName"] for x in roles], 10)
|
97
|
+
role = roles[idx]
|
98
|
+
|
82
99
|
print_message("role: %s" % role["RoleConfigurationName"])
|
83
100
|
|
84
101
|
saml_resp = sso.gen_saml_response(
|
tccli/plugins/sso/texts.py
CHANGED
@@ -15,6 +15,8 @@ texts = {
|
|
15
15
|
"logout_success": "登出成功, 密钥凭证已被删除: %s",
|
16
16
|
"no_account": "未找到成员账号, 请确认是否同步过 CAM 角色",
|
17
17
|
"no_role": "当前成员账号不存在授权角色",
|
18
|
+
"specified_uin_not_found": "未找到指定的 uin,uin=%s,all=[%s]",
|
19
|
+
"specified_role_not_found": "未找到指定的 role, role=%s, all=[%s]",
|
18
20
|
},
|
19
21
|
"en-US": {
|
20
22
|
"invalid_auth_url": "The entered url is invalid: %s",
|
@@ -27,6 +29,8 @@ texts = {
|
|
27
29
|
"logout_success": "Logout succeed, credential has been removed: %s",
|
28
30
|
"no_account": "no account found, please confirm the account is synchronized",
|
29
31
|
"no_role": "no role found in current account",
|
32
|
+
"specified_uin_not_found": "Specified uin not found, uin=%s, all=[%s]",
|
33
|
+
"specified_role_not_found": "Specified role not found, role=%s, all=[%s]",
|
30
34
|
}
|
31
35
|
}
|
32
36
|
|