Adding a pexpect statement to onos_install for case when onos is already running
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 5926927..5cc7eb6 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -663,6 +663,7 @@
#NOTE: this timeout may need to change depending on the network and size of ONOS
i=self.handle.expect(["Network\sis\sunreachable",
"onos\sstart/running,\sprocess",
+ "ONOS\sis\salready\sinstalled",
pexpect.TIMEOUT],timeout=60)
if i == 0:
@@ -671,10 +672,14 @@
elif i == 1:
main.log.info("ONOS was installed on " + node + " and started")
return main.TRUE
- elif i == 2:
+ elif i == 2:
+ main.log.info("ONOS is already installed on "+node)
+ return main.TRUE
+ elif i == 3:
main.log.info("Installation of ONOS on " + node + " timed out")
return main.FALSE
+
except pexpect.EOF:
main.log.error(self.name + ": EOF exception found")
main.log.error(self.name + ": " + self.handle.before)