aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-03-27 11:54:07 +0200
committerSiri Hansen <[email protected]>2017-05-08 10:30:42 +0200
commit63d63920f3f68f1d3cc62184e9f1a5c51da17088 (patch)
treef6bee65a455eabee07bb832dd17f49b876d548f1 /lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
parent9ac8bdb19f55c593b8b4b10a5d72032e33bef406 (diff)
downloadotp-63d63920f3f68f1d3cc62184e9f1a5c51da17088.tar.gz
otp-63d63920f3f68f1d3cc62184e9f1a5c51da17088.tar.bz2
otp-63d63920f3f68f1d3cc62184e9f1a5c51da17088.zip
[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.
Diffstat (limited to 'lib/common_test/test/ct_netconfc_SUITE_data/ns.erl')
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ns.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
index 2412ea6aba..c40bf9e2cc 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
@@ -254,7 +254,7 @@ data(Data, State = #session{connection = ConnRef,
end.
stop_channel(CM, Ch, State) ->
- ssh:close(CM),
+ ssh_connection:close(CM,Ch),
{stop, Ch, State}.
@@ -290,8 +290,8 @@ send_frag({CM,Ch},Data) ->
%%% Kill ssh connection
-kill({CM,_Ch}) ->
- ssh:close(CM).
+kill({CM,Ch}) ->
+ ssh_connection:close(CM,Ch).
add_expect(SessionId,Add) ->
table_trans(fun do_add_expect/2,[SessionId,Add]).