#NEWLINE# def _vserver_servicegroup_get( v_name , sg_name , **connection_args ) : #NEWLINE# #INDENT# ret = None #NEWLINE# nitro = _connect ( ** connection_args ) #NEWLINE# if ( nitro is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# vsg = NSLBVServerServiceGroupBinding ( ) #NEWLINE# vsg . set_name ( v_name ) #NEWLINE# try : #NEWLINE# #INDENT# vsgs = NSLBVServerServiceGroupBinding . get ( nitro , vsg ) #NEWLINE# #UNINDENT# except NSNitroError as error : #NEWLINE# #INDENT# log . debug ( 'netscaler module error - NSLBVServerServiceGroupBinding.get() failed: {0}' . format ( error ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# for vsg in vsgs : #NEWLINE# #INDENT# if ( vsg . get_servicegroupname ( ) == sg_name ) : #NEWLINE# #INDENT# ret = vsg #NEWLINE# #UNINDENT# #UNINDENT# _disconnect ( nitro ) #NEWLINE# return sg_name