Skip to content

Commit bbd5b9a

Browse files
shenwen.yinSczlog
authored andcommitted
update to v2.16.0 schema
1 parent 88554a1 commit bbd5b9a

File tree

184 files changed

+32009
-7862
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+32009
-7862
lines changed

.openapi-generator/FILES

Lines changed: 154 additions & 3 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Python 环境下的 Cloudtower SDK,适用于 2.7 与 3.4 以上版本。
1111
- ### whl
1212

1313
```shell
14-
pip install cloudtower_sdk-2.15.1-py2.py3-none-any.whl
14+
pip install cloudtower_sdk-2.16.0-py2.py3-none-any.whl
1515
```
1616

1717
- ### tar.gz
1818

1919
```shell
20-
tar xvzf cloudtower-sdk-2.15.1.tar.gz
21-
cd cloudtower-sdk-2.15.1
20+
tar xvzf cloudtower-sdk-2.16.0.tar.gz
21+
cd cloudtower-sdk-2.16.0
2222
python setup.py install
2323
```
2424

RELEASENOTE.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# RELEASE NOTE
22

3+
## release 日期 2024-07-16
4+
5+
v2.16.0 release (tower version 4.2.0)
6+
7+
### bugfix
8+
9+
- [utils]: 移除代码中的 type annotation 以支持 python2
10+
- [VmApi], [VmVolumeApi],[ContentLIbraryVmTemplateApi]:
11+
- 移除 [export_content_library_vm_template], [import_content_library_vm_template], [export_vm_volume], [import_vm_volume], [update_vm_nic_qos_option], [get_vm_vnc_info] 被错误增加必须的 content-language 参数
12+
13+
### update
14+
15+
- [HostApi]:
16+
- [create_host]: 新增 `vdses` 字段适配网络融合,新增 `zbsSpec` 字段适配 zbs 560 以上版本集群的添加
17+
- [VmApi]:
18+
- [get_vms]: 新增 `bios_uuid` 字段
19+
- 新增 [image_utils] 工具类,支持通过 uploadTask 来获取上传后的 elfImage 与 contentLibraryImage
20+
321
## release 日期 2024-05-30
422

523
v2.15.1 release (tower version 4.1.0)
@@ -22,7 +40,7 @@ v2.15.0 release (tower version 4.1.0)
2240
### bugfix
2341

2442
- [VmApi]
25-
- [add_vm_Nic], [remove_vm_nic], [remove_vm_nic_by_where], [update_vm_nic], [update_vm_nic_basic_info], [update_vm_nic_advance_info], [update_vm_nic_qos_option]: 修复更新虚拟机网卡类 API 编辑后丢失部分网卡信息的问题
43+
- [add_vm_nic], [remove_vm_nic], [remove_vm_nic_by_where], [update_vm_nic], [update_vm_nic_basic_info], [update_vm_nic_advance_info], [update_vm_nic_qos_option]: 修复更新虚拟机网卡类 API 编辑后丢失部分网卡信息的问题
2644
- [VmPlacementGroupApi]
2745
- [create_vm_placement_group], [update_vm_placement_group]: 修复了创建与更新放置组时,`vm_vm_policy_enabled` 为 false 时无法更新组内虚拟机成员
2846

cloudtower/__init__.py

Lines changed: 154 additions & 4 deletions
Large diffs are not rendered by default.

cloudtower/api/content_library_vm_template_api.py

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -633,19 +633,19 @@ def distribute_content_library_vmtemplate_clusters_with_http_info(self, content_
633633
collection_formats=collection_formats,
634634
_request_auth=local_var_params.get('_request_auth'))
635635

