Pipe function renaming
This commit is contained in:
parent
a773384ccc
commit
e0cbc10fad
3 changed files with 70 additions and 40 deletions
|
|
@ -120,15 +120,14 @@ EOF
|
|||
|
||||
cat <<EOF > $clidir/clipipe.cli
|
||||
CLICON_MODE="|mypipe"; # Must start with |
|
||||
#CLICON_PIPETREE="|mypipe";
|
||||
\| {
|
||||
grep <arg:string>, pipe_grep_fn("-e", "arg");
|
||||
except <arg:string>, pipe_grep_fn("-v", "arg");
|
||||
tail, pipe_tail_fn();
|
||||
count, pipe_wc_fn("-l");
|
||||
showas {
|
||||
json, pipe_json_fn();
|
||||
text, pipe_text_fn();
|
||||
show {
|
||||
json, pipe_showas_fn("json");
|
||||
text, pipe_showas_fn("text");
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
|
@ -177,11 +176,11 @@ expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| tail)" 0 "
|
|||
new "$mode show explicit | count"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| count)" 0 10
|
||||
|
||||
new "$mode show explicit | showas json"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| showas json)" 0 '"name": "x",' --not-- "<name>"
|
||||
new "$mode show explicit | show json"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| show json)" 0 '"name": "x",' --not-- "<name>"
|
||||
|
||||
new "$mode show explicit | showas text"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| showas text)" 0 "name x;" --not-- "<name>"
|
||||
new "$mode show explicit | show text"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show explicit config \| show text)" 0 "parameter x {" --not-- "<name>"
|
||||
|
||||
new "$mode show treeref explicit | grep par"
|
||||
expectpart "$($clixon_cli -1 -m $mode -f $cfg show treeref explicit \| grep par)" 0 "<parameter>" "</parameter>" --not-- "table" "value"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# Test for RFC8528 YANG Schema Mount
|
||||
# Only if compiled with YANG_SCHEMA_MOUNT
|
||||
# XXX No cli tests
|
||||
|
||||
# Magic line must be first in script (see README.md)
|
||||
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||
|
|
@ -85,7 +85,6 @@ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS>
|
|||
|
||||
new "check there is statistics from mountpoint"
|
||||
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><stats xmlns=\"http://clicon.org/lib\"></stats></rpc>" '<module-set><name>mountpoint: /top/mylist\[name="x"\]/root</name><nr>'
|
||||
#"<rpc-reply $DEFAULTNS></rpc-reply>"
|
||||
|
||||
if [ $BE -ne 0 ]; then
|
||||
new "Kill backend"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue