Drop support for instance netboot
Change-Id: I2b4c543537dac8904028fdcdb590c1c214238e10
This commit is contained in:
		@@ -152,7 +152,6 @@ def _write_partition_image(image, image_info, device, configdrive=None):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    node_uuid = image_info.get('node_uuid')
 | 
					    node_uuid = image_info.get('node_uuid')
 | 
				
			||||||
    preserve_ep = image_info['preserve_ephemeral']
 | 
					    preserve_ep = image_info['preserve_ephemeral']
 | 
				
			||||||
    boot_option = image_info.get('boot_option', 'local')
 | 
					 | 
				
			||||||
    boot_mode = utils.get_node_boot_mode(cached_node)
 | 
					    boot_mode = utils.get_node_boot_mode(cached_node)
 | 
				
			||||||
    disk_label = utils.get_partition_table_type_from_specs(cached_node)
 | 
					    disk_label = utils.get_partition_table_type_from_specs(cached_node)
 | 
				
			||||||
    root_mb = image_info['root_mb']
 | 
					    root_mb = image_info['root_mb']
 | 
				
			||||||
@@ -175,7 +174,6 @@ def _write_partition_image(image, image_info, device, configdrive=None):
 | 
				
			|||||||
                                            image, node_uuid,
 | 
					                                            image, node_uuid,
 | 
				
			||||||
                                            preserve_ephemeral=preserve_ep,
 | 
					                                            preserve_ephemeral=preserve_ep,
 | 
				
			||||||
                                            configdrive=configdrive,
 | 
					                                            configdrive=configdrive,
 | 
				
			||||||
                                            boot_option=boot_option,
 | 
					 | 
				
			||||||
                                            boot_mode=boot_mode,
 | 
					                                            boot_mode=boot_mode,
 | 
				
			||||||
                                            disk_label=disk_label,
 | 
					                                            disk_label=disk_label,
 | 
				
			||||||
                                            cpu_arch=cpu_arch)
 | 
					                                            cpu_arch=cpu_arch)
 | 
				
			||||||
@@ -253,7 +251,6 @@ def _message_format(msg, image_info, device, partition_uuids):
 | 
				
			|||||||
    efi_system_partition_uuid = (
 | 
					    efi_system_partition_uuid = (
 | 
				
			||||||
        partition_uuids.get('efi system partition uuid'))
 | 
					        partition_uuids.get('efi system partition uuid'))
 | 
				
			||||||
    if (image_info.get('deploy_boot_mode') == 'uefi'
 | 
					    if (image_info.get('deploy_boot_mode') == 'uefi'
 | 
				
			||||||
            and image_info.get('boot_option') == 'local'
 | 
					 | 
				
			||||||
            and efi_system_partition_uuid):
 | 
					            and efi_system_partition_uuid):
 | 
				
			||||||
        result_msg = msg + 'root_uuid={} efi_system_partition_uuid={}'
 | 
					        result_msg = msg + 'root_uuid={} efi_system_partition_uuid={}'
 | 
				
			||||||
        message = result_msg.format(image_info['id'], device,
 | 
					        message = result_msg.format(image_info['id'], device,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -187,7 +187,7 @@ def get_labelled_partition(device_path, label, node_uuid):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
 | 
					def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
 | 
				
			||||||
                 image_path, node_uuid, preserve_ephemeral=False,
 | 
					                 image_path, node_uuid, preserve_ephemeral=False,
 | 
				
			||||||
                 configdrive=None, boot_option="netboot", boot_mode="bios",
 | 
					                 configdrive=None, boot_mode="bios",
 | 
				
			||||||
                 tempdir=None, disk_label=None, cpu_arch="", conv_flags=None):
 | 
					                 tempdir=None, disk_label=None, cpu_arch="", conv_flags=None):
 | 
				
			||||||
    """Create partitions and copy an image to the root partition.
 | 
					    """Create partitions and copy an image to the root partition.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -206,7 +206,6 @@ def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
 | 
				
			|||||||
        partition table has not changed).
 | 
					        partition table has not changed).
 | 
				
			||||||
    :param configdrive: Optional. Base64 encoded Gzipped configdrive content
 | 
					    :param configdrive: Optional. Base64 encoded Gzipped configdrive content
 | 
				
			||||||
                        or configdrive HTTP URL.
 | 
					                        or configdrive HTTP URL.
 | 
				
			||||||
    :param boot_option: Can be "local" or "netboot". "netboot" by default.
 | 
					 | 
				
			||||||
    :param boot_mode: Can be "bios" or "uefi". "bios" by default.
 | 
					    :param boot_mode: Can be "bios" or "uefi". "bios" by default.
 | 
				
			||||||
    :param tempdir: A temporary directory
 | 
					    :param tempdir: A temporary directory
 | 
				
			||||||
    :param disk_label: The disk label to be used when creating the
 | 
					    :param disk_label: The disk label to be used when creating the
 | 
				
			||||||
