huaweicloudsdkclouddc 3.1.160__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 huaweicloudsdkclouddc might be problematic. Click here for more details.
- huaweicloudsdkclouddc/__init__.py +0 -0
- huaweicloudsdkclouddc/v1/__init__.py +138 -0
- huaweicloudsdkclouddc/v1/clouddc_async_client.py +2255 -0
- huaweicloudsdkclouddc/v1/clouddc_client.py +2252 -0
- huaweicloudsdkclouddc/v1/model/__init__.py +135 -0
- huaweicloudsdkclouddc/v1/model/alarm_daily_trend.py +173 -0
- huaweicloudsdkclouddc/v1/model/alarm_device_info.py +144 -0
- huaweicloudsdkclouddc/v1/model/alarm_group.py +173 -0
- huaweicloudsdkclouddc/v1/model/alarm_history.py +343 -0
- huaweicloudsdkclouddc/v1/model/alarm_host.py +173 -0
- huaweicloudsdkclouddc/v1/model/alarm_info.py +173 -0
- huaweicloudsdkclouddc/v1/model/alarm_level_info.py +144 -0
- huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_request.py +139 -0
- huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_response.py +85 -0
- huaweicloudsdkclouddc/v1/model/batch_create_tags_request.py +167 -0
- huaweicloudsdkclouddc/v1/model/batch_create_tags_response.py +85 -0
- huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_request.py +139 -0
- huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_response.py +85 -0
- huaweicloudsdkclouddc/v1/model/batch_delete_options.py +115 -0
- huaweicloudsdkclouddc/v1/model/batch_delete_tags_request.py +167 -0
- huaweicloudsdkclouddc/v1/model/batch_delete_tags_response.py +85 -0
- huaweicloudsdkclouddc/v1/model/capacity_bytes.py +84 -0
- huaweicloudsdkclouddc/v1/model/change_instance_password_options.py +143 -0
- huaweicloudsdkclouddc/v1/model/change_instance_password_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/change_instance_password_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/change_server_power_state_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/change_server_power_state_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/create_instance_opitons.py +305 -0
- huaweicloudsdkclouddc/v1/model/create_instance_opitons_placement.py +115 -0
- huaweicloudsdkclouddc/v1/model/create_instance_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/create_instance_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/delete_instance_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/delete_instance_response.py +112 -0
- huaweicloudsdkclouddc/v1/model/delete_instances_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/delete_instances_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/dimension.py +144 -0
- huaweicloudsdkclouddc/v1/model/download_server_logs_request.py +142 -0
- huaweicloudsdkclouddc/v1/model/download_server_logs_response.py +162 -0
- huaweicloudsdkclouddc/v1/model/drive.py +637 -0
- huaweicloudsdkclouddc/v1/model/error_status.py +170 -0
- huaweicloudsdkclouddc/v1/model/event_info.py +318 -0
- huaweicloudsdkclouddc/v1/model/export_server_logs_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/export_server_logs_response.py +278 -0
- huaweicloudsdkclouddc/v1/model/fan.py +285 -0
- huaweicloudsdkclouddc/v1/model/fault_host_info.py +173 -0
- huaweicloudsdkclouddc/v1/model/firmware_details.py +202 -0
- huaweicloudsdkclouddc/v1/model/hardware_summary.py +199 -0
- huaweicloudsdkclouddc/v1/model/health.py +90 -0
- huaweicloudsdkclouddc/v1/model/i_dc.py +208 -0
- huaweicloudsdkclouddc/v1/model/i_rack.py +521 -0
- huaweicloudsdkclouddc/v1/model/i_rack_request.py +115 -0
- huaweicloudsdkclouddc/v1/model/image.py +170 -0
- huaweicloudsdkclouddc/v1/model/image_id.py +84 -0
- huaweicloudsdkclouddc/v1/model/instance.py +280 -0
- huaweicloudsdkclouddc/v1/model/instance_id.py +84 -0
- huaweicloudsdkclouddc/v1/model/instance_state.py +94 -0
- huaweicloudsdkclouddc/v1/model/list_alarms_request.py +347 -0
- huaweicloudsdkclouddc/v1/model/list_alarms_response.py +145 -0
- huaweicloudsdkclouddc/v1/model/list_events_request.py +260 -0
- huaweicloudsdkclouddc/v1/model/list_events_response.py +145 -0
- huaweicloudsdkclouddc/v1/model/list_i_dcs_request.py +201 -0
- huaweicloudsdkclouddc/v1/model/list_i_dcs_response.py +137 -0
- huaweicloudsdkclouddc/v1/model/list_i_rack_request.py +201 -0
- huaweicloudsdkclouddc/v1/model/list_i_rack_response.py +137 -0
- huaweicloudsdkclouddc/v1/model/list_instances_request.py +231 -0
- huaweicloudsdkclouddc/v1/model/list_instances_response.py +170 -0
- huaweicloudsdkclouddc/v1/model/list_servers_request.py +173 -0
- huaweicloudsdkclouddc/v1/model/list_servers_response.py +170 -0
- huaweicloudsdkclouddc/v1/model/location.py +173 -0
- huaweicloudsdkclouddc/v1/model/manage_state.py +91 -0
- huaweicloudsdkclouddc/v1/model/memory.py +579 -0
- huaweicloudsdkclouddc/v1/model/metric.py +144 -0
- huaweicloudsdkclouddc/v1/model/modify_instance_ip_request.py +139 -0
- huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body.py +144 -0
- huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body_nics.py +143 -0
- huaweicloudsdkclouddc/v1/model/modify_instance_ip_response.py +85 -0
- huaweicloudsdkclouddc/v1/model/network_adapter.py +492 -0
- huaweicloudsdkclouddc/v1/model/network_interface.py +143 -0
- huaweicloudsdkclouddc/v1/model/network_port.py +347 -0
- huaweicloudsdkclouddc/v1/model/page_info.py +173 -0
- huaweicloudsdkclouddc/v1/model/password.py +84 -0
- huaweicloudsdkclouddc/v1/model/physical_server.py +402 -0
- huaweicloudsdkclouddc/v1/model/power.py +488 -0
- huaweicloudsdkclouddc/v1/model/power_action.py +143 -0
- huaweicloudsdkclouddc/v1/model/power_state.py +91 -0
- huaweicloudsdkclouddc/v1/model/processors.py +608 -0
- huaweicloudsdkclouddc/v1/model/query_instance_response_body.py +499 -0
- huaweicloudsdkclouddc/v1/model/reinstall_os_options.py +172 -0
- huaweicloudsdkclouddc/v1/model/reinstall_os_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/reinstall_os_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/resource_name.py +84 -0
- huaweicloudsdkclouddc/v1/model/resource_tags.py +115 -0
- huaweicloudsdkclouddc/v1/model/resource_uuid.py +84 -0
- huaweicloudsdkclouddc/v1/model/run_instances_options.py +367 -0
- huaweicloudsdkclouddc/v1/model/run_instances_options_network_interfaces.py +114 -0
- huaweicloudsdkclouddc/v1/model/run_instances_options_placement.py +115 -0
- huaweicloudsdkclouddc/v1/model/run_instances_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/run_instances_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/sas_address.py +84 -0
- huaweicloudsdkclouddc/v1/model/server_instance_id_set.py +115 -0
- huaweicloudsdkclouddc/v1/model/server_power_status.py +171 -0
- huaweicloudsdkclouddc/v1/model/server_state.py +142 -0
- huaweicloudsdkclouddc/v1/model/server_status.py +279 -0
- huaweicloudsdkclouddc/v1/model/servers_response_physical_servers.py +115 -0
- huaweicloudsdkclouddc/v1/model/show_alarm_summary_request.py +84 -0
- huaweicloudsdkclouddc/v1/model/show_alarm_summary_response.py +203 -0
- huaweicloudsdkclouddc/v1/model/show_alarm_trend_request.py +142 -0
- huaweicloudsdkclouddc/v1/model/show_alarm_trend_response.py +145 -0
- huaweicloudsdkclouddc/v1/model/show_event_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_event_response.py +377 -0
- huaweicloudsdkclouddc/v1/model/show_instance_status_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_instance_status_response.py +137 -0
- huaweicloudsdkclouddc/v1/model/show_logs_export_status_request.py +142 -0
- huaweicloudsdkclouddc/v1/model/show_logs_export_status_response.py +203 -0
- huaweicloudsdkclouddc/v1/model/show_remote_console_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_remote_console_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_response.py +116 -0
- huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_response.py +286 -0
- huaweicloudsdkclouddc/v1/model/show_server_request.py +114 -0
- huaweicloudsdkclouddc/v1/model/show_server_response.py +411 -0
- huaweicloudsdkclouddc/v1/model/show_server_status_request.py +84 -0
- huaweicloudsdkclouddc/v1/model/show_server_status_response.py +137 -0
- huaweicloudsdkclouddc/v1/model/state.py +89 -0
- huaweicloudsdkclouddc/v1/model/status.py +136 -0
- huaweicloudsdkclouddc/v1/model/storage_controller.py +608 -0
- huaweicloudsdkclouddc/v1/model/tag.py +143 -0
- huaweicloudsdkclouddc/v1/model/update_i_dcs_request.py +111 -0
- huaweicloudsdkclouddc/v1/model/update_i_dcs_response.py +112 -0
- huaweicloudsdkclouddc/v1/model/update_i_rack_request.py +139 -0
- huaweicloudsdkclouddc/v1/model/update_i_rack_response.py +112 -0
- huaweicloudsdkclouddc/v1/model/user_data.py +84 -0
- huaweicloudsdkclouddc/v1/model/volume.py +459 -0
- huaweicloudsdkclouddc/v1/model/vpc_id.py +84 -0
- huaweicloudsdkclouddc/v1/region/__init__.py +0 -0
- huaweicloudsdkclouddc/v1/region/clouddc_region.py +40 -0
- huaweicloudsdkclouddc-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkclouddc-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkclouddc-3.1.160.dist-info/RECORD +142 -0
- huaweicloudsdkclouddc-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkclouddc-3.1.160.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2255 @@
|
|
|
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
|
+
|
|
12
|
+
try:
|
|
13
|
+
from huaweicloudsdkcore.invoker.invoker import AsyncInvoker
|
|
14
|
+
except ImportError as e:
|
|
15
|
+
warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkclouddc'")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CloudDCAsyncClient(Client):
|
|
19
|
+
def __init__(self):
|
|
20
|
+
super(CloudDCAsyncClient, self).__init__()
|
|
21
|
+
self.model_package = importlib.import_module("huaweicloudsdkclouddc.v1.model")
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def new_builder(cls, clazz=None):
|
|
25
|
+
if not clazz:
|
|
26
|
+
client_builder = ClientBuilder(cls, "BasicCredentials")
|
|
27
|
+
else:
|
|
28
|
+
if clazz.__name__ != "CloudDCAsyncClient":
|
|
29
|
+
raise TypeError("client type error, support client type is CloudDCAsyncClient")
|
|
30
|
+
client_builder = ClientBuilder(clazz, "BasicCredentials")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
return client_builder
|
|
35
|
+
|
|
36
|
+
def batch_create_irack_tags_async(self, request):
|
|
37
|
+
r"""批量创建机柜标签
|
|
38
|
+
|
|
39
|
+
批量创建机柜标签
|
|
40
|
+
|
|
41
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
:param request: Request instance for BatchCreateIrackTags
|
|
45
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.BatchCreateIrackTagsRequest`
|
|
46
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.BatchCreateIrackTagsResponse`
|
|
47
|
+
"""
|
|
48
|
+
http_info = self._batch_create_irack_tags_http_info(request)
|
|
49
|
+
return self._call_api(**http_info)
|
|
50
|
+
|
|
51
|
+
def batch_create_irack_tags_async_invoker(self, request):
|
|
52
|
+
http_info = self._batch_create_irack_tags_http_info(request)
|
|
53
|
+
return AsyncInvoker(self, http_info)
|
|
54
|
+
|
|
55
|
+
def _batch_create_irack_tags_http_info(self, request):
|
|
56
|
+
http_info = {
|
|
57
|
+
"method": "POST",
|
|
58
|
+
"resource_path": "/v1/{project_id}/irack/{id}/tags/create",
|
|
59
|
+
"request_type": request.__class__.__name__,
|
|
60
|
+
"response_type": "BatchCreateIrackTagsResponse"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
64
|
+
|
|
65
|
+
cname = None
|
|
66
|
+
|
|
67
|
+
collection_formats = {}
|
|
68
|
+
|
|
69
|
+
path_params = {}
|
|
70
|
+
if 'id' in local_var_params:
|
|
71
|
+
path_params['id'] = local_var_params['id']
|
|
72
|
+
|
|
73
|
+
query_params = []
|
|
74
|
+
|
|
75
|
+
header_params = {}
|
|
76
|
+
|
|
77
|
+
form_params = {}
|
|
78
|
+
|
|
79
|
+
body = None
|
|
80
|
+
if 'body' in local_var_params:
|
|
81
|
+
body = local_var_params['body']
|
|
82
|
+
if isinstance(request, SdkStreamRequest):
|
|
83
|
+
body = request.get_file_stream()
|
|
84
|
+
|
|
85
|
+
response_headers = []
|
|
86
|
+
|
|
87
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
88
|
+
['application/json;charset=UTF-8'])
|
|
89
|
+
|
|
90
|
+
auth_settings = []
|
|
91
|
+
|
|
92
|
+
http_info["cname"] = cname
|
|
93
|
+
http_info["collection_formats"] = collection_formats
|
|
94
|
+
http_info["path_params"] = path_params
|
|
95
|
+
http_info["query_params"] = query_params
|
|
96
|
+
http_info["header_params"] = header_params
|
|
97
|
+
http_info["post_params"] = form_params
|
|
98
|
+
http_info["body"] = body
|
|
99
|
+
http_info["response_headers"] = response_headers
|
|
100
|
+
|
|
101
|
+
return http_info
|
|
102
|
+
|
|
103
|
+
def batch_create_tags_async(self, request):
|
|
104
|
+
r"""批量创建资源标签
|
|
105
|
+
|
|
106
|
+
批量创建资源标签
|
|
107
|
+
|
|
108
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
:param request: Request instance for BatchCreateTags
|
|
112
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.BatchCreateTagsRequest`
|
|
113
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.BatchCreateTagsResponse`
|
|
114
|
+
"""
|
|
115
|
+
http_info = self._batch_create_tags_http_info(request)
|
|
116
|
+
return self._call_api(**http_info)
|
|
117
|
+
|
|
118
|
+
def batch_create_tags_async_invoker(self, request):
|
|
119
|
+
http_info = self._batch_create_tags_http_info(request)
|
|
120
|
+
return AsyncInvoker(self, http_info)
|
|
121
|
+
|
|
122
|
+
def _batch_create_tags_http_info(self, request):
|
|
123
|
+
http_info = {
|
|
124
|
+
"method": "POST",
|
|
125
|
+
"resource_path": "/v1/{project_id}/{resource_type}/{resource_id}/tags/create",
|
|
126
|
+
"request_type": request.__class__.__name__,
|
|
127
|
+
"response_type": "BatchCreateTagsResponse"
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
131
|
+
|
|
132
|
+
cname = None
|
|
133
|
+
|
|
134
|
+
collection_formats = {}
|
|
135
|
+
|
|
136
|
+
path_params = {}
|
|
137
|
+
if 'resource_type' in local_var_params:
|
|
138
|
+
path_params['resource_type'] = local_var_params['resource_type']
|
|
139
|
+
if 'resource_id' in local_var_params:
|
|
140
|
+
path_params['resource_id'] = local_var_params['resource_id']
|
|
141
|
+
|
|
142
|
+
query_params = []
|
|
143
|
+
|
|
144
|
+
header_params = {}
|
|
145
|
+
|
|
146
|
+
form_params = {}
|
|
147
|
+
|
|
148
|
+
body = None
|
|
149
|
+
if 'body' in local_var_params:
|
|
150
|
+
body = local_var_params['body']
|
|
151
|
+
if isinstance(request, SdkStreamRequest):
|
|
152
|
+
body = request.get_file_stream()
|
|
153
|
+
|
|
154
|
+
response_headers = []
|
|
155
|
+
|
|
156
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
157
|
+
['application/json;charset=UTF-8'])
|
|
158
|
+
|
|
159
|
+
auth_settings = []
|
|
160
|
+
|
|
161
|
+
http_info["cname"] = cname
|
|
162
|
+
http_info["collection_formats"] = collection_formats
|
|
163
|
+
http_info["path_params"] = path_params
|
|
164
|
+
http_info["query_params"] = query_params
|
|
165
|
+
http_info["header_params"] = header_params
|
|
166
|
+
http_info["post_params"] = form_params
|
|
167
|
+
http_info["body"] = body
|
|
168
|
+
http_info["response_headers"] = response_headers
|
|
169
|
+
|
|
170
|
+
return http_info
|
|
171
|
+
|
|
172
|
+
def batch_delete_irack_tags_async(self, request):
|
|
173
|
+
r"""批量删除机柜标签
|
|
174
|
+
|
|
175
|
+
批量删除机柜标签
|
|
176
|
+
|
|
177
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
:param request: Request instance for BatchDeleteIrackTags
|
|
181
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.BatchDeleteIrackTagsRequest`
|
|
182
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.BatchDeleteIrackTagsResponse`
|
|
183
|
+
"""
|
|
184
|
+
http_info = self._batch_delete_irack_tags_http_info(request)
|
|
185
|
+
return self._call_api(**http_info)
|
|
186
|
+
|
|
187
|
+
def batch_delete_irack_tags_async_invoker(self, request):
|
|
188
|
+
http_info = self._batch_delete_irack_tags_http_info(request)
|
|
189
|
+
return AsyncInvoker(self, http_info)
|
|
190
|
+
|
|
191
|
+
def _batch_delete_irack_tags_http_info(self, request):
|
|
192
|
+
http_info = {
|
|
193
|
+
"method": "POST",
|
|
194
|
+
"resource_path": "/v1/{project_id}/irack/{id}/tags/delete",
|
|
195
|
+
"request_type": request.__class__.__name__,
|
|
196
|
+
"response_type": "BatchDeleteIrackTagsResponse"
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
200
|
+
|
|
201
|
+
cname = None
|
|
202
|
+
|
|
203
|
+
collection_formats = {}
|
|
204
|
+
|
|
205
|
+
path_params = {}
|
|
206
|
+
if 'id' in local_var_params:
|
|
207
|
+
path_params['id'] = local_var_params['id']
|
|
208
|
+
|
|
209
|
+
query_params = []
|
|
210
|
+
|
|
211
|
+
header_params = {}
|
|
212
|
+
|
|
213
|
+
form_params = {}
|
|
214
|
+
|
|
215
|
+
body = None
|
|
216
|
+
if 'body' in local_var_params:
|
|
217
|
+
body = local_var_params['body']
|
|
218
|
+
if isinstance(request, SdkStreamRequest):
|
|
219
|
+
body = request.get_file_stream()
|
|
220
|
+
|
|
221
|
+
response_headers = []
|
|
222
|
+
|
|
223
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
224
|
+
['application/json;charset=UTF-8'])
|
|
225
|
+
|
|
226
|
+
auth_settings = []
|
|
227
|
+
|
|
228
|
+
http_info["cname"] = cname
|
|
229
|
+
http_info["collection_formats"] = collection_formats
|
|
230
|
+
http_info["path_params"] = path_params
|
|
231
|
+
http_info["query_params"] = query_params
|
|
232
|
+
http_info["header_params"] = header_params
|
|
233
|
+
http_info["post_params"] = form_params
|
|
234
|
+
http_info["body"] = body
|
|
235
|
+
http_info["response_headers"] = response_headers
|
|
236
|
+
|
|
237
|
+
return http_info
|
|
238
|
+
|
|
239
|
+
def batch_delete_tags_async(self, request):
|
|
240
|
+
r"""批量删除资源标签
|
|
241
|
+
|
|
242
|
+
批量删除资源标签
|
|
243
|
+
|
|
244
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
:param request: Request instance for BatchDeleteTags
|
|
248
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.BatchDeleteTagsRequest`
|
|
249
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.BatchDeleteTagsResponse`
|
|
250
|
+
"""
|
|
251
|
+
http_info = self._batch_delete_tags_http_info(request)
|
|
252
|
+
return self._call_api(**http_info)
|
|
253
|
+
|
|
254
|
+
def batch_delete_tags_async_invoker(self, request):
|
|
255
|
+
http_info = self._batch_delete_tags_http_info(request)
|
|
256
|
+
return AsyncInvoker(self, http_info)
|
|
257
|
+
|
|
258
|
+
def _batch_delete_tags_http_info(self, request):
|
|
259
|
+
http_info = {
|
|
260
|
+
"method": "POST",
|
|
261
|
+
"resource_path": "/v1/{project_id}/{resource_type}/{resource_id}/tags/delete",
|
|
262
|
+
"request_type": request.__class__.__name__,
|
|
263
|
+
"response_type": "BatchDeleteTagsResponse"
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
267
|
+
|
|
268
|
+
cname = None
|
|
269
|
+
|
|
270
|
+
collection_formats = {}
|
|
271
|
+
|
|
272
|
+
path_params = {}
|
|
273
|
+
if 'resource_type' in local_var_params:
|
|
274
|
+
path_params['resource_type'] = local_var_params['resource_type']
|
|
275
|
+
if 'resource_id' in local_var_params:
|
|
276
|
+
path_params['resource_id'] = local_var_params['resource_id']
|
|
277
|
+
|
|
278
|
+
query_params = []
|
|
279
|
+
|
|
280
|
+
header_params = {}
|
|
281
|
+
|
|
282
|
+
form_params = {}
|
|
283
|
+
|
|
284
|
+
body = None
|
|
285
|
+
if 'body' in local_var_params:
|
|
286
|
+
body = local_var_params['body']
|
|
287
|
+
if isinstance(request, SdkStreamRequest):
|
|
288
|
+
body = request.get_file_stream()
|
|
289
|
+
|
|
290
|
+
response_headers = []
|
|
291
|
+
|
|
292
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
293
|
+
['application/json;charset=UTF-8'])
|
|
294
|
+
|
|
295
|
+
auth_settings = []
|
|
296
|
+
|
|
297
|
+
http_info["cname"] = cname
|
|
298
|
+
http_info["collection_formats"] = collection_formats
|
|
299
|
+
http_info["path_params"] = path_params
|
|
300
|
+
http_info["query_params"] = query_params
|
|
301
|
+
http_info["header_params"] = header_params
|
|
302
|
+
http_info["post_params"] = form_params
|
|
303
|
+
http_info["body"] = body
|
|
304
|
+
http_info["response_headers"] = response_headers
|
|
305
|
+
|
|
306
|
+
return http_info
|
|
307
|
+
|
|
308
|
+
def change_instance_password_async(self, request):
|
|
309
|
+
r"""批量修改实例密码
|
|
310
|
+
|
|
311
|
+
修改服务器管理账号(root用户或Administrator用户)密码
|
|
312
|
+
前提条件:Instance state为running
|
|
313
|
+
该接口为同步接口,全部成功或者全部失败
|
|
314
|
+
约束:
|
|
315
|
+
无符合安全要求的密码复杂度检查,非安全密码输入后,无错误提示。
|
|
316
|
+
服务器开机或重启后,新密码生效(调用**ChangeServerPowerState**接口重启)。
|
|
317
|
+
|
|
318
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
:param request: Request instance for ChangeInstancePassword
|
|
322
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ChangeInstancePasswordRequest`
|
|
323
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ChangeInstancePasswordResponse`
|
|
324
|
+
"""
|
|
325
|
+
http_info = self._change_instance_password_http_info(request)
|
|
326
|
+
return self._call_api(**http_info)
|
|
327
|
+
|
|
328
|
+
def change_instance_password_async_invoker(self, request):
|
|
329
|
+
http_info = self._change_instance_password_http_info(request)
|
|
330
|
+
return AsyncInvoker(self, http_info)
|
|
331
|
+
|
|
332
|
+
def _change_instance_password_http_info(self, request):
|
|
333
|
+
http_info = {
|
|
334
|
+
"method": "PUT",
|
|
335
|
+
"resource_path": "/v1/{project_id}/instances/password",
|
|
336
|
+
"request_type": request.__class__.__name__,
|
|
337
|
+
"response_type": "ChangeInstancePasswordResponse"
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
341
|
+
|
|
342
|
+
cname = None
|
|
343
|
+
|
|
344
|
+
collection_formats = {}
|
|
345
|
+
|
|
346
|
+
path_params = {}
|
|
347
|
+
|
|
348
|
+
query_params = []
|
|
349
|
+
|
|
350
|
+
header_params = {}
|
|
351
|
+
|
|
352
|
+
form_params = {}
|
|
353
|
+
|
|
354
|
+
body = None
|
|
355
|
+
if 'body' in local_var_params:
|
|
356
|
+
body = local_var_params['body']
|
|
357
|
+
if isinstance(request, SdkStreamRequest):
|
|
358
|
+
body = request.get_file_stream()
|
|
359
|
+
|
|
360
|
+
response_headers = []
|
|
361
|
+
|
|
362
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
363
|
+
['application/json;charset=UTF-8'])
|
|
364
|
+
|
|
365
|
+
auth_settings = []
|
|
366
|
+
|
|
367
|
+
http_info["cname"] = cname
|
|
368
|
+
http_info["collection_formats"] = collection_formats
|
|
369
|
+
http_info["path_params"] = path_params
|
|
370
|
+
http_info["query_params"] = query_params
|
|
371
|
+
http_info["header_params"] = header_params
|
|
372
|
+
http_info["post_params"] = form_params
|
|
373
|
+
http_info["body"] = body
|
|
374
|
+
http_info["response_headers"] = response_headers
|
|
375
|
+
|
|
376
|
+
return http_info
|
|
377
|
+
|
|
378
|
+
def change_server_power_state_async(self, request):
|
|
379
|
+
r"""批量修改物理服务器电源状态
|
|
380
|
+
|
|
381
|
+
修改物理服务器电源状态,此接口为异步接口,电源状态修改成功与否需要根据查询物理服务器信息获得
|
|
382
|
+
|
|
383
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
:param request: Request instance for ChangeServerPowerState
|
|
387
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ChangeServerPowerStateRequest`
|
|
388
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ChangeServerPowerStateResponse`
|
|
389
|
+
"""
|
|
390
|
+
http_info = self._change_server_power_state_http_info(request)
|
|
391
|
+
return self._call_api(**http_info)
|
|
392
|
+
|
|
393
|
+
def change_server_power_state_async_invoker(self, request):
|
|
394
|
+
http_info = self._change_server_power_state_http_info(request)
|
|
395
|
+
return AsyncInvoker(self, http_info)
|
|
396
|
+
|
|
397
|
+
def _change_server_power_state_http_info(self, request):
|
|
398
|
+
http_info = {
|
|
399
|
+
"method": "PUT",
|
|
400
|
+
"resource_path": "/v1/{project_id}/physicalservers/power-state",
|
|
401
|
+
"request_type": request.__class__.__name__,
|
|
402
|
+
"response_type": "ChangeServerPowerStateResponse"
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
406
|
+
|
|
407
|
+
cname = None
|
|
408
|
+
|
|
409
|
+
collection_formats = {}
|
|
410
|
+
|
|
411
|
+
path_params = {}
|
|
412
|
+
|
|
413
|
+
query_params = []
|
|
414
|
+
|
|
415
|
+
header_params = {}
|
|
416
|
+
|
|
417
|
+
form_params = {}
|
|
418
|
+
|
|
419
|
+
body = None
|
|
420
|
+
if 'body' in local_var_params:
|
|
421
|
+
body = local_var_params['body']
|
|
422
|
+
if isinstance(request, SdkStreamRequest):
|
|
423
|
+
body = request.get_file_stream()
|
|
424
|
+
|
|
425
|
+
response_headers = []
|
|
426
|
+
|
|
427
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
428
|
+
['application/json;charset=UTF-8'])
|
|
429
|
+
|
|
430
|
+
auth_settings = []
|
|
431
|
+
|
|
432
|
+
http_info["cname"] = cname
|
|
433
|
+
http_info["collection_formats"] = collection_formats
|
|
434
|
+
http_info["path_params"] = path_params
|
|
435
|
+
http_info["query_params"] = query_params
|
|
436
|
+
http_info["header_params"] = header_params
|
|
437
|
+
http_info["post_params"] = form_params
|
|
438
|
+
http_info["body"] = body
|
|
439
|
+
http_info["response_headers"] = response_headers
|
|
440
|
+
|
|
441
|
+
return http_info
|
|
442
|
+
|
|
443
|
+
def create_instance_async(self, request):
|
|
444
|
+
r"""创建实例
|
|
445
|
+
|
|
446
|
+
创建实例,支持指定IP等更多个性化参数创建实例。
|
|
447
|
+
|
|
448
|
+
调度策略支持:
|
|
449
|
+
1、指定服务器
|
|
450
|
+
2、基于空闲随机调度策略
|
|
451
|
+
|
|
452
|
+
支持VPC网络及AI参数面网络配置。
|
|
453
|
+
|
|
454
|
+
此接口为异步接口,实例的创建和启动不是立即完成的,通过接口 **ShowInstanceStatus** 查询实例状态为 **running** 代表实例创建成功。
|
|
455
|
+
接口约束:服务器**manage_state**为 **ready**
|
|
456
|
+
|
|
457
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
:param request: Request instance for CreateInstance
|
|
461
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.CreateInstanceRequest`
|
|
462
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.CreateInstanceResponse`
|
|
463
|
+
"""
|
|
464
|
+
http_info = self._create_instance_http_info(request)
|
|
465
|
+
return self._call_api(**http_info)
|
|
466
|
+
|
|
467
|
+
def create_instance_async_invoker(self, request):
|
|
468
|
+
http_info = self._create_instance_http_info(request)
|
|
469
|
+
return AsyncInvoker(self, http_info)
|
|
470
|
+
|
|
471
|
+
def _create_instance_http_info(self, request):
|
|
472
|
+
http_info = {
|
|
473
|
+
"method": "POST",
|
|
474
|
+
"resource_path": "/v1/{project_id}/instances",
|
|
475
|
+
"request_type": request.__class__.__name__,
|
|
476
|
+
"response_type": "CreateInstanceResponse"
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
480
|
+
|
|
481
|
+
cname = None
|
|
482
|
+
|
|
483
|
+
collection_formats = {}
|
|
484
|
+
|
|
485
|
+
path_params = {}
|
|
486
|
+
|
|
487
|
+
query_params = []
|
|
488
|
+
|
|
489
|
+
header_params = {}
|
|
490
|
+
|
|
491
|
+
form_params = {}
|
|
492
|
+
|
|
493
|
+
body = None
|
|
494
|
+
if 'body' in local_var_params:
|
|
495
|
+
body = local_var_params['body']
|
|
496
|
+
if isinstance(request, SdkStreamRequest):
|
|
497
|
+
body = request.get_file_stream()
|
|
498
|
+
|
|
499
|
+
response_headers = []
|
|
500
|
+
|
|
501
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
502
|
+
['application/json;charset=UTF-8'])
|
|
503
|
+
|
|
504
|
+
auth_settings = []
|
|
505
|
+
|
|
506
|
+
http_info["cname"] = cname
|
|
507
|
+
http_info["collection_formats"] = collection_formats
|
|
508
|
+
http_info["path_params"] = path_params
|
|
509
|
+
http_info["query_params"] = query_params
|
|
510
|
+
http_info["header_params"] = header_params
|
|
511
|
+
http_info["post_params"] = form_params
|
|
512
|
+
http_info["body"] = body
|
|
513
|
+
http_info["response_headers"] = response_headers
|
|
514
|
+
|
|
515
|
+
return http_info
|
|
516
|
+
|
|
517
|
+
def delete_instance_async(self, request):
|
|
518
|
+
r"""删除实例
|
|
519
|
+
|
|
520
|
+
指定物理服务器删除实例,此接口为异步接口,可通过 **ShowInstanceStatus** 查询实例状态,实例状态从 **shutting-down** 变为 **terminated**,表明删除实例成功。
|
|
521
|
+
|
|
522
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
:param request: Request instance for DeleteInstance
|
|
526
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.DeleteInstanceRequest`
|
|
527
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.DeleteInstanceResponse`
|
|
528
|
+
"""
|
|
529
|
+
http_info = self._delete_instance_http_info(request)
|
|
530
|
+
return self._call_api(**http_info)
|
|
531
|
+
|
|
532
|
+
def delete_instance_async_invoker(self, request):
|
|
533
|
+
http_info = self._delete_instance_http_info(request)
|
|
534
|
+
return AsyncInvoker(self, http_info)
|
|
535
|
+
|
|
536
|
+
def _delete_instance_http_info(self, request):
|
|
537
|
+
http_info = {
|
|
538
|
+
"method": "DELETE",
|
|
539
|
+
"resource_path": "/v1/{project_id}/instances/{id}",
|
|
540
|
+
"request_type": request.__class__.__name__,
|
|
541
|
+
"response_type": "DeleteInstanceResponse"
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
545
|
+
|
|
546
|
+
cname = None
|
|
547
|
+
|
|
548
|
+
collection_formats = {}
|
|
549
|
+
|
|
550
|
+
path_params = {}
|
|
551
|
+
if 'id' in local_var_params:
|
|
552
|
+
path_params['id'] = local_var_params['id']
|
|
553
|
+
|
|
554
|
+
query_params = []
|
|
555
|
+
|
|
556
|
+
header_params = {}
|
|
557
|
+
|
|
558
|
+
form_params = {}
|
|
559
|
+
|
|
560
|
+
body = None
|
|
561
|
+
if isinstance(request, SdkStreamRequest):
|
|
562
|
+
body = request.get_file_stream()
|
|
563
|
+
|
|
564
|
+
response_headers = []
|
|
565
|
+
|
|
566
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
567
|
+
['application/json'])
|
|
568
|
+
|
|
569
|
+
auth_settings = []
|
|
570
|
+
|
|
571
|
+
http_info["cname"] = cname
|
|
572
|
+
http_info["collection_formats"] = collection_formats
|
|
573
|
+
http_info["path_params"] = path_params
|
|
574
|
+
http_info["query_params"] = query_params
|
|
575
|
+
http_info["header_params"] = header_params
|
|
576
|
+
http_info["post_params"] = form_params
|
|
577
|
+
http_info["body"] = body
|
|
578
|
+
http_info["response_headers"] = response_headers
|
|
579
|
+
|
|
580
|
+
return http_info
|
|
581
|
+
|
|
582
|
+
def delete_instances_async(self, request):
|
|
583
|
+
r"""批量删除实例
|
|
584
|
+
|
|
585
|
+
指定物理服务器批量删除实例,此接口为异步接口,可通过 **ShowInstanceStatus** 查询实例状态,实例状态从 **shutting-down** 变为 **terminated**,表明删除实例成功。
|
|
586
|
+
|
|
587
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
:param request: Request instance for DeleteInstances
|
|
591
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.DeleteInstancesRequest`
|
|
592
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.DeleteInstancesResponse`
|
|
593
|
+
"""
|
|
594
|
+
http_info = self._delete_instances_http_info(request)
|
|
595
|
+
return self._call_api(**http_info)
|
|
596
|
+
|
|
597
|
+
def delete_instances_async_invoker(self, request):
|
|
598
|
+
http_info = self._delete_instances_http_info(request)
|
|
599
|
+
return AsyncInvoker(self, http_info)
|
|
600
|
+
|
|
601
|
+
def _delete_instances_http_info(self, request):
|
|
602
|
+
http_info = {
|
|
603
|
+
"method": "POST",
|
|
604
|
+
"resource_path": "/v1/{project_id}/instances/batch-delete",
|
|
605
|
+
"request_type": request.__class__.__name__,
|
|
606
|
+
"response_type": "DeleteInstancesResponse"
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
610
|
+
|
|
611
|
+
cname = None
|
|
612
|
+
|
|
613
|
+
collection_formats = {}
|
|
614
|
+
|
|
615
|
+
path_params = {}
|
|
616
|
+
|
|
617
|
+
query_params = []
|
|
618
|
+
|
|
619
|
+
header_params = {}
|
|
620
|
+
|
|
621
|
+
form_params = {}
|
|
622
|
+
|
|
623
|
+
body = None
|
|
624
|
+
if 'body' in local_var_params:
|
|
625
|
+
body = local_var_params['body']
|
|
626
|
+
if isinstance(request, SdkStreamRequest):
|
|
627
|
+
body = request.get_file_stream()
|
|
628
|
+
|
|
629
|
+
response_headers = []
|
|
630
|
+
|
|
631
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
632
|
+
['application/json;charset=UTF-8'])
|
|
633
|
+
|
|
634
|
+
auth_settings = []
|
|
635
|
+
|
|
636
|
+
http_info["cname"] = cname
|
|
637
|
+
http_info["collection_formats"] = collection_formats
|
|
638
|
+
http_info["path_params"] = path_params
|
|
639
|
+
http_info["query_params"] = query_params
|
|
640
|
+
http_info["header_params"] = header_params
|
|
641
|
+
http_info["post_params"] = form_params
|
|
642
|
+
http_info["body"] = body
|
|
643
|
+
http_info["response_headers"] = response_headers
|
|
644
|
+
|
|
645
|
+
return http_info
|
|
646
|
+
|
|
647
|
+
def download_server_logs_async(self, request):
|
|
648
|
+
r"""下载日志文件
|
|
649
|
+
|
|
650
|
+
下载服务器日志文件。
|
|
651
|
+
|
|
652
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
:param request: Request instance for DownloadServerLogs
|
|
656
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.DownloadServerLogsRequest`
|
|
657
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.DownloadServerLogsResponse`
|
|
658
|
+
"""
|
|
659
|
+
http_info = self._download_server_logs_http_info(request)
|
|
660
|
+
return self._call_api(**http_info)
|
|
661
|
+
|
|
662
|
+
def download_server_logs_async_invoker(self, request):
|
|
663
|
+
http_info = self._download_server_logs_http_info(request)
|
|
664
|
+
return AsyncInvoker(self, http_info)
|
|
665
|
+
|
|
666
|
+
def _download_server_logs_http_info(self, request):
|
|
667
|
+
http_info = {
|
|
668
|
+
"method": "GET",
|
|
669
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/logs/exports/{export_id}/content",
|
|
670
|
+
"request_type": request.__class__.__name__,
|
|
671
|
+
"response_type": "DownloadServerLogsResponse"
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
675
|
+
|
|
676
|
+
cname = None
|
|
677
|
+
|
|
678
|
+
collection_formats = {}
|
|
679
|
+
|
|
680
|
+
path_params = {}
|
|
681
|
+
if 'id' in local_var_params:
|
|
682
|
+
path_params['id'] = local_var_params['id']
|
|
683
|
+
if 'export_id' in local_var_params:
|
|
684
|
+
path_params['export_id'] = local_var_params['export_id']
|
|
685
|
+
|
|
686
|
+
query_params = []
|
|
687
|
+
|
|
688
|
+
header_params = {}
|
|
689
|
+
|
|
690
|
+
form_params = {}
|
|
691
|
+
|
|
692
|
+
body = None
|
|
693
|
+
if isinstance(request, SdkStreamRequest):
|
|
694
|
+
body = request.get_file_stream()
|
|
695
|
+
|
|
696
|
+
response_headers = ["Content-Disposition", "Content-Transfer-Encoding", "Content-Type", ]
|
|
697
|
+
|
|
698
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
699
|
+
['application/json'])
|
|
700
|
+
|
|
701
|
+
auth_settings = []
|
|
702
|
+
|
|
703
|
+
http_info["cname"] = cname
|
|
704
|
+
http_info["collection_formats"] = collection_formats
|
|
705
|
+
http_info["path_params"] = path_params
|
|
706
|
+
http_info["query_params"] = query_params
|
|
707
|
+
http_info["header_params"] = header_params
|
|
708
|
+
http_info["post_params"] = form_params
|
|
709
|
+
http_info["body"] = body
|
|
710
|
+
http_info["response_headers"] = response_headers
|
|
711
|
+
|
|
712
|
+
return http_info
|
|
713
|
+
|
|
714
|
+
def export_server_logs_async(self, request):
|
|
715
|
+
r"""导出服务器日志请求
|
|
716
|
+
|
|
717
|
+
创建服务器日志导出异步任务。根据ShowLogsExportStatus查询status,当status状态为completed时,调用DownloadServerLogs下载日志文件。
|
|
718
|
+
|
|
719
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
:param request: Request instance for ExportServerLogs
|
|
723
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ExportServerLogsRequest`
|
|
724
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ExportServerLogsResponse`
|
|
725
|
+
"""
|
|
726
|
+
http_info = self._export_server_logs_http_info(request)
|
|
727
|
+
return self._call_api(**http_info)
|
|
728
|
+
|
|
729
|
+
def export_server_logs_async_invoker(self, request):
|
|
730
|
+
http_info = self._export_server_logs_http_info(request)
|
|
731
|
+
return AsyncInvoker(self, http_info)
|
|
732
|
+
|
|
733
|
+
def _export_server_logs_http_info(self, request):
|
|
734
|
+
http_info = {
|
|
735
|
+
"method": "POST",
|
|
736
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/logs/exports",
|
|
737
|
+
"request_type": request.__class__.__name__,
|
|
738
|
+
"response_type": "ExportServerLogsResponse"
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
742
|
+
|
|
743
|
+
cname = None
|
|
744
|
+
|
|
745
|
+
collection_formats = {}
|
|
746
|
+
|
|
747
|
+
path_params = {}
|
|
748
|
+
if 'id' in local_var_params:
|
|
749
|
+
path_params['id'] = local_var_params['id']
|
|
750
|
+
|
|
751
|
+
query_params = []
|
|
752
|
+
|
|
753
|
+
header_params = {}
|
|
754
|
+
|
|
755
|
+
form_params = {}
|
|
756
|
+
|
|
757
|
+
body = None
|
|
758
|
+
if isinstance(request, SdkStreamRequest):
|
|
759
|
+
body = request.get_file_stream()
|
|
760
|
+
|
|
761
|
+
response_headers = ["Content-Disposition", "Content-Transfer-Encoding", "Content-Type", ]
|
|
762
|
+
|
|
763
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
764
|
+
['application/json'])
|
|
765
|
+
|
|
766
|
+
auth_settings = []
|
|
767
|
+
|
|
768
|
+
http_info["cname"] = cname
|
|
769
|
+
http_info["collection_formats"] = collection_formats
|
|
770
|
+
http_info["path_params"] = path_params
|
|
771
|
+
http_info["query_params"] = query_params
|
|
772
|
+
http_info["header_params"] = header_params
|
|
773
|
+
http_info["post_params"] = form_params
|
|
774
|
+
http_info["body"] = body
|
|
775
|
+
http_info["response_headers"] = response_headers
|
|
776
|
+
|
|
777
|
+
return http_info
|
|
778
|
+
|
|
779
|
+
def list_alarms_async(self, request):
|
|
780
|
+
r"""服务器告警列表
|
|
781
|
+
|
|
782
|
+
该 API 用于查询服务器告警列表
|
|
783
|
+
|
|
784
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
:param request: Request instance for ListAlarms
|
|
788
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListAlarmsRequest`
|
|
789
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListAlarmsResponse`
|
|
790
|
+
"""
|
|
791
|
+
http_info = self._list_alarms_http_info(request)
|
|
792
|
+
return self._call_api(**http_info)
|
|
793
|
+
|
|
794
|
+
def list_alarms_async_invoker(self, request):
|
|
795
|
+
http_info = self._list_alarms_http_info(request)
|
|
796
|
+
return AsyncInvoker(self, http_info)
|
|
797
|
+
|
|
798
|
+
def _list_alarms_http_info(self, request):
|
|
799
|
+
http_info = {
|
|
800
|
+
"method": "GET",
|
|
801
|
+
"resource_path": "/v1/{project_id}/physicalservers/alarms",
|
|
802
|
+
"request_type": request.__class__.__name__,
|
|
803
|
+
"response_type": "ListAlarmsResponse"
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
807
|
+
|
|
808
|
+
cname = None
|
|
809
|
+
|
|
810
|
+
collection_formats = {}
|
|
811
|
+
|
|
812
|
+
path_params = {}
|
|
813
|
+
|
|
814
|
+
query_params = []
|
|
815
|
+
if 'alarm_record_id' in local_var_params:
|
|
816
|
+
query_params.append(('alarm_record_id', local_var_params['alarm_record_id']))
|
|
817
|
+
if 'alarm_status' in local_var_params:
|
|
818
|
+
query_params.append(('alarm_status', local_var_params['alarm_status']))
|
|
819
|
+
if 'alarm_type' in local_var_params:
|
|
820
|
+
query_params.append(('alarm_type', local_var_params['alarm_type']))
|
|
821
|
+
if 'resource_id' in local_var_params:
|
|
822
|
+
query_params.append(('resource_id', local_var_params['resource_id']))
|
|
823
|
+
if 'alarm_level' in local_var_params:
|
|
824
|
+
query_params.append(('alarm_level', local_var_params['alarm_level']))
|
|
825
|
+
if '_from' in local_var_params:
|
|
826
|
+
query_params.append(('from', local_var_params['_from']))
|
|
827
|
+
if 'to' in local_var_params:
|
|
828
|
+
query_params.append(('to', local_var_params['to']))
|
|
829
|
+
if 'offset' in local_var_params:
|
|
830
|
+
query_params.append(('offset', local_var_params['offset']))
|
|
831
|
+
if 'limit' in local_var_params:
|
|
832
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
833
|
+
|
|
834
|
+
header_params = {}
|
|
835
|
+
|
|
836
|
+
form_params = {}
|
|
837
|
+
|
|
838
|
+
body = None
|
|
839
|
+
if isinstance(request, SdkStreamRequest):
|
|
840
|
+
body = request.get_file_stream()
|
|
841
|
+
|
|
842
|
+
response_headers = []
|
|
843
|
+
|
|
844
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
845
|
+
['application/json'])
|
|
846
|
+
|
|
847
|
+
auth_settings = []
|
|
848
|
+
|
|
849
|
+
http_info["cname"] = cname
|
|
850
|
+
http_info["collection_formats"] = collection_formats
|
|
851
|
+
http_info["path_params"] = path_params
|
|
852
|
+
http_info["query_params"] = query_params
|
|
853
|
+
http_info["header_params"] = header_params
|
|
854
|
+
http_info["post_params"] = form_params
|
|
855
|
+
http_info["body"] = body
|
|
856
|
+
http_info["response_headers"] = response_headers
|
|
857
|
+
|
|
858
|
+
return http_info
|
|
859
|
+
|
|
860
|
+
def list_events_async(self, request):
|
|
861
|
+
r"""服务器事件列表
|
|
862
|
+
|
|
863
|
+
该 API 用于查询服务器事件列表
|
|
864
|
+
|
|
865
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
:param request: Request instance for ListEvents
|
|
869
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListEventsRequest`
|
|
870
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListEventsResponse`
|
|
871
|
+
"""
|
|
872
|
+
http_info = self._list_events_http_info(request)
|
|
873
|
+
return self._call_api(**http_info)
|
|
874
|
+
|
|
875
|
+
def list_events_async_invoker(self, request):
|
|
876
|
+
http_info = self._list_events_http_info(request)
|
|
877
|
+
return AsyncInvoker(self, http_info)
|
|
878
|
+
|
|
879
|
+
def _list_events_http_info(self, request):
|
|
880
|
+
http_info = {
|
|
881
|
+
"method": "GET",
|
|
882
|
+
"resource_path": "/v1/{project_id}/physicalservers/events",
|
|
883
|
+
"request_type": request.__class__.__name__,
|
|
884
|
+
"response_type": "ListEventsResponse"
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
888
|
+
|
|
889
|
+
cname = None
|
|
890
|
+
|
|
891
|
+
collection_formats = {}
|
|
892
|
+
|
|
893
|
+
path_params = {}
|
|
894
|
+
|
|
895
|
+
query_params = []
|
|
896
|
+
if 'offset' in local_var_params:
|
|
897
|
+
query_params.append(('offset', local_var_params['offset']))
|
|
898
|
+
if 'limit' in local_var_params:
|
|
899
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
900
|
+
if 'event_level' in local_var_params:
|
|
901
|
+
query_params.append(('event_level', local_var_params['event_level']))
|
|
902
|
+
if 'resource_id' in local_var_params:
|
|
903
|
+
query_params.append(('resource_id', local_var_params['resource_id']))
|
|
904
|
+
if '_from' in local_var_params:
|
|
905
|
+
query_params.append(('from', local_var_params['_from']))
|
|
906
|
+
if 'to' in local_var_params:
|
|
907
|
+
query_params.append(('to', local_var_params['to']))
|
|
908
|
+
|
|
909
|
+
header_params = {}
|
|
910
|
+
|
|
911
|
+
form_params = {}
|
|
912
|
+
|
|
913
|
+
body = None
|
|
914
|
+
if isinstance(request, SdkStreamRequest):
|
|
915
|
+
body = request.get_file_stream()
|
|
916
|
+
|
|
917
|
+
response_headers = []
|
|
918
|
+
|
|
919
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
920
|
+
['application/json'])
|
|
921
|
+
|
|
922
|
+
auth_settings = []
|
|
923
|
+
|
|
924
|
+
http_info["cname"] = cname
|
|
925
|
+
http_info["collection_formats"] = collection_formats
|
|
926
|
+
http_info["path_params"] = path_params
|
|
927
|
+
http_info["query_params"] = query_params
|
|
928
|
+
http_info["header_params"] = header_params
|
|
929
|
+
http_info["post_params"] = form_params
|
|
930
|
+
http_info["body"] = body
|
|
931
|
+
http_info["response_headers"] = response_headers
|
|
932
|
+
|
|
933
|
+
return http_info
|
|
934
|
+
|
|
935
|
+
def list_i_dcs_async(self, request):
|
|
936
|
+
r"""查询 IDC 列表
|
|
937
|
+
|
|
938
|
+
查询 IDC 列表
|
|
939
|
+
|
|
940
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
:param request: Request instance for ListIDcs
|
|
944
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListIDcsRequest`
|
|
945
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListIDcsResponse`
|
|
946
|
+
"""
|
|
947
|
+
http_info = self._list_i_dcs_http_info(request)
|
|
948
|
+
return self._call_api(**http_info)
|
|
949
|
+
|
|
950
|
+
def list_i_dcs_async_invoker(self, request):
|
|
951
|
+
http_info = self._list_i_dcs_http_info(request)
|
|
952
|
+
return AsyncInvoker(self, http_info)
|
|
953
|
+
|
|
954
|
+
def _list_i_dcs_http_info(self, request):
|
|
955
|
+
http_info = {
|
|
956
|
+
"method": "GET",
|
|
957
|
+
"resource_path": "/v1/{project_id}/idcs",
|
|
958
|
+
"request_type": request.__class__.__name__,
|
|
959
|
+
"response_type": "ListIDcsResponse"
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
963
|
+
|
|
964
|
+
cname = None
|
|
965
|
+
|
|
966
|
+
collection_formats = {}
|
|
967
|
+
|
|
968
|
+
path_params = {}
|
|
969
|
+
|
|
970
|
+
query_params = []
|
|
971
|
+
if 'region' in local_var_params:
|
|
972
|
+
query_params.append(('region', local_var_params['region']))
|
|
973
|
+
if 'limit' in local_var_params:
|
|
974
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
975
|
+
if 'order' in local_var_params:
|
|
976
|
+
query_params.append(('order', local_var_params['order']))
|
|
977
|
+
if 'marker' in local_var_params:
|
|
978
|
+
query_params.append(('marker', local_var_params['marker']))
|
|
979
|
+
|
|
980
|
+
header_params = {}
|
|
981
|
+
|
|
982
|
+
form_params = {}
|
|
983
|
+
|
|
984
|
+
body = None
|
|
985
|
+
if isinstance(request, SdkStreamRequest):
|
|
986
|
+
body = request.get_file_stream()
|
|
987
|
+
|
|
988
|
+
response_headers = []
|
|
989
|
+
|
|
990
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
991
|
+
['application/json'])
|
|
992
|
+
|
|
993
|
+
auth_settings = []
|
|
994
|
+
|
|
995
|
+
http_info["cname"] = cname
|
|
996
|
+
http_info["collection_formats"] = collection_formats
|
|
997
|
+
http_info["path_params"] = path_params
|
|
998
|
+
http_info["query_params"] = query_params
|
|
999
|
+
http_info["header_params"] = header_params
|
|
1000
|
+
http_info["post_params"] = form_params
|
|
1001
|
+
http_info["body"] = body
|
|
1002
|
+
http_info["response_headers"] = response_headers
|
|
1003
|
+
|
|
1004
|
+
return http_info
|
|
1005
|
+
|
|
1006
|
+
def list_i_rack_async(self, request):
|
|
1007
|
+
r"""查询 iRack 实例列表
|
|
1008
|
+
|
|
1009
|
+
用户下单后,用户上报iRack设备列表。该 API 可以查看 iRack 实例与关联imetal数量列表。
|
|
1010
|
+
|
|
1011
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
:param request: Request instance for ListIRack
|
|
1015
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListIRackRequest`
|
|
1016
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListIRackResponse`
|
|
1017
|
+
"""
|
|
1018
|
+
http_info = self._list_i_rack_http_info(request)
|
|
1019
|
+
return self._call_api(**http_info)
|
|
1020
|
+
|
|
1021
|
+
def list_i_rack_async_invoker(self, request):
|
|
1022
|
+
http_info = self._list_i_rack_http_info(request)
|
|
1023
|
+
return AsyncInvoker(self, http_info)
|
|
1024
|
+
|
|
1025
|
+
def _list_i_rack_http_info(self, request):
|
|
1026
|
+
http_info = {
|
|
1027
|
+
"method": "GET",
|
|
1028
|
+
"resource_path": "/v1/{project_id}/iracks",
|
|
1029
|
+
"request_type": request.__class__.__name__,
|
|
1030
|
+
"response_type": "ListIRackResponse"
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1034
|
+
|
|
1035
|
+
cname = None
|
|
1036
|
+
|
|
1037
|
+
collection_formats = {}
|
|
1038
|
+
|
|
1039
|
+
path_params = {}
|
|
1040
|
+
|
|
1041
|
+
query_params = []
|
|
1042
|
+
if 'region' in local_var_params:
|
|
1043
|
+
query_params.append(('region', local_var_params['region']))
|
|
1044
|
+
if 'marker' in local_var_params:
|
|
1045
|
+
query_params.append(('marker', local_var_params['marker']))
|
|
1046
|
+
if 'limit' in local_var_params:
|
|
1047
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
1048
|
+
if 'order' in local_var_params:
|
|
1049
|
+
query_params.append(('order', local_var_params['order']))
|
|
1050
|
+
|
|
1051
|
+
header_params = {}
|
|
1052
|
+
|
|
1053
|
+
form_params = {}
|
|
1054
|
+
|
|
1055
|
+
body = None
|
|
1056
|
+
if isinstance(request, SdkStreamRequest):
|
|
1057
|
+
body = request.get_file_stream()
|
|
1058
|
+
|
|
1059
|
+
response_headers = []
|
|
1060
|
+
|
|
1061
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1062
|
+
['application/json'])
|
|
1063
|
+
|
|
1064
|
+
auth_settings = []
|
|
1065
|
+
|
|
1066
|
+
http_info["cname"] = cname
|
|
1067
|
+
http_info["collection_formats"] = collection_formats
|
|
1068
|
+
http_info["path_params"] = path_params
|
|
1069
|
+
http_info["query_params"] = query_params
|
|
1070
|
+
http_info["header_params"] = header_params
|
|
1071
|
+
http_info["post_params"] = form_params
|
|
1072
|
+
http_info["body"] = body
|
|
1073
|
+
http_info["response_headers"] = response_headers
|
|
1074
|
+
|
|
1075
|
+
return http_info
|
|
1076
|
+
|
|
1077
|
+
def list_instances_async(self, request):
|
|
1078
|
+
r"""批量查询实例
|
|
1079
|
+
|
|
1080
|
+
批量查询实例
|
|
1081
|
+
|
|
1082
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
:param request: Request instance for ListInstances
|
|
1086
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListInstancesRequest`
|
|
1087
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListInstancesResponse`
|
|
1088
|
+
"""
|
|
1089
|
+
http_info = self._list_instances_http_info(request)
|
|
1090
|
+
return self._call_api(**http_info)
|
|
1091
|
+
|
|
1092
|
+
def list_instances_async_invoker(self, request):
|
|
1093
|
+
http_info = self._list_instances_http_info(request)
|
|
1094
|
+
return AsyncInvoker(self, http_info)
|
|
1095
|
+
|
|
1096
|
+
def _list_instances_http_info(self, request):
|
|
1097
|
+
http_info = {
|
|
1098
|
+
"method": "GET",
|
|
1099
|
+
"resource_path": "/v1/{project_id}/instances",
|
|
1100
|
+
"request_type": request.__class__.__name__,
|
|
1101
|
+
"response_type": "ListInstancesResponse"
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1105
|
+
|
|
1106
|
+
cname = None
|
|
1107
|
+
|
|
1108
|
+
collection_formats = {}
|
|
1109
|
+
|
|
1110
|
+
path_params = {}
|
|
1111
|
+
|
|
1112
|
+
query_params = []
|
|
1113
|
+
if 'limit' in local_var_params:
|
|
1114
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
1115
|
+
if 'marker' in local_var_params:
|
|
1116
|
+
query_params.append(('marker', local_var_params['marker']))
|
|
1117
|
+
if 'instance_state' in local_var_params:
|
|
1118
|
+
query_params.append(('instance_state', local_var_params['instance_state']))
|
|
1119
|
+
if 'instance_id' in local_var_params:
|
|
1120
|
+
query_params.append(('instance_id', local_var_params['instance_id']))
|
|
1121
|
+
if 'server_id' in local_var_params:
|
|
1122
|
+
query_params.append(('server_id', local_var_params['server_id']))
|
|
1123
|
+
|
|
1124
|
+
header_params = {}
|
|
1125
|
+
|
|
1126
|
+
form_params = {}
|
|
1127
|
+
|
|
1128
|
+
body = None
|
|
1129
|
+
if isinstance(request, SdkStreamRequest):
|
|
1130
|
+
body = request.get_file_stream()
|
|
1131
|
+
|
|
1132
|
+
response_headers = []
|
|
1133
|
+
|
|
1134
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1135
|
+
['application/json'])
|
|
1136
|
+
|
|
1137
|
+
auth_settings = []
|
|
1138
|
+
|
|
1139
|
+
http_info["cname"] = cname
|
|
1140
|
+
http_info["collection_formats"] = collection_formats
|
|
1141
|
+
http_info["path_params"] = path_params
|
|
1142
|
+
http_info["query_params"] = query_params
|
|
1143
|
+
http_info["header_params"] = header_params
|
|
1144
|
+
http_info["post_params"] = form_params
|
|
1145
|
+
http_info["body"] = body
|
|
1146
|
+
http_info["response_headers"] = response_headers
|
|
1147
|
+
|
|
1148
|
+
return http_info
|
|
1149
|
+
|
|
1150
|
+
def list_servers_async(self, request):
|
|
1151
|
+
r"""批量查询物理服务器
|
|
1152
|
+
|
|
1153
|
+
List imetal servers
|
|
1154
|
+
|
|
1155
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
:param request: Request instance for ListServers
|
|
1159
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ListServersRequest`
|
|
1160
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ListServersResponse`
|
|
1161
|
+
"""
|
|
1162
|
+
http_info = self._list_servers_http_info(request)
|
|
1163
|
+
return self._call_api(**http_info)
|
|
1164
|
+
|
|
1165
|
+
def list_servers_async_invoker(self, request):
|
|
1166
|
+
http_info = self._list_servers_http_info(request)
|
|
1167
|
+
return AsyncInvoker(self, http_info)
|
|
1168
|
+
|
|
1169
|
+
def _list_servers_http_info(self, request):
|
|
1170
|
+
http_info = {
|
|
1171
|
+
"method": "GET",
|
|
1172
|
+
"resource_path": "/v1/{project_id}/physicalservers",
|
|
1173
|
+
"request_type": request.__class__.__name__,
|
|
1174
|
+
"response_type": "ListServersResponse"
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1178
|
+
|
|
1179
|
+
cname = None
|
|
1180
|
+
|
|
1181
|
+
collection_formats = {}
|
|
1182
|
+
|
|
1183
|
+
path_params = {}
|
|
1184
|
+
|
|
1185
|
+
query_params = []
|
|
1186
|
+
if 'manage_state' in local_var_params:
|
|
1187
|
+
query_params.append(('manage_state', local_var_params['manage_state']))
|
|
1188
|
+
if 'marker' in local_var_params:
|
|
1189
|
+
query_params.append(('marker', local_var_params['marker']))
|
|
1190
|
+
if 'limit' in local_var_params:
|
|
1191
|
+
query_params.append(('limit', local_var_params['limit']))
|
|
1192
|
+
|
|
1193
|
+
header_params = {}
|
|
1194
|
+
|
|
1195
|
+
form_params = {}
|
|
1196
|
+
|
|
1197
|
+
body = None
|
|
1198
|
+
if isinstance(request, SdkStreamRequest):
|
|
1199
|
+
body = request.get_file_stream()
|
|
1200
|
+
|
|
1201
|
+
response_headers = []
|
|
1202
|
+
|
|
1203
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1204
|
+
['application/json'])
|
|
1205
|
+
|
|
1206
|
+
auth_settings = []
|
|
1207
|
+
|
|
1208
|
+
http_info["cname"] = cname
|
|
1209
|
+
http_info["collection_formats"] = collection_formats
|
|
1210
|
+
http_info["path_params"] = path_params
|
|
1211
|
+
http_info["query_params"] = query_params
|
|
1212
|
+
http_info["header_params"] = header_params
|
|
1213
|
+
http_info["post_params"] = form_params
|
|
1214
|
+
http_info["body"] = body
|
|
1215
|
+
http_info["response_headers"] = response_headers
|
|
1216
|
+
|
|
1217
|
+
return http_info
|
|
1218
|
+
|
|
1219
|
+
def modify_instance_ip_async(self, request):
|
|
1220
|
+
r"""修改实例ip
|
|
1221
|
+
|
|
1222
|
+
用户可选择指定的 iMetal 实例,修改ip。
|
|
1223
|
+
|
|
1224
|
+
接口约束:iMetal 实例处于就绪状态(已调测成功)或修改ip失败同时为下电状态。
|
|
1225
|
+
|
|
1226
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
:param request: Request instance for ModifyInstanceIp
|
|
1230
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequest`
|
|
1231
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpResponse`
|
|
1232
|
+
"""
|
|
1233
|
+
http_info = self._modify_instance_ip_http_info(request)
|
|
1234
|
+
return self._call_api(**http_info)
|
|
1235
|
+
|
|
1236
|
+
def modify_instance_ip_async_invoker(self, request):
|
|
1237
|
+
http_info = self._modify_instance_ip_http_info(request)
|
|
1238
|
+
return AsyncInvoker(self, http_info)
|
|
1239
|
+
|
|
1240
|
+
def _modify_instance_ip_http_info(self, request):
|
|
1241
|
+
http_info = {
|
|
1242
|
+
"method": "PUT",
|
|
1243
|
+
"resource_path": "/v1/{project_id}/instances/{id}/ip",
|
|
1244
|
+
"request_type": request.__class__.__name__,
|
|
1245
|
+
"response_type": "ModifyInstanceIpResponse"
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1249
|
+
|
|
1250
|
+
cname = None
|
|
1251
|
+
|
|
1252
|
+
collection_formats = {}
|
|
1253
|
+
|
|
1254
|
+
path_params = {}
|
|
1255
|
+
if 'id' in local_var_params:
|
|
1256
|
+
path_params['id'] = local_var_params['id']
|
|
1257
|
+
|
|
1258
|
+
query_params = []
|
|
1259
|
+
|
|
1260
|
+
header_params = {}
|
|
1261
|
+
|
|
1262
|
+
form_params = {}
|
|
1263
|
+
|
|
1264
|
+
body = None
|
|
1265
|
+
if 'body' in local_var_params:
|
|
1266
|
+
body = local_var_params['body']
|
|
1267
|
+
if isinstance(request, SdkStreamRequest):
|
|
1268
|
+
body = request.get_file_stream()
|
|
1269
|
+
|
|
1270
|
+
response_headers = []
|
|
1271
|
+
|
|
1272
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1273
|
+
['application/json;charset=UTF-8'])
|
|
1274
|
+
|
|
1275
|
+
auth_settings = []
|
|
1276
|
+
|
|
1277
|
+
http_info["cname"] = cname
|
|
1278
|
+
http_info["collection_formats"] = collection_formats
|
|
1279
|
+
http_info["path_params"] = path_params
|
|
1280
|
+
http_info["query_params"] = query_params
|
|
1281
|
+
http_info["header_params"] = header_params
|
|
1282
|
+
http_info["post_params"] = form_params
|
|
1283
|
+
http_info["body"] = body
|
|
1284
|
+
http_info["response_headers"] = response_headers
|
|
1285
|
+
|
|
1286
|
+
return http_info
|
|
1287
|
+
|
|
1288
|
+
def reinstall_os_async(self, request):
|
|
1289
|
+
r"""批量重新安装OS
|
|
1290
|
+
|
|
1291
|
+
指定新OS镜像重新安装OS,此接口为异步接口,通过 **ShowInstanceStatus** 查询实例状态,当状态变为 **pending** 表明正在重装中,状态为 **running** 表明完成重装。
|
|
1292
|
+
前提条件:Instance state为running
|
|
1293
|
+
|
|
1294
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
:param request: Request instance for ReinstallOs
|
|
1298
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ReinstallOsRequest`
|
|
1299
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ReinstallOsResponse`
|
|
1300
|
+
"""
|
|
1301
|
+
http_info = self._reinstall_os_http_info(request)
|
|
1302
|
+
return self._call_api(**http_info)
|
|
1303
|
+
|
|
1304
|
+
def reinstall_os_async_invoker(self, request):
|
|
1305
|
+
http_info = self._reinstall_os_http_info(request)
|
|
1306
|
+
return AsyncInvoker(self, http_info)
|
|
1307
|
+
|
|
1308
|
+
def _reinstall_os_http_info(self, request):
|
|
1309
|
+
http_info = {
|
|
1310
|
+
"method": "PUT",
|
|
1311
|
+
"resource_path": "/v1/{project_id}/instances/reinstall",
|
|
1312
|
+
"request_type": request.__class__.__name__,
|
|
1313
|
+
"response_type": "ReinstallOsResponse"
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1317
|
+
|
|
1318
|
+
cname = None
|
|
1319
|
+
|
|
1320
|
+
collection_formats = {}
|
|
1321
|
+
|
|
1322
|
+
path_params = {}
|
|
1323
|
+
|
|
1324
|
+
query_params = []
|
|
1325
|
+
|
|
1326
|
+
header_params = {}
|
|
1327
|
+
|
|
1328
|
+
form_params = {}
|
|
1329
|
+
|
|
1330
|
+
body = None
|
|
1331
|
+
if 'body' in local_var_params:
|
|
1332
|
+
body = local_var_params['body']
|
|
1333
|
+
if isinstance(request, SdkStreamRequest):
|
|
1334
|
+
body = request.get_file_stream()
|
|
1335
|
+
|
|
1336
|
+
response_headers = []
|
|
1337
|
+
|
|
1338
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1339
|
+
['application/json;charset=UTF-8'])
|
|
1340
|
+
|
|
1341
|
+
auth_settings = []
|
|
1342
|
+
|
|
1343
|
+
http_info["cname"] = cname
|
|
1344
|
+
http_info["collection_formats"] = collection_formats
|
|
1345
|
+
http_info["path_params"] = path_params
|
|
1346
|
+
http_info["query_params"] = query_params
|
|
1347
|
+
http_info["header_params"] = header_params
|
|
1348
|
+
http_info["post_params"] = form_params
|
|
1349
|
+
http_info["body"] = body
|
|
1350
|
+
http_info["response_headers"] = response_headers
|
|
1351
|
+
|
|
1352
|
+
return http_info
|
|
1353
|
+
|
|
1354
|
+
def run_instances_async(self, request):
|
|
1355
|
+
r"""批量创建实例
|
|
1356
|
+
|
|
1357
|
+
批量创建实例,其中调度策略支持:
|
|
1358
|
+
1、指定服务器
|
|
1359
|
+
2、基于空闲随机调度策略
|
|
1360
|
+
|
|
1361
|
+
支持VPC网络及AI参数面网络配置。
|
|
1362
|
+
|
|
1363
|
+
此接口为异步接口,实例的创建和启动不是立即完成的,通过接口 **ShowInstanceStatus** 查询实例状态为 **running** 代表实例创建成功。
|
|
1364
|
+
接口约束:服务器**manage_state**为 **ready**
|
|
1365
|
+
|
|
1366
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
:param request: Request instance for RunInstances
|
|
1370
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.RunInstancesRequest`
|
|
1371
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.RunInstancesResponse`
|
|
1372
|
+
"""
|
|
1373
|
+
http_info = self._run_instances_http_info(request)
|
|
1374
|
+
return self._call_api(**http_info)
|
|
1375
|
+
|
|
1376
|
+
def run_instances_async_invoker(self, request):
|
|
1377
|
+
http_info = self._run_instances_http_info(request)
|
|
1378
|
+
return AsyncInvoker(self, http_info)
|
|
1379
|
+
|
|
1380
|
+
def _run_instances_http_info(self, request):
|
|
1381
|
+
http_info = {
|
|
1382
|
+
"method": "POST",
|
|
1383
|
+
"resource_path": "/v1/{project_id}/instances/batch-create",
|
|
1384
|
+
"request_type": request.__class__.__name__,
|
|
1385
|
+
"response_type": "RunInstancesResponse"
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1389
|
+
|
|
1390
|
+
cname = None
|
|
1391
|
+
|
|
1392
|
+
collection_formats = {}
|
|
1393
|
+
|
|
1394
|
+
path_params = {}
|
|
1395
|
+
|
|
1396
|
+
query_params = []
|
|
1397
|
+
|
|
1398
|
+
header_params = {}
|
|
1399
|
+
|
|
1400
|
+
form_params = {}
|
|
1401
|
+
|
|
1402
|
+
body = None
|
|
1403
|
+
if 'body' in local_var_params:
|
|
1404
|
+
body = local_var_params['body']
|
|
1405
|
+
if isinstance(request, SdkStreamRequest):
|
|
1406
|
+
body = request.get_file_stream()
|
|
1407
|
+
|
|
1408
|
+
response_headers = []
|
|
1409
|
+
|
|
1410
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1411
|
+
['application/json;charset=UTF-8'])
|
|
1412
|
+
|
|
1413
|
+
auth_settings = []
|
|
1414
|
+
|
|
1415
|
+
http_info["cname"] = cname
|
|
1416
|
+
http_info["collection_formats"] = collection_formats
|
|
1417
|
+
http_info["path_params"] = path_params
|
|
1418
|
+
http_info["query_params"] = query_params
|
|
1419
|
+
http_info["header_params"] = header_params
|
|
1420
|
+
http_info["post_params"] = form_params
|
|
1421
|
+
http_info["body"] = body
|
|
1422
|
+
http_info["response_headers"] = response_headers
|
|
1423
|
+
|
|
1424
|
+
return http_info
|
|
1425
|
+
|
|
1426
|
+
def show_alarm_summary_async(self, request):
|
|
1427
|
+
r"""服务器告警概览
|
|
1428
|
+
|
|
1429
|
+
该 API 用于查询服务器告警概览
|
|
1430
|
+
|
|
1431
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
:param request: Request instance for ShowAlarmSummary
|
|
1435
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowAlarmSummaryRequest`
|
|
1436
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowAlarmSummaryResponse`
|
|
1437
|
+
"""
|
|
1438
|
+
http_info = self._show_alarm_summary_http_info(request)
|
|
1439
|
+
return self._call_api(**http_info)
|
|
1440
|
+
|
|
1441
|
+
def show_alarm_summary_async_invoker(self, request):
|
|
1442
|
+
http_info = self._show_alarm_summary_http_info(request)
|
|
1443
|
+
return AsyncInvoker(self, http_info)
|
|
1444
|
+
|
|
1445
|
+
def _show_alarm_summary_http_info(self, request):
|
|
1446
|
+
http_info = {
|
|
1447
|
+
"method": "GET",
|
|
1448
|
+
"resource_path": "/v1/{project_id}/physicalservers/alarms/summary",
|
|
1449
|
+
"request_type": request.__class__.__name__,
|
|
1450
|
+
"response_type": "ShowAlarmSummaryResponse"
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1454
|
+
|
|
1455
|
+
cname = None
|
|
1456
|
+
|
|
1457
|
+
collection_formats = {}
|
|
1458
|
+
|
|
1459
|
+
path_params = {}
|
|
1460
|
+
|
|
1461
|
+
query_params = []
|
|
1462
|
+
|
|
1463
|
+
header_params = {}
|
|
1464
|
+
|
|
1465
|
+
form_params = {}
|
|
1466
|
+
|
|
1467
|
+
body = None
|
|
1468
|
+
if isinstance(request, SdkStreamRequest):
|
|
1469
|
+
body = request.get_file_stream()
|
|
1470
|
+
|
|
1471
|
+
response_headers = []
|
|
1472
|
+
|
|
1473
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1474
|
+
['application/json'])
|
|
1475
|
+
|
|
1476
|
+
auth_settings = []
|
|
1477
|
+
|
|
1478
|
+
http_info["cname"] = cname
|
|
1479
|
+
http_info["collection_formats"] = collection_formats
|
|
1480
|
+
http_info["path_params"] = path_params
|
|
1481
|
+
http_info["query_params"] = query_params
|
|
1482
|
+
http_info["header_params"] = header_params
|
|
1483
|
+
http_info["post_params"] = form_params
|
|
1484
|
+
http_info["body"] = body
|
|
1485
|
+
http_info["response_headers"] = response_headers
|
|
1486
|
+
|
|
1487
|
+
return http_info
|
|
1488
|
+
|
|
1489
|
+
def show_alarm_trend_async(self, request):
|
|
1490
|
+
r"""服务器告警趋势
|
|
1491
|
+
|
|
1492
|
+
该 API 用于查询服务器概览、服务器开机状态和服务器运行状态
|
|
1493
|
+
|
|
1494
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
:param request: Request instance for ShowAlarmTrend
|
|
1498
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowAlarmTrendRequest`
|
|
1499
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowAlarmTrendResponse`
|
|
1500
|
+
"""
|
|
1501
|
+
http_info = self._show_alarm_trend_http_info(request)
|
|
1502
|
+
return self._call_api(**http_info)
|
|
1503
|
+
|
|
1504
|
+
def show_alarm_trend_async_invoker(self, request):
|
|
1505
|
+
http_info = self._show_alarm_trend_http_info(request)
|
|
1506
|
+
return AsyncInvoker(self, http_info)
|
|
1507
|
+
|
|
1508
|
+
def _show_alarm_trend_http_info(self, request):
|
|
1509
|
+
http_info = {
|
|
1510
|
+
"method": "GET",
|
|
1511
|
+
"resource_path": "/v1/{project_id}/physicalservers/alarms/trend",
|
|
1512
|
+
"request_type": request.__class__.__name__,
|
|
1513
|
+
"response_type": "ShowAlarmTrendResponse"
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1517
|
+
|
|
1518
|
+
cname = None
|
|
1519
|
+
|
|
1520
|
+
collection_formats = {}
|
|
1521
|
+
|
|
1522
|
+
path_params = {}
|
|
1523
|
+
|
|
1524
|
+
query_params = []
|
|
1525
|
+
if '_from' in local_var_params:
|
|
1526
|
+
query_params.append(('from', local_var_params['_from']))
|
|
1527
|
+
if 'to' in local_var_params:
|
|
1528
|
+
query_params.append(('to', local_var_params['to']))
|
|
1529
|
+
|
|
1530
|
+
header_params = {}
|
|
1531
|
+
|
|
1532
|
+
form_params = {}
|
|
1533
|
+
|
|
1534
|
+
body = None
|
|
1535
|
+
if isinstance(request, SdkStreamRequest):
|
|
1536
|
+
body = request.get_file_stream()
|
|
1537
|
+
|
|
1538
|
+
response_headers = []
|
|
1539
|
+
|
|
1540
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1541
|
+
['application/json'])
|
|
1542
|
+
|
|
1543
|
+
auth_settings = []
|
|
1544
|
+
|
|
1545
|
+
http_info["cname"] = cname
|
|
1546
|
+
http_info["collection_formats"] = collection_formats
|
|
1547
|
+
http_info["path_params"] = path_params
|
|
1548
|
+
http_info["query_params"] = query_params
|
|
1549
|
+
http_info["header_params"] = header_params
|
|
1550
|
+
http_info["post_params"] = form_params
|
|
1551
|
+
http_info["body"] = body
|
|
1552
|
+
http_info["response_headers"] = response_headers
|
|
1553
|
+
|
|
1554
|
+
return http_info
|
|
1555
|
+
|
|
1556
|
+
def show_event_async(self, request):
|
|
1557
|
+
r"""查询事件定义
|
|
1558
|
+
|
|
1559
|
+
查询事件定义
|
|
1560
|
+
|
|
1561
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
:param request: Request instance for ShowEvent
|
|
1565
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowEventRequest`
|
|
1566
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowEventResponse`
|
|
1567
|
+
"""
|
|
1568
|
+
http_info = self._show_event_http_info(request)
|
|
1569
|
+
return self._call_api(**http_info)
|
|
1570
|
+
|
|
1571
|
+
def show_event_async_invoker(self, request):
|
|
1572
|
+
http_info = self._show_event_http_info(request)
|
|
1573
|
+
return AsyncInvoker(self, http_info)
|
|
1574
|
+
|
|
1575
|
+
def _show_event_http_info(self, request):
|
|
1576
|
+
http_info = {
|
|
1577
|
+
"method": "GET",
|
|
1578
|
+
"resource_path": "/v1/{project_id}/physicalservers/events/{event_id}",
|
|
1579
|
+
"request_type": request.__class__.__name__,
|
|
1580
|
+
"response_type": "ShowEventResponse"
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1584
|
+
|
|
1585
|
+
cname = None
|
|
1586
|
+
|
|
1587
|
+
collection_formats = {}
|
|
1588
|
+
|
|
1589
|
+
path_params = {}
|
|
1590
|
+
if 'event_id' in local_var_params:
|
|
1591
|
+
path_params['event_id'] = local_var_params['event_id']
|
|
1592
|
+
|
|
1593
|
+
query_params = []
|
|
1594
|
+
|
|
1595
|
+
header_params = {}
|
|
1596
|
+
|
|
1597
|
+
form_params = {}
|
|
1598
|
+
|
|
1599
|
+
body = None
|
|
1600
|
+
if isinstance(request, SdkStreamRequest):
|
|
1601
|
+
body = request.get_file_stream()
|
|
1602
|
+
|
|
1603
|
+
response_headers = []
|
|
1604
|
+
|
|
1605
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1606
|
+
['application/json'])
|
|
1607
|
+
|
|
1608
|
+
auth_settings = []
|
|
1609
|
+
|
|
1610
|
+
http_info["cname"] = cname
|
|
1611
|
+
http_info["collection_formats"] = collection_formats
|
|
1612
|
+
http_info["path_params"] = path_params
|
|
1613
|
+
http_info["query_params"] = query_params
|
|
1614
|
+
http_info["header_params"] = header_params
|
|
1615
|
+
http_info["post_params"] = form_params
|
|
1616
|
+
http_info["body"] = body
|
|
1617
|
+
http_info["response_headers"] = response_headers
|
|
1618
|
+
|
|
1619
|
+
return http_info
|
|
1620
|
+
|
|
1621
|
+
def show_instance_status_async(self, request):
|
|
1622
|
+
r"""查询实例状态
|
|
1623
|
+
|
|
1624
|
+
查询实例状态
|
|
1625
|
+
|
|
1626
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
:param request: Request instance for ShowInstanceStatus
|
|
1630
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowInstanceStatusRequest`
|
|
1631
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowInstanceStatusResponse`
|
|
1632
|
+
"""
|
|
1633
|
+
http_info = self._show_instance_status_http_info(request)
|
|
1634
|
+
return self._call_api(**http_info)
|
|
1635
|
+
|
|
1636
|
+
def show_instance_status_async_invoker(self, request):
|
|
1637
|
+
http_info = self._show_instance_status_http_info(request)
|
|
1638
|
+
return AsyncInvoker(self, http_info)
|
|
1639
|
+
|
|
1640
|
+
def _show_instance_status_http_info(self, request):
|
|
1641
|
+
http_info = {
|
|
1642
|
+
"method": "GET",
|
|
1643
|
+
"resource_path": "/v1/{project_id}/instances/{id}/status",
|
|
1644
|
+
"request_type": request.__class__.__name__,
|
|
1645
|
+
"response_type": "ShowInstanceStatusResponse"
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1649
|
+
|
|
1650
|
+
cname = None
|
|
1651
|
+
|
|
1652
|
+
collection_formats = {}
|
|
1653
|
+
|
|
1654
|
+
path_params = {}
|
|
1655
|
+
if 'id' in local_var_params:
|
|
1656
|
+
path_params['id'] = local_var_params['id']
|
|
1657
|
+
|
|
1658
|
+
query_params = []
|
|
1659
|
+
|
|
1660
|
+
header_params = {}
|
|
1661
|
+
|
|
1662
|
+
form_params = {}
|
|
1663
|
+
|
|
1664
|
+
body = None
|
|
1665
|
+
if isinstance(request, SdkStreamRequest):
|
|
1666
|
+
body = request.get_file_stream()
|
|
1667
|
+
|
|
1668
|
+
response_headers = []
|
|
1669
|
+
|
|
1670
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1671
|
+
['application/json'])
|
|
1672
|
+
|
|
1673
|
+
auth_settings = []
|
|
1674
|
+
|
|
1675
|
+
http_info["cname"] = cname
|
|
1676
|
+
http_info["collection_formats"] = collection_formats
|
|
1677
|
+
http_info["path_params"] = path_params
|
|
1678
|
+
http_info["query_params"] = query_params
|
|
1679
|
+
http_info["header_params"] = header_params
|
|
1680
|
+
http_info["post_params"] = form_params
|
|
1681
|
+
http_info["body"] = body
|
|
1682
|
+
http_info["response_headers"] = response_headers
|
|
1683
|
+
|
|
1684
|
+
return http_info
|
|
1685
|
+
|
|
1686
|
+
def show_logs_export_status_async(self, request):
|
|
1687
|
+
r"""查询日志导出状态
|
|
1688
|
+
|
|
1689
|
+
查询日志采集状态及进度。
|
|
1690
|
+
|
|
1691
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
:param request: Request instance for ShowLogsExportStatus
|
|
1695
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowLogsExportStatusRequest`
|
|
1696
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowLogsExportStatusResponse`
|
|
1697
|
+
"""
|
|
1698
|
+
http_info = self._show_logs_export_status_http_info(request)
|
|
1699
|
+
return self._call_api(**http_info)
|
|
1700
|
+
|
|
1701
|
+
def show_logs_export_status_async_invoker(self, request):
|
|
1702
|
+
http_info = self._show_logs_export_status_http_info(request)
|
|
1703
|
+
return AsyncInvoker(self, http_info)
|
|
1704
|
+
|
|
1705
|
+
def _show_logs_export_status_http_info(self, request):
|
|
1706
|
+
http_info = {
|
|
1707
|
+
"method": "GET",
|
|
1708
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/logs/exports/{export_id}",
|
|
1709
|
+
"request_type": request.__class__.__name__,
|
|
1710
|
+
"response_type": "ShowLogsExportStatusResponse"
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1714
|
+
|
|
1715
|
+
cname = None
|
|
1716
|
+
|
|
1717
|
+
collection_formats = {}
|
|
1718
|
+
|
|
1719
|
+
path_params = {}
|
|
1720
|
+
if 'id' in local_var_params:
|
|
1721
|
+
path_params['id'] = local_var_params['id']
|
|
1722
|
+
if 'export_id' in local_var_params:
|
|
1723
|
+
path_params['export_id'] = local_var_params['export_id']
|
|
1724
|
+
|
|
1725
|
+
query_params = []
|
|
1726
|
+
|
|
1727
|
+
header_params = {}
|
|
1728
|
+
|
|
1729
|
+
form_params = {}
|
|
1730
|
+
|
|
1731
|
+
body = None
|
|
1732
|
+
if isinstance(request, SdkStreamRequest):
|
|
1733
|
+
body = request.get_file_stream()
|
|
1734
|
+
|
|
1735
|
+
response_headers = []
|
|
1736
|
+
|
|
1737
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1738
|
+
['application/json'])
|
|
1739
|
+
|
|
1740
|
+
auth_settings = []
|
|
1741
|
+
|
|
1742
|
+
http_info["cname"] = cname
|
|
1743
|
+
http_info["collection_formats"] = collection_formats
|
|
1744
|
+
http_info["path_params"] = path_params
|
|
1745
|
+
http_info["query_params"] = query_params
|
|
1746
|
+
http_info["header_params"] = header_params
|
|
1747
|
+
http_info["post_params"] = form_params
|
|
1748
|
+
http_info["body"] = body
|
|
1749
|
+
http_info["response_headers"] = response_headers
|
|
1750
|
+
|
|
1751
|
+
return http_info
|
|
1752
|
+
|
|
1753
|
+
def show_remote_console_async(self, request):
|
|
1754
|
+
r"""获取console地址信息
|
|
1755
|
+
|
|
1756
|
+
获取console信息
|
|
1757
|
+
|
|
1758
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
:param request: Request instance for ShowRemoteConsole
|
|
1762
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowRemoteConsoleRequest`
|
|
1763
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowRemoteConsoleResponse`
|
|
1764
|
+
"""
|
|
1765
|
+
http_info = self._show_remote_console_http_info(request)
|
|
1766
|
+
return self._call_api(**http_info)
|
|
1767
|
+
|
|
1768
|
+
def show_remote_console_async_invoker(self, request):
|
|
1769
|
+
http_info = self._show_remote_console_http_info(request)
|
|
1770
|
+
return AsyncInvoker(self, http_info)
|
|
1771
|
+
|
|
1772
|
+
def _show_remote_console_http_info(self, request):
|
|
1773
|
+
http_info = {
|
|
1774
|
+
"method": "GET",
|
|
1775
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/remote-console-address",
|
|
1776
|
+
"request_type": request.__class__.__name__,
|
|
1777
|
+
"response_type": "ShowRemoteConsoleResponse"
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1781
|
+
|
|
1782
|
+
cname = None
|
|
1783
|
+
|
|
1784
|
+
collection_formats = {}
|
|
1785
|
+
|
|
1786
|
+
path_params = {}
|
|
1787
|
+
if 'id' in local_var_params:
|
|
1788
|
+
path_params['id'] = local_var_params['id']
|
|
1789
|
+
|
|
1790
|
+
query_params = []
|
|
1791
|
+
|
|
1792
|
+
header_params = {}
|
|
1793
|
+
|
|
1794
|
+
form_params = {}
|
|
1795
|
+
|
|
1796
|
+
body = None
|
|
1797
|
+
if isinstance(request, SdkStreamRequest):
|
|
1798
|
+
body = request.get_file_stream()
|
|
1799
|
+
|
|
1800
|
+
response_headers = []
|
|
1801
|
+
|
|
1802
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1803
|
+
['application/json'])
|
|
1804
|
+
|
|
1805
|
+
auth_settings = []
|
|
1806
|
+
|
|
1807
|
+
http_info["cname"] = cname
|
|
1808
|
+
http_info["collection_formats"] = collection_formats
|
|
1809
|
+
http_info["path_params"] = path_params
|
|
1810
|
+
http_info["query_params"] = query_params
|
|
1811
|
+
http_info["header_params"] = header_params
|
|
1812
|
+
http_info["post_params"] = form_params
|
|
1813
|
+
http_info["body"] = body
|
|
1814
|
+
http_info["response_headers"] = response_headers
|
|
1815
|
+
|
|
1816
|
+
return http_info
|
|
1817
|
+
|
|
1818
|
+
def show_server_async(self, request):
|
|
1819
|
+
r"""查询物理服务器信息
|
|
1820
|
+
|
|
1821
|
+
Get imetal server by id
|
|
1822
|
+
|
|
1823
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
:param request: Request instance for ShowServer
|
|
1827
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowServerRequest`
|
|
1828
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowServerResponse`
|
|
1829
|
+
"""
|
|
1830
|
+
http_info = self._show_server_http_info(request)
|
|
1831
|
+
return self._call_api(**http_info)
|
|
1832
|
+
|
|
1833
|
+
def show_server_async_invoker(self, request):
|
|
1834
|
+
http_info = self._show_server_http_info(request)
|
|
1835
|
+
return AsyncInvoker(self, http_info)
|
|
1836
|
+
|
|
1837
|
+
def _show_server_http_info(self, request):
|
|
1838
|
+
http_info = {
|
|
1839
|
+
"method": "GET",
|
|
1840
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}",
|
|
1841
|
+
"request_type": request.__class__.__name__,
|
|
1842
|
+
"response_type": "ShowServerResponse"
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1846
|
+
|
|
1847
|
+
cname = None
|
|
1848
|
+
|
|
1849
|
+
collection_formats = {}
|
|
1850
|
+
|
|
1851
|
+
path_params = {}
|
|
1852
|
+
if 'id' in local_var_params:
|
|
1853
|
+
path_params['id'] = local_var_params['id']
|
|
1854
|
+
|
|
1855
|
+
query_params = []
|
|
1856
|
+
|
|
1857
|
+
header_params = {}
|
|
1858
|
+
|
|
1859
|
+
form_params = {}
|
|
1860
|
+
|
|
1861
|
+
body = None
|
|
1862
|
+
if isinstance(request, SdkStreamRequest):
|
|
1863
|
+
body = request.get_file_stream()
|
|
1864
|
+
|
|
1865
|
+
response_headers = []
|
|
1866
|
+
|
|
1867
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1868
|
+
['application/json'])
|
|
1869
|
+
|
|
1870
|
+
auth_settings = []
|
|
1871
|
+
|
|
1872
|
+
http_info["cname"] = cname
|
|
1873
|
+
http_info["collection_formats"] = collection_formats
|
|
1874
|
+
http_info["path_params"] = path_params
|
|
1875
|
+
http_info["query_params"] = query_params
|
|
1876
|
+
http_info["header_params"] = header_params
|
|
1877
|
+
http_info["post_params"] = form_params
|
|
1878
|
+
http_info["body"] = body
|
|
1879
|
+
http_info["response_headers"] = response_headers
|
|
1880
|
+
|
|
1881
|
+
return http_info
|
|
1882
|
+
|
|
1883
|
+
def show_server_firmware_attributes_async(self, request):
|
|
1884
|
+
r"""查询服务器固件详细信息
|
|
1885
|
+
|
|
1886
|
+
获取详细固件信息
|
|
1887
|
+
|
|
1888
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
:param request: Request instance for ShowServerFirmwareAttributes
|
|
1892
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowServerFirmwareAttributesRequest`
|
|
1893
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowServerFirmwareAttributesResponse`
|
|
1894
|
+
"""
|
|
1895
|
+
http_info = self._show_server_firmware_attributes_http_info(request)
|
|
1896
|
+
return self._call_api(**http_info)
|
|
1897
|
+
|
|
1898
|
+
def show_server_firmware_attributes_async_invoker(self, request):
|
|
1899
|
+
http_info = self._show_server_firmware_attributes_http_info(request)
|
|
1900
|
+
return AsyncInvoker(self, http_info)
|
|
1901
|
+
|
|
1902
|
+
def _show_server_firmware_attributes_http_info(self, request):
|
|
1903
|
+
http_info = {
|
|
1904
|
+
"method": "GET",
|
|
1905
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/firmware-attributes",
|
|
1906
|
+
"request_type": request.__class__.__name__,
|
|
1907
|
+
"response_type": "ShowServerFirmwareAttributesResponse"
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1911
|
+
|
|
1912
|
+
cname = None
|
|
1913
|
+
|
|
1914
|
+
collection_formats = {}
|
|
1915
|
+
|
|
1916
|
+
path_params = {}
|
|
1917
|
+
if 'id' in local_var_params:
|
|
1918
|
+
path_params['id'] = local_var_params['id']
|
|
1919
|
+
|
|
1920
|
+
query_params = []
|
|
1921
|
+
|
|
1922
|
+
header_params = {}
|
|
1923
|
+
|
|
1924
|
+
form_params = {}
|
|
1925
|
+
|
|
1926
|
+
body = None
|
|
1927
|
+
if isinstance(request, SdkStreamRequest):
|
|
1928
|
+
body = request.get_file_stream()
|
|
1929
|
+
|
|
1930
|
+
response_headers = []
|
|
1931
|
+
|
|
1932
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1933
|
+
['application/json'])
|
|
1934
|
+
|
|
1935
|
+
auth_settings = []
|
|
1936
|
+
|
|
1937
|
+
http_info["cname"] = cname
|
|
1938
|
+
http_info["collection_formats"] = collection_formats
|
|
1939
|
+
http_info["path_params"] = path_params
|
|
1940
|
+
http_info["query_params"] = query_params
|
|
1941
|
+
http_info["header_params"] = header_params
|
|
1942
|
+
http_info["post_params"] = form_params
|
|
1943
|
+
http_info["body"] = body
|
|
1944
|
+
http_info["response_headers"] = response_headers
|
|
1945
|
+
|
|
1946
|
+
return http_info
|
|
1947
|
+
|
|
1948
|
+
def show_server_hardware_attributes_async(self, request):
|
|
1949
|
+
r"""查询服务器硬件详细信息
|
|
1950
|
+
|
|
1951
|
+
获取详细硬件信息
|
|
1952
|
+
|
|
1953
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
:param request: Request instance for ShowServerHardwareAttributes
|
|
1957
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowServerHardwareAttributesRequest`
|
|
1958
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowServerHardwareAttributesResponse`
|
|
1959
|
+
"""
|
|
1960
|
+
http_info = self._show_server_hardware_attributes_http_info(request)
|
|
1961
|
+
return self._call_api(**http_info)
|
|
1962
|
+
|
|
1963
|
+
def show_server_hardware_attributes_async_invoker(self, request):
|
|
1964
|
+
http_info = self._show_server_hardware_attributes_http_info(request)
|
|
1965
|
+
return AsyncInvoker(self, http_info)
|
|
1966
|
+
|
|
1967
|
+
def _show_server_hardware_attributes_http_info(self, request):
|
|
1968
|
+
http_info = {
|
|
1969
|
+
"method": "GET",
|
|
1970
|
+
"resource_path": "/v1/{project_id}/physicalservers/{id}/hardware-attributes",
|
|
1971
|
+
"request_type": request.__class__.__name__,
|
|
1972
|
+
"response_type": "ShowServerHardwareAttributesResponse"
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
1976
|
+
|
|
1977
|
+
cname = None
|
|
1978
|
+
|
|
1979
|
+
collection_formats = {}
|
|
1980
|
+
|
|
1981
|
+
path_params = {}
|
|
1982
|
+
if 'id' in local_var_params:
|
|
1983
|
+
path_params['id'] = local_var_params['id']
|
|
1984
|
+
|
|
1985
|
+
query_params = []
|
|
1986
|
+
|
|
1987
|
+
header_params = {}
|
|
1988
|
+
|
|
1989
|
+
form_params = {}
|
|
1990
|
+
|
|
1991
|
+
body = None
|
|
1992
|
+
if isinstance(request, SdkStreamRequest):
|
|
1993
|
+
body = request.get_file_stream()
|
|
1994
|
+
|
|
1995
|
+
response_headers = []
|
|
1996
|
+
|
|
1997
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
1998
|
+
['application/json'])
|
|
1999
|
+
|
|
2000
|
+
auth_settings = []
|
|
2001
|
+
|
|
2002
|
+
http_info["cname"] = cname
|
|
2003
|
+
http_info["collection_formats"] = collection_formats
|
|
2004
|
+
http_info["path_params"] = path_params
|
|
2005
|
+
http_info["query_params"] = query_params
|
|
2006
|
+
http_info["header_params"] = header_params
|
|
2007
|
+
http_info["post_params"] = form_params
|
|
2008
|
+
http_info["body"] = body
|
|
2009
|
+
http_info["response_headers"] = response_headers
|
|
2010
|
+
|
|
2011
|
+
return http_info
|
|
2012
|
+
|
|
2013
|
+
def show_server_status_async(self, request):
|
|
2014
|
+
r"""服务器概览
|
|
2015
|
+
|
|
2016
|
+
该 API 用于查询服务器概览、服务器开机状态和服务器运行状态
|
|
2017
|
+
|
|
2018
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
:param request: Request instance for ShowServerStatus
|
|
2022
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.ShowServerStatusRequest`
|
|
2023
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.ShowServerStatusResponse`
|
|
2024
|
+
"""
|
|
2025
|
+
http_info = self._show_server_status_http_info(request)
|
|
2026
|
+
return self._call_api(**http_info)
|
|
2027
|
+
|
|
2028
|
+
def show_server_status_async_invoker(self, request):
|
|
2029
|
+
http_info = self._show_server_status_http_info(request)
|
|
2030
|
+
return AsyncInvoker(self, http_info)
|
|
2031
|
+
|
|
2032
|
+
def _show_server_status_http_info(self, request):
|
|
2033
|
+
http_info = {
|
|
2034
|
+
"method": "GET",
|
|
2035
|
+
"resource_path": "/v1/{project_id}/physicalservers/status",
|
|
2036
|
+
"request_type": request.__class__.__name__,
|
|
2037
|
+
"response_type": "ShowServerStatusResponse"
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
2041
|
+
|
|
2042
|
+
cname = None
|
|
2043
|
+
|
|
2044
|
+
collection_formats = {}
|
|
2045
|
+
|
|
2046
|
+
path_params = {}
|
|
2047
|
+
|
|
2048
|
+
query_params = []
|
|
2049
|
+
|
|
2050
|
+
header_params = {}
|
|
2051
|
+
|
|
2052
|
+
form_params = {}
|
|
2053
|
+
|
|
2054
|
+
body = None
|
|
2055
|
+
if isinstance(request, SdkStreamRequest):
|
|
2056
|
+
body = request.get_file_stream()
|
|
2057
|
+
|
|
2058
|
+
response_headers = []
|
|
2059
|
+
|
|
2060
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
2061
|
+
['application/json'])
|
|
2062
|
+
|
|
2063
|
+
auth_settings = []
|
|
2064
|
+
|
|
2065
|
+
http_info["cname"] = cname
|
|
2066
|
+
http_info["collection_formats"] = collection_formats
|
|
2067
|
+
http_info["path_params"] = path_params
|
|
2068
|
+
http_info["query_params"] = query_params
|
|
2069
|
+
http_info["header_params"] = header_params
|
|
2070
|
+
http_info["post_params"] = form_params
|
|
2071
|
+
http_info["body"] = body
|
|
2072
|
+
http_info["response_headers"] = response_headers
|
|
2073
|
+
|
|
2074
|
+
return http_info
|
|
2075
|
+
|
|
2076
|
+
def update_i_dcs_async(self, request):
|
|
2077
|
+
r"""修改 IDC 描述
|
|
2078
|
+
|
|
2079
|
+
修改 IDC 描述
|
|
2080
|
+
|
|
2081
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
:param request: Request instance for UpdateIDcs
|
|
2085
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.UpdateIDcsRequest`
|
|
2086
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.UpdateIDcsResponse`
|
|
2087
|
+
"""
|
|
2088
|
+
http_info = self._update_i_dcs_http_info(request)
|
|
2089
|
+
return self._call_api(**http_info)
|
|
2090
|
+
|
|
2091
|
+
def update_i_dcs_async_invoker(self, request):
|
|
2092
|
+
http_info = self._update_i_dcs_http_info(request)
|
|
2093
|
+
return AsyncInvoker(self, http_info)
|
|
2094
|
+
|
|
2095
|
+
def _update_i_dcs_http_info(self, request):
|
|
2096
|
+
http_info = {
|
|
2097
|
+
"method": "PUT",
|
|
2098
|
+
"resource_path": "/v1/{project_id}/idcs",
|
|
2099
|
+
"request_type": request.__class__.__name__,
|
|
2100
|
+
"response_type": "UpdateIDcsResponse"
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
2104
|
+
|
|
2105
|
+
cname = None
|
|
2106
|
+
|
|
2107
|
+
collection_formats = {}
|
|
2108
|
+
|
|
2109
|
+
path_params = {}
|
|
2110
|
+
|
|
2111
|
+
query_params = []
|
|
2112
|
+
|
|
2113
|
+
header_params = {}
|
|
2114
|
+
|
|
2115
|
+
form_params = {}
|
|
2116
|
+
|
|
2117
|
+
body = None
|
|
2118
|
+
if 'body' in local_var_params:
|
|
2119
|
+
body = local_var_params['body']
|
|
2120
|
+
if isinstance(request, SdkStreamRequest):
|
|
2121
|
+
body = request.get_file_stream()
|
|
2122
|
+
|
|
2123
|
+
response_headers = []
|
|
2124
|
+
|
|
2125
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
2126
|
+
['application/json;charset=UTF-8'])
|
|
2127
|
+
|
|
2128
|
+
auth_settings = []
|
|
2129
|
+
|
|
2130
|
+
http_info["cname"] = cname
|
|
2131
|
+
http_info["collection_formats"] = collection_formats
|
|
2132
|
+
http_info["path_params"] = path_params
|
|
2133
|
+
http_info["query_params"] = query_params
|
|
2134
|
+
http_info["header_params"] = header_params
|
|
2135
|
+
http_info["post_params"] = form_params
|
|
2136
|
+
http_info["body"] = body
|
|
2137
|
+
http_info["response_headers"] = response_headers
|
|
2138
|
+
|
|
2139
|
+
return http_info
|
|
2140
|
+
|
|
2141
|
+
def update_i_rack_async(self, request):
|
|
2142
|
+
r"""更新 iRack 实例
|
|
2143
|
+
|
|
2144
|
+
更新iRack信息
|
|
2145
|
+
|
|
2146
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
:param request: Request instance for UpdateIRack
|
|
2150
|
+
:type request: :class:`huaweicloudsdkclouddc.v1.UpdateIRackRequest`
|
|
2151
|
+
:rtype: :class:`huaweicloudsdkclouddc.v1.UpdateIRackResponse`
|
|
2152
|
+
"""
|
|
2153
|
+
http_info = self._update_i_rack_http_info(request)
|
|
2154
|
+
return self._call_api(**http_info)
|
|
2155
|
+
|
|
2156
|
+
def update_i_rack_async_invoker(self, request):
|
|
2157
|
+
http_info = self._update_i_rack_http_info(request)
|
|
2158
|
+
return AsyncInvoker(self, http_info)
|
|
2159
|
+
|
|
2160
|
+
def _update_i_rack_http_info(self, request):
|
|
2161
|
+
http_info = {
|
|
2162
|
+
"method": "PUT",
|
|
2163
|
+
"resource_path": "/v1/{project_id}/iracks/{irack_id}",
|
|
2164
|
+
"request_type": request.__class__.__name__,
|
|
2165
|
+
"response_type": "UpdateIRackResponse"
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
2169
|
+
|
|
2170
|
+
cname = None
|
|
2171
|
+
|
|
2172
|
+
collection_formats = {}
|
|
2173
|
+
|
|
2174
|
+
path_params = {}
|
|
2175
|
+
if 'irack_id' in local_var_params:
|
|
2176
|
+
path_params['irack_id'] = local_var_params['irack_id']
|
|
2177
|
+
|
|
2178
|
+
query_params = []
|
|
2179
|
+
|
|
2180
|
+
header_params = {}
|
|
2181
|
+
|
|
2182
|
+
form_params = {}
|
|
2183
|
+
|
|
2184
|
+
body = None
|
|
2185
|
+
if 'body' in local_var_params:
|
|
2186
|
+
body = local_var_params['body']
|
|
2187
|
+
if isinstance(request, SdkStreamRequest):
|
|
2188
|
+
body = request.get_file_stream()
|
|
2189
|
+
|
|
2190
|
+
response_headers = []
|
|
2191
|
+
|
|
2192
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
2193
|
+
['application/json;charset=UTF-8'])
|
|
2194
|
+
|
|
2195
|
+
auth_settings = []
|
|
2196
|
+
|
|
2197
|
+
http_info["cname"] = cname
|
|
2198
|
+
http_info["collection_formats"] = collection_formats
|
|
2199
|
+
http_info["path_params"] = path_params
|
|
2200
|
+
http_info["query_params"] = query_params
|
|
2201
|
+
http_info["header_params"] = header_params
|
|
2202
|
+
http_info["post_params"] = form_params
|
|
2203
|
+
http_info["body"] = body
|
|
2204
|
+
http_info["response_headers"] = response_headers
|
|
2205
|
+
|
|
2206
|
+
return http_info
|
|
2207
|
+
|
|
2208
|
+
def _call_api(self, **kwargs):
|
|
2209
|
+
try:
|
|
2210
|
+
kwargs["async_request"] = True
|
|
2211
|
+
return self.do_http_request(**kwargs)
|
|
2212
|
+
except TypeError:
|
|
2213
|
+
import inspect
|
|
2214
|
+
params = inspect.signature(self.do_http_request).parameters
|
|
2215
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
|
2216
|
+
return self.do_http_request(**http_info)
|
|
2217
|
+
|
|
2218
|
+
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
|
2219
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
|
2220
|
+
collection_formats=None, request_type=None):
|
|
2221
|
+
"""Makes the HTTP request and returns deserialized data.
|
|
2222
|
+
|
|
2223
|
+
:param resource_path: Path to method endpoint.
|
|
2224
|
+
:param method: Method to call.
|
|
2225
|
+
:param path_params: Path parameters in the url.
|
|
2226
|
+
:param query_params: Query parameters in the url.
|
|
2227
|
+
:param header_params: Header parameters to be
|
|
2228
|
+
placed in the request header.
|
|
2229
|
+
:param body: Request body.
|
|
2230
|
+
:param post_params: Request post form parameters,
|
|
2231
|
+
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
|
2232
|
+
:param cname: Used for obs endpoint.
|
|
2233
|
+
:param auth_settings: Auth Settings names for the request.
|
|
2234
|
+
:param response_type: Response data type.
|
|
2235
|
+
:param response_headers: Header should be added to response data.
|
|
2236
|
+
:param collection_formats: dict of collection formats for path, query,
|
|
2237
|
+
header, and post parameters.
|
|
2238
|
+
:param request_type: Request data type.
|
|
2239
|
+
:return:
|
|
2240
|
+
Return the response directly.
|
|
2241
|
+
"""
|
|
2242
|
+
return self.do_http_request(
|
|
2243
|
+
method=method,
|
|
2244
|
+
resource_path=resource_path,
|
|
2245
|
+
path_params=path_params,
|
|
2246
|
+
query_params=query_params,
|
|
2247
|
+
header_params=header_params,
|
|
2248
|
+
body=body,
|
|
2249
|
+
post_params=post_params,
|
|
2250
|
+
cname=cname,
|
|
2251
|
+
response_type=response_type,
|
|
2252
|
+
response_headers=response_headers,
|
|
2253
|
+
collection_formats=collection_formats,
|
|
2254
|
+
request_type=request_type,
|
|
2255
|
+
async_request=True)
|