XsLocalNetwork nw = getNetworkByName(conn, label);
s_logger.debug("Network object:" + nw.getNetwork().getUuid(conn));
PIF pif = nw.getPif(conn);
Record pifRec = pif.getRecord(conn);
s_logger.debug("PIF object:" + pifRec.uuid + "(" + pifRec.device + ")");
return new OvsFetchInterfaceAnswer(cmd, true, "Interface " + pifRec.device + " retrieved successfully",
pifRec.IP, pifRec.netmask, pifRec.MAC);
} catch (BadServerResponse e) {
s_logger.error("An error occurred while fetching the interface for " +
label + " on host " + _host.ip , e);
return new OvsFetchInterfaceAnswer(cmd, false, "EXCEPTION:" + e.getMessage());
} catch (XenAPIException e) {
s_logger.error("An error occurred while fetching the interface for " +
label + " on host " + _host.ip , e);
return new OvsFetchInterfaceAnswer(cmd, false, "EXCEPTION:" + e.getMessage());
} catch (XmlRpcException e) {
s_logger.error("An error occurred while fetching the interface for " +
label + " on host " + _host.ip, e);
return new OvsFetchInterfaceAnswer(cmd, false, "EXCEPTION:" + e.getMessage());
}
}