From fe521f4679ed0caa068f3825869796001b29fc40 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 4 May 2017 17:28:01 +0200 Subject: [ct_netconfc] Update documentation * Remove edoc comments in ct_netconfc.erl * Rewrite ct_netconfc.xml to use specs for functions and types * Add documentation of new functions in ct_netconfc --- lib/common_test/doc/src/ct_netconfc.xml | 914 +++++++++++++------------------- 1 file changed, 370 insertions(+), 544 deletions(-) (limited to 'lib/common_test/doc/src/ct_netconfc.xml') diff --git a/lib/common_test/doc/src/ct_netconfc.xml b/lib/common_test/doc/src/ct_netconfc.xml index e6930b30d5..ab83f50733 100644 --- a/lib/common_test/doc/src/ct_netconfc.xml +++ b/lib/common_test/doc/src/ct_netconfc.xml @@ -35,13 +35,35 @@ ct_netconfc NETCONF client module. - +

NETCONF client module.

The NETCONF client is compliant with RFC 4741 NETCONF Configuration Protocol and RFC 4742 Using the NETCONF Configuration Protocol over - Secure SHell (SSH)..

+ Secure SHell (SSH).

+ + +

Connecting to a NETCONF server

+ +

NETCONF sessions can either be opened by a single call + to open/1,2 or by a call + to connect/1,2 followed + by one or more calls to + session/1,2,3.

+ +

The properties of the sessions will be exactly the same, except + that when + using connect/1,2, you + may start multiple sessions over the same SSH connection. Each + session is implemented as an SSH channel.

+ +

open/1,2 will establish one + SSH connection with one SSH channel implementing one NETCONF + session. You may start mutiple sessions by + calling open/1,2 multiple + times, but then a new SSH connection will be established for each + session.

For each server to test against, the following entry can be added to a configuration file:

@@ -49,23 +71,21 @@
  {server_id(),options()}.
-

The server_id() or an associated target_name() (see - module ct) must then be used - in calls to - ct_netconfc:open/2.

+

The server_id() + or an associated + ct:target_name() + must then be used in calls to + connect/2 + or open/2.

-

If no configuration exists for a server, a session can still be - opened by calling - ct_netconfc:open/2 with - all necessary options specified in the call. The first argument to - ct_netconfc:open/2 can - then be any atom.

+

If no configuration exists for a server, + use connect/1 + or open/1 instead, + and specify all necessary options in the Options parameter.

-
+ +

Logging

-
- - Logging

The NETCONF server uses error_logger for logging of NETCONF traffic. A special purpose error handler is implemented in ct_conn_log_h. To use this error handler, add the @@ -73,9 +93,9 @@

  suite() ->
-    [{ct_hooks, [{cth_conn_log, [{conn_mod(),hook_options()}]}]}].
+ [{ct_hooks, [{cth_conn_log, [{ct:conn_log_mod(),ct:conn_log_options()}]}]}]. -

conn_mod() is the name of the Common Test module +

conn_log_mod() is the name of the Common Test module implementing the connection protocol, for example, ct_netconfc.

Hook option log_type specifies the type of logging:

@@ -84,7 +104,7 @@ raw

The sent and received NETCONF data is logged to a separate text file "as is" without any formatting. A link to the file is - added to the test case HTML log.

.
+ added to the test case HTML log.

pretty

The sent and received NETCONF data is logged to a separate @@ -104,7 +124,7 @@ To do this, use hook option hosts and list the names of the servers/connections to be used in the suite. The connections must be named for this to work, that is, they must be opened with - ct_netconfc:open/2.

+ open/2.

Option hosts has no effect if log_type is set to html or silent.

@@ -113,13 +133,13 @@ configuration variable ct_conn_log:

- {ct_conn_log,[{conn_mod(),hook_options()}]}.
+ {ct_conn_log,[{ct:conn_log_mod(),ct:conn_log_options()}]}.

For example:

  {ct_conn_log,[{ct_netconfc,[{log_type,pretty},
-                             {hosts,[key_or_name()]}]}]}
+ {hosts,[ct:key_or_name()]}]}]}

Hook options specified in a configuration file overwrite the @@ -164,173 +184,149 @@

The same ct_hooks statement without the configuration file would cause HTML logging of all NETCONF connections in to the test case HTML log.

-
-
- - Notifications + +

Notifications

