#NEWLINE# def get_capability( self ) : #NEWLINE# #INDENT# ' Returns device capabilities ' #NEWLINE# logging . debug ( 'get_capability ..' ) #NEWLINE# reply = ET . Element ( 'reply' ) #NEWLINE# if ( not self . _is_connected ( ) ) : #NEWLINE# #INDENT# if ( not self . connect ( ) ) : #NEWLINE# #INDENT# reply . text = ( 'NetConf Session could not be established {%s}</error>' % str ( self ) ) #NEWLINE# return reply #NEWLINE# #UNINDENT# #UNINDENT# self . disconnect ( ) #NEWLINE# caps = self . handle . server_capabilities #NEWLINE# if caps : #NEWLINE# #INDENT# reply . text = '\n' . join ( caps ) #NEWLINE# logging . debug ( 'Received device capabilities ..' ) #NEWLINE# #UNINDENT# return reply