636-
def export_content_library_vm_template(self, content_language, content_library_vm_template_export_params, **kwargs): # noqa: E501
636+
def export_content_library_vm_template(self, content_library_vm_template_export_params, **kwargs): # noqa: E501
637637
"""export_content_library_vm_template # noqa: E501
638638
639639
This method makes a synchronous HTTP request by default. To make an
640640
asynchronous HTTP request, please pass async_req=True
641641
642-
>>> thread = api.export_content_library_vm_template(content_language, content_library_vm_template_export_params, async_req=True)
642+
>>> thread = api.export_content_library_vm_template(content_library_vm_template_export_params, async_req=True)
643643
>>> result = thread.get()
644644
645-
:param content_language: (required)
646-
:type content_language: ContentLanguage
647645
:param content_library_vm_template_export_params: (required)
648646
:type content_library_vm_template_export_params: ContentLibraryVmTemplateExportParams
647+
:param content_language:
648+
:type content_language: ContentLanguage
649649
:param async_req: Whether to execute the request asynchronously.
650650
:type async_req: bool, optional
651651
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -662,21 +662,21 @@ def export_content_library_vm_template(self, content_language, content_library_v
662662
:rtype: list[WithTaskVmExportFile]
663663
"""
664664
kwargs['_return_http_data_only'] = True
665-
return self.export_content_library_vm_template_with_http_info(content_language, content_library_vm_template_export_params, **kwargs) # noqa: E501
665+
return self.export_content_library_vm_template_with_http_info(content_library_vm_template_export_params, **kwargs) # noqa: E501
666666

