Updates for the CHO test
onosclidriver
status():Add specific logic for expect timeout, now returns main.ERROR
find_host(): update “port" key to “portNumber" to reflect change in ONOS
check_exceptions(): only search through the files from this run
print exceptions to output
handle zgrep exception when no gz file exists
remove check_for_no_exceptions() which was replaced by check_exceptions()
RCOnosCHO4nodes.params
add reactive forwarding test cases and parameters
doubled pingAttempts
RCOnosCHO4nodes.py
Enable reactive forwarding
set JVM options when starting ONOS to give more memory
check topology on all nodes
Show intents after failed ping test
add a wait as a work around for a known bug where topology changes after a switch mastership change causes intents to not reroute
add reactive forwarding tests: device discovery, optimal link down, optimal link up
fix some test case descriptions
fix typo in log message
RCOnosCHO4nodes.topo
remove —arp as we use the ONOS proxyARP module for reactive forwarding
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index c8501cd..344c00b 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -175,6 +175,8 @@
return main.TRUE
elif re.search("0\sinstance\sof\sonos\srunning",response):
return main.FALSE
+ elif re.search("Expected\sPrompt\snot found\s,\sTime Out!!",response):
+ return main.ERROR
else :
main.log.warn(self.name + " WARNING: status recieved unknown response")
main.log.warn(response)
@@ -1010,33 +1012,6 @@
main.cleanup()
main.exit()
- def check_for_no_exceptions(self):
- '''
- TODO: Rewrite
- Used by CassndraCheck.py to scan ONOS logs for Exceptions
- '''
- try:
- self.handle.sendline("dsh 'grep Exception ~/ONOS/onos-logs/onos.*.log'")
- self.handle.expect("\$ dsh")
- self.handle.expect("\$")
- output = self.handle.before
- main.log.info(self.name + ": " + output )
- if re.search("Exception",output):
- return main.FALSE
- else :
- 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(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
- main.cleanup()
- main.exit()
-
def git_pull(self, comp1=""):
'''
@@ -1255,7 +1230,7 @@
if foundHost == hostMAC:
for switch in enumerate(host[1]['attachmentPoints']):
retswitch.append(switch[1]['dpid'])
- retport.append(switch[1]['port'])
+ retport.append(switch[1]['portNumber'])
retcode = retcode +1
foundHost =''
'''
@@ -1296,15 +1271,18 @@
i = self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT])
#main.log.warn("first expect response: " +str(i))
self.handle.sendline("cd "+self.home+"/onos-logs")
- self.handle.sendline("zgrep \"xception\" *")
+ self.handle.sendline("zgrep \"xception\" *.log *.log.gz *.stderr *.stdout")
i = self.handle.expect(["\*",pexpect.EOF,pexpect.TIMEOUT])
#main.log.warn("second expect response: " +str(i))
i = self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT],timeout=120)
#main.log.warn("third expect response: " +str(i))
response = self.handle.before
count = 0
+ print response
for line in response.splitlines():
- if re.search("log:", line):
+ if re.search("gzip: \*\.log\.gz:", line):
+ pass
+ elif re.search("log:", line):
output +="Exceptions found in " + line + "\n"
count +=1
elif re.search("log\.gz:",line):