aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_netconfc.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-02-25 12:11:17 +0100
committerSiri Hansen <[email protected]>2016-02-25 12:11:17 +0100
commitbf309240cb531df880989702ae901316e8b5e97d (patch)
tree11c599b7aa67f45d90e1f0e7f07b2811df772962 /lib/common_test/src/ct_netconfc.erl
parent930996a0613b841a0d026100e5b4659d5269e80c (diff)
downloadotp-bf309240cb531df880989702ae901316e8b5e97d.tar.gz
otp-bf309240cb531df880989702ae901316e8b5e97d.tar.bz2
otp-bf309240cb531df880989702ae901316e8b5e97d.zip
Allow any ssh option when starting a netconf client
The netconf client in common_test was earlier very restrictive as to which ssh options the user could set. This is now changed, and any ssh option is now allowed. The netconf client will simply pass on any option, which it does not recognize, to ssh.
Diffstat (limited to 'lib/common_test/src/ct_netconfc.erl')
-rw-r--r--lib/common_test/src/ct_netconfc.erl13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index 3da1115c76..8812514ad9 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -234,7 +234,6 @@
%% Internal defines
%%----------------------------------------------------------------------
-define(APPLICATION,?MODULE).
--define(VALID_SSH_OPTS,[user, password, user_dir]).
-define(DEFAULT_STREAM,"NETCONF").
-define(error(ConnName,Report),
@@ -1257,13 +1256,11 @@ check_options([{port,Port}|T], Host, _, #options{} = Options) ->
check_options([{timeout, Timeout}|T], Host, Port, Options)
when is_integer(Timeout); Timeout==infinity ->
check_options(T, Host, Port, Options#options{timeout = Timeout});
-check_options([{X,_}=Opt|T], Host, Port, #options{ssh=SshOpts}=Options) ->
- case lists:member(X,?VALID_SSH_OPTS) of
- true ->
- check_options(T, Host, Port, Options#options{ssh=[Opt|SshOpts]});
- false ->
- {error, {invalid_option, Opt}}
- end.
+check_options([{timeout, _} = Opt|_T], _Host, _Port, _Options) ->
+ {error, {invalid_option, Opt}};
+check_options([Opt|T], Host, Port, #options{ssh=SshOpts}=Options) ->
+ %% Option verified by ssh
+ check_options(T, Host, Port, Options#options{ssh=[Opt|SshOpts]}).
%%%-----------------------------------------------------------------
set_request_timer(infinity) ->