summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-08-02 17:00:19 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-08-02 17:00:19 +0100
commit104facf19fd340bfb4d14783460afb9fb8d4f8a8 (patch)
tree3f87aba4c8ea25e261502ef862aa61a6c90005be
parent09d08b56849b093a6aae278a6c20a0bec3fcdabd (diff)
downloadrabbitmq-server-104facf19fd340bfb4d14783460afb9fb8d4f8a8.tar.gz
"all" is clearer than "both".
-rw-r--r--src/rabbit_policy.erl10
-rw-r--r--src/rabbit_upgrade_functions.erl4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/rabbit_policy.erl b/src/rabbit_policy.erl
index bafb017b..b28fbb56 100644
--- a/src/rabbit_policy.erl
+++ b/src/rabbit_policy.erl
@@ -143,7 +143,7 @@ set(VHost, Name, Pattern, Definition, Priority, ApplyTo) ->
set0(VHost, Name, Term0) ->
Term = case pget(<<"apply-to">>, Term0) of
- undefined -> [{<<"apply-to">>, <<"both">>} | Term0];
+ undefined -> [{<<"apply-to">>, <<"all">>} | Term0];
_ -> Term0
end,
rabbit_runtime_parameters:set_any(VHost, <<"policy">>, Name, Term).
@@ -258,8 +258,8 @@ matches(#resource{name = Name, kind = Kind, virtual_host = VHost}, Policy) ->
matches_type(exchange, <<"exchanges">>) -> true;
matches_type(queue, <<"queues">>) -> true;
-matches_type(exchange, <<"both">>) -> true;
-matches_type(queue, <<"both">>) -> true;
+matches_type(exchange, <<"all">>) -> true;
+matches_type(queue, <<"all">>) -> true;
matches_type(_, _) -> false.
sort_pred(A, B) -> pget(priority, A) >= pget(priority, B).
@@ -316,9 +316,9 @@ dups(L) -> L -- lists:usort(L).
is_proplist(L) -> length(L) =:= length([I || I = {_, _} <- L]).
-apply_to_validation(_Name, <<"both">>) -> ok;
+apply_to_validation(_Name, <<"all">>) -> ok;
apply_to_validation(_Name, <<"exchanges">>) -> ok;
apply_to_validation(_Name, <<"queues">>) -> ok;
apply_to_validation(_Name, Term) ->
{error, "apply-to '~s' unrecognised; should be 'queues', 'exchanges' "
- "or 'both'", [Term]}.
+ "or 'all'", [Term]}.
diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl
index b9ba4d76..e28d4d52 100644
--- a/src/rabbit_upgrade_functions.erl
+++ b/src/rabbit_upgrade_functions.erl
@@ -317,10 +317,10 @@ policy_apply_to() ->
apply_to(Def) ->
case [proplists:get_value(K, Def) ||
K <- [<<"federation-upstream-set">>, <<"ha-mode">>]] of
- [undefined, undefined] -> <<"both">>;
+ [undefined, undefined] -> <<"all">>;
[_, undefined] -> <<"exchanges">>;
[undefined, _] -> <<"queues">>;
- [_, _] -> <<"both">>
+ [_, _] -> <<"all">>
end.
%%--------------------------------------------------------------------