def emptyNet():
 net = Mininet(controller=Controller)
 info('*** Adding controller\n')
 net.addController('c0')
 info('*** Adding hosts\n')
 h1 = net.addHost('h1', ip='10.0.0.1')
 h2 = net.addHost('h2', ip='10.0.0.2')
 info('*** Adding switch\n')
 s3 = net.addSwitch('s3')
 info('*** Creating links\n')
 net.addLink(h1, s3)
 net.addLink(h2, s3)
 info('*** Starting network\n')
 net.start()
 info('*** Running CLI\n')
 CLI(net)
 info('*** Stopping network')
 net.stop()

def emptyNet ( ) : net = Mininet ( controller = Controller ) info ( '*** Adding controller\n' ) net . addController ( 'c0' ) info ( '*** Adding hosts\n' ) h1 = net . addHost ( 'h1' , ip = '10.0.0.1' ) h2 = net . addHost ( 'h2' , ip = '10.0.0.2' ) info ( '*** Adding switch\n' ) s3 = net . addSwitch ( 's3' ) info ( '*** Creating links\n' ) net . addLink ( h1 , s3 ) net . addLink ( h2 , s3 ) info ( '*** Starting network\n' ) net . start ( ) info ( '*** Running CLI\n' ) CLI ( net ) info ( '*** Stopping network' ) net . stop ( )
create an empty network and add nodes to it .