Issue a warning when add_ports=pxe and not PXE NIC address is provided

Change-Id: I89692473052c1eb43549453a004cdbc996c20c2a
This commit is contained in:
Dmitry Tantsur 2015-11-16 20:29:47 +01:00
parent 5fbbf9ccc3
commit 9c14f354f7
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,10 @@ class ValidateInterfacesHook(base.ProcessingHook):
pxe_mac = introspection_data.get('boot_interface') pxe_mac = introspection_data.get('boot_interface')
if CONF.processing.add_ports == 'pxe' and not pxe_mac:
LOG.warning(_LW('No boot interface provided in the introspection '
'data, will add all ports with IP addresses'))
if CONF.processing.add_ports == 'pxe' and pxe_mac: if CONF.processing.add_ports == 'pxe' and pxe_mac:
LOG.info(_LI('PXE boot interface was %s'), pxe_mac) LOG.info(_LI('PXE boot interface was %s'), pxe_mac)
if '-' in pxe_mac: if '-' in pxe_mac: