'Performs an API request on the array, with retry.
Propagates a DotHillConnectionError if no valid response is
received from the array, e.g. if the network is down.
Propagates a DotHillRequestError if the device returned a response
but the status is not 0. The device error message will be used
in the exception message.
If the status is OK, returns the XML data for further processing.'

def _request(self, path, *args, **kargs):

    tries_left = 2
    while (tries_left > 0):
        try:
            return self._api_request(path, *args, **kargs)
        except exception.DotHillConnectionError as e:
            if (tries_left < 1):
                LOG.error('Array    Connection    error:    %s    (no    more    retries)', e.msg)
                raise
            LOG.error('Array    Connection    error:    %s    (retrying)', e.msg)
        except exception.DotHillRequestError as e:
            if (tries_left < 1):
                LOG.error('Array    Request    error:    %s    (no    more    retries)', e.msg)
                raise
            if ('(-10027)' in e.msg):
                LOG.error('Array    Request    error:    %s    (retrying)', e.msg)
            else:
                raise
        tries_left -= 1
        self.session_login()
