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