Jon Hall
Committed by Gerrit Code Review

Add HA.py

A set of mininet based HA tests based on onos.py
Currently includes the following tests:
    - a control network partitioning test
    - A dynamic cluster scaling test

Change-Id: I9a8e1019dcc51666fee1d933afd66ff390592525
This diff is collapsed. Click to expand it.
...@@ -117,7 +117,8 @@ def updateNodeIPs( env, nodes ): ...@@ -117,7 +117,8 @@ def updateNodeIPs( env, nodes ):
117 for index, node in enumerate( nodes, 1 ): 117 for index, node in enumerate( nodes, 1 ):
118 var = 'OC%d' % index 118 var = 'OC%d' % index
119 env[ var ] = node.IP() 119 env[ var ] = node.IP()
120 - env[ 'OCI' ] = env[ 'OCN' ] = env[ 'OC1' ] 120 + if nodes:
121 + env[ 'OCI' ] = env[ 'OCN' ] = env[ 'OC1' ]
121 env[ 'ONOS_INSTANCES' ] = '\n'.join( 122 env[ 'ONOS_INSTANCES' ] = '\n'.join(
122 node.IP() for node in nodes ) 123 node.IP() for node in nodes )
123 environ.update( env ) 124 environ.update( env )
...@@ -242,6 +243,7 @@ class ONOSNode( Controller ): ...@@ -242,6 +243,7 @@ class ONOSNode( Controller ):
242 self.ONOS_HOME = '/tmp' 243 self.ONOS_HOME = '/tmp'
243 self.cmd( 'rm -rf', self.dir ) 244 self.cmd( 'rm -rf', self.dir )
244 self.ONOS_HOME = unpackONOS( self.dir, run=self.ucmd ) 245 self.ONOS_HOME = unpackONOS( self.dir, run=self.ucmd )
246 + self.ONOS_ROOT = ONOS_ROOT
245 247
246 # pylint: disable=arguments-differ 248 # pylint: disable=arguments-differ
247 249
......