Added verify cell function
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 2678af2..9ebfafd 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -334,9 +334,13 @@
self.handle.expect("ONOS_CELL="+str(cellname))
handle_before = self.handle.before
handle_after = self.handle.after
+ #Get the rest of the handle
+ self.handle.sendline("")
+ self.handle.expect("\$")
+ handle_more = self.handle.before
main.log.info("Cell call returned: "+handle_before+
- handle_after)
+ handle_after + handle_more)
return main.TRUE
@@ -352,6 +356,39 @@
main.cleanup()
main.exit()
+ def verify_cell(self):
+ '''
+ Calls 'onos-verify-cell' to check for cell installation
+ '''
+ try:
+ #Clean handle by sending empty and expecting $
+ self.handle.sendline("")
+ self.handle.expect("\$")
+ self.handle.sendline("onos-verify-cell")
+ self.handle.expect("\$")
+ handle_before = self.handle.before
+ handle_after = self.handle.after
+ #Get the rest of the handle
+ self.handle.sendline("")
+ self.handle.expect("\$")
+ handle_more = self.handle.before
+
+ main.log.info("Verify cell returned: "+handle_before+
+ handle_after + handle_more)
+
+ return main.TRUE
+
+ except pexpect.EOF:
+ main.log.error(self.name + ": EOF exception found")
+ main.log.error(self.name + ": " + self.handle.before)
+ main.cleanup()
+ main.exit()
+ except:
+ main.log.info(self.name+" ::::::")
+ main.log.error( traceback.print_exc())
+ main.log.info(self.name+" ::::::")
+ main.cleanup()
+ main.exit()
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.py b/TestON/tests/ONOSNextTest/ONOSNextTest.py
index 7c0355e..a77bc8a 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.py
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.py
@@ -28,9 +28,10 @@
install_result = main.ONOSbench.clean_install()
package_result = main.ONOSbench.onos_package()
cell_result = main.ONOSbench.set_cell(cell_name)
+ verify_result = main.ONOSbench.verify_cell()
case1_result = (install_result and package_result and\
- cell_result)
+ cell_result and verify_result)
utilities.assert_equals(expect=main.TRUE, actual=case1_result,
onpass="Test startup successful",
onfail="Test startup NOT successful")