anchor.diff:  -define(DEFAULT_DATA_DISK_ISSUES_TIMEPERIOD, 120). %% seconds
   
   -define(FAILOVER_SERVER_GROUP_CONFIG_KEY, failover_server_group).
  +
  +-define(MAX_EVENTS_CONFIG_KEY, max_count).
  +-define(MAX_EVENTS_ALLOWED, 3).
  +-define(MIN_EVENTS_ALLOWED, 1).
  +-define(DEFAULT_EVENTS_ALLOWED, 1).
   
   handle_settings_get(Req) ->
       {value, Config} = ns_config:search(ns_config:get(), auto_failover_cfg),
  
positive.code:     Timeout = proplists:get_value("timeout", Args),
      case parse_validate_number(Timeout, Min, Max) of
          {ok, Val} ->
              %% MaxNodes is hard-coded to 1 for now.
              parse_validate_extras(Args, [{timeout, Val}, {maxNodes, 1},
                                           {extras, []}]);
          _ ->
              {error, range_err_msg(timeout, Min, Max)}
      end.
  
negative.code:             reply_text(Req, Errors1, 400);
          {false, Params} ->
              Timeout = proplists:get_value(timeout, Params),
              %% maxCount will not be set for CE and pre-upgrade so use the
              %% default.
              MaxCount = proplists:get_value(maxCount, Params,
                                             ?DEFAULT_EVENTS_ALLOWED),
              Extras = proplists:get_value(extras, Params),
              auto_failover:enable(Timeout, MaxCount, Extras),
              %% TODO: Audit the extras?
              ns_audit:enable_auto_failover(Req, Timeout, MaxCount),
              reply(Req, 200);
          {true, {error, Errors}} ->
              reply_json(Req, {struct, [{errors, {struct, Errors}}]}, 200);
  