added verify cell
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index cee79db..8e62200 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -353,9 +353,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
@@ -371,3 +375,37 @@
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 c65bfa6..08b224b 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")
diff --git a/TestON/tests/ONOSNextTest/__init__.py b/TestON/tests/ONOSNextTest/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/TestON/tests/ONOSNextTest/__init__.py
+++ /dev/null