diff options
| author | Alvaro Videla <videlalvaro@gmail.com> | 2015-10-27 10:47:54 +0100 |
|---|---|---|
| committer | Alvaro Videla <videlalvaro@gmail.com> | 2015-10-27 10:47:54 +0100 |
| commit | 79237dc7f827c182adfd79c51167253b929ba517 (patch) | |
| tree | f3f87bd30f039954fd7dd576c88f9749920e3a54 /src | |
| parent | 6a0bcaa32dca1aa733a3f7a52938ff272101ea7c (diff) | |
| parent | 8331f469015d6261ff84c4babb8a72374d410b57 (diff) | |
| download | rabbitmq-server-git-79237dc7f827c182adfd79c51167253b929ba517.tar.gz | |
Merge pull request #390 from rabbitmq/rabbitmq-server-369
Rename policy parameters, references #369
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_queue_location_validator.erl | 10 | ||||
| -rw-r--r-- | src/rabbit_queue_master_location_misc.erl | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/rabbit_queue_location_validator.erl b/src/rabbit_queue_location_validator.erl index 4eab52855a..1260423d59 100644 --- a/src/rabbit_queue_location_validator.erl +++ b/src/rabbit_queue_location_validator.erl @@ -25,20 +25,20 @@ [{description, "Queue location policy validation"}, {mfa, {rabbit_registry, register, [policy_validator, - <<"x-queue-master-locator">>, + <<"queue-master-locator">>, ?MODULE]}}]}). validate_policy(KeyList) -> - case proplists:lookup(<<"x-queue-master-locator">> , KeyList) of + case proplists:lookup(<<"queue-master-locator">> , KeyList) of {_, Strategy} -> validate_strategy(Strategy); - _ -> {error, "x-queue-master-locator undefined"} + _ -> {error, "queue-master-locator undefined"} end. validate_strategy(Strategy) -> case module(Strategy) of R={ok, _M} -> R; _ -> - {error, "~p invalid x-queue-master-locator value", [Strategy]} + {error, "~p invalid queue-master-locator value", [Strategy]} end. policy(Policy, Q) -> @@ -48,7 +48,7 @@ policy(Policy, Q) -> end. module(#amqqueue{} = Q) -> - case policy(<<"x-queue-master-locator">>, Q) of + case policy(<<"queue-master-locator">>, Q) of undefined -> no_location_strategy; Mode -> module(Mode) end; diff --git a/src/rabbit_queue_master_location_misc.erl b/src/rabbit_queue_master_location_misc.erl index 279869d054..0b5080956c 100644 --- a/src/rabbit_queue_master_location_misc.erl +++ b/src/rabbit_queue_master_location_misc.erl @@ -73,8 +73,8 @@ get_location_mod_by_args(#amqqueue{arguments=Args}) -> end. get_location_mod_by_policy(Queue=#amqqueue{}) -> - case rabbit_policy:get(<<"x-queue-master-locator">> , Queue) of - undefined -> {error, "x-queue-master-locator policy undefined"}; + case rabbit_policy:get(<<"queue-master-locator">> , Queue) of + undefined -> {error, "queue-master-locator policy undefined"}; Strategy -> case rabbit_queue_location_validator:validate_strategy(Strategy) of Reply={ok, _CB} -> Reply; |
