Some fixex on list pagination remaining attribute
This commit is contained in:
parent
7cbc0a8dc3
commit
7cc94b3ac5
3 changed files with 13 additions and 5 deletions
|
|
@ -12,6 +12,9 @@ cfg=$dir/conf.xml
|
|||
fexample=$dir/example-social.yang
|
||||
fstate=$dir/mystate.xml
|
||||
|
||||
# Set to true if LIST_PAGINATION_REMAINING is enabled
|
||||
REMAINING=false
|
||||
|
||||
# Common example-module spec (fexample must be set)
|
||||
. ./example_social.sh
|
||||
|
||||
|
|
@ -285,13 +288,13 @@ function testlimit()
|
|||
if [ $i = 0 ]; then
|
||||
# Note: if REMAINING is enabled:
|
||||
# if [ $limit == 0 ]; then
|
||||
if true; then
|
||||
el="<uint8-numbers>$li</uint8-numbers>"
|
||||
el2="<uint8-numbers xmlns=\"https://example.com/ns/example-social\">$li</uint8-numbers>"
|
||||
else
|
||||
if ${REMAINING}; then
|
||||
el="<uint8-numbers lp:remaining=\"$remaining\" xmlns:lp=\"urn:ietf:params:xml:ns:yang:ietf-list-pagination\">$li</uint8-numbers>"
|
||||
el2="<uint8-numbers lp:remaining=\"$remaining\" xmlns:lp=\"urn:ietf:params:xml:ns:yang:ietf-list-pagination\" xmlns=\"https://example.com/ns/example-social\">$li</uint8-numbers>"
|
||||
jsonmeta=",\"@example-social:uint8-numbers\":\[{\"ietf-list-pagination:remaining\":$remaining}\]"
|
||||
else
|
||||
el="<uint8-numbers>$li</uint8-numbers>"
|
||||
el2="<uint8-numbers xmlns=\"https://example.com/ns/example-social\">$li</uint8-numbers>"
|
||||
fi
|
||||
jsonlist="$li"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue