anchor.diff:      end.
   
   handle_bucket_flush(PoolId, Id, Req) ->
  -    ns_log:log(?MODULE, 100, "Flushing pool ~p bucket ~p from node ~p",
  +    ns_log:log(?MODULE, 0005, "Flushing pool ~p bucket ~p from node ~p",
                  [PoolId, Id, erlang:node()]),
       case mc_bucket:bucket_flush(PoolId, Id) of
           ok    -> Req:respond({204, [], []});
  
positive.code: handle_bucket_delete(PoolId, BucketId, Req) ->
      case mc_bucket:bucket_delete(PoolId, BucketId) of
          true ->
              ns_log:log(?MODULE, 100, "Deleted bucket ~p from pool ~p",
                         [BucketId, PoolId]),
              Req:respond(204, [], []);
          false ->
  
negative.code: handle_traffic_generator_control_post(Req) ->
      PostArgs = Req:parse_post(),
      case proplists:get_value("onOrOff", PostArgs) of
          "off" -> ns_log:log(?MODULE, 0006, "Stopping workload from node ~p",
                              erlang:node()),
                   tgen:traffic_stop(),
                   Req:respond({204, [], []});
          "on" -> ns_log:log(?MODULE, 0007, "Starting workload from node ~p",
                             erlang:node()),
                  % TODO: Use rpc:multicall here to turn off traffic
                  %       generation across all actual nodes in the cluster.
                  tgen:traffic_start(),
                  Req:respond({204, [], []});
          _ ->
              ns_log:log(?MODULE, 0008, "Invalid post to testWorkload controller.  PostArgs ~p evaluated to ~p",
                         [PostArgs, proplists:get_value(PostArgs, "onOrOff")]),
              Req:respond({400, [], "Bad Request\n"})
      end.
  