soreana commented on PR #7082:
URL: https://github.com/apache/cloudstack/pull/7082#issuecomment-1673105746

   > @soreana I would say the use is for the user to see which offerings are 
available to an account (??) cc @RodrigoDLopez
   
   @DaanHoogland So in that case I would say it is working :D
   
   I've created the following setup, and tested the cloudmonkey output.
   
   ```
   Root
     |----- Domain
     |       |== Account
     |       |== DomainOffering
     |----- Domain2
             |== Account2
             |== Domain2Offering
   ```
   
   #### No domainid passed -> all the service offerings are listed
   
   ```
   (localcloud)  > list serviceofferings filter=name,id
   {
     "count": 4,
     "serviceoffering": [
       {
         "id": "95d95db2-2b2d-4660-853d-7871104505b5",
         "name": "Small Instance"
       },
       {
         "id": "cfdc2dc3-48c2-41db-bacf-6ef261e01b13",
         "name": "Medium Instance"
       },
       {
         "id": "c041a46b-3d52-4835-84f8-889be36b3057",
         "name": "DomainOffering"
       },
       {
         "id": "89bbe884-2aa2-4d76-9c10-e74796a0c27d",
         "name": "Domain2Offering"
       }
     ]
   }
   ```
   
   #### Only the domainid passed -> service offerings in that domain are listed
   
   ```
   (localcloud)  > list serviceofferings 
domainid=33f0fc41-5637-48d5-8db6-f0ce866e1753 filter=name,id
   {
     "count": 1,
     "serviceoffering": [
       {
         "id": "89bbe884-2aa2-4d76-9c10-e74796a0c27d",
         "name": "Domain2Offering"
       }
     ]
   }
   ```
   #### the domainid and account are passed -> all the service offerings that 
account has access to are listed
   
   ```
   (localcloud)  > list serviceofferings 
domainid=33f0fc41-5637-48d5-8db6-f0ce866e1753 account=account2 filter=name,id
   {
     "count": 3,
     "serviceoffering": [
       {
         "id": "95d95db2-2b2d-4660-853d-7871104505b5",
         "name": "Small Instance"
       },
       {
         "id": "cfdc2dc3-48c2-41db-bacf-6ef261e01b13",
         "name": "Medium Instance"
       },
       {
         "id": "89bbe884-2aa2-4d76-9c10-e74796a0c27d",
         "name": "Domain2Offering"
       }
     ]
   }
   ```


-- 
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: [email protected]

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

Reply via email to