Raise exception for network delete with subnets presents
N1kv plugin should raise an exception during network delete
if there is a subnet that is tied to that network.
Also changed the order of the assert arguments since now
it's encoraged to have <expected_value, actual_value>.
PLEASE NOTE:
This is a port to icehouse branch. It looks like there are extra test
cases not relevant to the fix. However, they are need it because:
- the code I've commited in delete_network() changes the behavior and
it'll fail when we try to delete a network if there are subnets on it.
- hence all the test cases which tries to delete a network and don't
delete the subnets first, will fail.
- Hence ALL the test cases in test_db_plugin.py file which does that
(deleting the network without deleting the subnet first), needs to
be overriding and this is why you see all these test cases which
seems to not be related with the diffs in n1kv_neutron_plugin.py
file but they are actually very related.
Reviewed: https:/ /review. openstack. org/114429 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=534bfbc05e2 8edfb5907a53dc5 265086e1c609a4
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 534bfbc05e28edf b5907a53dc52650 86e1c609a4
Author: Marga Millet <email address hidden>
Date: Fri Aug 1 10:41:45 2014 -0700
Raise exception for network delete with subnets presents
N1kv plugin should raise an exception during network delete
if there is a subnet that is tied to that network.
Also changed the order of the assert arguments since now
it's encoraged to have <expected_value, actual_value>.
PLEASE NOTE: plugin. py
This is a port to icehouse branch. It looks like there are extra test
cases not relevant to the fix. However, they are need it because:
- the code I've commited in delete_network() changes the behavior and
it'll fail when we try to delete a network if there are subnets on it.
- hence all the test cases which tries to delete a network and don't
delete the subnets first, will fail.
- Hence ALL the test cases in test_db_plugin.py file which does that
(deleting the network without deleting the subnet first), needs to
be overriding and this is why you see all these test cases which
seems to not be related with the diffs in n1kv_neutron_
file but they are actually very related.
Conflicts: tests/unit/ cisco/n1kv/ test_n1kv_ plugin. py
neutron/
Closes-Bug: 1336107 d0b56d73ee11546 2f4acc9540) bc460e0d668989c e590b7d1cb2
(cherry picked from commit 89fb8b633b1ae34
Change-Id: I92f177af0e2a2f