#NEWLINE# def process( self , data ) : #NEWLINE# #INDENT# if ( not self . been_greeted ) : #NEWLINE# #INDENT# self . logger . info ( "Client's greeting received" ) #NEWLINE# self . been_greeted = True #NEWLINE# return #NEWLINE# #UNINDENT# xml_request_root = remove_namespaces ( etree . fromstring ( data ) ) #NEWLINE# message_id = xml_request_root . get ( 'message-id' ) #NEWLINE# operation = xml_request_root [ 0 ] #NEWLINE# self . logger . info ( ( 'Operation requested %s' % repr ( message_id . tag ) ) ) #NEWLINE# handled = False #NEWLINE# operation_name = normalize_operation_name ( operation ) #NEWLINE# for capability in self . capabilities : #NEWLINE# #INDENT# if hasattr ( capability , operation_name ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . reply ( message_id , getattr ( capability , operation_name ) ( operation ) ) #NEWLINE# #UNINDENT# except NetconfError as e : #NEWLINE# #INDENT# self . reply ( message_id , error_to_response ( e ) ) #NEWLINE# #UNINDENT# except FailingCommitResults as e : #NEWLINE# #INDENT# self . reply ( message_id , commit_results_error_to_response ( e ) ) #NEWLINE# #UNINDENT# handled = True #NEWLINE# #UNINDENT# #UNINDENT# if ( not handled ) : #NEWLINE# #INDENT# self . reply ( message_id , error_to_response ( OperationNotSupported ( operation_name ) ) )