The NETCONF client is also compliant with RFC 5277 NETCONF Event Notifications, which defines a mechanism for an asynchronous message notification delivery service for the NETCONF protocol.

Specific functions to support this are - ct_netconfc:create_subscription/6 + create_subscription/1-6 and - ct_netconfc:get_event_streams/3. - (The functions also exist with other arities.)

-
- -
- Data Types - - - client() = handle() | key_or_name() - -

For handle(), see module - ct.

- - error_reason() = term() - - event_time() = {eventTime, xml_attributes(), [xs_datetime()]} - - - handle() = term() - -

Opaque reference for a connection (NETCONF session). For more - information, see module ct.

-
- - host() = inet:hostname() - | inet:ip_address() - - - key_or_name() = server_id() | target_name() - -

For target_name, see module - ct.

- - netconf_db() = running | startup | candidate - + get_event_streams/1-3.

- notification() = {notification, xml_attributes(), notification_content()} - + +

Default Timeout

- notification_content() = [event_time() | simple_xml()] - +

Most of the functions in this module have one variant with + a Timeout parameter, and one without. If nothing else is + specified, the default value infinity is used when + the Timeout parameter is not given.

- option() = {ssh, host()} | {port, - inet:port_number() - } | {timeout, timeout()} | SshConnectOption - + + + + + + + + + + + + + + +

Opaque reference for a connection to a NETCONF server or a + NETCONF session.

+
+
+ + + + + + + + + + + + + + +

SshConnectOption is any valid option to ssh:connect/3,4. Common options used are user, password and user_dir. The SshConnectOptions are - verfied by the SSH application.

- - options() = [option()] - -

Options used for setting up an SSH connection to a NETCONF - server.

- - server_id() = atom() - + verfied by the SSH application.

+ + + + + +

Options used for setting up an SSH connection to a NETCONF + server.

+
+
+ + +

The identity of a server, specified in a configuration - file.

- - simple_xml() = {xml_tag(), xml_attributes(), xml_content()} | {xml_tag(), xml_content()} | xml_tag() - -

This type is further described in application - xmerl.

- - stream_data() = {description, string()} | {replaySupport, string()} | {replayLogCreationTime, string()} | {replayLogAgedTime, string()} - -

For details about the data format for the string values, see - "XML Schema for Event Notifications" in RFC 5277.

- - stream_name() = string() - - - streams() = [{stream_name(), [stream_data()]}] - - - xml_attribute_tag() = atom() - - - xml_attribute_value() = string() - - - xml_attributes() = [{xml_attribute_tag(), xml_attribute_value()}] - - - xml_content() = [simple_xml() | iolist()] - - - xml_tag() = atom() - - - xpath() = {xpath, string()} - - - xs_datetime() = string() - -

This date and time identifier has the same format as the XML type + file.

+ + + + + +

This type is further described in application + xmerl.

+
+
+ + + +

For details about the data format for the string values, see + "XML Schema for Event Notifications" in RFC 5277.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

This date and time identifier has the same format as the XML type dateTime and is compliant with RFC 3339 Date and Time on the Internet Timestamps. The format is as follows:

-
+	
  [-]CCYY-MM-DDThh:mm:ss[.s][Z|(+|-)hh:mm]
- - -
- - - - action(Client, Action) -> Result - Equivalent to action(Client, Action, infinity). - -

Equivalent to - ct_netconfc:action(Client, Action, - infinity).

-
+ + + - action(Client, Action, Timeout) -> Result + + Executes an action. - - Client = client() - Action = simple_xml() - Timeout = timeout() - Result = ok | {ok, [simple_xml()]} | {error, error_reason()} - - +

Executes an action. If the return type is void, ok is returned instead of {ok,[simple_xml()]}.

- close_session(Client) -> Result - Equivalent to close_session(Client, infinity). - -

Equivalent to - ct_netconfc:close_session(Client, - infinity).

-
-
- - - close_session(Client, Timeout) -> Result + + Requests graceful termination of the session associated with the client. - - Client = client() - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Requests graceful termination of the session associated with the client.

@@ -343,115 +339,148 @@
- copy_config(Client, Source, Target) -> Result - Equivalent to copy_config(Client, Source, Target, - infinity). - -

Equivalent to - ct_netconfc:copy_config(Client, - Source, Target, infinity).

-
-
+ + Opens an SSH connection to a NETCONF server. + +

Opens an SSH connection to a NETCONF server.

