JoaoJandre opened a new pull request #5867: URL: https://github.com/apache/cloudstack/pull/5867
### Description When creating a new firewall egress rule, the source and destination CIDRs are considered invalid if they begin or end with a white space, which might happen if the user copy and pastes the CIDRs from somewhere else. This PR aims to remove/clean white spaces from CIDRs, thus making the user experience more fluid. The proposed change is to trim the CIDRs before checking if they are valid. I extracted the CIDR validation method and also created unit tests for it. ### 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) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [X] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [X] Trivial ### How Has This Been Tested? - New unit tests were created to test the behavior of the new method. - It was also tested in a local lab, by creating new firewall egress rules and inputting source and destination CIDRs with leading or ending with whitespaces. -- 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]
