def testRemoteNet(remote='ubuntu2', link=RemoteGRELink):
 info('*** Remote Node Test\n')
 net = Mininet(host=RemoteHost, switch=RemoteOVSSwitch, link=link)
 c0 = net.addController('c0')
 Intf('eth0', node=c0).updateIP()
 info('*** Creating local h1\n')
 h1 = net.addHost('h1')
 info('*** Creating remote h2\n')
 h2 = net.addHost('h2', server=remote)
 info('*** Creating local s1\n')
 s1 = net.addSwitch('s1')
 info('*** Creating remote s2\n')
 s2 = net.addSwitch('s2', server=remote)
 info('*** Adding links\n')
 net.addLink(h1, s1)
 net.addLink(s1, s2)
 net.addLink(h2, s2)
 net.start()
 info('Mininet is running on', quietRun('hostname').strip(), '\n')
 for node in (c0, h1, h2, s1, s2):
  info('Node', node, 'is running on', node.cmd('hostname').strip(), '\n')
 net.pingAll()
 CLI(net)
 net.stop()

def testRemoteNet ( remote = 'ubuntu2' , link = RemoteGRELink ) : info ( '*** Remote Node Test\n' ) net = Mininet ( host = RemoteHost , switch = RemoteOVSSwitch , link = link ) c0 = net . addController ( 'c0' ) Intf ( 'eth0' , node = c0 ) . updateIP ( ) info ( '*** Creating local h1\n' ) h1 = net . addHost ( 'h1' ) info ( '*** Creating remote h2\n' ) h2 = net . addHost ( 'h2' , server = remote ) info ( '*** Creating local s1\n' ) s1 = net . addSwitch ( 's1' ) info ( '*** Creating remote s2\n' ) s2 = net . addSwitch ( 's2' , server = remote ) info ( '*** Adding links\n' ) net . addLink ( h1 , s1 ) net . addLink ( s1 , s2 ) net . addLink ( h2 , s2 ) net . start ( ) info ( 'Mininet is running on' , quietRun ( 'hostname' ) . strip ( ) , '\n' ) for node in ( c0 , h1 , h2 , s1 , s2 ) : info ( 'Node' , node , 'is running on' , node . cmd ( 'hostname' ) . strip ( ) , '\n' ) net . pingAll ( ) CLI ( net ) net . stop ( )
test remote node classes .