erikbocks opened a new pull request, #10983: URL: https://github.com/apache/cloudstack/pull/10983
### Description This PR fixes and enhances the validation of the values inserted in the VLAN/VNI field when configuring a new zone. Currently, it only checks if any of the fields are empty and if the range start value is greater than the range end value. Thus, it is possible to insert invalid values, as negatives. With the PR changes, now the field validates if: any of the values is negative, any of the fields is empty or if the inserted values are inside the isolation method max and min values. The maximum and minimum values are now defined based on the selected isolation method (isolation method limits used can be find in the `NetworkServiceImpl` class). This PR also fixes a minor graphical issue, where the field displayed a red check icon, instead of a red error icon. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) <!-- seria bug fix? --> - [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 ### Screenshots (if appropriate): Before the changes:  After the changes:  ### How Has This Been Tested? 1. Simulated the creation of a new zone, then validated the fix with the following tests: <details><summary>VLAN</summary> | Test | Start | End | Valid | |:---------------:|:------:|:----:|:----------:| | Empty | Null | Null | False | | Negative value | -10 | 100 | False | | Equal | 100 | 100 | False | | Start > End | 100 | 10 | False | | End > Limit | 1 | 4096 | False | | Start < Limit | 0 | 100 | False | | Valid | 1 | 100 | True | </details> <details><summary>VXLAN</summary> | Test | Start | End | Valid | |:---------------:|:------:|:--------:|:----------:| | Empty | Null | Null | False | | Negative value | -4090 | 4100 | False | | Equal | 4096 | 4096 | False | | Start > End | 4100 | 4096 | False | | End > Limit | 4096 | 16777215 | False | | Start < Limit | 4095 | 4100 | False | | Valid | 4096 | 4100 | True | </details> <details><summary>GRE</summary> | Test | Start | End | Valid | |:---------------:|:------:|:----------:|:----------:| | Empty | Null | Null | False | | Negative value | -10 | 100 | False | | Equal | 100 | 100 | False | | Start > End | 100 | 99 | False | | End > Limit | 1 | 4294967296 | False | | Start < Limit | -1 | 100 | False | | Valid | 1 | 4000 | True | </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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org