diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-11-10 18:51:55 +0100 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-11-12 10:39:27 +0000 |
commit | 5cbf7f51f9ae4f72ed60296aaf09cc0c447a7e0a (patch) | |
tree | 22ea8a1e2b8b92f43b280d45b77b149b7b348c32 /ironic/drivers/modules | |
parent | e2b55a8cb835e0b63830de34a002b7652753cb3d (diff) | |
download | ironic-5cbf7f51f9ae4f72ed60296aaf09cc0c447a7e0a.tar.gz |
Fix DHCP-less operations with the noop network interface
The base implementation of get_node_network_data returns {} and is
not overridden in the noop network. Update the base implementation
to use task.node.network_data and remove the excessive logging.
Change-Id: Ie50dcd1c2a151f5dd09794467792527032249809
(cherry picked from commit 2e5d01d48dc3a231140a1680a7082be436f5dd55)
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r-- | ironic/drivers/modules/image_utils.py | 2 | ||||
-rw-r--r-- | ironic/drivers/modules/network/common.py | 24 |
2 files changed, 2 insertions, 24 deletions
diff --git a/ironic/drivers/modules/image_utils.py b/ironic/drivers/modules/image_utils.py index 105a57d15..40ae866fe 100644 --- a/ironic/drivers/modules/image_utils.py +++ b/ironic/drivers/modules/image_utils.py @@ -459,6 +459,8 @@ def prepare_deploy_iso(task, params, mode, d_info): network_data = task.driver.network.get_node_network_data(task) if network_data: + LOG.debug('Injecting custom network data for node %s', + task.node.uuid) with tempfile.NamedTemporaryFile(dir=CONF.tempdir, suffix='.iso') as metadata_fileobj: diff --git a/ironic/drivers/modules/network/common.py b/ironic/drivers/modules/network/common.py index da6cfff46..3798c2bd4 100644 --- a/ironic/drivers/modules/network/common.py +++ b/ironic/drivers/modules/network/common.py @@ -402,30 +402,6 @@ class VIFPortIDMixin(object): or p_obj.internal_info.get('inspection_vif_port_id') or self._get_vif_id_by_port_like_obj(p_obj) or None) - def get_node_network_data(self, task): - """Get network configuration data for node's ports/portgroups. - - Gather L2 and L3 network settings from ironic node `network_data` - field. Ironic would eventually pass network configuration to the node - being managed out-of-band. - - :param task: A TaskManager instance. - :raises: InvalidParameterValue, if the network interface configuration - is invalid. - :raises: MissingParameterValue, if some parameters are missing. - :returns: a dict holding network configuration information adhearing - Nova network metadata layout (`network_data.json`). - """ - node = task.node - - network_data = node.network_data - - # TODO(etingof): remove or truncate `network_data` logging - LOG.debug('Collected network data for node %(node)s: %(data)s', - {'node': node.uuid, 'data': network_data}) - - return network_data - class NeutronVIFPortIDMixin(VIFPortIDMixin): """VIF port ID mixin class for neutron network interfaces. |