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/20 06:16:45 UTC

[GitHub] [cloudstack] shwstppr opened a new pull request #5471: vmware, network: add maclearning option

shwstppr opened a new pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471


   ### Description
   
   Adds option for specifying MAC Learning property for network offering (useful for VMware Distributed Virtual Portgroup). Added global config - network.mac.learning for the default value.
   MAC Learning is supported for DV portgroups for VMware Distributed vSwitches v6.6.0+ and vSphere 6.7+
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   ![Screenshot from 2021-08-05 16-17-50](https://user-images.githubusercontent.com/153340/128338703-8da4ff2a-ece6-4ba9-8ec2-d258faac86f4.png)
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-922687874


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1321


-- 
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



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

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712748044



##########
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:
       any case where both objs are null?




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932079627


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933917563


   The test failure has been fixed by PR #5547, merging 


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-925608494


   @sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923766193


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1341


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712758559



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       There is no check for both objects null. `eitherObjectNull()` checks if only one of them is null.




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932012115


   Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_multiplication_x: debian :heavy_check_mark: suse15. SL-JID 1469


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932624796


   <b>Trillian test result (tid-2276)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 39719 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2276-vmware-67u3.zip
   Smoke tests completed. 89 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_03_live_migrate_VM_with_two_data_disks | `Error` | 67.03 | test_vm_life_cycle.py
   


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933370429


   > this is ready for merging but has conflicts due to https://github.com/apache/cloudstack/pull/5470/files cc @nvazquez @sureshanaparti @shwstppr
   
   Fixed conflicts (due to #5470 merging)


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932041321


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-922662619


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] shwstppr closed pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471


   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932644599


   <b>Trillian test result (tid-2277)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 44145 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2277-vmware-67u3.zip
   Smoke tests completed. 89 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_03_live_migrate_VM_with_two_data_disks | `Error` | 62.97 | test_vm_life_cycle.py
   


-- 
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



[GitHub] [cloudstack] rhtyd commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-926570368


   @shwstppr @NuxRo is this ready for review? 


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933401722


   @blueorangutan test centos7 vmware-67u3


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-924821477


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1358


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-924786966


   @blueorangutan package


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933402034


   @sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933371050


   @sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] rhtyd commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932894373


   The vmware issue/failure exists on main branch as seen in #5201
   Merging this


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932077851


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1473


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932154949


   @blueorangutan test centos7 vmware-67u3


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-931955552


   @blueorangutan package


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932078613


   @blueorangutan test centos7 vmware-67u3


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923768700


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923266421


   @blueorangutan test centos7 vmware-67u3


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712850506



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       @sureshanaparti 
   Four cases:
   
   1. currentPolicy is null, newPolicy is not null       <- Will be handled by `eitherObjectNull`
   2. currentPolicy is not null, newPolicy is null       <- Will be handled by `eitherObjectNull`
   3. currentPolicy is null, newPolicy is null             <- Will fail `newPolicy != null` check in second part of the condition
   4. currentPolicy is not null, newPolicy is not null <- Should be handled by `newPolicy.isValue() != currentPolicy.isValue()`
   
   Actually I added null check of both vars initially but IntelliJ suggested simplification and I guess it was right




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-924787706


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933370770


   @blueorangutan package


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-931955834


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932156556


   @sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r713764456



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       @sureshanaparti which private method?
   If both objects are null, `areBoolPoliciesDifferent` method should return false. That is why




-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-927536289


   @rhtyd should be ready this week, @alexandremattioli doing some tests for this and #5470


-- 
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



[GitHub] [cloudstack] nvazquez merged pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471


   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933894963


   <b>Trillian test result (tid-2314)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 36552 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2314-vmware-67u3.zip
   Smoke tests completed. 90 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_03_live_migrate_VM_with_two_data_disks | `Error` | 63.35 | test_vm_life_cycle.py
   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923267462


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923741553


   ^^ could be an intermittent failure for tests:
   ```2021-09-20 23:06:06,436 - ERROR - marvinRequest : CmdName: <marvin.cloudstackAPI.createNetwork.createNetworkCmd object at 0x7fe468167898> Exception: ['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 376, in marvinRequest\n    raise self.__lastError\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 310, in __parseAndGetResponse\n    response_cls)\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/jsonHelper.py", line 155, in getResultObj\n    raise cloudstackException.CloudstackAPIException(respname, errMsg)\n', 'marvin.cloudstackException.CloudstackAPIException: Execute cmd: createnetwork failed, due to: errorCode: 431, errorText:The VLAN tag to use for new guest network, 1201 is already being used for dynamic vlan allocation for the guest network in zone pr5471-t2136-vmware-67u3\n']
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 376, in marvinRequest
       raise self.__lastError
     File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 310, in __parseAndGetResponse
       response_cls)
     File "/usr/local/lib/python3.6/site-packages/marvin/jsonHelper.py", line 155, in getResultObj
       raise cloudstackException.CloudstackAPIException(respname, errMsg)
   marvin.cloudstackException.CloudstackAPIException: Execute cmd: createnetwork failed, due to: errorCode: 431, errorText:The VLAN tag to use for new guest network, 1201 is already being used for dynamic vlan allocation for the guest network in zone pr5471-t2136-vmware-67u3
   ```
   Will re-run
   @blueorangutan package


-- 
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



[GitHub] [cloudstack] rhtyd commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932895063


   this is ready for merging but has conflicts due to https://github.com/apache/cloudstack/pull/5470/files cc @nvazquez @sureshanaparti @shwstppr 


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923710549


   <b>Trillian test result (tid-2136)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 38555 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2136-vmware-67u3.zip
   Smoke tests completed. 88 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_nic | `Error` | 181.44 | test_nic.py
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932041132


   @blueorangutan package


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-926100477


   <b>Trillian test result (tid-2181)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 38813 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2181-vmware-67u3.zip
   Smoke tests completed. 89 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932089321


   <b>Trillian Build Failed (tid-2275)<b/>


-- 
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



[GitHub] [cloudstack] rhtyd commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-932723783


   I see consistent new issue, can you investigate and fix @sureshanaparti @nvazquez cc @shwstppr 


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-933401324


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1495


-- 
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



[GitHub] [cloudstack] shwstppr closed pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712749631



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       extra not null checks may not be required (both objs are not null ensured before using _eitherObjectNull()_), please check wherever applicable.




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923741903


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-925608332


   @blueorangutan test centos7 vmware-67u3


-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-922662468


   Moving MAC learning addition changes from #5181 here
   
   @blueorangutan package


-- 
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



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

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r713741670



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       @shwstppr why not you handle case 3) in the private method itself?




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #5471: vmware, network: add maclearning option

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-924346566


   <b>Trillian test result (tid-2146)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 39998 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5471-t2146-vmware-67u3.zip
   Smoke tests completed. 89 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712749631



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       extra not null checks may not be required (both objs are not null ensured before using _eitherObjectNull()_), please check wherever applicable. If both objs are null, have to add check for the other obj as well.




-- 
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



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

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#issuecomment-923768184


   @blueorangutan test centos7 vmware-67u3


-- 
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



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

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #5471:
URL: https://github.com/apache/cloudstack/pull/5471#discussion_r712840718



##########
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) ||
+                (newPolicy != null && newPolicy.isValue() != currentPolicy.isValue());

Review comment:
       correct, so when both are null, can be a NPE?




-- 
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