#NEWLINE# def server_disable( s_name , **connection_args ) : #NEWLINE# #INDENT# "\n    Disable a server globally\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' netscaler.server_disable 'serverName'\n    " #NEWLINE# ret = True #NEWLINE# server = _server_get ( s_name , ** connection_args ) #NEWLINE# if ( server is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( server . get_state ( ) == 'DISABLED' ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# nitro = _connect ( ** connection_args ) #NEWLINE# if ( nitro is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# NSServer . disable ( nitro , server ) #NEWLINE# #UNINDENT# except NSNitroError as error : #NEWLINE# #INDENT# log . debug ( 'netscaler module error - NSServer.disable() failed: {0}' . format ( nitro ) ) #NEWLINE# ret = False #NEWLINE# #UNINDENT# _disconnect ( nitro ) #NEWLINE# return ret