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/02/22 07:40:14 UTC

[GitHub] [cloudstack] rhtyd commented on a change in pull request #4717: Added recursive fetch of child domains for listUsageRecords API call

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



##########
File path: server/src/main/java/com/cloud/usage/UsageServiceImpl.java
##########
@@ -248,7 +248,17 @@ public boolean generateUsageRecords(GenerateUsageRecordsCmd cmd) {
             sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
         }
 
-        if (domainId != null) {
+        if (cmd.isRecursive() && domainId != null){

Review comment:
       Look at for reference https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L872
   
   Expected test if an account is allowed or disallowed to get usage records of other domains (with/without recursive flag), and allowed to recursively get all usage records for a permitted account/domain.




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