Skip to content

Commit 87b64de

Browse files
sdk-generatorSczlog
authored andcommitted
update schema to v2.5.0
1 parent 9bffb8a commit 87b64de

35 files changed

+2038
-62
lines changed

.openapi-generator/FILES

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ cloudtower/exceptions.py
100100
cloudtower/models/__init__.py
101101
cloudtower/models/abort_migrate_vm_across_cluster_params.py
102102
cloudtower/models/access_mode.py
103+
cloudtower/models/add_clusters_to_datacenter_params.py
104+
cloudtower/models/add_clusters_to_datacenter_params_data.py
103105
cloudtower/models/add_labels_to_resources_params.py
104106
cloudtower/models/add_labels_to_resources_params_data.py
105107
cloudtower/models/alert.py
@@ -260,6 +262,7 @@ cloudtower/models/datacenter_order_by_input.py
260262
cloudtower/models/datacenter_updation_params.py
261263
cloudtower/models/datacenter_updation_params_data.py
262264
cloudtower/models/datacenter_where_input.py
265+
cloudtower/models/datacenter_where_unique_input.py
263266
cloudtower/models/delete_brick_topo.py
264267
cloudtower/models/delete_cloud_tower_application_package.py
265268
cloudtower/models/delete_cloud_tower_application_package_params.py
@@ -455,6 +458,7 @@ cloudtower/models/get_log_collections_connection_request_body.py
455458
cloudtower/models/get_log_collections_request_body.py
456459
cloudtower/models/get_log_service_configs_request_body.py
457460
cloudtower/models/get_lun_metric_input.py
461+
cloudtower/models/get_meta_leader_request_body.py
458462
cloudtower/models/get_namespace_groups_connection_request_body.py
459463
cloudtower/models/get_namespace_groups_request_body.py
460464
cloudtower/models/get_nfs_exports_connection_request_body.py
@@ -614,6 +618,7 @@ cloudtower/models/iscsi_lun_order_by_input.py
614618
cloudtower/models/iscsi_lun_rollback_params.py
615619
cloudtower/models/iscsi_lun_snapshot.py
616620
cloudtower/models/iscsi_lun_snapshot_connection.py
621+
cloudtower/models/iscsi_lun_snapshot_creation_effect.py
617622
cloudtower/models/iscsi_lun_snapshot_creation_params.py
618623
cloudtower/models/iscsi_lun_snapshot_deletion_params.py
619624
cloudtower/models/iscsi_lun_snapshot_order_by_input.py
@@ -662,8 +667,10 @@ cloudtower/models/log_collection_where_input.py
662667
cloudtower/models/log_service_config.py
663668
cloudtower/models/log_service_configs_input.py
664669
cloudtower/models/login_input.py
670+
cloudtower/models/login_response.py
665671
cloudtower/models/management_vlan_updation_params.py
666672
cloudtower/models/management_vlan_updation_params_data.py
673+
cloudtower/models/meta_leader.py
667674
cloudtower/models/metric.py
668675
cloudtower/models/metric_label.py
669676
cloudtower/models/metric_sample.py
@@ -964,6 +971,7 @@ cloudtower/models/rack_topo_order_by_input.py
964971
cloudtower/models/rack_topo_updation_params.py
965972
cloudtower/models/rack_topo_updation_params_data.py
966973
cloudtower/models/rack_topo_where_input.py
974+
cloudtower/models/remove_clusters_from_datacenter_params.py
967975
cloudtower/models/report_resource_input_enum.py
968976
cloudtower/models/report_task.py
969977
cloudtower/models/report_task_connection.py
@@ -1092,6 +1100,7 @@ cloudtower/models/usb_device_mount_params_data.py
10921100
cloudtower/models/usb_device_order_by_input.py
10931101
cloudtower/models/usb_device_status.py
10941102
cloudtower/models/usb_device_unmount_params.py
1103+
cloudtower/models/usb_device_unmount_params_data.py
10951104
cloudtower/models/usb_device_where_input.py
10961105
cloudtower/models/user.py
10971106
cloudtower/models/user_audit_log.py
@@ -1353,6 +1362,7 @@ cloudtower/models/with_task_iscsi_target.py
13531362
cloudtower/models/with_task_label.py
13541363
cloudtower/models/with_task_license.py
13551364
cloudtower/models/with_task_log_collection.py
1365+
cloudtower/models/with_task_login_response.py
13561366
cloudtower/models/with_task_metric.py
13571367
cloudtower/models/with_task_namespace_group.py
13581368
cloudtower/models/with_task_nfs_export.py
@@ -1369,8 +1379,6 @@ cloudtower/models/with_task_snapshot_group.py
13691379
cloudtower/models/with_task_snapshot_plan.py
13701380
cloudtower/models/with_task_snmp_transport.py
13711381
cloudtower/models/with_task_snmp_trap_receiver.py
1372-
cloudtower/models/with_task_token_string.py
1373-
cloudtower/models/with_task_token_string_data.py
13741382
cloudtower/models/with_task_usb_device.py
13751383
cloudtower/models/with_task_user.py
13761384
cloudtower/models/with_task_user_role_next.py

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

