-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update listVirtualMachines API documentation with 'projectid=-1' to list all VMs in projects. #4276
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
Conversation
|
I think what you're trying to do is OK but could potentially break the listAPI for some environment. If you want we can show a toggle slider/radio in Primate list view which when checked can send the list VM API with listall=true and projectid=-1 which effectively would show the expected output. |
|
@rhtyd I understand your point. However, I think that either the documentation is incomplete or the Regarding the UI, I think that adding a toggle slider/radio in Primate would be nice indeed. |
|
@rhtyd The documentation currently states otherwise. The 'listall' parameter should now be called: 'listallexceptinstancesinprojects' This seems like an oversight during implementation (a bug) rather then a feature. |
|
@rhtyd @RodrigoDLopez @wido do this get your LGTMs? |
|
cc @svenvogel ^^? |
Hi @DaanHoogland |
|
I am LGTM with this. 'listAll' should do as it implies: List all Virtual Machines We need to update the changelog properly though |
what exactly do you have in mind? |
We need to mention something like: The listAll parameter of listVirtualMachines now also lists all Instances which are under a project. Previously these would only be returned when *projectid=-1* was supplied as a parameter |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2359 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3147)
|
|
@GabrielBrascher can you have a look at #4469 and see if this is still needed or needs adjusting? |
|
@DaanHoogland PR #4469 regards listing projects, correct? This PR is different, altering the |
|
@GabrielBrascher maybe this can be solved by PR #4828? |
|
@rhtyd I've tested it with the new UI and this would require changes in the UI as well, as it would be listing all VMs including from projects. |
|
So the API has a squiffy name, I think there are bigger things to worry about. projectid=-1 gives the functional output required. Why are we trying to change an API that isn't really broken, at the risk of unintended consequences? |
This reverts commit 6766cc7.
9217e97 to
644e9ce
Compare
|
@rhtyd @PaulAngus @wido @nvazquez updated this PR to address just the API documentation changes in order to address with a safer option. In the medium-long term we might (or not) get back at changing this API implementation. |
644e9ce to
fb9083d
Compare
|
@GabrielBrascher changed the milestone based on base |
|
@rhtyd no problem in having this at 4.17.0.0. |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, no code.
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Pearl1594
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1887 |
|
@blueorangutan test |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2655)
|
…ist all VMs in projects. (apache#4276) * Enhance API list commands documentation for "listAll" and "projectid" parameters
Description
[Update November 2021] PR Scope changed
Considering the reviews and discussion, I changed the scope of this PR to documentation update. I think that at least the documentation changes are mandatory as the documentation is not clear and already let to some internal issues.
Looking into the listVirtualMachines API command documentation there is the following description:
The documentation is clear about the fact that when parameter
listall=truethenlistVirtualMachineslists resources that the caller is authorized to see. Therefore, this PR considers that the ADMIN is authorized to see all VMs, including those on projects.Fixes: #4267
Types of changes
How Has This Been Tested?
I tested it via CloudMonkey and CloudStack UI. CloudMonkey output example: