use of org.ovirt.engine.core.common.businessentities.network.NetworkClusterId in project ovirt-engine by oVirt.
the class NetworkClusterHelper method setStatus.
public void setStatus(Guid clusterId, final Collection<Network> networks) {
final RequiredNetworkClusterStatusUpdater requiredNetworkClusterStatusUpdater = new RequiredNetworkClusterStatusUpdater(clusterId);
for (Network network : networks) {
NetworkCluster networkCluster = networkClusterDao.get(new NetworkClusterId(clusterId, network.getId()));
boolean doUpdateNetworkClusterStatus = networkCluster != null;
if (doUpdateNetworkClusterStatus) {
if (networkCluster.isRequired()) {
requiredNetworkClusterStatusUpdater.update(networkCluster, network.getName());
} else {
updateNetworkClusterStatus(networkCluster, NetworkStatus.OPERATIONAL);
}
}
}
}
use of org.ovirt.engine.core.common.businessentities.network.NetworkClusterId in project ovirt-engine by oVirt.
the class NetworkClusterHelper method getManagementNetworkCluster.
private NetworkCluster getManagementNetworkCluster(NetworkCluster networkCluster) {
Guid clusterId = networkCluster.getClusterId();
Network mgmt = managementNetworkUtil.getManagementNetwork(clusterId);
return networkClusterDao.get(new NetworkClusterId(clusterId, mgmt.getId()));
}
use of org.ovirt.engine.core.common.businessentities.network.NetworkClusterId in project ovirt-engine by oVirt.
the class NetworkAttachmentValidator method getNetworkCluster.
private NetworkCluster getNetworkCluster() {
if (networkCluster == null) {
NetworkClusterId networkClusterId = new NetworkClusterId(host.getClusterId(), attachment.getNetworkId());
networkCluster = networkClusterDao.get(networkClusterId);
}
return networkCluster;
}
Aggregations