1717
- ### tar.gz
1818

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

RELEASENOTE.md

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

3+
## release 日期 2023-01-03
4+
5+
v2.5.0 release
6+
7+
- bugfix: [IscsiTargetCommonParams]: 修复错误的 `BpsWrMaxSize``BpsWrMaxUnit`
8+
- feature: IscsiLunSnapshotApi: [create_iscsi_lun_snapshot] 增加了同步创建 lun 快照的选项。
9+
- feature: ClusterApi: [get_meta_leader]: 增加了获取集群 meta leader 的 api
10+
- optimize: 增加 header 定义,可以从返回值中获取对应的 XTowerRequestID
11+
- optimize: [NestedHost]: 嵌套的主机类型额外返回 management_ip
12+
313
## release 日期 2022-11-18
414

515
v2.4.0 release

cloudtower/__init__.py

Lines changed: 11 additions & 3 deletions
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.4.0"
6+
__version__ = "2.5.0"
77

88
# import apis into sdk package
99
from cloudtower.api.alert_api import AlertApi
@@ -109,6 +109,8 @@
109109
# import models into sdk package
110110
from cloudtower.models.abort_migrate_vm_across_cluster_params import AbortMigrateVmAcrossClusterParams
111111
from cloudtower.models.access_mode import AccessMode
112+
from cloudtower.models.add_clusters_to_datacenter_params import AddClustersToDatacenterParams
113+
from cloudtower.models.add_clusters_to_datacenter_params_data import AddClustersToDatacenterParamsData
112114
from cloudtower.models.add_labels_to_resources_params import AddLabelsToResourcesParams
113115
from cloudtower.models.add_labels_to_resources_params_data import AddLabelsToResourcesParamsData
114116
from cloudtower.models.alert import Alert
@@ -269,6 +271,7 @@
269271
from cloudtower.models.datacenter_updation_params import DatacenterUpdationParams
270272
from cloudtower.models.datacenter_updation_params_data import DatacenterUpdationParamsData
271273
from cloudtower.models.datacenter_where_input import DatacenterWhereInput
274+
from cloudtower.models.datacenter_where_unique_input import DatacenterWhereUniqueInput
272275
from cloudtower.models.delete_brick_topo import DeleteBrickTopo
273276
from cloudtower.models.delete_cloud_tower_application_package import DeleteCloudTowerApplicationPackage
274277
from cloudtower.models.delete_cloud_tower_application_package_params import DeleteCloudTowerApplicationPackageParams
@@ -464,6 +467,7 @@
464467
from cloudtower.models.get_log_collections_request_body import GetLogCollectionsRequestBody
465468
from cloudtower.models.get_log_service_configs_request_body import GetLogServiceConfigsRequestBody
466469
from cloudtower.models.get_lun_metric_input import GetLunMetricInput
470+
from cloudtower.models.get_meta_leader_request_body import GetMetaLeaderRequestBody
467471
from cloudtower.models.get_namespace_groups_connection_request_body import GetNamespaceGroupsConnectionRequestBody
468472
from cloudtower.models.get_namespace_groups_request_body import GetNamespaceGroupsRequestBody
469473
from cloudtower.models.get_nfs_exports_connection_request_body import GetNfsExportsConnectionRequestBody
@@ -623,6 +627,7 @@
623627
from cloudtower.models.iscsi_lun_rollback_params import IscsiLunRollbackParams
624628
from cloudtower.models.iscsi_lun_snapshot import IscsiLunSnapshot
625629
from cloudtower.models.iscsi_lun_snapshot_connection import IscsiLunSnapshotConnection
630+
from cloudtower.models.iscsi_lun_snapshot_creation_effect import IscsiLunSnapshotCreationEffect
626631
from cloudtower.models.iscsi_lun_snapshot_creation_params import IscsiLunSnapshotCreationParams
627632
from cloudtower.models.iscsi_lun_snapshot_deletion_params import IscsiLunSnapshotDeletionParams
628633
from cloudtower.models.iscsi_lun_snapshot_order_by_input import IscsiLunSnapshotOrderByInput
@@ -671,8 +676,10 @@
671676
from cloudtower.models.log_service_config import LogServiceConfig
672677
from cloudtower.models.log_service_configs_input import LogServiceConfigsInput
673678
from cloudtower.models.login_input import LoginInput
679+
from cloudtower.models.login_response import LoginResponse
674680
from cloudtower.models.management_vlan_updation_params import ManagementVlanUpdationParams
675681
from cloudtower.models.management_vlan_updation_params_data import ManagementVlanUpdationParamsData
682+
from cloudtower.models.meta_leader import MetaLeader
676683
from cloudtower.models.metric import Metric
677684
from cloudtower.models.metric_label import MetricLabel
678685
from cloudtower.models.metric_sample import MetricSample
@@ -974,6 +981,7 @@
974981
from cloudtower.models.rack_topo_updation_params import RackTopoUpdationParams
975982
from cloudtower.models.rack_topo_updation_params_data import RackTopoUpdationParamsData
976983
from cloudtower.models.rack_topo_where_input import RackTopoWhereInput
984+
from cloudtower.models.remove_clusters_from_datacenter_params import RemoveClustersFromDatacenterParams
977985
from cloudtower.models.report_resource_input_enum import ReportResourceInputEnum
978986
from cloudtower.models.report_task import ReportTask
979987
from cloudtower.models.report_task_connection import ReportTaskConnection
@@ -1101,6 +1109,7 @@
11011109
from cloudtower.models.usb_device_order_by_input import UsbDeviceOrderByInput
11021110
from cloudtower.models.usb_device_status import UsbDeviceStatus
11031111
from cloudtower.models.usb_device_unmount_params import UsbDeviceUnmountParams
1112+
from cloudtower.models.usb_device_unmount_params_data import UsbDeviceUnmountParamsData
11041113
from cloudtower.models.usb_device_where_input import UsbDeviceWhereInput
11051114
from cloudtower.models.user import User
11061115
from cloudtower.models.user_audit_log import UserAuditLog
@@ -1362,6 +1371,7 @@
13621371
from cloudtower.models.with_task_label import WithTaskLabel
13631372
from cloudtower.models.with_task_license import WithTaskLicense
13641373
from cloudtower.models.with_task_log_collection import WithTaskLogCollection
1374+
from cloudtower.models.with_task_login_response import WithTaskLoginResponse
13651375
from cloudtower.models.with_task_metric import WithTaskMetric
13661376
from cloudtower.models.with_task_namespace_group import WithTaskNamespaceGroup
13671377
from cloudtower.models.with_task_nfs_export import WithTaskNfsExport
@@ -1378,8 +1388,6 @@
13781388
from cloudtower.models.with_task_snapshot_plan import WithTaskSnapshotPlan
13791389
from cloudtower.models.with_task_snmp_transport import WithTaskSnmpTransport
13801390
from cloudtower.models.with_task_snmp_trap_receiver import WithTaskSnmpTrapReceiver
1381-
from cloudtower.models.with_task_token_string import WithTaskTokenString
1382-
from cloudtower.models.with_task_token_string_data import WithTaskTokenStringData
13831391
from cloudtower.models.with_task_usb_device import WithTaskUsbDevice
13841392
from cloudtower.models.with_task_user import WithTaskUser
13851393
from cloudtower.models.with_task_user_role_next import WithTaskUserRoleNext

