aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/reap.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/deploy/reap.py b/deploy/reap.py
index 69c98d10c..be729181f 100644
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -167,17 +167,18 @@ class Reap(object):
def reap_nodes_interfaces_transformations(self):
node_list = parse(exec_cmd('fuel node'))
real_node_ids = [node[N['id']] for node in node_list]
+ real_node_ids = map(int, real_node_ids)
real_node_ids.sort()
- min_node = real_node_ids[0]
+ min_node = min(real_node_ids)
interfaces = {}
transformations = {}
dea_nodes = []
dha_nodes = []
for real_node_id in real_node_ids:
- node_id = int(real_node_id) - int(min_node) + 1
+ node_id = real_node_id - min_node + 1
self.last_node = node_id
- node = self.get_node_by_id(node_list, real_node_id)
+ node = self.get_node_by_id(node_list, str(real_node_id))
roles = commafy(node[N['roles']])
if not roles:
err('Fuel Node %s has no role' % real_node_id)