sureshanaparti commented on a change in pull request #4561:
URL: https://github.com/apache/cloudstack/pull/4561#discussion_r566683597



##########
File path: 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -1827,6 +1848,63 @@ private void orchestrateStop(final String vmUuid, final 
boolean cleanUpEvenIfUna
         advanceStop(vm, cleanUpEvenIfUnableToStop);
     }
 
+    private void getPersistenceMap(Map<String, Boolean> vlanToPersistenceMap, 
NetworkVO networkVO) {
+        NetworkOfferingVO offeringVO = 
networkOfferingDao.findById(networkVO.getNetworkOfferingId());
+        if (offeringVO != null) {
+            Pair<String, Boolean> data = getVMNetworkDetails(networkVO, 
offeringVO.isPersistent());
+            Boolean shouldDeleteNwResource = 
(MapUtils.isNotEmpty(vlanToPersistenceMap) && data != null) ? 
vlanToPersistenceMap.get(data.first()) : null;
+            if (data != null && (shouldDeleteNwResource == null || 
shouldDeleteNwResource)) {
+                vlanToPersistenceMap.put(data.first(), data.second());
+            }
+        }
+    }
+
+    private Map<String, Boolean> getVlanToPersistenceMapForVM(long vmId) {
+        List<UserVmJoinVO> userVmJoinVOS = userVmJoinDao.searchByIds(vmId);

Review comment:
       ```suggestion
           List<UserVmJoinVO> userVmJoinVOs = userVmJoinDao.searchByIds(vmId);
   ```




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

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


Reply via email to