667-
def export_content_library_vm_template_with_http_info(self, content_language, content_library_vm_template_export_params, **kwargs): # noqa: E501
667+
def export_content_library_vm_template_with_http_info(self, content_library_vm_template_export_params, **kwargs): # noqa: E501
668668
"""export_content_library_vm_template # noqa: E501
669669
670670
This method makes a synchronous HTTP request by default. To make an
671671
asynchronous HTTP request, please pass async_req=True
672672
673-
>>> thread = api.export_content_library_vm_template_with_http_info(content_language, content_library_vm_template_export_params, async_req=True)
673+
>>> thread = api.export_content_library_vm_template_with_http_info(content_library_vm_template_export_params, async_req=True)
674674
>>> result = thread.get()
675675
676-
:param content_language: (required)
677-
:type content_language: ContentLanguage
678676
:param content_library_vm_template_export_params: (required)
679677
:type content_library_vm_template_export_params: ContentLibraryVmTemplateExportParams
678+
:param content_language:
679+
:type content_language: ContentLanguage
680680
:param async_req: Whether to execute the request asynchronously.
681681
:type async_req: bool, optional
682682
:param _return_http_data_only: response data without head status code
@@ -704,8 +704,8 @@ def export_content_library_vm_template_with_http_info(self, content_language, co
704704
local_var_params = locals()
705705

706706
all_params = [
707-
'content_language',
708-
'content_library_vm_template_export_params'
707+
'content_library_vm_template_export_params',
708+
'content_language'
709709
]
710710
all_params.extend(
711711
[
@@ -727,10 +727,6 @@ def export_content_library_vm_template_with_http_info(self, content_language, co
727727
)
728728
local_var_params[key] = val
729729
del local_var_params['kwargs']
730-
# verify the required parameter 'content_language' is set
731-
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
732-
local_var_params['content_language'] is None): # noqa: E501
733-
raise ApiValueError("Missing the required parameter `content_language` when calling `export_content_library_vm_template`") # noqa: E501
734730
# verify the required parameter 'content_library_vm_template_export_params' is set
735731
if self.api_client.client_side_validation and ('content_library_vm_template_export_params' not in local_var_params or # noqa: E501
736732
local_var_params['content_library_vm_template_export_params'] is None): # noqa: E501
@@ -1093,19 +1089,19 @@ def get_content_library_vm_templates_connection_with_http_info(self, get_content
10931089
collection_formats=collection_formats,
10941090
_request_auth=local_var_params.get('_request_auth'))
10951091

1096-
def import_content_library_vm_template(self, content_language, content_library_vm_template_import_params, **kwargs): # noqa: E501
1092+
def import_content_library_vm_template(self, content_library_vm_template_import_params, **kwargs): # noqa: E501
10971093
"""import_content_library_vm_template # noqa: E501
10981094
10991095
This method makes a synchronous HTTP request by default. To make an
11001096
asynchronous HTTP request, please pass async_req=True
11011097
1102-
>>> thread = api.import_content_library_vm_template(content_language, content_library_vm_template_import_params, async_req=True)
1098+
>>> thread = api.import_content_library_vm_template(content_library_vm_template_import_params, async_req=True)
11031099
>>> result = thread.get()
11041100
1105-
:param content_language: (required)
1106-
:type content_language: ContentLanguage
11071101
:param content_library_vm_template_import_params: (required)
11081102
:type content_library_vm_template_import_params: list[ContentLibraryVmTemplateImportParams]
1103+
:param content_language:
1104+
:type content_language: ContentLanguage
11091105
:param async_req: Whether to execute the request asynchronously.
11101106
:type async_req: bool, optional
11111107
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1122,21 +1118,21 @@ def import_content_library_vm_template(self, content_language, content_library_v
11221118
:rtype: list[WithTaskContentLibraryVmTemplate]
11231119
"""
11241120
kwargs['_return_http_data_only'] = True
1125-
return self.import_content_library_vm_template_with_http_info(content_language, content_library_vm_template_import_params, **kwargs) # noqa: E501
1121+
return self.import_content_library_vm_template_with_http_info(content_library_vm_template_import_params, **kwargs) # noqa: E501
11261122

1127-
def import_content_library_vm_template_with_http_info(self, content_language, content_library_vm_template_import_params, **kwargs): # noqa: E501
1123+
def import_content_library_vm_template_with_http_info(self, content_library_vm_template_import_params, **kwargs): # noqa: E501
11281124
"""import_content_library_vm_template # noqa: E501
11291125
11301126
This method makes a synchronous HTTP request by default. To make an
11311127
asynchronous HTTP request, please pass async_req=True
11321128
1133-
>>> thread = api.import_content_library_vm_template_with_http_info(content_language, content_library_vm_template_import_params, async_req=True)
1129+
>>> thread = api.import_content_library_vm_template_with_http_info(content_library_vm_template_import_params, async_req=True)
11341130
>>> result = thread.get()
11351131
1136-
:param content_language: (required)
1137-
:type content_language: ContentLanguage
11381132
:param content_library_vm_template_import_params: (required)
11391133
:type content_library_vm_template_import_params: list[ContentLibraryVmTemplateImportParams]
1134+
:param content_language:
1135+
:type content_language: ContentLanguage
11401136
:param async_req: Whether to execute the request asynchronously.
11411137
:type async_req: bool, optional
11421138
:param _return_http_data_only: response data without head status code
@@ -1164,8 +1160,8 @@ def import_content_library_vm_template_with_http_info(self, content_language, co
11641160
local_var_params = locals()
11651161

11661162
all_params = [
1167-
'content_language',
1168-
'content_library_vm_template_import_params'
1163+
'content_library_vm_template_import_params',
1164+
'content_language'
11691165
]
11701166
all_params.extend(
11711167
[
@@ -1187,10 +1183,6 @@ def import_content_library_vm_template_with_http_info(self, content_language, co
11871183
)
11881184
local_var_params[key] = val
11891185
del local_var_params['kwargs']
1190-
# verify the required parameter 'content_language' is set
1191-
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
1192-
local_var_params['content_language'] is None): # noqa: E501
1193-
raise ApiValueError("Missing the required parameter `content_language` when calling `import_content_library_vm_template`") # noqa: E501
11941186
# verify the required parameter 'content_library_vm_template_import_params' is set
11951187
if self.api_client.client_side_validation and ('content_library_vm_template_import_params' not in local_var_params or # noqa: E501
11961188
local_var_params['content_library_vm_template_import_params'] is None): # noqa: E501

cloudtower/api/vm_api.py

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,19 +2764,19 @@ def get_vm_gpu_device_info_with_http_info(self, get_vms_request_body, **kwargs):
27642764
collection_formats=collection_formats,
27652765
_request_auth=local_var_params.get('_request_auth'))
27662766

2767-
def get_vm_vnc_info(self, content_language, get_vm_vnc_info_params, **kwargs): # noqa: E501
2767+
def get_vm_vnc_info(self, get_vm_vnc_info_params, **kwargs): # noqa: E501
27682768
"""get_vm_vnc_info # noqa: E501
27692769
27702770
This method makes a synchronous HTTP request by default. To make an
27712771
asynchronous HTTP request, please pass async_req=True
27722772
2773-
>>> thread = api.get_vm_vnc_info(content_language, get_vm_vnc_info_params, async_req=True)
2773+
>>> thread = api.get_vm_vnc_info(get_vm_vnc_info_params, async_req=True)
27742774
>>> result = thread.get()
27752775
2776-
:param content_language: (required)
2777-
:type content_language: ContentLanguage
27782776
:param get_vm_vnc_info_params: (required)
27792777
:type get_vm_vnc_info_params: GetVmVncInfoParams
2778+
:param content_language:
2779+
:type content_language: ContentLanguage
27802780
:param async_req: Whether to execute the request asynchronously.
27812781
:type async_req: bool, optional
27822782
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -2793,21 +2793,21 @@ def get_vm_vnc_info(self, content_language, get_vm_vnc_info_params, **kwargs):
27932793
:rtype: VmVncInfo
27942794
"""
27952795
kwargs['_return_http_data_only'] = True
2796-
return self.get_vm_vnc_info_with_http_info(content_language, get_vm_vnc_info_params, **kwargs) # noqa: E501
2796+
return self.get_vm_vnc_info_with_http_info(get_vm_vnc_info_params, **kwargs) # noqa: E501
27972797

2798-
def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_params, **kwargs): # noqa: E501
2798+
def get_vm_vnc_info_with_http_info(self, get_vm_vnc_info_params, **kwargs): # noqa: E501
27992799
"""get_vm_vnc_info # noqa: E501
28002800
28012801
This method makes a synchronous HTTP request by default. To make an
28022802
asynchronous HTTP request, please pass async_req=True
28032803
2804-
>>> thread = api.get_vm_vnc_info_with_http_info(content_language, get_vm_vnc_info_params, async_req=True)
2804+
>>> thread = api.get_vm_vnc_info_with_http_info(get_vm_vnc_info_params, async_req=True)
28052805
>>> result = thread.get()
28062806
2807-
:param content_language: (required)
2808-
:type content_language: ContentLanguage
28092807
:param get_vm_vnc_info_params: (required)
28102808
:type get_vm_vnc_info_params: GetVmVncInfoParams
2809+
:param content_language:
2810+
:type content_language: ContentLanguage
28112811
:param async_req: Whether to execute the request asynchronously.
28122812
:type async_req: bool, optional
28132813
:param _return_http_data_only: response data without head status code
@@ -2835,8 +2835,8 @@ def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_param
28352835
local_var_params = locals()
28362836

28372837
all_params = [
2838-
'content_language',
2839-
'get_vm_vnc_info_params'
2838+
'get_vm_vnc_info_params',
2839+
'content_language'
28402840
]
28412841
all_params.extend(
28422842
[
@@ -2858,10 +2858,6 @@ def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_param
28582858
)
28592859
local_var_params[key] = val
28602860
del local_var_params['kwargs']
2861-
# verify the required parameter 'content_language' is set
2862-
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
2863-
local_var_params['content_language'] is None): # noqa: E501
2864-
raise ApiValueError("Missing the required parameter `content_language` when calling `get_vm_vnc_info`") # noqa: E501
28652861
# verify the required parameter 'get_vm_vnc_info_params' is set
28662862
if self.api_client.client_side_validation and ('get_vm_vnc_info_params' not in local_var_params or # noqa: E501
28672863
local_var_params['get_vm_vnc_info_params'] is None): # noqa: E501
@@ -8096,19 +8092,19 @@ def update_vm_nic_basic_info_with_http_info(self, vm_update_nic_basic_info_param
80968092
collection_formats=collection_formats,
80978093
_request_auth=local_var_params.get('_request_auth'))
80988094

8099-
def update_vm_nic_qos_option(self, content_language, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
8095+
def update_vm_nic_qos_option(self, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
81008096
"""update_vm_nic_qos_option # noqa: E501
81018097
81028098
This method makes a synchronous HTTP request by default. To make an
81038099
asynchronous HTTP request, please pass async_req=True
81048100
8105-
>>> thread = api.update_vm_nic_qos_option(content_language, vm_update_nic_qos_options_params, async_req=True)
8101+
>>> thread = api.update_vm_nic_qos_option(vm_update_nic_qos_options_params, async_req=True)
81068102
>>> result = thread.get()
81078103
8108-
:param content_language: (required)
8109-
:type content_language: ContentLanguage
81108104
:param vm_update_nic_qos_options_params: (required)
81118105
:type vm_update_nic_qos_options_params: VmUpdateNicQosOptionsParams
8106+
:param content_language:
8107+
:type content_language: ContentLanguage
81128108
:param async_req: Whether to execute the request asynchronously.
81138109
:type async_req: bool, optional
81148110
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -8125,21 +8121,21 @@ def update_vm_nic_qos_option(self, content_language, vm_update_nic_qos_options_p
81258121
:rtype: list[WithTaskVm]
81268122
"""
81278123
kwargs['_return_http_data_only'] = True
8128-
return self.update_vm_nic_qos_option_with_http_info(content_language, vm_update_nic_qos_options_params, **kwargs) # noqa: E501
8124+
return self.update_vm_nic_qos_option_with_http_info(vm_update_nic_qos_options_params, **kwargs) # noqa: E501
81298125

8130-
def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
8126+
def update_vm_nic_qos_option_with_http_info(self, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
81318127
"""update_vm_nic_qos_option # noqa: E501
81328128
81338129
This method makes a synchronous HTTP request by default. To make an
81348130
asynchronous HTTP request, please pass async_req=True
81358131
8136-
>>> thread = api.update_vm_nic_qos_option_with_http_info(content_language, vm_update_nic_qos_options_params, async_req=True)
8132+
>>> thread = api.update_vm_nic_qos_option_with_http_info(vm_update_nic_qos_options_params, async_req=True)
81378133
>>> result = thread.get()
81388134
8139-
:param content_language: (required)
8140-
:type content_language: ContentLanguage
81418135
:param vm_update_nic_qos_options_params: (required)
81428136
:type vm_update_nic_qos_options_params: VmUpdateNicQosOptionsParams
8137+
:param content_language:
8138+
:type content_language: ContentLanguage
81438139
:param async_req: Whether to execute the request asynchronously.
81448140
:type async_req: bool, optional
81458141
:param _return_http_data_only: response data without head status code
@@ -8167,8 +8163,8 @@ def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_ni
81678163
local_var_params = locals()
81688164

81698165
all_params = [
8170-
'content_language',
8171-
'vm_update_nic_qos_options_params'
8166+
'vm_update_nic_qos_options_params',
8167+
'content_language'
81728168
]
81738169
all_params.extend(
81748170
[
@@ -8190,10 +8186,6 @@ def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_ni
81908186
)
81918187
local_var_params[key] = val
81928188
del local_var_params['kwargs']
8193-
# verify the required parameter 'content_language' is set
8194-
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
8195-
local_var_params['content_language'] is None): # noqa: E501
8196-
raise ApiValueError("Missing the required parameter `content_language` when calling `update_vm_nic_qos_option`") # noqa: E501
81978189
# verify the required parameter 'vm_update_nic_qos_options_params' is set
81988190
if self.api_client.client_side_validation and ('vm_update_nic_qos_options_params' not in local_var_params or # noqa: E501
81998191
local_var_params['vm_update_nic_qos_options_params'] is None): # noqa: E501

0 commit comments

Comments
 (0)