@@ -248,7 +247,7 @@ def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
 | 
				
			|||||||
                                               root_mb, swap_mb, ephemeral_mb,
 | 
					                                               root_mb, swap_mb, ephemeral_mb,
 | 
				
			||||||
                                               configdrive_mb, node_uuid,
 | 
					                                               configdrive_mb, node_uuid,
 | 
				
			||||||
                                               commit=commit,
 | 
					                                               commit=commit,
 | 
				
			||||||
                                               boot_option=boot_option,
 | 
					                                               boot_option='local',
 | 
				
			||||||
                                               boot_mode=boot_mode,
 | 
					                                               boot_mode=boot_mode,
 | 
				
			||||||
                                               disk_label=disk_label,
 | 
					                                               disk_label=disk_label,
 | 
				
			||||||
                                               cpu_arch=cpu_arch)
 | 
					                                               cpu_arch=cpu_arch)
 | 
				
			||||||
@@ -278,7 +277,7 @@ def work_on_disk(dev, root_mb, swap_mb, ephemeral_mb, ephemeral_format,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # If it's a uefi localboot, then we have created the efi system
 | 
					        # If it's a uefi localboot, then we have created the efi system
 | 
				
			||||||
        # partition.  Create a fat filesystem on it.
 | 
					        # partition.  Create a fat filesystem on it.
 | 
				
			||||||
        if boot_mode == "uefi" and boot_option == "local":
 | 
					        if boot_mode == "uefi":
 | 
				
			||||||
            efi_system_part = part_dict.get('efi system partition')
 | 
					            efi_system_part = part_dict.get('efi system partition')
 | 
				
			||||||
            utils.mkfs(fs='vfat', path=efi_system_part, label='efi-part')
 | 
					            utils.mkfs(fs='vfat', path=efi_system_part, label='efi-part')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,7 +53,6 @@ def _build_fake_partition_image_info():
 | 
				
			|||||||
        'ephemeral_format': 'abc',
 | 
					        'ephemeral_format': 'abc',
 | 
				
			||||||
        'preserve_ephemeral': 'False',
 | 
					        'preserve_ephemeral': 'False',
 | 
				
			||||||
        'image_type': 'partition',
 | 
					        'image_type': 'partition',
 | 
				
			||||||
        'boot_option': 'netboot',
 | 
					 | 
				
			||||||
        'disk_label': 'msdos',
 | 
					        'disk_label': 'msdos',
 | 
				
			||||||
        'deploy_boot_mode': 'bios'}
 | 
					        'deploy_boot_mode': 'bios'}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -234,7 +233,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
        node_uuid = image_info['node_uuid']
 | 
					        node_uuid = image_info['node_uuid']
 | 
				
			||||||
        pr_ep = image_info['preserve_ephemeral']
 | 
					        pr_ep = image_info['preserve_ephemeral']
 | 
				
			||||||
        boot_mode = image_info['deploy_boot_mode']
 | 
					        boot_mode = image_info['deploy_boot_mode']
 | 
				
			||||||
        boot_option = image_info['boot_option']
 | 
					 | 
				
			||||||
        disk_label = image_info['disk_label']
 | 
					        disk_label = image_info['disk_label']
 | 
				
			||||||
        cpu_arch = self.fake_cpu.architecture
 | 
					        cpu_arch = self.fake_cpu.architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -257,7 +255,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
                                                  configdrive='configdrive',
 | 
					                                                  configdrive='configdrive',
 | 
				
			||||||
                                                  preserve_ephemeral=pr_ep,
 | 
					                                                  preserve_ephemeral=pr_ep,
 | 
				
			||||||
                                                  boot_mode=boot_mode,
 | 
					                                                  boot_mode=boot_mode,
 | 
				
			||||||
                                                  boot_option=boot_option,
 | 
					 | 
				
			||||||
                                                  disk_label=disk_label,
 | 
					                                                  disk_label=disk_label,
 | 
				
			||||||
                                                  cpu_arch=cpu_arch)
 | 
					                                                  cpu_arch=cpu_arch)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -281,7 +278,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
        node_uuid = image_info['node_uuid']
 | 
					        node_uuid = image_info['node_uuid']
 | 
				
			||||||
        pr_ep = image_info['preserve_ephemeral']
 | 
					        pr_ep = image_info['preserve_ephemeral']
 | 
				
			||||||
        boot_mode = image_info['deploy_boot_mode']
 | 
					        boot_mode = image_info['deploy_boot_mode']
 | 
				
			||||||
        boot_option = image_info['boot_option']
 | 
					 | 
				
			||||||
        disk_label = image_info['disk_label']
 | 
					        disk_label = image_info['disk_label']
 | 
				
			||||||
        cpu_arch = self.fake_cpu.architecture
 | 
					        cpu_arch = self.fake_cpu.architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -304,7 +300,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
                                                  configdrive='configdrive',
 | 
					                                                  configdrive='configdrive',
 | 
				
			||||||
                                                  preserve_ephemeral=pr_ep,
 | 
					                                                  preserve_ephemeral=pr_ep,
 | 
				
			||||||
                                                  boot_mode=boot_mode,
 | 
					                                                  boot_mode=boot_mode,
 | 
				
			||||||
                                                  boot_option=boot_option,
 | 
					 | 
				
			||||||
                                                  disk_label=disk_label,
 | 
					                                                  disk_label=disk_label,
 | 
				
			||||||
                                                  cpu_arch=cpu_arch)
 | 
					                                                  cpu_arch=cpu_arch)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -353,7 +348,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
        node_uuid = image_info['node_uuid']
 | 
					        node_uuid = image_info['node_uuid']
 | 
				
			||||||
        pr_ep = image_info['preserve_ephemeral']
 | 
					        pr_ep = image_info['preserve_ephemeral']
 | 
				
			||||||
        boot_mode = image_info['deploy_boot_mode']
 | 
					        boot_mode = image_info['deploy_boot_mode']
 | 
				
			||||||
        boot_option = image_info['boot_option']
 | 
					 | 
				
			||||||
        disk_label = image_info['disk_label']
 | 
					        disk_label = image_info['disk_label']
 | 
				
			||||||
        cpu_arch = self.fake_cpu.architecture
 | 
					        cpu_arch = self.fake_cpu.architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -374,7 +368,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
                                                  configdrive='configdrive',
 | 
					                                                  configdrive='configdrive',
 | 
				
			||||||
                                                  preserve_ephemeral=pr_ep,
 | 
					                                                  preserve_ephemeral=pr_ep,
 | 
				
			||||||
                                                  boot_mode=boot_mode,
 | 
					                                                  boot_mode=boot_mode,
 | 
				
			||||||
                                                  boot_option=boot_option,
 | 
					 | 
				
			||||||
                                                  disk_label=disk_label,
 | 
					                                                  disk_label=disk_label,
 | 
				
			||||||
                                                  cpu_arch=cpu_arch)
 | 
					                                                  cpu_arch=cpu_arch)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1346,24 +1339,9 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
                        '/dev/fake root_uuid=root_uuid')
 | 
					                        '/dev/fake root_uuid=root_uuid')
 | 
				
			||||||
        self.assertEqual(expected_msg, result_msg)
 | 
					        self.assertEqual(expected_msg, result_msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test__message_format_partition_uefi_netboot(self):
 | 
					    def test__message_format_partition_uefi(self):
 | 
				
			||||||
        image_info = _build_fake_partition_image_info()
 | 
					        image_info = _build_fake_partition_image_info()
 | 
				
			||||||
        image_info['deploy_boot_mode'] = 'uefi'
 | 
					        image_info['deploy_boot_mode'] = 'uefi'
 | 
				
			||||||
        image_info['boot_option'] = 'netboot'
 | 
					 | 
				
			||||||
        msg = ('image ({}) already present on device {} ')
 | 
					 | 
				
			||||||
        device = '/dev/fake'
 | 
					 | 
				
			||||||
        partition_uuids = {'root uuid': 'root_uuid',
 | 
					 | 
				
			||||||
                           'efi system partition uuid': None}
 | 
					 | 
				
			||||||
        result_msg = standby._message_format(msg, image_info,
 | 
					 | 
				
			||||||
                                             device, partition_uuids)
 | 
					 | 
				
			||||||
        expected_msg = ('image (fake_id) already present on device '
 | 
					 | 
				
			||||||
                        '/dev/fake root_uuid=root_uuid')
 | 
					 | 
				
			||||||
        self.assertEqual(expected_msg, result_msg)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def test__message_format_partition_uefi_localboot(self):
 | 
					 | 
				
			||||||
        image_info = _build_fake_partition_image_info()
 | 
					 | 
				
			||||||
        image_info['deploy_boot_mode'] = 'uefi'
 | 
					 | 
				
			||||||
        image_info['boot_option'] = 'local'
 | 
					 | 
				
			||||||
        msg = ('image ({}) already present on device {} ')
 | 
					        msg = ('image ({}) already present on device {} ')
 | 
				
			||||||
        device = '/dev/fake'
 | 
					        device = '/dev/fake'
 | 
				
			||||||
        partition_uuids = {'root uuid': 'root_uuid',
 | 
					        partition_uuids = {'root uuid': 'root_uuid',
 | 
				
			||||||
@@ -1430,7 +1408,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
        ephemeral_format = image_info['ephemeral_format']
 | 
					        ephemeral_format = image_info['ephemeral_format']
 | 
				
			||||||
        node_uuid = image_info['node_uuid']
 | 
					        node_uuid = image_info['node_uuid']
 | 
				
			||||||
        pr_ep = image_info['preserve_ephemeral']
 | 
					        pr_ep = image_info['preserve_ephemeral']
 | 
				
			||||||
        boot_option = image_info['boot_option']
 | 
					 | 
				
			||||||
        cpu_arch = self.fake_cpu.architecture
 | 
					        cpu_arch = self.fake_cpu.architecture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        image_path = standby._image_location(image_info)
 | 
					        image_path = standby._image_location(image_info)
 | 
				
			||||||
@@ -1452,7 +1429,6 @@ class TestStandbyExtension(base.IronicAgentTest):
 | 
				
			|||||||
                                                  configdrive='configdrive',
 | 
					                                                  configdrive='configdrive',
 | 
				
			||||||
                                                  preserve_ephemeral=pr_ep,
 | 
					                                                  preserve_ephemeral=pr_ep,
 | 
				
			||||||
                                                  boot_mode='uefi',
 | 
					                                                  boot_mode='uefi',
 | 
				
			||||||
                                                  boot_option=boot_option,
 | 
					 | 
				
			||||||
                                                  disk_label='gpt',
 | 
					                                                  disk_label='gpt',
 | 
				
			||||||
                                                  cpu_arch=cpu_arch)
 | 
					                                                  cpu_arch=cpu_arch)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -321,7 +321,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, self.ephemeral_mb,
 | 
					                                             self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=True,
 | 
					                                             self.node_uuid, commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -340,7 +340,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, self.ephemeral_mb,
 | 
					                                             self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=True,
 | 
					                                             self.node_uuid, commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -368,7 +368,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, ephemeral_mb,
 | 
					                                             self.swap_mb, ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=True,
 | 
					                                             self.node_uuid, commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -395,14 +395,13 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                          self.swap_mb, self.ephemeral_mb,
 | 
					                          self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                          self.ephemeral_format, self.image_path,
 | 
					                          self.ephemeral_format, self.image_path,
 | 
				
			||||||
                          self.node_uuid, preserve_ephemeral=False,
 | 
					                          self.node_uuid, preserve_ephemeral=False,
 | 
				
			||||||
                          configdrive=configdrive_url,
 | 
					                          configdrive=configdrive_url)
 | 
				
			||||||
                          boot_option="netboot")
 | 
					 | 
				
			||||||
        self.assertEqual(self.mock_ibd.call_args_list, calls)
 | 
					        self.assertEqual(self.mock_ibd.call_args_list, calls)
 | 
				
			||||||
        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
					        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
				
			||||||
                                             self.swap_mb, self.ephemeral_mb,
 | 
					                                             self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                                             configdrive_mb, self.node_uuid,
 | 
					                                             configdrive_mb, self.node_uuid,
 | 
				
			||||||
                                             commit=True,
 | 
					                                             commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -436,7 +435,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, ephemeral_mb,
 | 
					                                             self.swap_mb, ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=True,
 | 
					                                             self.node_uuid, commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -474,7 +473,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, ephemeral_mb,
 | 
					                                             self.swap_mb, ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=True,
 | 
					                                             self.node_uuid, commit=True,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label='gpt',
 | 
					                                             disk_label='gpt',
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -483,8 +482,8 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
    @mock.patch.object(disk_utils, 'block_uuid', autospec=True)
 | 
					    @mock.patch.object(disk_utils, 'block_uuid', autospec=True)
 | 
				
			||||||
    @mock.patch.object(disk_utils, 'populate_image', autospec=True)
 | 
					    @mock.patch.object(disk_utils, 'populate_image', autospec=True)
 | 
				
			||||||
    @mock.patch.object(utils, 'mkfs', autospec=True)
 | 
					    @mock.patch.object(utils, 'mkfs', autospec=True)
 | 
				
			||||||
    def test_uefi_localboot(self, mock_mkfs, mock_populate_image,
 | 
					    def test_uefi(self, mock_mkfs, mock_populate_image,
 | 
				
			||||||
                            mock_block_uuid, mock_trigger_device_rescan):
 | 
					                  mock_block_uuid, mock_trigger_device_rescan):
 | 
				
			||||||
        """Test that we create a fat filesystem with UEFI localboot."""
 | 
					        """Test that we create a fat filesystem with UEFI localboot."""
 | 
				
			||||||
        root_part = '/dev/fake-part1'
 | 
					        root_part = '/dev/fake-part1'
 | 
				
			||||||
        efi_part = '/dev/fake-part2'
 | 
					        efi_part = '/dev/fake-part2'
 | 
				
			||||||