- - copy_config(Client, Target, Source, Timeout) -> Result - Copies configuration data. - - Client = client() - Target = netconf_db() - Source = netconf_db() - Timeout = timeout() - Result = ok | {error, error_reason()} - - -

Copies configuration data.

+

If the server options are specified in a configuration file, use + connect/2 + instead.

-

Which source and target options that can be issued depends on the - capabilities supported by the server. That is, :candidate - and/or :startup are required.

+

The opaque handle() + reference returned from this + function is required as connection identifier when opening + sessions over this connection, see + session/1,2,3.

+ +

Option timeout (milliseconds) is used when setting up the + SSH connection. It is not used for any other purposes during the + lifetime of the connection.

- create_subscription(Client) -> term() - Creates a subscription for event notifications. - - + + Opens an SSH connection to a named NETCONF server. + +

Open an SSH connection to a named NETCONF server.

- - create_subscription(Client, Timeout) -> term() - Creates a subscription for event notifications. - - +

If KeyOrName is a + configured server_id() or a + target_name() associated with such an Id, then the options + for this server are fetched from the configuration file.

- - create_subscription(Client, Stream, Timeout) -> term() - Creates a subscription for event notifications. - - +

Argument ExtraOptions is added to the + options found in the configuration file. If the same options + are specified, the values from the configuration file + overwrite ExtraOptions.

- - create_subscription(Client, StartTime, StopTime, Timeout) -> term() - Creates a subscription for event notifications. - +

If the server is not specified in a configuration file, use + connect/1 + instead.

+ +

The opaque handle() + reference returned from this + function can be used as connection identifier when opening + sessions over this connection, see + session/1,2,3. + However, if KeyOrName is a + target_name(), that is, if the server is named through a + call to ct:require/2 + or a require statement in the test suite, then this name can + be used instead of + handle().

+ +

Option timeout (milliseconds) is used when setting up the + SSH connection. It is not used for any other purposes during the + lifetime of the connection.

+
- create_subscription(Client, Stream, StartTime, StopTime, Timeout) -> term() - Creates a subscription for event notifications. - + + + Copies configuration data. + +

Copies configuration data.

+ +

Which source and target options that can be issued depends on the + capabilities supported by the server. That is, :candidate + and/or :startup are required.

+
- create_subscription(Client, Stream, Filter, StartTime, StopTime, Timeout) -> Result + create_subscription(Client) -> Result + create_subscription(Client, Stream) -> Result + create_subscription(Client, Stream, Filter) -> Result + create_subscription(Client, Stream, Filter, Timeout) -> Result + + Creates a subscription for event notifications. - - Client = client() - Stream = stream_name() - Filter = simple_xml() | [simple_xml()] - StartTime = xs_datetime() - StopTime = xs_datetime() - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Creates a subscription for event notifications.

This function sets up a subscription for NETCONF event notifications of the specified stream type, matching the specified filter. The calling process receives notifications as messages of - type notification().

+ type notification().

+ +

Only a subset of the function clauses are show above. The + full set of valid combinations of input parameters is as + follows:

+ +
create_subscription(Client)
+
+create_subscription(Client, Timeout)
+create_subscription(Client, Stream)
+create_subscription(Client, Filter)
+
+create_subscription(Client, Stream, Timeout)
+create_subscription(Client, Filter, Timeout)
+create_subscription(Client, Stream, Filter)
+create_subscription(Client, StartTime, StopTime)
+
+create_subscription(Client, Stream, Filter, Timeout)
+create_subscription(Client, StartTime, StopTime, Timeout)
+create_subscription(Client, Stream, StartTime, StopTime)
+create_subscription(Client, Filter, StartTime, StopTime)
+
+create_subscription(Client, Stream, StartTime, StopTime, Timeout)
+create_subscription(Client, Stream, Filter, StartTime, StopTime)
+create_subscription(Client, Stream, Filter, StartTime, StopTime, Timeout)
- Stream + Stream

Optional parameter that indicates which stream of event is of interest. If not present, events in the default NETCONF stream are sent.

- Filter + Filter

Optional parameter that indicates which subset of all possible events is of interest. The parameter format is the same as that of the filter parameter in the NETCONF protocol operations. If not present, all events not precluded by other parameters are sent.

- StartTime + StartTime

Optional parameter used to trigger the replay feature and indicate that the replay is to start at the time specified. - If StartTime is not present, this is not a replay - subscription.

