[deployment_handler] Add OVS version info 53/28553/3
authorjose.lausuch <jose.lausuch@ericsson.com>
Mon, 13 Feb 2017 21:45:19 +0000 (22:45 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Tue, 14 Feb 2017 20:09:53 +0000 (21:09 +0100)
Change-Id: I485f969dff29a2d1757ce56c62dda294f44341e2
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
modules/opnfv/deployment/manager.py

index 9be5166..8597a3f 100644 (file)
@@ -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())