weizhouapache commented on code in PR #6845:
URL: https://github.com/apache/cloudstack/pull/6845#discussion_r1008075838


##########
api/src/main/java/com/cloud/deploy/DataCenterDeployment.java:
##########
@@ -124,4 +127,30 @@ public String toString() {
                 "migrationPlan");
     }
 
+    @Override
+    public void addHostPriority(Long hostId, HostPriority priority) {
+        Integer currentPriority = hostPriorities.get(hostId);
+        if (currentPriority == null) {
+            currentPriority = DEFAULT_HOST_PRIORITY;
+        }
+        if (HostPriority.HIGH.equals(priority)) {
+            hostPriorities.put(hostId, currentPriority + 1);
+        } else if (HostPriority.LOW.equals(priority)) {
+            hostPriorities.put(hostId, currentPriority - 1);

Review Comment:
   with the new code, the priorities are number (positive, negative or 0), not 
HIGH/LOW/NORMAL
   examples can be found at 
http://qa.cloudstack.cloud/docs/WIP-PROOFING/pr/291/adminguide/virtual_machines.html#determine-destination-host-of-vms-with-non-strict-affinity-groups



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to