You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/21 07:05:55 UTC

[GitHub] [cloudstack] shwstppr commented on a change in pull request #5471: vmware, network: add maclearning option

shwstppr commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712757108



##########
File path: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
##########
@@ -839,10 +849,79 @@ private static void createPortGroup(String physicalNetwork, String networkName,
         }
     }
 
-    public static boolean isSpecMatch(DVPortgroupConfigInfo currentDvPortgroupInfo, DVPortgroupConfigSpec newDvPortGroupSpec) {
+    private static boolean eitherObjectNull(Object obj1, Object obj2) {
+        return (obj1 == null && obj2 != null) || (obj1 != null && obj2 == null);
+    }
+
+    private static boolean areBoolPoliciesDifferent(BoolPolicy currentPolicy, BoolPolicy newPolicy) {
+        return eitherObjectNull(currentPolicy, newPolicy) ||

Review comment:
       @sureshanaparti if both objects are null that would mean both policies are essentially same (`null`). Method should return false in that case




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org