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 2020/08/15 13:37:29 UTC

[GitHub] [cloudstack] GabrielBrascher opened a new issue #4267: Allow listing all Virtual Machines, including those in Projects

GabrielBrascher opened a new issue #4267:
URL: https://github.com/apache/cloudstack/issues/4267


   ##### ISSUE TYPE
    * Enhancement Request
   
   ##### COMPONENT NAME
   ~~~
   API
   ~~~
   
   ##### SUMMARY
   CloudStack does not list VMs that are in a project unless the `listVirtualMachines` API request has the specific project ID set on `projectid` parameter. I don`t see why we do not provide any way of listing **all** VMs.
   
   Looking at the documentation of [listVirtualMachines](https://cloudstack.apache.org/api/apidocs-4.14/apis/listVirtualMachines.html), when `listall=true` it lists all VMs that the caller is authorized to see; if set to false, it lists just the resources owned by the caller.
   
   With that said, I think that the admin should be allowed to list VMs on projects when the request contains`listall=true`. Does anyone (dis)agree with that?
   
   I would like to take the liberty and propose/discuss two approaches to fix/enhance it:
   1. Add support for Admins to list VMs on all projects when listall=true; or,
   2. add a new parameter that will allow the Admin to list all VMs, including those in projects.
   
   Considering the [API's documentation](https://cloudstack.apache.org/api/apidocs-4.14/apis/listVirtualMachines.html), the first approach fits well as Admin is indeed authorized to see all VMs; however, the second option avoids any possible backward compatibility and adds finer granularity to Admin's requests.


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



[GitHub] [cloudstack] GabrielBrascher commented on issue #4267: List VMs in Projects when listing all VMs

Posted by GitBox <gi...@apache.org>.
GabrielBrascher commented on issue #4267:
URL: https://github.com/apache/cloudstack/issues/4267#issuecomment-674428759


   I had no idea of this trick. It works indeed!
   @rhtyd thanks for the hint :slightly_smiling_face: :+1:
   
   Do you know if this is documented somewhere? It would be nice to have this documented somewhere.


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



[GitHub] [cloudstack] rhtyd commented on issue #4267: List VMs in Projects when listing all VMs

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #4267:
URL: https://github.com/apache/cloudstack/issues/4267#issuecomment-674427798


   @GabrielBrascher there is a way by calling listall=true and projectid=-1 can you try that?


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



[GitHub] [cloudstack] GabrielBrascher closed issue #4267: List VMs in Projects when listing all VMs

Posted by GitBox <gi...@apache.org>.
GabrielBrascher closed issue #4267:
URL: https://github.com/apache/cloudstack/issues/4267


   


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