diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e73e8e6..f16acb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ Expected: October 2024 Users may have to change how they access the system +* Capability announce urn:ietf:params:netconf:capability:yang-library:1.1 (instead of 1.0) + * RFC 7950->8526 * New version string on the form: `7.1.0-1+11+g2b25294` * Restconf: Better RFC compliance with Accept errors: 406 vs 415 * Removed YANG line-number in error-messages for memory optimization diff --git a/lib/src/clixon_netconf_lib.c b/lib/src/clixon_netconf_lib.c index a05268a9..3c399cda 100644 --- a/lib/src/clixon_netconf_lib.c +++ b/lib/src/clixon_netconf_lib.c @@ -1827,7 +1827,7 @@ netconf_content_int2str(netconf_content nr) * MUST announce the modules it implements by implementing the YANG module * "ietf-yang-library" (RFC7895) and listing all implemented modules in the * "/modules-state/module" list. - * MUST advertise urn:ietf:params:netconf:capability:yang-library:1.0? + * MUST advertise urn:ietf:params:netconf:capability:yang-library:1.1? * revision=&module-set-id= in the message. * * Question: should the NETCONF in RFC6241 sections 8.2-8.9 be announced both @@ -1860,7 +1860,7 @@ netconf_capabilites(clixon_handle h, that it supports multiple protocol versions. */ cprintf(cb, "%s", NETCONF_BASE_CAPABILITY_1_0); - /* Check if RFC7895 loaded and revision found */ + /* Check if RFC8526 (RFC7950 1.0) loaded and revision found */ if ((ietf_yang_library_revision = yang_modules_revision(h)) != NULL){ if (xml_chardata_encode(&encstr, 0, "urn:ietf:params:netconf:capability:yang-library:1.1?revision=%s&module-set-id=%s", ietf_yang_library_revision, diff --git a/test/test_netconf.sh b/test/test_netconf.sh index 885d9605..727653b3 100755 --- a/test/test_netconf.sh +++ b/test/test_netconf.sh @@ -392,6 +392,7 @@ new "asynchronous confirmed commit" sleep 60 | cat <(echo "$HELLONO1160]]>]]>") -| $clixon_netconf -qf $cfg >> /dev/null & PIDS=($(jobs -l % | cut -c 6- | awk '{print $1}')) +sleep 1 new "try lock should fail" expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "protocollock-denied[0-9]*errorOperation failed, " diff --git a/test/test_netconf_hello.sh b/test/test_netconf_hello.sh index 50024479..8a6b022a 100755 --- a/test/test_netconf_hello.sh +++ b/test/test_netconf_hello.sh @@ -107,7 +107,7 @@ expecteof "$clixon_netconf -qef $cfg" 0 "urn:ietf:params:netconf:base:1.1]]>]]>" "^urn:ietf:params:netconf:base:1.1urn:ietf:params:netconf:base:1.0 -urn:ietf:params:netconf:capability:yang-library:1.0?revision=2019-01-04&module-set-id=42 +urn:ietf:params:netconf:capability:yang-library:1.1?revision=2019-01-04&module-set-id=42 urn:ietf:params:netconf:capability:candidate:1.0 urn:ietf:params:netconf:capability:validate:1.1 urn:ietf:params:netconf:capability:xpath:1.0 diff --git a/test/test_restconf_internal_usecases.sh b/test/test_restconf_internal_usecases.sh index 2ed3cbd0..f6e37726 100755 --- a/test/test_restconf_internal_usecases.sh +++ b/test/test_restconf_internal_usecases.sh @@ -119,6 +119,7 @@ function rpcstatus() $DEFAULTHELLO$rpc EOF ) +# echo "$retx" # Check pid expect="[0-9]*" match=$(echo "$retx" | grep --null -Go "$expect") @@ -447,6 +448,8 @@ EOF new "Create server" expecteof_netconf "$clixon_netconf -qef $cfg" 0 "$DEFAULTHELLO" "$RESTCONFIG1" "" "" +sleep 1 + new "commit create" expecteof_netconf "$clixon_netconf -qef $cfg" 0 "$DEFAULTHELLO" "" "" ""