use of org.ovirt.engine.core.common.businessentities.UnmanagedNetwork in project ovirt-engine by oVirt.
the class UnmanagedNetworksHelper method getUnmanagedNetworks.
public List<UnmanagedNetwork> getUnmanagedNetworks(Guid hostId) {
List<UnmanagedNetwork> unmanagedNetworks = new ArrayList<>();
VDS host = vdsDao.get(hostId);
if (host != null) {
List<VdsNetworkInterface> hostNetworkInterfaces = interfaceDao.getAllInterfacesForVds(hostId);
BusinessEntityMap<Network> clusterNetworkMap = new BusinessEntityMap<>(getClusterNetworks(host));
for (VdsNetworkInterface vdsNetworkInterface : hostNetworkInterfaces) {
String networkName = vdsNetworkInterface.getNetworkName();
if (networkName != null && !clusterNetworkMap.containsKey(networkName)) {
unmanagedNetworks.add(createUnmanagedNetworkEntity(vdsNetworkInterface, networkName));
}
}
}
return unmanagedNetworks;
}
use of org.ovirt.engine.core.common.businessentities.UnmanagedNetwork in project ovirt-engine by oVirt.
the class GetAllUnmanagedNetworksByHostIdQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
Guid hostId = getParameters().getId();
List<UnmanagedNetwork> unmanagedNetworks = unmanagedNetworksHelper.getUnmanagedNetworks(hostId);
getQueryReturnValue().setReturnValue(unmanagedNetworks);
}
use of org.ovirt.engine.core.common.businessentities.UnmanagedNetwork in project ovirt-engine by oVirt.
the class GetUnmanagedNetworkByHostIdAndNameQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
Guid hostId = getParameters().getHostId();
String networkName = getParameters().getNetworkName();
UnmanagedNetwork unmanagedNetwork = unmanagedNetworksHelper.getUnmanagedNetwork(hostId, networkName);
getQueryReturnValue().setReturnValue(unmanagedNetwork);
}
Aggregations