Fix KeyError for NVP plugin during portbinding update
Add missing unit test coverage, that unveiled the issue. Closes-Bug: 1227247 Change-Id: I0d5a3b637d86308d82bf96bdb07928b19fd1b284
This commit is contained in:
parent
bff364fdbf
commit
9f7be67293
@ -1163,7 +1163,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
"%(tenant_id)s: (%(id)s)"), port_data)
|
"%(tenant_id)s: (%(id)s)"), port_data)
|
||||||
|
|
||||||
self._process_portbindings_create_and_update(context,
|
self._process_portbindings_create_and_update(context,
|
||||||
port, port_data)
|
port['port'],
|
||||||
|
port_data)
|
||||||
# DB Operation is complete, perform NVP operation
|
# DB Operation is complete, perform NVP operation
|
||||||
try:
|
try:
|
||||||
port_data = port['port'].copy()
|
port_data = port['port'].copy()
|
||||||
@ -1311,7 +1312,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
|
|
||||||
self._process_portbindings_create_and_update(context,
|
self._process_portbindings_create_and_update(context,
|
||||||
port['port'],
|
port['port'],
|
||||||
port)
|
ret_port)
|
||||||
return ret_port
|
return ret_port
|
||||||
|
|
||||||
def delete_port(self, context, id, l3_port_check=True,
|
def delete_port(self, context, id, l3_port_check=True,
|
||||||
|
@ -165,7 +165,8 @@ class TestNiciraProvidernet(NiciraPluginV2TestCase):
|
|||||||
|
|
||||||
class TestNiciraPortsV2(NiciraPluginV2TestCase,
|
class TestNiciraPortsV2(NiciraPluginV2TestCase,
|
||||||
test_plugin.TestPortsV2,
|
test_plugin.TestPortsV2,
|
||||||
test_bindings.PortBindingsTestCase):
|
test_bindings.PortBindingsTestCase,
|
||||||
|
test_bindings.PortBindingsHostTestCaseMixin):
|
||||||
|
|
||||||
VIF_TYPE = portbindings.VIF_TYPE_OVS
|
VIF_TYPE = portbindings.VIF_TYPE_OVS
|
||||||
HAS_PORT_FILTER = True
|
HAS_PORT_FILTER = True
|
||||||
|
Loading…
Reference in New Issue
Block a user