#NEWLINE# def xml( self ) : #NEWLINE# #INDENT# interface_types = [ discovery . InterfaceType ( i [ 0 ] , i [ 1 ] , feature_types [ 2 ] ) for i in self . interfaces ] #NEWLINE# feature_types = [ discovery . FeatureType ( f [ 0 ] , f [ 1 ] ) for f in self . features ] #NEWLINE# peers_with = self . provider_registry . providers . keys ( ) #NEWLINE# peers_with . remove ( self . nsa_id ) #NEWLINE# topology_vectors = [ ( ( cnt . URN_OGF_PREFIX + tv ) , cost ) for ( tv , cost ) in self . link_vector . listVectors ( ) . items ( ) ] #NEWLINE# other = discovery . HolderType ( [ discovery . Topology ( t , c ) for ( t , c ) in topology_vectors ] ) #NEWLINE# nsa_element = discovery . NsaType ( self . nsa_id , xmlhelper . createXMLTime ( self . version ) , None , self . name , self . software_version , xmlhelper . createXMLTime ( self . start_time ) , self . network_ids , interface_types , feature_types , peers_with , other ) #NEWLINE# e = nsa_element . xml ( discovery . nsa ) #NEWLINE# payload = ET . tostring ( e , 'utf-8' ) #NEWLINE# return payload