huaweicloudsdkims 3.0.43rc0__py3-none-any.whl → 3.1.161__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.
- huaweicloudsdkims/v2/__init__.py +31 -3
- huaweicloudsdkims/v2/ims_async_client.py +2198 -1356
- huaweicloudsdkims/v2/ims_client.py +2188 -1347
- huaweicloudsdkims/v2/model/__init__.py +30 -1
- huaweicloudsdkims/v2/model/add_image_tag_request.py +26 -19
- huaweicloudsdkims/v2/model/add_image_tag_request_body.py +19 -16
- huaweicloudsdkims/v2/model/add_image_tag_response.py +14 -10
- huaweicloudsdkims/v2/model/add_or_update_tags_request_body.py +29 -22
- huaweicloudsdkims/v2/model/additional_properties.py +18 -13
- huaweicloudsdkims/v2/model/batch_add_members_request.py +19 -16
- huaweicloudsdkims/v2/model/batch_add_members_request_body.py +84 -19
- huaweicloudsdkims/v2/model/batch_add_members_response.py +19 -13
- huaweicloudsdkims/v2/model/batch_add_or_delete_tags_request.py +26 -19
- huaweicloudsdkims/v2/model/batch_add_or_delete_tags_request_body.py +24 -17
- huaweicloudsdkims/v2/model/batch_add_or_delete_tags_response.py +14 -10
- huaweicloudsdkims/v2/model/batch_delete_members_request.py +19 -16
- huaweicloudsdkims/v2/model/batch_delete_members_response.py +19 -13
- huaweicloudsdkims/v2/model/batch_delete_tags_request.py +139 -0
- huaweicloudsdkims/v2/model/batch_delete_tags_request_body.py +114 -0
- huaweicloudsdkims/v2/model/batch_delete_tags_response.py +85 -0
- huaweicloudsdkims/v2/model/batch_update_members_request.py +19 -16
- huaweicloudsdkims/v2/model/batch_update_members_request_body.py +33 -22
- huaweicloudsdkims/v2/model/batch_update_members_response.py +19 -13
- huaweicloudsdkims/v2/model/copy_image_cross_region_request.py +26 -19
- huaweicloudsdkims/v2/model/copy_image_cross_region_request_body.py +70 -28
- huaweicloudsdkims/v2/model/copy_image_cross_region_response.py +19 -13
- huaweicloudsdkims/v2/model/copy_image_in_region_in_safe_mode_request.py +139 -0
- huaweicloudsdkims/v2/model/copy_image_in_region_in_safe_mode_response.py +116 -0
- huaweicloudsdkims/v2/model/copy_image_in_region_request.py +26 -19
- huaweicloudsdkims/v2/model/copy_image_in_region_request_body.py +33 -22
- huaweicloudsdkims/v2/model/copy_image_in_region_response.py +19 -13
- huaweicloudsdkims/v2/model/create_data_image.py +33 -22
- huaweicloudsdkims/v2/model/create_data_image_in_safe_mode_request.py +111 -0
- huaweicloudsdkims/v2/model/create_data_image_in_safe_mode_response.py +116 -0
- huaweicloudsdkims/v2/model/create_data_image_request.py +19 -16
- huaweicloudsdkims/v2/model/create_data_image_request_body.py +63 -41
- huaweicloudsdkims/v2/model/create_data_image_response.py +19 -13
- huaweicloudsdkims/v2/model/create_image_in_safe_mode_request.py +111 -0
- huaweicloudsdkims/v2/model/create_image_in_safe_mode_response.py +116 -0
- huaweicloudsdkims/v2/model/create_image_request.py +19 -16
- huaweicloudsdkims/v2/model/create_image_request_body.py +139 -70
- huaweicloudsdkims/v2/model/create_image_response.py +19 -13
- huaweicloudsdkims/v2/model/create_or_update_tags_request.py +19 -16
- huaweicloudsdkims/v2/model/create_or_update_tags_response.py +14 -10
- huaweicloudsdkims/v2/model/create_whole_image_request.py +19 -16
- huaweicloudsdkims/v2/model/create_whole_image_request_body.py +74 -50
- huaweicloudsdkims/v2/model/create_whole_image_response.py +19 -13
- huaweicloudsdkims/v2/model/delete_image_tag_request.py +27 -16
- huaweicloudsdkims/v2/model/delete_image_tag_response.py +14 -10
- huaweicloudsdkims/v2/model/export_image_in_safe_mode_request.py +139 -0
- huaweicloudsdkims/v2/model/export_image_in_safe_mode_response.py +116 -0
- huaweicloudsdkims/v2/model/export_image_request.py +26 -19
- huaweicloudsdkims/v2/model/export_image_request_body.py +55 -19
- huaweicloudsdkims/v2/model/export_image_response.py +19 -13
- huaweicloudsdkims/v2/model/glance_add_image_member_request.py +26 -19
- huaweicloudsdkims/v2/model/glance_add_image_member_request_body.py +18 -13
- huaweicloudsdkims/v2/model/glance_add_image_member_response.py +105 -31
- huaweicloudsdkims/v2/model/glance_create_image_metadata_request.py +19 -16
- huaweicloudsdkims/v2/model/glance_create_image_metadata_request_body.py +58 -37
- huaweicloudsdkims/v2/model/glance_create_image_metadata_response.py +239 -94
- huaweicloudsdkims/v2/model/glance_create_tag_request.py +27 -16
- huaweicloudsdkims/v2/model/glance_create_tag_response.py +14 -10
- huaweicloudsdkims/v2/model/glance_delete_image_member_request.py +27 -16
- huaweicloudsdkims/v2/model/glance_delete_image_member_response.py +14 -10
- huaweicloudsdkims/v2/model/glance_delete_image_request.py +26 -19
- huaweicloudsdkims/v2/model/glance_delete_image_request_body.py +18 -13
- huaweicloudsdkims/v2/model/glance_delete_image_response.py +14 -10
- huaweicloudsdkims/v2/model/glance_delete_tag_request.py +27 -16
- huaweicloudsdkims/v2/model/glance_delete_tag_response.py +14 -10
- huaweicloudsdkims/v2/model/glance_image_members.py +104 -31
- huaweicloudsdkims/v2/model/glance_list_image_member_schemas_request.py +13 -10
- huaweicloudsdkims/v2/model/glance_list_image_member_schemas_response.py +30 -20
- huaweicloudsdkims/v2/model/glance_list_image_members_request.py +20 -13
- huaweicloudsdkims/v2/model/glance_list_image_members_response.py +25 -17
- huaweicloudsdkims/v2/model/glance_list_image_schemas_request.py +13 -10
- huaweicloudsdkims/v2/model/glance_list_image_schemas_response.py +30 -20
- huaweicloudsdkims/v2/model/glance_list_images_request.py +237 -106
- huaweicloudsdkims/v2/model/glance_list_images_response.py +36 -24
- huaweicloudsdkims/v2/model/glance_show_image_list_response_body.py +1833 -0
- huaweicloudsdkims/v2/model/glance_show_image_member_request.py +27 -16
- huaweicloudsdkims/v2/model/glance_show_image_member_response.py +105 -31
- huaweicloudsdkims/v2/model/glance_show_image_member_schemas_request.py +13 -10
- huaweicloudsdkims/v2/model/glance_show_image_member_schemas_response.py +24 -16
- huaweicloudsdkims/v2/model/glance_show_image_request.py +20 -13
- huaweicloudsdkims/v2/model/glance_show_image_response.py +631 -210
- huaweicloudsdkims/v2/model/glance_show_image_schemas_request.py +13 -10
- huaweicloudsdkims/v2/model/glance_show_image_schemas_response.py +36 -26
- huaweicloudsdkims/v2/model/glance_update_image_member_request.py +33 -22
- huaweicloudsdkims/v2/model/glance_update_image_member_request_body.py +23 -16
- huaweicloudsdkims/v2/model/glance_update_image_member_response.py +105 -31
- huaweicloudsdkims/v2/model/glance_update_image_request.py +26 -19
- huaweicloudsdkims/v2/model/glance_update_image_request_body.py +28 -19
- huaweicloudsdkims/v2/model/glance_update_image_response.py +631 -210
- huaweicloudsdkims/v2/model/image_info.py +616 -260
- huaweicloudsdkims/v2/model/image_member.py +310 -0
- huaweicloudsdkims/v2/model/image_tag.py +23 -16
- huaweicloudsdkims/v2/model/import_image_quick_in_safe_mode_request.py +111 -0
- huaweicloudsdkims/v2/model/import_image_quick_in_safe_mode_response.py +116 -0
- huaweicloudsdkims/v2/model/import_image_quick_request.py +19 -16
- huaweicloudsdkims/v2/model/import_image_quick_response.py +19 -13
- huaweicloudsdkims/v2/model/job_entities.py +340 -16
- huaweicloudsdkims/v2/model/job_entities_result.py +173 -0
- huaweicloudsdkims/v2/model/job_progress_entities.py +289 -0
- huaweicloudsdkims/v2/model/links.py +23 -16
- huaweicloudsdkims/v2/model/list_image_by_tags_request.py +19 -16
- huaweicloudsdkims/v2/model/list_image_by_tags_request_body.py +90 -42
- huaweicloudsdkims/v2/model/list_image_by_tags_response.py +25 -17
- huaweicloudsdkims/v2/model/list_image_members_request.py +114 -0
- huaweicloudsdkims/v2/model/list_image_members_response.py +145 -0
- huaweicloudsdkims/v2/model/list_image_tags_request.py +20 -13
- huaweicloudsdkims/v2/model/list_image_tags_response.py +20 -14
- huaweicloudsdkims/v2/model/list_images_request.py +272 -121
- huaweicloudsdkims/v2/model/list_images_response.py +20 -14
- huaweicloudsdkims/v2/model/list_images_tags_request.py +13 -10
- huaweicloudsdkims/v2/model/list_images_tags_response.py +20 -14
- huaweicloudsdkims/v2/model/list_os_versions_request.py +20 -13
- huaweicloudsdkims/v2/model/list_os_versions_response.py +20 -16
- huaweicloudsdkims/v2/model/list_os_versions_response_body.py +24 -17
- huaweicloudsdkims/v2/model/list_tags_request.py +118 -55
- huaweicloudsdkims/v2/model/list_tags_response.py +19 -13
- huaweicloudsdkims/v2/model/list_versions_request.py +84 -0
- huaweicloudsdkims/v2/model/list_versions_response.py +116 -0
- huaweicloudsdkims/v2/model/os_version_info.py +38 -25
- huaweicloudsdkims/v2/model/os_version_response.py +172 -0
- huaweicloudsdkims/v2/model/query_image_by_tags_resource_detail.py +18 -13
- huaweicloudsdkims/v2/model/quick_import_image_by_file_request_body.py +130 -47
- huaweicloudsdkims/v2/model/quota.py +19 -14
- huaweicloudsdkims/v2/model/quota_info.py +38 -25
- huaweicloudsdkims/v2/model/register_image_request.py +26 -19
- huaweicloudsdkims/v2/model/register_image_request_body.py +18 -13
- huaweicloudsdkims/v2/model/register_image_response.py +19 -13
- huaweicloudsdkims/v2/model/resource_tag.py +23 -16
- huaweicloudsdkims/v2/model/show_image_by_tags_resource.py +47 -38
- huaweicloudsdkims/v2/model/show_image_member_request.py +142 -0
- huaweicloudsdkims/v2/model/show_image_member_response.py +319 -0
- huaweicloudsdkims/v2/model/show_image_quota_request.py +13 -10
- huaweicloudsdkims/v2/model/show_image_quota_response.py +20 -16
- huaweicloudsdkims/v2/model/show_job_progress_request.py +114 -0
- huaweicloudsdkims/v2/model/show_job_progress_response.py +315 -0
- huaweicloudsdkims/v2/model/show_job_request.py +20 -13
- huaweicloudsdkims/v2/model/show_job_response.py +55 -37
- huaweicloudsdkims/v2/model/show_version_request.py +114 -0
- huaweicloudsdkims/v2/model/show_version_response.py +116 -0
- huaweicloudsdkims/v2/model/sub_job_entities.py +144 -0
- huaweicloudsdkims/v2/model/sub_job_result.py +314 -0
- huaweicloudsdkims/v2/model/tag_key_value.py +23 -16
- huaweicloudsdkims/v2/model/tags.py +23 -16
- huaweicloudsdkims/v2/model/update_image_request.py +26 -19
- huaweicloudsdkims/v2/model/update_image_request_body.py +29 -21
- huaweicloudsdkims/v2/model/update_image_response.py +600 -254
- huaweicloudsdkims/v2/region/ims_region.py +101 -42
- {huaweicloudsdkims-3.0.43rc0.dist-info → huaweicloudsdkims-3.1.161.dist-info}/METADATA +9 -9
- huaweicloudsdkims-3.1.161.dist-info/RECORD +158 -0
- {huaweicloudsdkims-3.0.43rc0.dist-info → huaweicloudsdkims-3.1.161.dist-info}/WHEEL +1 -1
- huaweicloudsdkims/v2/model/glance_show_image_response_body.py +0 -1357
- huaweicloudsdkims-3.0.43rc0.dist-info/RECORD +0 -129
- {huaweicloudsdkims-3.0.43rc0.dist-info → huaweicloudsdkims-3.1.161.dist-info}/LICENSE +0 -0
- {huaweicloudsdkims-3.0.43rc0.dist-info → huaweicloudsdkims-3.1.161.dist-info}/top_level.txt +0 -0
@@ -2,76 +2,67 @@
|
|
2
2
|
|
3
3
|
from __future__ import absolute_import
|
4
4
|
|
5
|
-
import datetime
|
6
|
-
import re
|
7
5
|
import importlib
|
8
|
-
|
9
|
-
import six
|
6
|
+
import warnings
|
10
7
|
|
11
8
|
from huaweicloudsdkcore.client import Client, ClientBuilder
|
12
|
-
from huaweicloudsdkcore.exceptions import exceptions
|
13
9
|
from huaweicloudsdkcore.utils import http_utils
|
14
10
|
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
15
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 'huaweicloudsdkims'")
|
16
16
|
|
17
|
-
class ImsAsyncClient(Client):
|
18
|
-
"""
|
19
|
-
:param configuration: .Configuration object for this client
|
20
|
-
:param pool_threads: The number of threads to use for async requests
|
21
|
-
to the API. More threads means more concurrent API requests.
|
22
|
-
"""
|
23
|
-
|
24
|
-
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
|
25
|
-
NATIVE_TYPES_MAPPING = {
|
26
|
-
'int': int,
|
27
|
-
'long': int if six.PY3 else long,
|
28
|
-
'float': float,
|
29
|
-
'str': str,
|
30
|
-
'bool': bool,
|
31
|
-
'date': datetime.date,
|
32
|
-
'datetime': datetime.datetime,
|
33
|
-
'object': object,
|
34
|
-
}
|
35
17
|
|
18
|
+
class ImsAsyncClient(Client):
|
36
19
|
def __init__(self):
|
37
20
|
super(ImsAsyncClient, self).__init__()
|
38
21
|
self.model_package = importlib.import_module("huaweicloudsdkims.v2.model")
|
39
|
-
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
40
22
|
|
41
23
|
@classmethod
|
42
24
|
def new_builder(cls, clazz=None):
|
43
|
-
if clazz
|
44
|
-
|
25
|
+
if not clazz:
|
26
|
+
client_builder = ClientBuilder(cls)
|
27
|
+
else:
|
28
|
+
if clazz.__name__ != "ImsAsyncClient":
|
29
|
+
raise TypeError("client type error, support client type is ImsAsyncClient")
|
30
|
+
client_builder = ClientBuilder(clazz)
|
45
31
|
|
46
|
-
|
47
|
-
raise TypeError("client type error, support client type is ImsClient")
|
32
|
+
|
48
33
|
|
49
|
-
return
|
34
|
+
return client_builder
|
50
35
|
|
51
36
|
def add_image_tag_async(self, request):
|
52
|
-
"""添加镜像标签
|
37
|
+
r"""添加镜像标签
|
53
38
|
|
54
39
|
该接口用于为指定镜像添加或更新指定的单个标签
|
40
|
+
|
41
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
42
|
+
|
55
43
|
|
56
|
-
:param
|
57
|
-
:
|
44
|
+
:param request: Request instance for AddImageTag
|
45
|
+
:type request: :class:`huaweicloudsdkims.v2.AddImageTagRequest`
|
46
|
+
:rtype: :class:`huaweicloudsdkims.v2.AddImageTagResponse`
|
58
47
|
"""
|
59
|
-
|
48
|
+
http_info = self._add_image_tag_http_info(request)
|
49
|
+
return self._call_api(**http_info)
|
60
50
|
|
61
|
-
def
|
62
|
-
|
51
|
+
def add_image_tag_async_invoker(self, request):
|
52
|
+
http_info = self._add_image_tag_http_info(request)
|
53
|
+
return AsyncInvoker(self, http_info)
|
63
54
|
|
64
|
-
|
55
|
+
def _add_image_tag_http_info(self, request):
|
56
|
+
http_info = {
|
57
|
+
"method": "POST",
|
58
|
+
"resource_path": "/v2/{project_id}/images/{image_id}/tags",
|
59
|
+
"request_type": request.__class__.__name__,
|
60
|
+
"response_type": "AddImageTagResponse"
|
61
|
+
}
|
65
62
|
|
66
|
-
:
|
67
|
-
:return: AddImageTagResponse
|
68
|
-
"""
|
63
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
69
64
|
|
70
|
-
|
71
|
-
local_var_params = {}
|
72
|
-
for attr in request.attribute_map:
|
73
|
-
if hasattr(request, attr):
|
74
|
-
local_var_params[attr] = getattr(request, attr)
|
65
|
+
cname = None
|
75
66
|
|
76
67
|
collection_formats = {}
|
77
68
|
|
@@ -85,11 +76,11 @@ class ImsAsyncClient(Client):
|
|
85
76
|
|
86
77
|
form_params = {}
|
87
78
|
|
88
|
-
|
79
|
+
body = None
|
89
80
|
if 'body' in local_var_params:
|
90
|
-
|
81
|
+
body = local_var_params['body']
|
91
82
|
if isinstance(request, SdkStreamRequest):
|
92
|
-
|
83
|
+
body = request.get_file_stream()
|
93
84
|
|
94
85
|
response_headers = []
|
95
86
|
|
@@ -98,45 +89,48 @@ class ImsAsyncClient(Client):
|
|
98
89
|
|
99
90
|
auth_settings = []
|
100
91
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
response_type='AddImageTagResponse',
|
110
|
-
response_headers=response_headers,
|
111
|
-
auth_settings=auth_settings,
|
112
|
-
collection_formats=collection_formats,
|
113
|
-
request_type=request.__class__.__name__)
|
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
|
114
100
|
|
101
|
+
return http_info
|
115
102
|
|
116
103
|
def batch_add_members_async(self, request):
|
117
|
-
"""批量添加镜像成员
|
104
|
+
r"""批量添加镜像成员
|
105
|
+
|
106
|
+
该接口为扩展接口,主要用于镜像共享时用户将多个镜像共享给多个用户。
|
107
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
108
|
+
|
109
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
118
110
|
|
119
|
-
该接口为扩展接口,主要用于镜像共享时用户将多个镜像共享给多个用户。 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
120
111
|
|
121
|
-
:param
|
122
|
-
:
|
112
|
+
:param request: Request instance for BatchAddMembers
|
113
|
+
:type request: :class:`huaweicloudsdkims.v2.BatchAddMembersRequest`
|
114
|
+
:rtype: :class:`huaweicloudsdkims.v2.BatchAddMembersResponse`
|
123
115
|
"""
|
124
|
-
|
116
|
+
http_info = self._batch_add_members_http_info(request)
|
117
|
+
return self._call_api(**http_info)
|
125
118
|
|
126
|
-
def
|
127
|
-
|
119
|
+
def batch_add_members_async_invoker(self, request):
|
120
|
+
http_info = self._batch_add_members_http_info(request)
|
121
|
+
return AsyncInvoker(self, http_info)
|
128
122
|
|
129
|
-
|
123
|
+
def _batch_add_members_http_info(self, request):
|
124
|
+
http_info = {
|
125
|
+
"method": "POST",
|
126
|
+
"resource_path": "/v1/cloudimages/members",
|
127
|
+
"request_type": request.__class__.__name__,
|
128
|
+
"response_type": "BatchAddMembersResponse"
|
129
|
+
}
|
130
130
|
|
131
|
-
:
|
132
|
-
:return: BatchAddMembersResponse
|
133
|
-
"""
|
131
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
134
132
|
|
135
|
-
|
136
|
-
local_var_params = {}
|
137
|
-
for attr in request.attribute_map:
|
138
|
-
if hasattr(request, attr):
|
139
|
-
local_var_params[attr] = getattr(request, attr)
|
133
|
+
cname = None
|
140
134
|
|
141
135
|
collection_formats = {}
|
142
136
|
|
@@ -148,11 +142,11 @@ class ImsAsyncClient(Client):
|
|
148
142
|
|
149
143
|
form_params = {}
|
150
144
|
|
151
|
-
|
145
|
+
body = None
|
152
146
|
if 'body' in local_var_params:
|
153
|
-
|
147
|
+
body = local_var_params['body']
|
154
148
|
if isinstance(request, SdkStreamRequest):
|
155
|
-
|
149
|
+
body = request.get_file_stream()
|
156
150
|
|
157
151
|
response_headers = []
|
158
152
|
|
@@ -161,45 +155,47 @@ class ImsAsyncClient(Client):
|
|
161
155
|
|
162
156
|
auth_settings = []
|
163
157
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
response_type='BatchAddMembersResponse',
|
173
|
-
response_headers=response_headers,
|
174
|
-
auth_settings=auth_settings,
|
175
|
-
collection_formats=collection_formats,
|
176
|
-
request_type=request.__class__.__name__)
|
158
|
+
http_info["cname"] = cname
|
159
|
+
http_info["collection_formats"] = collection_formats
|
160
|
+
http_info["path_params"] = path_params
|
161
|
+
http_info["query_params"] = query_params
|
162
|
+
http_info["header_params"] = header_params
|
163
|
+
http_info["post_params"] = form_params
|
164
|
+
http_info["body"] = body
|
165
|
+
http_info["response_headers"] = response_headers
|
177
166
|
|
167
|
+
return http_info
|
178
168
|
|
179
169
|
def batch_add_or_delete_tags_async(self, request):
|
180
|
-
"""批量添加删除镜像标签
|
170
|
+
r"""批量添加删除镜像标签
|
181
171
|
|
182
172
|
该接口用于为指定镜像批量添加/更新、删除标签。
|
173
|
+
|
174
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
183
175
|
|
184
|
-
|
185
|
-
:
|
176
|
+
|
177
|
+
:param request: Request instance for BatchAddOrDeleteTags
|
178
|
+
:type request: :class:`huaweicloudsdkims.v2.BatchAddOrDeleteTagsRequest`
|
179
|
+
:rtype: :class:`huaweicloudsdkims.v2.BatchAddOrDeleteTagsResponse`
|
186
180
|
"""
|
187
|
-
|
181
|
+
http_info = self._batch_add_or_delete_tags_http_info(request)
|
182
|
+
return self._call_api(**http_info)
|
188
183
|
|
189
|
-
def
|
190
|
-
|
184
|
+
def batch_add_or_delete_tags_async_invoker(self, request):
|
185
|
+
http_info = self._batch_add_or_delete_tags_http_info(request)
|
186
|
+
return AsyncInvoker(self, http_info)
|
191
187
|
|
192
|
-
|
188
|
+
def _batch_add_or_delete_tags_http_info(self, request):
|
189
|
+
http_info = {
|
190
|
+
"method": "POST",
|
191
|
+
"resource_path": "/v2/{project_id}/images/{image_id}/tags/action",
|
192
|
+
"request_type": request.__class__.__name__,
|
193
|
+
"response_type": "BatchAddOrDeleteTagsResponse"
|
194
|
+
}
|
193
195
|
|
194
|
-
:
|
195
|
-
:return: BatchAddOrDeleteTagsResponse
|
196
|
-
"""
|
196
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
197
197
|
|
198
|
-
|
199
|
-
local_var_params = {}
|
200
|
-
for attr in request.attribute_map:
|
201
|
-
if hasattr(request, attr):
|
202
|
-
local_var_params[attr] = getattr(request, attr)
|
198
|
+
cname = None
|
203
199
|
|
204
200
|
collection_formats = {}
|
205
201
|
|
@@ -213,11 +209,11 @@ class ImsAsyncClient(Client):
|
|
213
209
|
|
214
210
|
form_params = {}
|
215
211
|
|
216
|
-
|
212
|
+
body = None
|
217
213
|
if 'body' in local_var_params:
|
218
|
-
|
214
|
+
body = local_var_params['body']
|
219
215
|
if isinstance(request, SdkStreamRequest):
|
220
|
-
|
216
|
+
body = request.get_file_stream()
|
221
217
|
|
222
218
|
response_headers = []
|
223
219
|
|
@@ -226,49 +222,119 @@ class ImsAsyncClient(Client):
|
|
226
222
|
|
227
223
|
auth_settings = []
|
228
224
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
response_type='BatchAddOrDeleteTagsResponse',
|
238
|
-
response_headers=response_headers,
|
239
|
-
auth_settings=auth_settings,
|
240
|
-
collection_formats=collection_formats,
|
241
|
-
request_type=request.__class__.__name__)
|
225
|
+
http_info["cname"] = cname
|
226
|
+
http_info["collection_formats"] = collection_formats
|
227
|
+
http_info["path_params"] = path_params
|
228
|
+
http_info["query_params"] = query_params
|
229
|
+
http_info["header_params"] = header_params
|
230
|
+
http_info["post_params"] = form_params
|
231
|
+
http_info["body"] = body
|
232
|
+
http_info["response_headers"] = response_headers
|
242
233
|
|
234
|
+
return http_info
|
243
235
|
|
244
236
|
def batch_delete_members_async(self, request):
|
245
|
-
"""批量删除镜像成员
|
237
|
+
r"""批量删除镜像成员
|
246
238
|
|
247
|
-
该接口为扩展接口,主要用于取消镜像共享。
|
239
|
+
该接口为扩展接口,主要用于取消镜像共享。
|
240
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
241
|
+
|
242
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
248
243
|
|
249
|
-
|
250
|
-
:
|
244
|
+
|
245
|
+
:param request: Request instance for BatchDeleteMembers
|
246
|
+
:type request: :class:`huaweicloudsdkims.v2.BatchDeleteMembersRequest`
|
247
|
+
:rtype: :class:`huaweicloudsdkims.v2.BatchDeleteMembersResponse`
|
251
248
|
"""
|
252
|
-
|
249
|
+
http_info = self._batch_delete_members_http_info(request)
|
250
|
+
return self._call_api(**http_info)
|
251
|
+
|
252
|
+
def batch_delete_members_async_invoker(self, request):
|
253
|
+
http_info = self._batch_delete_members_http_info(request)
|
254
|
+
return AsyncInvoker(self, http_info)
|
255
|
+
|
256
|
+
def _batch_delete_members_http_info(self, request):
|
257
|
+
http_info = {
|
258
|
+
"method": "DELETE",
|
259
|
+
"resource_path": "/v1/cloudimages/members",
|
260
|
+
"request_type": request.__class__.__name__,
|
261
|
+
"response_type": "BatchDeleteMembersResponse"
|
262
|
+
}
|
263
|
+
|
264
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
265
|
+
|
266
|
+
cname = None
|
267
|
+
|
268
|
+
collection_formats = {}
|
269
|
+
|
270
|
+
path_params = {}
|
271
|
+
|
272
|
+
query_params = []
|
273
|
+
|
274
|
+
header_params = {}
|
275
|
+
|
276
|
+
form_params = {}
|
277
|
+
|
278
|
+
body = None
|
279
|
+
if 'body' in local_var_params:
|
280
|
+
body = local_var_params['body']
|
281
|
+
if isinstance(request, SdkStreamRequest):
|
282
|
+
body = request.get_file_stream()
|
283
|
+
|
284
|
+
response_headers = []
|
285
|
+
|
286
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
287
|
+
['application/json;charset=UTF-8'])
|
288
|
+
|
289
|
+
auth_settings = []
|
290
|
+
|
291
|
+
http_info["cname"] = cname
|
292
|
+
http_info["collection_formats"] = collection_formats
|
293
|
+
http_info["path_params"] = path_params
|
294
|
+
http_info["query_params"] = query_params
|
295
|
+
http_info["header_params"] = header_params
|
296
|
+
http_info["post_params"] = form_params
|
297
|
+
http_info["body"] = body
|
298
|
+
http_info["response_headers"] = response_headers
|
253
299
|
|
254
|
-
|
255
|
-
"""批量删除镜像成员
|
300
|
+
return http_info
|
256
301
|
|
257
|
-
|
302
|
+
def batch_delete_tags_async(self, request):
|
303
|
+
r"""批量删除镜像标签
|
258
304
|
|
259
|
-
|
260
|
-
|
305
|
+
该接口用于为指定镜像批量删除标签。
|
306
|
+
|
307
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
308
|
+
|
309
|
+
|
310
|
+
:param request: Request instance for BatchDeleteTags
|
311
|
+
:type request: :class:`huaweicloudsdkims.v2.BatchDeleteTagsRequest`
|
312
|
+
:rtype: :class:`huaweicloudsdkims.v2.BatchDeleteTagsResponse`
|
261
313
|
"""
|
314
|
+
http_info = self._batch_delete_tags_http_info(request)
|
315
|
+
return self._call_api(**http_info)
|
316
|
+
|
317
|
+
def batch_delete_tags_async_invoker(self, request):
|
318
|
+
http_info = self._batch_delete_tags_http_info(request)
|
319
|
+
return AsyncInvoker(self, http_info)
|
320
|
+
|
321
|
+
def _batch_delete_tags_http_info(self, request):
|
322
|
+
http_info = {
|
323
|
+
"method": "DELETE",
|
324
|
+
"resource_path": "/v1/{project_id}/cloudimages/{image_id}/tags/delete",
|
325
|
+
"request_type": request.__class__.__name__,
|
326
|
+
"response_type": "BatchDeleteTagsResponse"
|
327
|
+
}
|
262
328
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
if hasattr(request, attr):
|
267
|
-
local_var_params[attr] = getattr(request, attr)
|
329
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
330
|
+
|
331
|
+
cname = None
|
268
332
|
|
269
333
|
collection_formats = {}
|
270
334
|
|
271
335
|
path_params = {}
|
336
|
+
if 'image_id' in local_var_params:
|
337
|
+
path_params['image_id'] = local_var_params['image_id']
|
272
338
|
|
273
339
|
query_params = []
|
274
340
|
|
@@ -276,11 +342,11 @@ class ImsAsyncClient(Client):
|
|
276
342
|
|
277
343
|
form_params = {}
|
278
344
|
|
279
|
-
|
345
|
+
body = None
|
280
346
|
if 'body' in local_var_params:
|
281
|
-
|
347
|
+
body = local_var_params['body']
|
282
348
|
if isinstance(request, SdkStreamRequest):
|
283
|
-
|
349
|
+
body = request.get_file_stream()
|
284
350
|
|
285
351
|
response_headers = []
|
286
352
|
|
@@ -289,45 +355,48 @@ class ImsAsyncClient(Client):
|
|
289
355
|
|
290
356
|
auth_settings = []
|
291
357
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
response_type='BatchDeleteMembersResponse',
|
301
|
-
response_headers=response_headers,
|
302
|
-
auth_settings=auth_settings,
|
303
|
-
collection_formats=collection_formats,
|
304
|
-
request_type=request.__class__.__name__)
|
358
|
+
http_info["cname"] = cname
|
359
|
+
http_info["collection_formats"] = collection_formats
|
360
|
+
http_info["path_params"] = path_params
|
361
|
+
http_info["query_params"] = query_params
|
362
|
+
http_info["header_params"] = header_params
|
363
|
+
http_info["post_params"] = form_params
|
364
|
+
http_info["body"] = body
|
365
|
+
http_info["response_headers"] = response_headers
|
305
366
|
|
367
|
+
return http_info
|
306
368
|
|
307
369
|
def batch_update_members_async(self, request):
|
308
|
-
"""批量更新镜像成员状态
|
370
|
+
r"""批量更新镜像成员状态
|
309
371
|
|
310
|
-
该接口为扩展接口,主要用于用户接受或者拒绝多个共享镜像时批量更新镜像成员的状态。
|
372
|
+
该接口为扩展接口,主要用于用户接受或者拒绝多个共享镜像时批量更新镜像成员的状态。
|
373
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
374
|
+
|
375
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
311
376
|
|
312
|
-
|
313
|
-
:
|
377
|
+
|
378
|
+
:param request: Request instance for BatchUpdateMembers
|
379
|
+
:type request: :class:`huaweicloudsdkims.v2.BatchUpdateMembersRequest`
|
380
|
+
:rtype: :class:`huaweicloudsdkims.v2.BatchUpdateMembersResponse`
|
314
381
|
"""
|
315
|
-
|
382
|
+
http_info = self._batch_update_members_http_info(request)
|
383
|
+
return self._call_api(**http_info)
|
316
384
|
|
317
|
-
def
|
318
|
-
|
385
|
+
def batch_update_members_async_invoker(self, request):
|
386
|
+
http_info = self._batch_update_members_http_info(request)
|
387
|
+
return AsyncInvoker(self, http_info)
|
319
388
|
|
320
|
-
|
389
|
+
def _batch_update_members_http_info(self, request):
|
390
|
+
http_info = {
|
391
|
+
"method": "PUT",
|
392
|
+
"resource_path": "/v1/cloudimages/members",
|
393
|
+
"request_type": request.__class__.__name__,
|
394
|
+
"response_type": "BatchUpdateMembersResponse"
|
395
|
+
}
|
321
396
|
|
322
|
-
:
|
323
|
-
:return: BatchUpdateMembersResponse
|
324
|
-
"""
|
397
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
325
398
|
|
326
|
-
|
327
|
-
local_var_params = {}
|
328
|
-
for attr in request.attribute_map:
|
329
|
-
if hasattr(request, attr):
|
330
|
-
local_var_params[attr] = getattr(request, attr)
|
399
|
+
cname = None
|
331
400
|
|
332
401
|
collection_formats = {}
|
333
402
|
|
@@ -339,11 +408,11 @@ class ImsAsyncClient(Client):
|
|
339
408
|
|
340
409
|
form_params = {}
|
341
410
|
|
342
|
-
|
411
|
+
body = None
|
343
412
|
if 'body' in local_var_params:
|
344
|
-
|
413
|
+
body = local_var_params['body']
|
345
414
|
if isinstance(request, SdkStreamRequest):
|
346
|
-
|
415
|
+
body = request.get_file_stream()
|
347
416
|
|
348
417
|
response_headers = []
|
349
418
|
|
@@ -352,45 +421,49 @@ class ImsAsyncClient(Client):
|
|
352
421
|
|
353
422
|
auth_settings = []
|
354
423
|
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
response_type='BatchUpdateMembersResponse',
|
364
|
-
response_headers=response_headers,
|
365
|
-
auth_settings=auth_settings,
|
366
|
-
collection_formats=collection_formats,
|
367
|
-
request_type=request.__class__.__name__)
|
424
|
+
http_info["cname"] = cname
|
425
|
+
http_info["collection_formats"] = collection_formats
|
426
|
+
http_info["path_params"] = path_params
|
427
|
+
http_info["query_params"] = query_params
|
428
|
+
http_info["header_params"] = header_params
|
429
|
+
http_info["post_params"] = form_params
|
430
|
+
http_info["body"] = body
|
431
|
+
http_info["response_headers"] = response_headers
|
368
432
|
|
433
|
+
return http_info
|
369
434
|
|
370
435
|
def copy_image_cross_region_async(self, request):
|
371
|
-
"""跨Region复制镜像
|
436
|
+
r"""跨Region复制镜像
|
437
|
+
|
438
|
+
该接口为扩展接口,用户在一个区域制作的私有镜像,可以通过跨Region复制镜像将镜像复制到其他区域,在其他区域发放相同类型的云服务器,帮助用户实现区域间的业务迁移。
|
439
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。
|
440
|
+
如何查询异步任务,请参见异步任务进度查询。
|
441
|
+
|
442
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
372
443
|
|
373
|
-
该接口为扩展接口,用户在一个区域制作的私有镜像,可以通过跨Region复制镜像将镜像复制到其他区域,在其他区域发放相同类型的云服务器,帮助用户实现区域间的业务迁移。 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。 如何查询异步任务,请参见异步任务进度查询。
|
374
444
|
|
375
|
-
:param
|
376
|
-
:
|
445
|
+
:param request: Request instance for CopyImageCrossRegion
|
446
|
+
:type request: :class:`huaweicloudsdkims.v2.CopyImageCrossRegionRequest`
|
447
|
+
:rtype: :class:`huaweicloudsdkims.v2.CopyImageCrossRegionResponse`
|
377
448
|
"""
|
378
|
-
|
449
|
+
http_info = self._copy_image_cross_region_http_info(request)
|
450
|
+
return self._call_api(**http_info)
|
379
451
|
|
380
|
-
def
|
381
|
-
|
452
|
+
def copy_image_cross_region_async_invoker(self, request):
|
453
|
+
http_info = self._copy_image_cross_region_http_info(request)
|
454
|
+
return AsyncInvoker(self, http_info)
|
382
455
|
|
383
|
-
|
456
|
+
def _copy_image_cross_region_http_info(self, request):
|
457
|
+
http_info = {
|
458
|
+
"method": "POST",
|
459
|
+
"resource_path": "/v1/cloudimages/{image_id}/cross_region_copy",
|
460
|
+
"request_type": request.__class__.__name__,
|
461
|
+
"response_type": "CopyImageCrossRegionResponse"
|
462
|
+
}
|
384
463
|
|
385
|
-
:
|
386
|
-
:return: CopyImageCrossRegionResponse
|
387
|
-
"""
|
464
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
388
465
|
|
389
|
-
|
390
|
-
local_var_params = {}
|
391
|
-
for attr in request.attribute_map:
|
392
|
-
if hasattr(request, attr):
|
393
|
-
local_var_params[attr] = getattr(request, attr)
|
466
|
+
cname = None
|
394
467
|
|
395
468
|
collection_formats = {}
|
396
469
|
|
@@ -404,11 +477,11 @@ class ImsAsyncClient(Client):
|
|
404
477
|
|
405
478
|
form_params = {}
|
406
479
|
|
407
|
-
|
480
|
+
body = None
|
408
481
|
if 'body' in local_var_params:
|
409
|
-
|
482
|
+
body = local_var_params['body']
|
410
483
|
if isinstance(request, SdkStreamRequest):
|
411
|
-
|
484
|
+
body = request.get_file_stream()
|
412
485
|
|
413
486
|
response_headers = []
|
414
487
|
|
@@ -417,45 +490,116 @@ class ImsAsyncClient(Client):
|
|
417
490
|
|
418
491
|
auth_settings = []
|
419
492
|
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
response_type='CopyImageCrossRegionResponse',
|
429
|
-
response_headers=response_headers,
|
430
|
-
auth_settings=auth_settings,
|
431
|
-
collection_formats=collection_formats,
|
432
|
-
request_type=request.__class__.__name__)
|
493
|
+
http_info["cname"] = cname
|
494
|
+
http_info["collection_formats"] = collection_formats
|
495
|
+
http_info["path_params"] = path_params
|
496
|
+
http_info["query_params"] = query_params
|
497
|
+
http_info["header_params"] = header_params
|
498
|
+
http_info["post_params"] = form_params
|
499
|
+
http_info["body"] = body
|
500
|
+
http_info["response_headers"] = response_headers
|
433
501
|
|
502
|
+
return http_info
|
434
503
|
|
435
504
|
def copy_image_in_region_async(self, request):
|
436
|
-
"""Region内复制镜像
|
505
|
+
r"""Region内复制镜像
|
437
506
|
|
438
|
-
该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。
|
507
|
+
该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。
|
508
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
509
|
+
|
510
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
439
511
|
|
440
|
-
|
441
|
-
:
|
512
|
+
|
513
|
+
:param request: Request instance for CopyImageInRegion
|
514
|
+
:type request: :class:`huaweicloudsdkims.v2.CopyImageInRegionRequest`
|
515
|
+
:rtype: :class:`huaweicloudsdkims.v2.CopyImageInRegionResponse`
|
442
516
|
"""
|
443
|
-
|
517
|
+
http_info = self._copy_image_in_region_http_info(request)
|
518
|
+
return self._call_api(**http_info)
|
519
|
+
|
520
|
+
def copy_image_in_region_async_invoker(self, request):
|
521
|
+
http_info = self._copy_image_in_region_http_info(request)
|
522
|
+
return AsyncInvoker(self, http_info)
|
523
|
+
|
524
|
+
def _copy_image_in_region_http_info(self, request):
|
525
|
+
http_info = {
|
526
|
+
"method": "POST",
|
527
|
+
"resource_path": "/v1/cloudimages/{image_id}/copy",
|
528
|
+
"request_type": request.__class__.__name__,
|
529
|
+
"response_type": "CopyImageInRegionResponse"
|
530
|
+
}
|
531
|
+
|
532
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
533
|
+
|
534
|
+
cname = None
|
535
|
+
|
536
|
+
collection_formats = {}
|
537
|
+
|
538
|
+
path_params = {}
|
539
|
+
if 'image_id' in local_var_params:
|
540
|
+
path_params['image_id'] = local_var_params['image_id']
|
541
|
+
|
542
|
+
query_params = []
|
543
|
+
|
544
|
+
header_params = {}
|
545
|
+
|
546
|
+
form_params = {}
|
547
|
+
|
548
|
+
body = None
|
549
|
+
if 'body' in local_var_params:
|
550
|
+
body = local_var_params['body']
|
551
|
+
if isinstance(request, SdkStreamRequest):
|
552
|
+
body = request.get_file_stream()
|
553
|
+
|
554
|
+
response_headers = []
|
555
|
+
|
556
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
557
|
+
['application/json;charset=UTF-8'])
|
558
|
+
|
559
|
+
auth_settings = []
|
560
|
+
|
561
|
+
http_info["cname"] = cname
|
562
|
+
http_info["collection_formats"] = collection_formats
|
563
|
+
http_info["path_params"] = path_params
|
564
|
+
http_info["query_params"] = query_params
|
565
|
+
http_info["header_params"] = header_params
|
566
|
+
http_info["post_params"] = form_params
|
567
|
+
http_info["body"] = body
|
568
|
+
http_info["response_headers"] = response_headers
|
569
|
+
|
570
|
+
return http_info
|
571
|
+
|
572
|
+
def copy_image_in_region_in_safe_mode_async(self, request):
|
573
|
+
r"""Region内复制镜像(新)
|
444
574
|
|
445
|
-
|
446
|
-
|
575
|
+
该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。
|
576
|
+
该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
577
|
+
|
578
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
447
579
|
|
448
|
-
该接口为扩展接口,主要用于用户将一个已有镜像复制为另一个镜像。复制镜像时,可以更改镜像的加密等属性,以满足不同的场景。 该接口为异步接口,返回job_id说明任务下发成功,查询异步任务状态,如果是success说明任务执行成功,如果是failed说明任务执行失败。如何查询异步任务,请参见异步任务查询。
|
449
580
|
|
450
|
-
:param
|
451
|
-
:
|
581
|
+
:param request: Request instance for CopyImageInRegionInSafeMode
|
582
|
+
:type request: :class:`huaweicloudsdkims.v2.CopyImageInRegionInSafeModeRequest`
|
583
|
+
:rtype: :class:`huaweicloudsdkims.v2.CopyImageInRegionInSafeModeResponse`
|
452
584
|
"""
|
585
|
+
http_info = self._copy_image_in_region_in_safe_mode_http_info(request)
|
586
|
+
return self._call_api(**http_info)
|
453
587
|
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
588
|
+
def copy_image_in_region_in_safe_mode_async_invoker(self, request):
|
589
|
+
http_info = self._copy_image_in_region_in_safe_mode_http_info(request)
|
590
|
+
return AsyncInvoker(self, http_info)
|
591
|
+
|
592
|
+
def _copy_image_in_region_in_safe_mode_http_info(self, request):
|
593
|
+
http_info = {
|
594
|
+
"method": "POST",
|
595
|
+
"resource_path": "/v2.1/cloudimages/{image_id}/copy",
|
596
|
+
"request_type": request.__class__.__name__,
|
597
|
+
"response_type": "CopyImageInRegionInSafeModeResponse"
|
598
|
+
}
|
599
|
+
|
600
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
601
|
+
|
602
|
+
cname = None
|
459
603
|
|
460
604
|
collection_formats = {}
|
461
605
|
|
@@ -469,11 +613,11 @@ class ImsAsyncClient(Client):
|
|
469
613
|
|
470
614
|
form_params = {}
|
471
615
|
|
472
|
-
|
616
|
+
body = None
|
473
617
|
if 'body' in local_var_params:
|
474
|
-
|
618
|
+
body = local_var_params['body']
|
475
619
|
if isinstance(request, SdkStreamRequest):
|
476
|
-
|
620
|
+
body = request.get_file_stream()
|
477
621
|
|
478
622
|
response_headers = []
|
479
623
|
|
@@ -482,45 +626,112 @@ class ImsAsyncClient(Client):
|
|
482
626
|
|
483
627
|
auth_settings = []
|
484
628
|
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
response_type='CopyImageInRegionResponse',
|
494
|
-
response_headers=response_headers,
|
495
|
-
auth_settings=auth_settings,
|
496
|
-
collection_formats=collection_formats,
|
497
|
-
request_type=request.__class__.__name__)
|
629
|
+
http_info["cname"] = cname
|
630
|
+
http_info["collection_formats"] = collection_formats
|
631
|
+
http_info["path_params"] = path_params
|
632
|
+
http_info["query_params"] = query_params
|
633
|
+
http_info["header_params"] = header_params
|
634
|
+
http_info["post_params"] = form_params
|
635
|
+
http_info["body"] = body
|
636
|
+
http_info["response_headers"] = response_headers
|
498
637
|
|
638
|
+
return http_info
|
499
639
|
|
500
640
|
def create_data_image_async(self, request):
|
501
|
-
"""使用外部镜像文件制作数据镜像
|
641
|
+
r"""使用外部镜像文件制作数据镜像
|
502
642
|
|
503
643
|
使用上传至OBS桶中的外部数据卷镜像文件制作数据镜像。作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态。具体请参考异步任务查询。
|
644
|
+
|
645
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
504
646
|
|
505
|
-
|
506
|
-
:
|
647
|
+
|
648
|
+
:param request: Request instance for CreateDataImage
|
649
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateDataImageRequest`
|
650
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateDataImageResponse`
|
507
651
|
"""
|
508
|
-
|
652
|
+
http_info = self._create_data_image_http_info(request)
|
653
|
+
return self._call_api(**http_info)
|
654
|
+
|
655
|
+
def create_data_image_async_invoker(self, request):
|
656
|
+
http_info = self._create_data_image_http_info(request)
|
657
|
+
return AsyncInvoker(self, http_info)
|
658
|
+
|
659
|
+
def _create_data_image_http_info(self, request):
|
660
|
+
http_info = {
|
661
|
+
"method": "POST",
|
662
|
+
"resource_path": "/v1/cloudimages/dataimages/action",
|
663
|
+
"request_type": request.__class__.__name__,
|
664
|
+
"response_type": "CreateDataImageResponse"
|
665
|
+
}
|
666
|
+
|
667
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
668
|
+
|
669
|
+
cname = None
|
670
|
+
|
671
|
+
collection_formats = {}
|
672
|
+
|
673
|
+
path_params = {}
|
674
|
+
|
675
|
+
query_params = []
|
676
|
+
|
677
|
+
header_params = {}
|
678
|
+
|
679
|
+
form_params = {}
|
680
|
+
|
681
|
+
body = None
|
682
|
+
if 'body' in local_var_params:
|
683
|
+
body = local_var_params['body']
|
684
|
+
if isinstance(request, SdkStreamRequest):
|
685
|
+
body = request.get_file_stream()
|
686
|
+
|
687
|
+
response_headers = []
|
509
688
|
|
510
|
-
|
511
|
-
|
689
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
690
|
+
['application/json;charset=UTF-8'])
|
691
|
+
|
692
|
+
auth_settings = []
|
693
|
+
|
694
|
+
http_info["cname"] = cname
|
695
|
+
http_info["collection_formats"] = collection_formats
|
696
|
+
http_info["path_params"] = path_params
|
697
|
+
http_info["query_params"] = query_params
|
698
|
+
http_info["header_params"] = header_params
|
699
|
+
http_info["post_params"] = form_params
|
700
|
+
http_info["body"] = body
|
701
|
+
http_info["response_headers"] = response_headers
|
702
|
+
|
703
|
+
return http_info
|
704
|
+
|
705
|
+
def create_data_image_in_safe_mode_async(self, request):
|
706
|
+
r"""使用外部镜像文件制作数据镜像(新)
|
512
707
|
|
513
708
|
使用上传至OBS桶中的外部数据卷镜像文件制作数据镜像。作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态。具体请参考异步任务查询。
|
709
|
+
|
710
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
711
|
+
|
514
712
|
|
515
|
-
:param
|
516
|
-
:
|
713
|
+
:param request: Request instance for CreateDataImageInSafeMode
|
714
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateDataImageInSafeModeRequest`
|
715
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateDataImageInSafeModeResponse`
|
517
716
|
"""
|
717
|
+
http_info = self._create_data_image_in_safe_mode_http_info(request)
|
718
|
+
return self._call_api(**http_info)
|
518
719
|
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
720
|
+
def create_data_image_in_safe_mode_async_invoker(self, request):
|
721
|
+
http_info = self._create_data_image_in_safe_mode_http_info(request)
|
722
|
+
return AsyncInvoker(self, http_info)
|
723
|
+
|
724
|
+
def _create_data_image_in_safe_mode_http_info(self, request):
|
725
|
+
http_info = {
|
726
|
+
"method": "POST",
|
727
|
+
"resource_path": "/v2.1/cloudimages/dataimages/action",
|
728
|
+
"request_type": request.__class__.__name__,
|
729
|
+
"response_type": "CreateDataImageInSafeModeResponse"
|
730
|
+
}
|
731
|
+
|
732
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
733
|
+
|
734
|
+
cname = None
|
524
735
|
|
525
736
|
collection_formats = {}
|
526
737
|
|
@@ -532,11 +743,11 @@ class ImsAsyncClient(Client):
|
|
532
743
|
|
533
744
|
form_params = {}
|
534
745
|
|
535
|
-
|
746
|
+
body = None
|
536
747
|
if 'body' in local_var_params:
|
537
|
-
|
748
|
+
body = local_var_params['body']
|
538
749
|
if isinstance(request, SdkStreamRequest):
|
539
|
-
|
750
|
+
body = request.get_file_stream()
|
540
751
|
|
541
752
|
response_headers = []
|
542
753
|
|
@@ -545,45 +756,134 @@ class ImsAsyncClient(Client):
|
|
545
756
|
|
546
757
|
auth_settings = []
|
547
758
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
response_type='CreateDataImageResponse',
|
557
|
-
response_headers=response_headers,
|
558
|
-
auth_settings=auth_settings,
|
559
|
-
collection_formats=collection_formats,
|
560
|
-
request_type=request.__class__.__name__)
|
759
|
+
http_info["cname"] = cname
|
760
|
+
http_info["collection_formats"] = collection_formats
|
761
|
+
http_info["path_params"] = path_params
|
762
|
+
http_info["query_params"] = query_params
|
763
|
+
http_info["header_params"] = header_params
|
764
|
+
http_info["post_params"] = form_params
|
765
|
+
http_info["body"] = body
|
766
|
+
http_info["response_headers"] = response_headers
|
561
767
|
|
768
|
+
return http_info
|
562
769
|
|
563
770
|
def create_image_async(self, request):
|
564
|
-
"""制作镜像
|
771
|
+
r"""制作镜像
|
772
|
+
|
773
|
+
本接口用于制作私有镜像,支持:
|
774
|
+
- 使用云服务器制作私有镜像。
|
775
|
+
- 使用上传至OBS桶中的外部镜像文件制作私有镜像。
|
776
|
+
- 使用数据卷制作系统盘镜像。
|
777
|
+
|
778
|
+
作为异步接口,调用成功,只是说明云平台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
779
|
+
|
780
|
+
不同场景必选参数说明:
|
781
|
+
|
782
|
+
- 使用云服务器制作镜像时的请求的必选参数:name,instance_id。
|
783
|
+
- 使用上传至OBS桶中的外部镜像文件时的请求必选参数:name,image_url,min_disk。
|
784
|
+
- 使用数据卷制作系统盘镜像时的请求必选参数:name,volume_id,os_version
|
785
|
+
|
786
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
787
|
+
|
788
|
+
|
789
|
+
:param request: Request instance for CreateImage
|
790
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateImageRequest`
|
791
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateImageResponse`
|
792
|
+
"""
|
793
|
+
http_info = self._create_image_http_info(request)
|
794
|
+
return self._call_api(**http_info)
|
795
|
+
|
796
|
+
def create_image_async_invoker(self, request):
|
797
|
+
http_info = self._create_image_http_info(request)
|
798
|
+
return AsyncInvoker(self, http_info)
|
799
|
+
|
800
|
+
def _create_image_http_info(self, request):
|
801
|
+
http_info = {
|
802
|
+
"method": "POST",
|
803
|
+
"resource_path": "/v2/cloudimages/action",
|
804
|
+
"request_type": request.__class__.__name__,
|
805
|
+
"response_type": "CreateImageResponse"
|
806
|
+
}
|
807
|
+
|
808
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
809
|
+
|
810
|
+
cname = None
|
565
811
|
|
566
|
-
|
812
|
+
collection_formats = {}
|
567
813
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
return self.create_image_with_http_info(request)
|
814
|
+
path_params = {}
|
815
|
+
|
816
|
+
query_params = []
|
572
817
|
|
573
|
-
|
574
|
-
"""制作镜像
|
818
|
+
header_params = {}
|
575
819
|
|
576
|
-
|
820
|
+
form_params = {}
|
577
821
|
|
578
|
-
|
579
|
-
:
|
580
|
-
|
822
|
+
body = None
|
823
|
+
if 'body' in local_var_params:
|
824
|
+
body = local_var_params['body']
|
825
|
+
if isinstance(request, SdkStreamRequest):
|
826
|
+
body = request.get_file_stream()
|
827
|
+
|
828
|
+
response_headers = []
|
829
|
+
|
830
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
831
|
+
['application/json;charset=UTF-8'])
|
832
|
+
|
833
|
+
auth_settings = []
|
581
834
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
835
|
+
http_info["cname"] = cname
|
836
|
+
http_info["collection_formats"] = collection_formats
|
837
|
+
http_info["path_params"] = path_params
|
838
|
+
http_info["query_params"] = query_params
|
839
|
+
http_info["header_params"] = header_params
|
840
|
+
http_info["post_params"] = form_params
|
841
|
+
http_info["body"] = body
|
842
|
+
http_info["response_headers"] = response_headers
|
843
|
+
|
844
|
+
return http_info
|
845
|
+
|
846
|
+
def create_image_in_safe_mode_async(self, request):
|
847
|
+
r"""制作镜像(新)
|
848
|
+
|
849
|
+
本接口用于制作私有镜像,支持:
|
850
|
+
- 使用云服务器制作私有镜像。
|
851
|
+
- 使用上传至OBS桶中的外部镜像文件制作私有镜像。
|
852
|
+
- 使用数据卷制作系统盘镜像。
|
853
|
+
|
854
|
+
作为异步接口,调用成功,只是说明云平台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
855
|
+
|
856
|
+
不同场景必选参数说明:
|
857
|
+
|
858
|
+
- 使用云服务器制作镜像时的请求的必选参数:name,instance_id。
|
859
|
+
- 使用上传至OBS桶中的外部镜像文件时的请求必选参数:name,image_url,min_disk。
|
860
|
+
- 使用数据卷制作系统盘镜像时的请求必选参数:name,volume_id,os_version
|
861
|
+
|
862
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
863
|
+
|
864
|
+
|
865
|
+
:param request: Request instance for CreateImageInSafeMode
|
866
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateImageInSafeModeRequest`
|
867
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateImageInSafeModeResponse`
|
868
|
+
"""
|
869
|
+
http_info = self._create_image_in_safe_mode_http_info(request)
|
870
|
+
return self._call_api(**http_info)
|
871
|
+
|
872
|
+
def create_image_in_safe_mode_async_invoker(self, request):
|
873
|
+
http_info = self._create_image_in_safe_mode_http_info(request)
|
874
|
+
return AsyncInvoker(self, http_info)
|
875
|
+
|
876
|
+
def _create_image_in_safe_mode_http_info(self, request):
|
877
|
+
http_info = {
|
878
|
+
"method": "POST",
|
879
|
+
"resource_path": "/v2.1/cloudimages/action",
|
880
|
+
"request_type": request.__class__.__name__,
|
881
|
+
"response_type": "CreateImageInSafeModeResponse"
|
882
|
+
}
|
883
|
+
|
884
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
885
|
+
|
886
|
+
cname = None
|
587
887
|
|
588
888
|
collection_formats = {}
|
589
889
|
|
@@ -595,11 +895,11 @@ class ImsAsyncClient(Client):
|
|
595
895
|
|
596
896
|
form_params = {}
|
597
897
|
|
598
|
-
|
898
|
+
body = None
|
599
899
|
if 'body' in local_var_params:
|
600
|
-
|
900
|
+
body = local_var_params['body']
|
601
901
|
if isinstance(request, SdkStreamRequest):
|
602
|
-
|
902
|
+
body = request.get_file_stream()
|
603
903
|
|
604
904
|
response_headers = []
|
605
905
|
|
@@ -608,45 +908,47 @@ class ImsAsyncClient(Client):
|
|
608
908
|
|
609
909
|
auth_settings = []
|
610
910
|
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
response_type='CreateImageResponse',
|
620
|
-
response_headers=response_headers,
|
621
|
-
auth_settings=auth_settings,
|
622
|
-
collection_formats=collection_formats,
|
623
|
-
request_type=request.__class__.__name__)
|
911
|
+
http_info["cname"] = cname
|
912
|
+
http_info["collection_formats"] = collection_formats
|
913
|
+
http_info["path_params"] = path_params
|
914
|
+
http_info["query_params"] = query_params
|
915
|
+
http_info["header_params"] = header_params
|
916
|
+
http_info["post_params"] = form_params
|
917
|
+
http_info["body"] = body
|
918
|
+
http_info["response_headers"] = response_headers
|
624
919
|
|
920
|
+
return http_info
|
625
921
|
|
626
922
|
def create_or_update_tags_async(self, request):
|
627
|
-
"""增加或修改标签
|
923
|
+
r"""增加或修改标签
|
628
924
|
|
629
925
|
该接口主要用于为某个镜像增加或修改一个自定义标签。通过自定义标签,用户可以将镜像进行分类。
|
926
|
+
|
927
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
630
928
|
|
631
|
-
|
632
|
-
:
|
929
|
+
|
930
|
+
:param request: Request instance for CreateOrUpdateTags
|
931
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateOrUpdateTagsRequest`
|
932
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateOrUpdateTagsResponse`
|
633
933
|
"""
|
634
|
-
|
934
|
+
http_info = self._create_or_update_tags_http_info(request)
|
935
|
+
return self._call_api(**http_info)
|
635
936
|
|
636
|
-
def
|
637
|
-
|
937
|
+
def create_or_update_tags_async_invoker(self, request):
|
938
|
+
http_info = self._create_or_update_tags_http_info(request)
|
939
|
+
return AsyncInvoker(self, http_info)
|
638
940
|
|
639
|
-
|
941
|
+
def _create_or_update_tags_http_info(self, request):
|
942
|
+
http_info = {
|
943
|
+
"method": "PUT",
|
944
|
+
"resource_path": "/v1/cloudimages/tags",
|
945
|
+
"request_type": request.__class__.__name__,
|
946
|
+
"response_type": "CreateOrUpdateTagsResponse"
|
947
|
+
}
|
640
948
|
|
641
|
-
:
|
642
|
-
:return: CreateOrUpdateTagsResponse
|
643
|
-
"""
|
949
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
644
950
|
|
645
|
-
|
646
|
-
local_var_params = {}
|
647
|
-
for attr in request.attribute_map:
|
648
|
-
if hasattr(request, attr):
|
649
|
-
local_var_params[attr] = getattr(request, attr)
|
951
|
+
cname = None
|
650
952
|
|
651
953
|
collection_formats = {}
|
652
954
|
|
@@ -658,11 +960,11 @@ class ImsAsyncClient(Client):
|
|
658
960
|
|
659
961
|
form_params = {}
|
660
962
|
|
661
|
-
|
963
|
+
body = None
|
662
964
|
if 'body' in local_var_params:
|
663
|
-
|
965
|
+
body = local_var_params['body']
|
664
966
|
if isinstance(request, SdkStreamRequest):
|
665
|
-
|
967
|
+
body = request.get_file_stream()
|
666
968
|
|
667
969
|
response_headers = []
|
668
970
|
|
@@ -671,45 +973,47 @@ class ImsAsyncClient(Client):
|
|
671
973
|
|
672
974
|
auth_settings = []
|
673
975
|
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
response_type='CreateOrUpdateTagsResponse',
|
683
|
-
response_headers=response_headers,
|
684
|
-
auth_settings=auth_settings,
|
685
|
-
collection_formats=collection_formats,
|
686
|
-
request_type=request.__class__.__name__)
|
976
|
+
http_info["cname"] = cname
|
977
|
+
http_info["collection_formats"] = collection_formats
|
978
|
+
http_info["path_params"] = path_params
|
979
|
+
http_info["query_params"] = query_params
|
980
|
+
http_info["header_params"] = header_params
|
981
|
+
http_info["post_params"] = form_params
|
982
|
+
http_info["body"] = body
|
983
|
+
http_info["response_headers"] = response_headers
|
687
984
|
|
985
|
+
return http_info
|
688
986
|
|
689
987
|
def create_whole_image_async(self, request):
|
690
|
-
"""制作整机镜像
|
988
|
+
r"""制作整机镜像
|
691
989
|
|
692
990
|
使用云服务器或者云服务器备份制作整机镜像。作为异步接口,调用成功,只是说明后台收到了制作整机镜像的请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
991
|
+
|
992
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
693
993
|
|
694
|
-
|
695
|
-
:
|
994
|
+
|
995
|
+
:param request: Request instance for CreateWholeImage
|
996
|
+
:type request: :class:`huaweicloudsdkims.v2.CreateWholeImageRequest`
|
997
|
+
:rtype: :class:`huaweicloudsdkims.v2.CreateWholeImageResponse`
|
696
998
|
"""
|
697
|
-
|
999
|
+
http_info = self._create_whole_image_http_info(request)
|
1000
|
+
return self._call_api(**http_info)
|
698
1001
|
|
699
|
-
def
|
700
|
-
|
1002
|
+
def create_whole_image_async_invoker(self, request):
|
1003
|
+
http_info = self._create_whole_image_http_info(request)
|
1004
|
+
return AsyncInvoker(self, http_info)
|
701
1005
|
|
702
|
-
|
1006
|
+
def _create_whole_image_http_info(self, request):
|
1007
|
+
http_info = {
|
1008
|
+
"method": "POST",
|
1009
|
+
"resource_path": "/v1/cloudimages/wholeimages/action",
|
1010
|
+
"request_type": request.__class__.__name__,
|
1011
|
+
"response_type": "CreateWholeImageResponse"
|
1012
|
+
}
|
703
1013
|
|
704
|
-
:
|
705
|
-
:return: CreateWholeImageResponse
|
706
|
-
"""
|
1014
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
707
1015
|
|
708
|
-
|
709
|
-
local_var_params = {}
|
710
|
-
for attr in request.attribute_map:
|
711
|
-
if hasattr(request, attr):
|
712
|
-
local_var_params[attr] = getattr(request, attr)
|
1016
|
+
cname = None
|
713
1017
|
|
714
1018
|
collection_formats = {}
|
715
1019
|
|
@@ -721,11 +1025,11 @@ class ImsAsyncClient(Client):
|
|
721
1025
|
|
722
1026
|
form_params = {}
|
723
1027
|
|
724
|
-
|
1028
|
+
body = None
|
725
1029
|
if 'body' in local_var_params:
|
726
|
-
|
1030
|
+
body = local_var_params['body']
|
727
1031
|
if isinstance(request, SdkStreamRequest):
|
728
|
-
|
1032
|
+
body = request.get_file_stream()
|
729
1033
|
|
730
1034
|
response_headers = []
|
731
1035
|
|
@@ -734,45 +1038,47 @@ class ImsAsyncClient(Client):
|
|
734
1038
|
|
735
1039
|
auth_settings = []
|
736
1040
|
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
response_type='CreateWholeImageResponse',
|
746
|
-
response_headers=response_headers,
|
747
|
-
auth_settings=auth_settings,
|
748
|
-
collection_formats=collection_formats,
|
749
|
-
request_type=request.__class__.__name__)
|
1041
|
+
http_info["cname"] = cname
|
1042
|
+
http_info["collection_formats"] = collection_formats
|
1043
|
+
http_info["path_params"] = path_params
|
1044
|
+
http_info["query_params"] = query_params
|
1045
|
+
http_info["header_params"] = header_params
|
1046
|
+
http_info["post_params"] = form_params
|
1047
|
+
http_info["body"] = body
|
1048
|
+
http_info["response_headers"] = response_headers
|
750
1049
|
|
1050
|
+
return http_info
|
751
1051
|
|
752
1052
|
def delete_image_tag_async(self, request):
|
753
|
-
"""删除镜像标签
|
1053
|
+
r"""删除镜像标签
|
754
1054
|
|
755
1055
|
该接口用于为镜像删除指定的标签
|
1056
|
+
|
1057
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
756
1058
|
|
757
|
-
|
758
|
-
:
|
1059
|
+
|
1060
|
+
:param request: Request instance for DeleteImageTag
|
1061
|
+
:type request: :class:`huaweicloudsdkims.v2.DeleteImageTagRequest`
|
1062
|
+
:rtype: :class:`huaweicloudsdkims.v2.DeleteImageTagResponse`
|
759
1063
|
"""
|
760
|
-
|
1064
|
+
http_info = self._delete_image_tag_http_info(request)
|
1065
|
+
return self._call_api(**http_info)
|
761
1066
|
|
762
|
-
def
|
763
|
-
|
1067
|
+
def delete_image_tag_async_invoker(self, request):
|
1068
|
+
http_info = self._delete_image_tag_http_info(request)
|
1069
|
+
return AsyncInvoker(self, http_info)
|
764
1070
|
|
765
|
-
|
1071
|
+
def _delete_image_tag_http_info(self, request):
|
1072
|
+
http_info = {
|
1073
|
+
"method": "DELETE",
|
1074
|
+
"resource_path": "/v2/{project_id}/images/{image_id}/tags/{key}",
|
1075
|
+
"request_type": request.__class__.__name__,
|
1076
|
+
"response_type": "DeleteImageTagResponse"
|
1077
|
+
}
|
766
1078
|
|
767
|
-
:
|
768
|
-
:return: DeleteImageTagResponse
|
769
|
-
"""
|
1079
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
770
1080
|
|
771
|
-
|
772
|
-
local_var_params = {}
|
773
|
-
for attr in request.attribute_map:
|
774
|
-
if hasattr(request, attr):
|
775
|
-
local_var_params[attr] = getattr(request, attr)
|
1081
|
+
cname = None
|
776
1082
|
|
777
1083
|
collection_formats = {}
|
778
1084
|
|
@@ -788,9 +1094,9 @@ class ImsAsyncClient(Client):
|
|
788
1094
|
|
789
1095
|
form_params = {}
|
790
1096
|
|
791
|
-
|
1097
|
+
body = None
|
792
1098
|
if isinstance(request, SdkStreamRequest):
|
793
|
-
|
1099
|
+
body = request.get_file_stream()
|
794
1100
|
|
795
1101
|
response_headers = []
|
796
1102
|
|
@@ -799,45 +1105,47 @@ class ImsAsyncClient(Client):
|
|
799
1105
|
|
800
1106
|
auth_settings = []
|
801
1107
|
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
response_type='DeleteImageTagResponse',
|
811
|
-
response_headers=response_headers,
|
812
|
-
auth_settings=auth_settings,
|
813
|
-
collection_formats=collection_formats,
|
814
|
-
request_type=request.__class__.__name__)
|
1108
|
+
http_info["cname"] = cname
|
1109
|
+
http_info["collection_formats"] = collection_formats
|
1110
|
+
http_info["path_params"] = path_params
|
1111
|
+
http_info["query_params"] = query_params
|
1112
|
+
http_info["header_params"] = header_params
|
1113
|
+
http_info["post_params"] = form_params
|
1114
|
+
http_info["body"] = body
|
1115
|
+
http_info["response_headers"] = response_headers
|
815
1116
|
|
1117
|
+
return http_info
|
816
1118
|
|
817
1119
|
def export_image_async(self, request):
|
818
|
-
"""导出镜像
|
1120
|
+
r"""导出镜像
|
819
1121
|
|
820
1122
|
该接口为扩展接口,用于用户将自己的私有镜像导出到指定的OBS桶中。
|
1123
|
+
|
1124
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
821
1125
|
|
822
|
-
|
823
|
-
:
|
1126
|
+
|
1127
|
+
:param request: Request instance for ExportImage
|
1128
|
+
:type request: :class:`huaweicloudsdkims.v2.ExportImageRequest`
|
1129
|
+
:rtype: :class:`huaweicloudsdkims.v2.ExportImageResponse`
|
824
1130
|
"""
|
825
|
-
|
1131
|
+
http_info = self._export_image_http_info(request)
|
1132
|
+
return self._call_api(**http_info)
|
826
1133
|
|
827
|
-
def
|
828
|
-
|
1134
|
+
def export_image_async_invoker(self, request):
|
1135
|
+
http_info = self._export_image_http_info(request)
|
1136
|
+
return AsyncInvoker(self, http_info)
|
829
1137
|
|
830
|
-
|
1138
|
+
def _export_image_http_info(self, request):
|
1139
|
+
http_info = {
|
1140
|
+
"method": "POST",
|
1141
|
+
"resource_path": "/v1/cloudimages/{image_id}/file",
|
1142
|
+
"request_type": request.__class__.__name__,
|
1143
|
+
"response_type": "ExportImageResponse"
|
1144
|
+
}
|
831
1145
|
|
832
|
-
:
|
833
|
-
:return: ExportImageResponse
|
834
|
-
"""
|
1146
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
835
1147
|
|
836
|
-
|
837
|
-
local_var_params = {}
|
838
|
-
for attr in request.attribute_map:
|
839
|
-
if hasattr(request, attr):
|
840
|
-
local_var_params[attr] = getattr(request, attr)
|
1148
|
+
cname = None
|
841
1149
|
|
842
1150
|
collection_formats = {}
|
843
1151
|
|
@@ -851,11 +1159,11 @@ class ImsAsyncClient(Client):
|
|
851
1159
|
|
852
1160
|
form_params = {}
|
853
1161
|
|
854
|
-
|
1162
|
+
body = None
|
855
1163
|
if 'body' in local_var_params:
|
856
|
-
|
1164
|
+
body = local_var_params['body']
|
857
1165
|
if isinstance(request, SdkStreamRequest):
|
858
|
-
|
1166
|
+
body = request.get_file_stream()
|
859
1167
|
|
860
1168
|
response_headers = []
|
861
1169
|
|
@@ -864,49 +1172,53 @@ class ImsAsyncClient(Client):
|
|
864
1172
|
|
865
1173
|
auth_settings = []
|
866
1174
|
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
response_type='ExportImageResponse',
|
876
|
-
response_headers=response_headers,
|
877
|
-
auth_settings=auth_settings,
|
878
|
-
collection_formats=collection_formats,
|
879
|
-
request_type=request.__class__.__name__)
|
1175
|
+
http_info["cname"] = cname
|
1176
|
+
http_info["collection_formats"] = collection_formats
|
1177
|
+
http_info["path_params"] = path_params
|
1178
|
+
http_info["query_params"] = query_params
|
1179
|
+
http_info["header_params"] = header_params
|
1180
|
+
http_info["post_params"] = form_params
|
1181
|
+
http_info["body"] = body
|
1182
|
+
http_info["response_headers"] = response_headers
|
880
1183
|
|
1184
|
+
return http_info
|
881
1185
|
|
882
|
-
def
|
883
|
-
"""
|
1186
|
+
def export_image_in_safe_mode_async(self, request):
|
1187
|
+
r"""导出镜像(新)
|
1188
|
+
|
1189
|
+
该接口为扩展接口,用于用户将自己的私有镜像导出到指定的OBS桶中。
|
1190
|
+
|
1191
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
884
1192
|
|
885
|
-
使用上传至OBS桶中的超大外部镜像文件制作私有镜像,目前仅支持RAW或ZVHD2格式镜像文件。且要求镜像文件大小不能超过1TB。 由于快速导入功能要求提前转换镜像文件格式为RAW或ZVHD2格式,因此镜像文件小于128GB时推荐您优先使用常规的创建私有镜像的方式。 作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
886
1193
|
|
887
|
-
:param
|
888
|
-
:
|
1194
|
+
:param request: Request instance for ExportImageInSafeMode
|
1195
|
+
:type request: :class:`huaweicloudsdkims.v2.ExportImageInSafeModeRequest`
|
1196
|
+
:rtype: :class:`huaweicloudsdkims.v2.ExportImageInSafeModeResponse`
|
889
1197
|
"""
|
890
|
-
|
1198
|
+
http_info = self._export_image_in_safe_mode_http_info(request)
|
1199
|
+
return self._call_api(**http_info)
|
891
1200
|
|
892
|
-
def
|
893
|
-
|
1201
|
+
def export_image_in_safe_mode_async_invoker(self, request):
|
1202
|
+
http_info = self._export_image_in_safe_mode_http_info(request)
|
1203
|
+
return AsyncInvoker(self, http_info)
|
894
1204
|
|
895
|
-
|
1205
|
+
def _export_image_in_safe_mode_http_info(self, request):
|
1206
|
+
http_info = {
|
1207
|
+
"method": "POST",
|
1208
|
+
"resource_path": "/v2.1/cloudimages/{image_id}/file",
|
1209
|
+
"request_type": request.__class__.__name__,
|
1210
|
+
"response_type": "ExportImageInSafeModeResponse"
|
1211
|
+
}
|
896
1212
|
|
897
|
-
:
|
898
|
-
:return: ImportImageQuickResponse
|
899
|
-
"""
|
1213
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
900
1214
|
|
901
|
-
|
902
|
-
local_var_params = {}
|
903
|
-
for attr in request.attribute_map:
|
904
|
-
if hasattr(request, attr):
|
905
|
-
local_var_params[attr] = getattr(request, attr)
|
1215
|
+
cname = None
|
906
1216
|
|
907
1217
|
collection_formats = {}
|
908
1218
|
|
909
1219
|
path_params = {}
|
1220
|
+
if 'image_id' in local_var_params:
|
1221
|
+
path_params['image_id'] = local_var_params['image_id']
|
910
1222
|
|
911
1223
|
query_params = []
|
912
1224
|
|
@@ -914,11 +1226,11 @@ class ImsAsyncClient(Client):
|
|
914
1226
|
|
915
1227
|
form_params = {}
|
916
1228
|
|
917
|
-
|
1229
|
+
body = None
|
918
1230
|
if 'body' in local_var_params:
|
919
|
-
|
1231
|
+
body = local_var_params['body']
|
920
1232
|
if isinstance(request, SdkStreamRequest):
|
921
|
-
|
1233
|
+
body = request.get_file_stream()
|
922
1234
|
|
923
1235
|
response_headers = []
|
924
1236
|
|
@@ -927,45 +1239,49 @@ class ImsAsyncClient(Client):
|
|
927
1239
|
|
928
1240
|
auth_settings = []
|
929
1241
|
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
response_type='ImportImageQuickResponse',
|
939
|
-
response_headers=response_headers,
|
940
|
-
auth_settings=auth_settings,
|
941
|
-
collection_formats=collection_formats,
|
942
|
-
request_type=request.__class__.__name__)
|
1242
|
+
http_info["cname"] = cname
|
1243
|
+
http_info["collection_formats"] = collection_formats
|
1244
|
+
http_info["path_params"] = path_params
|
1245
|
+
http_info["query_params"] = query_params
|
1246
|
+
http_info["header_params"] = header_params
|
1247
|
+
http_info["post_params"] = form_params
|
1248
|
+
http_info["body"] = body
|
1249
|
+
http_info["response_headers"] = response_headers
|
943
1250
|
|
1251
|
+
return http_info
|
944
1252
|
|
945
|
-
def
|
946
|
-
"""
|
1253
|
+
def import_image_quick_async(self, request):
|
1254
|
+
r"""镜像文件快速导入
|
947
1255
|
|
948
|
-
|
1256
|
+
使用上传至OBS桶中的超大外部镜像文件制作私有镜像,目前仅支持RAW或ZVHD2格式镜像文件。且要求镜像文件大小不能超过1TB。
|
1257
|
+
由于快速导入功能要求提前转换镜像文件格式为RAW或ZVHD2格式,因此镜像文件小于128GB时推荐您优先使用常规的创建私有镜像的方式。
|
1258
|
+
作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
1259
|
+
|
1260
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
949
1261
|
|
950
|
-
|
951
|
-
:
|
1262
|
+
|
1263
|
+
:param request: Request instance for ImportImageQuick
|
1264
|
+
:type request: :class:`huaweicloudsdkims.v2.ImportImageQuickRequest`
|
1265
|
+
:rtype: :class:`huaweicloudsdkims.v2.ImportImageQuickResponse`
|
952
1266
|
"""
|
953
|
-
|
1267
|
+
http_info = self._import_image_quick_http_info(request)
|
1268
|
+
return self._call_api(**http_info)
|
954
1269
|
|
955
|
-
def
|
956
|
-
|
1270
|
+
def import_image_quick_async_invoker(self, request):
|
1271
|
+
http_info = self._import_image_quick_http_info(request)
|
1272
|
+
return AsyncInvoker(self, http_info)
|
957
1273
|
|
958
|
-
|
1274
|
+
def _import_image_quick_http_info(self, request):
|
1275
|
+
http_info = {
|
1276
|
+
"method": "POST",
|
1277
|
+
"resource_path": "/v2/cloudimages/quickimport/action",
|
1278
|
+
"request_type": request.__class__.__name__,
|
1279
|
+
"response_type": "ImportImageQuickResponse"
|
1280
|
+
}
|
959
1281
|
|
960
|
-
:
|
961
|
-
:return: ListImageByTagsResponse
|
962
|
-
"""
|
1282
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
963
1283
|
|
964
|
-
|
965
|
-
local_var_params = {}
|
966
|
-
for attr in request.attribute_map:
|
967
|
-
if hasattr(request, attr):
|
968
|
-
local_var_params[attr] = getattr(request, attr)
|
1284
|
+
cname = None
|
969
1285
|
|
970
1286
|
collection_formats = {}
|
971
1287
|
|
@@ -977,11 +1293,11 @@ class ImsAsyncClient(Client):
|
|
977
1293
|
|
978
1294
|
form_params = {}
|
979
1295
|
|
980
|
-
|
1296
|
+
body = None
|
981
1297
|
if 'body' in local_var_params:
|
982
|
-
|
1298
|
+
body = local_var_params['body']
|
983
1299
|
if isinstance(request, SdkStreamRequest):
|
984
|
-
|
1300
|
+
body = request.get_file_stream()
|
985
1301
|
|
986
1302
|
response_headers = []
|
987
1303
|
|
@@ -990,51 +1306,53 @@ class ImsAsyncClient(Client):
|
|
990
1306
|
|
991
1307
|
auth_settings = []
|
992
1308
|
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
response_type='ListImageByTagsResponse',
|
1002
|
-
response_headers=response_headers,
|
1003
|
-
auth_settings=auth_settings,
|
1004
|
-
collection_formats=collection_formats,
|
1005
|
-
request_type=request.__class__.__name__)
|
1309
|
+
http_info["cname"] = cname
|
1310
|
+
http_info["collection_formats"] = collection_formats
|
1311
|
+
http_info["path_params"] = path_params
|
1312
|
+
http_info["query_params"] = query_params
|
1313
|
+
http_info["header_params"] = header_params
|
1314
|
+
http_info["post_params"] = form_params
|
1315
|
+
http_info["body"] = body
|
1316
|
+
http_info["response_headers"] = response_headers
|
1006
1317
|
|
1318
|
+
return http_info
|
1007
1319
|
|
1008
|
-
def
|
1009
|
-
"""
|
1320
|
+
def import_image_quick_in_safe_mode_async(self, request):
|
1321
|
+
r"""镜像文件快速导入(新)
|
1010
1322
|
|
1011
|
-
|
1323
|
+
使用上传至OBS桶中的超大外部镜像文件制作私有镜像,目前仅支持RAW或ZVHD2格式镜像文件。且要求镜像文件大小不能超过1TB。
|
1324
|
+
由于快速导入功能要求提前转换镜像文件格式为RAW或ZVHD2格式,因此镜像文件小于128GB时推荐您优先使用常规的创建私有镜像的方式。
|
1325
|
+
作为异步接口,调用成功,只是说明后台收到了制作请求,镜像是否制作成功需要通过异步任务查询接口查询该任务的执行状态,具体请参考异步任务查询。
|
1326
|
+
|
1327
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1012
1328
|
|
1013
|
-
|
1014
|
-
:
|
1329
|
+
|
1330
|
+
:param request: Request instance for ImportImageQuickInSafeMode
|
1331
|
+
:type request: :class:`huaweicloudsdkims.v2.ImportImageQuickInSafeModeRequest`
|
1332
|
+
:rtype: :class:`huaweicloudsdkims.v2.ImportImageQuickInSafeModeResponse`
|
1015
1333
|
"""
|
1016
|
-
|
1334
|
+
http_info = self._import_image_quick_in_safe_mode_http_info(request)
|
1335
|
+
return self._call_api(**http_info)
|
1017
1336
|
|
1018
|
-
def
|
1019
|
-
|
1337
|
+
def import_image_quick_in_safe_mode_async_invoker(self, request):
|
1338
|
+
http_info = self._import_image_quick_in_safe_mode_http_info(request)
|
1339
|
+
return AsyncInvoker(self, http_info)
|
1020
1340
|
|
1021
|
-
|
1341
|
+
def _import_image_quick_in_safe_mode_http_info(self, request):
|
1342
|
+
http_info = {
|
1343
|
+
"method": "POST",
|
1344
|
+
"resource_path": "/v2.1/cloudimages/quickimport/action",
|
1345
|
+
"request_type": request.__class__.__name__,
|
1346
|
+
"response_type": "ImportImageQuickInSafeModeResponse"
|
1347
|
+
}
|
1022
1348
|
|
1023
|
-
:
|
1024
|
-
:return: ListImageTagsResponse
|
1025
|
-
"""
|
1349
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1026
1350
|
|
1027
|
-
|
1028
|
-
local_var_params = {}
|
1029
|
-
for attr in request.attribute_map:
|
1030
|
-
if hasattr(request, attr):
|
1031
|
-
local_var_params[attr] = getattr(request, attr)
|
1351
|
+
cname = None
|
1032
1352
|
|
1033
1353
|
collection_formats = {}
|
1034
1354
|
|
1035
1355
|
path_params = {}
|
1036
|
-
if 'image_id' in local_var_params:
|
1037
|
-
path_params['image_id'] = local_var_params['image_id']
|
1038
1356
|
|
1039
1357
|
query_params = []
|
1040
1358
|
|
@@ -1042,70 +1360,270 @@ class ImsAsyncClient(Client):
|
|
1042
1360
|
|
1043
1361
|
form_params = {}
|
1044
1362
|
|
1045
|
-
|
1363
|
+
body = None
|
1364
|
+
if 'body' in local_var_params:
|
1365
|
+
body = local_var_params['body']
|
1046
1366
|
if isinstance(request, SdkStreamRequest):
|
1047
|
-
|
1367
|
+
body = request.get_file_stream()
|
1048
1368
|
|
1049
1369
|
response_headers = []
|
1050
1370
|
|
1051
1371
|
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1052
|
-
['application/json'])
|
1372
|
+
['application/json;charset=UTF-8'])
|
1053
1373
|
|
1054
1374
|
auth_settings = []
|
1055
1375
|
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
response_type='ListImageTagsResponse',
|
1065
|
-
response_headers=response_headers,
|
1066
|
-
auth_settings=auth_settings,
|
1067
|
-
collection_formats=collection_formats,
|
1068
|
-
request_type=request.__class__.__name__)
|
1376
|
+
http_info["cname"] = cname
|
1377
|
+
http_info["collection_formats"] = collection_formats
|
1378
|
+
http_info["path_params"] = path_params
|
1379
|
+
http_info["query_params"] = query_params
|
1380
|
+
http_info["header_params"] = header_params
|
1381
|
+
http_info["post_params"] = form_params
|
1382
|
+
http_info["body"] = body
|
1383
|
+
http_info["response_headers"] = response_headers
|
1069
1384
|
|
1385
|
+
return http_info
|
1070
1386
|
|
1071
|
-
def
|
1072
|
-
"""
|
1387
|
+
def list_image_by_tags_async(self, request):
|
1388
|
+
r"""按标签查询镜像
|
1389
|
+
|
1390
|
+
该接口用于按标签或其他条件对镜像进行过滤或者计数使用。
|
1391
|
+
|
1392
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1073
1393
|
|
1074
|
-
根据不同条件查询镜像列表信息。 可以在URI后面用‘?’和‘&’添加不同的查询条件组合,请参考请求样例。
|
1075
1394
|
|
1076
|
-
:param
|
1077
|
-
:
|
1395
|
+
:param request: Request instance for ListImageByTags
|
1396
|
+
:type request: :class:`huaweicloudsdkims.v2.ListImageByTagsRequest`
|
1397
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListImageByTagsResponse`
|
1078
1398
|
"""
|
1079
|
-
|
1399
|
+
http_info = self._list_image_by_tags_http_info(request)
|
1400
|
+
return self._call_api(**http_info)
|
1080
1401
|
|
1081
|
-
def
|
1082
|
-
|
1402
|
+
def list_image_by_tags_async_invoker(self, request):
|
1403
|
+
http_info = self._list_image_by_tags_http_info(request)
|
1404
|
+
return AsyncInvoker(self, http_info)
|
1083
1405
|
|
1084
|
-
|
1406
|
+
def _list_image_by_tags_http_info(self, request):
|
1407
|
+
http_info = {
|
1408
|
+
"method": "POST",
|
1409
|
+
"resource_path": "/v2/{project_id}/images/resource_instances/action",
|
1410
|
+
"request_type": request.__class__.__name__,
|
1411
|
+
"response_type": "ListImageByTagsResponse"
|
1412
|
+
}
|
1085
1413
|
|
1086
|
-
:
|
1087
|
-
:return: ListImagesResponse
|
1088
|
-
"""
|
1414
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1089
1415
|
|
1090
|
-
|
1091
|
-
local_var_params = {}
|
1092
|
-
for attr in request.attribute_map:
|
1093
|
-
if hasattr(request, attr):
|
1094
|
-
local_var_params[attr] = getattr(request, attr)
|
1416
|
+
cname = None
|
1095
1417
|
|
1096
1418
|
collection_formats = {}
|
1097
1419
|
|
1098
1420
|
path_params = {}
|
1099
1421
|
|
1100
1422
|
query_params = []
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
if '
|
1108
|
-
|
1423
|
+
|
1424
|
+
header_params = {}
|
1425
|
+
|
1426
|
+
form_params = {}
|
1427
|
+
|
1428
|
+
body = None
|
1429
|
+
if 'body' in local_var_params:
|
1430
|
+
body = local_var_params['body']
|
1431
|
+
if isinstance(request, SdkStreamRequest):
|
1432
|
+
body = request.get_file_stream()
|
1433
|
+
|
1434
|
+
response_headers = []
|
1435
|
+
|
1436
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1437
|
+
['application/json;charset=UTF-8'])
|
1438
|
+
|
1439
|
+
auth_settings = []
|
1440
|
+
|
1441
|
+
http_info["cname"] = cname
|
1442
|
+
http_info["collection_formats"] = collection_formats
|
1443
|
+
http_info["path_params"] = path_params
|
1444
|
+
http_info["query_params"] = query_params
|
1445
|
+
http_info["header_params"] = header_params
|
1446
|
+
http_info["post_params"] = form_params
|
1447
|
+
http_info["body"] = body
|
1448
|
+
http_info["response_headers"] = response_headers
|
1449
|
+
|
1450
|
+
return http_info
|
1451
|
+
|
1452
|
+
def list_image_members_async(self, request):
|
1453
|
+
r"""获取镜像成员列表
|
1454
|
+
|
1455
|
+
该接口用于共享镜像过程中,获取接受该镜像的成员列表。
|
1456
|
+
|
1457
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1458
|
+
|
1459
|
+
|
1460
|
+
:param request: Request instance for ListImageMembers
|
1461
|
+
:type request: :class:`huaweicloudsdkims.v2.ListImageMembersRequest`
|
1462
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListImageMembersResponse`
|
1463
|
+
"""
|
1464
|
+
http_info = self._list_image_members_http_info(request)
|
1465
|
+
return self._call_api(**http_info)
|
1466
|
+
|
1467
|
+
def list_image_members_async_invoker(self, request):
|
1468
|
+
http_info = self._list_image_members_http_info(request)
|
1469
|
+
return AsyncInvoker(self, http_info)
|
1470
|
+
|
1471
|
+
def _list_image_members_http_info(self, request):
|
1472
|
+
http_info = {
|
1473
|
+
"method": "GET",
|
1474
|
+
"resource_path": "/v1/{project_id}/cloudimages/{image_id}/members",
|
1475
|
+
"request_type": request.__class__.__name__,
|
1476
|
+
"response_type": "ListImageMembersResponse"
|
1477
|
+
}
|
1478
|
+
|
1479
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1480
|
+
|
1481
|
+
cname = None
|
1482
|
+
|
1483
|
+
collection_formats = {}
|
1484
|
+
|
1485
|
+
path_params = {}
|
1486
|
+
if 'image_id' in local_var_params:
|
1487
|
+
path_params['image_id'] = local_var_params['image_id']
|
1488
|
+
|
1489
|
+
query_params = []
|
1490
|
+
|
1491
|
+
header_params = {}
|
1492
|
+
|
1493
|
+
form_params = {}
|
1494
|
+
|
1495
|
+
body = None
|
1496
|
+
if isinstance(request, SdkStreamRequest):
|
1497
|
+
body = request.get_file_stream()
|
1498
|
+
|
1499
|
+
response_headers = []
|
1500
|
+
|
1501
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1502
|
+
['application/json'])
|
1503
|
+
|
1504
|
+
auth_settings = []
|
1505
|
+
|
1506
|
+
http_info["cname"] = cname
|
1507
|
+
http_info["collection_formats"] = collection_formats
|
1508
|
+
http_info["path_params"] = path_params
|
1509
|
+
http_info["query_params"] = query_params
|
1510
|
+
http_info["header_params"] = header_params
|
1511
|
+
http_info["post_params"] = form_params
|
1512
|
+
http_info["body"] = body
|
1513
|
+
http_info["response_headers"] = response_headers
|
1514
|
+
|
1515
|
+
return http_info
|
1516
|
+
|
1517
|
+
def list_image_tags_async(self, request):
|
1518
|
+
r"""查询镜像标签
|
1519
|
+
|
1520
|
+
该接口用于为查询指定镜像上的所有标签
|
1521
|
+
|
1522
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1523
|
+
|
1524
|
+
|
1525
|
+
:param request: Request instance for ListImageTags
|
1526
|
+
:type request: :class:`huaweicloudsdkims.v2.ListImageTagsRequest`
|
1527
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListImageTagsResponse`
|
1528
|
+
"""
|
1529
|
+
http_info = self._list_image_tags_http_info(request)
|
1530
|
+
return self._call_api(**http_info)
|
1531
|
+
|
1532
|
+
def list_image_tags_async_invoker(self, request):
|
1533
|
+
http_info = self._list_image_tags_http_info(request)
|
1534
|
+
return AsyncInvoker(self, http_info)
|
1535
|
+
|
1536
|
+
def _list_image_tags_http_info(self, request):
|
1537
|
+
http_info = {
|
1538
|
+
"method": "GET",
|
1539
|
+
"resource_path": "/v2/{project_id}/images/{image_id}/tags",
|
1540
|
+
"request_type": request.__class__.__name__,
|
1541
|
+
"response_type": "ListImageTagsResponse"
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1545
|
+
|
1546
|
+
cname = None
|
1547
|
+
|
1548
|
+
collection_formats = {}
|
1549
|
+
|
1550
|
+
path_params = {}
|
1551
|
+
if 'image_id' in local_var_params:
|
1552
|
+
path_params['image_id'] = local_var_params['image_id']
|
1553
|
+
|
1554
|
+
query_params = []
|
1555
|
+
|
1556
|
+
header_params = {}
|
1557
|
+
|
1558
|
+
form_params = {}
|
1559
|
+
|
1560
|
+
body = None
|
1561
|
+
if isinstance(request, SdkStreamRequest):
|
1562
|
+
body = request.get_file_stream()
|
1563
|
+
|
1564
|
+
response_headers = []
|
1565
|
+
|
1566
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1567
|
+
['application/json'])
|
1568
|
+
|
1569
|
+
auth_settings = []
|
1570
|
+
|
1571
|
+
http_info["cname"] = cname
|
1572
|
+
http_info["collection_formats"] = collection_formats
|
1573
|
+
http_info["path_params"] = path_params
|
1574
|
+
http_info["query_params"] = query_params
|
1575
|
+
http_info["header_params"] = header_params
|
1576
|
+
http_info["post_params"] = form_params
|
1577
|
+
http_info["body"] = body
|
1578
|
+
http_info["response_headers"] = response_headers
|
1579
|
+
|
1580
|
+
return http_info
|
1581
|
+
|
1582
|
+
def list_images_async(self, request):
|
1583
|
+
r"""查询镜像列表
|
1584
|
+
|
1585
|
+
根据不同条件查询镜像列表信息。
|
1586
|
+
可以在URI后面用‘?’和‘&’添加不同的查询条件组合,请参考请求样例。
|
1587
|
+
|
1588
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1589
|
+
|
1590
|
+
|
1591
|
+
:param request: Request instance for ListImages
|
1592
|
+
:type request: :class:`huaweicloudsdkims.v2.ListImagesRequest`
|
1593
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListImagesResponse`
|
1594
|
+
"""
|
1595
|
+
http_info = self._list_images_http_info(request)
|
1596
|
+
return self._call_api(**http_info)
|
1597
|
+
|
1598
|
+
def list_images_async_invoker(self, request):
|
1599
|
+
http_info = self._list_images_http_info(request)
|
1600
|
+
return AsyncInvoker(self, http_info)
|
1601
|
+
|
1602
|
+
def _list_images_http_info(self, request):
|
1603
|
+
http_info = {
|
1604
|
+
"method": "GET",
|
1605
|
+
"resource_path": "/v2/cloudimages",
|
1606
|
+
"request_type": request.__class__.__name__,
|
1607
|
+
"response_type": "ListImagesResponse"
|
1608
|
+
}
|
1609
|
+
|
1610
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1611
|
+
|
1612
|
+
cname = None
|
1613
|
+
|
1614
|
+
collection_formats = {}
|
1615
|
+
|
1616
|
+
path_params = {}
|
1617
|
+
|
1618
|
+
query_params = []
|
1619
|
+
if 'imagetype' in local_var_params:
|
1620
|
+
query_params.append(('__imagetype', local_var_params['imagetype']))
|
1621
|
+
if 'isregistered' in local_var_params:
|
1622
|
+
query_params.append(('__isregistered', local_var_params['isregistered']))
|
1623
|
+
if 'os_bit' in local_var_params:
|
1624
|
+
query_params.append(('__os_bit', local_var_params['os_bit']))
|
1625
|
+
if 'os_type' in local_var_params:
|
1626
|
+
query_params.append(('__os_type', local_var_params['os_type']))
|
1109
1627
|
if 'platform' in local_var_params:
|
1110
1628
|
query_params.append(('__platform', local_var_params['platform']))
|
1111
1629
|
if 'support_diskintensive' in local_var_params:
|
@@ -1177,9 +1695,9 @@ class ImsAsyncClient(Client):
|
|
1177
1695
|
|
1178
1696
|
form_params = {}
|
1179
1697
|
|
1180
|
-
|
1698
|
+
body = None
|
1181
1699
|
if isinstance(request, SdkStreamRequest):
|
1182
|
-
|
1700
|
+
body = request.get_file_stream()
|
1183
1701
|
|
1184
1702
|
response_headers = []
|
1185
1703
|
|
@@ -1188,45 +1706,47 @@ class ImsAsyncClient(Client):
|
|
1188
1706
|
|
1189
1707
|
auth_settings = []
|
1190
1708
|
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
response_type='ListImagesResponse',
|
1200
|
-
response_headers=response_headers,
|
1201
|
-
auth_settings=auth_settings,
|
1202
|
-
collection_formats=collection_formats,
|
1203
|
-
request_type=request.__class__.__name__)
|
1709
|
+
http_info["cname"] = cname
|
1710
|
+
http_info["collection_formats"] = collection_formats
|
1711
|
+
http_info["path_params"] = path_params
|
1712
|
+
http_info["query_params"] = query_params
|
1713
|
+
http_info["header_params"] = header_params
|
1714
|
+
http_info["post_params"] = form_params
|
1715
|
+
http_info["body"] = body
|
1716
|
+
http_info["response_headers"] = response_headers
|
1204
1717
|
|
1718
|
+
return http_info
|
1205
1719
|
|
1206
1720
|
def list_images_tags_async(self, request):
|
1207
|
-
"""查询租户所有镜像标签
|
1721
|
+
r"""查询租户所有镜像标签
|
1208
1722
|
|
1209
1723
|
该接口用于为查询租户的所有镜像上的标签。
|
1724
|
+
|
1725
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1726
|
+
|
1210
1727
|
|
1211
|
-
:param
|
1212
|
-
:
|
1728
|
+
:param request: Request instance for ListImagesTags
|
1729
|
+
:type request: :class:`huaweicloudsdkims.v2.ListImagesTagsRequest`
|
1730
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListImagesTagsResponse`
|
1213
1731
|
"""
|
1214
|
-
|
1732
|
+
http_info = self._list_images_tags_http_info(request)
|
1733
|
+
return self._call_api(**http_info)
|
1215
1734
|
|
1216
|
-
def
|
1217
|
-
|
1735
|
+
def list_images_tags_async_invoker(self, request):
|
1736
|
+
http_info = self._list_images_tags_http_info(request)
|
1737
|
+
return AsyncInvoker(self, http_info)
|
1218
1738
|
|
1219
|
-
|
1739
|
+
def _list_images_tags_http_info(self, request):
|
1740
|
+
http_info = {
|
1741
|
+
"method": "GET",
|
1742
|
+
"resource_path": "/v2/{project_id}/images/tags",
|
1743
|
+
"request_type": request.__class__.__name__,
|
1744
|
+
"response_type": "ListImagesTagsResponse"
|
1745
|
+
}
|
1220
1746
|
|
1221
|
-
:
|
1222
|
-
:return: ListImagesTagsResponse
|
1223
|
-
"""
|
1747
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1224
1748
|
|
1225
|
-
|
1226
|
-
local_var_params = {}
|
1227
|
-
for attr in request.attribute_map:
|
1228
|
-
if hasattr(request, attr):
|
1229
|
-
local_var_params[attr] = getattr(request, attr)
|
1749
|
+
cname = None
|
1230
1750
|
|
1231
1751
|
collection_formats = {}
|
1232
1752
|
|
@@ -1238,9 +1758,9 @@ class ImsAsyncClient(Client):
|
|
1238
1758
|
|
1239
1759
|
form_params = {}
|
1240
1760
|
|
1241
|
-
|
1761
|
+
body = None
|
1242
1762
|
if isinstance(request, SdkStreamRequest):
|
1243
|
-
|
1763
|
+
body = request.get_file_stream()
|
1244
1764
|
|
1245
1765
|
response_headers = []
|
1246
1766
|
|
@@ -1249,61 +1769,424 @@ class ImsAsyncClient(Client):
|
|
1249
1769
|
|
1250
1770
|
auth_settings = []
|
1251
1771
|
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
response_type='ListImagesTagsResponse',
|
1261
|
-
response_headers=response_headers,
|
1262
|
-
auth_settings=auth_settings,
|
1263
|
-
collection_formats=collection_formats,
|
1264
|
-
request_type=request.__class__.__name__)
|
1772
|
+
http_info["cname"] = cname
|
1773
|
+
http_info["collection_formats"] = collection_formats
|
1774
|
+
http_info["path_params"] = path_params
|
1775
|
+
http_info["query_params"] = query_params
|
1776
|
+
http_info["header_params"] = header_params
|
1777
|
+
http_info["post_params"] = form_params
|
1778
|
+
http_info["body"] = body
|
1779
|
+
http_info["response_headers"] = response_headers
|
1265
1780
|
|
1781
|
+
return http_info
|
1266
1782
|
|
1267
1783
|
def list_os_versions_async(self, request):
|
1268
|
-
"""查询镜像支持的OS列表
|
1784
|
+
r"""查询镜像支持的OS列表
|
1269
1785
|
|
1270
1786
|
查询当前区域弹性云服务器的OS兼容性列表。
|
1787
|
+
|
1788
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1271
1789
|
|
1272
|
-
|
1273
|
-
:
|
1790
|
+
|
1791
|
+
:param request: Request instance for ListOsVersions
|
1792
|
+
:type request: :class:`huaweicloudsdkims.v2.ListOsVersionsRequest`
|
1793
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListOsVersionsResponse`
|
1274
1794
|
"""
|
1275
|
-
|
1795
|
+
http_info = self._list_os_versions_http_info(request)
|
1796
|
+
return self._call_api(**http_info)
|
1276
1797
|
|
1277
|
-
def
|
1278
|
-
|
1798
|
+
def list_os_versions_async_invoker(self, request):
|
1799
|
+
http_info = self._list_os_versions_http_info(request)
|
1800
|
+
return AsyncInvoker(self, http_info)
|
1279
1801
|
|
1280
|
-
|
1802
|
+
def _list_os_versions_http_info(self, request):
|
1803
|
+
http_info = {
|
1804
|
+
"method": "GET",
|
1805
|
+
"resource_path": "/v1/cloudimages/os_version",
|
1806
|
+
"request_type": request.__class__.__name__,
|
1807
|
+
"response_type": "ListOsVersionsResponse"
|
1808
|
+
}
|
1809
|
+
|
1810
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1811
|
+
|
1812
|
+
cname = None
|
1813
|
+
|
1814
|
+
collection_formats = {}
|
1815
|
+
|
1816
|
+
path_params = {}
|
1817
|
+
|
1818
|
+
query_params = []
|
1819
|
+
if 'tag' in local_var_params:
|
1820
|
+
query_params.append(('tag', local_var_params['tag']))
|
1821
|
+
|
1822
|
+
header_params = {}
|
1823
|
+
|
1824
|
+
form_params = {}
|
1825
|
+
|
1826
|
+
body = None
|
1827
|
+
if isinstance(request, SdkStreamRequest):
|
1828
|
+
body = request.get_file_stream()
|
1829
|
+
|
1830
|
+
response_headers = []
|
1831
|
+
|
1832
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1833
|
+
['application/json'])
|
1834
|
+
|
1835
|
+
auth_settings = []
|
1836
|
+
|
1837
|
+
http_info["cname"] = cname
|
1838
|
+
http_info["collection_formats"] = collection_formats
|
1839
|
+
http_info["path_params"] = path_params
|
1840
|
+
http_info["query_params"] = query_params
|
1841
|
+
http_info["header_params"] = header_params
|
1842
|
+
http_info["post_params"] = form_params
|
1843
|
+
http_info["body"] = body
|
1844
|
+
http_info["response_headers"] = response_headers
|
1845
|
+
|
1846
|
+
return http_info
|
1847
|
+
|
1848
|
+
def list_tags_async(self, request):
|
1849
|
+
r"""按条件查询租户镜像标签列表
|
1850
|
+
|
1851
|
+
根据不同条件查询镜像标签列表信息。
|
1852
|
+
|
1853
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1854
|
+
|
1855
|
+
|
1856
|
+
:param request: Request instance for ListTags
|
1857
|
+
:type request: :class:`huaweicloudsdkims.v2.ListTagsRequest`
|
1858
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListTagsResponse`
|
1859
|
+
"""
|
1860
|
+
http_info = self._list_tags_http_info(request)
|
1861
|
+
return self._call_api(**http_info)
|
1862
|
+
|
1863
|
+
def list_tags_async_invoker(self, request):
|
1864
|
+
http_info = self._list_tags_http_info(request)
|
1865
|
+
return AsyncInvoker(self, http_info)
|
1866
|
+
|
1867
|
+
def _list_tags_http_info(self, request):
|
1868
|
+
http_info = {
|
1869
|
+
"method": "GET",
|
1870
|
+
"resource_path": "/v1/cloudimages/tags",
|
1871
|
+
"request_type": request.__class__.__name__,
|
1872
|
+
"response_type": "ListTagsResponse"
|
1873
|
+
}
|
1874
|
+
|
1875
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1876
|
+
|
1877
|
+
cname = None
|
1878
|
+
|
1879
|
+
collection_formats = {}
|
1880
|
+
|
1881
|
+
path_params = {}
|
1882
|
+
|
1883
|
+
query_params = []
|
1884
|
+
if 'limit' in local_var_params:
|
1885
|
+
query_params.append(('limit', local_var_params['limit']))
|
1886
|
+
if 'page' in local_var_params:
|
1887
|
+
query_params.append(('page', local_var_params['page']))
|
1888
|
+
if 'imagetype' in local_var_params:
|
1889
|
+
query_params.append(('__imagetype', local_var_params['imagetype']))
|
1890
|
+
if 'id' in local_var_params:
|
1891
|
+
query_params.append(('id', local_var_params['id']))
|
1892
|
+
if 'status' in local_var_params:
|
1893
|
+
query_params.append(('status', local_var_params['status']))
|
1894
|
+
if 'name' in local_var_params:
|
1895
|
+
query_params.append(('name', local_var_params['name']))
|
1896
|
+
if 'min_disk' in local_var_params:
|
1897
|
+
query_params.append(('min_disk', local_var_params['min_disk']))
|
1898
|
+
if 'platform' in local_var_params:
|
1899
|
+
query_params.append(('__platform', local_var_params['platform']))
|
1900
|
+
if 'os_type' in local_var_params:
|
1901
|
+
query_params.append(('__os_type', local_var_params['os_type']))
|
1902
|
+
if 'member_status' in local_var_params:
|
1903
|
+
query_params.append(('member_status', local_var_params['member_status']))
|
1904
|
+
if 'virtual_env_type' in local_var_params:
|
1905
|
+
query_params.append(('virtual_env_type', local_var_params['virtual_env_type']))
|
1906
|
+
if 'enterprise_project_id' in local_var_params:
|
1907
|
+
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
|
1908
|
+
if 'architecture' in local_var_params:
|
1909
|
+
query_params.append(('architecture', local_var_params['architecture']))
|
1910
|
+
if 'created_at' in local_var_params:
|
1911
|
+
query_params.append(('created_at', local_var_params['created_at']))
|
1912
|
+
if 'updated_at' in local_var_params:
|
1913
|
+
query_params.append(('updated_at', local_var_params['updated_at']))
|
1914
|
+
|
1915
|
+
header_params = {}
|
1916
|
+
|
1917
|
+
form_params = {}
|
1918
|
+
|
1919
|
+
body = None
|
1920
|
+
if isinstance(request, SdkStreamRequest):
|
1921
|
+
body = request.get_file_stream()
|
1922
|
+
|
1923
|
+
response_headers = []
|
1924
|
+
|
1925
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1926
|
+
['application/json'])
|
1927
|
+
|
1928
|
+
auth_settings = []
|
1929
|
+
|
1930
|
+
http_info["cname"] = cname
|
1931
|
+
http_info["collection_formats"] = collection_formats
|
1932
|
+
http_info["path_params"] = path_params
|
1933
|
+
http_info["query_params"] = query_params
|
1934
|
+
http_info["header_params"] = header_params
|
1935
|
+
http_info["post_params"] = form_params
|
1936
|
+
http_info["body"] = body
|
1937
|
+
http_info["response_headers"] = response_headers
|
1938
|
+
|
1939
|
+
return http_info
|
1940
|
+
|
1941
|
+
def register_image_async(self, request):
|
1942
|
+
r"""注册镜像
|
1943
|
+
|
1944
|
+
该接口用于将镜像文件注册为云平台未初始化的私有镜像。
|
1945
|
+
使用该接口注册镜像的具体步骤如下:
|
1946
|
+
将镜像文件上传到OBS个人桶中。具体操作请参见《对象存储服务客户端指南(OBS Browser)》或《对象存储服务API参考》。
|
1947
|
+
使用创建镜像元数据接口创建镜像元数据。调用成功后,保存该镜像的ID。创建镜像元数据请参考创建镜像元数据(OpenStack原生)。
|
1948
|
+
根据2得到的镜像ID,使用注册镜像接口注册OBS桶中的镜像文件。
|
1949
|
+
注册镜像接口作为异步接口,调用成功后,说明后台收到了注册请求。需要根据镜像ID查询该镜像状态验证镜像注册是否成功。当镜像状态变为“active”时,表示镜像注册成功。
|
1950
|
+
如何查询异步任务,请参见异步任务查询。
|
1951
|
+
|
1952
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1953
|
+
|
1954
|
+
|
1955
|
+
:param request: Request instance for RegisterImage
|
1956
|
+
:type request: :class:`huaweicloudsdkims.v2.RegisterImageRequest`
|
1957
|
+
:rtype: :class:`huaweicloudsdkims.v2.RegisterImageResponse`
|
1958
|
+
"""
|
1959
|
+
http_info = self._register_image_http_info(request)
|
1960
|
+
return self._call_api(**http_info)
|
1961
|
+
|
1962
|
+
def register_image_async_invoker(self, request):
|
1963
|
+
http_info = self._register_image_http_info(request)
|
1964
|
+
return AsyncInvoker(self, http_info)
|
1965
|
+
|
1966
|
+
def _register_image_http_info(self, request):
|
1967
|
+
http_info = {
|
1968
|
+
"method": "PUT",
|
1969
|
+
"resource_path": "/v1/cloudimages/{image_id}/upload",
|
1970
|
+
"request_type": request.__class__.__name__,
|
1971
|
+
"response_type": "RegisterImageResponse"
|
1972
|
+
}
|
1973
|
+
|
1974
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1975
|
+
|
1976
|
+
cname = None
|
1977
|
+
|
1978
|
+
collection_formats = {}
|
1979
|
+
|
1980
|
+
path_params = {}
|
1981
|
+
if 'image_id' in local_var_params:
|
1982
|
+
path_params['image_id'] = local_var_params['image_id']
|
1983
|
+
|
1984
|
+
query_params = []
|
1985
|
+
|
1986
|
+
header_params = {}
|
1987
|
+
|
1988
|
+
form_params = {}
|
1989
|
+
|
1990
|
+
body = None
|
1991
|
+
if 'body' in local_var_params:
|
1992
|
+
body = local_var_params['body']
|
1993
|
+
if isinstance(request, SdkStreamRequest):
|
1994
|
+
body = request.get_file_stream()
|
1995
|
+
|
1996
|
+
response_headers = []
|
1997
|
+
|
1998
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1999
|
+
['application/json;charset=UTF-8'])
|
2000
|
+
|
2001
|
+
auth_settings = []
|
2002
|
+
|
2003
|
+
http_info["cname"] = cname
|
2004
|
+
http_info["collection_formats"] = collection_formats
|
2005
|
+
http_info["path_params"] = path_params
|
2006
|
+
http_info["query_params"] = query_params
|
2007
|
+
http_info["header_params"] = header_params
|
2008
|
+
http_info["post_params"] = form_params
|
2009
|
+
http_info["body"] = body
|
2010
|
+
http_info["response_headers"] = response_headers
|
2011
|
+
|
2012
|
+
return http_info
|
2013
|
+
|
2014
|
+
def show_image_member_async(self, request):
|
2015
|
+
r"""获取镜像成员详情
|
2016
|
+
|
2017
|
+
该接口主要用于镜像共享中查询某个镜像成员的详情。
|
2018
|
+
|
2019
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2020
|
+
|
2021
|
+
|
2022
|
+
:param request: Request instance for ShowImageMember
|
2023
|
+
:type request: :class:`huaweicloudsdkims.v2.ShowImageMemberRequest`
|
2024
|
+
:rtype: :class:`huaweicloudsdkims.v2.ShowImageMemberResponse`
|
2025
|
+
"""
|
2026
|
+
http_info = self._show_image_member_http_info(request)
|
2027
|
+
return self._call_api(**http_info)
|
2028
|
+
|
2029
|
+
def show_image_member_async_invoker(self, request):
|
2030
|
+
http_info = self._show_image_member_http_info(request)
|
2031
|
+
return AsyncInvoker(self, http_info)
|
2032
|
+
|
2033
|
+
def _show_image_member_http_info(self, request):
|
2034
|
+
http_info = {
|
2035
|
+
"method": "GET",
|
2036
|
+
"resource_path": "/v1/{project_id}/cloudimages/{image_id}/members/{member_id}",
|
2037
|
+
"request_type": request.__class__.__name__,
|
2038
|
+
"response_type": "ShowImageMemberResponse"
|
2039
|
+
}
|
2040
|
+
|
2041
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2042
|
+
|
2043
|
+
cname = None
|
2044
|
+
|
2045
|
+
collection_formats = {}
|
2046
|
+
|
2047
|
+
path_params = {}
|
2048
|
+
if 'image_id' in local_var_params:
|
2049
|
+
path_params['image_id'] = local_var_params['image_id']
|
2050
|
+
if 'member_id' in local_var_params:
|
2051
|
+
path_params['member_id'] = local_var_params['member_id']
|
2052
|
+
|
2053
|
+
query_params = []
|
2054
|
+
|
2055
|
+
header_params = {}
|
2056
|
+
|
2057
|
+
form_params = {}
|
2058
|
+
|
2059
|
+
body = None
|
2060
|
+
if isinstance(request, SdkStreamRequest):
|
2061
|
+
body = request.get_file_stream()
|
2062
|
+
|
2063
|
+
response_headers = []
|
2064
|
+
|
2065
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
2066
|
+
['application/json'])
|
2067
|
+
|
2068
|
+
auth_settings = []
|
2069
|
+
|
2070
|
+
http_info["cname"] = cname
|
2071
|
+
http_info["collection_formats"] = collection_formats
|
2072
|
+
http_info["path_params"] = path_params
|
2073
|
+
http_info["query_params"] = query_params
|
2074
|
+
http_info["header_params"] = header_params
|
2075
|
+
http_info["post_params"] = form_params
|
2076
|
+
http_info["body"] = body
|
2077
|
+
http_info["response_headers"] = response_headers
|
2078
|
+
|
2079
|
+
return http_info
|
2080
|
+
|
2081
|
+
def show_image_quota_async(self, request):
|
2082
|
+
r"""查询镜像配额
|
2083
|
+
|
2084
|
+
该接口为扩展接口,主要用于查询租户在当前Region的私有镜像的配额数量。
|
2085
|
+
|
2086
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2087
|
+
|
2088
|
+
|
2089
|
+
:param request: Request instance for ShowImageQuota
|
2090
|
+
:type request: :class:`huaweicloudsdkims.v2.ShowImageQuotaRequest`
|
2091
|
+
:rtype: :class:`huaweicloudsdkims.v2.ShowImageQuotaResponse`
|
2092
|
+
"""
|
2093
|
+
http_info = self._show_image_quota_http_info(request)
|
2094
|
+
return self._call_api(**http_info)
|
2095
|
+
|
2096
|
+
def show_image_quota_async_invoker(self, request):
|
2097
|
+
http_info = self._show_image_quota_http_info(request)
|
2098
|
+
return AsyncInvoker(self, http_info)
|
2099
|
+
|
2100
|
+
def _show_image_quota_http_info(self, request):
|
2101
|
+
http_info = {
|
2102
|
+
"method": "GET",
|
2103
|
+
"resource_path": "/v1/cloudimages/quota",
|
2104
|
+
"request_type": request.__class__.__name__,
|
2105
|
+
"response_type": "ShowImageQuotaResponse"
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2109
|
+
|
2110
|
+
cname = None
|
2111
|
+
|
2112
|
+
collection_formats = {}
|
2113
|
+
|
2114
|
+
path_params = {}
|
2115
|
+
|
2116
|
+
query_params = []
|
2117
|
+
|
2118
|
+
header_params = {}
|
2119
|
+
|
2120
|
+
form_params = {}
|
2121
|
+
|
2122
|
+
body = None
|
2123
|
+
if isinstance(request, SdkStreamRequest):
|
2124
|
+
body = request.get_file_stream()
|
2125
|
+
|
2126
|
+
response_headers = []
|
2127
|
+
|
2128
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
2129
|
+
['application/json'])
|
2130
|
+
|
2131
|
+
auth_settings = []
|
2132
|
+
|
2133
|
+
http_info["cname"] = cname
|
2134
|
+
http_info["collection_formats"] = collection_formats
|
2135
|
+
http_info["path_params"] = path_params
|
2136
|
+
http_info["query_params"] = query_params
|
2137
|
+
http_info["header_params"] = header_params
|
2138
|
+
http_info["post_params"] = form_params
|
2139
|
+
http_info["body"] = body
|
2140
|
+
http_info["response_headers"] = response_headers
|
2141
|
+
|
2142
|
+
return http_info
|
2143
|
+
|
2144
|
+
def show_job_async(self, request):
|
2145
|
+
r"""异步任务查询
|
2146
|
+
|
2147
|
+
该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。
|
2148
|
+
|
2149
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2150
|
+
|
2151
|
+
|
2152
|
+
:param request: Request instance for ShowJob
|
2153
|
+
:type request: :class:`huaweicloudsdkims.v2.ShowJobRequest`
|
2154
|
+
:rtype: :class:`huaweicloudsdkims.v2.ShowJobResponse`
|
2155
|
+
"""
|
2156
|
+
http_info = self._show_job_http_info(request)
|
2157
|
+
return self._call_api(**http_info)
|
2158
|
+
|
2159
|
+
def show_job_async_invoker(self, request):
|
2160
|
+
http_info = self._show_job_http_info(request)
|
2161
|
+
return AsyncInvoker(self, http_info)
|
2162
|
+
|
2163
|
+
def _show_job_http_info(self, request):
|
2164
|
+
http_info = {
|
2165
|
+
"method": "GET",
|
2166
|
+
"resource_path": "/v1/{project_id}/jobs/{job_id}",
|
2167
|
+
"request_type": request.__class__.__name__,
|
2168
|
+
"response_type": "ShowJobResponse"
|
2169
|
+
}
|
1281
2170
|
|
1282
|
-
:
|
1283
|
-
:return: ListOsVersionsResponse
|
1284
|
-
"""
|
2171
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1285
2172
|
|
1286
|
-
|
1287
|
-
local_var_params = {}
|
1288
|
-
for attr in request.attribute_map:
|
1289
|
-
if hasattr(request, attr):
|
1290
|
-
local_var_params[attr] = getattr(request, attr)
|
2173
|
+
cname = None
|
1291
2174
|
|
1292
2175
|
collection_formats = {}
|
1293
2176
|
|
1294
2177
|
path_params = {}
|
2178
|
+
if 'job_id' in local_var_params:
|
2179
|
+
path_params['job_id'] = local_var_params['job_id']
|
1295
2180
|
|
1296
2181
|
query_params = []
|
1297
|
-
if 'tag' in local_var_params:
|
1298
|
-
query_params.append(('tag', local_var_params['tag']))
|
1299
2182
|
|
1300
2183
|
header_params = {}
|
1301
2184
|
|
1302
2185
|
form_params = {}
|
1303
2186
|
|
1304
|
-
|
2187
|
+
body = None
|
1305
2188
|
if isinstance(request, SdkStreamRequest):
|
1306
|
-
|
2189
|
+
body = request.get_file_stream()
|
1307
2190
|
|
1308
2191
|
response_headers = []
|
1309
2192
|
|
@@ -1312,89 +2195,63 @@ class ImsAsyncClient(Client):
|
|
1312
2195
|
|
1313
2196
|
auth_settings = []
|
1314
2197
|
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
response_type='ListOsVersionsResponse',
|
1324
|
-
response_headers=response_headers,
|
1325
|
-
auth_settings=auth_settings,
|
1326
|
-
collection_formats=collection_formats,
|
1327
|
-
request_type=request.__class__.__name__)
|
2198
|
+
http_info["cname"] = cname
|
2199
|
+
http_info["collection_formats"] = collection_formats
|
2200
|
+
http_info["path_params"] = path_params
|
2201
|
+
http_info["query_params"] = query_params
|
2202
|
+
http_info["header_params"] = header_params
|
2203
|
+
http_info["post_params"] = form_params
|
2204
|
+
http_info["body"] = body
|
2205
|
+
http_info["response_headers"] = response_headers
|
1328
2206
|
|
2207
|
+
return http_info
|
1329
2208
|
|
1330
|
-
def
|
1331
|
-
"""
|
2209
|
+
def show_job_progress_async(self, request):
|
2210
|
+
r"""异步任务进度查询
|
1332
2211
|
|
1333
|
-
|
2212
|
+
该接口为扩展接口,主要用于查询异步任务进度。
|
2213
|
+
|
2214
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1334
2215
|
|
1335
|
-
|
1336
|
-
:
|
2216
|
+
|
2217
|
+
:param request: Request instance for ShowJobProgress
|
2218
|
+
:type request: :class:`huaweicloudsdkims.v2.ShowJobProgressRequest`
|
2219
|
+
:rtype: :class:`huaweicloudsdkims.v2.ShowJobProgressResponse`
|
1337
2220
|
"""
|
1338
|
-
|
2221
|
+
http_info = self._show_job_progress_http_info(request)
|
2222
|
+
return self._call_api(**http_info)
|
1339
2223
|
|
1340
|
-
def
|
1341
|
-
|
2224
|
+
def show_job_progress_async_invoker(self, request):
|
2225
|
+
http_info = self._show_job_progress_http_info(request)
|
2226
|
+
return AsyncInvoker(self, http_info)
|
1342
2227
|
|
1343
|
-
|
2228
|
+
def _show_job_progress_http_info(self, request):
|
2229
|
+
http_info = {
|
2230
|
+
"method": "GET",
|
2231
|
+
"resource_path": "/v1/cloudimages/job/{job_id}",
|
2232
|
+
"request_type": request.__class__.__name__,
|
2233
|
+
"response_type": "ShowJobProgressResponse"
|
2234
|
+
}
|
1344
2235
|
|
1345
|
-
:
|
1346
|
-
:return: ListTagsResponse
|
1347
|
-
"""
|
2236
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1348
2237
|
|
1349
|
-
|
1350
|
-
local_var_params = {}
|
1351
|
-
for attr in request.attribute_map:
|
1352
|
-
if hasattr(request, attr):
|
1353
|
-
local_var_params[attr] = getattr(request, attr)
|
2238
|
+
cname = None
|
1354
2239
|
|
1355
2240
|
collection_formats = {}
|
1356
2241
|
|
1357
2242
|
path_params = {}
|
2243
|
+
if 'job_id' in local_var_params:
|
2244
|
+
path_params['job_id'] = local_var_params['job_id']
|
1358
2245
|
|
1359
2246
|
query_params = []
|
1360
|
-
if 'limit' in local_var_params:
|
1361
|
-
query_params.append(('limit', local_var_params['limit']))
|
1362
|
-
if 'page' in local_var_params:
|
1363
|
-
query_params.append(('page', local_var_params['page']))
|
1364
|
-
if 'imagetype' in local_var_params:
|
1365
|
-
query_params.append(('__imagetype', local_var_params['imagetype']))
|
1366
|
-
if 'id' in local_var_params:
|
1367
|
-
query_params.append(('id', local_var_params['id']))
|
1368
|
-
if 'status' in local_var_params:
|
1369
|
-
query_params.append(('status', local_var_params['status']))
|
1370
|
-
if 'name' in local_var_params:
|
1371
|
-
query_params.append(('name', local_var_params['name']))
|
1372
|
-
if 'min_disk' in local_var_params:
|
1373
|
-
query_params.append(('min_disk', local_var_params['min_disk']))
|
1374
|
-
if 'platform' in local_var_params:
|
1375
|
-
query_params.append(('__platform', local_var_params['platform']))
|
1376
|
-
if 'os_type' in local_var_params:
|
1377
|
-
query_params.append(('__os_type', local_var_params['os_type']))
|
1378
|
-
if 'member_status' in local_var_params:
|
1379
|
-
query_params.append(('member_status', local_var_params['member_status']))
|
1380
|
-
if 'virtual_env_type' in local_var_params:
|
1381
|
-
query_params.append(('virtual_env_type', local_var_params['virtual_env_type']))
|
1382
|
-
if 'enterprise_project_id' in local_var_params:
|
1383
|
-
query_params.append(('enterprise_project_id', local_var_params['enterprise_project_id']))
|
1384
|
-
if 'architecture' in local_var_params:
|
1385
|
-
query_params.append(('architecture', local_var_params['architecture']))
|
1386
|
-
if 'created_at' in local_var_params:
|
1387
|
-
query_params.append(('created_at', local_var_params['created_at']))
|
1388
|
-
if 'updated_at' in local_var_params:
|
1389
|
-
query_params.append(('updated_at', local_var_params['updated_at']))
|
1390
2247
|
|
1391
2248
|
header_params = {}
|
1392
2249
|
|
1393
2250
|
form_params = {}
|
1394
2251
|
|
1395
|
-
|
2252
|
+
body = None
|
1396
2253
|
if isinstance(request, SdkStreamRequest):
|
1397
|
-
|
2254
|
+
body = request.get_file_stream()
|
1398
2255
|
|
1399
2256
|
response_headers = []
|
1400
2257
|
|
@@ -1403,45 +2260,47 @@ class ImsAsyncClient(Client):
|
|
1403
2260
|
|
1404
2261
|
auth_settings = []
|
1405
2262
|
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
response_type='ListTagsResponse',
|
1415
|
-
response_headers=response_headers,
|
1416
|
-
auth_settings=auth_settings,
|
1417
|
-
collection_formats=collection_formats,
|
1418
|
-
request_type=request.__class__.__name__)
|
2263
|
+
http_info["cname"] = cname
|
2264
|
+
http_info["collection_formats"] = collection_formats
|
2265
|
+
http_info["path_params"] = path_params
|
2266
|
+
http_info["query_params"] = query_params
|
2267
|
+
http_info["header_params"] = header_params
|
2268
|
+
http_info["post_params"] = form_params
|
2269
|
+
http_info["body"] = body
|
2270
|
+
http_info["response_headers"] = response_headers
|
1419
2271
|
|
2272
|
+
return http_info
|
1420
2273
|
|
1421
|
-
def
|
1422
|
-
"""
|
2274
|
+
def update_image_async(self, request):
|
2275
|
+
r"""更新镜像信息
|
2276
|
+
|
2277
|
+
更新镜像信息接口,主要用于镜像属性的修改。当前仅支持可用(active)状态的镜像更新相关信息。
|
2278
|
+
|
2279
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1423
2280
|
|
1424
|
-
该接口用于将镜像文件注册为云平台未初始化的私有镜像。 使用该接口注册镜像的具体步骤如下: 将镜像文件上传到OBS个人桶中。具体操作请参见《对象存储服务客户端指南(OBS Browser)》或《对象存储服务API参考》。 使用创建镜像元数据接口创建镜像元数据。调用成功后,保存该镜像的ID。创建镜像元数据请参考创建镜像元数据(OpenStack原生)。 根据2得到的镜像ID,使用注册镜像接口注册OBS桶中的镜像文件。 注册镜像接口作为异步接口,调用成功后,说明后台收到了注册请求。需要根据镜像ID查询该镜像状态验证镜像注册是否成功。当镜像状态变为“active”时,表示镜像注册成功。 如何查询异步任务,请参见异步任务查询。
|
1425
2281
|
|
1426
|
-
:param
|
1427
|
-
:
|
2282
|
+
:param request: Request instance for UpdateImage
|
2283
|
+
:type request: :class:`huaweicloudsdkims.v2.UpdateImageRequest`
|
2284
|
+
:rtype: :class:`huaweicloudsdkims.v2.UpdateImageResponse`
|
1428
2285
|
"""
|
1429
|
-
|
2286
|
+
http_info = self._update_image_http_info(request)
|
2287
|
+
return self._call_api(**http_info)
|
1430
2288
|
|
1431
|
-
def
|
1432
|
-
|
2289
|
+
def update_image_async_invoker(self, request):
|
2290
|
+
http_info = self._update_image_http_info(request)
|
2291
|
+
return AsyncInvoker(self, http_info)
|
1433
2292
|
|
1434
|
-
|
2293
|
+
def _update_image_http_info(self, request):
|
2294
|
+
http_info = {
|
2295
|
+
"method": "PATCH",
|
2296
|
+
"resource_path": "/v2/cloudimages/{image_id}",
|
2297
|
+
"request_type": request.__class__.__name__,
|
2298
|
+
"response_type": "UpdateImageResponse"
|
2299
|
+
}
|
1435
2300
|
|
1436
|
-
:
|
1437
|
-
:return: RegisterImageResponse
|
1438
|
-
"""
|
2301
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1439
2302
|
|
1440
|
-
|
1441
|
-
local_var_params = {}
|
1442
|
-
for attr in request.attribute_map:
|
1443
|
-
if hasattr(request, attr):
|
1444
|
-
local_var_params[attr] = getattr(request, attr)
|
2303
|
+
cname = None
|
1445
2304
|
|
1446
2305
|
collection_formats = {}
|
1447
2306
|
|
@@ -1455,11 +2314,11 @@ class ImsAsyncClient(Client):
|
|
1455
2314
|
|
1456
2315
|
form_params = {}
|
1457
2316
|
|
1458
|
-
|
2317
|
+
body = None
|
1459
2318
|
if 'body' in local_var_params:
|
1460
|
-
|
2319
|
+
body = local_var_params['body']
|
1461
2320
|
if isinstance(request, SdkStreamRequest):
|
1462
|
-
|
2321
|
+
body = request.get_file_stream()
|
1463
2322
|
|
1464
2323
|
response_headers = []
|
1465
2324
|
|
@@ -1468,45 +2327,47 @@ class ImsAsyncClient(Client):
|
|
1468
2327
|
|
1469
2328
|
auth_settings = []
|
1470
2329
|
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
response_type='RegisterImageResponse',
|
1480
|
-
response_headers=response_headers,
|
1481
|
-
auth_settings=auth_settings,
|
1482
|
-
collection_formats=collection_formats,
|
1483
|
-
request_type=request.__class__.__name__)
|
2330
|
+
http_info["cname"] = cname
|
2331
|
+
http_info["collection_formats"] = collection_formats
|
2332
|
+
http_info["path_params"] = path_params
|
2333
|
+
http_info["query_params"] = query_params
|
2334
|
+
http_info["header_params"] = header_params
|
2335
|
+
http_info["post_params"] = form_params
|
2336
|
+
http_info["body"] = body
|
2337
|
+
http_info["response_headers"] = response_headers
|
1484
2338
|
|
2339
|
+
return http_info
|
1485
2340
|
|
1486
|
-
def
|
1487
|
-
"""
|
2341
|
+
def list_versions_async(self, request):
|
2342
|
+
r"""查询版本列表(OpenStack原生)
|
1488
2343
|
|
1489
|
-
|
2344
|
+
查询API的版本信息列表,包括API的版本兼容性、域名信息等。
|
2345
|
+
|
2346
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1490
2347
|
|
1491
|
-
|
1492
|
-
:
|
2348
|
+
|
2349
|
+
:param request: Request instance for ListVersions
|
2350
|
+
:type request: :class:`huaweicloudsdkims.v2.ListVersionsRequest`
|
2351
|
+
:rtype: :class:`huaweicloudsdkims.v2.ListVersionsResponse`
|
1493
2352
|
"""
|
1494
|
-
|
2353
|
+
http_info = self._list_versions_http_info(request)
|
2354
|
+
return self._call_api(**http_info)
|
1495
2355
|
|
1496
|
-
def
|
1497
|
-
|
2356
|
+
def list_versions_async_invoker(self, request):
|
2357
|
+
http_info = self._list_versions_http_info(request)
|
2358
|
+
return AsyncInvoker(self, http_info)
|
1498
2359
|
|
1499
|
-
|
2360
|
+
def _list_versions_http_info(self, request):
|
2361
|
+
http_info = {
|
2362
|
+
"method": "GET",
|
2363
|
+
"resource_path": "/",
|
2364
|
+
"request_type": request.__class__.__name__,
|
2365
|
+
"response_type": "ListVersionsResponse"
|
2366
|
+
}
|
1500
2367
|
|
1501
|
-
:
|
1502
|
-
:return: ShowImageQuotaResponse
|
1503
|
-
"""
|
2368
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1504
2369
|
|
1505
|
-
|
1506
|
-
local_var_params = {}
|
1507
|
-
for attr in request.attribute_map:
|
1508
|
-
if hasattr(request, attr):
|
1509
|
-
local_var_params[attr] = getattr(request, attr)
|
2370
|
+
cname = None
|
1510
2371
|
|
1511
2372
|
collection_formats = {}
|
1512
2373
|
|
@@ -1518,9 +2379,9 @@ class ImsAsyncClient(Client):
|
|
1518
2379
|
|
1519
2380
|
form_params = {}
|
1520
2381
|
|
1521
|
-
|
2382
|
+
body = None
|
1522
2383
|
if isinstance(request, SdkStreamRequest):
|
1523
|
-
|
2384
|
+
body = request.get_file_stream()
|
1524
2385
|
|
1525
2386
|
response_headers = []
|
1526
2387
|
|
@@ -1529,51 +2390,53 @@ class ImsAsyncClient(Client):
|
|
1529
2390
|
|
1530
2391
|
auth_settings = []
|
1531
2392
|
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
response_type='ShowImageQuotaResponse',
|
1541
|
-
response_headers=response_headers,
|
1542
|
-
auth_settings=auth_settings,
|
1543
|
-
collection_formats=collection_formats,
|
1544
|
-
request_type=request.__class__.__name__)
|
2393
|
+
http_info["cname"] = cname
|
2394
|
+
http_info["collection_formats"] = collection_formats
|
2395
|
+
http_info["path_params"] = path_params
|
2396
|
+
http_info["query_params"] = query_params
|
2397
|
+
http_info["header_params"] = header_params
|
2398
|
+
http_info["post_params"] = form_params
|
2399
|
+
http_info["body"] = body
|
2400
|
+
http_info["response_headers"] = response_headers
|
1545
2401
|
|
2402
|
+
return http_info
|
1546
2403
|
|
1547
|
-
def
|
1548
|
-
"""
|
2404
|
+
def show_version_async(self, request):
|
2405
|
+
r"""查询版本列表(OpenStack原生)
|
1549
2406
|
|
1550
|
-
|
2407
|
+
查询API的版本信息列表,包括API的版本兼容性、域名信息等。
|
2408
|
+
|
2409
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
1551
2410
|
|
1552
|
-
|
1553
|
-
:
|
2411
|
+
|
2412
|
+
:param request: Request instance for ShowVersion
|
2413
|
+
:type request: :class:`huaweicloudsdkims.v2.ShowVersionRequest`
|
2414
|
+
:rtype: :class:`huaweicloudsdkims.v2.ShowVersionResponse`
|
1554
2415
|
"""
|
1555
|
-
|
2416
|
+
http_info = self._show_version_http_info(request)
|
2417
|
+
return self._call_api(**http_info)
|
1556
2418
|
|
1557
|
-
def
|
1558
|
-
|
2419
|
+
def show_version_async_invoker(self, request):
|
2420
|
+
http_info = self._show_version_http_info(request)
|
2421
|
+
return AsyncInvoker(self, http_info)
|
1559
2422
|
|
1560
|
-
|
2423
|
+
def _show_version_http_info(self, request):
|
2424
|
+
http_info = {
|
2425
|
+
"method": "GET",
|
2426
|
+
"resource_path": "/{version}",
|
2427
|
+
"request_type": request.__class__.__name__,
|
2428
|
+
"response_type": "ShowVersionResponse"
|
2429
|
+
}
|
1561
2430
|
|
1562
|
-
:
|
1563
|
-
:return: UpdateImageResponse
|
1564
|
-
"""
|
2431
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1565
2432
|
|
1566
|
-
|
1567
|
-
local_var_params = {}
|
1568
|
-
for attr in request.attribute_map:
|
1569
|
-
if hasattr(request, attr):
|
1570
|
-
local_var_params[attr] = getattr(request, attr)
|
2433
|
+
cname = None
|
1571
2434
|
|
1572
2435
|
collection_formats = {}
|
1573
2436
|
|
1574
2437
|
path_params = {}
|
1575
|
-
if '
|
1576
|
-
path_params['
|
2438
|
+
if 'version' in local_var_params:
|
2439
|
+
path_params['version'] = local_var_params['version']
|
1577
2440
|
|
1578
2441
|
query_params = []
|
1579
2442
|
|
@@ -1581,58 +2444,58 @@ class ImsAsyncClient(Client):
|
|
1581
2444
|
|
1582
2445
|
form_params = {}
|
1583
2446
|
|
1584
|
-
|
1585
|
-
if 'body' in local_var_params:
|
1586
|
-
body_params = local_var_params['body']
|
2447
|
+
body = None
|
1587
2448
|
if isinstance(request, SdkStreamRequest):
|
1588
|
-
|
2449
|
+
body = request.get_file_stream()
|
1589
2450
|
|
1590
2451
|
response_headers = []
|
1591
2452
|
|
1592
2453
|
header_params['Content-Type'] = http_utils.select_header_content_type(
|
1593
|
-
['application/json
|
2454
|
+
['application/json'])
|
1594
2455
|
|
1595
2456
|
auth_settings = []
|
1596
2457
|
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
response_type='UpdateImageResponse',
|
1606
|
-
response_headers=response_headers,
|
1607
|
-
auth_settings=auth_settings,
|
1608
|
-
collection_formats=collection_formats,
|
1609
|
-
request_type=request.__class__.__name__)
|
2458
|
+
http_info["cname"] = cname
|
2459
|
+
http_info["collection_formats"] = collection_formats
|
2460
|
+
http_info["path_params"] = path_params
|
2461
|
+
http_info["query_params"] = query_params
|
2462
|
+
http_info["header_params"] = header_params
|
2463
|
+
http_info["post_params"] = form_params
|
2464
|
+
http_info["body"] = body
|
2465
|
+
http_info["response_headers"] = response_headers
|
1610
2466
|
|
2467
|
+
return http_info
|
1611
2468
|
|
1612
2469
|
def glance_add_image_member_async(self, request):
|
1613
|
-
"""添加镜像成员(OpenStack原生)
|
2470
|
+
r"""添加镜像成员(OpenStack原生)
|
1614
2471
|
|
1615
2472
|
用户共享镜像给其他用户时,使用该接口向该镜像成员中添加接受镜像用户的项目ID。
|
2473
|
+
|
2474
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2475
|
+
|
1616
2476
|
|
1617
|
-
:param
|
1618
|
-
:
|
2477
|
+
:param request: Request instance for GlanceAddImageMember
|
2478
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceAddImageMemberRequest`
|
2479
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceAddImageMemberResponse`
|
1619
2480
|
"""
|
1620
|
-
|
2481
|
+
http_info = self._glance_add_image_member_http_info(request)
|
2482
|
+
return self._call_api(**http_info)
|
1621
2483
|
|
1622
|
-
def
|
1623
|
-
|
2484
|
+
def glance_add_image_member_async_invoker(self, request):
|
2485
|
+
http_info = self._glance_add_image_member_http_info(request)
|
2486
|
+
return AsyncInvoker(self, http_info)
|
1624
2487
|
|
1625
|
-
|
2488
|
+
def _glance_add_image_member_http_info(self, request):
|
2489
|
+
http_info = {
|
2490
|
+
"method": "POST",
|
2491
|
+
"resource_path": "/v2/images/{image_id}/members",
|
2492
|
+
"request_type": request.__class__.__name__,
|
2493
|
+
"response_type": "GlanceAddImageMemberResponse"
|
2494
|
+
}
|
1626
2495
|
|
1627
|
-
:
|
1628
|
-
:return: GlanceAddImageMemberResponse
|
1629
|
-
"""
|
2496
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1630
2497
|
|
1631
|
-
|
1632
|
-
local_var_params = {}
|
1633
|
-
for attr in request.attribute_map:
|
1634
|
-
if hasattr(request, attr):
|
1635
|
-
local_var_params[attr] = getattr(request, attr)
|
2498
|
+
cname = None
|
1636
2499
|
|
1637
2500
|
collection_formats = {}
|
1638
2501
|
|
@@ -1646,11 +2509,11 @@ class ImsAsyncClient(Client):
|
|
1646
2509
|
|
1647
2510
|
form_params = {}
|
1648
2511
|
|
1649
|
-
|
2512
|
+
body = None
|
1650
2513
|
if 'body' in local_var_params:
|
1651
|
-
|
2514
|
+
body = local_var_params['body']
|
1652
2515
|
if isinstance(request, SdkStreamRequest):
|
1653
|
-
|
2516
|
+
body = request.get_file_stream()
|
1654
2517
|
|
1655
2518
|
response_headers = []
|
1656
2519
|
|
@@ -1659,45 +2522,47 @@ class ImsAsyncClient(Client):
|
|
1659
2522
|
|
1660
2523
|
auth_settings = []
|
1661
2524
|
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
response_type='GlanceAddImageMemberResponse',
|
1671
|
-
response_headers=response_headers,
|
1672
|
-
auth_settings=auth_settings,
|
1673
|
-
collection_formats=collection_formats,
|
1674
|
-
request_type=request.__class__.__name__)
|
2525
|
+
http_info["cname"] = cname
|
2526
|
+
http_info["collection_formats"] = collection_formats
|
2527
|
+
http_info["path_params"] = path_params
|
2528
|
+
http_info["query_params"] = query_params
|
2529
|
+
http_info["header_params"] = header_params
|
2530
|
+
http_info["post_params"] = form_params
|
2531
|
+
http_info["body"] = body
|
2532
|
+
http_info["response_headers"] = response_headers
|
1675
2533
|
|
2534
|
+
return http_info
|
1676
2535
|
|
1677
2536
|
def glance_create_image_metadata_async(self, request):
|
1678
|
-
"""创建镜像元数据(OpenStack原生)
|
2537
|
+
r"""创建镜像元数据(OpenStack原生)
|
1679
2538
|
|
1680
2539
|
创建镜像元数据。调用创建镜像元数据接口成功后,只是创建了镜像的元数据,镜像对应的实际镜像文件并不存在
|
2540
|
+
|
2541
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2542
|
+
|
1681
2543
|
|
1682
|
-
:param
|
1683
|
-
:
|
2544
|
+
:param request: Request instance for GlanceCreateImageMetadata
|
2545
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceCreateImageMetadataRequest`
|
2546
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceCreateImageMetadataResponse`
|
1684
2547
|
"""
|
1685
|
-
|
2548
|
+
http_info = self._glance_create_image_metadata_http_info(request)
|
2549
|
+
return self._call_api(**http_info)
|
1686
2550
|
|
1687
|
-
def
|
1688
|
-
|
2551
|
+
def glance_create_image_metadata_async_invoker(self, request):
|
2552
|
+
http_info = self._glance_create_image_metadata_http_info(request)
|
2553
|
+
return AsyncInvoker(self, http_info)
|
1689
2554
|
|
1690
|
-
|
2555
|
+
def _glance_create_image_metadata_http_info(self, request):
|
2556
|
+
http_info = {
|
2557
|
+
"method": "POST",
|
2558
|
+
"resource_path": "/v2/images",
|
2559
|
+
"request_type": request.__class__.__name__,
|
2560
|
+
"response_type": "GlanceCreateImageMetadataResponse"
|
2561
|
+
}
|
1691
2562
|
|
1692
|
-
:
|
1693
|
-
:return: GlanceCreateImageMetadataResponse
|
1694
|
-
"""
|
2563
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1695
2564
|
|
1696
|
-
|
1697
|
-
local_var_params = {}
|
1698
|
-
for attr in request.attribute_map:
|
1699
|
-
if hasattr(request, attr):
|
1700
|
-
local_var_params[attr] = getattr(request, attr)
|
2565
|
+
cname = None
|
1701
2566
|
|
1702
2567
|
collection_formats = {}
|
1703
2568
|
|
@@ -1709,11 +2574,11 @@ class ImsAsyncClient(Client):
|
|
1709
2574
|
|
1710
2575
|
form_params = {}
|
1711
2576
|
|
1712
|
-
|
2577
|
+
body = None
|
1713
2578
|
if 'body' in local_var_params:
|
1714
|
-
|
2579
|
+
body = local_var_params['body']
|
1715
2580
|
if isinstance(request, SdkStreamRequest):
|
1716
|
-
|
2581
|
+
body = request.get_file_stream()
|
1717
2582
|
|
1718
2583
|
response_headers = []
|
1719
2584
|
|
@@ -1722,45 +2587,47 @@ class ImsAsyncClient(Client):
|
|
1722
2587
|
|
1723
2588
|
auth_settings = []
|
1724
2589
|
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
response_type='GlanceCreateImageMetadataResponse',
|
1734
|
-
response_headers=response_headers,
|
1735
|
-
auth_settings=auth_settings,
|
1736
|
-
collection_formats=collection_formats,
|
1737
|
-
request_type=request.__class__.__name__)
|
2590
|
+
http_info["cname"] = cname
|
2591
|
+
http_info["collection_formats"] = collection_formats
|
2592
|
+
http_info["path_params"] = path_params
|
2593
|
+
http_info["query_params"] = query_params
|
2594
|
+
http_info["header_params"] = header_params
|
2595
|
+
http_info["post_params"] = form_params
|
2596
|
+
http_info["body"] = body
|
2597
|
+
http_info["response_headers"] = response_headers
|
1738
2598
|
|
2599
|
+
return http_info
|
1739
2600
|
|
1740
2601
|
def glance_create_tag_async(self, request):
|
1741
|
-
"""增加标签(OpenStack原生)
|
2602
|
+
r"""增加标签(OpenStack原生)
|
1742
2603
|
|
1743
2604
|
该接口主要用于为某个镜像添加一个自定义标签。通过自定义标签,用户可以将镜像进行分类。
|
2605
|
+
|
2606
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2607
|
+
|
1744
2608
|
|
1745
|
-
:param
|
1746
|
-
:
|
2609
|
+
:param request: Request instance for GlanceCreateTag
|
2610
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceCreateTagRequest`
|
2611
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceCreateTagResponse`
|
1747
2612
|
"""
|
1748
|
-
|
2613
|
+
http_info = self._glance_create_tag_http_info(request)
|
2614
|
+
return self._call_api(**http_info)
|
1749
2615
|
|
1750
|
-
def
|
1751
|
-
|
2616
|
+
def glance_create_tag_async_invoker(self, request):
|
2617
|
+
http_info = self._glance_create_tag_http_info(request)
|
2618
|
+
return AsyncInvoker(self, http_info)
|
1752
2619
|
|
1753
|
-
|
2620
|
+
def _glance_create_tag_http_info(self, request):
|
2621
|
+
http_info = {
|
2622
|
+
"method": "PUT",
|
2623
|
+
"resource_path": "/v2/images/{image_id}/tags/{tag}",
|
2624
|
+
"request_type": request.__class__.__name__,
|
2625
|
+
"response_type": "GlanceCreateTagResponse"
|
2626
|
+
}
|
1754
2627
|
|
1755
|
-
:
|
1756
|
-
:return: GlanceCreateTagResponse
|
1757
|
-
"""
|
2628
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1758
2629
|
|
1759
|
-
|
1760
|
-
local_var_params = {}
|
1761
|
-
for attr in request.attribute_map:
|
1762
|
-
if hasattr(request, attr):
|
1763
|
-
local_var_params[attr] = getattr(request, attr)
|
2630
|
+
cname = None
|
1764
2631
|
|
1765
2632
|
collection_formats = {}
|
1766
2633
|
|
@@ -1776,9 +2643,9 @@ class ImsAsyncClient(Client):
|
|
1776
2643
|
|
1777
2644
|
form_params = {}
|
1778
2645
|
|
1779
|
-
|
2646
|
+
body = None
|
1780
2647
|
if isinstance(request, SdkStreamRequest):
|
1781
|
-
|
2648
|
+
body = request.get_file_stream()
|
1782
2649
|
|
1783
2650
|
response_headers = []
|
1784
2651
|
|
@@ -1787,45 +2654,47 @@ class ImsAsyncClient(Client):
|
|
1787
2654
|
|
1788
2655
|
auth_settings = []
|
1789
2656
|
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
response_type='GlanceCreateTagResponse',
|
1799
|
-
response_headers=response_headers,
|
1800
|
-
auth_settings=auth_settings,
|
1801
|
-
collection_formats=collection_formats,
|
1802
|
-
request_type=request.__class__.__name__)
|
2657
|
+
http_info["cname"] = cname
|
2658
|
+
http_info["collection_formats"] = collection_formats
|
2659
|
+
http_info["path_params"] = path_params
|
2660
|
+
http_info["query_params"] = query_params
|
2661
|
+
http_info["header_params"] = header_params
|
2662
|
+
http_info["post_params"] = form_params
|
2663
|
+
http_info["body"] = body
|
2664
|
+
http_info["response_headers"] = response_headers
|
1803
2665
|
|
2666
|
+
return http_info
|
1804
2667
|
|
1805
2668
|
def glance_delete_image_async(self, request):
|
1806
|
-
"""删除镜像(OpenStack原生)
|
2669
|
+
r"""删除镜像(OpenStack原生)
|
1807
2670
|
|
1808
2671
|
该接口主要用于删除镜像,用户可以通过该接口将自己的私有镜像删除。
|
2672
|
+
|
2673
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2674
|
+
|
1809
2675
|
|
1810
|
-
:param
|
1811
|
-
:
|
2676
|
+
:param request: Request instance for GlanceDeleteImage
|
2677
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceDeleteImageRequest`
|
2678
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceDeleteImageResponse`
|
1812
2679
|
"""
|
1813
|
-
|
2680
|
+
http_info = self._glance_delete_image_http_info(request)
|
2681
|
+
return self._call_api(**http_info)
|
1814
2682
|
|
1815
|
-
def
|
1816
|
-
|
2683
|
+
def glance_delete_image_async_invoker(self, request):
|
2684
|
+
http_info = self._glance_delete_image_http_info(request)
|
2685
|
+
return AsyncInvoker(self, http_info)
|
1817
2686
|
|
1818
|
-
|
2687
|
+
def _glance_delete_image_http_info(self, request):
|
2688
|
+
http_info = {
|
2689
|
+
"method": "DELETE",
|
2690
|
+
"resource_path": "/v2/images/{image_id}",
|
2691
|
+
"request_type": request.__class__.__name__,
|
2692
|
+
"response_type": "GlanceDeleteImageResponse"
|
2693
|
+
}
|
1819
2694
|
|
1820
|
-
:
|
1821
|
-
:return: GlanceDeleteImageResponse
|
1822
|
-
"""
|
2695
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1823
2696
|
|
1824
|
-
|
1825
|
-
local_var_params = {}
|
1826
|
-
for attr in request.attribute_map:
|
1827
|
-
if hasattr(request, attr):
|
1828
|
-
local_var_params[attr] = getattr(request, attr)
|
2697
|
+
cname = None
|
1829
2698
|
|
1830
2699
|
collection_formats = {}
|
1831
2700
|
|
@@ -1839,11 +2708,11 @@ class ImsAsyncClient(Client):
|
|
1839
2708
|
|
1840
2709
|
form_params = {}
|
1841
2710
|
|
1842
|
-
|
2711
|
+
body = None
|
1843
2712
|
if 'body' in local_var_params:
|
1844
|
-
|
2713
|
+
body = local_var_params['body']
|
1845
2714
|
if isinstance(request, SdkStreamRequest):
|
1846
|
-
|
2715
|
+
body = request.get_file_stream()
|
1847
2716
|
|
1848
2717
|
response_headers = []
|
1849
2718
|
|
@@ -1852,45 +2721,47 @@ class ImsAsyncClient(Client):
|
|
1852
2721
|
|
1853
2722
|
auth_settings = []
|
1854
2723
|
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
response_type='GlanceDeleteImageResponse',
|
1864
|
-
response_headers=response_headers,
|
1865
|
-
auth_settings=auth_settings,
|
1866
|
-
collection_formats=collection_formats,
|
1867
|
-
request_type=request.__class__.__name__)
|
2724
|
+
http_info["cname"] = cname
|
2725
|
+
http_info["collection_formats"] = collection_formats
|
2726
|
+
http_info["path_params"] = path_params
|
2727
|
+
http_info["query_params"] = query_params
|
2728
|
+
http_info["header_params"] = header_params
|
2729
|
+
http_info["post_params"] = form_params
|
2730
|
+
http_info["body"] = body
|
2731
|
+
http_info["response_headers"] = response_headers
|
1868
2732
|
|
2733
|
+
return http_info
|
1869
2734
|
|
1870
2735
|
def glance_delete_image_member_async(self, request):
|
1871
|
-
"""删除指定的镜像成员(OpenStack原生)
|
2736
|
+
r"""删除指定的镜像成员(OpenStack原生)
|
1872
2737
|
|
1873
2738
|
该接口用于取消对某个用户的镜像共享。
|
2739
|
+
|
2740
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2741
|
+
|
1874
2742
|
|
1875
|
-
:param
|
1876
|
-
:
|
2743
|
+
:param request: Request instance for GlanceDeleteImageMember
|
2744
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceDeleteImageMemberRequest`
|
2745
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceDeleteImageMemberResponse`
|
1877
2746
|
"""
|
1878
|
-
|
2747
|
+
http_info = self._glance_delete_image_member_http_info(request)
|
2748
|
+
return self._call_api(**http_info)
|
1879
2749
|
|
1880
|
-
def
|
1881
|
-
|
2750
|
+
def glance_delete_image_member_async_invoker(self, request):
|
2751
|
+
http_info = self._glance_delete_image_member_http_info(request)
|
2752
|
+
return AsyncInvoker(self, http_info)
|
1882
2753
|
|
1883
|
-
|
2754
|
+
def _glance_delete_image_member_http_info(self, request):
|
2755
|
+
http_info = {
|
2756
|
+
"method": "DELETE",
|
2757
|
+
"resource_path": "/v2/images/{image_id}/members/{member_id}",
|
2758
|
+
"request_type": request.__class__.__name__,
|
2759
|
+
"response_type": "GlanceDeleteImageMemberResponse"
|
2760
|
+
}
|
1884
2761
|
|
1885
|
-
:
|
1886
|
-
:return: GlanceDeleteImageMemberResponse
|
1887
|
-
"""
|
2762
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1888
2763
|
|
1889
|
-
|
1890
|
-
local_var_params = {}
|
1891
|
-
for attr in request.attribute_map:
|
1892
|
-
if hasattr(request, attr):
|
1893
|
-
local_var_params[attr] = getattr(request, attr)
|
2764
|
+
cname = None
|
1894
2765
|
|
1895
2766
|
collection_formats = {}
|
1896
2767
|
|
@@ -1906,9 +2777,9 @@ class ImsAsyncClient(Client):
|
|
1906
2777
|
|
1907
2778
|
form_params = {}
|
1908
2779
|
|
1909
|
-
|
2780
|
+
body = None
|
1910
2781
|
if isinstance(request, SdkStreamRequest):
|
1911
|
-
|
2782
|
+
body = request.get_file_stream()
|
1912
2783
|
|
1913
2784
|
response_headers = []
|
1914
2785
|
|
@@ -1917,45 +2788,47 @@ class ImsAsyncClient(Client):
|
|
1917
2788
|
|
1918
2789
|
auth_settings = []
|
1919
2790
|
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
response_type='GlanceDeleteImageMemberResponse',
|
1929
|
-
response_headers=response_headers,
|
1930
|
-
auth_settings=auth_settings,
|
1931
|
-
collection_formats=collection_formats,
|
1932
|
-
request_type=request.__class__.__name__)
|
2791
|
+
http_info["cname"] = cname
|
2792
|
+
http_info["collection_formats"] = collection_formats
|
2793
|
+
http_info["path_params"] = path_params
|
2794
|
+
http_info["query_params"] = query_params
|
2795
|
+
http_info["header_params"] = header_params
|
2796
|
+
http_info["post_params"] = form_params
|
2797
|
+
http_info["body"] = body
|
2798
|
+
http_info["response_headers"] = response_headers
|
1933
2799
|
|
2800
|
+
return http_info
|
1934
2801
|
|
1935
2802
|
def glance_delete_tag_async(self, request):
|
1936
|
-
"""删除标签(OpenStack原生)
|
2803
|
+
r"""删除标签(OpenStack原生)
|
1937
2804
|
|
1938
2805
|
该接口主要用于删除某个镜像的自定义标签,通过该接口,用户可以将私有镜像中一些不用的标签删除。
|
2806
|
+
|
2807
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2808
|
+
|
1939
2809
|
|
1940
|
-
:param
|
1941
|
-
:
|
2810
|
+
:param request: Request instance for GlanceDeleteTag
|
2811
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceDeleteTagRequest`
|
2812
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceDeleteTagResponse`
|
1942
2813
|
"""
|
1943
|
-
|
2814
|
+
http_info = self._glance_delete_tag_http_info(request)
|
2815
|
+
return self._call_api(**http_info)
|
1944
2816
|
|
1945
|
-
def
|
1946
|
-
|
2817
|
+
def glance_delete_tag_async_invoker(self, request):
|
2818
|
+
http_info = self._glance_delete_tag_http_info(request)
|
2819
|
+
return AsyncInvoker(self, http_info)
|
1947
2820
|
|
1948
|
-
|
2821
|
+
def _glance_delete_tag_http_info(self, request):
|
2822
|
+
http_info = {
|
2823
|
+
"method": "DELETE",
|
2824
|
+
"resource_path": "/v2/images/{image_id}/tags/{tag}",
|
2825
|
+
"request_type": request.__class__.__name__,
|
2826
|
+
"response_type": "GlanceDeleteTagResponse"
|
2827
|
+
}
|
1949
2828
|
|
1950
|
-
:
|
1951
|
-
:return: GlanceDeleteTagResponse
|
1952
|
-
"""
|
2829
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
1953
2830
|
|
1954
|
-
|
1955
|
-
local_var_params = {}
|
1956
|
-
for attr in request.attribute_map:
|
1957
|
-
if hasattr(request, attr):
|
1958
|
-
local_var_params[attr] = getattr(request, attr)
|
2831
|
+
cname = None
|
1959
2832
|
|
1960
2833
|
collection_formats = {}
|
1961
2834
|
|
@@ -1971,9 +2844,9 @@ class ImsAsyncClient(Client):
|
|
1971
2844
|
|
1972
2845
|
form_params = {}
|
1973
2846
|
|
1974
|
-
|
2847
|
+
body = None
|
1975
2848
|
if isinstance(request, SdkStreamRequest):
|
1976
|
-
|
2849
|
+
body = request.get_file_stream()
|
1977
2850
|
|
1978
2851
|
response_headers = []
|
1979
2852
|
|
@@ -1982,45 +2855,47 @@ class ImsAsyncClient(Client):
|
|
1982
2855
|
|
1983
2856
|
auth_settings = []
|
1984
2857
|
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
response_type='GlanceDeleteTagResponse',
|
1994
|
-
response_headers=response_headers,
|
1995
|
-
auth_settings=auth_settings,
|
1996
|
-
collection_formats=collection_formats,
|
1997
|
-
request_type=request.__class__.__name__)
|
2858
|
+
http_info["cname"] = cname
|
2859
|
+
http_info["collection_formats"] = collection_formats
|
2860
|
+
http_info["path_params"] = path_params
|
2861
|
+
http_info["query_params"] = query_params
|
2862
|
+
http_info["header_params"] = header_params
|
2863
|
+
http_info["post_params"] = form_params
|
2864
|
+
http_info["body"] = body
|
2865
|
+
http_info["response_headers"] = response_headers
|
1998
2866
|
|
2867
|
+
return http_info
|
1999
2868
|
|
2000
2869
|
def glance_list_image_member_schemas_async(self, request):
|
2001
|
-
"""查询镜像成员列表视图(OpenStack原生)
|
2870
|
+
r"""查询镜像成员列表视图(OpenStack原生)
|
2002
2871
|
|
2003
2872
|
该接口主要用于查询镜像成员列表视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。
|
2873
|
+
|
2874
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2875
|
+
|
2004
2876
|
|
2005
|
-
:param
|
2006
|
-
:
|
2877
|
+
:param request: Request instance for GlanceListImageMemberSchemas
|
2878
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceListImageMemberSchemasRequest`
|
2879
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceListImageMemberSchemasResponse`
|
2007
2880
|
"""
|
2008
|
-
|
2881
|
+
http_info = self._glance_list_image_member_schemas_http_info(request)
|
2882
|
+
return self._call_api(**http_info)
|
2009
2883
|
|
2010
|
-
def
|
2011
|
-
|
2884
|
+
def glance_list_image_member_schemas_async_invoker(self, request):
|
2885
|
+
http_info = self._glance_list_image_member_schemas_http_info(request)
|
2886
|
+
return AsyncInvoker(self, http_info)
|
2012
2887
|
|
2013
|
-
|
2888
|
+
def _glance_list_image_member_schemas_http_info(self, request):
|
2889
|
+
http_info = {
|
2890
|
+
"method": "GET",
|
2891
|
+
"resource_path": "/v2/schemas/members",
|
2892
|
+
"request_type": request.__class__.__name__,
|
2893
|
+
"response_type": "GlanceListImageMemberSchemasResponse"
|
2894
|
+
}
|
2014
2895
|
|
2015
|
-
:
|
2016
|
-
:return: GlanceListImageMemberSchemasResponse
|
2017
|
-
"""
|
2896
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2018
2897
|
|
2019
|
-
|
2020
|
-
local_var_params = {}
|
2021
|
-
for attr in request.attribute_map:
|
2022
|
-
if hasattr(request, attr):
|
2023
|
-
local_var_params[attr] = getattr(request, attr)
|
2898
|
+
cname = None
|
2024
2899
|
|
2025
2900
|
collection_formats = {}
|
2026
2901
|
|
@@ -2032,9 +2907,9 @@ class ImsAsyncClient(Client):
|
|
2032
2907
|
|
2033
2908
|
form_params = {}
|
2034
2909
|
|
2035
|
-
|
2910
|
+
body = None
|
2036
2911
|
if isinstance(request, SdkStreamRequest):
|
2037
|
-
|
2912
|
+
body = request.get_file_stream()
|
2038
2913
|
|
2039
2914
|
response_headers = []
|
2040
2915
|
|
@@ -2043,45 +2918,47 @@ class ImsAsyncClient(Client):
|
|
2043
2918
|
|
2044
2919
|
auth_settings = []
|
2045
2920
|
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
response_type='GlanceListImageMemberSchemasResponse',
|
2055
|
-
response_headers=response_headers,
|
2056
|
-
auth_settings=auth_settings,
|
2057
|
-
collection_formats=collection_formats,
|
2058
|
-
request_type=request.__class__.__name__)
|
2921
|
+
http_info["cname"] = cname
|
2922
|
+
http_info["collection_formats"] = collection_formats
|
2923
|
+
http_info["path_params"] = path_params
|
2924
|
+
http_info["query_params"] = query_params
|
2925
|
+
http_info["header_params"] = header_params
|
2926
|
+
http_info["post_params"] = form_params
|
2927
|
+
http_info["body"] = body
|
2928
|
+
http_info["response_headers"] = response_headers
|
2059
2929
|
|
2930
|
+
return http_info
|
2060
2931
|
|
2061
2932
|
def glance_list_image_members_async(self, request):
|
2062
|
-
"""获取镜像成员列表(OpenStack原生)
|
2933
|
+
r"""获取镜像成员列表(OpenStack原生)
|
2063
2934
|
|
2064
2935
|
该接口用于共享镜像过程中,获取接受该镜像的成员列表。
|
2936
|
+
|
2937
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2938
|
+
|
2065
2939
|
|
2066
|
-
:param
|
2067
|
-
:
|
2940
|
+
:param request: Request instance for GlanceListImageMembers
|
2941
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceListImageMembersRequest`
|
2942
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceListImageMembersResponse`
|
2068
2943
|
"""
|
2069
|
-
|
2944
|
+
http_info = self._glance_list_image_members_http_info(request)
|
2945
|
+
return self._call_api(**http_info)
|
2070
2946
|
|
2071
|
-
def
|
2072
|
-
|
2947
|
+
def glance_list_image_members_async_invoker(self, request):
|
2948
|
+
http_info = self._glance_list_image_members_http_info(request)
|
2949
|
+
return AsyncInvoker(self, http_info)
|
2073
2950
|
|
2074
|
-
|
2951
|
+
def _glance_list_image_members_http_info(self, request):
|
2952
|
+
http_info = {
|
2953
|
+
"method": "GET",
|
2954
|
+
"resource_path": "/v2/images/{image_id}/members",
|
2955
|
+
"request_type": request.__class__.__name__,
|
2956
|
+
"response_type": "GlanceListImageMembersResponse"
|
2957
|
+
}
|
2075
2958
|
|
2076
|
-
:
|
2077
|
-
:return: GlanceListImageMembersResponse
|
2078
|
-
"""
|
2959
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2079
2960
|
|
2080
|
-
|
2081
|
-
local_var_params = {}
|
2082
|
-
for attr in request.attribute_map:
|
2083
|
-
if hasattr(request, attr):
|
2084
|
-
local_var_params[attr] = getattr(request, attr)
|
2961
|
+
cname = None
|
2085
2962
|
|
2086
2963
|
collection_formats = {}
|
2087
2964
|
|
@@ -2095,9 +2972,9 @@ class ImsAsyncClient(Client):
|
|
2095
2972
|
|
2096
2973
|
form_params = {}
|
2097
2974
|
|
2098
|
-
|
2975
|
+
body = None
|
2099
2976
|
if isinstance(request, SdkStreamRequest):
|
2100
|
-
|
2977
|
+
body = request.get_file_stream()
|
2101
2978
|
|
2102
2979
|
response_headers = []
|
2103
2980
|
|
@@ -2106,45 +2983,47 @@ class ImsAsyncClient(Client):
|
|
2106
2983
|
|
2107
2984
|
auth_settings = []
|
2108
2985
|
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
response_type='GlanceListImageMembersResponse',
|
2118
|
-
response_headers=response_headers,
|
2119
|
-
auth_settings=auth_settings,
|
2120
|
-
collection_formats=collection_formats,
|
2121
|
-
request_type=request.__class__.__name__)
|
2986
|
+
http_info["cname"] = cname
|
2987
|
+
http_info["collection_formats"] = collection_formats
|
2988
|
+
http_info["path_params"] = path_params
|
2989
|
+
http_info["query_params"] = query_params
|
2990
|
+
http_info["header_params"] = header_params
|
2991
|
+
http_info["post_params"] = form_params
|
2992
|
+
http_info["body"] = body
|
2993
|
+
http_info["response_headers"] = response_headers
|
2122
2994
|
|
2995
|
+
return http_info
|
2123
2996
|
|
2124
2997
|
def glance_list_image_schemas_async(self, request):
|
2125
|
-
"""查询镜像列表视图(OpenStack原生)
|
2998
|
+
r"""查询镜像列表视图(OpenStack原生)
|
2126
2999
|
|
2127
3000
|
该接口主要用于查询镜像列表视图,通过该接口用户可以了解到镜像列表的详细情况和数据结构。
|
3001
|
+
|
3002
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
3003
|
+
|
2128
3004
|
|
2129
|
-
:param
|
2130
|
-
:
|
3005
|
+
:param request: Request instance for GlanceListImageSchemas
|
3006
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceListImageSchemasRequest`
|
3007
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceListImageSchemasResponse`
|
2131
3008
|
"""
|
2132
|
-
|
3009
|
+
http_info = self._glance_list_image_schemas_http_info(request)
|
3010
|
+
return self._call_api(**http_info)
|
2133
3011
|
|
2134
|
-
def
|
2135
|
-
|
3012
|
+
def glance_list_image_schemas_async_invoker(self, request):
|
3013
|
+
http_info = self._glance_list_image_schemas_http_info(request)
|
3014
|
+
return AsyncInvoker(self, http_info)
|
2136
3015
|
|
2137
|
-
|
3016
|
+
def _glance_list_image_schemas_http_info(self, request):
|
3017
|
+
http_info = {
|
3018
|
+
"method": "GET",
|
3019
|
+
"resource_path": "/v2/schemas/images",
|
3020
|
+
"request_type": request.__class__.__name__,
|
3021
|
+
"response_type": "GlanceListImageSchemasResponse"
|
3022
|
+
}
|
2138
3023
|
|
2139
|
-
:
|
2140
|
-
:return: GlanceListImageSchemasResponse
|
2141
|
-
"""
|
3024
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2142
3025
|
|
2143
|
-
|
2144
|
-
local_var_params = {}
|
2145
|
-
for attr in request.attribute_map:
|
2146
|
-
if hasattr(request, attr):
|
2147
|
-
local_var_params[attr] = getattr(request, attr)
|
3026
|
+
cname = None
|
2148
3027
|
|
2149
3028
|
collection_formats = {}
|
2150
3029
|
|
@@ -2156,9 +3035,9 @@ class ImsAsyncClient(Client):
|
|
2156
3035
|
|
2157
3036
|
form_params = {}
|
2158
3037
|
|
2159
|
-
|
3038
|
+
body = None
|
2160
3039
|
if isinstance(request, SdkStreamRequest):
|
2161
|
-
|
3040
|
+
body = request.get_file_stream()
|
2162
3041
|
|
2163
3042
|
response_headers = []
|
2164
3043
|
|
@@ -2167,45 +3046,51 @@ class ImsAsyncClient(Client):
|
|
2167
3046
|
|
2168
3047
|
auth_settings = []
|
2169
3048
|
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
response_type='GlanceListImageSchemasResponse',
|
2179
|
-
response_headers=response_headers,
|
2180
|
-
auth_settings=auth_settings,
|
2181
|
-
collection_formats=collection_formats,
|
2182
|
-
request_type=request.__class__.__name__)
|
3049
|
+
http_info["cname"] = cname
|
3050
|
+
http_info["collection_formats"] = collection_formats
|
3051
|
+
http_info["path_params"] = path_params
|
3052
|
+
http_info["query_params"] = query_params
|
3053
|
+
http_info["header_params"] = header_params
|
3054
|
+
http_info["post_params"] = form_params
|
3055
|
+
http_info["body"] = body
|
3056
|
+
http_info["response_headers"] = response_headers
|
2183
3057
|
|
3058
|
+
return http_info
|
2184
3059
|
|
2185
3060
|
def glance_list_images_async(self, request):
|
2186
|
-
"""查询镜像列表(OpenStack原生)
|
3061
|
+
r"""查询镜像列表(OpenStack原生)
|
3062
|
+
|
3063
|
+
获取镜像列表。
|
3064
|
+
使用本接口查询镜像列表时,需要使用分页查询才能返回全部的镜像列表。
|
3065
|
+
分页说明
|
3066
|
+
分页是指返回一组镜像的一个子集,在返回的时候会存在下个子集的链接和首个子集的链接,默认返回的子集中数量为25,用户也可以通过使用limit和marker两个参数自己分页,指定返回子集中需要返回的数量。
|
3067
|
+
响应中的参数first是查询首页的URL。next是查询下一页的URL。当查询镜像列表最后一页时,不存在next。
|
3068
|
+
|
3069
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2187
3070
|
|
2188
|
-
获取镜像列表。 使用本接口查询镜像列表时,需要使用分页查询才能返回全部的镜像列表。 分页说明 分页是指返回一组镜像的一个子集,在返回的时候会存在下个子集的链接和首个子集的链接,默认返回的子集中数量为25,用户也可以通过使用limit和marker两个参数自己分页,指定返回子集中需要返回的数量。 响应中的参数first是查询首页的URL。next是查询下一页的URL。当查询镜像列表最后一页时,不存在next。
|
2189
3071
|
|
2190
|
-
:param
|
2191
|
-
:
|
3072
|
+
:param request: Request instance for GlanceListImages
|
3073
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceListImagesRequest`
|
3074
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceListImagesResponse`
|
2192
3075
|
"""
|
2193
|
-
|
3076
|
+
http_info = self._glance_list_images_http_info(request)
|
3077
|
+
return self._call_api(**http_info)
|
2194
3078
|
|
2195
|
-
def
|
2196
|
-
|
3079
|
+
def glance_list_images_async_invoker(self, request):
|
3080
|
+
http_info = self._glance_list_images_http_info(request)
|
3081
|
+
return AsyncInvoker(self, http_info)
|
2197
3082
|
|
2198
|
-
|
3083
|
+
def _glance_list_images_http_info(self, request):
|
3084
|
+
http_info = {
|
3085
|
+
"method": "GET",
|
3086
|
+
"resource_path": "/v2/images",
|
3087
|
+
"request_type": request.__class__.__name__,
|
3088
|
+
"response_type": "GlanceListImagesResponse"
|
3089
|
+
}
|
2199
3090
|
|
2200
|
-
:
|
2201
|
-
:return: GlanceListImagesResponse
|
2202
|
-
"""
|
3091
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2203
3092
|
|
2204
|
-
|
2205
|
-
local_var_params = {}
|
2206
|
-
for attr in request.attribute_map:
|
2207
|
-
if hasattr(request, attr):
|
2208
|
-
local_var_params[attr] = getattr(request, attr)
|
3093
|
+
cname = None
|
2209
3094
|
|
2210
3095
|
collection_formats = {}
|
2211
3096
|
|
@@ -2281,9 +3166,9 @@ class ImsAsyncClient(Client):
|
|
2281
3166
|
|
2282
3167
|
form_params = {}
|
2283
3168
|
|
2284
|
-
|
3169
|
+
body = None
|
2285
3170
|
if isinstance(request, SdkStreamRequest):
|
2286
|
-
|
3171
|
+
body = request.get_file_stream()
|
2287
3172
|
|
2288
3173
|
response_headers = []
|
2289
3174
|
|
@@ -2292,45 +3177,47 @@ class ImsAsyncClient(Client):
|
|
2292
3177
|
|
2293
3178
|
auth_settings = []
|
2294
3179
|
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
response_type='GlanceListImagesResponse',
|
2304
|
-
response_headers=response_headers,
|
2305
|
-
auth_settings=auth_settings,
|
2306
|
-
collection_formats=collection_formats,
|
2307
|
-
request_type=request.__class__.__name__)
|
3180
|
+
http_info["cname"] = cname
|
3181
|
+
http_info["collection_formats"] = collection_formats
|
3182
|
+
http_info["path_params"] = path_params
|
3183
|
+
http_info["query_params"] = query_params
|
3184
|
+
http_info["header_params"] = header_params
|
3185
|
+
http_info["post_params"] = form_params
|
3186
|
+
http_info["body"] = body
|
3187
|
+
http_info["response_headers"] = response_headers
|
2308
3188
|
|
3189
|
+
return http_info
|
2309
3190
|
|
2310
3191
|
def glance_show_image_async(self, request):
|
2311
|
-
"""查询镜像详情(OpenStack原生)
|
3192
|
+
r"""查询镜像详情(OpenStack原生)
|
2312
3193
|
|
2313
3194
|
查询单个镜像详情,用户可以通过该接口查询单个私有或者公共镜像的详情
|
3195
|
+
|
3196
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2314
3197
|
|
2315
|
-
|
2316
|
-
:
|
3198
|
+
|
3199
|
+
:param request: Request instance for GlanceShowImage
|
3200
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceShowImageRequest`
|
3201
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceShowImageResponse`
|
2317
3202
|
"""
|
2318
|
-
|
3203
|
+
http_info = self._glance_show_image_http_info(request)
|
3204
|
+
return self._call_api(**http_info)
|
2319
3205
|
|
2320
|
-
def
|
2321
|
-
|
3206
|
+
def glance_show_image_async_invoker(self, request):
|
3207
|
+
http_info = self._glance_show_image_http_info(request)
|
3208
|
+
return AsyncInvoker(self, http_info)
|
2322
3209
|
|
2323
|
-
|
3210
|
+
def _glance_show_image_http_info(self, request):
|
3211
|
+
http_info = {
|
3212
|
+
"method": "GET",
|
3213
|
+
"resource_path": "/v2/images/{image_id}",
|
3214
|
+
"request_type": request.__class__.__name__,
|
3215
|
+
"response_type": "GlanceShowImageResponse"
|
3216
|
+
}
|
2324
3217
|
|
2325
|
-
:
|
2326
|
-
:return: GlanceShowImageResponse
|
2327
|
-
"""
|
3218
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2328
3219
|
|
2329
|
-
|
2330
|
-
local_var_params = {}
|
2331
|
-
for attr in request.attribute_map:
|
2332
|
-
if hasattr(request, attr):
|
2333
|
-
local_var_params[attr] = getattr(request, attr)
|
3220
|
+
cname = None
|
2334
3221
|
|
2335
3222
|
collection_formats = {}
|
2336
3223
|
|
@@ -2344,9 +3231,9 @@ class ImsAsyncClient(Client):
|
|
2344
3231
|
|
2345
3232
|
form_params = {}
|
2346
3233
|
|
2347
|
-
|
3234
|
+
body = None
|
2348
3235
|
if isinstance(request, SdkStreamRequest):
|
2349
|
-
|
3236
|
+
body = request.get_file_stream()
|
2350
3237
|
|
2351
3238
|
response_headers = []
|
2352
3239
|
|
@@ -2355,45 +3242,47 @@ class ImsAsyncClient(Client):
|
|
2355
3242
|
|
2356
3243
|
auth_settings = []
|
2357
3244
|
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
response_type='GlanceShowImageResponse',
|
2367
|
-
response_headers=response_headers,
|
2368
|
-
auth_settings=auth_settings,
|
2369
|
-
collection_formats=collection_formats,
|
2370
|
-
request_type=request.__class__.__name__)
|
3245
|
+
http_info["cname"] = cname
|
3246
|
+
http_info["collection_formats"] = collection_formats
|
3247
|
+
http_info["path_params"] = path_params
|
3248
|
+
http_info["query_params"] = query_params
|
3249
|
+
http_info["header_params"] = header_params
|
3250
|
+
http_info["post_params"] = form_params
|
3251
|
+
http_info["body"] = body
|
3252
|
+
http_info["response_headers"] = response_headers
|
2371
3253
|
|
3254
|
+
return http_info
|
2372
3255
|
|
2373
3256
|
def glance_show_image_member_async(self, request):
|
2374
|
-
"""获取镜像成员详情(OpenStack原生)
|
3257
|
+
r"""获取镜像成员详情(OpenStack原生)
|
2375
3258
|
|
2376
3259
|
该接口主要用于镜像共享中查询某个镜像成员的详情。
|
3260
|
+
|
3261
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2377
3262
|
|
2378
|
-
|
2379
|
-
:
|
3263
|
+
|
3264
|
+
:param request: Request instance for GlanceShowImageMember
|
3265
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceShowImageMemberRequest`
|
3266
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceShowImageMemberResponse`
|
2380
3267
|
"""
|
2381
|
-
|
3268
|
+
http_info = self._glance_show_image_member_http_info(request)
|
3269
|
+
return self._call_api(**http_info)
|
2382
3270
|
|
2383
|
-
def
|
2384
|
-
|
3271
|
+
def glance_show_image_member_async_invoker(self, request):
|
3272
|
+
http_info = self._glance_show_image_member_http_info(request)
|
3273
|
+
return AsyncInvoker(self, http_info)
|
2385
3274
|
|
2386
|
-
|
3275
|
+
def _glance_show_image_member_http_info(self, request):
|
3276
|
+
http_info = {
|
3277
|
+
"method": "GET",
|
3278
|
+
"resource_path": "/v2/images/{image_id}/members/{member_id}",
|
3279
|
+
"request_type": request.__class__.__name__,
|
3280
|
+
"response_type": "GlanceShowImageMemberResponse"
|
3281
|
+
}
|
2387
3282
|
|
2388
|
-
:
|
2389
|
-
:return: GlanceShowImageMemberResponse
|
2390
|
-
"""
|
3283
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2391
3284
|
|
2392
|
-
|
2393
|
-
local_var_params = {}
|
2394
|
-
for attr in request.attribute_map:
|
2395
|
-
if hasattr(request, attr):
|
2396
|
-
local_var_params[attr] = getattr(request, attr)
|
3285
|
+
cname = None
|
2397
3286
|
|
2398
3287
|
collection_formats = {}
|
2399
3288
|
|
@@ -2409,9 +3298,9 @@ class ImsAsyncClient(Client):
|
|
2409
3298
|
|
2410
3299
|
form_params = {}
|
2411
3300
|
|
2412
|
-
|
3301
|
+
body = None
|
2413
3302
|
if isinstance(request, SdkStreamRequest):
|
2414
|
-
|
3303
|
+
body = request.get_file_stream()
|
2415
3304
|
|
2416
3305
|
response_headers = []
|
2417
3306
|
|
@@ -2420,45 +3309,47 @@ class ImsAsyncClient(Client):
|
|
2420
3309
|
|
2421
3310
|
auth_settings = []
|
2422
3311
|
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
response_type='GlanceShowImageMemberResponse',
|
2432
|
-
response_headers=response_headers,
|
2433
|
-
auth_settings=auth_settings,
|
2434
|
-
collection_formats=collection_formats,
|
2435
|
-
request_type=request.__class__.__name__)
|
3312
|
+
http_info["cname"] = cname
|
3313
|
+
http_info["collection_formats"] = collection_formats
|
3314
|
+
http_info["path_params"] = path_params
|
3315
|
+
http_info["query_params"] = query_params
|
3316
|
+
http_info["header_params"] = header_params
|
3317
|
+
http_info["post_params"] = form_params
|
3318
|
+
http_info["body"] = body
|
3319
|
+
http_info["response_headers"] = response_headers
|
2436
3320
|
|
3321
|
+
return http_info
|
2437
3322
|
|
2438
3323
|
def glance_show_image_member_schemas_async(self, request):
|
2439
|
-
"""查询镜像成员视图(OpenStack原生)
|
3324
|
+
r"""查询镜像成员视图(OpenStack原生)
|
2440
3325
|
|
2441
3326
|
该接口主要用于查询镜像成员视图,通过视图,用户可以了解到镜像成员包含哪些属性,同时也可以了解每个属性的数据类型。
|
3327
|
+
|
3328
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2442
3329
|
|
2443
|
-
|
2444
|
-
:
|
3330
|
+
|
3331
|
+
:param request: Request instance for GlanceShowImageMemberSchemas
|
3332
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceShowImageMemberSchemasRequest`
|
3333
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceShowImageMemberSchemasResponse`
|
2445
3334
|
"""
|
2446
|
-
|
3335
|
+
http_info = self._glance_show_image_member_schemas_http_info(request)
|
3336
|
+
return self._call_api(**http_info)
|
2447
3337
|
|
2448
|
-
def
|
2449
|
-
|
3338
|
+
def glance_show_image_member_schemas_async_invoker(self, request):
|
3339
|
+
http_info = self._glance_show_image_member_schemas_http_info(request)
|
3340
|
+
return AsyncInvoker(self, http_info)
|
2450
3341
|
|
2451
|
-
|
3342
|
+
def _glance_show_image_member_schemas_http_info(self, request):
|
3343
|
+
http_info = {
|
3344
|
+
"method": "GET",
|
3345
|
+
"resource_path": "/v2/schemas/member",
|
3346
|
+
"request_type": request.__class__.__name__,
|
3347
|
+
"response_type": "GlanceShowImageMemberSchemasResponse"
|
3348
|
+
}
|
2452
3349
|
|
2453
|
-
:
|
2454
|
-
:return: GlanceShowImageMemberSchemasResponse
|
2455
|
-
"""
|
3350
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2456
3351
|
|
2457
|
-
|
2458
|
-
local_var_params = {}
|
2459
|
-
for attr in request.attribute_map:
|
2460
|
-
if hasattr(request, attr):
|
2461
|
-
local_var_params[attr] = getattr(request, attr)
|
3352
|
+
cname = None
|
2462
3353
|
|
2463
3354
|
collection_formats = {}
|
2464
3355
|
|
@@ -2470,9 +3361,9 @@ class ImsAsyncClient(Client):
|
|
2470
3361
|
|
2471
3362
|
form_params = {}
|
2472
3363
|
|
2473
|
-
|
3364
|
+
body = None
|
2474
3365
|
if isinstance(request, SdkStreamRequest):
|
2475
|
-
|
3366
|
+
body = request.get_file_stream()
|
2476
3367
|
|
2477
3368
|
response_headers = []
|
2478
3369
|
|
@@ -2481,45 +3372,47 @@ class ImsAsyncClient(Client):
|
|
2481
3372
|
|
2482
3373
|
auth_settings = []
|
2483
3374
|
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2492
|
-
response_type='GlanceShowImageMemberSchemasResponse',
|
2493
|
-
response_headers=response_headers,
|
2494
|
-
auth_settings=auth_settings,
|
2495
|
-
collection_formats=collection_formats,
|
2496
|
-
request_type=request.__class__.__name__)
|
3375
|
+
http_info["cname"] = cname
|
3376
|
+
http_info["collection_formats"] = collection_formats
|
3377
|
+
http_info["path_params"] = path_params
|
3378
|
+
http_info["query_params"] = query_params
|
3379
|
+
http_info["header_params"] = header_params
|
3380
|
+
http_info["post_params"] = form_params
|
3381
|
+
http_info["body"] = body
|
3382
|
+
http_info["response_headers"] = response_headers
|
2497
3383
|
|
3384
|
+
return http_info
|
2498
3385
|
|
2499
3386
|
def glance_show_image_schemas_async(self, request):
|
2500
|
-
"""查询镜像视图(OpenStack原生)
|
3387
|
+
r"""查询镜像视图(OpenStack原生)
|
2501
3388
|
|
2502
3389
|
该接口主要用于查询镜像视图,通过视图,用户可以了解到镜像包含哪些属性,同时也可以了解每个属性的数据类型等。
|
3390
|
+
|
3391
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2503
3392
|
|
2504
|
-
|
2505
|
-
:
|
3393
|
+
|
3394
|
+
:param request: Request instance for GlanceShowImageSchemas
|
3395
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceShowImageSchemasRequest`
|
3396
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceShowImageSchemasResponse`
|
2506
3397
|
"""
|
2507
|
-
|
3398
|
+
http_info = self._glance_show_image_schemas_http_info(request)
|
3399
|
+
return self._call_api(**http_info)
|
2508
3400
|
|
2509
|
-
def
|
2510
|
-
|
3401
|
+
def glance_show_image_schemas_async_invoker(self, request):
|
3402
|
+
http_info = self._glance_show_image_schemas_http_info(request)
|
3403
|
+
return AsyncInvoker(self, http_info)
|
2511
3404
|
|
2512
|
-
|
3405
|
+
def _glance_show_image_schemas_http_info(self, request):
|
3406
|
+
http_info = {
|
3407
|
+
"method": "GET",
|
3408
|
+
"resource_path": "/v2/schemas/image",
|
3409
|
+
"request_type": request.__class__.__name__,
|
3410
|
+
"response_type": "GlanceShowImageSchemasResponse"
|
3411
|
+
}
|
2513
3412
|
|
2514
|
-
:
|
2515
|
-
:return: GlanceShowImageSchemasResponse
|
2516
|
-
"""
|
3413
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2517
3414
|
|
2518
|
-
|
2519
|
-
local_var_params = {}
|
2520
|
-
for attr in request.attribute_map:
|
2521
|
-
if hasattr(request, attr):
|
2522
|
-
local_var_params[attr] = getattr(request, attr)
|
3415
|
+
cname = None
|
2523
3416
|
|
2524
3417
|
collection_formats = {}
|
2525
3418
|
|
@@ -2531,9 +3424,9 @@ class ImsAsyncClient(Client):
|
|
2531
3424
|
|
2532
3425
|
form_params = {}
|
2533
3426
|
|
2534
|
-
|
3427
|
+
body = None
|
2535
3428
|
if isinstance(request, SdkStreamRequest):
|
2536
|
-
|
3429
|
+
body = request.get_file_stream()
|
2537
3430
|
|
2538
3431
|
response_headers = []
|
2539
3432
|
|
@@ -2542,45 +3435,47 @@ class ImsAsyncClient(Client):
|
|
2542
3435
|
|
2543
3436
|
auth_settings = []
|
2544
3437
|
|
2545
|
-
|
2546
|
-
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
response_type='GlanceShowImageSchemasResponse',
|
2554
|
-
response_headers=response_headers,
|
2555
|
-
auth_settings=auth_settings,
|
2556
|
-
collection_formats=collection_formats,
|
2557
|
-
request_type=request.__class__.__name__)
|
3438
|
+
http_info["cname"] = cname
|
3439
|
+
http_info["collection_formats"] = collection_formats
|
3440
|
+
http_info["path_params"] = path_params
|
3441
|
+
http_info["query_params"] = query_params
|
3442
|
+
http_info["header_params"] = header_params
|
3443
|
+
http_info["post_params"] = form_params
|
3444
|
+
http_info["body"] = body
|
3445
|
+
http_info["response_headers"] = response_headers
|
2558
3446
|
|
3447
|
+
return http_info
|
2559
3448
|
|
2560
3449
|
def glance_update_image_async(self, request):
|
2561
|
-
"""更新镜像信息(OpenStack原生)
|
3450
|
+
r"""更新镜像信息(OpenStack原生)
|
2562
3451
|
|
2563
3452
|
修改镜像信息
|
3453
|
+
|
3454
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
2564
3455
|
|
2565
|
-
|
2566
|
-
:
|
3456
|
+
|
3457
|
+
:param request: Request instance for GlanceUpdateImage
|
3458
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceUpdateImageRequest`
|
3459
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceUpdateImageResponse`
|
2567
3460
|
"""
|
2568
|
-
|
3461
|
+
http_info = self._glance_update_image_http_info(request)
|
3462
|
+
return self._call_api(**http_info)
|
2569
3463
|
|
2570
|
-
def
|
2571
|
-
|
3464
|
+
def glance_update_image_async_invoker(self, request):
|
3465
|
+
http_info = self._glance_update_image_http_info(request)
|
3466
|
+
return AsyncInvoker(self, http_info)
|
2572
3467
|
|
2573
|
-
|
3468
|
+
def _glance_update_image_http_info(self, request):
|
3469
|
+
http_info = {
|
3470
|
+
"method": "PATCH",
|
3471
|
+
"resource_path": "/v2/images/{image_id}",
|
3472
|
+
"request_type": request.__class__.__name__,
|
3473
|
+
"response_type": "GlanceUpdateImageResponse"
|
3474
|
+
}
|
2574
3475
|
|
2575
|
-
:
|
2576
|
-
:return: GlanceUpdateImageResponse
|
2577
|
-
"""
|
3476
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2578
3477
|
|
2579
|
-
|
2580
|
-
local_var_params = {}
|
2581
|
-
for attr in request.attribute_map:
|
2582
|
-
if hasattr(request, attr):
|
2583
|
-
local_var_params[attr] = getattr(request, attr)
|
3478
|
+
cname = None
|
2584
3479
|
|
2585
3480
|
collection_formats = {}
|
2586
3481
|
|
@@ -2594,58 +3489,60 @@ class ImsAsyncClient(Client):
|
|
2594
3489
|
|
2595
3490
|
form_params = {}
|
2596
3491
|
|
2597
|
-
|
3492
|
+
body = None
|
2598
3493
|
if 'body' in local_var_params:
|
2599
|
-
|
3494
|
+
body = local_var_params['body']
|
2600
3495
|
if isinstance(request, SdkStreamRequest):
|
2601
|
-
|
3496
|
+
body = request.get_file_stream()
|
2602
3497
|
|
2603
3498
|
response_headers = []
|
2604
3499
|
|
2605
3500
|
header_params['Content-Type'] = http_utils.select_header_content_type(
|
2606
|
-
['application/json
|
3501
|
+
['application/openstack-images-v2.1-json-patch'])
|
2607
3502
|
|
2608
3503
|
auth_settings = []
|
2609
3504
|
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
response_type='GlanceUpdateImageResponse',
|
2619
|
-
response_headers=response_headers,
|
2620
|
-
auth_settings=auth_settings,
|
2621
|
-
collection_formats=collection_formats,
|
2622
|
-
request_type=request.__class__.__name__)
|
3505
|
+
http_info["cname"] = cname
|
3506
|
+
http_info["collection_formats"] = collection_formats
|
3507
|
+
http_info["path_params"] = path_params
|
3508
|
+
http_info["query_params"] = query_params
|
3509
|
+
http_info["header_params"] = header_params
|
3510
|
+
http_info["post_params"] = form_params
|
3511
|
+
http_info["body"] = body
|
3512
|
+
http_info["response_headers"] = response_headers
|
2623
3513
|
|
3514
|
+
return http_info
|
2624
3515
|
|
2625
3516
|
def glance_update_image_member_async(self, request):
|
2626
|
-
"""更新镜像成员状态(OpenStack原生)
|
3517
|
+
r"""更新镜像成员状态(OpenStack原生)
|
2627
3518
|
|
2628
3519
|
用户接受或者拒绝共享镜像时,使用该接口更新镜像成员的状态。
|
3520
|
+
|
3521
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
3522
|
+
|
2629
3523
|
|
2630
|
-
:param
|
2631
|
-
:
|
3524
|
+
:param request: Request instance for GlanceUpdateImageMember
|
3525
|
+
:type request: :class:`huaweicloudsdkims.v2.GlanceUpdateImageMemberRequest`
|
3526
|
+
:rtype: :class:`huaweicloudsdkims.v2.GlanceUpdateImageMemberResponse`
|
2632
3527
|
"""
|
2633
|
-
|
3528
|
+
http_info = self._glance_update_image_member_http_info(request)
|
3529
|
+
return self._call_api(**http_info)
|
2634
3530
|
|
2635
|
-
def
|
2636
|
-
|
3531
|
+
def glance_update_image_member_async_invoker(self, request):
|
3532
|
+
http_info = self._glance_update_image_member_http_info(request)
|
3533
|
+
return AsyncInvoker(self, http_info)
|
2637
3534
|
|
2638
|
-
|
3535
|
+
def _glance_update_image_member_http_info(self, request):
|
3536
|
+
http_info = {
|
3537
|
+
"method": "PUT",
|
3538
|
+
"resource_path": "/v2/images/{image_id}/members/{member_id}",
|
3539
|
+
"request_type": request.__class__.__name__,
|
3540
|
+
"response_type": "GlanceUpdateImageMemberResponse"
|
3541
|
+
}
|
2639
3542
|
|
2640
|
-
:
|
2641
|
-
:return: GlanceUpdateImageMemberResponse
|
2642
|
-
"""
|
3543
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
2643
3544
|
|
2644
|
-
|
2645
|
-
local_var_params = {}
|
2646
|
-
for attr in request.attribute_map:
|
2647
|
-
if hasattr(request, attr):
|
2648
|
-
local_var_params[attr] = getattr(request, attr)
|
3545
|
+
cname = None
|
2649
3546
|
|
2650
3547
|
collection_formats = {}
|
2651
3548
|
|
@@ -2661,11 +3558,11 @@ class ImsAsyncClient(Client):
|
|
2661
3558
|
|
2662
3559
|
form_params = {}
|
2663
3560
|
|
2664
|
-
|
3561
|
+
body = None
|
2665
3562
|
if 'body' in local_var_params:
|
2666
|
-
|
3563
|
+
body = local_var_params['body']
|
2667
3564
|
if isinstance(request, SdkStreamRequest):
|
2668
|
-
|
3565
|
+
body = request.get_file_stream()
|
2669
3566
|
|
2670
3567
|
response_headers = []
|
2671
3568
|
|
@@ -2674,86 +3571,29 @@ class ImsAsyncClient(Client):
|
|
2674
3571
|
|
2675
3572
|
auth_settings = []
|
2676
3573
|
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
:param ShowJobRequest request
|
2698
|
-
:return: ShowJobResponse
|
2699
|
-
"""
|
2700
|
-
return self.show_job_with_http_info(request)
|
2701
|
-
|
2702
|
-
def show_job_with_http_info(self, request):
|
2703
|
-
"""查询job状态
|
2704
|
-
|
2705
|
-
该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。
|
2706
|
-
|
2707
|
-
:param ShowJobRequest request
|
2708
|
-
:return: ShowJobResponse
|
2709
|
-
"""
|
2710
|
-
|
2711
|
-
all_params = ['job_id']
|
2712
|
-
local_var_params = {}
|
2713
|
-
for attr in request.attribute_map:
|
2714
|
-
if hasattr(request, attr):
|
2715
|
-
local_var_params[attr] = getattr(request, attr)
|
2716
|
-
|
2717
|
-
collection_formats = {}
|
2718
|
-
|
2719
|
-
path_params = {}
|
2720
|
-
if 'job_id' in local_var_params:
|
2721
|
-
path_params['job_id'] = local_var_params['job_id']
|
2722
|
-
|
2723
|
-
query_params = []
|
2724
|
-
|
2725
|
-
header_params = {}
|
2726
|
-
|
2727
|
-
form_params = {}
|
2728
|
-
|
2729
|
-
body_params = None
|
2730
|
-
if isinstance(request, SdkStreamRequest):
|
2731
|
-
body_params = request.get_file_stream()
|
2732
|
-
|
2733
|
-
response_headers = []
|
2734
|
-
|
2735
|
-
header_params['Content-Type'] = http_utils.select_header_content_type(
|
2736
|
-
['application/json'])
|
2737
|
-
|
2738
|
-
auth_settings = []
|
2739
|
-
|
2740
|
-
return self.call_api(
|
2741
|
-
resource_path='/v1/{project_id}/jobs/{job_id}',
|
2742
|
-
method='GET',
|
2743
|
-
path_params=path_params,
|
2744
|
-
query_params=query_params,
|
2745
|
-
header_params=header_params,
|
2746
|
-
body=body_params,
|
2747
|
-
post_params=form_params,
|
2748
|
-
response_type='ShowJobResponse',
|
2749
|
-
response_headers=response_headers,
|
2750
|
-
auth_settings=auth_settings,
|
2751
|
-
collection_formats=collection_formats,
|
2752
|
-
request_type=request.__class__.__name__)
|
2753
|
-
|
3574
|
+
http_info["cname"] = cname
|
3575
|
+
http_info["collection_formats"] = collection_formats
|
3576
|
+
http_info["path_params"] = path_params
|
3577
|
+
http_info["query_params"] = query_params
|
3578
|
+
http_info["header_params"] = header_params
|
3579
|
+
http_info["post_params"] = form_params
|
3580
|
+
http_info["body"] = body
|
3581
|
+
http_info["response_headers"] = response_headers
|
3582
|
+
|
3583
|
+
return http_info
|
3584
|
+
|
3585
|
+
def _call_api(self, **kwargs):
|
3586
|
+
try:
|
3587
|
+
kwargs["async_request"] = True
|
3588
|
+
return self.do_http_request(**kwargs)
|
3589
|
+
except TypeError:
|
3590
|
+
import inspect
|
3591
|
+
params = inspect.signature(self.do_http_request).parameters
|
3592
|
+
http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs}
|
3593
|
+
return self.do_http_request(**http_info)
|
2754
3594
|
|
2755
3595
|
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
2756
|
-
post_params=None, response_type=None, response_headers=None, auth_settings=None,
|
3596
|
+
post_params=None, cname=None, response_type=None, response_headers=None, auth_settings=None,
|
2757
3597
|
collection_formats=None, request_type=None):
|
2758
3598
|
"""Makes the HTTP request and returns deserialized data.
|
2759
3599
|
|
@@ -2764,9 +3604,10 @@ class ImsAsyncClient(Client):
|
|
2764
3604
|
:param header_params: Header parameters to be
|
2765
3605
|
placed in the request header.
|
2766
3606
|
:param body: Request body.
|
2767
|
-
:param post_params
|
3607
|
+
:param post_params: Request post form parameters,
|
2768
3608
|
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
2769
|
-
:param
|
3609
|
+
:param cname: Used for obs endpoint.
|
3610
|
+
:param auth_settings: Auth Settings names for the request.
|
2770
3611
|
:param response_type: Response data type.
|
2771
3612
|
:param response_headers: Header should be added to response data.
|
2772
3613
|
:param collection_formats: dict of collection formats for path, query,
|
@@ -2783,8 +3624,9 @@ class ImsAsyncClient(Client):
|
|
2783
3624
|
header_params=header_params,
|
2784
3625
|
body=body,
|
2785
3626
|
post_params=post_params,
|
3627
|
+
cname=cname,
|
2786
3628
|
response_type=response_type,
|
2787
3629
|
response_headers=response_headers,
|
2788
3630
|
collection_formats=collection_formats,
|
2789
3631
|
request_type=request_type,
|
2790
|
-
|
3632
|
+
async_request=True)
|