#NEWLINE# def _service_get( s_name , **connection_args ) : #NEWLINE# #INDENT# '\n    Returns a service ressource or None\n    ' #NEWLINE# nitro = _connect ( ** connection_args ) #NEWLINE# if ( nitro is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# service = NSService ( ) #NEWLINE# service . set_name ( s_name ) #NEWLINE# try : #NEWLINE# #INDENT# service = NSService . get ( nitro , service ) #NEWLINE# #UNINDENT# except NSNitroError as error : #NEWLINE# #INDENT# log . debug ( 'netscaler module error - NSService.get() failed: {0}' . format ( error ) ) #NEWLINE# service = None #NEWLINE# #UNINDENT# _disconnect ( nitro ) #NEWLINE# return service