Fixed control network/user datapath networks.
This commit is contained in:
+5
-5
@@ -400,11 +400,9 @@ def nameGen( prefix ):
|
|||||||
# For the user datapath, we create an explicit control network.
|
# For the user datapath, we create an explicit control network.
|
||||||
# Note: Instead of routing, we could bridge or use "in-band" control
|
# Note: Instead of routing, we could bridge or use "in-band" control
|
||||||
|
|
||||||
def configRoutedControlNetwork( controller, switches,
|
def configureRoutedControlNetwork( controller, switches, ips):
|
||||||
ipGen=ipGen, ipStart=( 10, 123, 0, 1 ) ):
|
|
||||||
"""Configure a routed control network on controller and switches,
|
"""Configure a routed control network on controller and switches,
|
||||||
for use with the user datapath."""
|
for use with the user datapath."""
|
||||||
ips = ipGen( ipStart )
|
|
||||||
cip = ips.next()
|
cip = ips.next()
|
||||||
print controller.name, '<->',
|
print controller.name, '<->',
|
||||||
for switch in switches:
|
for switch in switches:
|
||||||
@@ -468,9 +466,11 @@ class Network( object ):
|
|||||||
exit( 1 )
|
exit( 1 )
|
||||||
# Create network, but don't start things up yet!
|
# Create network, but don't start things up yet!
|
||||||
self.prepareNet()
|
self.prepareNet()
|
||||||
def configureControlNetwork( self ):
|
def configureControlNetwork( self,
|
||||||
|
ipGen=ipGen, ipStart = (10, 0, 123, 1 ) ):
|
||||||
|
ips = apply( ipGen, ipStart )
|
||||||
configureRoutedControlNetwork( self.controllers[ 0 ],
|
configureRoutedControlNetwork( self.controllers[ 0 ],
|
||||||
self.switches)
|
self.switches, ips = ips)
|
||||||
def configHosts( self ):
|
def configHosts( self ):
|
||||||
configHosts( self.hosts, self.hostIps )
|
configHosts( self.hosts, self.hostIps )
|
||||||
def prepareNet( self ):
|
def prepareNet( self ):
|
||||||
|
|||||||
Reference in New Issue
Block a user