@@ -182,7 +182,7 @@ public List<Long> orderClusters(VirtualMachineProfile vmProfile, DeploymentPlan
182182 } else {
183183 logger .debug ("Searching all possible resources under this Zone: {}" , dcDao .findById (plan .getDataCenterId ()));
184184
185- boolean applyAllocationAtPods = Boolean . parseBoolean ( configDao . getValue ( ApplyAllocationAlgorithmToPods .key ()) );
185+ boolean applyAllocationAtPods = ApplyAllocationAlgorithmToPods .value ( );
186186 if (applyAllocationAtPods ) {
187187 //start scan at all pods under this zone.
188188 clusterList = scanPodsForDestination (vmProfile , plan , avoid );
@@ -521,7 +521,7 @@ protected Pair<List<Long>, Map<Long, Double>> listPodsByCapacity(long zoneId, in
521521 private Pair <List <Long >, Map <Long , Double >> getOrderedPodsByCapacity (long zoneId ) {
522522 double cpuToMemoryWeight = ConfigurationManager .HostCapacityTypeCpuMemoryWeight .value ();
523523 short capacityType = getHostCapacityTypeToOrderCluster (
524- configDao . getValue ( HostCapacityTypeToOrderClusters .key () ), cpuToMemoryWeight );
524+ HostCapacityTypeToOrderClusters .value ( ), cpuToMemoryWeight );
525525
526526 logger .debug ("CapacityType: {} is used for Pod ordering" , getCapacityTypeName (capacityType ));
527527 if (capacityType >= 0 ) { // for capacityType other than COMBINED
@@ -556,7 +556,7 @@ public Map<Long, Double> getPodByCombinedCapacities(List<CapacityVO> capacities,
556556 private Pair <List <Long >, Map <Long , Double >> getOrderedClustersByCapacity (long id , long vmId , boolean isZone ) {
557557 double cpuToMemoryWeight = ConfigurationManager .HostCapacityTypeCpuMemoryWeight .value ();
558558 short capacityType = getHostCapacityTypeToOrderCluster (
559- configDao . getValue ( HostCapacityTypeToOrderClusters .key () ), cpuToMemoryWeight );
559+ HostCapacityTypeToOrderClusters .value ( ), cpuToMemoryWeight );
560560
561561 logger .debug ("CapacityType: {} is used for Cluster ordering" , getCapacityTypeName (capacityType ));
562562 if (capacityType >= 0 ) { // for capacityType other than COMBINED
@@ -667,7 +667,7 @@ public boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeL
667667 public boolean configure (String name , Map <String , Object > params ) throws ConfigurationException {
668668 super .configure (name , params );
669669 allocationAlgorithm = VmAllocationAlgorithm .value ();
670- globalDeploymentPlanner = configDao . getValue ( DeploymentPlanningManager .VmDeploymentPlanner .key () );
670+ globalDeploymentPlanner = DeploymentPlanningManager .VmDeploymentPlanner .value ( );
671671 String configValue ;
672672 if ((configValue = configDao .getValue (ImplicitHostTags .key ())) != null ) {
673673 implicitHostTags = configValue .trim ().split ("\\ s*,\\ s*" );
0 commit comments