Merge "Address comments on I5cc41932acd75cf5e9e5b626285331f97126932e"
This commit is contained in:
commit
dbc4834566
@ -449,6 +449,7 @@ def build_deploy_ramdisk_options(node):
|
||||
|
||||
# XXX(jroll) DIB relies on boot_option=local to decide whether or not to
|
||||
# lay down a bootloader. Hack this for now; fix it for real in Liberty.
|
||||
# See also bug #1441556.
|
||||
boot_option = get_boot_option(node)
|
||||
if node.driver_internal_info.get('is_whole_disk_image'):
|
||||
boot_option = 'netboot'
|
||||
|
@ -487,8 +487,8 @@ class IscsiDeployMethodsTestCase(db_base.DbTestCase):
|
||||
self._test_build_deploy_ramdisk_options(mock_alnum, fake_api_url,
|
||||
expected_boot_option=expected)
|
||||
|
||||
@mock.patch.object(keystone, 'get_service_url')
|
||||
@mock.patch.object(utils, 'random_alnum')
|
||||
@mock.patch.object(keystone, 'get_service_url', autospec=True)
|
||||
@mock.patch.object(utils, 'random_alnum', autospec=True)
|
||||
def test_build_deploy_ramdisk_options_whole_disk_image(self, mock_alnum,
|
||||
mock_get_url):
|
||||
"""Tests a hack to boot_option for whole disk images.
|
||||
@ -499,6 +499,7 @@ class IscsiDeployMethodsTestCase(db_base.DbTestCase):
|
||||
dii = self.node.driver_internal_info
|
||||
dii['is_whole_disk_image'] = True
|
||||
self.node.driver_internal_info = dii
|
||||
self.node.save()
|
||||
expected = 'netboot'
|
||||
fake_api_url = 'http://127.0.0.1:6385'
|
||||
self.config(api_url=fake_api_url, group='conductor')
|
||||
|
Loading…
x
Reference in New Issue
Block a user