bernardodemarco commented on PR #185: URL: https://github.com/apache/cloudstack-cloudmonkey/pull/185#issuecomment-3220902626
@weizhouapache @shwstppr, thanks for your review! --- > I expect all the list behaviours to be consistent. Yes, I totally agree. The problem, however, is that the ACS APIs themselves are not consistent regarding the `projectid` parameter. The `listNetworks` API, for instance, does not list all networks when `projectid` is defined as `-1`: <details> <summary><code>list networks filter=id,name,type,project,account</code></summary> ```bash > list networks filter=id,name,type,project,account, { "count": 6, "network": [ { "account": "admin", "id": "4b7a1f4c-5ecc-4947-9898-7a6d7dbd8d5c", "name": "account-allocated-isolated-network", "type": "Isolated" }, { "account": "admin", "id": "30eb5338-1f87-440a-9fd5-e2ebcb1864cd", "name": "account-isolated-network", "type": "Isolated" }, { "account": "admin", "id": "a8755f65-1b74-46d4-81f9-cbcd32a524fb", "name": "account-shared-network", "type": "Shared" }, { "id": "5751392c-0ab9-4443-9905-41cacbe7d435", "name": "domain-shared-network", "type": "Shared" }, { "id": "78646d05-2d22-401c-b9c0-6a53dda292fe", "name": "global-shared-network", "type": "Shared" }, { "account": "admin", "id": "7f57254c-179b-489a-b8e2-6b9af166ff30", "name": "admin-tier", "type": "Isolated" } ] } ``` </details> <details> <summary><code>list networks filter=id,name,type,project,account, projectid=-1</code></summary> ```bash > list networks filter=id,name,type,project,account, projectid=-1 { "count": 6, "network": [ { "id": "19c93ecd-07e9-439b-b64d-b2c3b13acdd3", "name": "project-allocated-isolated-network", "project": "project", "type": "Isolated" }, { "id": "06a572d4-3ff0-47b7-9ee5-b7a30afa0624", "name": "project-isolated-network", "project": "project", "type": "Isolated" }, { "id": "da7e582a-2f5c-4719-96aa-be175dbb87ff", "name": "project-shared-network", "project": "project", "type": "Shared" }, { "id": "5751392c-0ab9-4443-9905-41cacbe7d435", "name": "domain-shared-network", "type": "Shared" }, { "id": "78646d05-2d22-401c-b9c0-6a53dda292fe", "name": "global-shared-network", "type": "Shared" }, { "id": "5f106432-c1fb-41c9-9e0e-28445e9def3b", "name": "project-tier", "project": "project", "type": "Isolated" } ] } ``` </details> Thus, defining `projectid=-1` for all APIs that have the `projectid` parameter could possibly lead to inconsistent autocomplete options. To follow with this approach, it would be first required to normalize all ACS APIs to have the same behavior when specifying `projectid=-1`. Do you guys have any ideas on how we could address this? --- > I think we could add global flag or global setting like Would there be any reason for someone not wanting the projects resources to be available as autocomplete options? IMHO, whenever possible, all resources the caller has access to should be displayed as options. -- 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: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org