+ If StartTime is not present, this is not a + replay subscription.

It is not valid to specify start times that are later than - the current time. If StartTime is specified earlier - than the log can support, the replay begins with the earliest - available notification.

+ the current time. If StartTime is specified + earlier than the log can support, the replay begins with the + earliest available notification.

This parameter is of type dateTime and compliant to RFC 3339. Implementations must support time zones.

- StopTime + StopTime

Optional parameter used with the optional replay feature to indicate the newest notifications of interest. If - StopTime is not present, the notifications continues - until the subscription is terminated.

+ StopTime is not present, the notifications + continues until the subscription is terminated.

Must be used with and be later than StartTime. Values - of StopTime in the future are valid. This parameter is - of type dateTime and compliant to RFC 3339. + of StopTime in the future are valid. This + parameter is of type dateTime and compliant to RFC 3339. Implementations must support time zones.

@@ -461,25 +490,10 @@
- delete_config(Client, Target) -> Result - Equivalent to delete_config(Client, Target, - infinity). - -

Equivalent to - ct_netconfc:delete_config(Client, Target, infinity).

-
-
- - - delete_config(Client, Target, Timeout) -> Result + + Deletes configuration data. - - Client = client() - Target = startup | candidate - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Deletes configuration data.

The running configuration cannot be deleted and :candidate @@ -487,54 +501,25 @@ - - edit_config(Client, Target, Config) -> Result - Equivalent to edit_config(Client, Target, Config, [], - infinity). - -

Equivalent to - ct_netconfc:edit_config(Client, - Target, Config, [], infinity).

-
-
+ + + Closes the given SSH connection. + +

Closes the given SSH connection.

- - edit_config(Client, Target, Config, OptParamsOrTimeout) -> Result - If OptParamsOrTimeout is a time-out value, this function is - equivalent to ct_netconfc:edit_config(Client, Target, Config, [], - Timeout). - - Client = client() - Target = netconf_db() - Config = simple_xml() - OptParamsOrTimeout = [simple_xml()] | timeout() - Result = ok | {error, error_reason()} - - -

If OptParamsOrTimeout is a time-out value, this function is - equivalent to - ct_netconfc:edit_config(Client, - Target, Config, [], Timeout).

- -

If OptParamsOrTimeout is a list of simple XML, this - function is equivalent to - ct_netconfc:edit_config(Client, - Target, Config, OptParams, infinity).

+

If there are open NETCONF sessions on the connection, these + will be brutally aborted. To avoid this, close each session + with close_session/1,2

- edit_config(Client, Target, Config, OptParams, Timeout) -> Result + + + + Edits configuration data. - - Client = client() - Target = netconf_db() - Config = simple_xml() - OptParams = [simple_xml()] - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Edits configuration data.

By default only the running target is available, unless the server @@ -550,29 +535,17 @@

  [{'default-operation', ["none"]},
   {'error-option', ["rollback-on-error"]}]
-
-
- - get(Client, Filter) -> Result - Equivalent to get(Client, Filter, infinity). - -

Equivalent to - ct_netconfc:get(Client, Filter, - infinity).

+

If OptParams is not given, the default + value [] is used.

- get(Client, Filter, Timeout) -> Result + + Gets data. - - Client = client() - Filter = simple_xml() | xpath() - Timeout = timeout() - Result = {ok, [simple_xml()]} | {error, error_reason()} - - +

Gets data.

This operation returns both configuration and state data from the @@ -584,24 +557,10 @@ - get_capabilities(Client) -> Result - Equivalent to get_capabilities(Client, infinity). - -

Equivalent to - ct_netconfc:get_capabilities(Client, - infinity).

-
-
- - - get_capabilities(Client, Timeout) -> Result + + Returns the server side capabilities. - - Client = client() - Timeout = timeout() - Result = [string()] | {error, error_reason()} - - +

Returns the server side capabilities.

The following capability identifiers, defined in RFC 4741 NETCONF @@ -623,26 +582,10 @@ - get_config(Client, Source, Filter) -> Result - Equivalent to get_config(Client, Source, Filter, - infinity). - -

Equivalent to - ct_netconfc:get_config(Client, Source, Filter, infinity).

