From 67d44eb1187cdb71e4931293a9384c7bd54d7c62 Mon Sep 17 00:00:00 2001
From: licanwei
Date: Wed, 8 Feb 2017 17:41:47 +0800
Subject: [PATCH] Fix the mapping between the instance and the node
The argument to the add_edge function should be instance.uuid
and node.uuid, not instance and node
Change-Id: Ida694f9158d3eb26e7f31062a18844472ea3c6fa
Closes-Bug: #1662810
---
watcher/decision_engine/model/collector/nova.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/watcher/decision_engine/model/collector/nova.py b/watcher/decision_engine/model/collector/nova.py
index ef6aaac17..d378a1422 100644
--- a/watcher/decision_engine/model/collector/nova.py
+++ b/watcher/decision_engine/model/collector/nova.py
@@ -215,8 +215,7 @@ class ModelBuilder(object):
compute_node = self.model.get_node_by_uuid(
cnode_uuid)
# Connect the instance to its compute node
- self.model.add_edge(
- instance, compute_node, label='RUNS_ON')
+ self.model.map_instance(instance, compute_node)
except exception.ComputeNodeNotFound:
continue