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
This commit is contained in:
licanwei
2017-02-08 17:41:47 +08:00
committed by Vincent Françoise
parent e1131a65d8
commit d1ab697612

View File

@@ -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