#NEWLINE# def _servicegroup_get( sg_name , **connection_args ) : #NEWLINE# #INDENT# '\n    Return a service group ressource or None\n    ' #NEWLINE# nitro = _connect ( ** connection_args ) #NEWLINE# if ( nitro is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# sg = NSServiceGroup ( ) #NEWLINE# sg . set_servicegroupname ( sg_name ) #NEWLINE# try : #NEWLINE# #INDENT# sg = NSServiceGroup . get ( nitro , sg ) #NEWLINE# #UNINDENT# except NSNitroError as error : #NEWLINE# #INDENT# log . debug ( 'netscaler module error - NSServiceGroup.get() failed: {0}' . format ( error ) ) #NEWLINE# sg = None #NEWLINE# #UNINDENT# _disconnect ( nitro ) #NEWLINE# return error