bernardodemarco opened a new pull request, #9947:
URL: https://github.com/apache/cloudstack/pull/9947

   ### Description
   
   Currently, the `listNetworkOfferings` API supports the `forvpc` and 
`guestiptype` parameters (see [API 
docs](https://cloudstack.apache.org/api/apidocs-4.19/apis/listNetworkOfferings.html)).
 The first is used to filter network offerings that can only be used for 
creating VPC tiers; the second allows filtering by guest network type 
(available options are: `Isolated`, `Shared` and `L2`).
   
   This PR adds support to these parameters in the UI. The `forvpc` filter has 
been added as a normal filter (declared in the `filters` property of the 
network offerings section's object) and the `guestiptype` as a search filter 
(declared in the `searchFilters` property).
   
   Furthermore, this PR also fixes a bug that caused duplicate options to 
appear in search filter lists.
   
   ---
   
   Fixes #9924
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [X] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
![image](https://github.com/user-attachments/assets/9d790963-22c4-4a19-a6c1-80a8a1c88f83)
   
   
![image](https://github.com/user-attachments/assets/803e0f68-7c42-4b39-8bc6-f07f7a662263)
   
   ### How Has This Been Tested?
   
   ### `forvpc` filter tests
   
   - I checked that when selecting `VPC` on the section's filter, a request to 
`listNetworkOfferings` was sent, with the `forvpc` parameter set to `true`.
   - I checked that when selecting `Guest Network` on the section's filter, a 
request to `listNetworkOfferings` was sent, with the `forvpc` parameter set to 
`false`.
   - I checked that when selecting `All` on the section's filter, a request to 
`listNetworkOfferings` was sent, without the `forvpc` parameter.
   
   ### `guestiptype` filter tests
   
   - I checked that when selecting the `Isolated` option on the `Guest Type` 
search filter, a request to `listNetworkOfferings` was sent, with the 
`guestiptype` parameter set to `Isolated`.
   - I checked that when selecting the `Shared` option on the `Guest Type` 
search filter, a request to `listNetworkOfferings` was sent, with the 
`guestiptype` parameter set to `Shared`.
   - I checked that when selecting the `L2` option on the `Guest Type` search 
filter, a request to `listNetworkOfferings` was sent, with the `guestiptype` 
parameter set to `L2`.
   
   ### Duplicate options in search filter lists
   
   <details>
   <summary>Before</summary>
   
   
![image](https://github.com/user-attachments/assets/c0a4fa4e-ad0c-4506-94a4-22f64db93467)
   </details>
   
   <details>
   <summary>After</summary>
   
   
![image](https://github.com/user-attachments/assets/36d36828-d730-498a-aa51-3d017934ab02)
   </details>
   


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