-
-
- - - get_config(Client, Source, Filter, Timeout) -> Result + + Gets configuration data. - - Client = client() - Source = netconf_db() - Filter = simple_xml() | xpath() - Timeout = timeout() - Result = {ok, [simple_xml()]} | {error, error_reason()} - - +

Gets configuration data.

To be able to access another source than running, the @@ -654,25 +597,12 @@ - get_event_streams(Client, Timeout) -> Result - Equivalent to get_event_streams(Client, [], Timeout). - -

Equivalent to - ct_netconfc:get_event_streams(Client, - [], Timeout).

-
-
- - - get_event_streams(Client, Streams, Timeout) -> Result + + + + Sends a request to get the specified event streams. - - Client = client() - Streams = [stream_name()] - Timeout = timeout() - Result = {ok, streams()} | {error, error_reason()} - - +

Sends a request to get the specified event streams.

Streams is a list of stream names. The following filter is @@ -700,67 +630,28 @@ </netconf>

If more complex filtering is needed, use - ct_netconfc:get/2 or - ct_netconfc:get/3 and + ct_netconfc:get/2,3 and specify the exact filter according to "XML Schema for Event Notifications" in RFC 5277.

- get_session_id(Client) -> Result - Equivalent to get_session_id(Client, infinity). - -

Equivalent to - ct_netconfc:get_session_id(Client, - infinity).

-
-
- - - get_session_id(Client, Timeout) -> Result + + Returns the session Id associated with the specified client. - - Client = client() - Timeout = timeout() - Result = pos_integer() | {error, error_reason()} - - +

Returns the session Id associated with the specified client.

- hello(Client) -> Result - Equivalent to hello(Client, [], infinity). - -

Equivalent to - ct_netconfc:hello(Client, [], - infinity).

-
-
- - - hello(Client, Timeout) -> Result - Equivalent to hello(Client, [], Timeout). - -

Equivalent to - ct_netconfc:hello(Client, [], - Timeout).

-
-
- - - hello(Client, Options, Timeout) -> Result + + + Exchanges hello messages with the server. - - Client = handle() - Options = [{capability, [string()]}] - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Exchanges hello messages with the server.

Adds optional capabilities and sends a hello message to the @@ -769,27 +660,11 @@ - kill_session(Client, SessionId) -> Result - Equivalent to kill_session(Client, SessionId, - infinity). - -

Equivalent to - ct_netconfc:kill_session(Client, -SessionId, infinity).

-
-
- - - kill_session(Client, SessionId, Timeout) -> Result + + Forces termination of the session associated with the supplied session Id. - - Client = client() - SessionId = pos_integer() - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Forces termination of the session associated with the supplied session Id.

@@ -807,26 +682,11 @@ SessionId, infinity).

- lock(Client, Target) -> Result - Equivalent to lock(Client, Target, infinity). - -

Equivalent to - ct_netconfc:lock(Client, Target, - infinity).

-
-
- - - lock(Client, Target, Timeout) -> Result - Unlocks the configuration target. - - Client = client() - Target = netconf_db() - Timeout = timeout() - Result = ok | {error, error_reason()} - - -

Unlocks the configuration target.

+ + + Locks the configuration target. + +

Locks the configuration target.

Which target parameters that can be used depends on if :candidate and/or :startup are supported by the @@ -835,9 +695,7 @@ SessionId, infinity).

Locks are intended to be short-lived.

Operation - ct_netconfc:kill_session/2 - or - ct_netconfc:kill_session/3 + kill_session/2,3 can be used to force the release of a lock owned by another NETCONF session. How this is achieved by the server side is implementation-specific.

@@ -845,54 +703,41 @@ SessionId, infinity).

- only_open(Options) -> Result + Opens a NETCONF session, but does not send hello. - - Options = options() - Result = {ok, handle()} | {error, error_reason()} - - +

Opens a NETCONF session, but does not send hello.

-

As ct_netconfc:open/1, - but does not send a hello message.

+

As open/1, but + does not send a hello message.

- only_open(KeyOrName, ExtraOptions) -> Result - Opens a name NETCONF session, but does not send - hello. - - KeyOrName = key_or_name() - ExtraOptions = options() - Result = {ok, handle()} | {error, error_reason()} - - -

Opens a name NETCONF session, but does not send hello.

- -

As ct_netconfc:open/2, - but does not send a hello message.

+ + Opens a named NETCONF session, but does not send hello. + +

Opens a named NETCONF session, but does not send hello.

+ +

As open/2, but + does not send a hello message.

