Removed list-pagination-partial-state extension

Refactored pagination code
Reverted clixon-lib.yang to 2024-04-01 revision
This commit is contained in:
Olof hagsand 2024-10-16 10:32:37 +02:00
parent b9ff2d083a
commit f87ff859a6
19 changed files with 286 additions and 799 deletions

View file

@ -73,7 +73,7 @@ DATASTORE_TOP="config"
# clixon yang revisions occuring in tests (see eg yang/clixon/Makefile.in)
CLIXON_AUTOCLI_REV="2024-08-01"
CLIXON_LIB_REV="2024-08-01"
CLIXON_LIB_REV="2024-04-01"
CLIXON_CONFIG_REV="2024-08-01"
CLIXON_RESTCONF_REV="2022-08-01"
CLIXON_EXAMPLE_REV="2022-11-01"

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Example-social from draft-netconf-list-pagination-00.txt appendix A.1
# Example-social from draft-netconf-list-pagination-04.txt appendix A.1
# Assumes variable fexample is set to name of yang file
# Also: leaf-list member/state/numbers is added
# Mark deviation from original with "Clixon"
@ -265,7 +265,6 @@ cat <<EOF > $fexample
list audit-log {
description
"List of audit logs.";
cl:list-pagination-partial-state; // Clixon
leaf timestamp {
type yang:date-and-time;
mandatory true;

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# List pagination tests loosely based on draft-wwlh-netconf-list-pagination-00
# List pagination tests loosely based on draft-ietf-netconf-list-pagination-04
# The example-social yang file is used
# This tests contains a large config list: members/member/favorites/uint8-numbers
@ -56,7 +56,7 @@ cat <<EOF > $cfg
</clixon-config>
EOF
# Based on draft-wwlh-netconf-list-pagination-00 A.2 but bob has a generated uint8-numbers list
# Based on draft-netconf-list-pagination-04.txt A.2 but bob has a generated uint8-numbers list
# start file
cat <<'EOF' > $dir/startup_db
<config>

View file

@ -1,7 +1,6 @@
#!/usr/bin/env bash
# List pagination tests according to draft-wwlh-netconf-list-pagination-00
# List pagination tests according to draft-ietf-netconf-list-pagination-04
# Follow the example-social example in the draft and the tests in Appendix A.2 + A.3.1/A.3.2
# Basically only offset and limit supported
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
@ -49,7 +48,7 @@ cat <<EOF > $cfg
</clixon-config>
EOF
# See draft-wwlh-netconf-list-pagination-00 A.2 (except stats and audit-log)
# See draft-netconf-list-pagination-04.txt A.2 (except stats and audit-log)
# XXX: "config" without
cat <<'EOF' > $dir/startup_db
{"config":
@ -167,7 +166,7 @@ cat <<'EOF' > $dir/startup_db
}
EOF
# See draft-wwlh-netconf-list-pagination-00 A.2 (only stats and audit-log)
# See draft-netconf-list-pagination-04.txt A.2 (only stats and audit-log)
cat<<EOF > $fstate
<members xmlns="https://example.com/ns/example-social">
<member>

View file

@ -38,7 +38,7 @@ cat <<EOF > $cfg
</clixon-config>
EOF
# See draft-wwlh-netconf-list-pagination-00 A.2 (except stats and audit-log)
# See draft-netconf-list-pagination-04.txt A.2 (except stats and audit-log)
cat <<'EOF' > $dir/startup_db
{"config":
{
@ -155,7 +155,7 @@ cat <<'EOF' > $dir/startup_db
}
EOF
# See draft-wwlh-netconf-list-pagination-00 A.2 (only stats and audit-log)
# See draft-netconf-list-pagination-04.txt A.2 (only stats and audit-log)
cat<<EOF > $fstate
<members xmlns="https://example.com/ns/example-social">
<member>

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
# List pagination tests loosely based on draft-wwlh-netconf-list-pagination-00
# List pagination tests loosely based on draft-ietf-netconf-list-pagination-04
# The example-social yang file is used
# Three tests to get state pagination data:
# 1. NETCONF get a specific list (alice->numbers)
@ -7,7 +7,6 @@
# 3. CLI get audit logs (only interactive)
# This tests contains a large state list: audit-logs from the example
# Only CLI is used
# Test also of list-pagination-partial-state extension
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
@ -52,7 +51,7 @@ cat <<EOF > $cfg
</clixon-config>
EOF
# See draft-wwlh-netconf-list-pagination-00 A.2 (only stats and audit-log)
# See draft-netconf-list-pagination-04.txt A.2 (only stats and audit-log)
cat<<EOF > $fstate
<members xmlns="https://example.com/ns/example-social">
<member>
@ -135,6 +134,7 @@ function testrun_stop()
xpath0="/es:members/es:member[es:member-id='alice']/es:stats"
xpath="$xpath0/es:numbers"
testrun_start $xpath
new "NETCONF get leaf-list member/numbers 0-10 alice"

View file

@ -368,7 +368,7 @@ module pattern{
}
}
leaf p47 {
description "draft-wwlh-netconf-list-pagination-00 module example-social";
description "draft-netconf-list-pagination-04 module example-social";
type string {
length "1..80";
pattern '.*[\n].*' {