def _list_instance_domains_slow(self, only_running=True):
    uuids = []
    doms = []
    if (self._conn.numOfDomains() > 0):
        for id in self._conn.listDomainsID():
            try:
                dom = self._lookup_by_id(id)
                doms.append(dom)
                uuids.append(dom.UUIDString())
            except exception.InstanceNotFound:
                continue
    if only_running:
        return doms
    for name in self._conn.listDefinedDomains():
        try:
            dom = self._lookup_by_name(name)
            if (dom.UUIDString() not in uuids):
                doms.append(dom)
        except exception.InstanceNotFound:
            continue
    return doms
def _list_instance_domains_slow(self, only_running=True):
    uuids = []
    doms = []
    if (self._conn.numOfDomains() > 0):
        for id in self._conn.listDomainsID():
            try:
                dom = self._lookup_by_id(id)
                doms.append(dom)
                uuids.append(dom.UUIDString())
            except exception.InstanceNotFound:
                continue
    if only_running:
        return doms
    for name in self._conn.listDefinedDomains():
        try:
            dom = self._lookup_by_name(name)
            if (dom.UUIDString() not in uuids):
                doms.append(dom)
        except exception.InstanceNotFound:
            continue
    return doms