Fix detach_interface() call from external event handler

The signature for VirtDriver.detach_interface() changed recently in
41591c9456, but the call from the
external event handler was not updated. This does that.

Change-Id: I560920ed521f09909d91bb0aac42bf97447475b0
Closes-Bug: #1642681
This commit is contained in:
Dan Smith 2016-11-17 09:59:32 -08:00
parent 4361de1073
commit 383e795a5e
2 changed files with 5 additions and 3 deletions

View File

@ -6721,7 +6721,7 @@ class ComputeManager(manager.Manager):
instance,
nw_info=network_info)
try:
self.driver.detach_interface(instance, vif)
self.driver.detach_interface(context, instance, vif)
except exception.NovaException as ex:
LOG.warning(_LW("Detach interface failed, "
"port_id=%(port_id)s, reason: %(msg)s"),

View File

@ -2175,7 +2175,8 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
self.context,
inst_obj,
nw_info=[vif1])
detach_interface.assert_called_once_with(inst_obj, vif2)
detach_interface.assert_called_once_with(self.context,
inst_obj, vif2)
do_test()
def test_external_instance_event(self):
@ -2254,7 +2255,8 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
self.context,
instances[1],
nw_info=[vif1])
detach_interface.assert_called_once_with(instances[1], vif2)
detach_interface.assert_called_once_with(self.context,
instances[1], vif2)
_process_instance_event.assert_called_once_with(instances[2],
events[2])
do_test()