def addnet(self, net):
        n = self.createElement("NetworkDefinition")
        self.np.appendChild(n)
        n.setAttribute("name", net.name)
        # could use net.brname
        n.setAttribute("id", "%s" % net.objid)
        n.setAttribute("type", "%s" % net.__class__.__name__)
        self.addnetinterfaces(n, net)
        # key used with tunnel node
        if hasattr(net, 'grekey') and net.grekey is not None:
            n.setAttribute("key", "%s" % net.grekey)
        # link parameters
        for netif in net.netifs(sort=True):
            self.addnetem(n, netif)        
        # wireless/mobility models
        modelconfigs = net.session.mobility.getmodels(net)
        modelconfigs += net.session.emane.getmodels(net)
        self.addmodels(n, modelconfigs)
        self.addposition(net)
Patches settings to add support for django-webtest authorization
dataset/ETHPy150Open coreemu/core/daemon/core/misc/xmlwriter0.py/CoreDocumentWriter0.addnet--crossover with--dataset/ETHPy150Open django-webtest/django-webtest/django_webtest/__init__.py/WebTestMixin._patch_settings