'Runs a command on SMU using SSH.
:returns: stdout and stderr of the command'

@utils.retry(exceptions=exception.HNASConnError, retries=HNAS_SSC_RETRIES, wait_random=True)
def _run_cmd(self, *args, **kwargs):

    if (self.cluster_admin_ip0 is None):
        args = ((self.hnas_cmd, 'localhost') + args)
    else:
        args = ((self.hnas_cmd, '--smuauth', self.cluster_admin_ip0) + args)
    utils.check_ssh_injection(args)
    command = '    '.join(args)
    command = command.replace('"', '\\"')
    if (not self.sshpool):
        self.sshpool = ssh_utils.SSHPool(ip=self.mgmt_ip0, port=int(self.ssh_port), conn_timeout=None, login=self.ssh_username, password=self.ssh_pwd, privatekey=self.ssh_private_key)
    with self.sshpool.item() as ssh:
        try:
            (out, err) = putils.ssh_execute(ssh, command, check_exit_code=True)
            LOG.debug('command    %(cmd)s    result:    out    =    %(out)s    -    err    =    %(err)s', {'cmd': self.hnas_cmd, 'out': out, 'err': err})
            return (out, err)
        except putils.ProcessExecutionError as e:
            if ('Failed    to    establish    SSC    connection' in e.stderr):
                msg = _('Failed    to    establish    SSC    connection!')
                LOG.exception(msg)
                raise exception.HNASConnError(msg)
            elif ('Connection    reset' in e.stderr):
                msg = _('HNAS    connection    reset!')
                LOG.exception(msg)
                raise exception.HNASConnError(msg)
            else:
                raise
