DaanHoogland commented on a change in pull request #3532: Add new "Add volume"
button, to add volume to VM instance directly
URL: https://github.com/apache/cloudstack/pull/3532#discussion_r312402235
##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1662,7 +1629,45 @@ public Volume attachVolumeToVM(Long vmId, Long
volumeId, Long deviceId) {
return vol;
}
}
+
+ public Volume verifyVmAndAttachVolume(Long vmId, VolumeVO volume){
+ Account caller = CallContext.current().getCallingAccount();
+ Volume vol = null;
+ if (vmId != null) {
+ // Check that the virtual machine ID is valid and it's a user vm
Review comment:
I think these comments warrant a further modularisation, so
checkVmIdIsValidUservm()
----------------------------------------------------------------
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]
With regards,
Apache Git Services