[ https://issues.apache.org/jira/browse/CLOUDSTACK-10259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346516#comment-16346516 ]
ASF GitHub Bot commented on CLOUDSTACK-10259: --------------------------------------------- DaanHoogland commented on a change in pull request #2439: [CLOUDSTACK-10259] Missing float part of secondary storage data in listAccounts method URL: https://github.com/apache/cloudstack/pull/2439#discussion_r165002542 ########## File path: api/src/main/java/com/cloud/configuration/Resource.java ########## @@ -38,8 +38,8 @@ private ResourceOwnerType[] supportedOwners; private int ordinal; public static final long bytesToKiB = 1024; - public static final long bytesToMiB = 1024 * 1024; - public static final long bytesToGiB = 1024 * 1024 * 1024; + public static final long bytesToMiB = bytesToKiB * 1024; Review comment: đ ---------------------------------------------------------------- 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: us...@infra.apache.org > Missing float part of secondary storage data when calculating secondary > storage usage in listAccounts > ------------------------------------------------------------------------------------------------------ > > Key: CLOUDSTACK-10259 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10259 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Rafael Weingärtner > Assignee: Rafael Weingärtner > Priority: Minor > > There is a non-floating points division that is missing the floating part of > the secondary storage usage. This will affect methods that use the following > SET method > org.apache.cloudstack.api.response.AccountResponse.setSecondaryStorageLimit(String). > It affects the listAccounts API method, making it differ from the > updateResource count method, which is presented in bytes. -- This message was sent by Atlassian JIRA (v7.6.3#76005)