use of org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters in project ovirt-engine by oVirt.
the class BackendHostNicResource method getOldNetwork.
private org.ovirt.engine.core.common.businessentities.network.Network getOldNetwork(VdsNetworkInterface originalInter) {
String oldNetworkName = originalInter.getNetworkName();
if (!StringUtils.isEmpty(oldNetworkName)) {
return lookupAtachedNetwork(originalInter.getNetworkName());
} else {
InterfaceAndIdQueryParameters params = new InterfaceAndIdQueryParameters(originalInter.getVdsId(), originalInter);
List<VdsNetworkInterface> vlans = getBackendCollection(VdsNetworkInterface.class, QueryType.GetAllChildVlanInterfaces, params);
if (vlans != null && !vlans.isEmpty()) {
return lookupAtachedNetwork(vlans.get(0).getNetworkName());
} else {
return null;
}
}
}
Aggregations