Merge "Fix bugs on booting a server from volume like "Change #312845""
This commit is contained in:
commit
38d54ec730
@ -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)
|
||||
|
@ -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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user