summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-15 08:22:41 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-15 08:22:41 +0000
commitfe6ff83e3827174acc8833490e0285ff59f83feb (patch)
tree14b524605326f476fdff76794609b3d97ccb6014
parent30e5e4d278cbe37e32c76d8351c563173f1b1901 (diff)
parent7ce9f379266931c8e240709a30a417703d08dfd3 (diff)
Merge "[deployment_handler] Add OVS version info"
-rw-r--r--modules/opnfv/deployment/manager.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/opnfv/deployment/manager.py b/modules/opnfv/deployment/manager.py
index 9be516660..8597a3f1c 100644
--- a/modules/opnfv/deployment/manager.py
+++ b/modules/opnfv/deployment/manager.py
@@ -164,8 +164,8 @@ class Node(object):
Run command remotely on a node
'''
if self.status is not NodeStatus.STATUS_OK:
- logger.info("The node %s is not active" % self.ip)
- return 1
+ logger.error("The node %s is not active" % self.ip)
+ return None
_, stdout, stderr = (self.ssh_client.exec_command(cmd))
error = stderr.readlines()
if len(error) > 0:
@@ -209,6 +209,13 @@ class Node(object):
return True
return False
+ def get_ovs_info(self):
+ '''
+ Returns the ovs version installed
+ '''
+ cmd = "ovs-vsctl --version|head -1| sed 's/^.*) //'"
+ return self.run_cmd(cmd)
+
def __str__(self):
return str(self.get_dict())