Changes to CHO test for parsing onoscell option
Change-Id: I6521fea90b1d66b1b2a9a3a7b86f107c47d845e7
updated verifyOnosCell option and deleted getOnosIPfromCell
Change-Id: Ie8eccbf88c7b3f3a258efa0c5b33a6648e017684
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 8e9b3e0..e602a71 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -2116,51 +2116,7 @@
main.log.info(outputString)
main.log.info("================================================================\n")
- return totalHits
-
- def getOnosIPfromCell(self):
- '''
- Returns the ONOS node names and their IP addresses as defined in the cell and applied to shell environment
- Example output return: ['10.128.40.41','10.128.40.42','10.128.40.43']. This will work even if the Mininet is
- not part of the cell definition and also if there are multiple mininets, just by using static hostname
- in TOPO file.
- '''
- import re
- try:
- # Clean handle by sending empty and expecting $
- self.handle.sendline( "" )
- self.handle.expect( "\$" )
- self.handle.sendline( "cell" )
- self.handle.expect( "\$" )
- handleBefore = self.handle.before
- handleAfter = self.handle.after
- # Get the rest of the handle
- self.handle.sendline( "" )
- self.handle.expect( "\$" )
- handleMore = self.handle.before
- ipList = []
- cellOutput = handleBefore + handleAfter + handleMore
- cellOutput = cellOutput.replace("\r\r","")
- cellOutput = cellOutput.splitlines()
- for i in range( len(cellOutput) ):
- if( re.match( "OC", cellOutput[i] ) ):
- if( re.match( "OCI", cellOutput[i] ) or re.match( "OCN", cellOutput[i] ) ):
- continue
- else:
- onosIP = cellOutput[i].split("=")
- ipList.append(onosIP[1])
- return ipList
- except pexpect.ExceptionPexpect as e:
- main.log.error( self.name + ": Pexpect exception found of type " +
- str( type( e ) ) )
- main.log.error ( e.get_trace() )
- main.log.error( self.name + ": " + self.handle.before )
- main.cleanup()
- main.exit()
- except Exception:
- main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ return totalHits
def copyMininetFile( self, fileName, localPath, userName, ip,
mnPath='~/mininet/custom/', timeout = 60 ):