anchor.diff:             ++ generate_rows(RingSize, secondary, Secondary)
              ++ generate_rows(RingSize, stopped, Stopped),
       Table = riak_cli_status:table(Rows),
  -    Alert = riak_cli_status:alert([T0, Table]),
  -    riak_cli:print([Alert]).
  +    [riak_cli_status:alert([T0, Table])].
   
   generate_rows(_RingSize, Type, []) ->
       [[{type, Type}, {index, "--"}, {id, "--"}]];
  
positive.code:     lists:foreach(fun(Args) -> apply(riak_cli, register_command, Args) end,
                    [status_register(), partition_count_register(),
                     partitions_register(), partition_register(),
                     members_register()
                    ]).
  
  register_all_usage() ->
      lists:foreach(fun(Args) -> apply(riak_cli, register_usage, Args) end,
                    [status_usage(), partition_count_usage(),
                     partitions_usage(), partition_usage(),
                     members_usage()
                    ]).
  
  %%%
  %% Cluster status
  %%%
  
  status_register() ->
      [
       ["riak-admin", "cluster", "status"], % Cmd
       [],                                  % KeySpecs
       [],                                  % FlagSpecs
       fun status/2                         % Implementation callback
      ].
  
  status_usage() ->
      Text = [
              "riak-admin cluster status\n\n",
              "Present a summary of cluster status information."
      ],
      [
       ["riak-admin", "cluster", "status"],
       Text
      ].
  
  future_claim_percentage([], _Ring, _Node) ->
      "--";
  
negative.code: %%%
  
  partition_register() ->
      [["riak-admin", "cluster", "partition"],         % Cmd
       [{id,    [{typecast, fun list_to_integer/1}]},
        {index, [{typecast, fun list_to_integer/1}]}], % Keyspecs                                             % KeySpecs
       [],                                             % FlagSpecs
       fun partition/2].                               % Implementation callback
  
  partition_usage() ->
      Text = ["riak-admin cluster partition id=0\n",
              "riak-admin cluster partition index=22835963083295358096932575511191922182123945984\n\n",
              "Returns the id or index for the specified index or id.\n"],
      [["riak-admin", "cluster", "partition"], Text].
  
  partition([{index, Index}], []) when Index >= 0 ->
      id_out(index, Index);
  partition([{id, Id}], []) when Id >= 0 ->
      id_out(id, Id);
  partition([{Op, Value}], []) ->
      [riak_cli_status:text(["ERROR: The given value ", integer_to_list(Value), 
               " for ", atom_to_list(Op), " is invalid.\n"])].
  
  id_out(InputType, Number) ->
      {ok, Ring} = riak_core_ring_manager:get_my_ring(),
      RingSize = riak_core_ring:num_partitions(Ring),
      [id_out1(InputType, Number, Ring, RingSize)].
  
  %% XXX FIXME: Validation of id - test for boundary condition and that it's lower
  %% than the ringsize - 1 partition id
  id_out1(index, Index, Ring, RingSize) ->
      Owner = riak_core_ring:index_owner(Ring, Index),
      riak_cli_status:text(
            io_lib:format("Partition index: ~p -> id: ~p~n\t(owner: ~p)", 
                [Index, hash_to_partition_id(Index, RingSize), Owner]));
  id_out1(id, Id, Ring, RingSize) when Id < RingSize ->
      Idx = partition_id_to_hash(Id, RingSize),
      Owner = riak_core_ring:index_owner(Ring, Idx),
      riak_cli_status:text(
            io_lib:format("Partition id: ~p -> index: ~p~n\t(owner: ~p)~n", 
                [Id, partition_id_to_hash(Id, RingSize), Owner]));
  id_out1(id, Id, _Ring, _RingSize) ->
      riak_cli_status:text(["ERROR: Id ", integer_to_list(Id), " is invalid."]).
  
  %%%
  %% cluster members
  %%%
  
  members_register() ->
      [["riak-admin", "cluster", "members"],       % Cmd
       [],                                         % KeySpecs
       [{all, [{shortname, "a"}, 
               {longname, "all"}]}],               % FlagSpecs
       fun members/2].                             % Implementation callback
  
  members_usage() ->
      Text = ["riak-admin cluster members [--all]\n\n",
              "Returns node names for all valid members in the cluster.\n",
              "If you want *all* members regardless of status, give the\n",
              "'--all' flag.\n"],
      [["riak-admin", "cluster", "members"], Text].
  
  members([], [{all, _Value}]) ->
      member_output(get_status());
  