- open(Options) -> Result - Opens a NETCONF session and exchanges hello messages. - - Options = options() - Result = {ok, handle()} | {error, error_reason()} - - + + Opens a NETCONF session and exchanges hello messages. +

Opens a NETCONF session and exchanges hello messages.

If the server options are specified in a configuration file, or if a named client is needed for logging purposes (see section Logging in this module), use - ct_netconfc:open/2 + open/2 instead.

-

The opaque handle() reference returned from this +

The opaque handle() + reference returned from this function is required as client identifier when calling any other function in this module.

@@ -904,37 +749,36 @@ SessionId, infinity).

- open(KeyOrName, ExtraOptions) -> Result + Opens a named NETCONF session and exchanges hello messages. - - KeyOrName = key_or_name() - ExtraOptions = options() - Result = {ok, handle()} | {error, error_reason()} - - +

Opens a named NETCONF session and exchanges hello messages.

-

If KeyOrName is a configured server_id() or a +

If KeyOrName is a + configured server_id() or a target_name() associated with such an Id, then the options for this server are fetched from the configuration file.

-

Argument ExtraOptions is added to the options found in the - configuration file. If the same options are specified, the values - from the configuration file overwrite ExtraOptions.

+

Argument ExtraOptions is added to the + options found in the configuration file. If the same + options are specified, the values from the configuration + file overwrite ExtraOptions.

If the server is not specified in a configuration file, use - ct_netconfc:open/1 + open/1 instead.

-

The opaque handle() reference returned from this +

The opaque handle() + reference returned from this function can be used as client identifier when calling any other - function in this module. However, if KeyOrName is a + function in this module. However, if KeyOrName is a target_name(), that is, if the server is named through a call to ct:require/2 or a require statement in the test suite, then this name can - be used instead of handle().

+ be used instead of + handle().

Option timeout (milliseconds) is used when setting up the SSH connection and when waiting for the hello message from @@ -947,25 +791,10 @@ SessionId, infinity).

- send(Client, SimpleXml) -> Result - Equivalent to send(Client, SimpleXml, infinity). - -

Equivalent to - ct_netconfc:send(Client, SimpleXml, - infinity).

-
-
- - - send(Client, SimpleXml, Timeout) -> Result + + Sends an XML document to the server. - - Client = client() - SimpleXml = simple_xml() - Timeout = timeout() - Result = simple_xml() | {error, error_reason()} - - +

Sends an XML document to the server.

The specified XML document is sent "as is" to the server. This @@ -975,25 +804,10 @@ SessionId, infinity).

- send_rpc(Client, SimpleXml) -> Result - Equivalent to send_rpc(Client, SimpleXml, infinity). - -

Equivalent to - ct_netconfc:send_rpc(Client, - SimpleXml, infinity).

-
-
- - - send_rpc(Client, SimpleXml, Timeout) -> Result + + Sends a NETCONF rpc request to the server. - - Client = client() - SimpleXml = simple_xml() - Timeout = timeout() - Result = [simple_xml()] | {error, error_reason()} - - +

Sends a NETCONF rpc request to the server.

The specified XML document is wrapped in a valid NETCONF rpc @@ -1006,30 +820,42 @@ SessionId, infinity).

- unlock(Client, Target) -> Result - Equivalent to unlock(Client, Target, infinity). - -

Equivalent to - ct_netconfc:unlock(Client, Target, - infinity).

+ + + + + Opens a NETCONF session as a channel on the given SSH + connection, and exchanges hello messages with the + server. + + + +

Opens a NETCONF session as a channel on the given SSH + connection, and exchanges hello messages with the server.

+ +

The opaque handle() + reference returned from this + function can be used as client identifier when calling any + other function in this module. However, if KeyOrName + is used and it is a target_name(), that is, if the + server is named through a call + to ct:require/2 + or a require statement in the test suite, then this + name can be used instead of + handle().

+
- unlock(Client, Target, Timeout) -> Result + + Unlocks the configuration target. - - Client = client() - Target = netconf_db() - Timeout = timeout() - Result = ok | {error, error_reason()} - - +

Unlocks the configuration target.

If the client earlier has acquired a lock through - ct_netconfc:lock/2 or - ct_netconfc:lock/3, this + lock/2,3, this operation releases the associated lock. To access another target than running, the server must support :candidate and/or :startup.

-- cgit v1.2.3