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:
[email protected]
With regards,
Apache Git Services