diff --git a/test/test_augment_state.sh b/test/test_augment_state.sh
index 0f55503c3..96c83950b 100755
--- a/test/test_augment_state.sh
+++ b/test/test_augment_state.sh
@@ -126,13 +126,13 @@ function testrun()
new "get config"
if [ -z "$config" ]; then
- expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "^$"
+ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "explicit" "^$"
else
- expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "^$config$"
+ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "explicit" "^$config$"
fi
new "get state"
- expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "^$state$"
+ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "explicit" "^$state$"
}
new "test params: -f $cfg"
diff --git a/test/test_cli.sh b/test/test_cli.sh
index 58ebe3993..db33a104c 100755
--- a/test/test_cli.sh
+++ b/test/test_cli.sh
@@ -134,7 +134,7 @@ show("Show a particular state of the system"){
text("Show comparison in text"), compare_dbs("running", "candidate", "text");
}
configuration("Show configuration"), cli_show_auto_mode("candidate", "text", true, false);{
- cli("Show configuration as CLI commands"), cli_show_auto_mode("candidate", "cli", true, false, "report-all", "set ");
+ cli("Show configuration as CLI commands"), cli_show_auto_mode("candidate", "cli", true, false, "explicit", "set ");
xml("Show configuration as XML"), cli_show_auto_mode("candidate", "xml", true, false);
text("Show configuration as TEXT"), cli_show_auto_mode("candidate", "text", true, false);
}
@@ -194,8 +194,8 @@ expectpart "$($clixon_cli -1 -f $cfg show conf cli)" 0 "^$"
new "cli configure set interfaces"
expectpart "$($clixon_cli -1 -f $cfg set interfaces interface eth/0/0)" 0 "^$"
-new "cli show configuration"
-expectpart "$($clixon_cli -1 -f $cfg show conf cli)" 0 "^set interfaces interface eth/0/0" "^set interfaces interface eth/0/0 enabled true"
+new "cli show configuration XX"
+expectpart "$($clixon_cli -1 -f $cfg show conf cli)" 0 "^set interfaces interface eth/0/0"
new "cli configure using encoded chars data <&"
# problems in changing to expectpart with escapes
@@ -247,7 +247,7 @@ new "cli load"
expectpart "$($clixon_cli -1 -f $cfg -l o load $dir/foo cli)" 0 "^$"
new "cli check load"
-expectpart "$($clixon_cli -1 -f $cfg -l o show conf cli)" 0 "interfaces interface eth/0/0 ipv4 enabled true"
+expectpart "$($clixon_cli -1 -f $cfg -l o show conf cli)" 0 "interfaces interface eth/0/0 ipv4"
new "cli debug set"
expectpart "$($clixon_cli -1 -f $cfg -l o debug cli 1)" 0 "^$"
diff --git a/test/test_cli_pipe_multi.sh b/test/test_cli_pipe_multi.sh
index aa55a922b..0ecea1b9c 100755
--- a/test/test_cli_pipe_multi.sh
+++ b/test/test_cli_pipe_multi.sh
@@ -73,7 +73,7 @@ commit("Commit the changes"), cli_commit();
show("Show a particular state of the system"){
version("Show version"), cli_show_version("candidate", "text", "/");
configuration("Show configuration"), cli_show_auto_mode("candidate", "xml", true, false);{
- @|show, cli_show_auto_mode("candidate", "xml", true, false, "report-all");
+ @|show, cli_show_auto_mode("candidate", "xml", true, false);
@datamodelshow, cli_show_auto("candidate", "xml", true, false, "report-all", "set ", true);
}
autocli("Generated tree") @datamodelshow, cli_show_auto("candidate", "xml", true, false, "report-all");
diff --git a/test/test_default_choice.sh b/test/test_default_choice.sh
index 0eb9ec8d9..c113ca26d 100755
--- a/test/test_default_choice.sh
+++ b/test/test_default_choice.sh
@@ -124,13 +124,13 @@ new "wait backend"
wait_backend
new "Default value expected: interval=30"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "30"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "30"
new "Set transfer/daily"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "Default value expected: time-of-day=01:00"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "01.00"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "01.00"
new "Set list element transfer container"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "
42
" "" ""
diff --git a/test/test_leaf_default.sh b/test/test_leaf_default.sh
index 8aca7bdf6..f045184f4 100755
--- a/test/test_leaf_default.sh
+++ b/test/test_leaf_default.sh
@@ -139,7 +139,7 @@ new "get config"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "get config(report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XML"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XML"
new "Change default value r1"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "99" "" ""
@@ -157,7 +157,7 @@ new "get config"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "get config(report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XML"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XML"
new "Set x list element"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "a" "" ""
@@ -166,7 +166,7 @@ new "get config (should not contain y/inside+outside)"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "a"
new "get config(report-all) (should contain y/inside+outside)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XMLafalsefalse"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XMLafalsefalse"
# Set s3 leaf to 99 triggering when condition for default values
new "Set s3 to 99"
@@ -220,7 +220,7 @@ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "
new "get(report-all) startup config"
# Should have all defaults, except r1 that is set to 99
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XML"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XML"
# permission kludges
sudo chmod 666 $dir/running_db
@@ -283,7 +283,7 @@ new "get startup config with presence"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "get(report-all) startup config with presence"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XML"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XML"
if [ $BE -ne 0 ]; then
new "Kill backend"
@@ -318,7 +318,7 @@ new "get startup config with list default"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "a"
new "get(report-all) startup config with list default"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "$XMLafalsefalse"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "$XMLafalsefalse"
if [ $BE -ne 0 ]; then
new "Kill backend"
diff --git a/test/test_netconf.sh b/test/test_netconf.sh
index 693c334d6..22ee0db57 100755
--- a/test/test_netconf.sh
+++ b/test/test_netconf.sh
@@ -299,7 +299,7 @@ new "netconf get replaced config"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "eth&t<>eth1ex:etheth2ex:eth"
new "netconf get replaced config (report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "eth&t<>trueeth1ex:ethtrueeth2ex:ethtrue"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "eth&t<>trueeth1ex:ethtrueeth2ex:ethtrue"
new "cli show configuration eth& - encoding tests"
expectpart "$($clixon_cli -1 -f $cfg show conf)" 0 "interfaces interface eth& type t<>
diff --git a/test/test_refine.sh b/test/test_refine.sh
index 125abe411..aad0f2209 100755
--- a/test/test_refine.sh
+++ b/test/test_refine.sh
@@ -96,7 +96,7 @@ new "Set local-definition"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "Get config expected foo2 refined default value (report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "foo2"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "foo2"
new "Get config expected foo2 refined default value"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
@@ -105,7 +105,7 @@ new "Set keystore-reference"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
new "Get config expected bar2 refined default value (report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "bar2"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "bar2"
new "Get config expected bar2 refined default value"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" ""
diff --git a/test/test_restconf_op.sh b/test/test_restconf_op.sh
index f6f62d89b..b82a0dc8e 100755
--- a/test/test_restconf_op.sh
+++ b/test/test_restconf_op.sh
@@ -173,7 +173,7 @@ new "restconf GET null datastore"
expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/example:cont1)" 0 "HTTP/$HVER 404" '{"ietf-restconf:errors":{"error":{"error-type":"application","error-tag":"invalid-value","error-severity":"error","error-message":"Instance does not exist"}}}'
new "restconf PUT initial datastore"
-expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" -d '{"ietf-restconf:data":{"example:cont1":{"interface":{"name":"local0","type":"regular"}}}}' $RCPROTO://localhost/restconf/data)" 0 "HTTP/$HVER 201"
+expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" -d '{"ietf-restconf:data":{"example:cont1":{"interface":{"name":"local0","type":"regular"}}}}' $RCPROTO://localhost/restconf/data)" 0 "HTTP/$HVER 204" # 201 Created (new resource) -> 204 No Content (existing modified)
new "restconf GET datastore"
expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/example:cont1)" 0 "HTTP/$HVER 200" '{"example:cont1":{"interface":\[{"name":"local0","type":"regular"}\]}}'
diff --git a/test/test_yang_default.sh b/test/test_yang_default.sh
index 952e27a3d..3a9737c58 100755
--- a/test/test_yang_default.sh
+++ b/test/test_yang_default.sh
@@ -114,7 +114,7 @@ if [ $? -ne 0 ]; then
fi
new "check running defaults (report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "880foo42"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "880foo42"
new "check running defaults"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "0"
@@ -129,7 +129,7 @@ new "set new list element"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "17" "" ""
new "get the list top (report-all)"
-expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "8817foo42"
+expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "8817foo42"
new "get the list top"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "17"
diff --git a/test/test_yang_when.sh b/test/test_yang_when.sh
index 4ea1335f0..9182af945 100755
--- a/test/test_yang_when.sh
+++ b/test/test_yang_when.sh
@@ -113,8 +113,8 @@ function testrun()
new "netconf set match"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "
kalle
merge" "" ""
- new "netconf get default value set"
- expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "" "
kallefoo
"
+ new "netconf get default value set X"
+ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "report-all" "
kallefoo
"
new "netconf set non-match value expect ok"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "
kalle42
merge" "" ""
diff --git a/yang/mandatory/Makefile.in b/yang/mandatory/Makefile.in
index a9ba761dd..38a8744ac 100644
--- a/yang/mandatory/Makefile.in
+++ b/yang/mandatory/Makefile.in
@@ -51,6 +51,8 @@ YANGSPECS += ietf-yang-library@2019-01-04.yang
YANGSPECS += ietf-yang-types@2013-07-15.yang
YANGSPECS += ietf-datastores@2018-02-14.yang
YANGSPECS += ietf-yang-patch@2017-02-22.yang
+YANGSPECS += ietf-system-capabilities@2021-04-02.yang
+
# In RFC 8528 YANG Schema Mount
YANGSPECS += ietf-yang-schema-mount@2019-01-14.yang
diff --git a/yang/mandatory/ietf-list-pagination@2024-07-08.yang b/yang/mandatory/ietf-list-pagination@2024-07-08.yang
index 3e7a65b05..f06477f4b 100644
--- a/yang/mandatory/ietf-list-pagination@2024-07-08.yang
+++ b/yang/mandatory/ietf-list-pagination@2024-07-08.yang
@@ -21,15 +21,13 @@ module ietf-list-pagination {
reference
"RFC 7952: Defining and Using Metadata with YANG";
}
-
- /* XXX Clixon FIXME: system-capabilities brings in NACM that breaks clixon testing
import ietf-system-capabilities {
prefix sysc;
reference
"RFC 9196: YANG Modules Describing Capabilities for Systems and
Datastore Update Notifications";
}
- */
+
organization
"IETF NETCONF (Network Configuration) Working Group";
@@ -344,7 +342,6 @@ module ietf-list-pagination {
}
}
- /* XXX Clixon FIXME: system-capabilities brings in NACM that breaks clixon testing
// Protocol-accessible nodes
augment
"/sysc:system-capabilities/sysc:datastore-capabilities"
@@ -386,5 +383,4 @@ module ietf-list-pagination {
'cursor' parameter.";
}
}
- */
}
diff --git a/yang/mandatory/ietf-system-capabilities@2021-04-02.yang b/yang/mandatory/ietf-system-capabilities@2021-04-02.yang
new file mode 100644
index 000000000..1817335ee
--- /dev/null
+++ b/yang/mandatory/ietf-system-capabilities@2021-04-02.yang
@@ -0,0 +1,178 @@
+module ietf-system-capabilities {
+ yang-version 1.1;
+ namespace "urn:ietf:params:xml:ns:yang:ietf-system-capabilities";
+ prefix sysc;
+
+ import ietf-netconf-acm {
+ prefix nacm;
+ reference
+ "RFC 8341: Network Configuration Access Control Model";
+ }
+ import ietf-yang-library {
+ prefix yanglib;
+ description
+ "This module requires ietf-yang-library to be implemented.
+ Revision 2019-01-04 or a revision derived from it
+ is REQUIRED.";
+ reference
+ "RFC8525: YANG Library";
+ }
+
+ organization
+ "IETF NETCONF (Network Configuration) Working Group";
+ contact
+ "WG Web:
+ WG List:
+
+ Editor: Balazs Lengyel
+ ";
+ description
+ "This module specifies a structure to specify system
+ capabilities for a server or a publisher. System capabilities
+ may include capabilities of a NETCONF or RESTCONF server or a
+ notification publisher.
+
+ This module does not contain any specific capabilities, it only
+ provides a structure where containers containing the actual
+ capabilities are augmented in.
+
+ Capability values can be specified on system level,
+ datastore level (by selecting all nodes in the datastore) or
+ for specific data nodes of a specific datastore (and their
+ contained sub-trees).
+ Capability values specified for a specific datastore or
+ node-set override values specified on the system/publisher level.
+
+ To find a capability value for a specific data node in a
+ specific datastore the user SHALL:
+
+ 1) search for a datastore-capabilities list entry for
+ the specific datastore. When stating a specific capability, the
+ relative path for any specific capability must be the same
+ under the system-capabilities container and under the
+ per-node-capabilities list: the same grouping for defining
+ the capabilities MUST be used.
+
+ 2) If the datastore entry is found within that entry, process all
+ per-node-capabilities entries in the order they appear in the list.
+ The first entry that specifies the specific capability and has a
+ node-selector selecting the specific data node defines the
+ capability value.
+
+ 3) If the capability value is not found above and the specific
+ capability is specified under the system-capabilities container
+ (outside the datastore-capabilities list), this value shall be
+ used.
+
+ 4) If no values are found in the previous steps, the
+ system/publisher is not capable of providing a value. Possible
+ reasons are: it is unknown, the capability is changing for some
+ reason, there is no specified limit, etc. In this case the
+ system's behavior is unspecified.
+ The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
+ 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
+ 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
+ are to be interpreted as described in BCP 14 (RFC 2119)
+ (RFC 8174) when, and only when, they appear in all
+ capitals, as shown here.
+
+ Copyright (c) 2021 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject to
+ the license terms contained in, the Simplified BSD License set
+ forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (https://trustee.ietf.org/license-info).
+
+ This version of this YANG module is part of RFC XXXX
+ (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
+ for full legal notices.";
+
+ // RFC Ed.: replace XXXX with actual RFC number and remove this
+ // note.
+
+ revision 2021-04-02 {
+ description
+ "Initial version
+ NOTE TO RFC EDITOR:
+ (1)Please replace the above revision date to
+ the date of RFC publication when published.
+ (2) Please replace the date in the file name
+ (ietf-system-capabilities@2021-04-02.yang)
+ to the date of RFC publication.
+ (3) Please replace the following reference
+ with RFC number when published
+ (i.e. RFC xxxx).";
+ reference
+ "RFC XXXX: YANG Modules describing Capabilities for Systems
+ and Datastore Update Notifications";
+ }
+
+ container system-capabilities {
+ config false;
+ description
+ "System capabilities.
+ Capability values specified here at the system level
+ are valid for all datastores and are used when the
+ capability is not specified on the datastore level
+ or for specific data nodes.";
+
+ /*
+ * "Augmentation point for system level capabilities."
+ */
+
+ list datastore-capabilities {
+ key "datastore";
+ description
+ "Capabilities values per datastore.
+
+ For non-NMDA servers/publishers 'config false' data is
+ considered as if it was part of the running datastore.";
+ leaf datastore {
+ type leafref {
+ path
+ "/yanglib:yang-library/yanglib:datastore/yanglib:name";
+ }
+ description
+ "The datastore for which capabilities are defined.
+ Only one specific datastore can be specified
+ e.g., ds:conventional, which represents a set of
+ configuration datastores, must not be used.";
+ }
+ list per-node-capabilities {
+ description
+ "Each list entry specifies capabilities for the selected
+ data nodes. The same capabilities apply for the data nodes
+ in the subtree below the selected nodes.
+
+ The system SHALL order the entries according to their
+ precedence. The order of the entries MUST NOT change unless
+ the underlying capabilities also change.
+
+ Note that the longest patch matching can be achieved
+ by ordering more specific matches before less
+ specific ones.";
+ choice node-selection {
+ description
+ "A method to select some or all nodes within a datastore.";
+ leaf node-selector {
+ type nacm:node-instance-identifier;
+ description
+ "Selects the data nodes for which capabilities are
+ specified. The special value '/' denotes all data nodes
+ in the datastore, consistent with the path leaf node on
+ page 41 [RFC8341].";
+ reference
+ "RFC 8341: Network Configuration Access Control Model";
+ }
+ }
+ /*
+ * "Augmentation point for datastore or data node level
+ * capabilities."
+ */
+ }
+ }
+ }
+}