bernardodemarco commented on issue #10392:
URL: https://github.com/apache/cloudstack/issues/10392#issuecomment-2657968126
@scottsignal, thanks for reporting the bug, I reproduced it in 4.19.
> Simply adding &templatefilter=self does not fix this.
Yes, it seems to be an API bug. In my local environment, I created a domain
`ROOT/d1` and registered a template with an account belonging to that domain.
However, when executing the `listTemplates` API through CloudMonkey, specifying
the `ROOT/d1` ID in the `domainid` field, all templates are returned:
```bash
(localcloud) 🐂 > list templates templatefilter=self
domainid=e4484046-403c-41df-80ac-c21f760edaec filter=name,account,domain
{
"count": 6,
"template": [
{
"account": "admin",
"domain": "ROOT",
"name": "systemvm-kvm-4.19.1"
},
{
"account": "admin",
"domain": "ROOT",
"name": "systemvm-kvm-4.20.0-x86_64"
},
{
"account": "admin",
"domain": "ROOT",
"name": "Ubuntu 18.04"
},
{
"account": "d1",
"domain": "d1",
"name": "Macchinina"
},
{
"account": "system",
"domain": "ROOT",
"name": "SystemVM Template (KVM)"
},
{
"account": "system",
"domain": "ROOT",
"name": "CentOS 5.5(64-bit) no GUI (KVM)"
}
]
}
```
---
> If ListTemplates really requires an account name, is this button needed?
I'm not entirely sure if the `account` field is required. If it were, the
API docs, or the API response, would need to somehow inform it to the users.
Therefore, it needs further investigation.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]