gpordeus commented on PR #7974:
URL: https://github.com/apache/cloudstack/pull/7974#issuecomment-1768729949

   I have tested this PR by replicating the tests on my local lab. First, I 
tested on the current main and verified the problem was present. Then, I 
applied the changes and verified it had been fixed.
   
   My scenario had the same amount of domains, templates and ISOs (`ROOT` with 
13 and 11 and `ROOT/test` with 4 and 2), and I used the same commands to list 
templates and ISOs.
   
   ---
   
   **Templates**:
   <details>
   
   <summary>Without the changes</summary>
   
   With `share.public.templates.with.other.domains` set to true in both domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 17 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | 5 |
   | ROOT/test | TestUser | 5 |
   
   
![beforechange_template_count_for_domainadm](https://github.com/apache/cloudstack/assets/22242548/0da4d1dc-24d9-454e-9797-eca95015b29e)
   
   I marked one of the `ROOT` templates as non-public. It stopped showing in 
`templatefilter=featured` for all accounts:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 16 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | 5 |
   | ROOT/test | TestUser | 5 |
   
   With `share.public.templates.with.other.domains` set to false in both 
domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 17 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | Empty |
   | ROOT/test | TestUser | Empty |
   
   
![beforechange_template_count_for_domainadm_falsefalse](https://github.com/apache/cloudstack/assets/22242548/6feffb0c-461f-4ea0-83b4-15f6a56e595d)
   
   </details>
   
   <details>
   <summary>With the changes</summary>
   
   With `share.public.templates.with.other.domains` set to true in both domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 17 |
   | ROOT | User | 17 |
   | ROOT/test | TestAdmin | 17 |
   | ROOT/test | TestUser | 17 |
   
   
![afterchange_template_count_for_domainusr](https://github.com/apache/cloudstack/assets/22242548/32dd8a87-6505-40a1-8cc1-ae2709defccf)
   
   
   I marked one of the templates as non-public. It stopped showing in 
`templatefilter=featured` for all accounts. The first column indicates the 
domain of the non-public template:
   
   Template Domain | Domain | Account | `count` |
   | ------ | ------ | ------ | ------ |
   | ROOT | ROOT | Admin | 16 |
   | ROOT | ROOT | User | 16 |
   | ROOT | ROOT/test | TestAdmin | 16 |
   | ROOT | ROOT/test | TestUser | 16 |
   | ROOT/test | ROOT | Admin | 16 |
   | ROOT/test | ROOT | User | 16 |
   | ROOT/test | ROOT/test | TestAdmin | 16 |
   | ROOT/test | ROOT/test | TestUser | 16 |
   
   With `share.public.templates.with.other.domains` set to false in both 
domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 17 |
   | ROOT | User | 13 |
   | ROOT/test | TestAdmin | 4 |
   | ROOT/test | TestUser | 4 |
   
   With `share.public.templates.with.other.domains` set to false in both 
domains. The first column indicates the domain of the non-public template:
   
   Template Domain | Domain | Account | `count` |
   | ------ | ------ | ------ | ------ |
   | ROOT | ROOT | Admin | 16 |
   | ROOT | ROOT | User | 12 |
   | ROOT | ROOT/test | TestAdmin | 4 |
   | ROOT | ROOT/test | TestUser | 4 |
   | ROOT/test | ROOT | Admin | 16 |
   | ROOT/test | ROOT | User | 13 |
   | ROOT/test | ROOT/test | TestAdmin | 3 |
   | ROOT/test | ROOT/test | TestUser | 3 |
   
   </details>
   
   ---
   
   **ISOs**:
   
   <details>
   <summary>Without the changes</summary>
   
   With `share.public.templates.with.other.domains` set to true in both domains:
   
   | Domain | Account | Count |
   | ------ | ------ | ------ |
   | ROOT | Admin | 13 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | 5 |
   | ROOT/test | TestUser | 5 |
   
   
![beforechange_iso_count_for_usr](https://github.com/apache/cloudstack/assets/22242548/e4986a4d-ebd4-416d-8b21-63a831f78e7e)
   
   I marked one of the `ROOT` ISOs as non-public. It stopped showing in 
`isofilter=featured` for all accounts:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 12 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | 5 |
   | ROOT/test | TestUser | 5 |
   
   With `share.public.templates.with.other.domains` set to false in both 
domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 13 |
   | ROOT | User | 5 |
   | ROOT/test | TestAdmin | Empty |
   | ROOT/test | TestUser | Empty |
   
   
![beforechange_iso_count_for_usr_falsefalse](https://github.com/apache/cloudstack/assets/22242548/7636780f-b161-4bb6-876d-250876c9c2b7)
   
   </details>
   <details>
   <summary>With the changes</summary>
   
   With `share.public.templates.with.other.domains` set to true in both domains:
   
   | Domain | Account | `count` |
   | ------ | ------ | ------ |
   | ROOT | Admin | 13 |
   | ROOT | User | 13 |
   | ROOT/test | TestAdmin | 13 |
   | ROOT/test | TestUser | 13 |
   
   
![afterchange_iso_count_for_usr](https://github.com/apache/cloudstack/assets/22242548/51359265-407d-4060-a7e5-6f2b5bffb1c3)
   
   I marked one of the ISOs as non-public. It stopped showing in 
`isofilter=featured`, for all accounts. The first column indicates the domain 
of the non-public ISO:
   
   ISO Domain | Domain | Account | Count |
   | ------ | ------ | ------ | ------ |
   | ROOT | ROOT | Admin | 12 |
   | ROOT | ROOT | User | 12 |
   | ROOT | ROOT/test | TestAdmin | 12 |
   | ROOT | ROOT/test | TestUser | 12 |
   | ROOT/test | ROOT | Admin | 12 |
   | ROOT/test | ROOT | User | 12 |
   | ROOT/test | ROOT/test | TestAdmin | 12 |
   | ROOT/test | ROOT/test | TestUser | 12 |
   
   With `share.public.templates.with.other.domains` set to false in both 
domains:
   
   | Domain | Account | Count |
   | ------ | ------ | ------ |
   | ROOT | Admin | 13 |
   | ROOT | User | 11 |
   | ROOT/test | TestAdmin | 2 |
   | ROOT/test | TestUser | 2 |
   
   I marked one of the ISOs as non-public. It stopped showing with 
`isofilter=featured` for all accounts. The first column indicates the domain of 
the non-public ISO:
   
   ISO Domain | Domain | Account | Count |
   | ------ | ------ | ------ | ------ |
   | ROOT | ROOT | Admin | 12 |
   | ROOT | ROOT | User | 10 |
   | ROOT | ROOT/test | TestAdmin | 2 |
   | ROOT | ROOT/test | TestUser | 2 |
   | ROOT/test | ROOT | Admin | 12 |
   | ROOT/test | ROOT | User | 11 |
   | ROOT/test | ROOT/test | TestAdmin | 1 |
   | ROOT/test | ROOT/test | TestUser | 1 |
   
   </details>
   
   ---
   
   My testing yielded the same results. The only caveat is that the featured 
not-public templates do not show under the featured filter to anyone. However, 
this situation was observed even without the patch; therefore, it is outside 
the scope of this PR,


-- 
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]

Reply via email to