From e752336522af9662a045d91c2ee4aaec32a0b0ec Mon Sep 17 00:00:00 2001 From: Per Andersson Date: Fri, 22 Nov 2024 10:46:31 +0100 Subject: [PATCH] Add feature "sort" This feature indicates support for "locale", "sort-by", and "direction". Fixes: #28 --- draft-ietf-netconf-list-pagination.xml | 2 ++ ietf-list-pagination.yang | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/draft-ietf-netconf-list-pagination.xml b/draft-ietf-netconf-list-pagination.xml index 97ad8e6..80bd7a9 100644 --- a/draft-ietf-netconf-list-pagination.xml +++ b/draft-ietf-netconf-list-pagination.xml @@ -227,6 +227,8 @@ The sorting can furthermore be configured with a locale for sorting. This is done by setting the "locale" parameter (see ). + The feature "sort" is used to indicate support for the query + parameters "locale", "sort-by", and "direction".
diff --git a/ietf-list-pagination.yang b/ietf-list-pagination.yang index 371a824..03fd311 100644 --- a/ietf-list-pagination.yang +++ b/ietf-list-pagination.yang @@ -71,6 +71,13 @@ module ietf-list-pagination { "RFC XXXX: List Pagination for YANG-driven Protocols"; } + // Features + + feature sort { + description + 'This feature indicates that the parameters "locale", "sort-by", + and "direction" are supported.'; + } // Annotations @@ -112,6 +119,7 @@ module ietf-list-pagination { } md:annotation locale { + if-feature "sort"; type string; description "This annotation contains the locale used when sorting. @@ -148,6 +156,7 @@ module ietf-list-pagination { } identity locale-unavailable { + if-feature "sort"; base list-pagination-error; description "The 'locale' query parameter input is not a valid @@ -187,12 +196,14 @@ module ietf-list-pagination { statement applied to it (see RFC XXXX)."; } leaf locale { + if-feature "sort"; type string; description "The 'locale' parameter indicates the locale which the entries in the working result-set should be collated."; } leaf sort-by { + if-feature "sort"; type union { type string { // An RFC 7950 'descendant-schema-nodeid'. @@ -219,6 +230,7 @@ module ietf-list-pagination { the end (e.g., after all nodes having values)."; } leaf direction { + if-feature "sort"; type enumeration { enum forwards { description