]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
NSX: Optionally not enforce nat rule match length check
authorSalvatore Orlando <salv.orlando@gmail.com>
Mon, 9 Jun 2014 16:53:47 +0000 (09:53 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 14 Jul 2014 10:52:39 +0000 (03:52 -0700)
commit138d9774000335d66c335e036ea96dac7b4a4799
treec30e258e84f712031f9b8ff0699885d52006da56
parent59da928e945ec58836d34fd561d30a8a446e2728
NSX: Optionally not enforce nat rule match length check

This patch adds the 'raise_on_len_mismatch' parameter to the
'delete_nat_rules_by_match' function. The plugin then leverages
this parameter for ensuring NAT rules deletion operations
are completed successfully even when duplicate rules are found
or no corresponding rules are found at all.

With this change, the 'remove_router_interface' operation will
correctly complete even in cases when NAT rules in Neutron and
the NSX backend are out of sync.

This patch also changes a check in delete_nat_rules_by_match in
order to make it less expensive.

Closes-Bug: 1328181

Change-Id: I856d67ef5ff6264374cb8f2569668da4c205ad9f
neutron/plugins/vmware/nsxlib/router.py
neutron/plugins/vmware/plugins/base.py
neutron/tests/unit/vmware/nsxlib/test_router.py
neutron/tests/unit/vmware/test_nsx_plugin.py