summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevasquez <eric.vasquez@calxeda.com>2013-04-30 13:17:25 -0500
committerevasquez <eric.vasquez@calxeda.com>2013-04-30 13:17:25 -0500
commitb64c70917d498b0833b08dd9b9bca4b46bf0a555 (patch)
tree3d9ba731585cecbae9942a0bcc643eb79d354edb
parent15e6ca62d46d13552ee9d63d2ba6e8f1cf855954 (diff)
downloadcxmanage-b64c70917d498b0833b08dd9b9bca4b46bf0a555.tar.gz
Uplink info needs integer keys, not str
-rw-r--r--cxmanage_api/node.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index c91aadb..f7bc993 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -1155,12 +1155,12 @@ class Node(object):
# Parse addresses from ipinfo file
results = {}
for line in open(filename):
- node_id = line.replace('Node ', '')[0]
+ node_id = int(line.replace('Node ', '')[0])
ul_info = line.replace('Node %s:' % node_id, '').strip().split(',')
node_data = {}
for ul in ul_info:
data = tuple(ul.split())
- node_data[data[0]] = data[1]
+ node_data[data[0]] = int(data[1])
results[node_id] = node_data
# Make sure we found something