Uh oh!
There was an error while loading. Please reload this page.
Update listVirtualMachines API documentation with 'projectid=-1' to list all VMs in projects. - #4276
Conversation
yadvr
commented
Aug 19, 2020
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. |
GabrielBrascher
commented
Aug 25, 2020
@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. |
wido
commented
Oct 1, 2020
@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. |
DaanHoogland
commented
Oct 21, 2020
@rhtyd @RodrigoDLopez@wido do this get your LGTMs? |
DaanHoogland
commented
Oct 21, 2020
cc @svenvogel ^^? |
RodrigoDLopez
commented
Oct 21, 2020
Hi @DaanHoogland |
wido
commented
Oct 21, 2020
I am LGTM with this. 'listAll' should do as it implies: List all Virtual Machines We need to update the changelog properly though |
DaanHoogland
commented
Oct 21, 2020
what exactly do you have in mind? |
wido
commented
Oct 21, 2020
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 |
DaanHoogland
commented
Nov 10, 2020
@blueorangutan package |
blueorangutan
commented
Nov 10, 2020
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 10, 2020
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2359 |
DaanHoogland
commented
Nov 11, 2020
@blueorangutan test |
blueorangutan
commented
Nov 11, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Nov 11, 2020
Trillian test result (tid-3147)
|
DaanHoogland
commented
Nov 17, 2020
@GabrielBrascher can you have a look at #4469 and see if this is still needed or needs adjusting? |
GabrielBrascher
commented
Nov 17, 2020
@DaanHoogland PR #4469 regards listing projects, correct? This PR is different, altering the |
nvazquez
commented
Sep 23, 2021
@GabrielBrascher maybe this can be solved by PR #4828? |
GabrielBrascher
commented
Oct 6, 2021
@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. |
PaulAngus
commented
Oct 7, 2021
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
644e9ceCompareGabrielBrascher
commented
Oct 7, 2021
@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
fb9083dCompareyadvr
commented
Nov 25, 2021
@GabrielBrascher changed the milestone based on base |
GabrielBrascher
commented
Dec 10, 2021
@rhtyd no problem in having this at 4.17.0.0. |
sureshanaparti
commented
Dec 14, 2021
@blueorangutan package |
blueorangutan
commented
Dec 14, 2021
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Dec 14, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1887 |
sureshanaparti
commented
Dec 14, 2021
@blueorangutan test |
blueorangutan
commented
Dec 14, 2021
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Dec 14, 2021
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: