<div dir="ltr"><div>In file [1] in `class AddRule` in method `_clean_rule_icmp` why checkups are performed on if `icmp_type` or `icmp_code` is `None` or in range of `-1 to 255`.</div><div><br></div><div>What I mean here is that in `class AddRule` while values are being accepted from form data and being stored, validators do their job of checking whether that field is valid, so why a redundant checkup in method `_clean_rule_icmp`?</div><div><br></div><div>Please correct me if I am wrong in understanding anything. Currently I am working on the Bug #1511748 [2]. Previously while checking the validity of `icmp_type` and `icmp_code`, the functionality of tcp_ports was used. This is wrong because, TCP ports have a range of 0 to 65535 while `icmp_type` and `icmp_code` have a range of 0 to 255.</div><div><br></div><div>So now oslo_utils.netutils has dedicated functionality to check if `icmp_type` and `icmp_code` are valid here is a recent code merger [3]. </div><div><br></div><div>So I was trying to add this newly added functionality into Horizon but the test cases run older code and hence needed help in getting my head around with the source.</div><div><br></div><div><br></div><div>[1] openstack_dashboard/dashboards/project/access_and_security/security_groups/forms.py</div><div>[2] <a href="https://bugs.launchpad.net/horizon/+bug/1511748">https://bugs.launchpad.net/horizon/+bug/1511748</a></div><div>[3] <a href="https://review.openstack.org/#/c/240661/">https://review.openstack.org/#/c/240661/</a></div><div><br></div><div>Thanks and Regards</div></div>