Streamlining the startup process a bit
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 7b7a0bd..341b693 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -203,7 +203,7 @@
response = self.execute(cmd= "./onos.sh core status ",prompt="running",timeout=10)
self.execute(cmd="\n",prompt="\$",timeout=10)
tail1 = self.execute(cmd="tail " + self.home + "/onos-logs/onos.*.log",prompt="\$",timeout=10)
- time.sleep(30)
+ time.sleep(10)
self.execute(cmd="\n",prompt="\$",timeout=10)
tail2 = self.execute(cmd="tail " + self.home + "/onos-logs/onos.*.log",prompt="\$",timeout=10)
pattern = '(.*)1 instance(.*)'
@@ -212,7 +212,6 @@
# if utilities.assert_matches(expect=pattern,actual=response,onpass="ONOS process is running...",onfail="ONOS process not running..."):
if re.search(pattern, response):
- time.sleep(10)
if re.search(patternUp,tail2):
main.log.info(self.name + ": ONOS process is running...")
if tail1 == tail2:
@@ -273,6 +272,36 @@
main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
main.cleanup()
main.exit()
+
+ def stop_all(self):
+ '''
+ Runs ./onos.sh stop
+ '''
+ try:
+ self.handle.sendline("")
+ self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT])
+ self.handle.sendline("cd "+self.home)
+ self.handle.sendline("./onos.sh stop")
+ i=self.handle.expect(["Stop",pexpect.EOF,pexpect.TIMEOUT])
+ self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT], 60)
+ result = self.handle.before
+ if re.search("Killed", result):
+ main.log.info(self.name + ": ONOS Killed Successfully")
+ return main.TRUE
+ else :
+ main.log.warn(self.name + ": ONOS wasn't running")
+ return main.FALSE
+ 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(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+ main.cleanup()
+ main.exit()
def stop(self):
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
index b7ad203..5ddfbb6 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
@@ -28,13 +28,13 @@
<sw1>s1</sw1>
</PLUG>
<CTRL>
- <ip1>10.128.100.21</ip1>
+ <ip1>10.128.4.151</ip1>
<port1>6633</port1>
- <ip2>10.128.100.22</ip2>
+ <ip2>10.128.4.152</ip2>
<port2>6633</port2>
- <ip3>10.128.100.23</ip3>
+ <ip3>10.128.4.153</ip3>
<port3>6633</port3>
- <ip4>10.128.100.24</ip4>
+ <ip4>10.128.4.154</ip4>
<port4>6633</port4>
</CTRL>
<RestIP>10.128.4.151</RestIP>
@@ -44,8 +44,8 @@
<NR_Switches>25</NR_Switches>
<NR_Links>50</NR_Links>
<RESTCALL>
- <restIP1>10.128.100.21</restIP1>
- <restIP2>10.128.100.22</restIP2>
+ <restIP1>10.128.4.151</restIP1>
+ <restIP2>10.128.4.152</restIP2>
<restPort>8080</restPort>
<restURL>/wm/onos/topology/devices</restURL>
</RESTCALL>
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
index d7c493f..9ba8e75 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
@@ -9,26 +9,24 @@
#Tests the startup of Zookeeper1, RamCloud1, and ONOS1 to be certain that all started up successfully
def CASE1(self,main) : #Check to be sure ZK, Cass, and ONOS are up, then get ONOS version
import time
+ main.ONOS1.stop_all()
+ main.ONOS2.stop_all()
+ main.ONOS3.stop_all()
+ main.ONOS4.stop_all()
+ main.ONOS2.stop_rest()
main.ONOS1.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
main.ONOS2.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
main.ONOS3.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
- main.ONOS4.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
-
+ main.ONOS4.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
main.Zookeeper1.start()
main.Zookeeper2.start()
main.Zookeeper3.start()
main.Zookeeper4.start()
- main.RamCloud1.stop_coor()
- main.RamCloud1.stop_serv()
- main.RamCloud2.stop_serv()
- main.RamCloud3.stop_serv()
- main.RamCloud4.stop_serv()
- time.sleep(10)
+ time.sleep(1)
main.RamCloud1.del_db()
main.RamCloud2.del_db()
main.RamCloud3.del_db()
main.RamCloud4.del_db()
- time.sleep(10)
main.log.report("Pulling latest code from github to all nodes")
for i in range(2):
uptodate = main.ONOS1.git_pull()
@@ -43,8 +41,8 @@
main.ONOS2.git_pull("ONOS1 master")
main.ONOS3.git_pull("ONOS1 master")
main.ONOS4.git_pull("ONOS1 master")
- #if uptodate==0
- if 1:
+ if uptodate==0:
+ # if 1:
main.ONOS1.git_compile()
main.ONOS2.git_compile()
main.ONOS3.git_compile()
@@ -58,20 +56,12 @@
# main.ONOS2.get_version()
# main.ONOS3.get_version()
# main.ONOS4.get_version()
- main.RamCloud1.start_coor()
- time.sleep(1)
- main.RamCloud1.start_serv()
- main.RamCloud2.start_serv()
- main.RamCloud3.start_serv()
- main.RamCloud4.start_serv()
- main.ONOS1.start()
- time.sleep(5)
- main.ONOS2.start()
- main.ONOS3.start()
- main.ONOS4.start()
- main.ONOS1.start_rest()
- time.sleep(10)
- test= main.ONOS1.rest_status()
+ main.ONOS1.start_all()
+ main.ONOS2.start_all()
+ main.ONOS3.start_all()
+ main.ONOS4.start_all()
+ main.ONOS2.start_rest()
+ test= main.ONOS2.rest_status()
if test == main.FALSE:
main.ONOS1.start_rest()
main.ONOS1.get_version()
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.topo b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.topo
index 357aa21..723327c 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.topo
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.topo
@@ -2,7 +2,7 @@
<COMPONENT>
<Zookeeper1>
- <host>10.128.100.21</host>
+ <host>10.128.4.151</host>
<user>admin</user>
<password></password>
<type>ZookeeperCliDriver</type>
@@ -12,7 +12,7 @@
</Zookeeper1>
<Zookeeper2>
- <host>10.128.100.22</host>
+ <host>10.128.4.152</host>
<user>admin</user>
<password></password>
<type>ZookeeperCliDriver</type>
@@ -22,7 +22,7 @@
</Zookeeper2>
<Zookeeper3>
- <host>10.128.100.23</host>
+ <host>10.128.4.153</host>
<user>admin</user>
<password></password>
<type>ZookeeperCliDriver</type>
@@ -32,7 +32,7 @@
</Zookeeper3>
<Zookeeper4>
- <host>10.128.100.24</host>
+ <host>10.128.4.154</host>
<user>admin</user>
<password></password>
<type>ZookeeperCliDriver</type>
@@ -42,7 +42,7 @@
</Zookeeper4>
<RamCloud1>
- <host>10.128.100.21</host>
+ <host>10.128.4.151</host>
<user>admin</user>
<password></password>
<type>RamCloudCliDriver</type>
@@ -52,7 +52,7 @@
</RamCloud1>
<RamCloud2>
- <host>10.128.100.22</host>
+ <host>10.128.4.152</host>
<user>admin</user>
<password></password>
<type>RamCloudCliDriver</type>
@@ -62,7 +62,7 @@
</RamCloud2>
<RamCloud3>
- <host>10.128.100.23</host>
+ <host>10.128.4.153</host>
<user>admin</user>
<password></password>
<type>RamCloudCliDriver</type>
@@ -72,7 +72,7 @@
</RamCloud3>
<RamCloud4>
- <host>10.128.100.24</host>
+ <host>10.128.4.154</host>
<user>admin</user>
<password></password>
<type>RamCloudCliDriver</type>
@@ -82,7 +82,7 @@
</RamCloud4>
<ONOS1>
- <host>10.128.100.21</host>
+ <host>10.128.4.151</host>
<user>admin</user>
<password></password>
<type>OnosCliDriver</type>
@@ -92,7 +92,7 @@
</ONOS1>
<ONOS2>
- <host>10.128.100.22</host>
+ <host>10.128.4.152</host>
<user>admin</user>
<password></password>
<type>OnosCliDriver</type>
@@ -102,7 +102,7 @@
</ONOS2>
<ONOS3>
- <host>10.128.100.23</host>
+ <host>10.128.4.153</host>
<user>admin</user>
<password></password>
<type>OnosCliDriver</type>
@@ -112,7 +112,7 @@
</ONOS3>
<ONOS4>
- <host>10.128.100.24</host>
+ <host>10.128.4.154</host>
<user>admin</user>
<password></password>
<type>OnosCliDriver</type>
@@ -122,7 +122,7 @@
</ONOS4>
<Mininet1>
- <host>10.128.100.25</host>
+ <host>10.128.4.159</host>
<user>admin</user>
<password></password>
<type>MininetCliDriver</type>