use of org.ovirt.engine.core.common.scheduling.PolicyUnitType in project ovirt-engine by oVirt.
the class SchedulingManager method loadClusterPolicies.
private void loadClusterPolicies() {
// Load internal cluster policies
policyMap.putAll(InternalClusterPolicies.getClusterPolicies());
Map<Guid, PolicyUnitType> internalTypes = new HashMap<>();
for (PolicyUnitImpl unit : policyUnits.values()) {
internalTypes.put(unit.getGuid(), unit.getType());
}
// Get all user provided cluster policies
List<ClusterPolicy> allClusterPolicies = clusterPolicyDao.getAll(Collections.unmodifiableMap(internalTypes));
for (ClusterPolicy clusterPolicy : allClusterPolicies) {
policyMap.put(clusterPolicy.getId(), clusterPolicy);
}
}
Aggregations