You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/17 06:42:18 UTC

[GitHub] [cloudstack] rhtyd commented on a change in pull request #5464: server: fix list public ip returns duplicated records

rhtyd commented on a change in pull request #5464:
URL: https://github.com/apache/cloudstack/pull/5464#discussion_r710792528



##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -2190,26 +2190,26 @@ private void abstractDataStoreClustersList(List<StoragePool> storagePools, List<
         }
         if (freeAddrIds.size() > 0) {
             final SearchBuilder<IPAddressVO> sb2 = _publicIpAddressDao.createSearchBuilder();
-            buildParameters(sb2, cmd);
+            buildParameters(sb2, cmd, false);
             sb2.and("ids", sb2.entity().getId(), SearchCriteria.Op.IN);
 
             SearchCriteria<IPAddressVO> sc2 = sb2.create();
             setParameters(sc2, cmd, vlanType);
             sc2.setParameters("ids", freeAddrIds.toArray());
             addrs.addAll(_publicIpAddressDao.search(sc2, searchFilter)); // Allocated + Free
         }
+        Collections.sort(addrs, Comparator.comparing(IPAddressVO::getAddress));

Review comment:
       Yes it would be good




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org