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