* Top-level default leafs assigned.

* Enforcing RFC 7950 Sec 7.6.1 means unassigned top-level leafs (or leafs under non-presence containers) are assigned default values.
* NACM default behaviour is read-only (empty configs are dead-lockedd)
  * This applies if NACM is loaded and `CLICON_NACM_MODE` is `internal`
* Fixed: [default values don't show up in datastores #111](https://github.com/clicon/clixon/issues/111)
This commit is contained in:
Olof hagsand 2020-08-06 15:19:38 +02:00
parent 65733ffe69
commit 794d51a365
30 changed files with 593 additions and 167 deletions

View file

@ -40,6 +40,11 @@ module interfaces{
reference
"RFC 2863: The Interfaces Group MIB";
}
leaf foo{
description "Should not appear";
type string;
default "bar";
}
container interfaces {
description
"Interface configuration parameters.";
@ -52,8 +57,11 @@ module interfaces{
leaf description {
type string;
}
leaf foo{
description "Should not appear";
type string;
default "bar";
}
leaf type {
type string;
mandatory true;
@ -124,6 +132,11 @@ module interfaces{
reference
"RFC 2863: The Interfaces Group MIB";
}
leaf foo{
description "Should not appear";
type string;
default "fie";
}
container interfaces {
description
"Interface configuration parameters.";
@ -133,6 +146,11 @@ module interfaces{
leaf name {
type string;
}
leaf foo{
description "Should not appear";
type string;
default "bar";
}
container docs{
description "Original description is wrapped and renamed";
leaf descr {
@ -290,7 +308,6 @@ XML='<interfaces xmlns="urn:example:interfaces"><interface><name>e0</name><type>
ALL="<config>$MODSTATE$XML</config>"
# -u means trigger example upgrade
new "test params: -s startup -f $cfg -- -u"
# kill old backend (if any)
new "kill old backend"
@ -301,6 +318,7 @@ fi
new "start backend -s startup -f $cfg -q -- -u"
output=$(sudo $clixon_backend -F -D $DBG -s startup -f $cfg -q -- -u)
#echo "$output"
if [ "$ALL" != "$output" ]; then
err "$ALL" "$output"
fi