rafaelweingartner commented on a change in pull request #2404: 
[CLOUDSTACK-10230] User should not be able to use removed “Guest OS type”
URL: https://github.com/apache/cloudstack/pull/2404#discussion_r178545521
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -306,8 +306,14 @@
 public class UserVmManagerImpl extends ManagerBase implements UserVmManager, 
VirtualMachineGuru, UserVmService, Configurable {
     private static final Logger s_logger = 
Logger.getLogger(UserVmManagerImpl.class);
 
+    /**
+     * The number of seconds to wait before timing out when trying to acquire 
a global lock.
+     */
     private static final int ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION = 3;
-    private static final long GB_TO_BYTES = 1024 * 1024 * 1024;
+    /**
+     * The number of bytes in a GiB.
+     */
+    private static final long GiB_TO_BYTES = 1024 * 1024 * 1024;
 
 Review comment:
   no problem. I just renamed to `GiB`, because the previous `GB` prefix that 
was being used is not accurate. 
   
   Sure the wording "factor" might be more appropriate, but I think we should 
look for a different solution. We have these constant all over our code base. 
We should look for a "MetricUtils/UnitUtils" or something like that to convert 
between different units (bytes to KB, KiB, MB, MiB, GB, GiB, TB, TiB, hertz and 
Ghz and so on)

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

Reply via email to