Skip to content

Commit

Permalink
update to v2.16.0 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwen.yin authored and Sczlog committed Jul 16, 2024
1 parent 88554a1 commit bbd5b9a
Show file tree
Hide file tree
Showing 184 changed files with 32,009 additions and 7,862 deletions.
157 changes: 154 additions & 3 deletions .openapi-generator/FILES

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Python 环境下的 Cloudtower SDK,适用于 2.7 与 3.4 以上版本。
- ### whl

```shell
pip install cloudtower_sdk-2.15.1-py2.py3-none-any.whl
pip install cloudtower_sdk-2.16.0-py2.py3-none-any.whl
```

- ### tar.gz

```shell
tar xvzf cloudtower-sdk-2.15.1.tar.gz
cd cloudtower-sdk-2.15.1
tar xvzf cloudtower-sdk-2.16.0.tar.gz
cd cloudtower-sdk-2.16.0
python setup.py install
```

Expand Down
20 changes: 19 additions & 1 deletion RELEASENOTE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# RELEASE NOTE

## release 日期 2024-07-16

v2.16.0 release (tower version 4.2.0)

### bugfix

- [utils]: 移除代码中的 type annotation 以支持 python2
- [VmApi], [VmVolumeApi],[ContentLIbraryVmTemplateApi]:
- 移除 [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 参数

### update

- [HostApi]:
- [create_host]: 新增 `vdses` 字段适配网络融合,新增 `zbsSpec` 字段适配 zbs 560 以上版本集群的添加
- [VmApi]:
- [get_vms]: 新增 `bios_uuid` 字段
- 新增 [image_utils] 工具类,支持通过 uploadTask 来获取上传后的 elfImage 与 contentLibraryImage

## release 日期 2024-05-30

v2.15.1 release (tower version 4.1.0)
Expand All @@ -22,7 +40,7 @@ v2.15.0 release (tower version 4.1.0)
### bugfix

- [VmApi]
- [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 编辑后丢失部分网卡信息的问题
- [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 编辑后丢失部分网卡信息的问题
- [VmPlacementGroupApi]
- [create_vm_placement_group], [update_vm_placement_group]: 修复了创建与更新放置组时,`vm_vm_policy_enabled` 为 false 时无法更新组内虚拟机成员

Expand Down
158 changes: 154 additions & 4 deletions cloudtower/__init__.py

Large diffs are not rendered by default.

52 changes: 22 additions & 30 deletions cloudtower/api/content_library_vm_template_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,19 +633,19 @@ def distribute_content_library_vmtemplate_clusters_with_http_info(self, content_
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def export_content_library_vm_template(self, content_language, content_library_vm_template_export_params, **kwargs): # noqa: E501
def export_content_library_vm_template(self, content_library_vm_template_export_params, **kwargs): # noqa: E501
"""export_content_library_vm_template # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.export_content_library_vm_template(content_language, content_library_vm_template_export_params, async_req=True)
>>> thread = api.export_content_library_vm_template(content_library_vm_template_export_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param content_library_vm_template_export_params: (required)
:type content_library_vm_template_export_params: ContentLibraryVmTemplateExportParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
Expand All @@ -662,21 +662,21 @@ def export_content_library_vm_template(self, content_language, content_library_v
:rtype: list[WithTaskVmExportFile]
"""
kwargs['_return_http_data_only'] = True
return self.export_content_library_vm_template_with_http_info(content_language, content_library_vm_template_export_params, **kwargs) # noqa: E501
return self.export_content_library_vm_template_with_http_info(content_library_vm_template_export_params, **kwargs) # noqa: E501

def export_content_library_vm_template_with_http_info(self, content_language, content_library_vm_template_export_params, **kwargs): # noqa: E501
def export_content_library_vm_template_with_http_info(self, content_library_vm_template_export_params, **kwargs): # noqa: E501
"""export_content_library_vm_template # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.export_content_library_vm_template_with_http_info(content_language, content_library_vm_template_export_params, async_req=True)
>>> thread = api.export_content_library_vm_template_with_http_info(content_library_vm_template_export_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param content_library_vm_template_export_params: (required)
:type content_library_vm_template_export_params: ContentLibraryVmTemplateExportParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
Expand Down Expand Up @@ -704,8 +704,8 @@ def export_content_library_vm_template_with_http_info(self, content_language, co
local_var_params = locals()

all_params = [
'content_language',
'content_library_vm_template_export_params'
'content_library_vm_template_export_params',
'content_language'
]
all_params.extend(
[
Expand All @@ -727,10 +727,6 @@ def export_content_library_vm_template_with_http_info(self, content_language, co
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'content_language' is set
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
local_var_params['content_language'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `content_language` when calling `export_content_library_vm_template`") # noqa: E501
# verify the required parameter 'content_library_vm_template_export_params' is set
if self.api_client.client_side_validation and ('content_library_vm_template_export_params' not in local_var_params or # noqa: E501
local_var_params['content_library_vm_template_export_params'] is None): # noqa: E501
Expand Down Expand Up @@ -1093,19 +1089,19 @@ def get_content_library_vm_templates_connection_with_http_info(self, get_content
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def import_content_library_vm_template(self, content_language, content_library_vm_template_import_params, **kwargs): # noqa: E501
def import_content_library_vm_template(self, content_library_vm_template_import_params, **kwargs): # noqa: E501
"""import_content_library_vm_template # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.import_content_library_vm_template(content_language, content_library_vm_template_import_params, async_req=True)
>>> thread = api.import_content_library_vm_template(content_library_vm_template_import_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param content_library_vm_template_import_params: (required)
:type content_library_vm_template_import_params: list[ContentLibraryVmTemplateImportParams]
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
Expand All @@ -1122,21 +1118,21 @@ def import_content_library_vm_template(self, content_language, content_library_v
:rtype: list[WithTaskContentLibraryVmTemplate]
"""
kwargs['_return_http_data_only'] = True
return self.import_content_library_vm_template_with_http_info(content_language, content_library_vm_template_import_params, **kwargs) # noqa: E501
return self.import_content_library_vm_template_with_http_info(content_library_vm_template_import_params, **kwargs) # noqa: E501

def import_content_library_vm_template_with_http_info(self, content_language, content_library_vm_template_import_params, **kwargs): # noqa: E501
def import_content_library_vm_template_with_http_info(self, content_library_vm_template_import_params, **kwargs): # noqa: E501
"""import_content_library_vm_template # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.import_content_library_vm_template_with_http_info(content_language, content_library_vm_template_import_params, async_req=True)
>>> thread = api.import_content_library_vm_template_with_http_info(content_library_vm_template_import_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param content_library_vm_template_import_params: (required)
:type content_library_vm_template_import_params: list[ContentLibraryVmTemplateImportParams]
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
Expand Down Expand Up @@ -1164,8 +1160,8 @@ def import_content_library_vm_template_with_http_info(self, content_language, co
local_var_params = locals()

all_params = [
'content_language',
'content_library_vm_template_import_params'
'content_library_vm_template_import_params',
'content_language'
]
all_params.extend(
[
Expand All @@ -1187,10 +1183,6 @@ def import_content_library_vm_template_with_http_info(self, content_language, co
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'content_language' is set
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
local_var_params['content_language'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `content_language` when calling `import_content_library_vm_template`") # noqa: E501
# verify the required parameter 'content_library_vm_template_import_params' is set
if self.api_client.client_side_validation and ('content_library_vm_template_import_params' not in local_var_params or # noqa: E501
local_var_params['content_library_vm_template_import_params'] is None): # noqa: E501
Expand Down
52 changes: 22 additions & 30 deletions cloudtower/api/vm_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2764,19 +2764,19 @@ def get_vm_gpu_device_info_with_http_info(self, get_vms_request_body, **kwargs):
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def get_vm_vnc_info(self, content_language, get_vm_vnc_info_params, **kwargs): # noqa: E501
def get_vm_vnc_info(self, get_vm_vnc_info_params, **kwargs): # noqa: E501
"""get_vm_vnc_info # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_vm_vnc_info(content_language, get_vm_vnc_info_params, async_req=True)
>>> thread = api.get_vm_vnc_info(get_vm_vnc_info_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param get_vm_vnc_info_params: (required)
:type get_vm_vnc_info_params: GetVmVncInfoParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
Expand All @@ -2793,21 +2793,21 @@ def get_vm_vnc_info(self, content_language, get_vm_vnc_info_params, **kwargs):
:rtype: VmVncInfo
"""
kwargs['_return_http_data_only'] = True
return self.get_vm_vnc_info_with_http_info(content_language, get_vm_vnc_info_params, **kwargs) # noqa: E501
return self.get_vm_vnc_info_with_http_info(get_vm_vnc_info_params, **kwargs) # noqa: E501

def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_params, **kwargs): # noqa: E501
def get_vm_vnc_info_with_http_info(self, get_vm_vnc_info_params, **kwargs): # noqa: E501
"""get_vm_vnc_info # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_vm_vnc_info_with_http_info(content_language, get_vm_vnc_info_params, async_req=True)
>>> thread = api.get_vm_vnc_info_with_http_info(get_vm_vnc_info_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param get_vm_vnc_info_params: (required)
:type get_vm_vnc_info_params: GetVmVncInfoParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
Expand Down Expand Up @@ -2835,8 +2835,8 @@ def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_param
local_var_params = locals()

all_params = [
'content_language',
'get_vm_vnc_info_params'
'get_vm_vnc_info_params',
'content_language'
]
all_params.extend(
[
Expand All @@ -2858,10 +2858,6 @@ def get_vm_vnc_info_with_http_info(self, content_language, get_vm_vnc_info_param
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'content_language' is set
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
local_var_params['content_language'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `content_language` when calling `get_vm_vnc_info`") # noqa: E501
# verify the required parameter 'get_vm_vnc_info_params' is set
if self.api_client.client_side_validation and ('get_vm_vnc_info_params' not in local_var_params or # noqa: E501
local_var_params['get_vm_vnc_info_params'] is None): # noqa: E501
Expand Down Expand Up @@ -8096,19 +8092,19 @@ def update_vm_nic_basic_info_with_http_info(self, vm_update_nic_basic_info_param
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def update_vm_nic_qos_option(self, content_language, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
def update_vm_nic_qos_option(self, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
"""update_vm_nic_qos_option # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_vm_nic_qos_option(content_language, vm_update_nic_qos_options_params, async_req=True)
>>> thread = api.update_vm_nic_qos_option(vm_update_nic_qos_options_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param vm_update_nic_qos_options_params: (required)
:type vm_update_nic_qos_options_params: VmUpdateNicQosOptionsParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
Expand All @@ -8125,21 +8121,21 @@ def update_vm_nic_qos_option(self, content_language, vm_update_nic_qos_options_p
:rtype: list[WithTaskVm]
"""
kwargs['_return_http_data_only'] = True
return self.update_vm_nic_qos_option_with_http_info(content_language, vm_update_nic_qos_options_params, **kwargs) # noqa: E501
return self.update_vm_nic_qos_option_with_http_info(vm_update_nic_qos_options_params, **kwargs) # noqa: E501

def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
def update_vm_nic_qos_option_with_http_info(self, vm_update_nic_qos_options_params, **kwargs): # noqa: E501
"""update_vm_nic_qos_option # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_vm_nic_qos_option_with_http_info(content_language, vm_update_nic_qos_options_params, async_req=True)
>>> thread = api.update_vm_nic_qos_option_with_http_info(vm_update_nic_qos_options_params, async_req=True)
>>> result = thread.get()
:param content_language: (required)
:type content_language: ContentLanguage
:param vm_update_nic_qos_options_params: (required)
:type vm_update_nic_qos_options_params: VmUpdateNicQosOptionsParams
:param content_language:
:type content_language: ContentLanguage
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
Expand Down Expand Up @@ -8167,8 +8163,8 @@ def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_ni
local_var_params = locals()

all_params = [
'content_language',
'vm_update_nic_qos_options_params'
'vm_update_nic_qos_options_params',
'content_language'
]
all_params.extend(
[
Expand All @@ -8190,10 +8186,6 @@ def update_vm_nic_qos_option_with_http_info(self, content_language, vm_update_ni
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'content_language' is set
if self.api_client.client_side_validation and ('content_language' not in local_var_params or # noqa: E501
local_var_params['content_language'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `content_language` when calling `update_vm_nic_qos_option`") # noqa: E501
# verify the required parameter 'vm_update_nic_qos_options_params' is set
if self.api_client.client_side_validation and ('vm_update_nic_qos_options_params' not in local_var_params or # noqa: E501
local_var_params['vm_update_nic_qos_options_params'] is None): # noqa: E501
Expand Down
Loading

0 comments on commit bbd5b9a

Please sign in to comment.