cloudtower/api/cluster_api.py

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,151 @@ def get_clusters_connection_with_http_info(self, get_clusters_connection_request
633633
collection_formats=collection_formats,
634634
_request_auth=local_var_params.get('_request_auth'))
635635

636+
def get_meta_leader(self, get_meta_leader_request_body, **kwargs): # noqa: E501
637+
"""get_meta_leader # noqa: E501
638+
639+
This method makes a synchronous HTTP request by default. To make an
640+
asynchronous HTTP request, please pass async_req=True
641+
642+
>>> thread = api.get_meta_leader(get_meta_leader_request_body, async_req=True)
643+
>>> result = thread.get()
644+
645+
:param get_meta_leader_request_body: (required)
646+
:type get_meta_leader_request_body: GetMetaLeaderRequestBody
647+
:param async_req: Whether to execute the request asynchronously.
648+
:type async_req: bool, optional
649+
:param _preload_content: if False, the urllib3.HTTPResponse object will
650+
be returned without reading/decoding response
651+
data. Default is True.
652+
:type _preload_content: bool, optional
653+
:param _request_timeout: timeout setting for this request. If one
654+
number provided, it will be total request
655+
timeout. It can also be a pair (tuple) of
656+
(connection, read) timeouts.
657+
:return: Returns the result object.
658+
If the method is called asynchronously,
659+
returns the request thread.
660+
:rtype: list[MetaLeader]
661+
"""
662+
kwargs['_return_http_data_only'] = True
663+
return self.get_meta_leader_with_http_info(get_meta_leader_request_body, **kwargs) # noqa: E501
664+
665+
def get_meta_leader_with_http_info(self, get_meta_leader_request_body, **kwargs): # noqa: E501
666+
"""get_meta_leader # noqa: E501
667+
668+
This method makes a synchronous HTTP request by default. To make an
669+
asynchronous HTTP request, please pass async_req=True
670+
671+
>>> thread = api.get_meta_leader_with_http_info(get_meta_leader_request_body, async_req=True)
672+
>>> result = thread.get()
673+
674+
:param get_meta_leader_request_body: (required)
675+
:type get_meta_leader_request_body: GetMetaLeaderRequestBody
676+
:param async_req: Whether to execute the request asynchronously.
677+
:type async_req: bool, optional
678+
:param _return_http_data_only: response data without head status code
679+
and headers
680+
:type _return_http_data_only: bool, optional
681+
:param _preload_content: if False, the urllib3.HTTPResponse object will
682+
be returned without reading/decoding response
683+
data. Default is True.
684+
:type _preload_content: bool, optional
685+
:param _request_timeout: timeout setting for this request. If one
686+
number provided, it will be total request
687+
timeout. It can also be a pair (tuple) of
688+
(connection, read) timeouts.
689+
:param _request_auth: set to override the auth_settings for an a single
690+
request; this effectively ignores the authentication
691+
in the spec for a single request.
692+
:type _request_auth: dict, optional
693+
:type _content_type: string, optional: force content-type for the request
694+
:return: Returns the result object.
695+
If the method is called asynchronously,
696+
returns the request thread.
697+
:rtype: tuple(list[MetaLeader], status_code(int), headers(HTTPHeaderDict))
698+
"""
699+
700+
local_var_params = locals()
701+
702+
all_params = [
703+
'get_meta_leader_request_body'
704+
]
705+
all_params.extend(
706+
[
707+
'async_req',
708+
'_return_http_data_only',
709+
'_preload_content',
710+
'_request_timeout',
711+
'_request_auth',
712+
'_content_type',
713+
'_headers'
714+
]
715+
)
716+
717+
for key, val in six.iteritems(local_var_params['kwargs']):
718+
if key not in all_params:
719+
raise ApiTypeError(
720+
"Got an unexpected keyword argument '%s'"
721+
" to method get_meta_leader" % key
722+
)
723+
local_var_params[key] = val
724+
del local_var_params['kwargs']
725+
# verify the required parameter 'get_meta_leader_request_body' is set
726+
if self.api_client.client_side_validation and ('get_meta_leader_request_body' not in local_var_params or # noqa: E501
727+
local_var_params['get_meta_leader_request_body'] is None): # noqa: E501
728+
raise ApiValueError("Missing the required parameter `get_meta_leader_request_body` when calling `get_meta_leader`") # noqa: E501
729+
730+
collection_formats = {}
731+
732+
path_params = {}
733+
734+
query_params = []
735+
736+
header_params = dict(local_var_params.get('_headers', {}))
737+
738+
form_params = []
739+
local_var_files = {}
740+
741+
body_params = None
742+
if 'get_meta_leader_request_body' in local_var_params:
743+
body_params = local_var_params['get_meta_leader_request_body']
744+
# HTTP header `Accept`
745+
header_params['Accept'] = self.api_client.select_header_accept(
746+
['application/json']) # noqa: E501
747+
748+
# HTTP header `Content-Type`
749+
header_params['Content-Type'] = local_var_params.get('_content_type',
750+
self.api_client.select_header_content_type(
751+
['application/json'],
752+
'POST', body_params)) # noqa: E501
753+
754+
# Authentication setting
755+
auth_settings = ['Authorization'] # noqa: E501
756+
757+
response_types_map = {
758+
200: "list[MetaLeader]",
759+
400: "ErrorBody",
760+
404: "ErrorBody",
761+
500: "ErrorBody",
762+
}
763+
764+
return self.api_client.call_api(
765+
'/get-meta-leader', 'POST',
766+
path_params,
767+
query_params,
768+
header_params,
769+
body=body_params,
770+
post_params=form_params,
771+
files=local_var_files,
772+
response_types_map=response_types_map,
773+
auth_settings=auth_settings,
774+
async_req=local_var_params.get('async_req'),
775+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
776+
_preload_content=local_var_params.get('_preload_content', True),
777+
_request_timeout=local_var_params.get('_request_timeout'),
778+
collection_formats=collection_formats,
779+
_request_auth=local_var_params.get('_request_auth'))
780+
636781
def update_cluster(self, cluster_updation_params, **kwargs): # noqa: E501
637782
"""update_cluster # noqa: E501
638783

0 commit comments

Comments
 (0)