anchor.diff:                     || Name <- proplists:get_keys(Buckets)],
   	reply_json(Req, BucketsInfo).
   
  -handle_pool_info_streaming(Id, Req) ->
  -    %% TODO: this shouldn't be timer driven, but rather should
  -    %% register a callback based on some state change in the Erlang OS
  -    HTTPRes = Req:ok({"application/json; charset=utf-8",
  -                      server_header(),
  -                      chunked}),
  -    UserPassword = menelaus_auth:extract_auth(Req),
  -    Res = build_pool_info(Id, UserPassword),
  -    HTTPRes:write_chunk(mochijson2:encode(Res)),
  -    %% TODO: resolve why mochiweb doesn't support zero chunk... this
  -    %%       indicates the end of a response for now
  -    HTTPRes:write_chunk("\n\n\n\n"),
  -    handle_pool_info_streaming(Id, Req, HTTPRes, 3000).
  -
  -handle_pool_info_streaming(Id, Req, HTTPRes, Wait) ->
  -    receive
  -    after Wait ->
  -            UserPassword = menelaus_auth:extract_auth(Req),
  -            Res = build_pool_info(Id, UserPassword),
  -            HTTPRes:write_chunk(mochijson2:encode(Res)),
  -            %% TODO: resolve why mochiweb doesn't support zero chunk... this
  -            %%       indicates the end of a response for now
  -            HTTPRes:write_chunk("\n\n\n\n")
  -    end,
  -    handle_pool_info_streaming(Id, Req, HTTPRes, 10000).
  -
   find_bucket_by_id(Pool, Id) ->
       Buckets = expect_prop_value(buckets, Pool),
       expect_prop_value(Id, Buckets).
  
positive.code:           WantENodes),
      Nodes.
  
  % {"default", [
  %   {port, 11211},
  %   {buckets, [
  %     {"default", [
  %       {auth_plain, undefined},
  %       {size_per_node, 64}, % In MB.
  %       {cache_expiration_range, {0,600}}
  %     ]}
  %   ]}
  % ]}
  
  build_pool_info(Id, _UserPassword) ->
      MyPool = find_pool_by_id(Id),
      Nodes = build_nodes_info(MyPool, true),
      BucketsInfo = {struct, [{uri,
                               list_to_binary("/pools/" ++ Id ++ "/buckets")}]},
      {struct, [{name, list_to_binary(Id)},
                {nodes, Nodes},
                {buckets, BucketsInfo},
                {stats, {struct,
                         [{uri,
                           list_to_binary("/pools/" ++ Id ++ "/stats")}]}}]}.
  
  handle_pool_info(Id, Req) ->
      UserPassword = menelaus_auth:extract_auth(Req),
      reply_json(Req, build_pool_info(Id, UserPassword)).
  
  handle_bucket_list(Id, Req) ->
  	MyPool = find_pool_by_id(Id),
  
negative.code:     %% TODO: pull this from git describe.
      <<"comes_from_git_describe">>.
  
  handle_pools(Req) ->
      reply_json(Req, build_pools()).
  
  