From 43de977994a41ae2c5b50d6b5897ba456b39546a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Wed, 22 Apr 2020 10:39:34 +0200 Subject: [PATCH] BasePhysnetHook - Follow up - Removes confusing comment in _get_physnet_patch method. - Move binary operator to follow code style. - Removed info log entry in before_update. - Move releasenote to 'other' section as this is no user faceing change. Change-Id: I53d8bf97a87ae365a085a795901eaed1f0c32d9b --- ironic_inspector/plugins/base_physnet.py | 7 ++----- releasenotes/notes/physnet-base-4499ad3a7c08725f.yaml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ironic_inspector/plugins/base_physnet.py b/ironic_inspector/plugins/base_physnet.py index 0cd3c8870..2934caa8d 100644 --- a/ironic_inspector/plugins/base_physnet.py +++ b/ironic_inspector/plugins/base_physnet.py @@ -53,9 +53,8 @@ class BasePhysnetHook(base.ProcessingHook): :param port: The ironic port to patch. :returns: A dict to be used as a patch for the port, or None. """ - # Bug is here. - if (not CONF.processing.overwrite_existing or - port.physical_network == physnet): + if (not CONF.processing.overwrite_existing + or port.physical_network == physnet): return return {'op': 'add', 'path': '/physical_network', 'value': physnet} @@ -63,8 +62,6 @@ class BasePhysnetHook(base.ProcessingHook): """Process introspection data and patch port physical network.""" inventory = utils.get_inventory(introspection_data) - LOG.info("Plugin: %s", type(self)) - ironic_ports = node_info.ports() for iface in inventory['interfaces']: diff --git a/releasenotes/notes/physnet-base-4499ad3a7c08725f.yaml b/releasenotes/notes/physnet-base-4499ad3a7c08725f.yaml index 28c6e7996..bccabcfb3 100644 --- a/releasenotes/notes/physnet-base-4499ad3a7c08725f.yaml +++ b/releasenotes/notes/physnet-base-4499ad3a7c08725f.yaml @@ -1,4 +1,4 @@ --- -features: +other: - Added base class (``BasePhysnetHook``) for plugins that assign a physical network to ports.