Skip to content

Commit d4a2e47

Browse files
committed
update to v2.8.0 schema
1 parent 34e4dd5 commit d4a2e47

15 files changed

+69
-33
lines changed

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.7.0-py2.py3-none-any.whl
14+
pip install cloudtower_sdk-2.8.0-py2.py3-none-any.whl
1515
```
1616

1717
- ### tar.gz
1818

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

RELEASENOTE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# RELEASE NOTE
22

3+
## release 日期 2022-05-04
4+
5+
v2.8.0 release
6+
7+
- optimize: VlanApi: [vm_vlan_creation_params], [vm_vlan_updation_params_data], [management_vlan_updation_params_data] 限制 `VlanId` 范围为 0~4095
8+
39
## release 日期 2022-03-22
410

511
v2.7.0 release

cloudtower/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# flake8: noqa
44
from __future__ import absolute_import
55

6-
__version__ = "2.7.0"
6+
__version__ = "2.8.0"
77

88
# import apis into sdk package
99
from cloudtower.api.alert_api import AlertApi

cloudtower/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
cloudtower operation API and SDK # noqa: E501
66
7-
The version of the OpenAPI document: 2.7.0
7+
The version of the OpenAPI document: 2.8.0
88
99
Generated by: https://openapi-generator.tech
1010
"""
@@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7979
self.default_headers[header_name] = header_value
8080
self.cookie = cookie
8181
# Set default User-Agent.
82-
self.user_agent = 'OpenAPI-Generator/2.7.0/python'
82+
self.user_agent = 'OpenAPI-Generator/2.8.0/python'
8383
self.client_side_validation = configuration.client_side_validation
8484

8585
def __enter__(self):

cloudtower/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ def to_debug_report(self):
398398
return "Python SDK Debug Report:\n"\
399399
"OS: {env}\n"\
400400
"Python Version: {pyversion}\n"\
401-
"Version of the API: 2.7.0\n"\
402-
"SDK Package Version: 2.7.0".\
401+
"Version of the API: 2.8.0\n"\
402+
"SDK Package Version: 2.8.0".\
403403
format(env=sys.platform, pyversion=sys.version)
404404

405405
def get_host_settings(self):

cloudtower/models/management_vlan_updation_params_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ def vlan_id(self, vlan_id):
138138
:param vlan_id: The vlan_id of this ManagementVlanUpdationParamsData. # noqa: E501
139139
:type vlan_id: int
140140
"""
141+
if (self.local_vars_configuration.client_side_validation and
142+
vlan_id is not None and vlan_id > 4095): # noqa: E501
143+
raise ValueError("Invalid value for `vlan_id`, must be a value less than or equal to `4095`") # noqa: E501
144+
if (self.local_vars_configuration.client_side_validation and
145+
vlan_id is not None and vlan_id < 0): # noqa: E501
146+
raise ValueError("Invalid value for `vlan_id`, must be a value greater than or equal to `0`") # noqa: E501
141147

142148
self._vlan_id = vlan_id
143149

cloudtower/models/vm_vlan_creation_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ def vlan_id(self, vlan_id):
9595
"""
9696
if self.local_vars_configuration.client_side_validation and vlan_id is None: # noqa: E501
9797
raise ValueError("Invalid value for `vlan_id`, must not be `None`") # noqa: E501
98+
if (self.local_vars_configuration.client_side_validation and
99+
vlan_id is not None and vlan_id > 4095): # noqa: E501
100+
raise ValueError("Invalid value for `vlan_id`, must be a value less than or equal to `4095`") # noqa: E501
101+
if (self.local_vars_configuration.client_side_validation and
102+
vlan_id is not None and vlan_id < 0): # noqa: E501
103+
raise ValueError("Invalid value for `vlan_id`, must be a value greater than or equal to `0`") # noqa: E501
98104

99105
self._vlan_id = vlan_id
100106

cloudtower/models/vm_vlan_updation_params_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ def vlan_id(self, vlan_id):
6565
:param vlan_id: The vlan_id of this VmVlanUpdationParamsData. # noqa: E501
6666
:type vlan_id: int
6767
"""
68+
if (self.local_vars_configuration.client_side_validation and
69+
vlan_id is not None and vlan_id > 4095): # noqa: E501
70+
raise ValueError("Invalid value for `vlan_id`, must be a value less than or equal to `4095`") # noqa: E501
71+
if (self.local_vars_configuration.client_side_validation and
72+
vlan_id is not None and vlan_id < 0): # noqa: E501
73+
raise ValueError("Invalid value for `vlan_id`, must be a value greater than or equal to `0`") # noqa: E501
6874

6975
self._vlan_id = vlan_id
7076

setup.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# coding: utf-8
22

3-
"""
4-
CloudTower APIs
5-
6-
cloudtower operation API and SDK # noqa: E501
7-
8-
The version of the OpenAPI document: 2.7.0
9-
10-
Generated by: https://openapi-generator.tech
11-
"""
3+
"""
4+
CloudTower APIs
5+
6+
cloudtower operation API and SDK # noqa: E501
7+
8+
The version of the OpenAPI document: 2.8.0
9+
10+
Generated by: https://openapi-generator.tech
11+
"""
1212

1313

1414
import pathlib
1515
from setuptools import setup, find_packages # noqa: H301
1616

1717
NAME = "cloudtower-sdk"
18-
VERSION = "2.7.0"
18+
VERSION = "2.8.0"
1919
# To install the library, run the following
2020
#
2121
# python setup.py install

test/fixture/api/iscsi_api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pytest
2+
3+
import test.fixture.client
4+
from cloudtower.api.iscsi_connection_api import IscsiConnectionApi
5+
6+
7+
@pytest.fixture(scope="session")
8+
def iscsi_connection_api(client):
9+
return IscsiConnectionApi(client)

0 commit comments

Comments
 (0)