diff --git a/tb_rest_client/api/api_ce/edge_controller_api.py b/tb_rest_client/api/api_ce/edge_controller_api.py index 19fe5576..72939c7a 100644 --- a/tb_rest_client/api/api_ce/edge_controller_api.py +++ b/tb_rest_client/api/api_ce/edge_controller_api.py @@ -2356,3 +2356,99 @@ def unassign_edge_from_customer_using_delete_with_http_info(self, edge_id, **kwa _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def get_edge_docker_install_instructions_using_get(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # 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_edge_docker_install_instructions_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_edge_docker_install_instructions_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # 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_edge_docker_install_instructions_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_edge_docker_install_instructions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError( + "Missing the required parameter `edge_id` when calling `get_edge_docker_install_instructions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/instructions/{edgeId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EdgeInstallInstructions', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/rest_client_base.py b/tb_rest_client/rest_client_base.py index 9d0b0e00..8d76fd67 100644 --- a/tb_rest_client/rest_client_base.py +++ b/tb_rest_client/rest_client_base.py @@ -604,6 +604,10 @@ def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int, text_searc sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time) + def get_edge_docker_install_instruction(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_docker_install_instructions_using_get(edge_id=edge_id) + # RPC v2 Controller def get_persisted_rpc(self, rpc_id: RpcId) -> Rpc: rpc_id = self.get_id(rpc_id)