rafaelweingartner commented on a change in pull request #2298: CLOUDSTACK-9620:
Enhancements for managed storage
URL: https://github.com/apache/cloudstack/pull/2298#discussion_r161183946
##########
File path: engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -1331,10 +1414,35 @@ public boolean getExecuteInSequence(final
HypervisorType hypervisorType) {
}
}
+ private List<Map<String, String>> getVolumesToDisconnect(VirtualMachine
vm) {
+ List<Map<String, String>> volumesToDisconnect = new ArrayList<>();
+
+ List<VolumeVO> volumes = _volsDao.findByInstance(vm.getId());
+
+ if (volumes != null) {
Review comment:
Here you can also do the same, if volumes is empty, you can return right
away the empty `volumesToDisconnect`, thus removing the next operations from a
IF statement
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services