Map<String, IDomain> domains = new HashMap<String, IDomain>();
IConnect con = getOrCreateConnection();
LogRecord info = new LogRecord(Level.FINE, "Getting hypervisor domains.");
LOGGER.log(info);
if (con != null) {
for (String c : con.listDefinedDomains()) {
if (c != null && !c.equals("")) {
IDomain domain = null;
try {
domain = con.domainLookupByName(c);
domains.put(domain.getName(), domain);