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



##########
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:
       I just noticed a minor adjustment on line 246.
   ```
           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);
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to