[ https://issues.apache.org/jira/browse/CLOUDSTACK-10057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226487#comment-16226487 ]
ASF GitHub Bot commented on CLOUDSTACK-10057: --------------------------------------------- sgoeminn commented on a change in pull request #2250: CLOUDSTACK-10057: listNetworkOfferings now returns the correct number of offerings. URL: https://github.com/apache/cloudstack/pull/2250#discussion_r147928964 ########## File path: server/src/com/cloud/configuration/ConfigurationManagerImpl.java ########## @@ -4788,7 +4788,7 @@ protected void validateNtwkOffDetails(final Map<Detail, String> details, final M // Now apply pagination final List<? extends NetworkOffering> wPagination = StringUtils.applyPagination(supportedOfferings, cmd.getStartIndex(), cmd.getPageSizeVal()); if (wPagination != null) { - final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, offerings.size()); + final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, supportedOfferings.size()); Review comment: @rhtyd we always want to return the number of total found offerings and not only the number of offerings in the page that is returned. This is the same behavior as all the other list cmds. ---------------------------------------------------------------- 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 > ListNetworkOfferingsCmd does not return the correct count > --------------------------------------------------------- > > Key: CLOUDSTACK-10057 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10057 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: API > Affects Versions: 4.11.0.0 > Reporter: Sigert Goeminne > Assignee: Sigert Goeminne > > ListNetworkOfferingsCmd returns a count value which is incorrect (no network > offerings are returned but the count is set to a value higher then 0). -- This message was sent by Atlassian JIRA (v6.4.14#64029)