weizhouapache commented on PR #7799:
URL: https://github.com/apache/cloudstack/pull/7799#issuecomment-1680504543
> > @DaanHoogland I manually tested this patch. I have some concerns about
hiding some Guest OS.
> > Root Admins still have access to the duplicate mappings, when I tried to
register a new template, or edit one, the duplicate entries were still listed.
There are scenarios that Root Admin accounts register templates for the end
user; thus, it does not solve for this case.
>
> But they are ROOT admins and should know which guest OSses to use, we can
also present a list with only unhidden guest OSses, like for normal users.
>
> As an extra measure we can disable registering new templates with these
OSses. does that make sense? (global setting guarded)
>
> > Overall, I do not think the `forDisplay` parameter is necessary, at
least not for solving the issue at hand. In the method `mergeDuplicates` it
should mark the duplicate entries as removed, instead of hiding it. The
mappings are already copied, thus, this approach should not cause any problems.
>
> I heard concerns about the removal for guest OSses that might be still in
use. If there are none we can of course implement that as well.
>
> The forDisplay parameter is extra functionality and would also allow
admins to hide unwanted OSses. Like, "As a operator I want no ubuntu on my
systems", i can now disable it. I would like to keep it anyway.
@DaanHoogland
I think we should add a parameter to listGuestOSes API, like the following
```
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN,
description = "list resources by display flag; only ROOT admin is eligible to
pass this parameter", since = "4.18.1", authorized = {RoleType.Admin})
private Boolean display;
```
The default value is `true` for all users. Then we will get the guest OSes
which have display flag as true on UI and API response.
All others guest OSes will be hidden, but VMs using them will still work, no
need to update the guest os id of vm templates and vm instances.
--
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]