aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/deployment/fuel
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-17 10:44:38 +0100
committerJose Lausuch <jose.lausuch@ericsson.com>2017-02-17 16:10:04 +0000
commitc8b24f8e66595556749fea5f6f305e8c298b5b06 (patch)
tree95be15b20bb4e3948f56c6463c2601b1f6ff7869 /opnfv/deployment/fuel
parentbb67bf0617432cb902d4299c9f77559b0b22a7e9 (diff)
[deployment_handler] Fix some nits and improve output
Change-Id: I283564c2f9a651b6c6fd6ec8986a6c1d98a58b2c Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'opnfv/deployment/fuel')
-rw-r--r--opnfv/deployment/fuel/adapter.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/opnfv/deployment/fuel/adapter.py b/opnfv/deployment/fuel/adapter.py
index 4ba9ca9..a71d6cb 100644
--- a/opnfv/deployment/fuel/adapter.py
+++ b/opnfv/deployment/fuel/adapter.py
@@ -170,26 +170,30 @@ class FuelAdapter(manager.DeploymentHandler):
cmd = 'source openrc;nova-manage version 2>/dev/null'
version = None
for node in self.nodes:
- if node.is_controller():
+ if node.is_controller() and node.is_active():
version = node.run_cmd(cmd)
break
return version
def get_sdn_version(self):
- cmd = "apt-cache show opendaylight|grep Version|sed 's/^.*\: //'"
+ cmd = "apt-cache show opendaylight|grep Version"
version = None
for node in self.nodes:
- if node.is_controller():
+ if manager.Role.ODL in node.roles and node.is_active():
odl_version = node.run_cmd(cmd)
if odl_version:
- version = 'OpenDaylight ' + odl_version
- break
+ version = 'OpenDaylight ' + odl_version.split(' ')[-1]
+ break
return version
def get_deployment_status(self):
- cmd = 'fuel env|grep operational'
+ cmd = "fuel env|tail -1|awk '{print $3}'"
result = self.installer_node.run_cmd(cmd)
if result is None or len(result) == 0:
- return 'failed'
+ return 'unknown'
+ elif 'operational' in result:
+ return 'active'
+ elif 'deploy' in result:
+ return 'deploying'
else:
return 'active'