aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-07-09 14:27:20 +0200
committerSiri Hansen <[email protected]>2013-07-09 14:27:20 +0200
commitb622cbb812313107140c3b75df5c29ee9ca65e88 (patch)
tree35d9116c2dfe9dba17bac0105d51790331db7178 /lib
parent54a5279cdcfa63b1389e8e1c2d139a54c406e62f (diff)
parentbd8d6205e8a6af677bfae4c34ceefb15c2702d0f (diff)
downloadotp-b622cbb812313107140c3b75df5c29ee9ca65e88.tar.gz
otp-b622cbb812313107140c3b75df5c29ee9ca65e88.tar.bz2
otp-b622cbb812313107140c3b75df5c29ee9ca65e88.zip
Merge branch 'siri/ct_netconfc/doc-send/OTP-11132' into maint
* siri/ct_netconfc/doc-send/OTP-11132: [common_test] Add documentation for ct_netconfc:send and send_rpc
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/src/ct_netconfc.erl41
1 files changed, 35 insertions, 6 deletions
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index e094ee877a..d6f7d24af7 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -540,22 +540,51 @@ get_capabilities(Client) ->
get_capabilities(Client, Timeout) ->
call(Client, get_capabilities, Timeout).
-%% @private
+%%----------------------------------------------------------------------
+%% @spec send(Client, SimpleXml) -> Result
+%% @equiv send(Client, SimpleXml, infinity)
send(Client, SimpleXml) ->
send(Client, SimpleXml, ?DEFAULT_TIMEOUT).
-%% @private
+
+%%----------------------------------------------------------------------
+-spec send(Client, SimpleXml, Timeout) -> Result when
+ Client :: client(),
+ SimpleXml :: simple_xml(),
+ Timeout :: timeout(),
+ Result :: ok | {error,error_reason()}.
+%% @doc Send an XML document to the server.
+%%
+%% The given XML document is sent as is to the server. This function
+%% can be used for sending XML documents that can not be expressed by
+%% other interface functions in this module.
send(Client, SimpleXml, Timeout) ->
call(Client,{send, Timeout, SimpleXml}).
-%% @private
+%%----------------------------------------------------------------------
+%% @spec send_rpc(Client, SimpleXml) -> Result
+%% @equiv send_rpc(Client, SimpleXml, infinity)
send_rpc(Client, SimpleXml) ->
send_rpc(Client, SimpleXml, ?DEFAULT_TIMEOUT).
-%% @private
+
+%%----------------------------------------------------------------------
+-spec send_rpc(Client, SimpleXml, Timeout) -> Result when
+ Client :: client(),
+ SimpleXml :: simple_xml(),
+ Timeout :: timeout(),
+ Result :: ok | {error,error_reason()}.
+%% @doc Send a Netconf <code>rpc</code> request to the server.
+%%
+%% The given XML document is wrapped in a valid Netconf
+%% <code>rpc</code> request and sent to the server. The
+%% <code>message-id</code> and namespace attributes are added to the
+%% <code>rpc</code> element.
+%%
+%% This function can be used for sending <code>rpc</code> requests
+%% that can not be expressed by other interface functions in this
+%% module.
send_rpc(Client, SimpleXml, Timeout) ->
call(Client,{send_rpc, SimpleXml, Timeout}).
-
-
%%----------------------------------------------------------------------
%% @spec lock(Client, Target) -> Result
%% @equiv lock(Client, Target, infinity)