diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py index 942bd92da5..3f5e9e3338 100644 --- a/ironic/common/pxe_utils.py +++ b/ironic/common/pxe_utils.py @@ -93,11 +93,6 @@ def _link_mac_pxe_configs(task): pxe_config_file_path = get_pxe_config_file_path(task.node.uuid) for mac in driver_utils.get_node_mac_addresses(task): create_link(_get_pxe_mac_path(mac)) - # TODO(lucasagomes): Backward compatibility with :hexraw, - # to be removed in Mitaka. - # see: https://bugs.launchpad.net/ironic/+bug/1441710 - if CONF.pxe.ipxe_enabled: - create_link(_get_pxe_mac_path(mac, delimiter='')) def _link_ip_address_pxe_configs(task, hex_form): @@ -128,7 +123,7 @@ def _link_ip_address_pxe_configs(task, hex_form): ip_address_path) -def _get_pxe_mac_path(mac, delimiter=None): +def _get_pxe_mac_path(mac, delimiter='-'): """Convert a MAC address into a PXE config file name. :param mac: A MAC address string in the format xx:xx:xx:xx:xx:xx. @@ -136,9 +131,6 @@ def _get_pxe_mac_path(mac, delimiter=None): :returns: the path to the config file. """ - if delimiter is None: - delimiter = '-' - mac_file_name = mac.replace(':', delimiter).lower() if not CONF.pxe.ipxe_enabled: mac_file_name = '01-' + mac_file_name @@ -283,12 +275,6 @@ def clean_up_pxe_config(task): else: for mac in driver_utils.get_node_mac_addresses(task): ironic_utils.unlink_without_raise(_get_pxe_mac_path(mac)) - # TODO(lucasagomes): Backward compatibility with :hexraw, - # to be removed in Mitaka. - # see: https://bugs.launchpad.net/ironic/+bug/1441710 - if CONF.pxe.ipxe_enabled: - ironic_utils.unlink_without_raise(_get_pxe_mac_path(mac, - delimiter='')) utils.rmtree_without_raise(os.path.join(get_root_dir(), task.node.uuid)) diff --git a/ironic/tests/unit/common/test_pxe_utils.py b/ironic/tests/unit/common/test_pxe_utils.py index 634937d96f..cf6dcbebed 100644 --- a/ironic/tests/unit/common/test_pxe_utils.py +++ b/ironic/tests/unit/common/test_pxe_utils.py @@ -237,18 +237,12 @@ class TestPXEUtils(db_base.DbTestCase): create_link_calls = [ mock.call(u'../1be26c0b-03f2-4d2e-ae87-c02d7f33c123/config', '/httpboot/pxelinux.cfg/00-11-22-33-44-55-66'), - mock.call(u'../1be26c0b-03f2-4d2e-ae87-c02d7f33c123/config', - '/httpboot/pxelinux.cfg/00112233445566'), mock.call(u'../1be26c0b-03f2-4d2e-ae87-c02d7f33c123/config', '/httpboot/pxelinux.cfg/00-11-22-33-44-55-67'), - mock.call(u'../1be26c0b-03f2-4d2e-ae87-c02d7f33c123/config', - '/httpboot/pxelinux.cfg/00112233445567'), ] unlink_calls = [ mock.call('/httpboot/pxelinux.cfg/00-11-22-33-44-55-66'), - mock.call('/httpboot/pxelinux.cfg/00112233445566'), mock.call('/httpboot/pxelinux.cfg/00-11-22-33-44-55-67'), - mock.call('/httpboot/pxelinux.cfg/00112233445567'), ] with task_manager.acquire(self.context, self.node.uuid) as task: pxe_utils._link_mac_pxe_configs(task) @@ -614,10 +608,7 @@ class TestPXEUtils(db_base.DbTestCase): task.node.properties = properties pxe_utils.clean_up_pxe_config(task) - unlink_calls = [ - mock.call('/httpboot/pxelinux.cfg/aa-aa-aa-aa-aa-aa'), - mock.call('/httpboot/pxelinux.cfg/aaaaaaaaaaaa') - ] - unlink_mock.assert_has_calls(unlink_calls) + unlink_mock.assert_called_once_with( + '/httpboot/pxelinux.cfg/aa-aa-aa-aa-aa-aa') rmtree_mock.assert_called_once_with( os.path.join(CONF.deploy.http_root, self.node.uuid)) diff --git a/releasenotes/notes/hexraw-support-removed-8e8fa07595a629f4.yaml b/releasenotes/notes/hexraw-support-removed-8e8fa07595a629f4.yaml new file mode 100644 index 0000000000..59c2a4e922 --- /dev/null +++ b/releasenotes/notes/hexraw-support-removed-8e8fa07595a629f4.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - Removes support for "hexraw" type in the iPXE script + (boot.ipxe) since "hexraw" is not supported in older + versions of iPXE. "hexhyp" replaced "hexraw" and has + been used since kilo.