aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/deployment/apex
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
commit2f0c4e1baa6a45dc451142f1372c48e69a5d1565 (patch)
tree4ec67d57795ff32bd04bef03d5440cabf9baeeef /opnfv/deployment/apex
parentf169fa760059f91ba68960a7f87ca915e7d0ddaf (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 'opnfv/deployment/apex')
-rw-r--r--opnfv/deployment/apex/adapter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/opnfv/deployment/apex/adapter.py b/opnfv/deployment/apex/adapter.py
index 1b81e78..cb827d8 100644
--- a/opnfv/deployment/apex/adapter.py
+++ b/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',