]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Check port value when creating firewall rule with icmp protocol
authorElena Ezhova <eezhova@mirantis.com>
Wed, 11 Jun 2014 13:25:40 +0000 (17:25 +0400)
committerElena Ezhova <eezhova@mirantis.com>
Wed, 18 Jun 2014 08:51:30 +0000 (12:51 +0400)
commitb2a6e558d82f22623e439b8c0380f05afc778f6c
tree046ce49195c5447ddb63729f4c17311cd59457ef
parentff9173ede242d5ce59530221398c7aaa81db2758
Check port value when creating firewall rule with icmp protocol

If a firewall rule was created with setting protocol as icmp
and using source/destination port no error was thrown, even though
source/destination port parameters are not used by icmp.

This patch adds a validation method that checks passed parameters
and throws an exception if they are incompatible.

Change-Id: I90a765856896395fcb6e9ddbd888b7bd80480674
Closes-Bug: 1327955
neutron/db/firewall/firewall_db.py
neutron/extensions/firewall.py
neutron/tests/unit/db/firewall/test_db_firewall.py