Added additional responses checking to onosStatus method
Change-Id: I651a9f375836a8e29597e5b2a53c16c26849bfed
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 9e6d5ff..917e7bf 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1683,14 +1683,16 @@
self.handle.sendline( "onos-service " + str( node ) +
" status" )
i = self.handle.expect( [
+ "start/running",
"Running ...",
+ "stop/waiting",
"Not Running ...",
pexpect.TIMEOUT ], timeout=120 )
- if i == 0:
+ if i == 0 or i == 1:
main.log.info( "ONOS is running" )
return main.TRUE
- elif i == 1:
+ elif i == 2 or i == 3:
main.log.info( "ONOS is stopped" )
main.log.error( "ONOS service failed to check the status" )
main.cleanup()