Skip to content
Snippets Groups Projects
Commit 93519c04 authored by Bob Lantz's avatar Bob Lantz
Browse files

Fixed control network/user datapath networks.

parent 9dbb68df
No related branches found
No related tags found
No related merge requests found
...@@ -400,11 +400,9 @@ def nameGen( prefix ): ...@@ -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 @@ def __init__( self, ...@@ -468,9 +466,11 @@ def __init__( self,
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 ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment