diff --git a/server/src/main/java/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java index 87b03748dbc..9950b90a2f2 100644 --- a/server/src/main/java/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java +++ b/server/src/main/java/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java @@ -45,6 +45,13 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase sofIdSearch; + /** + * Constant used to convert GB into Bytes (or the other way around). + * GB * MB * KB = Bytes // + * 1024 * 1024 * 1024 = 1073741824 + */ + private static final long GB_TO_BYTES = 1073741824; + protected ServiceOfferingJoinDaoImpl() { sofIdSearch = createSearchBuilder(); @@ -123,7 +130,8 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase
- {{ parseFloat( resource.rootdisksize / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB + {{ resource.rootdisksize }} GB