Merge "Use TestON 1.15 for onos-1.15 testing"
diff --git a/TestON/drivers/common/cli/hostdriver.py b/TestON/drivers/common/cli/hostdriver.py
index 86c0c38..d8cc74d 100644
--- a/TestON/drivers/common/cli/hostdriver.py
+++ b/TestON/drivers/common/cli/hostdriver.py
@@ -235,6 +235,53 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+ def pingHostSetAlternative( self, dstIPList, wait=1, IPv6=False ):
+ """
+ Description:
+ Ping a set of destination host.
+ Params:
+ dstIPList is a list of destination ip addresses
+ Returns:
+ main.TRUE if the destination host is reachable
+ main.FALSE otherwise
+ """
+ isReachable = main.TRUE
+ wait = int( wait )
+ cmd = "ping"
+ if IPv6:
+ cmd = cmd + "6"
+ cmd = cmd + " -c 1 -i 1 -W " + str( wait )
+ try:
+ for dstIP in dstIPList:
+ pingCmd = cmd + " " + dstIP
+ self.handle.sendline( pingCmd )
+ i = self.handle.expect( [ self.prompt,
+ pexpect.TIMEOUT ],
+ timeout=wait + 5 )
+ if i == 0:
+ response = self.handle.before
+ if not re.search( ',\s0\%\spacket\sloss', response ):
+ main.log.debug( "Ping failed between %s and %s" % ( self.name, dstIP ) )
+ isReachable = main.FALSE
+ elif i == 1:
+ main.log.error( self.name + ": timeout when waiting for response" )
+ isReachable = main.FALSE
+ else:
+ main.log.error( self.name + ": unknown response: " + self.handle.before )
+ isReachable = main.FALSE
+ except pexpect.TIMEOUT:
+ main.log.exception( self.name + ": TIMEOUT exception" )
+ self.exitFromCmd( [ self.prompt ] )
+ isReachable = main.FALSE
+ except pexpect.EOF:
+ main.log.error( self.name + ": EOF exception found" )
+ main.log.error( self.name + ": " + self.handle.before )
+ main.cleanAndExit()
+ except Exception:
+ main.log.exception( self.name + ": Uncaught exception!" )
+ main.cleanAndExit()
+ return isReachable
+
def ifconfig( self, wait=3 ):
"""
Run ifconfig command on host and return output
diff --git a/TestON/drivers/common/cli/networkdriver.py b/TestON/drivers/common/cli/networkdriver.py
index f0d7f8b..828187c 100755
--- a/TestON/drivers/common/cli/networkdriver.py
+++ b/TestON/drivers/common/cli/networkdriver.py
@@ -207,9 +207,9 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
- def createComponent( self, name ):
+ def createHostComponent( self, name ):
"""
- Creates switch/host component with the same parameters as the one copied to local.
+ Creates host component with the same parameters as the one copied to local.
Arguments:
name - The string of the name of this component. The new component
will be assigned to main.<name> .
@@ -563,3 +563,24 @@
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+
+ def getIPAddress( self, host, proto='IPV4' ):
+ """
+ Returns IP address of the host
+ """
+ response = self.runCmdOnHost( host, "ifconfig" )
+ pattern = ''
+ if proto == 'IPV4':
+ pattern = "inet\s(\d+\.\d+\.\d+\.\d+)\s\snetmask"
+ else:
+ pattern = "inet6\s([\w,:]*)/\d+\s\sprefixlen"
+ ipAddressSearch = re.search( pattern, response )
+ if not ipAddressSearch:
+ return None
+ main.log.info(
+ self.name +
+ ": IP-Address of Host " +
+ host +
+ " is " +
+ ipAddressSearch.group( 1 ) )
+ return ipAddressSearch.group( 1 )
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index dd60fb4..3841a76 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -58,6 +58,7 @@
self.handle = None
self.karafUser = None
self.karafPass = None
+ self.karafPrompt = "sdn@root >" # FIXME: make configurable
self.graph = Graph()
super( OnosCliDriver, self ).__init__()
@@ -171,7 +172,7 @@
try:
if self.handle:
self.handle.sendline( "" )
- i = self.handle.expect( [ "onos>", self.prompt, pexpect.TIMEOUT ],
+ i = self.handle.expect( [ self.karafPrompt, self.prompt, pexpect.TIMEOUT ],
timeout=10 )
if i == 0: # In ONOS CLI
self.handle.sendline( "logout" )
@@ -273,7 +274,7 @@
# Check if we are already in the cli
self.handle.sendline( "" )
x = self.handle.expect( [
- self.prompt, "onos>" ], commandlineTimeout )
+ self.prompt, self.karafPrompt ], commandlineTimeout )
if x == 1:
main.log.info( "ONOS cli is already running" )
return main.TRUE
@@ -286,26 +287,27 @@
startCliCommand = "onos "
self.handle.sendline( startCliCommand + str( ONOSIp ) )
i = self.handle.expect( [
- "onos>",
+ self.karafPrompt,
pexpect.TIMEOUT ], onosStartTimeout )
if i == 0:
main.log.info( str( ONOSIp ) + " CLI Started successfully" )
- if karafTimeout:
+ if karafTimeout: # FIXME: This doesn't look right
self.handle.sendline(
"config:property-set -p org.apache.karaf.shell\
sshIdleTimeout " +
karafTimeout )
self.handle.expect( self.prompt )
self.handle.sendline( startCliCommand + str( ONOSIp ) )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
+ main.log.debug( self.handle.before )
return main.TRUE
else:
# If failed, send ctrl+c to process and try again
main.log.info( "Starting CLI failed. Retrying..." )
self.handle.send( "\x03" )
self.handle.sendline( startCliCommand + str( ONOSIp ) )
- i = self.handle.expect( [ "onos>", pexpect.TIMEOUT ],
+ i = self.handle.expect( [ self.karafPrompt, pexpect.TIMEOUT ],
timeout=30 )
if i == 0:
main.log.info( str( ONOSIp ) + " CLI Started " +
@@ -317,7 +319,7 @@
karafTimeout )
self.handle.expect( self.prompt )
self.handle.sendline( startCliCommand + str( ONOSIp ) )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
return main.TRUE
else:
main.log.error( "Connection to CLI " +
@@ -356,7 +358,7 @@
try:
self.handle.sendline( "" )
x = self.handle.expect( [
- self.prompt, "onos>" ], commandlineTimeout )
+ self.prompt, self.karafPrompt ], commandlineTimeout )
if x == 1:
main.log.info( "ONOS cli is already running" )
@@ -365,26 +367,27 @@
# Wait for onos start ( onos-wait-for-start ) and enter onos cli
self.handle.sendline( "/opt/onos/bin/onos" )
i = self.handle.expect( [
- "onos>",
+ self.karafPrompt,
pexpect.TIMEOUT ], onosStartTimeout )
if i == 0:
main.log.info( self.name + " CLI Started successfully" )
- if karafTimeout:
+ if karafTimeout: # FIXME: This doesn't look right
self.handle.sendline(
"config:property-set -p org.apache.karaf.shell\
sshIdleTimeout " +
karafTimeout )
self.handle.expect( self.prompt )
self.handle.sendline( "/opt/onos/bin/onos" )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
+ main.log.debug( self.handle.before )
return main.TRUE
else:
# If failed, send ctrl+c to process and try again
main.log.info( "Starting CLI failed. Retrying..." )
self.handle.send( "\x03" )
self.handle.sendline( "/opt/onos/bin/onos" )
- i = self.handle.expect( [ "onos>", pexpect.TIMEOUT ],
+ i = self.handle.expect( [ self.karafPrompt, pexpect.TIMEOUT ],
timeout=30 )
if i == 0:
main.log.info( self.name + " CLI Started " +
@@ -396,7 +399,7 @@
karafTimeout )
self.handle.expect( self.prompt )
self.handle.sendline( "/opt/onos/bin/onos" )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
return main.TRUE
else:
main.log.error( "Connection to CLI " +
@@ -431,7 +434,7 @@
self.handle.sendline( "log:log " + lvlStr + " " + cmdStr )
self.handle.expect( "log:log" )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
response = self.handle.before
if re.search( "Error", response ):
@@ -472,7 +475,7 @@
try:
# Try to reconnect if disconnected from cli
self.handle.sendline( "" )
- i = self.handle.expect( [ "onos>", self.prompt, pexpect.TIMEOUT ] )
+ i = self.handle.expect( [ self.karafPrompt, self.prompt, pexpect.TIMEOUT ] )
response = self.handle.before
if i == 1:
main.log.error( self.name + ": onos cli session closed. " )
@@ -493,7 +496,7 @@
main.log.warn( "Timeout when testing cli responsiveness" )
main.log.debug( self.handle.before )
self.handle.send( "\x03" ) # Send ctrl-c to clear previous output
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
response += self.handle.before
if debug:
@@ -503,7 +506,7 @@
main.log.error( self.name + ": ONOS timeout" )
main.log.debug( self.handle.before )
self.handle.send( "\x03" )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
return None
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
@@ -519,7 +522,7 @@
else:
main.cleanAndExit()
- def sendline( self, cmdStr, showResponse=False, debug=False, timeout=10, noExit=False ):
+ def sendline( self, cmdStr, showResponse=False, debug=False, timeout=10, noExit=False, relaxedRegex=True ):
"""
A wrapper around pexpect's sendline/expect. Will return all the output from a given command
@@ -533,6 +536,7 @@
before a timeout.
noExit - Defaults to False. If True, will not exit TestON in the event of a
closed channel, but instead return None
+ relaxedRegex - Defaults to True. If there is a pipe in the command send, will only try to match the last part of the piped command.
Warning: There are no sanity checking to commands sent using this method.
@@ -545,7 +549,7 @@
logStr = "\"Sending CLI command: '" + cmdStr + "'\""
self.log( logStr, noExit=noExit )
self.handle.sendline( cmdStr )
- self.handle.expect( "onos>", timeout )
+ self.handle.expect( self.karafPrompt, timeout )
response = self.handle.before
main.log.info( "Command '" + str( cmdStr ) + "' sent to "
+ self.name + "." )
@@ -553,13 +557,26 @@
main.log.debug( self.name + ": Raw output" )
main.log.debug( self.name + ": " + repr( response ) )
+ # Remove control codes from karaf 4.2.1
+ karafEscape = re.compile( r"('(0|1)~\'|\r\r\r\n\x1b\[A\x1b\[79Cx|\x1b(>|=)|\x1b\[90m~)" )
+ response = karafEscape.sub( '', response )
+ if debug:
+ main.log.debug( self.name + ": karafEscape output" )
+ main.log.debug( self.name + ": " + repr( response ) )
# Remove ANSI color control strings from output
- ansiEscape = re.compile( r'\x1b[^m]*m' )
+ ansiEscape = re.compile( r'((\x9b|\x1b\[)[0-?]*[ -/]*[@-~])' )
response = ansiEscape.sub( '', response )
if debug:
main.log.debug( self.name + ": ansiEscape output" )
main.log.debug( self.name + ": " + repr( response ) )
+ # Remove ANSI color control strings from output
+ backspaceEscape = re.compile( r'((..\x08\x08)|(.|\s)\x08)' )
+ response = backspaceEscape.sub( '', response )
+ if debug:
+ main.log.debug( self.name + ": backspaceEscape output" )
+ main.log.debug( self.name + ": " + repr( response ) )
+
# Remove extra return chars that get added
response = re.sub( r"\s\r", "", response )
if debug:
@@ -574,7 +591,15 @@
main.log.debug( self.name + ": " + repr( response ) )
# parse for just the output, remove the cmd from response
- output = response.split( cmdStr.strip(), 1 )
+ if relaxedRegex:
+ # This was added because karaf 4.2 is stripping some characters from the command echo
+ endStr = cmdStr.split( '|' )[-1]
+ output = response.split( endStr.strip(), 1 )
+ else:
+ output = response.split( endStr.strip(), 1 )
+ if len( output ) < 2:
+ main.log.warn( "Relaxing regex match to last 5 characters of the sent command" )
+ output = response.split( endStr.strip()[-5:], 1 )
if output:
if debug:
main.log.debug( self.name + ": split output" )
@@ -590,7 +615,7 @@
if debug:
main.log.debug( self.handle.before )
self.handle.send( "\x03" )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
return None
except IndexError:
main.log.exception( self.name + ": Object not as expected" )
@@ -613,6 +638,46 @@
else:
main.cleanAndExit()
+ def lineCount( self, cmdStr, showResponse=False, debug=False, timeout=10, noExit=False, relaxedRegex=True ):
+ """
+ A wrapper around sendline(). Will return the number of lines returned or None on error
+
+ Required Arguments:
+ cmdStr - String to send to the pexpect session
+
+ Optional Arguments:
+ showResponse - Defaults to False. If True will log the response.
+ debug - Defaults to False. If True, will enable debug logging.
+ timeout - Defaults to 10. Amount of time in seconds for a command to return
+ before a timeout.
+ noExit - Defaults to False. If True, will not exit TestON in the event of a
+ closed channel, but instead return None
+ relaxedRegex - Defaults to True. If there is a pipe in the command send, will only try to match the last part of the piped command.
+
+ Warning: There are no sanity checking to commands sent using this method.
+
+ """
+ try:
+ numLines = self.sendline( cmdStr, showResponse, debug, timeout, noExit, relaxedRegex )
+ parsed = re.search( "(\d+)\s+(\d+)", numLines )
+ if not parsed:
+ main.log.error( "Warning, output of karaf's wc may have changed" )
+ return None
+ return parsed.group( 1 )
+ except IndexError:
+ main.log.exception( self.name + ": Object not as expected" )
+ main.log.debug( "response: {}".format( repr( response ) ) )
+ return None
+ except TypeError:
+ main.log.exception( self.name + ": Object not as expected" )
+ return None
+ except Exception:
+ main.log.exception( self.name + ": Uncaught exception!" )
+ if noExit:
+ return None
+ else:
+ main.cleanAndExit()
+
# IMPORTANT NOTE:
# For all cli commands, naming convention should match
# the cli command changing 'a:b' with 'aB'.
@@ -2895,7 +2960,7 @@
else:
cmdStr = "flows any " + str( deviceId ) + " | " +\
"grep 'state=ADDED' | wc -l"
- handle = self.sendline( cmdStr )
+ handle = self.lineCount( cmdStr )
assert handle is not None, "Error in sendline"
assert "Command not found:" not in handle, handle
return handle
@@ -2924,7 +2989,7 @@
else:
cmdStr = "groups any " + str( deviceId ) + " | " +\
"grep 'state=ADDED' | wc -l"
- handle = self.sendline( cmdStr )
+ handle = self.lineCount( cmdStr )
assert handle is not None, "Error in sendline"
assert "Command not found:" not in handle, handle
return handle
@@ -3437,7 +3502,7 @@
try:
dpid = str( dpid )
cmdStr = "onos:ports -e " + dpid + " | wc -l"
- output = self.sendline( cmdStr )
+ output = self.lineCount( cmdStr )
assert output is not None, "Error in sendline"
assert "Command not found:" not in output, output
if re.search( "No such device", output ):
@@ -3465,7 +3530,7 @@
try:
dpid = str( dpid )
cmdStr = "onos:links " + dpid + " | grep ACTIVE | wc -l"
- output = self.sendline( cmdStr )
+ output = self.lineCount( cmdStr )
assert output is not None, "Error in sendline"
assert "Command not found:" not in output, output
if re.search( "No such device", output ):
@@ -5171,7 +5236,7 @@
"""
try:
self.handle.sendline( "log:set %s %s" % ( level, app ) )
- self.handle.expect( "onos>" )
+ self.handle.expect( self.karafPrompt )
response = self.handle.before
if re.search( "Error", response ):
@@ -5340,7 +5405,7 @@
num = self.sendline( cmd )
return num
elif mode == 'total':
- totalLines = self.sendline( "cat /opt/onos/log/karaf.log | wc -l" )
+ totalLines = self.lineCount( "cat /opt/onos/log/karaf.log | wc -l" )
return int( totalLines )
else:
main.log.error( self.name + " unsupported mode" )
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index fbd6bd8..81b33b2 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -63,7 +63,7 @@
'@' +
self.ip_address +
' -o ServerAliveInterval=120 -o TCPKeepAlive=yes',
- env={ "TERM": "xterm-mono" },
+ env={ "TERM": "vt100" },
maxread=1000000 )
else:
self.handle = pexpect.spawn(
@@ -72,7 +72,7 @@
'@' +
self.ip_address +
' -o ServerAliveInterval=120 -o TCPKeepAlive=yes',
- env={ "TERM": "xterm-mono" },
+ env={ "TERM": "vt100" },
maxread=1000000,
timeout=60 )
@@ -375,7 +375,7 @@
uName +
'@' +
ipAddress,
- env={ "TERM": "xterm-mono" },
+ env={ "TERM": "vt100" },
maxread=1000000,
timeout=60 )
diff --git a/TestON/tests/HA/HAbackupRecover/HAbackupRecover.py b/TestON/tests/HA/HAbackupRecover/HAbackupRecover.py
index 7010f93..e6ba11e 100644
--- a/TestON/tests/HA/HAbackupRecover/HAbackupRecover.py
+++ b/TestON/tests/HA/HAbackupRecover/HAbackupRecover.py
@@ -88,14 +88,15 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
+ applyFuncs = [ main.HA.removeKarafConsoleLogging ]
+
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
- applyFuncs = None
else:
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
except (KeyError, IndexError):
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
main.testSetUp.ONOSSetUp( main.Cluster, cellName=cellName, extraApply=applyFuncs )
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
index 14a0898..35800d2 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
@@ -88,14 +88,15 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
+ applyFuncs = [ main.HA.removeKarafConsoleLogging ]
+
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
- applyFuncs = None
else:
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
except (KeyError, IndexError):
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
main.testSetUp.ONOSSetUp( main.Cluster, cellName=cellName, extraApply=applyFuncs )
diff --git a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
index 85ad546..d770e83 100644
--- a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
+++ b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
@@ -91,8 +91,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.customizeOnosGenPartitions, main.HA.copyBackupConfig ]
- applyArgs = [ None, None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.customizeOnosGenPartitions, main.HA.copyBackupConfig ]
+ applyArgs = [ None, None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -224,7 +224,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index 417bc39..9020edc 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -90,8 +90,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.customizeOnosGenPartitions ]
- applyArgs = [ None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.customizeOnosGenPartitions ]
+ applyArgs = [ None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -360,7 +360,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index 45852af..1be271f 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -88,10 +88,11 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.customizeOnosGenPartitions,
+ applyFuncs = [ main.HA.removeKarafConsoleLogging,
+ main.HA.customizeOnosGenPartitions,
main.HA.copyBackupConfig,
main.ONOSbench.preventAutoRespawn ]
- applyArgs = [ None, None, None ]
+ applyArgs = [ None, None, None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -216,7 +217,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HApowerFailure/HApowerFailure.py b/TestON/tests/HA/HApowerFailure/HApowerFailure.py
index e8fbe61..aa04792 100644
--- a/TestON/tests/HA/HApowerFailure/HApowerFailure.py
+++ b/TestON/tests/HA/HApowerFailure/HApowerFailure.py
@@ -88,10 +88,11 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.customizeOnosGenPartitions,
+ applyFuncs = [ main.HA.removeKarafConsoleLogging,
+ main.HA.customizeOnosGenPartitions,
main.HA.copyBackupConfig,
main.ONOSbench.preventAutoRespawn ]
- applyArgs = [ None, None, None ]
+ applyArgs = [ None, None, None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -222,7 +223,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAsanity/HAsanity.py b/TestON/tests/HA/HAsanity/HAsanity.py
index b6d00c0..eecd0f1 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.py
+++ b/TestON/tests/HA/HAsanity/HAsanity.py
@@ -87,14 +87,15 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
+ applyFuncs = [ main.HA.removeKarafConsoleLogging ]
+
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
- applyFuncs = None
else:
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
except (KeyError, IndexError):
- applyFuncs = main.HA.startingMininet
+ applyFuncs.append( main.HA.startingMininet )
main.testSetUp.ONOSSetUp( main.Cluster, cellName=cellName,
extraApply=applyFuncs, stopAtomix=True,
diff --git a/TestON/tests/HA/HAscaling/HAscaling.py b/TestON/tests/HA/HAscaling/HAscaling.py
index 6929ae7..19b0ec3 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.py
+++ b/TestON/tests/HA/HAscaling/HAscaling.py
@@ -97,8 +97,8 @@
main.log.debug( scale )
main.Cluster.setRunningNode( int( re.search( "\d+", scale ).group( 0 ) ) )
- applyFuncs = []
- applyArgs = []
+ applyFuncs = [ main.HA.removeKarafConsoleLogging ]
+ applyArgs = [ None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index 4fbdb01..c23284b 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -92,9 +92,9 @@
main.testSetUp.evnSetupConclusion( stepResult )
cellApps = str( main.params["ENV"]["appString"] )
- cellNAme = str( main.params["ENV"]["appString"] )
- applyFuncs = [ main.testSetUp.createApplyCell ]
- applyArgs = [ [ main.Cluster, True, cellName , cellApps, "", True, main.Cluster.runningNodes[ 0 ].ipAddress ] ]
+ cellName = str( main.params["ENV"]["appString"] )
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.testSetUp.createApplyCell ]
+ applyArgs = [ None, [ main.Cluster, True, cellName , cellApps, "", True, main.Cluster.runningNodes[ 0 ].ipAddress ] ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -439,7 +439,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
if not topoResult:
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.py b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
index e112f9f..0c6c7d0 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
@@ -88,8 +88,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.customizeOnosGenPartitions, main.HA.copyBackupConfig ]
- applyArgs = [ None, None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.customizeOnosGenPartitions, main.HA.copyBackupConfig ]
+ applyArgs = [ None, None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -215,7 +215,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAswapNodes/HAswapNodes.py b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
index 52da8ed..e2efe92 100644
--- a/TestON/tests/HA/HAswapNodes/HAswapNodes.py
+++ b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
@@ -89,8 +89,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.swapNodeMetadata ]
- applyArgs = [ None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.swapNodeMetadata ]
+ applyArgs = [ None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
diff --git a/TestON/tests/HA/HAupgrade/HAupgrade.py b/TestON/tests/HA/HAupgrade/HAupgrade.py
index 9f1d307..cea03c8 100644
--- a/TestON/tests/HA/HAupgrade/HAupgrade.py
+++ b/TestON/tests/HA/HAupgrade/HAupgrade.py
@@ -92,8 +92,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.copyBackupConfig ]
- applyArgs = [ None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.copyBackupConfig ]
+ applyArgs = [ None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -215,7 +215,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.py b/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.py
index 3101324..f5ae894 100644
--- a/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.py
+++ b/TestON/tests/HA/HAupgradeRollback/HAupgradeRollback.py
@@ -92,8 +92,8 @@
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- applyFuncs = [ main.HA.copyBackupConfig ]
- applyArgs = [ None ]
+ applyFuncs = [ main.HA.removeKarafConsoleLogging, main.HA.copyBackupConfig ]
+ applyArgs = [ None, None ]
try:
if main.params[ 'topology' ][ 'topoFile' ]:
main.log.info( 'Skipping start of Mininet in this case, make sure you start it elsewhere' )
@@ -215,7 +215,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
@@ -287,7 +287,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
diff --git a/TestON/tests/HA/dependencies/HA.py b/TestON/tests/HA/dependencies/HA.py
index 88d122d..c809ffe 100644
--- a/TestON/tests/HA/dependencies/HA.py
+++ b/TestON/tests/HA/dependencies/HA.py
@@ -30,6 +30,12 @@
self.default = ''
main.topoMappings = {}
+ def removeKarafConsoleLogging( self ):
+ main.ONOSbench.handle.sendline( "cd " + main.ONOSbench.home )
+ main.ONOSbench.handle.expect( main.ONOSbench.prompt )
+ main.ONOSbench.handle.sendline( "sed -i 's/-Dkaraf.log.console=INFO //g' tools/package/bin/onos-service" )
+ main.ONOSbench.handle.expect( main.ONOSbench.prompt )
+
def customizeOnosGenPartitions( self ):
# copy gen-partions file to ONOS
# NOTE: this assumes TestON and ONOS are on the same machine
@@ -266,7 +272,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
@@ -2716,7 +2722,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
@@ -2805,7 +2811,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
@@ -3392,7 +3398,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
if not topoResult:
main.cleanAndExit()
diff --git a/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py b/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
index d536106..fe4ea90 100644
--- a/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
+++ b/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
@@ -279,7 +279,7 @@
if main.params[ 'CASE2100' ][ 'RESTchkFlow' ] == 'main.TRUE':
resp = main.Cluster.active( 0 ).REST.checkFlowsState()
else:
- handle = main.Cluster.active( 0 ).CLI.flows( state=" |grep PEND|wc -l", jsonFormat=False )
+ handle = main.Cluster.active( 0 ).CLI.lineCount( "flows |grep PEND|wc -l", timeout=60 )
main.log.info( "handle returns PENDING flows: " + handle )
if handle == "0":
resp = main.TRUE
@@ -351,7 +351,7 @@
if main.params[ 'CASE3100' ][ 'RESTchkFlow' ] == 'main.TRUE':
resp = main.Cluster.active( 0 ).REST.checkFlowsState()
else:
- handle = main.Cluster.active( 0 ).CLI.flows( state=" |grep PEND|wc -l", jsonFormat=False )
+ handle = main.Cluster.active( 0 ).CLI.lineCount( "flows |grep PEND|wc -l", timeout=60 )
main.log.info( "handle returns PENDING flows: " + handle )
if handle == "0":
resp = main.TRUE
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
index 8c32a0c..645243d 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo.flex
@@ -23,7 +23,7 @@
<OFDPASwitchLeaf201>
<host>10.192.21.22</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>2</connect_order>
<COMPONENTS>
@@ -36,7 +36,7 @@
<OFDPASwitchLeaf202>
<host>10.192.21.23</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>3</connect_order>
<COMPONENTS>
@@ -49,7 +49,7 @@
<OFDPASwitchLeaf203>
<host>10.192.21.24</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>4</connect_order>
<COMPONENTS>
@@ -62,7 +62,7 @@
<OFDPASwitchLeaf204>
<host>10.192.21.25</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>5</connect_order>
<COMPONENTS>
@@ -75,7 +75,7 @@
<OFDPASwitchLeaf205>
<host>10.192.21.29</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>6</connect_order>
<COMPONENTS>
@@ -88,7 +88,7 @@
<OFDPASwitchLeaf206>
<host>10.192.21.30</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>7</connect_order>
<COMPONENTS>
@@ -101,7 +101,7 @@
<OFDPASwitchLeaf225>
<host>10.192.21.21</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>8</connect_order>
<COMPONENTS>
@@ -114,7 +114,7 @@
<OFDPASwitchLeaf226>
<host>10.192.21.26</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>9</connect_order>
<COMPONENTS>
@@ -127,7 +127,7 @@
<OFDPASwitchLeaf227>
<host>10.192.21.28</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>10</connect_order>
<COMPONENTS>
@@ -140,7 +140,7 @@
<OFDPASwitchLeaf228>
<host>10.192.21.31</host>
<user>root</user>
- <password>weekday-dude-populism-creole</password>
+ <password></password>
<type>OFDPASwitchDriver</type>
<connect_order>11</connect_order>
<COMPONENTS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex
new file mode 100644
index 0000000..7d2bd17
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params.flex
@@ -0,0 +1,59 @@
+<PARAMS>
+ <testcases>1</testcases>
+
+ <GRAPH>
+ <nodeCluster>Fabric</nodeCluster>
+ <builds>20</builds>
+ </GRAPH>
+
+ <SCALE>
+ <size>7</size>
+ <max>7</max>
+ </SCALE>
+
+ <DEPENDENCY>
+ <useCommonConf>False</useCommonConf>
+ <useCommonTopo>True</useCommonTopo>
+ <confName>flex</confName>
+ <topology>hagg_fabric.py</topology>
+ <lib>routinglib.py,trellislib.py,trellis_fabric.py</lib>
+ <conf>bgpdbgp1.conf,bgpdbgp2.conf,bgpdr1.conf,bgpdr2.conf,dhcpd6.conf,dhcpd.conf,zebradbgp1.conf,zebradbgp2.conf</conf>
+ </DEPENDENCY>
+
+ <ENV>
+ <cellName>productionCell</cellName>
+ <cellApps>drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement,t3,hostprobingprovider</cellApps>
+ </ENV>
+
+ <GIT>
+ <pull>False</pull>
+ <branch>master</branch>
+ </GIT>
+
+ <CTRL>
+ <port>6653</port>
+ </CTRL>
+
+ <timers>
+ <LinkDiscovery>30</LinkDiscovery>
+ <SwitchDiscovery>30</SwitchDiscovery>
+ <OnosDiscovery>45</OnosDiscovery>
+ <loadNetcfgSleep>5</loadNetcfgSleep>
+ <startMininetSleep>25</startMininetSleep>
+ <dhcpSleep>60</dhcpSleep>
+ <balanceMasterSleep>10</balanceMasterSleep>
+ <connectToNetSleep>30</connectToNetSleep>
+ </timers>
+
+ <TOPO>
+ <internalIpv4Hosts>h4v4,h5v4,h9v4,h10v4</internalIpv4Hosts>
+ <internalIpv6Hosts>h4v6,h5v6,h9v6,h10v6</internalIpv6Hosts>
+ <externalIpv4Hosts></externalIpv4Hosts>
+ <externalIpv6Hosts></externalIpv6Hosts>
+ <staticIpv4Hosts></staticIpv4Hosts>
+ <staticIpv6Hosts></staticIpv6Hosts>
+ <switchNum>10</switchNum>
+ <linkNum>48</linkNum>
+ </TOPO>
+
+</PARAMS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex
new file mode 100644
index 0000000..a9c3ed1
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.topo.flex
@@ -0,0 +1,232 @@
+<TOPOLOGY>
+ <COMPONENT>
+ <ONOScell>
+ <host>localhost</host> # ONOS "bench" machine
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosClusterDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS>
+ <cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
+ <diff_clihost></diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
+ <karaf_username>ubuntu</karaf_username>
+ <karaf_password>ubuntu</karaf_password>
+ <web_user></web_user>
+ <web_pass></web_pass>
+ <rest_port></rest_port>
+ <prompt></prompt> # TODO: we technically need a few of these, one per component
+ <onos_home></onos_home> # defines where onos home is
+ <nodes>3</nodes> # number of nodes in the cluster
+ </COMPONENTS>
+ </ONOScell>
+
+ <OFDPASwitchLeaf201>
+ <host>10.192.21.22</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS>
+ <shortName>s004</shortName>
+ <dpid>0x201</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf201>
+
+ <OFDPASwitchLeaf202>
+ <host>10.192.21.23</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>3</connect_order>
+ <COMPONENTS>
+ <shortName>s005</shortName>
+ <dpid>0x202</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf202>
+
+ <OFDPASwitchLeaf203>
+ <host>10.192.21.24</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>4</connect_order>
+ <COMPONENTS>
+ <shortName>s002</shortName>
+ <dpid>0x203</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf203>
+
+ <OFDPASwitchLeaf204>
+ <host>10.192.21.25</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>5</connect_order>
+ <COMPONENTS>
+ <shortName>s003</shortName>
+ <dpid>0x204</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf204>
+
+ <OFDPASwitchLeaf205>
+ <host>10.192.21.29</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>6</connect_order>
+ <COMPONENTS>
+ <shortName>s006</shortName>
+ <dpid>0x205</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf205>
+
+ <OFDPASwitchLeaf206>
+ <host>10.192.21.30</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>7</connect_order>
+ <COMPONENTS>
+ <shortName>s001</shortName>
+ <dpid>0x206</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf206>
+
+ <OFDPASwitchLeaf225>
+ <host>10.192.21.21</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>8</connect_order>
+ <COMPONENTS>
+ <shortName>s101</shortName>
+ <dpid>0x225</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf225>
+
+ <OFDPASwitchLeaf226>
+ <host>10.192.21.26</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>9</connect_order>
+ <COMPONENTS>
+ <shortName>s102</shortName>
+ <dpid>0x226</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf226>
+
+ <OFDPASwitchLeaf227>
+ <host>10.192.21.28</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>10</connect_order>
+ <COMPONENTS>
+ <shortName>s103</shortName>
+ <dpid>0x227</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf227>
+
+ <OFDPASwitchLeaf228>
+ <host>10.192.21.31</host>
+ <user>root</user>
+ <password></password>
+ <type>OFDPASwitchDriver</type>
+ <connect_order>11</connect_order>
+ <COMPONENTS>
+ <shortName>s104</shortName>
+ <dpid>0x228</dpid>
+ <confDir>/etc/ofdpa/</confDir>
+ </COMPONENTS>
+ </OFDPASwitchLeaf228>
+
+ <Host4v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>13</connect_order>
+ <COMPONENTS>
+ <ip>10.0.202.7</ip>
+ <ip6></ip6>
+ <shortName>h4v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host4v4>
+
+
+ <Host5v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>14</connect_order>
+ <COMPONENTS>
+ <ip>10.0.202.8</ip>
+ <ip6></ip6>
+ <shortName>h5v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host5v4>
+
+ <Host9v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>15</connect_order>
+ <COMPONENTS>
+ <ip>10.0.204.7</ip>
+ <ip6></ip6>
+ <shortName>h9v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host9v4>
+
+ <Host10v4>
+ <host>10.192.21.61</host>
+ <user>vyatta</user>
+ <password>vyatta</password>
+ <type>HostDriver</type>
+ <connect_order>16</connect_order>
+ <COMPONENTS>
+ <ip>10.0.204.8</ip>
+ <ip6></ip6>
+ <shortName>h10v4</shortName>
+ <ifaceName>bond0</ifaceName>
+ <inband>True</inband>
+ <username>ubuntu</username>
+ <password>ubuntu</password>
+ </COMPONENTS>
+ </Host10v4>
+
+ <NetworkBench>
+ <host>localhost</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>NetworkDriver</type>
+ <connect_order>20</connect_order>
+ <COMPONENTS>
+ </COMPONENTS>
+ </NetworkBench>
+ </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index f5e8d70..479b3f4 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -40,10 +40,10 @@
main.internalIpv4Hosts = main.params[ 'TOPO' ][ 'internalIpv4Hosts' ].split( ',' )
main.internalIpv6Hosts = main.params[ 'TOPO' ][ 'internalIpv6Hosts' ].split( ',' )
- main.externalIpv4Hosts = main.params[ 'TOPO' ][ 'externalIpv4Hosts' ].split( ',' )
- main.externalIpv6Hosts = main.params[ 'TOPO' ][ 'externalIpv6Hosts' ].split( ',' )
- main.staticIpv4Hosts = main.params[ 'TOPO' ][ 'staticIpv4Hosts' ].split( ',' )
- main.staticIpv6Hosts = main.params[ 'TOPO' ][ 'staticIpv6Hosts' ].split( ',' )
+ main.externalIpv4Hosts = main.params[ 'TOPO' ][ 'externalIpv4Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('externalIpv4Hosts') else []
+ main.externalIpv6Hosts = main.params[ 'TOPO' ][ 'externalIpv6Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('externalIpv6Hosts') else []
+ main.staticIpv4Hosts = main.params[ 'TOPO' ][ 'staticIpv4Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('staticIpv4Hosts') else []
+ main.staticIpv6Hosts = main.params[ 'TOPO' ][ 'staticIpv6Hosts' ].split( ',' ) if main.params[ 'TOPO' ].get('staticIpv6Hosts') else []
main.disconnectedIpv4Hosts = []
main.disconnectedIpv6Hosts = []
main.disconnectedExternalIpv4Hosts = []
@@ -56,8 +56,11 @@
lib.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
# Load configuration files
- main.cfgName = 'TEST_CONFIG_ipv4={}_ipv6={}'.format( 1 if ipv4 else 0,
- 1 if ipv6 else 0)
+ if hasattr( main, "Mininet1" ):
+ main.cfgName = 'TEST_CONFIG_ipv4={}_ipv6={}'.format( 1 if ipv4 else 0,
+ 1 if ipv6 else 0)
+ else:
+ main.cfgName = main.params[ "DEPENDENCY" ][ "confName" ]
lib.loadJson( main )
time.sleep( float( main.params[ 'timers' ][ 'loadNetcfgSleep' ] ) )
lib.loadHost( main )
@@ -82,9 +85,8 @@
time.sleep( float( main.params[ "timers" ][ "startMininetSleep" ] ) )
else:
# Run the test with physical devices
- lib.connectToPhysicalNetwork( main, self.switchNames )
- # Check if the devices are up
- lib.checkDevices( main, switches=len( self.switchNames ) )
+ lib.connectToPhysicalNetwork( main )
+
# wait some time for onos to install the rules!
time.sleep( float( main.params[ 'timers' ][ 'dhcpSleep' ] ) )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host
new file mode 100644
index 0000000..0ccf382
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/host/flex.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "0A:5E:0D:F3:EC:D4/None": "10.0.202.7",
+ "12:1C:B7:5C:69:68/None": "10.0.202.8",
+ "EA:DA:19:1E:CB:7D/None": "10.0.204.7",
+ "A2:9B:16:E8:2A:52/None": "10.0.204.8"
+ },
+ "network":
+ {
+ "h4v4": "10.0.202.7",
+ "h5v4": "10.0.202.8",
+ "h9v4": "10.0.204.7",
+ "h10v4": "10.0.204.8"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json
new file mode 100644
index 0000000..c8f1ff2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/flex.json
@@ -0,0 +1,460 @@
+{
+ "ports" : {
+ "of:0000000000000205/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.205.254/24" ],
+ "vlan-untagged": 205
+ }]
+ },
+ "of:0000000000000205/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.205.254/24" ],
+ "vlan-untagged": 205
+ }]
+ },
+ "of:0000000000000206/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.206.254/24" ],
+ "vlan-untagged": 206
+ }]
+ },
+ "of:0000000000000206/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.206.254/24" ],
+ "vlan-untagged": 206
+ }]
+ },
+ "of:0000000000000203/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000203/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-tagged": [204]
+ }]
+ },
+ "of:0000000000000204/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-untagged": 204
+ }]
+ },
+ "of:0000000000000204/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.204.254/24" ],
+ "vlan-tagged": [204]
+ }]
+ },
+ "of:0000000000000201/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000201/17" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.101.254/24" ],
+ "vlan-untagged": 101
+ }]
+ },
+ "of:0000000000000201/18" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.101.254/24" ],
+ "vlan-untagged": 101
+ }]
+ },
+ "of:0000000000000201/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-tagged": [202]
+ }]
+ },
+ "of:0000000000000202/1" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/2" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/3" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/4" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/5" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/6" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/7" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/8" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-untagged": 202
+ }]
+ },
+ "of:0000000000000202/17" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.102.254/24" ],
+ "vlan-untagged": 102
+ }]
+ },
+ "of:0000000000000202/18" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.102.254/24" ],
+ "vlan-untagged": 102
+ }]
+ },
+ "of:0000000000000202/20" : {
+ "interfaces" : [{
+ "ips" : [ "10.0.202.254/24" ],
+ "vlan-tagged": [202]
+ }]
+ }
+ },
+ "devices" : {
+ "of:0000000000000201" : {
+ "basic" : {
+ "name": "201-qmx",
+ "latitude" : 34,
+ "longitude": -95
+ },
+ "segmentrouting" : {
+ "ipv4NodeSid" : 201,
+ "ipv4Loopback" : "192.168.0.201",
+ "ipv6NodeSid" : 201,
+ "ipv6Loopback" : "2000::c0a8:0201",
+ "routerMac" : "00:00:02:01:02:02",
+ "pairDeviceId" : "of:0000000000000202",
+ "pairLocalPort" : 20,
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000202" : {
+ "basic" : {
+ "name": "202-qmx",
+ "latitude" : 34,
+ "longitude": -90
+ },
+ "segmentrouting" : {
+ "ipv4NodeSid" : 202,
+ "ipv4Loopback" : "192.168.0.202",
+ "ipv6NodeSid" : 202,
+ "ipv6Loopback" : "2000::c0a8:0202",
+ "routerMac" : "00:00:02:01:02:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000201",
+ "pairLocalPort" : 20,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000203" : {
+ "basic" : {
+ "name": "203-qmx",
+ "latitude" : 34,
+ "longitude": -108
+ },
+ "segmentrouting" : {
+ "name" : "Leaf2-R1",
+ "ipv4NodeSid" : 203,
+ "ipv4Loopback" : "192.168.0.203",
+ "ipv6NodeSid" : 203,
+ "ipv6Loopback" : "2000::c0a8:0203",
+ "routerMac" : "00:00:02:03:02:04",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000204",
+ "pairLocalPort" : 20,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000204" : {
+ "basic" : {
+ "name": "204-qmx",
+ "latitude" : 34,
+ "longitude": -103
+ },
+ "segmentrouting" : {
+ "name" : "Leaf1-R1",
+ "ipv4NodeSid" : 204,
+ "ipv4Loopback" : "192.168.0.204",
+ "ipv6NodeSid" : 204,
+ "ipv6Loopback" : "2000::c0a8:0204",
+ "routerMac" : "00:00:02:03:02:04",
+ "pairDeviceId" : "of:0000000000000203",
+ "pairLocalPort" : 20,
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000225" : {
+ "basic" : {
+ "name": "225-t2",
+ "latitude" : 42,
+ "longitude": -100
+ },
+ "segmentrouting" : {
+ "name" : "SpineToma-0",
+ "ipv4NodeSid" : 225,
+ "ipv4Loopback" : "192.168.0.225",
+ "ipv6NodeSid" : 225,
+ "ipv6Loopback" : "2000::c0a8:0225",
+ "routerMac" : "00:00:02:25:00:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000226" : {
+ "basic" : {
+ "name": "226-tmhk",
+ "latitude" : 42,
+ "longitude": -95
+ },
+ "segmentrouting" : {
+ "name" : "Spine1",
+ "ipv4NodeSid" : 226,
+ "ipv4Loopback" : "192.168.0.226",
+ "ipv6NodeSid" : 226,
+ "ipv6Loopback" : "2000::c0a8:0226",
+ "routerMac" : "00:00:02:26:00:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000205":{
+ "basic":{
+ "name":"205-qmx",
+ "latitude":34,
+ "longitude":-120
+ },
+ "segmentrouting":{
+ "name":"Leaf1",
+ "ipv4NodeSid":205,
+ "ipv4Loopback":"192.168.0.205",
+ "ipv6NodeSid":205,
+ "ipv6Loopback":"2000::c0a8:0205",
+ "routerMac":"00:00:02:05:06:01",
+ "isEdgeRouter":true,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000206":{
+ "basic":{
+ "name":"206-qmx",
+ "latitude":34,
+ "longitude":-115
+ },
+ "segmentrouting":{
+ "name":"Leaf2",
+ "ipv4NodeSid":206,
+ "ipv4Loopback":"192.168.0.206",
+ "ipv6NodeSid":206,
+ "ipv6Loopback":"2000::c0a8:0206",
+ "routerMac":"00:00:02:06:06:01",
+ "isEdgeRouter":true,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000227":{
+ "basic":{
+ "name":"227-tmhk",
+ "latitude":38,
+ "longitude":-119
+ },
+ "segmentrouting":{
+ "name":"Spine1",
+ "ipv4NodeSid":227,
+ "ipv4Loopback":"192.168.0.227",
+ "ipv6NodeSid":227,
+ "ipv6Loopback":"2000::c0a8:0227",
+ "routerMac":"00:00:02:27:00:01",
+ "isEdgeRouter":false,
+ "adjacencySids":[
+ ]
+ }
+ },
+ "of:0000000000000228":{
+ "basic":{
+ "name":"228-t2",
+ "latitude":38,
+ "longitude":-116
+ },
+ "segmentrouting":{
+ "name":"Spine2",
+ "ipv4NodeSid":228,
+ "ipv4Loopback":"192.168.0.228",
+ "ipv6NodeSid":228,
+ "ipv6Loopback":"2000::c0a8:0228",
+ "routerMac":"00:00:02:28:00:01",
+ "isEdgeRouter":false,
+ "adjacencySids":[
+ ]
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default" : [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000204/8",
+ "serverIps": ["10.0.204.8"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart
new file mode 100644
index 0000000..784fbd3
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/flex.linkFailureChart
@@ -0,0 +1,17 @@
+{
+ "link_batch_1" : { "links" : { "link1" : ["spine103", "spine101"],
+ "link2" : ["leaf2", "spine101"],
+ "link3" : ["leaf3", "spine101"],
+ "link4" : ["leaf4", "spine101"],
+ "link5" : ["leaf5", "spine101"] },
+ "links_before" : 48,
+ "links_after" : 30 },
+ "link_batch_2" : { "links" : { "link1" : ["spine104", "spine102"],
+ "link2" : ["leaf2", "spine102"],
+ "link3" : ["leaf3", "spine102"],
+ "link4" : ["leaf4", "spine102"],
+ "link5" : ["leaf5", "spine102"] },
+ "links_before" : 48,
+ "links_after" : 30 }
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart
new file mode 100644
index 0000000..96e4982
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/switchFailure/flex.switchFailureChart
@@ -0,0 +1,10 @@
+{
+ "spine101": { "switches_before_failure": 10,
+ "links_before_failure": 48,
+ "switches_after_failure": 9,
+ "links_after_failure": 30 },
+ "spine102": { "switches_before_failure": 10,
+ "links_before_failure": 48,
+ "switches_after_failure": 9,
+ "links_after_failure": 30 }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 4d6c1c1..0b32c5a 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -897,7 +897,7 @@
for ctrl in main.Cluster.runningNodes:
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) )
main.log.error( "Failed to kill ONOS, stopping test" )
main.cleanAndExit()
@@ -1183,7 +1183,7 @@
mininetName = None
scapyHandle.startHostCli( mininetName )
else:
- main.Network.createComponent( scapyName )
+ main.Network.createHostComponent( scapyName )
scapyHandle = getattr( main, scapyName )
scapyHandle.connectInband()
main.scapyHosts.append( scapyHandle )
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index a601569..6ea5361 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -438,7 +438,7 @@
for ctrl in main.Cluster.active():
main.log.debug( "{} components not ACTIVE: \n{}".format(
ctrl.name,
- ctrl.CLI.sendline( "scr:list | grep -v ACTIVE" ) ) )
+ ctrl.CLI.sendline( "onos:scr-list | grep -v ACTIVE" ) ) ) #FIXME: This output has changed a lot
main.log.error( "Failed to start ONOS, stopping test" )
main.cleanAndExit()
return main.TRUE
diff --git a/TestON/tests/dependencies/topology.py b/TestON/tests/dependencies/topology.py
index ae2b89c..720bf92 100644
--- a/TestON/tests/dependencies/topology.py
+++ b/TestON/tests/dependencies/topology.py
@@ -254,8 +254,11 @@
main.log.info( "Creating component for host {}".format( src ) )
main.Network.createHostComponent( src )
hostHandle = getattr( main, src )
- main.log.info( "Starting CLI on host {}".format( src ) )
- hostHandle.startHostCli()
+ if hasattr( main, 'Mininet1' ):
+ main.log.info( "Starting CLI on host {}".format( src ) )
+ hostHandle.startHostCli()
+ else:
+ hostHandle.connectInband()
srcIpList[ src ] = main.Network.getIPAddress( src, proto='IPV6' if ipv6 else 'IPV4' )
unexpectedPings = []
for dst in dstList: