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/27 17:21:35 UTC

[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5515: simulator: Add support to scale a VM

GutoVeronezi commented on a change in pull request #5515:
URL: https://github.com/apache/cloudstack/pull/5515#discussion_r716895326



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -965,10 +965,9 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationExcep
         /* Only works for KVM/XenServer/VMware (or "Any") for now, and volumes with 'None' since they're just allocated in DB */
 
         HypervisorType hypervisorType = _volsDao.getHypervisorType(volume.getId());
-
-        if (hypervisorType != HypervisorType.KVM && hypervisorType != HypervisorType.XenServer
-                && hypervisorType != HypervisorType.VMware && hypervisorType != HypervisorType.Any
-                && hypervisorType != HypervisorType.None) {
+        List<HypervisorType> supportedHypervisors = Arrays.asList(HypervisorType.KVM, HypervisorType.XenServer,

Review comment:
       Nice!
   
   I would just suggest you to turn it into a constant, to avoid recreating it every time.




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