'Finds vgc-cluster hostname for this box.'

def _find_vgc_host(self):

    params = [self.VGCCLUSTER, 'domain-list', '-1']
    try:
        (out, unused) = self._execute(run_as_root=True, *params)
    except processutils.ProcessExecutionError as err:
        self._log_cli_err(err)
        msg = _('Unable    to    get    list    of    domain    members,    check    that    the    cluster    is    running.')
        raise exception.VolumeDriverException(message=msg)
    domain = out.splitlines()
    params = ['ip', 'addr', 'list']
    try:
        (out, unused) = self._execute(run_as_root=False, *params)
    except processutils.ProcessExecutionError as err:
        self._log_cli_err(err)
        msg = _('Unable    to    get    list    of    IP    addresses    on    this    host,    check    permissions    and    networking.')
        raise exception.VolumeDriverException(message=msg)
    nets = out.splitlines()
    for host in domain:
        try:
            ip = socket.gethostbyname(host)
            for l in nets:
                x = l.strip()
                if x.startswith(('inet    %s/' % ip)):
                    return host
        except socket.error:
            pass
    msg = _("Current    host    isn't    part    of    HGST    domain.")
    raise exception.VolumeDriverException(message=msg)
