From 632a96ce1d6b1da93ed60ab3d801e5dea84d2217 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Wed, 28 Dec 2016 17:36:42 +0800 Subject: [PATCH] Trivial-Fix: Set patch directly on unset_instance_info Change-Id: I9e2a66a38e457fe78c8e0a2b601c8e39efa4aed6 --- nimble/engine/baremetal/ironic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nimble/engine/baremetal/ironic.py b/nimble/engine/baremetal/ironic.py index b6c0dbcd..83aa9832 100644 --- a/nimble/engine/baremetal/ironic.py +++ b/nimble/engine/baremetal/ironic.py @@ -75,9 +75,8 @@ def set_instance_info(ironicclient, instance): def unset_instance_info(ironicclient, instance): - patch = [] - patch.append({'path': '/instance_uuid', 'op': 'remove'}) - patch.append({'path': '/instance_info', 'op': 'remove'}) + patch = [{'path': '/instance_info', 'op': 'remove'}, + {'path': '/instance_uuid', 'op': 'remove'}] ironicclient.call("node.update", instance.node_uuid, patch)