diff options
Diffstat (limited to 'ironic/tests/unit/common/test_pxe_utils.py')
-rw-r--r-- | ironic/tests/unit/common/test_pxe_utils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ironic/tests/unit/common/test_pxe_utils.py b/ironic/tests/unit/common/test_pxe_utils.py index e934e2051..7b391ea1a 100644 --- a/ironic/tests/unit/common/test_pxe_utils.py +++ b/ironic/tests/unit/common/test_pxe_utils.py @@ -667,7 +667,7 @@ class TestPXEUtils(db_base.DbTestCase): 'config'), pxe_utils.get_pxe_config_file_path(self.node.uuid)) - def _dhcp_options_for_instance(self, ip_version=4): + def _dhcp_options_for_instance(self, ip_version=4, ipxe=False): self.config(ip_version=ip_version, group='pxe') if ip_version == 4: self.config(tftp_server='192.0.2.1', group='pxe') @@ -675,6 +675,10 @@ class TestPXEUtils(db_base.DbTestCase): self.config(tftp_server='ff80::1', group='pxe') self.config(pxe_bootfile_name='fake-bootfile', group='pxe') self.config(tftp_root='/tftp-path/', group='pxe') + if ipxe: + bootfile = 'fake-bootfile-ipxe' + else: + bootfile = 'fake-bootfile' if ip_version == 6: # NOTE(TheJulia): DHCPv6 RFCs seem to indicate that the prior @@ -682,11 +686,11 @@ class TestPXEUtils(db_base.DbTestCase): # by vendors. The apparent proper option is to return a # URL in the field https://tools.ietf.org/html/rfc5970#section-3 expected_info = [{'opt_name': '59', - 'opt_value': 'tftp://[ff80::1]/fake-bootfile', + 'opt_value': 'tftp://[ff80::1]/%s' % bootfile, 'ip_version': ip_version}] elif ip_version == 4: expected_info = [{'opt_name': '67', - 'opt_value': 'fake-bootfile', + 'opt_value': bootfile, 'ip_version': ip_version}, {'opt_name': '210', 'opt_value': '/tftp-path/', |