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


##########
engine/schema/src/main/java/com/cloud/vm/NicVO.java:
##########
@@ -394,4 +397,14 @@ public String getNsxLogicalSwitchPortUuid() {
     public void setNsxLogicalSwitchPortUuid(String nsxLogicalSwitchPortUuid) {
         this.nsxLogicalSwitchPortUuid = nsxLogicalSwitchPortUuid;
     }
+

Review Comment:
   @SadiJr 
   my suggestion is, we could replace  `allNics` with `allNicIds` which 
contains the id of the vm nics, 
   
   the other lines can be changed to
   
   ```
               if (nicVO != null) {
                   allNicIds.remove(nicVO.getId());
               }
   ```
   and
   ```
           for (final Long unMappedNicId : allNicIds) {
               vmManager.removeNicFromVm(vm, _nicDao.findById(unMappedNicId));
           }
   ```
   



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