huaweicloudsdkaom 3.1.118__py2.py3-none-any.whl → 3.1.119__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.
Potentially problematic release.
This version of huaweicloudsdkaom might be problematic. Click here for more details.
- huaweicloudsdkaom/v4/__init__.py +21 -0
- huaweicloudsdkaom/v4/aom_async_client.py +279 -0
- huaweicloudsdkaom/v4/aom_client.py +276 -0
- huaweicloudsdkaom/v4/model/__init__.py +18 -0
- huaweicloudsdkaom/v4/model/agent_batch_import_param_new.py +280 -0
- huaweicloudsdkaom/v4/model/agent_import_param_new.py +313 -0
- huaweicloudsdkaom/v4/model/agent_info_param.py +231 -0
- huaweicloudsdkaom/v4/model/agent_info_result.py +463 -0
- huaweicloudsdkaom/v4/model/agent_upgrade_param.py +142 -0
- huaweicloudsdkaom/v4/model/batch_import_agent_request.py +139 -0
- huaweicloudsdkaom/v4/model/batch_import_agent_response.py +116 -0
- huaweicloudsdkaom/v4/model/batch_update_agent_request.py +111 -0
- huaweicloudsdkaom/v4/model/batch_update_agent_response.py +116 -0
- huaweicloudsdkaom/v4/model/plugin_install_basic_param.py +173 -0
- huaweicloudsdkaom/v4/model/show_agent_infos_request.py +111 -0
- huaweicloudsdkaom/v4/model/show_agent_infos_response.py +203 -0
- huaweicloudsdkaom/v4/model/single_agent_param.py +142 -0
- huaweicloudsdkaom/v4/region/__init__.py +0 -0
- huaweicloudsdkaom/v4/region/aom_region.py +100 -0
- {huaweicloudsdkaom-3.1.118.dist-info → huaweicloudsdkaom-3.1.119.dist-info}/METADATA +2 -2
- {huaweicloudsdkaom-3.1.118.dist-info → huaweicloudsdkaom-3.1.119.dist-info}/RECORD +24 -5
- {huaweicloudsdkaom-3.1.118.dist-info → huaweicloudsdkaom-3.1.119.dist-info}/LICENSE +0 -0
- {huaweicloudsdkaom-3.1.118.dist-info → huaweicloudsdkaom-3.1.119.dist-info}/WHEEL +0 -0
- {huaweicloudsdkaom-3.1.118.dist-info → huaweicloudsdkaom-3.1.119.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkaom.v4.aom_client import AomClient
|
|
6
|
+
from huaweicloudsdkaom.v4.aom_async_client import AomAsyncClient
|
|
7
|
+
|
|
8
|
+
from huaweicloudsdkaom.v4.model.agent_batch_import_param_new import AgentBatchImportParamNew
|
|
9
|
+
from huaweicloudsdkaom.v4.model.agent_import_param_new import AgentImportParamNew
|
|
10
|
+
from huaweicloudsdkaom.v4.model.agent_info_param import AgentInfoParam
|
|
11
|
+
from huaweicloudsdkaom.v4.model.agent_info_result import AgentInfoResult
|
|
12
|
+
from huaweicloudsdkaom.v4.model.agent_upgrade_param import AgentUpgradeParam
|
|
13
|
+
from huaweicloudsdkaom.v4.model.batch_import_agent_request import BatchImportAgentRequest
|
|
14
|
+
from huaweicloudsdkaom.v4.model.batch_import_agent_response import BatchImportAgentResponse
|
|
15
|
+
from huaweicloudsdkaom.v4.model.batch_update_agent_request import BatchUpdateAgentRequest
|
|
16
|
+
from huaweicloudsdkaom.v4.model.batch_update_agent_response import BatchUpdateAgentResponse
|
|
17
|
+
from huaweicloudsdkaom.v4.model.plugin_install_basic_param import PluginInstallBasicParam
|
|
18
|
+
from huaweicloudsdkaom.v4.model.show_agent_infos_request import ShowAgentInfosRequest
|
|
19
|
+
from huaweicloudsdkaom.v4.model.show_agent_infos_response import ShowAgentInfosResponse
|
|
20
|
+
from huaweicloudsdkaom.v4.model.single_agent_param import SingleAgentParam
|
|
21
|
+
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
import importlib
|
|
6
|
+
import warnings
|
|
7
|
+
|
|
8
|
+
from huaweicloudsdkcore.client import Client, ClientBuilder
|
|
9
|
+
from huaweicloudsdkcore.utils import http_utils
|
|
10
|
+
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
|
11
|
+
try:
|
|
12
|
+
from huaweicloudsdkcore.invoker.invoker import AsyncInvoker
|
|
13
|
+
except ImportError as e:
|
|
14
|
+
warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkaom'")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AomAsyncClient(Client):
|
|
18
|
+
def __init__(self):
|
|
19
|
+
super(AomAsyncClient, self).__init__()
|
|
20
|
+
self.model_package = importlib.import_module("huaweicloudsdkaom.v4.model")
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def new_builder(cls, clazz=None):
|
|
24
|
+
if not clazz:
|
|
25
|
+
client_builder = ClientBuilder(cls)
|
|
26
|
+
else:
|
|
27
|
+
if clazz.__name__ != "AomAsyncClient":
|
|
28
|
+
raise TypeError("client type error, support client type is AomAsyncClient")
|
|
29
|
+
client_builder = ClientBuilder(clazz)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
return client_builder
|
|
34
|
+
|
|
35
|
+
def batch_import_agent_async(self, request):
|
|
36
|
+
"""下发批量安装UniAgent任务
|
|
37
|
+
|
|
38
|
+
该接口用于下发批量安装UniAgent任务。
|
|
39
|
+
|
|
40
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
:param request: Request instance for BatchImportAgent
|
|
44
|
+
:type request: :class:`huaweicloudsdkaom.v4.BatchImportAgentRequest`
|
|
45
|
+
:rtype: :class:`huaweicloudsdkaom.v4.BatchImportAgentResponse`
|
|
46
|
+
"""
|
|
47
|
+
http_info = self._batch_import_agent_http_info(request)
|
|
48
|
+
return self._call_api(**http_info)
|
|
49
|
+
|
|
50
|
+
def batch_import_agent_async_invoker(self, request):
|
|
51
|
+
http_info = self._batch_import_agent_http_info(request)
|
|
52
|
+
return AsyncInvoker(self, http_info)
|
|
53
|
+
|
|
54
|
+
def _batch_import_agent_http_info(self, request):
|
|
55
|
+
http_info = {
|
|
56
|
+
"method": "POST",
|
|
57
|
+
"resource_path": "/v1/{project_id}/uniagent-console/mainview/batch-import",
|
|
58
|
+
"request_type": request.__class__.__name__,
|
|
59
|
+
"response_type": "BatchImportAgentResponse"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
63
|
+
|
|
64
|
+
cname = None
|
|
65
|
+
|
|
66
|
+
collection_formats = {}
|
|
67
|
+
|
|
68
|
+
path_params = {}
|
|
69
|
+
|
|
70
|
+
query_params = []
|
|
71
|
+
|
|
72
|
+
header_params = {}
|
|
73
|
+
if 'region' in local_var_params:
|
|
74
|
+
header_params['region'] = local_var_params['region']
|
|
75
|
+
|
|
76
|
+
form_params = {}
|
|
77
|
+
|
|
78
|
+
body = None
|
|
79
|
+
if 'body' in local_var_params:
|
|
80
|
+
body = local_var_params['body']
|
|
81
|
+
if isinstance(request, SdkStreamRequest):
|
|
82
|
+
body = request.get_file_stream()
|
|
83
|
+
|
|
84
|
+
response_headers = []
|
|
85
|
+
|
|
86
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
87
|
+
['application/json'])
|
|
88
|
+
|
|
89
|
+
auth_settings = []
|
|
90
|
+
|
|
91
|
+
http_info["cname"] = cname
|
|
92
|
+
http_info["collection_formats"] = collection_formats
|
|
93
|
+
http_info["path_params"] = path_params
|
|
94
|
+
http_info["query_params"] = query_params
|
|
95
|
+
http_info["header_params"] = header_params
|
|
96
|
+
http_info["post_params"] = form_params
|
|
97
|
+
http_info["body"] = body
|
|
98
|
+
http_info["response_headers"] = response_headers
|
|
99
|
+
|
|
100
|
+
return http_info
|
|
101
|
+
|
|
102
|
+
def batch_update_agent_async(self, request):
|
|
103
|
+
"""下发批量升级UniAgent任务
|
|
104
|
+
|
|
105
|
+
该接口用于下发批量升级UniAgent任务。
|
|
106
|
+
|
|
107
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
:param request: Request instance for BatchUpdateAgent
|
|
111
|
+
:type request: :class:`huaweicloudsdkaom.v4.BatchUpdateAgentRequest`
|
|
112
|
+
:rtype: :class:`huaweicloudsdkaom.v4.BatchUpdateAgentResponse`
|
|
113
|
+
"""
|
|
114
|
+
http_info = self._batch_update_agent_http_info(request)
|
|
115
|
+
return self._call_api(**http_info)
|
|
116
|
+
|
|
117
|
+
def batch_update_agent_async_invoker(self, request):
|
|
118
|
+
http_info = self._batch_update_agent_http_info(request)
|
|
119
|
+
return AsyncInvoker(self, http_info)
|
|
120
|
+
|
|
121
|
+
def _batch_update_agent_http_info(self, request):
|
|
122
|
+
http_info = {
|
|
123
|
+
"method": "POST",
|
|
124
|
+
"resource_path": "/v1/{project_id}/uniagent-console/upgrade/batch-upgrade",
|
|
125
|
+
"request_type": request.__class__.__name__,
|
|
126
|
+
"response_type": "BatchUpdateAgentResponse"
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
130
|
+
|
|
131
|
+
cname = None
|
|
132
|
+
|
|
133
|
+
collection_formats = {}
|
|
134
|
+
|
|
135
|
+
path_params = {}
|
|
136
|
+
|
|
137
|
+
query_params = []
|
|
138
|
+
|
|
139
|
+
header_params = {}
|
|
140
|
+
|
|
141
|
+
form_params = {}
|
|
142
|
+
|
|
143
|
+
body = None
|
|
144
|
+
if 'body' in local_var_params:
|
|
145
|
+
body = local_var_params['body']
|
|
146
|
+
if isinstance(request, SdkStreamRequest):
|
|
147
|
+
body = request.get_file_stream()
|
|
148
|
+
|
|
149
|
+
response_headers = []
|
|
150
|
+
|
|
151
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
152
|
+
['application/json'])
|
|
153
|
+
|
|
154
|
+
auth_settings = []
|
|
155
|
+
|
|
156
|
+
http_info["cname"] = cname
|
|
157
|
+
http_info["collection_formats"] = collection_formats
|
|
158
|
+
http_info["path_params"] = path_params
|
|
159
|
+
http_info["query_params"] = query_params
|
|
160
|
+
http_info["header_params"] = header_params
|
|
161
|
+
http_info["post_params"] = form_params
|
|
162
|
+
http_info["body"] = body
|
|
163
|
+
http_info["response_headers"] = response_headers
|
|
164
|
+
|
|
165
|
+
return http_info
|
|
166
|
+
|
|
167
|
+
def show_agent_infos_async(self, request):
|
|
168
|
+
"""查询UniAgent主机列表信息
|
|
169
|
+
|
|
170
|
+
该接口用于查询执行过安装UniAgent任务的主机列表信息。
|
|
171
|
+
|
|
172
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
:param request: Request instance for ShowAgentInfos
|
|
176
|
+
:type request: :class:`huaweicloudsdkaom.v4.ShowAgentInfosRequest`
|
|
177
|
+
:rtype: :class:`huaweicloudsdkaom.v4.ShowAgentInfosResponse`
|
|
178
|
+
"""
|
|
179
|
+
http_info = self._show_agent_infos_http_info(request)
|
|
180
|
+
return self._call_api(**http_info)
|
|
181
|
+
|
|
182
|
+
def show_agent_infos_async_invoker(self, request):
|
|
183
|
+
http_info = self._show_agent_infos_http_info(request)
|
|
184
|
+
return AsyncInvoker(self, http_info)
|
|
185
|
+
|
|
186
|
+
def _show_agent_infos_http_info(self, request):
|
|
187
|
+
http_info = {
|
|
188
|
+
"method": "POST",
|
|
189
|
+
"resource_path": "/v1/uniagent-console/agent-list/all",
|
|
190
|
+
"request_type": request.__class__.__name__,
|
|
191
|
+
"response_type": "ShowAgentInfosResponse"
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
195
|
+
|
|
196
|
+
cname = None
|
|
197
|
+
|
|
198
|
+
collection_formats = {}
|
|
199
|
+
|
|
200
|
+
path_params = {}
|
|
201
|
+
|
|
202
|
+
query_params = []
|
|
203
|
+
|
|
204
|
+
header_params = {}
|
|
205
|
+
|
|
206
|
+
form_params = {}
|
|
207
|
+
|
|
208
|
+
body = None
|
|
209
|
+
if 'body' in local_var_params:
|
|
210
|
+
body = local_var_params['body']
|
|
211
|
+
if isinstance(request, SdkStreamRequest):
|
|
212
|
+
body = request.get_file_stream()
|
|
213
|
+
|
|
214
|
+
response_headers = []
|
|
215
|
+
|
|
216
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
217
|
+
['application/json'])
|
|
218
|
+
|
|
219
|
+
auth_settings = []
|
|
220
|
+
|
|
221
|
+
http_info["cname"] = cname
|
|
222
|
+
http_info["collection_formats"] = collection_formats
|
|
223
|
+
http_info["path_params"] = path_params
|
|
224
|
+
http_info["query_params"] = query_params
|
|
225
|
+
http_info["header_params"] = header_params
|
|
226
|
+
http_info["post_params"] = form_params
|
|
227
|
+
http_info["body"] = body
|
|
228
|
+
http_info["response_headers"] = response_headers
|
|
229
|
+
|
|
230
|
+
return http_info
|
|
231
|
+
|
|
232
|
+
def _call_api(self, **kwargs):
|
|
233
|
+
try:
|
|
234
|
+
kwargs["async_request"] = True
|
|
235
|
+
return self.do_http_request(**kwargs)
|
|
236
|
+
except TypeError:
|
|
237
|
+
import inspect
|
|
238
|
+
params = inspect.signature(self.do_http_request).parameters
|
|
239
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
|
240
|
+
return self.do_http_request(**http_info)
|
|
241
|
+
|
|
242
|
+
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
|
243
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
|
244
|
+
collection_formats=None, request_type=None):
|
|
245
|
+
"""Makes the HTTP request and returns deserialized data.
|
|
246
|
+
|
|
247
|
+
:param resource_path: Path to method endpoint.
|
|
248
|
+
:param method: Method to call.
|
|
249
|
+
:param path_params: Path parameters in the url.
|
|
250
|
+
:param query_params: Query parameters in the url.
|
|
251
|
+
:param header_params: Header parameters to be
|
|
252
|
+
placed in the request header.
|
|
253
|
+
:param body: Request body.
|
|
254
|
+
:param post_params: Request post form parameters,
|
|
255
|
+
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
|
256
|
+
:param cname: Used for obs endpoint.
|
|
257
|
+
:param auth_settings: Auth Settings names for the request.
|
|
258
|
+
:param response_type: Response data type.
|
|
259
|
+
:param response_headers: Header should be added to response data.
|
|
260
|
+
:param collection_formats: dict of collection formats for path, query,
|
|
261
|
+
header, and post parameters.
|
|
262
|
+
:param request_type: Request data type.
|
|
263
|
+
:return:
|
|
264
|
+
Return the response directly.
|
|
265
|
+
"""
|
|
266
|
+
return self.do_http_request(
|
|
267
|
+
method=method,
|
|
268
|
+
resource_path=resource_path,
|
|
269
|
+
path_params=path_params,
|
|
270
|
+
query_params=query_params,
|
|
271
|
+
header_params=header_params,
|
|
272
|
+
body=body,
|
|
273
|
+
post_params=post_params,
|
|
274
|
+
cname=cname,
|
|
275
|
+
response_type=response_type,
|
|
276
|
+
response_headers=response_headers,
|
|
277
|
+
collection_formats=collection_formats,
|
|
278
|
+
request_type=request_type,
|
|
279
|
+
async_request=True)
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
import importlib
|
|
6
|
+
import warnings
|
|
7
|
+
|
|
8
|
+
from huaweicloudsdkcore.client import Client, ClientBuilder
|
|
9
|
+
from huaweicloudsdkcore.utils import http_utils
|
|
10
|
+
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
|
11
|
+
try:
|
|
12
|
+
from huaweicloudsdkcore.invoker.invoker import SyncInvoker
|
|
13
|
+
except ImportError as e:
|
|
14
|
+
warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkaom'")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class AomClient(Client):
|
|
18
|
+
def __init__(self):
|
|
19
|
+
super(AomClient, self).__init__()
|
|
20
|
+
self.model_package = importlib.import_module("huaweicloudsdkaom.v4.model")
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def new_builder(cls, clazz=None):
|
|
24
|
+
if not clazz:
|
|
25
|
+
client_builder = ClientBuilder(cls)
|
|
26
|
+
else:
|
|
27
|
+
if clazz.__name__ != "AomClient":
|
|
28
|
+
raise TypeError("client type error, support client type is AomClient")
|
|
29
|
+
client_builder = ClientBuilder(clazz)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
return client_builder
|
|
34
|
+
|
|
35
|
+
def batch_import_agent(self, request):
|
|
36
|
+
"""下发批量安装UniAgent任务
|
|
37
|
+
|
|
38
|
+
该接口用于下发批量安装UniAgent任务。
|
|
39
|
+
|
|
40
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
41
|
+
|
|
42
|
+
:param request: Request instance for BatchImportAgent
|
|
43
|
+
:type request: :class:`huaweicloudsdkaom.v4.BatchImportAgentRequest`
|
|
44
|
+
:rtype: :class:`huaweicloudsdkaom.v4.BatchImportAgentResponse`
|
|
45
|
+
"""
|
|
46
|
+
http_info = self._batch_import_agent_http_info(request)
|
|
47
|
+
return self._call_api(**http_info)
|
|
48
|
+
|
|
49
|
+
def batch_import_agent_invoker(self, request):
|
|
50
|
+
http_info = self._batch_import_agent_http_info(request)
|
|
51
|
+
return SyncInvoker(self, http_info)
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def _batch_import_agent_http_info(cls, request):
|
|
55
|
+
http_info = {
|
|
56
|
+
"method": "POST",
|
|
57
|
+
"resource_path": "/v1/{project_id}/uniagent-console/mainview/batch-import",
|
|
58
|
+
"request_type": request.__class__.__name__,
|
|
59
|
+
"response_type": "BatchImportAgentResponse"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
63
|
+
|
|
64
|
+
cname = None
|
|
65
|
+
|
|
66
|
+
collection_formats = {}
|
|
67
|
+
|
|
68
|
+
path_params = {}
|
|
69
|
+
|
|
70
|
+
query_params = []
|
|
71
|
+
|
|
72
|
+
header_params = {}
|
|
73
|
+
if 'region' in local_var_params:
|
|
74
|
+
header_params['region'] = local_var_params['region']
|
|
75
|
+
|
|
76
|
+
form_params = {}
|
|
77
|
+
|
|
78
|
+
body = None
|
|
79
|
+
if 'body' in local_var_params:
|
|
80
|
+
body = local_var_params['body']
|
|
81
|
+
if isinstance(request, SdkStreamRequest):
|
|
82
|
+
body = request.get_file_stream()
|
|
83
|
+
|
|
84
|
+
response_headers = []
|
|
85
|
+
|
|
86
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
87
|
+
['application/json'])
|
|
88
|
+
|
|
89
|
+
auth_settings = []
|
|
90
|
+
|
|
91
|
+
http_info["cname"] = cname
|
|
92
|
+
http_info["collection_formats"] = collection_formats
|
|
93
|
+
http_info["path_params"] = path_params
|
|
94
|
+
http_info["query_params"] = query_params
|
|
95
|
+
http_info["header_params"] = header_params
|
|
96
|
+
http_info["post_params"] = form_params
|
|
97
|
+
http_info["body"] = body
|
|
98
|
+
http_info["response_headers"] = response_headers
|
|
99
|
+
|
|
100
|
+
return http_info
|
|
101
|
+
|
|
102
|
+
def batch_update_agent(self, request):
|
|
103
|
+
"""下发批量升级UniAgent任务
|
|
104
|
+
|
|
105
|
+
该接口用于下发批量升级UniAgent任务。
|
|
106
|
+
|
|
107
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
108
|
+
|
|
109
|
+
:param request: Request instance for BatchUpdateAgent
|
|
110
|
+
:type request: :class:`huaweicloudsdkaom.v4.BatchUpdateAgentRequest`
|
|
111
|
+
:rtype: :class:`huaweicloudsdkaom.v4.BatchUpdateAgentResponse`
|
|
112
|
+
"""
|
|
113
|
+
http_info = self._batch_update_agent_http_info(request)
|
|
114
|
+
return self._call_api(**http_info)
|
|
115
|
+
|
|
116
|
+
def batch_update_agent_invoker(self, request):
|
|
117
|
+
http_info = self._batch_update_agent_http_info(request)
|
|
118
|
+
return SyncInvoker(self, http_info)
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def _batch_update_agent_http_info(cls, request):
|
|
122
|
+
http_info = {
|
|
123
|
+
"method": "POST",
|
|
124
|
+
"resource_path": "/v1/{project_id}/uniagent-console/upgrade/batch-upgrade",
|
|
125
|
+
"request_type": request.__class__.__name__,
|
|
126
|
+
"response_type": "BatchUpdateAgentResponse"
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
130
|
+
|
|
131
|
+
cname = None
|
|
132
|
+
|
|
133
|
+
collection_formats = {}
|
|
134
|
+
|
|
135
|
+
path_params = {}
|
|
136
|
+
|
|
137
|
+
query_params = []
|
|
138
|
+
|
|
139
|
+
header_params = {}
|
|
140
|
+
|
|
141
|
+
form_params = {}
|
|
142
|
+
|
|
143
|
+
body = None
|
|
144
|
+
if 'body' in local_var_params:
|
|
145
|
+
body = local_var_params['body']
|
|
146
|
+
if isinstance(request, SdkStreamRequest):
|
|
147
|
+
body = request.get_file_stream()
|
|
148
|
+
|
|
149
|
+
response_headers = []
|
|
150
|
+
|
|
151
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
152
|
+
['application/json'])
|
|
153
|
+
|
|
154
|
+
auth_settings = []
|
|
155
|
+
|
|
156
|
+
http_info["cname"] = cname
|
|
157
|
+
http_info["collection_formats"] = collection_formats
|
|
158
|
+
http_info["path_params"] = path_params
|
|
159
|
+
http_info["query_params"] = query_params
|
|
160
|
+
http_info["header_params"] = header_params
|
|
161
|
+
http_info["post_params"] = form_params
|
|
162
|
+
http_info["body"] = body
|
|
163
|
+
http_info["response_headers"] = response_headers
|
|
164
|
+
|
|
165
|
+
return http_info
|
|
166
|
+
|
|
167
|
+
def show_agent_infos(self, request):
|
|
168
|
+
"""查询UniAgent主机列表信息
|
|
169
|
+
|
|
170
|
+
该接口用于查询执行过安装UniAgent任务的主机列表信息。
|
|
171
|
+
|
|
172
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
173
|
+
|
|
174
|
+
:param request: Request instance for ShowAgentInfos
|
|
175
|
+
:type request: :class:`huaweicloudsdkaom.v4.ShowAgentInfosRequest`
|
|
176
|
+
:rtype: :class:`huaweicloudsdkaom.v4.ShowAgentInfosResponse`
|
|
177
|
+
"""
|
|
178
|
+
http_info = self._show_agent_infos_http_info(request)
|
|
179
|
+
return self._call_api(**http_info)
|
|
180
|
+
|
|
181
|
+
def show_agent_infos_invoker(self, request):
|
|
182
|
+
http_info = self._show_agent_infos_http_info(request)
|
|
183
|
+
return SyncInvoker(self, http_info)
|
|
184
|
+
|
|
185
|
+
@classmethod
|
|
186
|
+
def _show_agent_infos_http_info(cls, request):
|
|
187
|
+
http_info = {
|
|
188
|
+
"method": "POST",
|
|
189
|
+
"resource_path": "/v1/uniagent-console/agent-list/all",
|
|
190
|
+
"request_type": request.__class__.__name__,
|
|
191
|
+
"response_type": "ShowAgentInfosResponse"
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
195
|
+
|
|
196
|
+
cname = None
|
|
197
|
+
|
|
198
|
+
collection_formats = {}
|
|
199
|
+
|
|
200
|
+
path_params = {}
|
|
201
|
+
|
|
202
|
+
query_params = []
|
|
203
|
+
|
|
204
|
+
header_params = {}
|
|
205
|
+
|
|
206
|
+
form_params = {}
|
|
207
|
+
|
|
208
|
+
body = None
|
|
209
|
+
if 'body' in local_var_params:
|
|
210
|
+
body = local_var_params['body']
|
|
211
|
+
if isinstance(request, SdkStreamRequest):
|
|
212
|
+
body = request.get_file_stream()
|
|
213
|
+
|
|
214
|
+
response_headers = []
|
|
215
|
+
|
|
216
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
217
|
+
['application/json'])
|
|
218
|
+
|
|
219
|
+
auth_settings = []
|
|
220
|
+
|
|
221
|
+
http_info["cname"] = cname
|
|
222
|
+
http_info["collection_formats"] = collection_formats
|
|
223
|
+
http_info["path_params"] = path_params
|
|
224
|
+
http_info["query_params"] = query_params
|
|
225
|
+
http_info["header_params"] = header_params
|
|
226
|
+
http_info["post_params"] = form_params
|
|
227
|
+
http_info["body"] = body
|
|
228
|
+
http_info["response_headers"] = response_headers
|
|
229
|
+
|
|
230
|
+
return http_info
|
|
231
|
+
|
|
232
|
+
def _call_api(self, **kwargs):
|
|
233
|
+
try:
|
|
234
|
+
return self.do_http_request(**kwargs)
|
|
235
|
+
except TypeError:
|
|
236
|
+
import inspect
|
|
237
|
+
params = inspect.signature(self.do_http_request).parameters
|
|
238
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
|
239
|
+
return self.do_http_request(**http_info)
|
|
240
|
+
|
|
241
|
+
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
|
242
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
|
243
|
+
collection_formats=None, request_type=None):
|
|
244
|
+
"""Makes the HTTP request and returns deserialized data.
|
|
245
|
+
|
|
246
|
+
:param resource_path: Path to method endpoint.
|
|
247
|
+
:param method: Method to call.
|
|
248
|
+
:param path_params: Path parameters in the url.
|
|
249
|
+
:param query_params: Query parameters in the url.
|
|
250
|
+
:param header_params: Header parameters to be placed in the request header.
|
|
251
|
+
:param body: Request body.
|
|
252
|
+
:param post_params: Request post form parameters,
|
|
253
|
+
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
|
254
|
+
:param cname: Used for obs endpoint.
|
|
255
|
+
:param auth_settings: Auth Settings names for the request.
|
|
256
|
+
:param response_type: Response data type.
|
|
257
|
+
:param response_headers: Header should be added to response data.
|
|
258
|
+
:param collection_formats: dict of collection formats for path, query,
|
|
259
|
+
header, and post parameters.
|
|
260
|
+
:param request_type: Request data type.
|
|
261
|
+
:return:
|
|
262
|
+
Return the response directly.
|
|
263
|
+
"""
|
|
264
|
+
return self.do_http_request(
|
|
265
|
+
method=method,
|
|
266
|
+
resource_path=resource_path,
|
|
267
|
+
path_params=path_params,
|
|
268
|
+
query_params=query_params,
|
|
269
|
+
header_params=header_params,
|
|
270
|
+
body=body,
|
|
271
|
+
post_params=post_params,
|
|
272
|
+
cname=cname,
|
|
273
|
+
response_type=response_type,
|
|
274
|
+
response_headers=response_headers,
|
|
275
|
+
collection_formats=collection_formats,
|
|
276
|
+
request_type=request_type)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
from __future__ import absolute_import
|
|
4
|
+
|
|
5
|
+
# import models into model package
|
|
6
|
+
from huaweicloudsdkaom.v4.model.agent_batch_import_param_new import AgentBatchImportParamNew
|
|
7
|
+
from huaweicloudsdkaom.v4.model.agent_import_param_new import AgentImportParamNew
|
|
8
|
+
from huaweicloudsdkaom.v4.model.agent_info_param import AgentInfoParam
|
|
9
|
+
from huaweicloudsdkaom.v4.model.agent_info_result import AgentInfoResult
|
|
10
|
+
from huaweicloudsdkaom.v4.model.agent_upgrade_param import AgentUpgradeParam
|
|
11
|
+
from huaweicloudsdkaom.v4.model.batch_import_agent_request import BatchImportAgentRequest
|
|
12
|
+
from huaweicloudsdkaom.v4.model.batch_import_agent_response import BatchImportAgentResponse
|
|
13
|
+
from huaweicloudsdkaom.v4.model.batch_update_agent_request import BatchUpdateAgentRequest
|
|
14
|
+
from huaweicloudsdkaom.v4.model.batch_update_agent_response import BatchUpdateAgentResponse
|
|
15
|
+
from huaweicloudsdkaom.v4.model.plugin_install_basic_param import PluginInstallBasicParam
|
|
16
|
+
from huaweicloudsdkaom.v4.model.show_agent_infos_request import ShowAgentInfosRequest
|
|
17
|
+
from huaweicloudsdkaom.v4.model.show_agent_infos_response import ShowAgentInfosResponse
|
|
18
|
+
from huaweicloudsdkaom.v4.model.single_agent_param import SingleAgentParam
|