Update tests to explicit basic mode retrieval. RFC6243

This commit is contained in:
Jan-Olof Carlson 2022-12-13 09:45:01 +00:00
parent 8883d012c7
commit 979d5d9ca2
15 changed files with 117 additions and 47 deletions

View file

@ -125,13 +125,13 @@ function testrun()
new "get config"
if [ -z "$config" ]; then
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><running/></source></get-config></rpc>" "^<rpc-reply $DEFAULTNS><data/></rpc-reply>$"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><running/></source><with-defaults xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults\">report-all</with-defaults></get-config></rpc>" "^<rpc-reply $DEFAULTNS><data/></rpc-reply>$"
else
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><running/></source></get-config></rpc>" "^<rpc-reply $DEFAULTNS><data>$config</data></rpc-reply>$"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><running/></source><with-defaults xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults\">report-all</with-defaults></get-config></rpc>" "^<rpc-reply $DEFAULTNS><data>$config</data></rpc-reply>$"
fi
new "get state"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get/></rpc>" "^<rpc-reply $DEFAULTNS><data>$state</data></rpc-reply>$"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get><with-defaults xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults\">report-all</with-defaults></get></rpc>" "^<rpc-reply $DEFAULTNS><data>$state</data></rpc-reply>$"
}
new "test params: -f $cfg"