From bfb5e5431a8aa8e893931e093bb69fb66ebebcb8 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Thu, 18 Feb 2016 22:25:26 +0800 Subject: [PATCH] Use 'node' directly in update_port() Change-Id: I8ad95206f81bdf806f196994be669667d92566ff --- ironic/conductor/manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index db0f337c1dc..5e0027be206 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -1733,8 +1733,8 @@ class ConductorManager(base_manager.BaseConductorManager): states.INSPECTING, states.MANAGEABLE] if (set(port_obj.obj_what_changed()) & connectivity_attr - and not (task.node.provision_state in allowed_update_states - or task.node.maintenance)): + and not (node.provision_state in allowed_update_states + or node.maintenance)): action = _("Port %(port)s can not have any connectivity " "attributes (%(connect)s) updated unless " "node %(node)s is in a %(allowed)s state " @@ -1742,7 +1742,7 @@ class ConductorManager(base_manager.BaseConductorManager): raise exception.InvalidState( action % {'port': port_uuid, - 'node': task.node.uuid, + 'node': node.uuid, 'connect': ', '.join(connectivity_attr), 'allowed': ', '.join(allowed_update_states)})