summaryrefslogtreecommitdiffstats
path: root/modules/opnfv/deployment/apex/adapter.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-08 14:25:34 +0100
committerJose Lausuch <jose.lausuch@ericsson.com>2017-02-14 17:48:07 +0000
commit9f93b28a66f8782b74252c242481248bd46f816e (patch)
tree57202683b652cbb64e58179f5fb8ea468c45ef65 /modules/opnfv/deployment/apex/adapter.py
parent404ba6bd9aba7010566919292e3b2cb9432acb35 (diff)
[deployment handler] Add support for Clusters in Fuel
Fix minor apex issues. Output of example.py http://pastebin.com/raw/x70Uj85V Change-Id: I6013f5c4d916126f79afd40a6d6a35278c8ed26f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'modules/opnfv/deployment/apex/adapter.py')
-rw-r--r--modules/opnfv/deployment/apex/adapter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/opnfv/deployment/apex/adapter.py b/modules/opnfv/deployment/apex/adapter.py
index 1b81e781b..cb827d886 100644
--- a/modules/opnfv/deployment/apex/adapter.py
+++ b/modules/opnfv/deployment/apex/adapter.py
@@ -25,9 +25,9 @@ class ApexAdapter(manager.DeploymentHandler):
installer_pwd=None,
pkey_file=pkey_file)
- def nodes(self):
+ def get_nodes(self):
nodes = []
- cmd = "source /home/stack/stackrc;nova list 2>/dev/null"
+ cmd = "source /home/stack/stackrc;openstack server list"
output = self.installer_node.run_cmd(cmd)
lines = output.rsplit('\n')
if len(lines) < 4:
@@ -44,12 +44,12 @@ class ApexAdapter(manager.DeploymentHandler):
if 'Daylight' in line:
roles += ", OpenDaylight"
fields = line.split('|')
- id = re.sub('[!| ]', '', fields[1])
- name = re.sub('[!| ]', '', fields[2])
- status_node = re.sub('[!| ]', '', fields[3])
- ip = re.sub('[!| ctlplane=]', '', fields[6])
+ id = re.sub('[!| ]', '', fields[1]).encode()
+ name = re.sub('[!| ]', '', fields[2]).encode()
+ status_node = re.sub('[!| ]', '', fields[3]).encode()
+ ip = re.sub('[!| ctlplane=]', '', fields[4]).encode()
- if status_node == 'ACTIVE':
+ if status_node.lower() == 'active':
status = manager.Node.STATUS_OK
ssh_client = ssh_utils.get_ssh_client(hostname=ip,
username='heat-admin',