daemon/core/misc/xmlwriter1.py
def addModels(self, configs):
        '''
        Add models from a list of model-class, config values tuples.
        '''
        for (m, conf) in configs:
            modelEle = self.createElement("model")
            modelEle.setAttribute("name", m._name)
            typeStr = "wireless"
            if m._type == coreapi.CORE_TLV_REG_MOBILITY:
                typeStr = "mobility"
            modelEle.setAttribute("type", typeStr)
            for i, k in enumerate(m.getnames()):
                key = self.createElement(k)
                value = conf[i]
                if value is None:
                    value = ""
                key.appendChild(self.createTextNode("%s" % value))
                modelEle.appendChild(key)
            self.appendChild(modelEle)

        Add models from a list of model-class, config values tuples.
        
Add models from a list of model-class, config values tuples.
Add models from a list of model - class config values tuples .
def addModels(self, configs):
        for (m, conf) in configs:
            modelEle = self.createElement("model")
            modelEle.setAttribute("name", m._name)
            typeStr = "wireless"
            if m._type == coreapi.CORE_TLV_REG_MOBILITY:
                typeStr = "mobility"
            modelEle.setAttribute("type", typeStr)
            for i, k in enumerate(m.getnames()):
                key = self.createElement(k)
                value = conf[i]
                if value is None:
                    value = ""
                key.appendChild(self.createTextNode("%s" % value))
                modelEle.appendChild(key)
            self.appendChild(modelEle)
def addModels ( self , configs ) : for ( m , conf ) in configs : modelEle = self . createElement ( "model" ) modelEle . setAttribute ( "name" , m . _name ) typeStr = "wireless" if m . _type == coreapi . CORE_TLV_REG_MOBILITY : typeStr = "mobility" modelEle . setAttribute ( "type" , typeStr ) for i , k in enumerate ( m . getnames ( ) ) : key = self . createElement ( k ) value = conf [ i ] if value is None : value = "" key . appendChild ( self . createTextNode ( "%s" % value ) ) modelEle . appendChild ( key ) self . appendChild ( modelEle )
Add models from a list of model-class, config values tuples.
Add models from a list of model - class config values tuples .
'''
        Add models from a list of model-class, config values tuples.
        '''
self
configs