kioie commented on a change in pull request #4010:
URL: https://github.com/apache/cloudstack/pull/4010#discussion_r510874088



##########
File path: 
engine/schema/src/main/java/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
##########
@@ -238,6 +237,17 @@ public void releaseIpAddress(long nicId) {
         return listBy(sc);
     }
 
+    @Override
+    public List<DataCenterIpAddressVO> listIpAddressUsage(final long podId, 
final long dcId, final boolean onlyListAllocated) {
+        SearchCriteria<DataCenterIpAddressVO> sc = createSearchCriteria();
+        if(onlyListAllocated) {
+            sc.addAnd("takenAt", SearchCriteria.Op.NNULL);
+        }
+                sc.addAnd("podId", SearchCriteria.Op.EQ, podId);
+        sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, dcId);
+        return listBy(sc);
+    }

Review comment:
       changed!




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to