def verySimpleLimit(bw=150):
 intf = custom(TCIntf, bw=bw)
 net = Mininet(intf=intf)
 (h1, h2) = (net.addHost('h1'), net.addHost('h2'))
 net.addLink(h1, h2)
 net.start()
 net.pingAll()
 net.iperf()
 h1.cmdPrint('tc -s qdisc ls dev', h1.defaultIntf())
 h2.cmdPrint('tc -d class show dev', h2.defaultIntf())
 h1.cmdPrint('tc -s qdisc ls dev', h1.defaultIntf())
 h2.cmdPrint('tc -d class show dev', h2.defaultIntf())
 net.stop()

def verySimpleLimit ( bw = 150 ) : intf = custom ( TCIntf , bw = bw ) net = Mininet ( intf = intf ) ( h1 , h2 ) = ( net . addHost ( 'h1' ) , net . addHost ( 'h2' ) ) net . addLink ( h1 , h2 ) net . start ( ) net . pingAll ( ) net . iperf ( ) h1 . cmdPrint ( 'tc -s qdisc ls dev' , h1 . defaultIntf ( ) ) h2 . cmdPrint ( 'tc -d class show dev' , h2 . defaultIntf ( ) ) h1 . cmdPrint ( 'tc -s qdisc ls dev' , h1 . defaultIntf ( ) ) h2 . cmdPrint ( 'tc -d class show dev' , h2 . defaultIntf ( ) ) net . stop ( )
absurdly simple limiting test .