* Fixed: [CLIXON is not waiting for the hello message #184](https://github.com/clicon/clixon/issues/184)
* Hello message semantics has been made stricter according to RFC 6241 Sec 8.1, for example: * A client MUST send a <hello> element. * Each peer MUST send at least the base NETCONF capability, "urn:ietf:params:netconf:base:1.1" (or 1.0 for RFC 4741) * The netconf client will terminate (close the socket) if the client does not comply * You can set `CLICON_NETCONF_HELLO_OPTIONAL` to true to use the old behavior of essentially ignoring hellos. * New clixon-config@2020-03-08.yang revision * Added: `CLICON_NETCONF_HELLO_OPTIONAL` * The base capability has been changed to "urn:ietf:params:netconf:base:1.1" following RFC6241.
This commit is contained in:
parent
608f298ed9
commit
5692072d36
81 changed files with 1189 additions and 1351 deletions
|
|
@ -194,7 +194,7 @@ if [ $RC -ne 0 ]; then
|
|||
fi
|
||||
|
||||
new "netconfig edit main module"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><main xmlns=\"urn:example:clixon\"><x>foo</x><ext>foo</ext></main></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><main xmlns=\"urn:example:clixon\"><x>foo</x><ext>foo</ext></main></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
|
||||
new "cli edit main"
|
||||
expectpart "$($clixon_cli -1f $cfg set main x bar)" 0 ""
|
||||
|
|
@ -203,7 +203,7 @@ new "cli edit main ext"
|
|||
expectpart "$($clixon_cli -1f $cfg set main ext bar)" 0 ""
|
||||
|
||||
new "netconfig edit sub1"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><sub1 xmlns=\"urn:example:clixon\"><x>foo</x><ext1>foo</ext1></sub1></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><sub1 xmlns=\"urn:example:clixon\"><x>foo</x><ext1>foo</ext1></sub1></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
|
||||
new "cli edit sub1"
|
||||
expectpart "$($clixon_cli -1f $cfg set sub1 x bar)" 0 ""
|
||||
|
|
@ -212,7 +212,7 @@ new "cli edit sub1 ext"
|
|||
expectpart "$($clixon_cli -1f $cfg set sub1 ext1 bar)" 0 ""
|
||||
|
||||
new "netconfig edit sub2 module"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><sub2 xmlns=\"urn:example:clixon\"><x>foo</x><ext2>foo</ext2></sub2></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><sub2 xmlns=\"urn:example:clixon\"><x>foo</x><ext2>foo</ext2></sub2></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
|
||||
new "cli edit sub2"
|
||||
expectpart "$($clixon_cli -1f $cfg set sub2 x fum)" 0 ""
|
||||
|
|
@ -221,10 +221,10 @@ new "cli edit sub2 ext"
|
|||
expectpart "$($clixon_cli -1f $cfg set sub2 ext2 fum)" 0 ""
|
||||
|
||||
new "netconf submodule validate"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><validate><source><candidate/></source></validate></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><validate><source><candidate/></source></validate></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
|
||||
new "netconf discard-changes"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><discard-changes/></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><discard-changes/></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
|
||||
|
||||
# Now same with restconf
|
||||
new "restconf edit main"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue