* Major rewrite of event streams

* If you used old event callbacks API, you need to switch to the streams API
    * See clixon_stream.[ch]
  * Old streams API which needs to be removed include:
    * clicon_log_register_callback()
    * subscription_add() --> stream_register()
    * backend_notify() and backend_notify_xml() - use stream_notify() instead
* Example uses "NETCONF" stream instead of "ROUTING"
* Added timeout option -t for clixon_netconf - quit after max time.
This commit is contained in:
Olof hagsand 2018-09-30 14:51:30 +02:00
parent d7fbe75c9e
commit 98f3cd0e32
31 changed files with 597 additions and 635 deletions

View file

@ -39,12 +39,6 @@ EOF
cat <<EOF > $fyang
module $APPNAME{
prefix ex;
import ietf-interfaces {
prefix if;
}
import iana-if-type {
prefix ianaift;
}
container authentication {
description "Example code for enabling www basic auth and some example
users";
@ -70,21 +64,13 @@ module $APPNAME{
type int32;
description "something to edit";
}
container interfaces-state {
container state {
config false;
list interface{
key "name";
leaf name{
type string;
}
leaf type{
type string;
}
leaf if-index {
type int32;
}
description "state data for example application";
leaf-list op {
type string;
}
}
}
}
EOF
@ -191,7 +177,7 @@ new "restconf DELETE whole datastore"
expecteq "$(curl -u adm1:bar -sS -X DELETE http://localhost/restconf/data)" ""
new2 "auth get"
expecteq "$(curl -u adm1:bar -sS -X GET http://localhost/restconf/data/ietf-interfaces:interfaces-state)" '{"interfaces-state": {"interface": [{"name": "eth0","type": "ex:eth","if-index": 42}]}}
expecteq "$(curl -u adm1:bar -sS -X GET http://localhost/restconf/data/state)" '{"state": {"op": "42"}}
'
new "Set x to 0"