#!/usr/bin/env python
# coding: utf-8

"""
IApi.py

  The Clear BSD License

  Copyright (c) – 2016, NetApp, Inc. All rights reserved.

  Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

  NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
from __future__ import absolute_import

import sys
import os

# python 2 and python 3 compatibility library
from six import iteritems

from ....santricity.configuration import Configuration
from ....santricity.api_client import ApiClient


class IApi(object):

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient(context_path='/devmgr/v2')
            self.api_client = config.api_client
    
    
    def symbol_import_lock_key(self, system_id, body, **kwargs):
            """
            This procedure allows a security locked drive to be unlocked. An archived, wrapped and encrypted lock key is imported into the array. In response, the controller attempts to unlock all security-locked drives that have a matching lock key ID. The imported lock key and lock key id become the new array lock key and lock key ID.
            Documented return codes: ok, notImplemented, noLockedDrives, invalidBlob, unlockFailed, noKeySet. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_import_lock_key(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param LockKeyBlob body: A LockKeyBlob structure that contains the wrapped lock key and the pass phrase used to encrypt the lock key. (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_import_lock_key" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_import_lock_key`")
    
    
    
            # 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 `symbol_import_lock_key`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/importLockKey'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_import_volume_group(self, system_id, body, **kwargs):
            """
            This procedure causes the identified volume group to be imported, which move it from either the \"exported\" state or the \"forced\" state to the \"complete\" state in which it is fully operable and available for use. Note that \"higher-level\" volumes (SnapshotVolume, MetadataVolume, VolumeCopy, and MirrorProxyVolume) - but not their underlying RAID volumes - are removed as part of the import.
            Documented return codes: ok, volumeGroupHasHotspare, volumeGroupReconfiguring, volumeGroupReconstructing, volumeGroupNotComplete, volumeGroupHasFailedDrives, volumeGroupHasNonOptimalVols, volumeGroupHasMirrorRelationship, volumeGroupHasVolcopyRelationship, volumeGroupHasMirroringMetadata, volumeGroupHasMappedVols, volumeGroupHasReservations, volumeGroupHasIncompatibleDacstores, volumeLimitExceeded, volumeGroupHasUnknownRaidLevel, volumeGroupHasUnsupportedRaidLevel, volumeGroupHasCloneOpportunity, volumeGroupHasInsufficientDrives, volumeGroupHasFailedVols, driveSpinUpError, volumeGroupHasIncompatibleDrive, volumeGroupVolumeEncroachesOnDacstore, volumeGroupImportInProgress, drivesNeedToBeSpunUp, noNativeSstor. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_import_volume_group(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param str body: A SYMbol VolumeGroupRef identifying the volume group to export. (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_import_volume_group" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_import_volume_group`")
    
    
    
            # 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 `symbol_import_volume_group`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/importVolumeGroup'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_initialize_drive(self, system_id, body, **kwargs):
            """
            This procedure causes the specified drive object to be initialized for use in the system. All data on the drive is irretrievably lost as a result of this operation. Only offline drives or drives whose status is DRIVE_STAT_INCOMPATIBLE are candidates for initialization. This procedure implicitly transitions the drive to the online state.
            Documented return codes: ok, error, illegalParam, noHeap, tryAlternate, invalidDriveref. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_initialize_drive(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param str body: The value of the drive reference for the drive that is to be initialized. (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_initialize_drive" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_initialize_drive`")
    
    
    
            # 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 `symbol_initialize_drive`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/initializeDrive'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_install_lock_key(self, system_id, body, **kwargs):
            """
            Passes an existing lock key for the array and unlocks the disks.
            Documented return codes: ok, invalidBlob. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_install_lock_key(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param WrappedLockKeyList body:  (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_install_lock_key" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_install_lock_key`")
    
    
    
            # 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 `symbol_install_lock_key`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/installLockKey'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_install_new_lock_key(self, system_id, body, **kwargs):
            """
            Passes a new lock key for the array and commits the key to the disks.
            Documented return codes: ok, invalidBlob, externalKmsNotEnabled, keyNotNeeded, keyInvalidSequence, externalKmsNotCompliant, invalidLockKeyId. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_install_new_lock_key(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param NewLockKey body:  (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_install_new_lock_key" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_install_new_lock_key`")
    
    
    
            # 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 `symbol_install_new_lock_key`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/installNewLockKey'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_invalidate_staged_controller_firmware(self, system_id, **kwargs):
            """
            This procedure invalidates the staged controller firmware.
            Documented return codes: ok, error, illegalParam, downloadInProgress. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_invalidate_staged_controller_firmware(system_id, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_invalidate_staged_controller_firmware" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_invalidate_staged_controller_firmware`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/invalidateStagedControllerFirmware'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            header_params = {}
    

            form_params = []
            local_var_files = {}
    

            body_params = None
    

            # HTTP header `Accept`
            header_params['Accept'] = self.api_client.\
                select_header_accept(['application/json'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_issue_discrete_lines_test(self, system_id, **kwargs):
            """
            This procedure executes the inter-controller discrete line diagnostics test.
            Documented return codes: ok, error, dltNotCompleted. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_issue_discrete_lines_test(system_id, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: str
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_issue_discrete_lines_test" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_issue_discrete_lines_test`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/issueDiscreteLinesTest'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            header_params = {}
    

            form_params = []
            local_var_files = {}
    

            body_params = None
    

            # HTTP header `Accept`
            header_params['Accept'] = self.api_client.\
                select_header_accept(['application/json'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='str',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    
    def symbol_issue_runtime_diagnostics(self, system_id, body, **kwargs):
            """
            This procedure is used to start the Runtime Diagnostics.
            Documented return codes: ok, illegalParam, tryAlternate, diagReadFailure, diagWriteFailure, diagLoopbackError, diagTimeout, diagInProgress, diagNoAlt, diagIconSendErr, diagInitErr, diagModeErr, diagInvalidTestId, diagDriveErr, diagLockErr, diagConfigErr, diagNoCacheMem, diagNotQuiesced, diagUtmNotEnabled. 

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please define a `callback` function
            to be invoked when receiving the response.
            >>> def callback_function(response):
            >>>     pprint(response)
            >>>
    
            >>> thread = api.symbol_issue_runtime_diagnostics(system_id, body, callback=callback_function)
    
    

            :param callback function: The callback function
                for asynchronous request. (optional)
    
            :param str system_id:  (required)
    
            :param RuntimeDiagDescriptor body: A descriptor that specifies the Runtime Diagnostics tests to run. (required)
    
            :param str controller: Controller selection
    
            :param bool verbose_error_response: 
    
            :return: RuntimeDiagResults
                     If the method is called asynchronously,
                     returns the request thread.
            :raises: ValueError
                       If the required params are not provided or if the response data format is unknown.
                     TypeError:
                        When the data type of response data is different from what we are expecting
                     ApiException:
                        Occurs when we get a HTTP error code (422 and above).

            """

            all_params = ['system_id', 'body', 'controller', 'verbose_error_response']
            all_params.append('callback')

            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 symbol_issue_runtime_diagnostics" % key
                    )
                params[key] = val
            del params['kwargs']

    
    
            # verify the required parameter 'system_id' is set
            if ('system_id' not in params) or (params['system_id'] is None):
                raise ValueError("Missing the required parameter `system_id` when calling `symbol_issue_runtime_diagnostics`")
    
    
    
            # 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 `symbol_issue_runtime_diagnostics`")
    
    
    
    
    
    

            resource_path = '/storage-systems/{system-id}/symbol/issueRuntimeDiagnostics'.replace('{format}', 'json')
            path_params = {}
    
            if 'system_id' in params:
                path_params['system-id'] = params['system_id']
    

            query_params = {}
    
            if 'controller' in params:
                query_params['controller'] = params['controller']
    
            if 'verbose_error_response' in params:
                query_params['verboseErrorResponse'] = params['verbose_error_response']
    

            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'])
            if not header_params['Accept']:
                del header_params['Accept']

            # HTTP header `Content-Type`
            header_params['Content-Type'] = self.api_client.\
                select_header_content_type(['application/json'])

            # Authentication setting
            auth_settings = ['basicAuth']

            response = self.api_client.call_api(resource_path, 'POST',
                                                path_params,
                                                query_params,
                                                header_params,
                                                body=body_params,
                                                post_params=form_params,
                                                files=local_var_files,
                                                response_type='RuntimeDiagResults',
                                                auth_settings=auth_settings,
                                                callback=params.get('callback'))
            return response
    









