From 63d63920f3f68f1d3cc62184e9f1a5c51da17088 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 27 Mar 2017 11:54:07 +0200 Subject: [ct_netconfc] Start multiple sessions per SSH connection The following new functions are added to ct_netconfc: * connect/1,2 - open an SSH connection to a netconf server * disconnect/1 - close the given SSH connectoin * session/1,2,3 - open an SSH channel on the give connection and send 'hello' to start a netconf session. This allows running multiple channels on on SSH connection, realizing one netconf session per channel. The existing ct_netconfc:open will always run one channel(session) per SSH connection. --- lib/common_test/test/ct_netconfc_SUITE.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/common_test/test/ct_netconfc_SUITE.erl') diff --git a/lib/common_test/test/ct_netconfc_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE.erl index 8932f930d1..05edb45fe8 100644 --- a/lib/common_test/test/ct_netconfc_SUITE.erl +++ b/lib/common_test/test/ct_netconfc_SUITE.erl @@ -52,9 +52,8 @@ init_per_suite(Config) -> end. check_crypto_and_ssh() -> - (catch code:load_file(crypto)), - case code:is_loaded(crypto) of - {file,_} -> + case code:ensure_loaded(crypto) of + {module,_} -> case catch ssh:start() of Ok when Ok==ok; Ok=={error,{already_started,ssh}} -> ct:log("ssh started",[]), -- cgit v1.2.3