[ONOS-7039] [ONOS-7044] Fix PEP8 Warnings in TestON
Change-Id: Ied79ff9caff5487a6df50466307f757468d7ca3a
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
index 08e437b..2712c3f 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +18,7 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
-
Description: This test is to determine if ONOS can handle
all of it's nodes restarting
@@ -110,11 +108,12 @@
Assign mastership to controllers
"""
main.HA.assignMastership( main )
+
def CASE3( self, main ):
"""
Assign intents
"""
- main.HA.assignIntents(main)
+ main.HA.assignIntents( main )
def CASE4( self, main ):
"""
@@ -167,7 +166,7 @@
ready = utilities.retry( main.Cluster.command,
False,
- kwargs={ "function":"summary", "contentCheck":True },
+ kwargs={ "function": "summary", "contentCheck": True },
sleep=30,
attempts=10 )
utilities.assert_equals( expect=True, actual=ready,
diff --git a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
index 026be2d..811e04f 100644
--- a/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
+++ b/TestON/tests/HA/HAcontinuousStopNodes/HAcontinuousStopNodes.py
@@ -1,5 +1,5 @@
"""
-Copyright 2017 Open Networking Foundation (ONF)
+Copyright 2017 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
a minority of it's nodes restarting
@@ -103,7 +102,6 @@
extraClean=main.HA.cleanUpGenPartition )
main.HA.initialSetUp()
-
def CASE2( self, main ):
"""
Assign devices to controllers
@@ -255,8 +253,6 @@
"""
main.HA.compareTopo( main )
-
-
def CASE9( self, main ):
"""
Link s3-s28 down
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index c3a2038..cf7fe73 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -1,5 +1,5 @@
"""
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
a full network partion
@@ -102,7 +101,6 @@
extraClean=main.HA.cleanUpGenPartition )
main.HA.initialSetUp()
-
def CASE2( self, main ):
"""
Assign devices to controllers
@@ -165,9 +163,9 @@
this = iCtrl.Bench.sshToNode( iCtrl.ipAddress )
if i not in main.partition:
for j in main.partition:
- foe = main.Cluster.runningNodes[ j ]
+ foe = main.Cluster.runningNodes[ j ]
main.log.warn( "Setting IP Tables rule from {} to {}. ".format( iCtrl.ipAddress, foe.ipAddress ) )
- #CMD HERE
+ # CMD HERE
try:
cmdStr = "sudo iptables -A {} -d {} -s {} -j DROP".format( "INPUT", iCtrl.ipAddress, foe.ipAddress )
this.sendline( cmdStr )
@@ -185,7 +183,7 @@
if j not in main.partition:
foe = main.Cluster.runningNodes[ j ]
main.log.warn( "Setting IP Tables rule from {} to {}. ".format( iCtrl.ipAddress, foe.ipAddress ) )
- #CMD HERE
+ # CMD HERE
cmdStr = "sudo iptables -A {} -d {} -s {} -j DROP".format( "INPUT", iCtrl.ipAddress, foe.ipAddress )
try:
this.sendline( cmdStr )
@@ -235,7 +233,7 @@
for node in main.partition:
main.Cluster.runningNodes[ node ].active = True
- '''
+ """
# NOTE : Not sure if this can be removed
main.activeNodes.sort()
try:
@@ -244,8 +242,7 @@
except AssertionError:
main.log.exception( "" )
main.cleanAndExit()
- '''
-
+ """
main.step( "Checking ONOS nodes" )
nodeResults = utilities.retry( main.HA.nodesCheck,
False,
@@ -269,7 +266,6 @@
"""
Check state after ONOS failure
"""
-
main.HA.checkStateAfterEvent( main, afterWhich=0 )
main.step( "Leadership Election is still functional" )
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index 4a95206..01ebe38 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
a minority of it's nodes restarting
@@ -95,7 +94,7 @@
main.HA.customizeOnosGenPartitions,
main.HA.copyBackupConfig,
main.ONOSbench.preventAutoRespawn ],
- extraClean= main.HA.cleanUpGenPartition )
+ extraClean=main.HA.cleanUpGenPartition )
main.HA.initialSetUp( serviceClean=True )
@@ -149,7 +148,7 @@
main.kill.append( main.Cluster.runningNodes[ p - 1 ] )
# NOTE: This only works for cluster sizes of 3,5, or 7.
- #NOTE: This is to fix an issue with wiki formating
+ # NOTE: This is to fix an issue with wiki formating
nodeNames = [ node.name for node in main.kill ]
main.step( "Killing nodes: " + str( nodeNames ) )
killResults = main.TRUE
diff --git a/TestON/tests/HA/HAsanity/HAsanity.py b/TestON/tests/HA/HAsanity/HAsanity.py
index 82eeac5..baff818 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.py
+++ b/TestON/tests/HA/HAsanity/HAsanity.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if the HA test setup is
working correctly. There are no failures so this test should
diff --git a/TestON/tests/HA/HAscaling/HAscaling.py b/TestON/tests/HA/HAscaling/HAscaling.py
index f986cc2..63aa1e5 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.py
+++ b/TestON/tests/HA/HAscaling/HAscaling.py
@@ -1,5 +1,5 @@
"""
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
dynamic scaling of the cluster size.
@@ -246,7 +245,6 @@
"""
Check state after ONOS scaling
"""
-
main.HA.checkStateAfterEvent( main, afterWhich=1 )
main.step( "Leadership Election is still functional" )
diff --git a/TestON/tests/HA/HAscaling/dependencies/Server.py b/TestON/tests/HA/HAscaling/dependencies/Server.py
index 1a4b550..dbb1247 100644
--- a/TestON/tests/HA/HAscaling/dependencies/Server.py
+++ b/TestON/tests/HA/HAscaling/dependencies/Server.py
@@ -1,5 +1,5 @@
"""
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,10 +18,10 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"Functions for using the SimpleHTTPServer python module"
import re
+
class Server():
def __init__( self ):
@@ -65,7 +65,7 @@
if logDir:
cmd += " &> {}".format( logDir ) # pipe all output to a file
else:
- cmd += "&> {dev/null}" # Throw away all output
+ cmd += "&> {dev/null}" # Throw away all output
cmd += " &"
handle.sendline( cmd )
handle.expect( "\$" )
@@ -79,7 +79,7 @@
main.log.debug( handle.before )
retValue = main.FALSE
# capture PID for later use
- # EX: [1] 67987
+ # EX: [ 1 ] 67987
match = re.search( "\[\d\] (?P<PID>\d+)", response )
if match:
self.PID = match.group( "PID" )
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index eeb4310..584232a 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if a single
instance ONOS 'cluster' can handle a restart
@@ -409,7 +408,7 @@
mastershipCheck = mastershipCheck and main.TRUE
else:
main.log.warn( "Mastership of switch %s changed; old: %s, new: %s" % ( switchDPID,
- old, current ) )
+ old, current ) )
mastershipCheck = main.FALSE
utilities.assert_equals(
expect=main.TRUE,
@@ -446,57 +445,6 @@
# NOTE: Store has no durability, so intents are lost across system
# restarts
- """
- main.step( "Compare current intents with intents before the failure" )
- # NOTE: this requires case 5 to pass for intentState to be set.
- # maybe we should stop the test if that fails?
- sameIntents = main.FALSE
- try:
- intentState
- except NameError:
- main.log.warn( "No previous intent state was saved" )
- else:
- if intentState and intentState == ONOSIntents[ 0 ]:
- sameIntents = main.TRUE
- main.log.info( "Intents are consistent with before failure" )
- # TODO: possibly the states have changed? we may need to figure out
- # what the acceptable states are
- elif len( intentState ) == len( ONOSIntents[ 0 ] ):
- sameIntents = main.TRUE
- try:
- before = json.loads( intentState )
- after = json.loads( ONOSIntents[ 0 ] )
- for intent in before:
- if intent not in after:
- sameIntents = main.FALSE
- main.log.debug( "Intent is not currently in ONOS " +
- "(at least in the same form):" )
- main.log.debug( json.dumps( intent ) )
- except ( ValueError, TypeError ):
- main.log.exception( "Exception printing intents" )
- main.log.debug( repr( ONOSIntents[ 0 ] ) )
- main.log.debug( repr( intentState ) )
- if sameIntents == main.FALSE:
- try:
- main.log.debug( "ONOS intents before: " )
- main.log.debug( json.dumps( json.loads( intentState ),
- sort_keys=True, indent=4,
- separators=( ',', ': ' ) ) )
- main.log.debug( "Current ONOS intents: " )
- main.log.debug( json.dumps( json.loads( ONOSIntents[ 0 ] ),
- sort_keys=True, indent=4,
- separators=( ',', ': ' ) ) )
- except ( ValueError, TypeError ):
- main.log.exception( "Exception printing intents" )
- main.log.debug( repr( ONOSIntents[ 0 ] ) )
- main.log.debug( repr( intentState ) )
- utilities.assert_equals(
- expect=main.TRUE,
- actual=sameIntents,
- onpass="Intents are consistent with before failure",
- onfail="The Intents changed during failure" )
- intentCheck = intentCheck and sameIntents
- """
main.step( "Get the OF Table entries and compare to before " +
"component failure" )
FlowTables = main.TRUE
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.py b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
index e7bdcd4..7b57730 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
a minority of it's nodes restarting
@@ -94,7 +93,7 @@
extraApply=[ main.HA.startingMininet,
main.HA.customizeOnosGenPartitions,
main.HA.copyBackupConfig ],
- extraClean= main.HA.cleanUpGenPartition )
+ extraClean=main.HA.cleanUpGenPartition )
main.HA.initialSetUp( serviceClean=True )
@@ -148,7 +147,7 @@
main.kill.append( main.Cluster.runningNodes[ p - 1 ] )
# NOTE: This only works for cluster sizes of 3,5, or 7.
- #NOTE: This is to fix an issue with wiki formating
+ # NOTE: This is to fix an issue with wiki formating
nodeNames = [ node.name for node in main.kill ]
main.step( "Stopping nodes: " + str( nodeNames ) )
killResults = main.TRUE
diff --git a/TestON/tests/HA/HAswapNodes/HAswapNodes.py b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
index 1fa8106..e0751f6 100644
--- a/TestON/tests/HA/HAswapNodes/HAswapNodes.py
+++ b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
@@ -1,5 +1,5 @@
"""
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"""
Description: This test is to determine if ONOS can handle
dynamic swapping of cluster nodes.
@@ -96,15 +95,14 @@
main.testSetUp.evnSetupConclusion( stepResult )
main.HA.generateGraph( "HAswapNodes" )
-
main.testSetUp.ONOSSetUp( main.Mininet1, main.Cluster, cellName=cellName, removeLog=True,
- extraApply=[ main.HA.setServerForCluster,
- main.HA.swapNodeMetadata,
- main.HA.startingMininet,
- main.HA.copyBackupConfig,
- main.HA.setMetadataUrl ],
- extraClean=main.HA.cleanUpOnosService,
- installMax=True )
+ extraApply=[ main.HA.setServerForCluster,
+ main.HA.swapNodeMetadata,
+ main.HA.startingMininet,
+ main.HA.copyBackupConfig,
+ main.HA.setMetadataUrl ],
+ extraClean=main.HA.cleanUpOnosService,
+ installMax=True )
main.HA.initialSetUp()
def CASE2( self, main ):
@@ -211,9 +209,9 @@
onpass="Nodes check successful",
onfail="Nodes check NOT successful" )
- ready = utilities.retry( main.Cluster.command,
+ ready = utilities.retry( main.Cluster.command,
False,
- kwargs={ "function":"summary", "contentCheck":True },
+ kwargs={ "function": "summary", "contentCheck": True },
sleep=30,
attempts=10 )
utilities.assert_equals( expect=True, actual=ready,
@@ -235,23 +233,10 @@
main.HA.commonChecks()
- """
- # Note: Do we really want this? It will revert the changes we have made from this test case.
-
- main.step( "Reapplying cell variable to environment" )
- cellName = main.params[ 'ENV' ][ 'cellName' ]
- cellResult = main.ONOSbench.setCell( cellName )
- utilities.assert_equals( expect=main.TRUE, actual=cellResult,
- onpass="Set cell successfull",
- onfail="Failled to set cell" )
- """
-
-
def CASE7( self, main ):
"""
Check state after ONOS scaling
"""
-
main.HA.checkStateAfterEvent( main, afterWhich=1 )
main.step( "Leadership Election is still functional" )
diff --git a/TestON/tests/HA/HAswapNodes/dependencies/Server.py b/TestON/tests/HA/HAswapNodes/dependencies/Server.py
index 1a4b550..dbb1247 100644
--- a/TestON/tests/HA/HAswapNodes/dependencies/Server.py
+++ b/TestON/tests/HA/HAswapNodes/dependencies/Server.py
@@ -1,5 +1,5 @@
"""
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,10 +18,10 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
"Functions for using the SimpleHTTPServer python module"
import re
+
class Server():
def __init__( self ):
@@ -65,7 +65,7 @@
if logDir:
cmd += " &> {}".format( logDir ) # pipe all output to a file
else:
- cmd += "&> {dev/null}" # Throw away all output
+ cmd += "&> {dev/null}" # Throw away all output
cmd += " &"
handle.sendline( cmd )
handle.expect( "\$" )
@@ -79,7 +79,7 @@
main.log.debug( handle.before )
retValue = main.FALSE
# capture PID for later use
- # EX: [1] 67987
+ # EX: [ 1 ] 67987
match = re.search( "\[\d\] (?P<PID>\d+)", response )
if match:
self.PID = match.group( "PID" )
diff --git a/TestON/tests/HA/dependencies/HA.py b/TestON/tests/HA/dependencies/HA.py
index 48b64c6..2227146 100644
--- a/TestON/tests/HA/dependencies/HA.py
+++ b/TestON/tests/HA/dependencies/HA.py
@@ -1,5 +1,5 @@
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
import json
import time
@@ -2795,7 +2794,7 @@
main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
main.Mininet1.ip_address,
- cellAppString, ipList , main.ONOScli1.karafUser )
+ cellAppString, ipList, main.ONOScli1.karafUser )
main.step( "Applying cell variable to environment" )
cellResult = main.ONOSbench.setCell( cellName )
verifyResult = main.ONOSbench.verifyCell()
@@ -2814,7 +2813,7 @@
assert utilities.assert_equals, "utilities.assert_equals not defined"
main.case( "Running ONOS Constant State Tests" )
- OnosAfterWhich = [ "failure" , "scaliing" ]
+ OnosAfterWhich = [ "failure", "scaliing" ]
# Assert that each device has a master
self.checkRoleNotNull()
@@ -2981,7 +2980,7 @@
utilities.assert_equals(
expect=main.TRUE,
actual=sameIntents,
- onpass="Intents are consistent with before " + OnosAfterWhich[ afterWhich ] ,
+ onpass="Intents are consistent with before " + OnosAfterWhich[ afterWhich ],
onfail="The Intents changed during " + OnosAfterWhich[ afterWhich ] )
intentCheck = intentCheck and sameIntents
@@ -3032,7 +3031,6 @@
# we expect loss in dataplane connectivity
LossInPings = main.FALSE
"""
-
def compareTopo( self, main ):
"""
Compare topo
@@ -3086,7 +3084,7 @@
"Error with host ipAddresses on controller" +
controllerStr + ": " + str( host ) )
ipResult = main.FALSE
- ports = main.topoRelated.getAll( "ports" , True,
+ ports = main.topoRelated.getAll( "ports", True,
kwargs={ 'sleep': 5, 'attempts': 5,
'randomTime': True } )
links = main.topoRelated.getAll( "links", True,
diff --git a/TestON/tests/HA/dependencies/obelisk.py b/TestON/tests/HA/dependencies/obelisk.py
old mode 100755
new mode 100644
index 40cc242..c43941c
--- a/TestON/tests/HA/dependencies/obelisk.py
+++ b/TestON/tests/HA/dependencies/obelisk.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -10,7 +10,7 @@
TestON is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
+ ( at your option ) any later version.
TestON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,63 +20,65 @@
You should have received a copy of the GNU General Public License
along with TestON. If not, see <http://www.gnu.org/licenses/>.
"""
-
from mininet.topo import Topo
+
class ObeliskTopo( Topo ):
+
def __init__( self ):
Topo.__init__( self )
- topSwitch = self.addSwitch('s1',dpid='1000'.zfill(16))
- leftTopSwitch = self.addSwitch('s2',dpid='2000'.zfill(16))
- rightTopSwitch = self.addSwitch('s5',dpid='5000'.zfill(16))
- leftBotSwitch = self.addSwitch('s3',dpid='3000'.zfill(16))
- rightBotSwitch = self.addSwitch('s6',dpid='6000'.zfill(16))
- midBotSwitch = self.addSwitch('s28',dpid='2800'.zfill(16))
+ topSwitch = self.addSwitch( 's1', dpid='1000'.zfill( 16 ) )
+ leftTopSwitch = self.addSwitch( 's2', dpid='2000'.zfill( 16 ) )
+ rightTopSwitch = self.addSwitch( 's5', dpid='5000'.zfill( 16 ) )
+ leftBotSwitch = self.addSwitch( 's3', dpid='3000'.zfill( 16 ) )
+ rightBotSwitch = self.addSwitch( 's6', dpid='6000'.zfill( 16 ) )
+ midBotSwitch = self.addSwitch( 's28', dpid='2800'.zfill( 16 ) )
topHost = self.addHost( 'h1' )
- leftTopHost = self.addHost('h2')
- rightTopHost = self.addHost('h5')
- leftBotHost = self.addHost('h3')
- rightBotHost = self.addHost('h6')
- midBotHost = self.addHost('h28')
- self.addLink(topSwitch,topHost)
- self.addLink(leftTopSwitch,leftTopHost)
- self.addLink(rightTopSwitch,rightTopHost)
- self.addLink(leftBotSwitch,leftBotHost)
- self.addLink(rightBotSwitch,rightBotHost)
- self.addLink(midBotSwitch,midBotHost)
- self.addLink(leftTopSwitch,rightTopSwitch)
- self.addLink(topSwitch,leftTopSwitch)
- self.addLink(topSwitch,rightTopSwitch)
- self.addLink(leftTopSwitch,leftBotSwitch)
- self.addLink(rightTopSwitch,rightBotSwitch)
- self.addLink(leftBotSwitch,midBotSwitch)
- self.addLink(midBotSwitch,rightBotSwitch)
+ leftTopHost = self.addHost( 'h2' )
+ rightTopHost = self.addHost( 'h5' )
+ leftBotHost = self.addHost( 'h3' )
+ rightBotHost = self.addHost( 'h6' )
+ midBotHost = self.addHost( 'h28' )
+ self.addLink( topSwitch, topHost )
+ self.addLink( leftTopSwitch, leftTopHost )
+ self.addLink( rightTopSwitch, rightTopHost )
+ self.addLink( leftBotSwitch, leftBotHost )
+ self.addLink( rightBotSwitch, rightBotHost )
+ self.addLink( midBotSwitch, midBotHost )
+ self.addLink( leftTopSwitch, rightTopSwitch )
+ self.addLink( topSwitch, leftTopSwitch )
+ self.addLink( topSwitch, rightTopSwitch )
+ self.addLink( leftTopSwitch, leftBotSwitch )
+ self.addLink( rightTopSwitch, rightBotSwitch )
+ self.addLink( leftBotSwitch, midBotSwitch )
+ self.addLink( midBotSwitch, rightBotSwitch )
- agg1Switch = self.addSwitch('s4',dpid = '3004'.zfill(16))
- agg2Switch = self.addSwitch('s7',dpid = '6007'.zfill(16))
- agg1Host = self.addHost('h4')
- agg2Host = self.addHost('h7')
- self.addLink(agg1Switch,agg1Host)
- self.addLink(agg2Switch,agg2Host)
- self.addLink(agg1Switch, leftBotSwitch)
- self.addLink(agg2Switch, rightBotSwitch)
+ agg1Switch = self.addSwitch( 's4', dpid='3004'.zfill( 16 ) )
+ agg2Switch = self.addSwitch( 's7', dpid='6007'.zfill( 16 ) )
+ agg1Host = self.addHost( 'h4' )
+ agg2Host = self.addHost( 'h7' )
+ self.addLink( agg1Switch, agg1Host )
+ self.addLink( agg2Switch, agg2Host )
+ self.addLink( agg1Switch, leftBotSwitch )
+ self.addLink( agg2Switch, rightBotSwitch )
- for i in range(10):
- num = str(i+8)
- switch = self.addSwitch('s'+num,dpid = ('30'+num.zfill(2)).zfill(16))
- host = self.addHost('h'+num)
- self.addLink(switch, host)
- self.addLink(switch, agg1Switch)
+ for i in range( 10 ):
+ num = str( i + 8 )
+ switch = self.addSwitch( 's' + num, dpid=( '30' + num.zfill( 2 ) ).zfill( 16 ) )
+ host = self.addHost( 'h' + num )
+ self.addLink( switch, host )
+ self.addLink( switch, agg1Switch )
- for i in range(10):
- num = str(i+18)
- switch = self.addSwitch('s'+num,dpid = ('60'+num.zfill(2)).zfill(16))
- host = self.addHost('h'+num)
- self.addLink(switch, host)
- self.addLink(switch, agg2Switch)
+ for i in range( 10 ):
+ num = str( i + 18 )
+ switch = self.addSwitch( 's' + num, dpid=( '60' + num.zfill( 2 ) ).zfill( 16 ) )
+ host = self.addHost( 'h' + num )
+ self.addLink( switch, host )
+ self.addLink( switch, agg2Switch )
-topos = { 'obelisk': (lambda: ObeliskTopo() ) }
+topos = { 'obelisk': ( lambda: ObeliskTopo() ) }
+
def run():
topo = ObeliskTopo()