From af02bebca97401790c0c02be4bd9c2a5789e8b41 Mon Sep 17 00:00:00 2001 From: zhufl Date: Mon, 2 Nov 2020 15:45:14 +0800 Subject: [PATCH] Fix parameter passed to IronicNodeNotFound exception IronicNodeNotFound expects uuid parameter for the error message, not name. Change-Id: I9fefa98fa9fe6f6491e5f621190cac7d376db6c9 --- watcher/decision_engine/model/model_root.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watcher/decision_engine/model/model_root.py b/watcher/decision_engine/model/model_root.py index 242a12477..254271f11 100644 --- a/watcher/decision_engine/model/model_root.py +++ b/watcher/decision_engine/model/model_root.py @@ -631,7 +631,7 @@ class BaremetalModelRoot(nx.DiGraph, base.Model): super(BaremetalModelRoot, self).remove_node(node.uuid) except nx.NetworkXError as exc: LOG.exception(exc) - raise exception.IronicNodeNotFound(name=node.uuid) + raise exception.IronicNodeNotFound(uuid=node.uuid) @lockutils.synchronized("baremetal_model") def get_all_ironic_nodes(self): @@ -643,7 +643,7 @@ class BaremetalModelRoot(nx.DiGraph, base.Model): try: return self._get_by_uuid(uuid) except exception.BaremetalResourceNotFound: - raise exception.IronicNodeNotFound(name=uuid) + raise exception.IronicNodeNotFound(uuid=uuid) def _get_by_uuid(self, uuid): try: