'Run an SSH command and return the ID of the created object.'

def run_ssh_check_created(self, ssh_cmd):

    (out, err) = self._run_ssh(ssh_cmd)
    try:
        match_obj = re.search('\\[([0-9]+)\\],?    successfully    created', out)
        return match_obj.group(1)
    except (AttributeError, IndexError):
        msg = (_('Failed    to    parse    CLI    output:\n    command:    %(cmd)s\n    stdout:    %(out)s\n    stderr:    %(err)s.') % {'cmd': ssh_cmd, 'out': out, 'err': err})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
