'Run an XG request function, and retry as needed.
The request will be retried until it returns a success
message, a failure message, or the global request timeout is
hit.
This wrapper is meant to deal with backend requests that can
fail for any variety of reasons, for instance, when the system
is already busy handling other LUN requests. If there is no
space left, or other "fatal" errors are returned (see
_fatal_error_code() for a list of all known error conditions).
:param request_func:  XG api method to call
:param success_msgs:  Success messages expected from the backend
:param *args:  argument array to be passed to the request_func
:param **kwargs:  argument dictionary to be passed to request_func
:returns: the response dict from the last XG call'

def _send_cmd(self, request_func, success_msgs, *args, **kwargs):

    resp = {}
    start = time.time()
    done = False
    if isinstance(success_msgs, six.string_types):
        success_msgs = [success_msgs]
    while (not done):
        if ((time.time() - start) >= self.config.violin_request_timeout):
            raise exception.ViolinRequestRetryTimeout(timeout=self.config.violin_request_timeout)
        resp = request_func(*args, **kwargs)
        if (not resp['msg']):
            resp['msg'] = ''
        for msg in success_msgs:
            if (resp['success'] and (msg in resp['msg'])):
                done = True
                break
        if (not resp['success']):
            self._check_error_code(resp)
            done = True
            break
    return resp