@@ -498,7 +497,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                     self.swap_mb, self.ephemeral_mb,
 | 
					                                     self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                                     self.ephemeral_format,
 | 
					                                     self.ephemeral_format,
 | 
				
			||||||
                                     self.image_path, self.node_uuid,
 | 
					                                     self.image_path, self.node_uuid,
 | 
				
			||||||
                                     boot_option="local", boot_mode="uefi")
 | 
					                                     boot_mode="uefi")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
					        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
				
			||||||
                                             self.swap_mb, self.ephemeral_mb,
 | 
					                                             self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
@@ -544,7 +543,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
                                             self.swap_mb, ephemeral_mb,
 | 
					                                             self.swap_mb, ephemeral_mb,
 | 
				
			||||||
                                             self.configdrive_mb,
 | 
					                                             self.configdrive_mb,
 | 
				
			||||||
                                             self.node_uuid, commit=False,
 | 
					                                             self.node_uuid, commit=False,
 | 
				
			||||||
                                             boot_option="netboot",
 | 
					                                             boot_option="local",
 | 
				
			||||||
                                             boot_mode="bios",
 | 
					                                             boot_mode="bios",
 | 
				
			||||||
                                             disk_label=None,
 | 
					                                             disk_label=None,
 | 
				
			||||||
                                             cpu_arch="")
 | 
					                                             cpu_arch="")
 | 
				
			||||||
