]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
FWaaS - fix policy association of firewall rule
authorSumit Naiksatam <sumitnaiksatam@gmail.com>
Sat, 14 Sep 2013 20:38:08 +0000 (13:38 -0700)
committerSumit Naiksatam <sumitnaiksatam@gmail.com>
Sat, 14 Sep 2013 20:49:03 +0000 (13:49 -0700)
commit31f48f5cd3c616a7646adb3bea86338beea6a737
tree763c0e6042bccc3bdce16b1d3e79e82322c463f8
parentdb802972b804b38fc204578afc37b7f3855ac34d
FWaaS - fix policy association of firewall rule

If an existing firewall rule already associated with a
firewall policy is associated with a different firewall
policy, the new association should fail. The check for
the existing association was not being made, hence the
firewall rule was being removed from the older policy
and being associated with the newer policy (incorrect
behavior). This is being fixed here.

If the association with the newer policy has to be made
the rule should first be removed from the existing policy
association.

Change-Id: I30c41d77e7fde673f0dccbc98e1cd7bd0d7b384f
Closes-Bug: #1223465
neutron/db/firewall/firewall_db.py
neutron/tests/unit/db/firewall/test_db_firewall.py