Don't wait for an event on a resize-revert
Since we never unplugged, the event ain't comin'. Sadly, the test that covers this was pretty wrong on multiple fronts, which this patch fixes up. Closes-Bug: #1450624 Change-Id: Id515137747a4b76e9b7057c95f80c8ae74017519
This commit is contained in:
parent
8a688009c8
commit
4814e9126e
nova
@ -11760,10 +11760,13 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
|
||||
def fake_plug_vifs(instance, network_info):
|
||||
pass
|
||||
|
||||
def fake_create_domain(xml, instance=None, launch_flags=0,
|
||||
power_on=True):
|
||||
def fake_create_domain(context, xml, instance, network_info,
|
||||
disk_info, block_device_info=None,
|
||||
power_on=None,
|
||||
vifs_already_plugged=None):
|
||||
self.fake_create_domain_called = True
|
||||
self.assertEqual(powered_on, power_on)
|
||||
self.assertTrue(vifs_already_plugged)
|
||||
return mock.MagicMock()
|
||||
|
||||
def fake_enable_hairpin(instance):
|
||||
@ -11785,7 +11788,7 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
|
||||
self.stubs.Set(utils, 'execute', fake_execute)
|
||||
fw = base_firewall.NoopFirewallDriver()
|
||||
self.stubs.Set(self.drvr, 'firewall_driver', fw)
|
||||
self.stubs.Set(self.drvr, '_create_domain',
|
||||
self.stubs.Set(self.drvr, '_create_domain_and_network',
|
||||
fake_create_domain)
|
||||
self.stubs.Set(self.drvr, '_enable_hairpin',
|
||||
fake_enable_hairpin)
|
||||
|
@ -6492,7 +6492,8 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
self._create_domain_and_network(context, xml, instance, network_info,
|
||||
disk_info,
|
||||
block_device_info=block_device_info,
|
||||
power_on=power_on)
|
||||
power_on=power_on,
|
||||
vifs_already_plugged=True)
|
||||
|
||||
if power_on:
|
||||
timer = loopingcall.FixedIntervalLoopingCall(
|
||||
|
Loading…
Reference in New Issue
Block a user