mv stream->restconf_notif, cli-auto test change for grouping/extension bug
This commit is contained in:
parent
8f68f601d4
commit
200e258ded
4 changed files with 21 additions and 17 deletions
|
|
@ -774,6 +774,13 @@ cx_evhtp_socket_extract(clicon_handle h,
|
|||
goto done;
|
||||
}
|
||||
*address = body;
|
||||
/* This is YANG type name of ip-address:
|
||||
* typedef ip-address {
|
||||
* type union {
|
||||
* type inet:ipv4-address; <---
|
||||
* type inet:ipv6-address; <---
|
||||
* }
|
||||
*/
|
||||
*addrtype = yang_argument_get(ysub);
|
||||
if ((x = xpath_first(xs, nsc, "port")) != NULL &&
|
||||
(str = xml_body(x)) != NULL){
|
||||
|
|
@ -893,14 +900,11 @@ cx_evhtp_socket(clicon_handle h,
|
|||
goto done;
|
||||
/* ss is a server socket that the clients connect to. The callback
|
||||
therefore accepts clients on ss */
|
||||
/* XXX address in evhtp should be prefixed with eg "ipv4:" */
|
||||
// evutil_make_socket_closeonexec(ss);
|
||||
// evutil_make_socket_nonblocking(ss);
|
||||
if (evhtp_accept_socket(htp, ss, SOCKET_LISTEN_BACKLOG) < 0) {
|
||||
/* accept_socket() does not close the descriptor
|
||||
* on error, but this function does.
|
||||
*/
|
||||
evutil_closesocket(ss);
|
||||
close(ss);
|
||||
goto done;
|
||||
}
|
||||
if (cx_htp_add(eh, htp) < 0)
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ EOF
|
|||
# Yang specs must be here first for backend. But then the specs are changed but just for CLI
|
||||
# Annotate original Yang spec example directly
|
||||
# First annotate /table/parameter
|
||||
# Had a problem with unknown in grouping -> test uses uses/grouping
|
||||
cat <<EOF > $fyang
|
||||
module example {
|
||||
namespace "urn:example:clixon";
|
||||
|
|
@ -75,12 +76,8 @@ module example {
|
|||
import clixon-lib{
|
||||
prefix cl;
|
||||
}
|
||||
container table{
|
||||
list parameter{
|
||||
key name;
|
||||
leaf name{
|
||||
type string;
|
||||
}
|
||||
|
||||
grouping pg {
|
||||
cl:autocli-op hide; /* This is the extension */
|
||||
leaf value{
|
||||
description "a value";
|
||||
|
|
@ -96,6 +93,14 @@ module example {
|
|||
}
|
||||
}
|
||||
}
|
||||
container table{
|
||||
list parameter{
|
||||
key name;
|
||||
leaf name{
|
||||
type string;
|
||||
}
|
||||
uses pg;
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@
|
|||
# - stream retention time
|
||||
# - native vs nchan implementation
|
||||
# Focussing on 1-3
|
||||
# 2a) start sub 8s - expect 2 notifications
|
||||
# 2b) start sub 8s - stoptime after 5s - expect 1 notifications
|
||||
# 2c) start sub 8s - replay from start -8s - expect 4 notifications
|
||||
# 2d) start sub 8s - replay from start -8s to stop +4s - expect 3 notifications
|
||||
# 2e) start sub 8s - replay from -90s w retention 60s - expect 10 notifications
|
||||
# Note the sleeps are mainly for valgrind usage
|
||||
# @see test_restconf_notifications.sh
|
||||
|
||||
# Magic line must be first in script (see README.md)
|
||||
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue