Merge "Fix typo in handling of exception FailedToGetIPAddressOnPort"
This commit is contained in:
commit
aba282a7fc
ironic
@ -308,7 +308,7 @@ def create_pxe_config(task, pxe_options, template=None, ipxe_enabled=False):
|
||||
# dhcp_provider interface is set to none. This will result
|
||||
# in the MAC addresses and DHCP files being written, and
|
||||
# we can remove IP address creation for the grub use.
|
||||
except exception.FailedToGetIPaddressesOnPort as e:
|
||||
except exception.FailedToGetIPAddressOnPort as e:
|
||||
if CONF.dhcp.dhcp_provider != 'none':
|
||||
with excutils.save_and_reraise_exception():
|
||||
LOG.error('Unable to create boot config, IP address '
|
||||
|
@ -492,8 +492,9 @@ class TestPXEUtils(db_base.DbTestCase):
|
||||
# TODO(TheJulia): We should... like... fix the template to
|
||||
# enable mac address usage.....
|
||||
grub_tmplte = "ironic/drivers/modules/pxe_grub_config.template"
|
||||
link_ip_configs_mock.side_efect = exception.FailedToGetIPAddressOnPort(
|
||||
port_id='blah')
|
||||
self.config(dhcp_provider='none', group='dhcp')
|
||||
link_ip_configs_mock.side_effect = \
|
||||
exception.FailedToGetIPAddressOnPort(port_id='blah')
|
||||
with task_manager.acquire(self.context, self.node.uuid) as task:
|
||||
task.node.properties['capabilities'] = 'boot_mode:uefi'
|
||||
pxe_utils.create_pxe_config(task, self.pxe_options,
|
||||
|
Loading…
x
Reference in New Issue
Block a user