Merge "Fix bugs on booting a server from volume like "Change #312845""

This commit is contained in:
Jenkins 2016-05-13 03:33:30 +00:00 committed by Gerrit Code Review
commit 38d54ec730
2 changed files with 6 additions and 6 deletions

View File

@ -154,7 +154,7 @@ class NovaServers(utils.NovaScenario,
"""
volume = self._create_volume(volume_size, imageRef=image)
block_device_mapping = {"vda": "%s:::1" % volume.id}
server = self._boot_server(image, flavor,
server = self._boot_server(None, flavor,
block_device_mapping=block_device_mapping,
**kwargs)
self.sleep_between(min_sleep, max_sleep)
@ -531,7 +531,7 @@ class NovaServers(utils.NovaScenario,
boot_server_kwargs["block_device_mapping"] = {
"vda": "%s:::1" % volume.id}
server = self._boot_server(image, flavor, **boot_server_kwargs)
server = self._boot_server(None, flavor, **boot_server_kwargs)
self.sleep_between(min_sleep, max_sleep)
self._resize(server, to_flavor)
@ -678,7 +678,7 @@ class NovaServers(utils.NovaScenario,
"""
volume = self._create_volume(volume_size, imageRef=image)
block_device_mapping = {"vda": "%s:::1" % volume.id}
server = self._boot_server(image, flavor,
server = self._boot_server(None, flavor,
block_device_mapping=block_device_mapping,
**kwargs)
self.sleep_between(min_sleep, max_sleep)

View File

@ -356,7 +356,7 @@ class NovaServersTestCase(test.ScenarioTestCase):
scenario._create_volume.assert_called_once_with(5, imageRef="img")
scenario._boot_server.assert_called_once_with(
"img", 0,
None, 0,
block_device_mapping={"vda": "volume_id:::1"},
fakearg="f")
scenario.sleep_between.assert_called_once_with(10, 20)
@ -528,7 +528,7 @@ class NovaServersTestCase(test.ScenarioTestCase):
scenario._create_volume.assert_called_once_with(10, imageRef="img")
scenario._boot_server.assert_called_once_with(
"img", flavor,
None, flavor,
block_device_mapping={"vda": "volume_id:::1"})
scenario.sleep_between.assert_called_once_with(10, 20)
scenario._resize.assert_called_once_with(fake_server, to_flavor)
@ -593,7 +593,7 @@ class NovaServersTestCase(test.ScenarioTestCase):
scenario._create_volume.assert_called_once_with(5, imageRef="img")
scenario._boot_server.assert_called_once_with(
"img", 0,
None, 0,
block_device_mapping={"vda": "volume_id:::1"},
fakearg="f")