#NEWLINE# def _bind_service_group_lb( self , lbname , grpname ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# bindings = lbvserver_servicegroup_binding . get ( self . ns_session , lbname ) #NEWLINE# for b in bindings : #NEWLINE# #INDENT# if ( ( b . name == lbname ) and ( b . servicegroupname == grpname ) ) : #NEWLINE# #INDENT# logger . info ( ( 'LB %s is already bound to service group %s' % ( lbname , grpname ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except nitro_exception as e : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# binding = lbvserver_servicegroup_binding ( ) #NEWLINE# binding . name = lbname #NEWLINE# binding . servicegroupname = grpname #NEWLINE# lbvserver_servicegroup_binding . add ( self . ns_session , binding )