Age | Commit message (Collapse) | Author |
|
|
|
* 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
|
|
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.
|
|
|
|
The netconf client in common_test was earlier very restrictive as to
which ssh options the user could set. This is now changed, and any ssh
option is now allowed. The netconf client will simply pass on any
option, which it does not recognize, to ssh.
|
|
If a ssh package contained more than one netconf end tag, then the
second end tag was never detected in ct_netconfc:handle_data. Instead
it was included in the XML data given to the xmerl parser, which then
failed with reason "\"]]>\" is not allowed in content".
This problem was introduced by OTP-13007.
|
|
* siri/ct_netconfc/slow-down/OTP-13007:
Extended table_trans timer in order to handle big data on slow machines
Don't log headings without content
Speed up receive of many small packages
Conflicts:
lib/common_test/src/ct_conn_log_h.erl
|
|
The netconf server collects data until an XML tag is completed before
pretty printing received data. Each time data is logged, a heading
like the following is printed:
= CT_NETCONFC ==== 28-Sep-2015::16:43:46,842 ===================================
= Client <0.194.0> <----- {"127.0.0.1",2060} ===================================
This commit removes printing of this header if there is no data to be
printed below - i.e. if the XML tag is not yet complete and we are
waiting for more data.
|
|
When data from the netconf server was split into many ssh packages,
the netconf client performed really bad. This is now improved.
|
|
In ct_netconfc, if a timer expired 'at the same time' as the server
sent the rpc-reply, the timeout message might already be in the
client's message queue when the client removed the timer ref from its
'pending' list. This caused a crash in the client since the timer ref
could no longer be found when handling the timeout message.
This commit fixes the problem by always flushing the timeout message
from the message queue when canceling a timer.
|
|
|
|
Conflicts:
OTP_VERSION
erts/vsn.mk
lib/test_server/src/erl2html2.erl
|
|
* dgud/common_test/netconf-user-caps/OTP-12707:
common_test: Add user capability option to hello
|
|
|
|
When several packets where receive in one packet ct_netconf
failed to deliver them to the user.
For example several subscritiption message could be in the buffer
but only the first was sent to the user.
Error handling could be improved, maybe the connection should
be closed when unparseable packet arrives or timeout occurs.
|
|
|
|
OTP-12491
|
|
|
|
ssh_connection:subsystem/4 can return success | failure |
{error,timeout}. The latter was not handled by ct_netconfc.erl. This
is now corrected.
|
|
These functions were missing @private edoc tags and were erroneously
shown in the reference manual.
|
|
Earlier there was no way to add optional parameters like
default-operation to an edit-config request sent with
ct_netconfc:edit_config/3,4, you had to use
ct_netconfc:send_rpc/2,3. For simplicity and completion, a new
optional argument, OptParams, is now added to the edit_config
function.
|
|
Some functions in ct_netconfc which return XML data had faulty
specs. These have been corrected.
|
|
|
|
|
|
When the netconf server did not respond to the close-session request,
the call to ct_netconfc:close_session/2 would hang forever waiting for
the netconf client to terminate. This has been corrected. The client
will now always terminate (and take down the connection) if the
close-session request times out.
|
|
maint
* siri/ct_netconfc/multiple-filter-notification/OTP-11166:
[ct_netconfc] Allow multiple elements inside filter in create_subscription
|
|
ct_netconfc:create_subscription only allows one XML element inside the
'filter' element. According to RFC5277 it should be allowed to add any
number of elements inside the filter, so this is now corrected.
|
|
|
|
* origin/peppe/common_test/ct_conn_handling:
Add test suite
Fix faulty connection handling
OTP-10126
|
|
|
|
OTP-10126
|
|
* Use UTF-8 encoding for all HTML files, except the HTML version of
the test suite generated with erl2html2:convert, which will have the
same encoding as the original test suite (.erl) file.
* Encode link targets in HTML files with
test_server_ctrl:uri_encode/1.
* Use unicode modifier 't' with ~s when appropriate.
* Use unicode:characters_to_list and unicode:characters_to_binary for
conversion between binaries and strings instead of binary_to_list
and list_to_binary.
|
|
If ssh_connection:adjust_window/3 is not called after each time data
is received in the netconf client, the client will eventually stop
receiving data. This bug has been corrected.
|
|
* inet:host_name() -> inet:hostname()
* ct:hook_options() -> ct_netconfc:hook_options()
|
|
OTP-10570
ct_netconfc:close_session sometimes returned {error,closed} because
the ssh connection was closed (from the server side) before the
rpc-reply was received by the client. This is normal and can not be
helped. It has been corrected so the return will be 'ok' in this case.
Other error situations will still give {error,Reason}.
|
|
OTP-10510
When starting a named netconf connection directly after stopping one
with the same name, it sometimes failed with 'connection_exists'. This
has been corrected.
|
|
* lukas/common_test/deep_get_config/OTP-9626:
Add more cross reference links to ct docs
Remove config option from common_test args
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.
|
|
Only {data,...} and {closed,...} was handled, which caused the test to
fail with with a function_clause crash in ct_netconfc when
{exit_status,...} was received. This has been corrected.
|
|
The netconf client supports basic netconf functionality over SSH. In
order to allow testing of both success and failure cases, it is
intentionally written to allow non-standard behavior.
In order for the netconf client to use the generic connection
mechanism in common_test, ct_gen_conn has been updated to be more
flexible:
Added options:
{reconnect,bool()}
{forward_messages,bool()}
{use_existing_connection,bool()}
Allow handle_msg to return
{reply,Reply,State} |
{noreply,State} |
{stop,Reply,State}
If forward_messages==true, the ct_gen_conn callback must also
implement:
handle_msgs(Msg,State) -> {noreply,State} | {stop,State}
|