@@ -568,8 +567,7 @@ class WorkOnDiskTestCase(base.IronicAgentTest):
 | 
				
			|||||||
        partition_utils.work_on_disk(self.dev, self.root_mb,
 | 
					        partition_utils.work_on_disk(self.dev, self.root_mb,
 | 
				
			||||||
                                     self.swap_mb, self.ephemeral_mb,
 | 
					                                     self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
                                     self.ephemeral_format, self.image_path,
 | 
					                                     self.ephemeral_format, self.image_path,
 | 
				
			||||||
                                     self.node_uuid, boot_option="local",
 | 
					                                     self.node_uuid, cpu_arch='ppc64le')
 | 
				
			||||||
                                     cpu_arch='ppc64le')
 | 
					 | 
				
			||||||
        self.assertEqual(self.mock_ibd.call_args_list, calls)
 | 
					        self.assertEqual(self.mock_ibd.call_args_list, calls)
 | 
				
			||||||
        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
					        self.mock_mp.assert_called_once_with(self.dev, self.root_mb,
 | 
				
			||||||
                                             self.swap_mb, self.ephemeral_mb,
 | 
					                                             self.swap_mb, self.ephemeral_mb,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								releasenotes/notes/no-netboot-d034bb1d1d9166c5.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								releasenotes/notes/no-netboot-d034bb1d1d9166c5.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					upgrade:
 | 
				
			||||||
 | 
					  - |
 | 
				
			||||||
 | 
					    No longer supports network boot of instances (``boot_option=netboot``).
 | 
				
			||||||
 | 
					    This feature is dropped from Ironic in the Zed cycle.
 | 
				
			||||||
@@ -39,7 +39,6 @@
 | 
				
			|||||||
        s-proxy: True
 | 
					        s-proxy: True
 | 
				
			||||||
      devstack_localrc:
 | 
					      devstack_localrc:
 | 
				
			||||||
        IRONIC_BOOT_MODE: bios
 | 
					        IRONIC_BOOT_MODE: bios
 | 
				
			||||||
        IRONIC_DEFAULT_BOOT_OPTION: netboot
 | 
					 | 
				
			||||||
        IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
 | 
					        IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
 | 
				
			||||||
        SWIFT_ENABLE_TEMPURLS: True
 | 
					        SWIFT_ENABLE_TEMPURLS: True
 | 
				
			||||||
        SWIFT_TEMPURL_KEY: secretkey
 | 
					        SWIFT_TEMPURL_KEY: secretkey
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user