From a71c6b976fa79fa3bcd0e61850a1a57071159b28 Mon Sep 17 00:00:00 2001
From: Lukas Larsson
Date: Thu, 9 Aug 2012 18:00:13 +0200
Subject: Update user config to use nested tuple keys
ct:get_config and ct:require can now use nested tuples
to fetch data from user configuration. E.g.
ct:get_config({localhost,ip,v4}).
This introduces a backwards incompatability with how names
are associated with keys when using require/2. E.g.
ct:require(a_name,{localhost,ip}) will associate a_name with ip
instead of localhost.
---
lib/common_test/src/ct_ftp.erl | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'lib/common_test/src/ct_ftp.erl')
diff --git a/lib/common_test/src/ct_ftp.erl b/lib/common_test/src/ct_ftp.erl
index 5db73066a3..d1d511f137 100644
--- a/lib/common_test/src/ct_ftp.erl
+++ b/lib/common_test/src/ct_ftp.erl
@@ -66,6 +66,7 @@
%%% {unix,[{ftp,IpAddr},
%%% {username,Username},
%%% {password,Password}]}.
+%%% @see ct:require/3
put(KeyOrName,LocalFile,RemoteFile) ->
Fun = fun(Ftp) -> send(Ftp,LocalFile,RemoteFile) end,
open_and_do(KeyOrName,Fun).
@@ -85,6 +86,7 @@ put(KeyOrName,LocalFile,RemoteFile) ->
%%%
%%% The config file must be as for put/3.
%%% @see put/3
+%%% @see ct:require/3
get(KeyOrName,RemoteFile,LocalFile) ->
Fun = fun(Ftp) -> recv(Ftp,RemoteFile,LocalFile) end,
open_and_do(KeyOrName,Fun).
@@ -105,6 +107,10 @@ get(KeyOrName,RemoteFile,LocalFile) ->
%%% simply use Key
, the configuration variable name, to
%%% specify the target. Note that a connection that has no associated target
%%% name can only be closed with the handle value.
+%%%
+%%% See ct:require/3 for how to create a new Name
+%%%
+%%% @see ct:require/3
open(KeyOrName) ->
case ct_util:get_key_from_name(KeyOrName) of
{ok,node} ->
--
cgit v1.2.3