From 13554a3d836b8706fb2f366225eba2280d260821 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 27 Aug 2013 15:23:46 -0700 Subject: [PATCH] Minor cleanup --- examples/controlnet.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/controlnet.py b/examples/controlnet.py index dba8756..f9454c7 100755 --- a/examples/controlnet.py +++ b/examples/controlnet.py @@ -109,7 +109,10 @@ class ControlNetwork( Topo ): # Make it Happen!! + def run(): + "Create control and data networks, and invoke the CLI" + info( '* Creating Control Network\n' ) ctopo = ControlNetwork( n=4, dataController=DataController ) cnet = Mininet( topo=ctopo, ipBase='192.168.123.0/24', controller=None ) @@ -131,7 +134,6 @@ def run(): mn = MininetFacade( net, cnet=cnet ) - # run the function passed as an argument CLI( mn ) info( '* Stopping Data Network\n' ) @@ -140,7 +142,7 @@ def run(): info( '* Stopping Control Network\n' ) cnet.stop() + if __name__ == '__main__': setLogLevel( 'info' ) - run()