diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2016-02-29 17:25:19 +0000 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2016-02-29 17:25:19 +0000 |
| commit | 814b2a6ca7b4c6b5fa4e2cb3d2427a0ae145c8a9 (patch) | |
| tree | e64d52aadcf25489ce9ffb73d968c903625fd6c7 /priv | |
| parent | 09c15b37d9a8fbdb185fcb8858ee5b3a1c01e068 (diff) | |
| download | rabbitmq-server-git-814b2a6ca7b4c6b5fa4e2cb3d2427a0ae145c8a9.tar.gz | |
"none" option for listeners
Diffstat (limited to 'priv')
| -rw-r--r-- | priv/schema/rabbitmq.schema | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/priv/schema/rabbitmq.schema b/priv/schema/rabbitmq.schema index 422f5d7242..f652c76b0b 100644 --- a/priv/schema/rabbitmq.schema +++ b/priv/schema/rabbitmq.schema @@ -17,14 +17,22 @@ %% {tcp_listeners, [{"127.0.0.1", 5672}, %% {"::1", 5672}]}, +{mapping, "listeners.tcp", "rabbit.tcp_listeners",[ + {datatype, {enum, [none]}} +]}. + {mapping, "listeners.tcp.$name", "rabbit.tcp_listeners",[ {datatype, [integer, ip]} ]}. {translation, "rabbit.tcp_listeners", fun(Conf) -> - Settings = cuttlefish_variable:filter_by_prefix("listeners.tcp", Conf), - [ V || {_, V} <- Settings ] + case cuttlefish:conf_get("listeners.tcp", Conf, undefined) of + none -> []; + _ -> + Settings = cuttlefish_variable:filter_by_prefix("listeners.tcp", Conf), + [ V || {_, V} <- Settings ] + end end}. %% SSL listeners are configured in the same fashion as TCP listeners, @@ -32,14 +40,22 @@ end}. %% %% {ssl_listeners, [5671]}, +{mapping, "listeners.ssl", "rabbit.ssl_listeners",[ + {datatype, {enum, [none]}} +]}. + {mapping, "listeners.ssl.$name", "rabbit.ssl_listeners",[ {datatype, [integer, ip]} ]}. {translation, "rabbit.ssl_listeners", fun(Conf) -> - Settings = cuttlefish_variable:filter_by_prefix("listeners.ssl", Conf), - [ V || {_, V} <- Settings ] + case cuttlefish:conf_get("listeners.ssl", Conf, undefined) of + none -> []; + _ -> + Settings = cuttlefish_variable:filter_by_prefix("listeners.ssl", Conf), + [ V || {_, V} <- Settings ] + end end}. %% Number of Erlang processes that will accept connections for the TCP |
