-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
listVirtualMachines does not show instances belonging to a project #3343
Comments
ping @ustcweizhou @PaulAngus |
@ustcweizhou did you say that you guys are planning on changing this behaviour or just that you would also like to see it changed? |
@PaulAngus We have some changes in 4.7.1 to list all project resources in default view. That's the default behavior in our fork. As you can see, it breaks the backwards compatibility. |
ok, cool. I'll assign this to you if you don't mind so 'people' can see that it's kinda 'in-hand'. (or not, as you dont appear in the assignees list !?) |
@NuxRo known limitation, you've to pass projectid=-1 to list them all. This pattern exists for all list apis of various resources like routers, etc. |
@rhtyd that's very nice. good to know it. |
Just come across this - would be nice if there was a way that you could list all "things" regardless of project or not. Right now it looks like you have to do project=-1 to get anything in a project, and miss the project param for anything not in a project. |
The workaround is to either specify a specific projectid= or projectid=-1. A resource under a project is owned by a project (a project account) than a member of the project, which is why such resources are not shown in the default list APIs/views. If we allow listing of all resources, then it may break the UI semantics (backward compatibility). A middle ground could be if |
Thanks Rohit, that makes sense. To be honest I would not have raised this issue had I known about projectid=-1, but that listall=true does not sound too bad if it could be done. |
probably fixed by #3894 |
Fixed in #3894 you've to specify listall=true and projectid=-1 |
Relevant email thread https://lists.apache.org/thread.html/6aca3e7b99816eef127ce516e5ef93bddb7a60a53e72762d5af3c050@%3Cdev.cloudstack.apache.org%3E
As a user I have created a project and in it I created a few VMs. These VMs will not show up in "listVirtualMachines" unless the project is specified.
e.g.
The text was updated successfully, but these errors were encountered: