Example: added cli pipe
This commit is contained in:
parent
826a4c3fb3
commit
f9faf1039a
8 changed files with 72 additions and 28 deletions
|
|
@ -179,7 +179,7 @@ done } 2>&1 | awk '/real/ {print $2}'
|
|||
# CLI get
|
||||
cat <<EOF >> $fin
|
||||
edit interfaces a foo b interface e1
|
||||
show state xml
|
||||
show state
|
||||
EOF
|
||||
new "cli get test single req"
|
||||
expectpart "$($clixon_cli -F $fin -f $cfg)" 0 "<name>e1</name>" "<type>eth</type>" "<status>up</status>$"
|
||||
|
|
@ -187,7 +187,7 @@ expectpart "$($clixon_cli -F $fin -f $cfg)" 0 "<name>e1</name>" "<type>eth</type
|
|||
new "cli get $perfreq single reqs"
|
||||
{ time -p for (( i=0; i<$perfreq; i++ )); do
|
||||
rnd=$(( ( RANDOM % $perfnr ) ))
|
||||
$clixon_cli -1 -f $cfg show state xml interfaces a b interface e$rnd > /dev/null
|
||||
$clixon_cli -1 -f $cfg show state interfaces a b interface e$rnd > /dev/null
|
||||
done } 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
# Get config in one large get
|
||||
|
|
@ -199,7 +199,7 @@ new "restconf get large config"
|
|||
$TIMEFN curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/example:interfaces/a=foo/b 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
new "cli get large config"
|
||||
$TIMEFN $clixon_cli -1f $cfg show state xml interfaces a foo b 2>&1 | awk '/real/ {print $2}'
|
||||
$TIMEFN $clixon_cli -1f $cfg show state interfaces a foo b 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
# mem test needs sleep here
|
||||
new "wait restconf"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue