summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-04-12 13:21:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-12 13:21:48 +0000
commit26e8f9d8e2f4181ca18c1b36a75488d4c7446266 (patch)
treec30f3acb923598a092b19ebfe5ed055eae62bc1a /modules
parent720542395b61f52a4567156cad0d11f9730c746d (diff)
parentf50fbcaadfa1577eb4dfeeb577bf77a90d16e5e1 (diff)
Merge "Bugfix: Convert the string list to list"
Diffstat (limited to 'modules')
-rw-r--r--modules/opnfv/deployment/compass/adapter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/opnfv/deployment/compass/adapter.py b/modules/opnfv/deployment/compass/adapter.py
index 856c7fc38..38aa45227 100644
--- a/modules/opnfv/deployment/compass/adapter.py
+++ b/modules/opnfv/deployment/compass/adapter.py
@@ -7,6 +7,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
+import json
import netaddr
import re
@@ -161,9 +162,10 @@ class CompassAdapter(manager.DeploymentHandler):
fields = lines[i].strip().encode().rsplit('\t')
host_id = fields[0].strip().encode()
name = 'host{0}'.format(host_id)
- node_roles = fields[1].strip().encode().lower()
+ node_roles_str = fields[1].strip().encode().lower()
+ node_roles_list = json.loads(node_roles_str)
node_roles = [manager.Role.ODL if x == 'odl'
- else x for x in node_roles]
+ else x for x in node_roles_list]
roles = [x for x in [manager.Role.CONTROLLER,
manager.Role.COMPUTE,
manager.Role.ODL,