Skip to content

Commit fda1c64

Browse files
committed
Updated 'getTenantDevices' to TB 3.1 REST API
1 parent 2ec2a5e commit fda1c64

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

tb_rest_client/api/api_ce/device_controller_api.py

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,51 +1085,53 @@ def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): #
10851085
_request_timeout=params.get('_request_timeout'),
10861086
collection_formats=collection_formats)
10871087

1088-
def get_tenant_devices_using_get(self, limit, **kwargs): # noqa: E501
1088+
def get_tenant_devices_using_get(self, **kwargs): # noqa: E501
10891089
"""getTenantDevices # noqa: E501
10901090
10911091
This method makes a synchronous HTTP request by default. To make an
10921092
asynchronous HTTP request, please pass async_req=True
1093-
>>> thread = api_pe.get_tenant_devices_using_get(limit, async_req=True)
1093+
>>> thread = api_pe.get_tenant_devices_using_get(async_req=True)
10941094
>>> result = thread.get()
10951095
10961096
:param async_req bool
1097-
:param str limit: limit (required)
10981097
:param str type: type
10991098
:param str text_search: textSearch
1100-
:param str id_offset: idOffset
1101-
:param str text_offset: textOffset
1099+
:param str sort_property: sortProperty
1100+
:param str sort_order: sortOrder
1101+
:param str page_size: pageSize (required)
1102+
:param str page: page (required)
11021103
:return: TextPageDataDevice
11031104
If the method is called asynchronously,
11041105
returns the request thread.
11051106
"""
11061107
kwargs['_return_http_data_only'] = True
11071108
if kwargs.get('async_req'):
1108-
return self.get_tenant_devices_using_get_with_http_info(limit, **kwargs) # noqa: E501
1109+
return self.get_tenant_devices_using_get_with_http_info(**kwargs) # noqa: E501
11091110
else:
1110-
(data) = self.get_tenant_devices_using_get_with_http_info(limit, **kwargs) # noqa: E501
1111+
(data) = self.get_tenant_devices_using_get_with_http_info(**kwargs) # noqa: E501
11111112
return data
11121113

1113-
def get_tenant_devices_using_get_with_http_info(self, limit, **kwargs): # noqa: E501
1114+
def get_tenant_devices_using_get_with_http_info(self, **kwargs): # noqa: E501
11141115
"""getTenantDevices # noqa: E501
11151116
11161117
This method makes a synchronous HTTP request by default. To make an
11171118
asynchronous HTTP request, please pass async_req=True
1118-
>>> thread = api_pe.get_tenant_devices_using_get_with_http_info(limit, async_req=True)
1119+
>>> thread = api_pe.get_tenant_devices_using_get_with_http_info(async_req=True)
11191120
>>> result = thread.get()
11201121
11211122
:param async_req bool
1122-
:param str limit: limit (required)
11231123
:param str type: type
11241124
:param str text_search: textSearch
1125-
:param str id_offset: idOffset
1126-
:param str text_offset: textOffset
1125+
:param str sort_property: sortProperty
1126+
:param str sort_order: sortOrder
1127+
:param str page_size: pageSize (required)
1128+
:param str page: page (required)
11271129
:return: TextPageDataDevice
11281130
If the method is called asynchronously,
11291131
returns the request thread.
11301132
"""
11311133

1132-
all_params = ['limit', 'type', 'text_search', 'id_offset', 'text_offset'] # noqa: E501
1134+
all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501
11331135
all_params.append('async_req')
11341136
all_params.append('_return_http_data_only')
11351137
all_params.append('_preload_content')
@@ -1141,9 +1143,12 @@ def get_tenant_devices_using_get_with_http_info(self, limit, **kwargs): # noqa:
11411143
params[key] = val
11421144
del params['kwargs']
11431145
# verify the required parameter 'limit' is set
1144-
if ('limit' not in params or
1145-
params['limit'] is None):
1146-
raise ValueError("Missing the required parameter `limit` when calling `get_tenant_devices_using_get`") # noqa: E501
1146+
if ('page_size' not in params or
1147+
params['page_size'] is None):
1148+
raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_devices_using_get`") # noqa: E501
1149+
elif ('page' not in params or
1150+
params['page'] is None):
1151+
raise ValueError("Missing the required parameter `page` when calling `get_tenant_devices_using_get`") # noqa: E501
11471152

11481153
collection_formats = {}
11491154

@@ -1154,12 +1159,14 @@ def get_tenant_devices_using_get_with_http_info(self, limit, **kwargs): # noqa:
11541159
query_params.append(('type', params['type'])) # noqa: E501
11551160
if 'text_search' in params:
11561161
query_params.append(('textSearch', params['text_search'])) # noqa: E501
1157-
if 'id_offset' in params:
1158-
query_params.append(('idOffset', params['id_offset'])) # noqa: E501
1159-
if 'text_offset' in params:
1160-
query_params.append(('textOffset', params['text_offset'])) # noqa: E501
1161-
if 'limit' in params:
1162-
query_params.append(('limit', params['limit'])) # noqa: E501
1162+
if 'sort_property' in params:
1163+
query_params.append(('sortProperty', params['sort_property'])) # noqa: E501
1164+
if 'sort_order' in params:
1165+
query_params.append(('sortOrder', params['sort_order'])) # noqa: E501
1166+
if 'page_size' in params:
1167+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
1168+
if 'page' in params:
1169+
query_params.append(('page', params['page'])) # noqa: E501
11631170

11641171
header_params = {}
11651172

@@ -1179,7 +1186,7 @@ def get_tenant_devices_using_get_with_http_info(self, limit, **kwargs): # noqa:
11791186
auth_settings = ['X-Authorization'] # noqa: E501
11801187

11811188
return self.api_client.call_api(
1182-
'/api/tenant/devices{?type,textSearch,idOffset,textOffset,limit}', 'GET',
1189+
'/api/tenant/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET',
11831190
path_params,
11841191
query_params,
11851192
header_params,

0 commit comments

Comments
 (0)