def createemanesession(self, numnodes, verbose = False, cls = None, 
                           values = None):
        ''' Build a topology consisting of the given number of LxcNodes
            connected to an EMANE WLAN.
        '''
        prefix = ipaddr.IPv4Prefix("10.0.0.0/16")
        self.session = pycore.Session()
        self.session.node_count = str(numnodes + 1)
        self.session.master = True
        self.session.location.setrefgeo(47.57917,-122.13232,2.00000)
        self.session.location.refscale = 150.0
        self.session.cfg['emane_models'] = "RfPipe, Ieee80211abg, Bypass"
        self.session.emane.loadmodels()
        self.net = self.session.addobj(cls = pycore.nodes.EmaneNode,
                                       objid = numnodes + 1, name = "wlan1")
        self.net.verbose = verbose
        #self.session.emane.addobj(self.net)
        for i in xrange(1, numnodes + 1):
            addr = "%s/%s" % (prefix.addr(i), 32)
            tmp = self.session.addobj(cls = pycore.nodes.CoreNode, objid = i,
                                      name = "n%d" % i)
            #tmp.setposition(i * 20, 50, None)
            tmp.setposition(50, 50, None)
            tmp.newnetif(self.net, [addr])
            self.nodes.append(tmp)
            self.session.services.addservicestonode(tmp, "router",
                                                    "IPForward", self.verbose)

        if values is None:
            values = cls.getdefaultvalues()
        self.session.emane.setconfig(self.net.objid, cls._name, values)
        self.session.instantiate()

        self.info("waiting %s sec (TAP bring-up)" % 2)
        time.sleep(2)

        for i in xrange(1, numnodes + 1):
            tmp = self.nodes[i-1]
            self.session.services.bootnodeservices(tmp)
            self.staticroutes(i, prefix, numnodes)
dataset/ETHPy150Open coreemu/core/daemon/examples/netns/wlanemanetests.py/Experiment.createemanesession/original