body, **kwargs) return data def patch_volume_attachment_with_http_info(self, name, body, **kwargs): """ partially update the specified VolumeAttachment This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_volume_attachment_with_http_info(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the VolumeAttachment (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :return: V1beta1VolumeAttachment If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method patch_volume_attachment' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `patch_volume_attachment`' ) # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError( 'Missing the required parameter `body` when calling `patch_volume_attachment`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'dry_run' in params: query_params.append(('dryRun', params['dry_run'])) if 'field_manager' in params: query_params.append(('fieldManager', params['field_manager'])) if 'force' in params: query_params.append(('force', params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1VolumeAttachment', 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) def read_csi_driver(self, name, **kwargs): """ read the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_csi_driver(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSIDriver (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1CSIDriver If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_csi_driver_with_http_info(name, **kwargs) else: (data) = self.read_csi_driver_with_http_info(name, **kwargs) return data def read_csi_driver_with_http_info(self, name, **kwargs): """ read the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_csi_driver_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSIDriver (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1CSIDriver If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'exact', 'export'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method read_csi_driver' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `read_csi_driver`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'exact' in params: query_params.append(('exact', params['exact'])) if 'export' in params: query_params.append(('export', params['export'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/csidrivers/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1CSIDriver', 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) def read_csi_node(self, name, **kwargs): """ read the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_csi_node(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSINode (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1CSINode If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_csi_node_with_http_info(name, **kwargs) else: (data) = self.read_csi_node_with_http_info(name, **kwargs) return data def read_csi_node_with_http_info(self, name, **kwargs): """ read the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_csi_node_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSINode (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1CSINode If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'exact', 'export'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method read_csi_node' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `read_csi_node`') collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'exact' in params: query_params.append(('exact', params['exact'])) if 'export' in params: query_params.append(('export', params['export'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/csinodes/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1CSINode', 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) def read_storage_class(self, name, **kwargs): """ read the specified StorageClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_storage_class(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the StorageClass (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1StorageClass If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_storage_class_with_http_info(name, **kwargs) else: (data) = self.read_storage_class_with_http_info(name, **kwargs) return data def read_storage_class_with_http_info(self, name, **kwargs): """ read the specified StorageClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_storage_class_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the StorageClass (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1StorageClass If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'exact', 'export'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method read_storage_class' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `read_storage_class`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'exact' in params: query_params.append(('exact', params['exact'])) if 'export' in params: query_params.append(('export', params['export'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/storageclasses/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1StorageClass', 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) def read_volume_attachment(self, name, **kwargs): """ read the specified VolumeAttachment This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_volume_attachment(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the VolumeAttachment (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1VolumeAttachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.read_volume_attachment_with_http_info(name, **kwargs) else: (data) = self.read_volume_attachment_with_http_info(name, **kwargs) return data def read_volume_attachment_with_http_info(self, name, **kwargs): """ read the specified VolumeAttachment This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_volume_attachment_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the VolumeAttachment (required) :param str pretty: If 'true', then the output is pretty printed. :param bool exact: Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. :param bool export: Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. :return: V1beta1VolumeAttachment If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'pretty', 'exact', 'export'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method read_volume_attachment' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `read_volume_attachment`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'exact' in params: query_params.append(('exact', params['exact'])) if 'export' in params: query_params.append(('export', params['export'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1VolumeAttachment', 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) def replace_csi_driver(self, name, body, **kwargs): """ replace the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_csi_driver(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSIDriver (required) :param V1beta1CSIDriver body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1CSIDriver If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.replace_csi_driver_with_http_info(name, body, **kwargs) else: (data) = self.replace_csi_driver_with_http_info(name, body, **kwargs) return data def replace_csi_driver_with_http_info(self, name, body, **kwargs): """ replace the specified CSIDriver This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_csi_driver_with_http_info(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSIDriver (required) :param V1beta1CSIDriver body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1CSIDriver If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method replace_csi_driver' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `replace_csi_driver`' ) # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError( 'Missing the required parameter `body` when calling `replace_csi_driver`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'dry_run' in params: query_params.append(('dryRun', params['dry_run'])) if 'field_manager' in params: query_params.append(('fieldManager', params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/csidrivers/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1CSIDriver', 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) def replace_csi_node(self, name, body, **kwargs): """ replace the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_csi_node(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSINode (required) :param V1beta1CSINode body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1CSINode If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.replace_csi_node_with_http_info(name, body, **kwargs) else: (data) = self.replace_csi_node_with_http_info(name, body, **kwargs) return data def replace_csi_node_with_http_info(self, name, body, **kwargs): """ replace the specified CSINode This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_csi_node_with_http_info(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the CSINode (required) :param V1beta1CSINode body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1CSINode If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method replace_csi_node' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `replace_csi_node`' ) # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError( 'Missing the required parameter `body` when calling `replace_csi_node`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'dry_run' in params: query_params.append(('dryRun', params['dry_run'])) if 'field_manager' in params: query_params.append(('fieldManager', params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/csinodes/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1CSINode', 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) def replace_storage_class(self, name, body, **kwargs): """ replace the specified StorageClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_storage_class(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the StorageClass (required) :param V1beta1StorageClass body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1StorageClass If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.replace_storage_class_with_http_info(name, body, **kwargs) else: (data) = self.replace_storage_class_with_http_info(name, body, **kwargs) return data def replace_storage_class_with_http_info(self, name, body, **kwargs): """ replace the specified StorageClass This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_storage_class_with_http_info(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the StorageClass (required) :param V1beta1StorageClass body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1StorageClass If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method replace_storage_class' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `replace_storage_class`' ) # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError( 'Missing the required parameter `body` when calling `replace_storage_class`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'dry_run' in params: query_params.append(('dryRun', params['dry_run'])) if 'field_manager' in params: query_params.append(('fieldManager', params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/storageclasses/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1StorageClass', 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) def replace_volume_attachment(self, name, body, **kwargs): """ replace the specified VolumeAttachment This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_volume_attachment(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the VolumeAttachment (required) :param V1beta1VolumeAttachment body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1VolumeAttachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.replace_volume_attachment_with_http_info(name, body, **kwargs) else: (data) = self.replace_volume_attachment_with_http_info( name, body, **kwargs) return data def replace_volume_attachment_with_http_info(self, name, body, **kwargs): """ replace the specified VolumeAttachment This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_volume_attachment_with_http_info(name, body, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the VolumeAttachment (required) :param V1beta1VolumeAttachment body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :return: V1beta1VolumeAttachment If the method is called asynchronously, returns the request thread. """ all_params = ['name', 'body', 'pretty', 'dry_run', 'field_manager'] 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 iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" ' to method replace_volume_attachment' % key) params[key] = val del params['kwargs'] # verify the required parameter 'name' is set if ('name' not in params) or (params['name'] is None): raise ValueError( 'Missing the required parameter `name` when calling `replace_volume_attachment`' ) # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError( 'Missing the required parameter `body` when calling `replace_volume_attachment`' ) collection_formats = {} path_params = {} if 'name' in params: path_params['name'] = params['name'] query_params = [] if 'pretty' in params: query_params.append(('pretty', params['pretty'])) if 'dry_run' in params: query_params.append(('dryRun', params['dry_run'])) if 'field_manager' in params: query_params.append(('fieldManager', params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['BearerToken'] return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/volumeattachments/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1beta1VolumeAttachment', 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)