From baa9afc20fac37644756a9d05836344ad8dbf332 Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Wed, 21 Jan 2015 21:38:19 +0000 Subject: [PATCH] script fix --- daemon/examples/netns/emane80211.py | 2 +- daemon/examples/netns/ospfmanetmdrtest.py | 2 +- daemon/examples/netns/wlanemanetests.py | 47 +++++++++++++++++++---- daemon/examples/netns/wlantest.py | 2 +- 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/daemon/examples/netns/emane80211.py b/daemon/examples/netns/emane80211.py index 2ad135af..be433802 100755 --- a/daemon/examples/netns/emane80211.py +++ b/daemon/examples/netns/emane80211.py @@ -49,7 +49,7 @@ def main(): session.master = True session.location.setrefgeo(47.57917,-122.13232,2.00000) session.location.refscale = 150.0 - session.cfg['emane_models'] = "RfPipe, Ieee80211abg, Bypass, AtdlOmni" + session.cfg['emane_models'] = "RfPipe, Ieee80211abg, Bypass" session.emane.loadmodels() if 'server' in globals(): server.addsession(session) diff --git a/daemon/examples/netns/ospfmanetmdrtest.py b/daemon/examples/netns/ospfmanetmdrtest.py index 632357af..303834b7 100755 --- a/daemon/examples/netns/ospfmanetmdrtest.py +++ b/daemon/examples/netns/ospfmanetmdrtest.py @@ -246,7 +246,7 @@ class ManetExperiment(object): self.net = self.session.addobj(cls = pycore.nodes.WlanNode) for i in xrange(1, numnodes + 1): addr = "%s/%s" % (prefix.addr(i), 32) - tmp = self.session.addobj(cls = ManetNode, ipaddr = addr, name = "n%d" % i) + tmp = self.session.addobj(cls = ManetNode, ipaddr = addr, objid= "%d" % i, name = "n%d" % i) tmp.newnetif(self.net, [addr]) self.nodes.append(tmp) # connect nodes with probability linkprob diff --git a/daemon/examples/netns/wlanemanetests.py b/daemon/examples/netns/wlanemanetests.py index 9e4e652c..7414114d 100755 --- a/daemon/examples/netns/wlanemanetests.py +++ b/daemon/examples/netns/wlanemanetests.py @@ -727,7 +727,21 @@ def main(): exp.info("setting up bridged tests 2/2 with netem") exp.setneteffects(bw=54000000, delay=0) exp.info("waiting %s sec (queue bring-up)" % opt.delay) - results['1 netem'] = exp.runalltests("netem") + results['1.0 netem'] = exp.runalltests("netem") + exp.info("shutting down bridged session") + + # bridged with netem (1 Mbps,200ms) + exp.info("setting up bridged tests 3/2 with netem") + exp.setneteffects(bw=1000000, delay=20000) + exp.info("waiting %s sec (queue bring-up)" % opt.delay) + results['1.2 netem_1M'] = exp.runalltests("netem_1M") + exp.info("shutting down bridged session") + + # bridged with netem (54 kbps,500ms) + exp.info("setting up bridged tests 3/2 with netem") + exp.setneteffects(bw=54000, delay=100000) + exp.info("waiting %s sec (queue bring-up)" % opt.delay) + results['1.4 netem_54K'] = exp.runalltests("netem_54K") exp.info("shutting down bridged session") exp.reset() @@ -738,7 +752,7 @@ def main(): exp.setnodes() exp.info("waiting %s sec (node/route bring-up)" % opt.delay) time.sleep(opt.delay) - results['2 bypass'] = exp.runalltests("bypass") + results['2.0 bypass'] = exp.runalltests("bypass") exp.info("shutting down bypass session") exp.reset() @@ -760,7 +774,7 @@ def main(): exp.setnodes() exp.info("waiting %s sec (node/route bring-up)" % opt.delay) time.sleep(opt.delay) - results['3 rfpipe'] = exp.runalltests("rfpipe") + results['3.0 rfpipe'] = exp.runalltests("rfpipe") exp.info("shutting down RF-PIPE session") exp.reset() @@ -768,7 +782,7 @@ def main(): exp.info("setting up EMANE tests 3/4 with RF-PIPE model 54M") rfpipevals = list(EmaneRfPipeModel.getdefaultvalues()) rfpnames = EmaneRfPipeModel.getnames() - rfpipevals[ rfpnames.index('datarate') ] = '54000' + rfpipevals[ rfpnames.index('datarate') ] = '54000000' # TX delay != propagation delay #rfpipevals[ rfpnames.index('delay') ] = '5000' if emanever < Emane.EMANE091: @@ -781,11 +795,11 @@ def main(): exp.setnodes() exp.info("waiting %s sec (node/route bring-up)" % opt.delay) time.sleep(opt.delay) - results['4 rfpipe54m'] = exp.runalltests("rfpipe54m") + results['4.0 rfpipe54m'] = exp.runalltests("rfpipe54m") exp.info("shutting down RF-PIPE session") exp.reset() - # EMANE RF-PIPE model + # EMANE RF-PIPE model: 54K datarate exp.info("setting up EMANE tests 4/4 with RF-PIPE model pathloss") rfpipevals = list(EmaneRfPipeModel.getdefaultvalues()) rfpnames = EmaneRfPipeModel.getnames() @@ -802,7 +816,26 @@ def main(): time.sleep(opt.delay) exp.info("sending pathloss events to govern connectivity") exp.setpathloss(opt.numnodes) - results['5 pathloss'] = exp.runalltests("pathloss") + results['5.0 pathloss'] = exp.runalltests("pathloss") + exp.info("shutting down RF-PIPE session") + exp.reset() + + # EMANE RF-PIPE model (512K, 200ms) + exp.info("setting up EMANE tests 4/4 with RF-PIPE model pathloss") + rfpipevals = list(EmaneRfPipeModel.getdefaultvalues()) + rfpnames = EmaneRfPipeModel.getnames() + rfpipevals[ rfpnames.index('datarate') ] = '512000' + rfpipevals[ rfpnames.index('delay') ] = '200' + rfpipevals[ rfpnames.index('pathlossmode') ] = 'pathloss' + rfpipevals[ rfpnames.index('defaultconnectivitymode') ] = '0' + exp.createemanesession(numnodes=opt.numnodes, verbose=opt.verbose, + cls=EmaneRfPipeModel, values=rfpipevals) + exp.setnodes() + exp.info("waiting %s sec (node/route bring-up)" % opt.delay) + time.sleep(opt.delay) + exp.info("sending pathloss events to govern connectivity") + exp.setpathloss(opt.numnodes) + results['5.1 pathloss'] = exp.runalltests("pathloss") exp.info("shutting down RF-PIPE session") exp.reset() diff --git a/daemon/examples/netns/wlantest.py b/daemon/examples/netns/wlantest.py index 85fe79a8..ba17f66f 100755 --- a/daemon/examples/netns/wlantest.py +++ b/daemon/examples/netns/wlantest.py @@ -29,7 +29,7 @@ def test(numnodes, testsec): # emulated network net = session.addobj(cls = pycore.nodes.WlanNode) for i in xrange(1, numnodes + 1): - tmp = session.addobj(cls = pycore.nodes.LxcNode, name = "n%d" % i) + tmp = session.addobj(cls = pycore.nodes.LxcNode, objid= "%d" % i, name = "n%d" % i) tmp.newnetif(net, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)]) n.append(tmp) net.link(n[0].netif(0), n[-1].netif(0))