rabit_ct_client_helpers: Use values from `Config`

... instead of hard-coding them.
This commit is contained in:
Jean-Sébastien Pédron 2016-09-23 14:45:43 +02:00
parent 472cd3335e
commit 02745ce551
1 changed files with 12 additions and 7 deletions

View File

@ -155,28 +155,33 @@ open_unmanaged_connection(Config) ->
open_unmanaged_connection(Config, 0).
open_unmanaged_connection(Config, Node) ->
open_unmanaged_connection(Config, Node, <<"/">>).
open_unmanaged_connection(Config, Node, ?config(rmq_vhost, Config)).
open_unmanaged_connection(Config, Node, VHost) ->
open_unmanaged_connection(Config, Node, VHost, <<"guest">>, <<"guest">>).
open_unmanaged_connection(Config, Node, VHost,
?config(rmq_username, Config), ?config(rmq_password, Config)).
open_unmanaged_connection(Config, Node, Username, Password) ->
open_unmanaged_connection(Config, Node, <<"/">>, Username, Password).
open_unmanaged_connection(Config, Node, ?config(rmq_vhost, Config),
Username, Password).
open_unmanaged_connection(Config, Node, VHost, Username, Password) ->
open_unmanaged_connection(Config, Node, VHost, Username, Password, network).
open_unmanaged_connection(Config, Node, VHost, Username, Password,
network).
open_unmanaged_connection_direct(Config) ->
open_unmanaged_connection_direct(Config, 0).
open_unmanaged_connection_direct(Config, Node) ->
open_unmanaged_connection_direct(Config, Node, <<"/">>).
open_unmanaged_connection_direct(Config, Node, ?config(rmq_vhost, Config)).
open_unmanaged_connection_direct(Config, Node, VHost) ->
open_unmanaged_connection_direct(Config, Node, VHost, <<"guest">>, <<"guest">>).
open_unmanaged_connection_direct(Config, Node, VHost,
?config(rmq_username, Config), ?config(rmq_password, Config)).
open_unmanaged_connection_direct(Config, Node, Username, Password) ->
open_unmanaged_connection_direct(Config, Node, <<"/">>, Username, Password).
open_unmanaged_connection_direct(Config, Node, ?config(rmq_vhost, Config),
Username, Password).
open_unmanaged_connection_direct(Config, Node, VHost, Username, Password) ->
open_unmanaged_connection(Config, Node, VHost, Username, Password, direct).