use of org.ovirt.engine.core.common.businessentities.ClusterEditWarnings in project ovirt-engine by oVirt.
the class GetClusterEditWarningsQuery method executeQueryCommand.
@Override
protected void executeQueryCommand() {
final Cluster oldCluster = backend.runQuery(QueryType.GetClusterById, getParameters()).getReturnValue();
Cluster newCluster = getParameters().getNewCluster();
List<ClusterEditWarnings.Warning> hostWarnings = getProblematicEntities(oldCluster, newCluster, hostCheckers, cluster -> vdsDao.getAllForCluster(cluster.getId()));
List<ClusterEditWarnings.Warning> vmWarnings = new ArrayList<>();
if (oldCluster.supportsVirtService() && newCluster.supportsVirtService()) {
vmWarnings = getProblematicEntities(oldCluster, newCluster, vmCheckers, cluster -> vmDao.getAllForCluster(cluster.getId()));
}
setReturnValue(new ClusterEditWarnings(hostWarnings, vmWarnings));
}
Aggregations