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: [email protected]

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


Reply via email to