Netconf Drafts
Netconf Drafts
Netconf Drafts
Wu
Internet-Draft W. Song
Intended status: Experimental Huawei
Expires: 24 April 2023 P. Liu
China Mobile
Q. Ma
Huawei
W. Wang
China Telecom
Z. Niu
Microsoft
21 October 2022
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. Model Overview . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Subscription Configuration . . . . . . . . . . . . . . . 6
2.2. YANG RPC . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1. "establish-subscription" RPC . . . . . . . . . . . . 7
2.3. Notifications for Adaptive Subscribed Content . . . . . . 8
3. XPath Complexity Evaluation . . . . . . . . . . . . . . . . . 9
4. Adaptive Subscription YANG Module . . . . . . . . . . . . . . 10
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
5.1. Updates to the IETF XML Registry . . . . . . . . . . . . 15
5.2. Updates to the YANG Module Names Registry . . . . . . . . 16
6. Security Considerations . . . . . . . . . . . . . . . . . . . 16
7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 17
8. Acknowledges . . . . . . . . . . . . . . . . . . . . . . . . 17
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
9.1. Normative References . . . . . . . . . . . . . . . . . . 17
9.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Example YANG Module . . . . . . . . . . . . . . . . 19
A.1. "example-wifi-mac" YANG Module . . . . . . . . . . . . . 20
Appendix B. Adaptive Subscription and Notification Example . . . 24
B.1. "edit-config" Example . . . . . . . . . . . . . . . . . . 24
B.2. Create Adaptive Subscription Example . . . . . . . . . . 25
B.3. "xpath-evaluation-unsupported" error response example . . 26
B.4. "adaptive-period-update" notification example . . . . . . 27
B.5. Changes between Revisions . . . . . . . . . . . . . . . . 28
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 30
1. Introduction
1.1. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
* Event
* Client
* Configuration
* Configured subscription
* Configuration datastore
* Notification message
* Publisher
* Receiver
* Subscriber
* Subscription
* On-change subscription
* Periodic subscription
* Selection filter
2. Model Overview
module: ietf-adaptive-subscription
augment /sn:subscriptions/sn:subscription/yp:update-trigger:
+--:(adaptive-subscriptions)
+--rw adaptive-subscriptions
+--rw adaptive-period* [name]
+--rw name string
+--rw xpath-external-eval string
+--rw period yp:centiseconds
+--rw anchor-time? yang:date-and-time
augment /sn:establish-subscription/sn:input/yp:update-trigger:
+--:(adaptive-subscriptions)
+-- adaptive-subscriptions
+-- adaptive-period* [name]
+-- name string
+-- xpath-external-eval string
+-- period yp:centiseconds
+-- anchor-time? yang:date-and-time
notifications:
+---n adaptive-period-update
+--ro id? sn:subscription-id
+--ro period yp:centiseconds
+--ro anchor-time? yang:date-and-time
+--ro datastore identityref
+--ro (selection-filter)?
+--:(by-reference)
| +--ro selection-filter-ref selection-filter-ref
+--:(within-subscription)
+--ro (filter-spec)?
+--:(datastore-subtree-filter)
| +--ro datastore-subtree-filter? <anydata> {sn:subtree}?
+--:(datastore-xpath-filter)
+--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?
For the cases where multiple list instances are needed to handle
in "xpath-external-eval", XPath abbreviated syntax can be used to
identify a particular instance, e.g., to represent a comparison
for a leaf in a list entry:
/if:interfaces/if:interface[if:name="eth0"]/if:in-errors>1000.
establish-subscription
-----------------------------
adaptive-unsupported
xpath-evaluation-unsupported
multi-xpath-criteria-conflict
For an example of how above RPC errors can be returned, see the
"xpath-evaluation-unsupported" error response illustrated in
Appendix B.3.
Note that existing RPC errors defined in RFC 8639 and RFC 8641 are
still supported by this document. For example, if any configured
period for adaptive subscription is not supported by the publisher, a
"period-unsupported" error response could be used.
import ietf-subscribed-notifications {
prefix sn;
reference
"RFC 8639: Subscription to YANG Notifications";
}
import ietf-yang-push {
prefix yp;
reference
"RFC 8641: Subscription to YANG Notifications for Datastore Updates";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netconf>
WG List: <netconf@ietf.org>
Editor: Qin Wu
<mailto:bill.wu@huawei.com>
Editor: Qiufang Ma
<mailto: maqiufang1@huawei.com>
revision 2022-10-21 {
description
"Initial revision";
reference
"RFC xxxx: Adaptive Subscription to YANG Notification.";
}
identity adaptive-unsupported {
base sn:establish-subscription-error;
description
"Adaptive-subscription is not supported for any objects
that are selectable by the filter.";
}
identity xpath-evaluation-unsupported {
base sn:establish-subscription-error;
description
"Unable to parse the xpath evaluation criteria defined in
’xpath-external-eval’ because a syntax error or some
XPath 1.0 syntax not supported against the specific object.";
}
identity multi-xpath-criteria-conflict {
base sn:establish-subscription-error;
base sn:subscription-terminated-reason;
description
"Multiple Xpath evaluation criteria represented by
’xpath-external-eval’ is evaluated as conflict, i.e.,
more than one condition expressions are evaluated to
’true’.";
grouping adaptive-subscription-modifiable {
description
"This grouping describes the datastore-specific adaptive subscription
conditions that can be changed during the lifetime of the
subscription.";
container adaptive-subscriptions {
list adaptive-period {
key "name";
description
"Defines necessary conditions to switch update interval for
sending an event record to the subscriber. The event record output
generation will not be influenced these conditions.";
leaf name {
type string {
length "1..64";
}
description
"The name of the condition to be matched. A device MAY further
restrict the length of this name; space and special
characters are not allowed.";
}
leaf xpath-external-eval {
type string;
mandatory true;
description
"A XPath string, representing a logical expression,
which can contain comparisons of datastore values
and logical operations in the XPath format.";
}
leaf period {
type yp:centiseconds;
mandatory true;
description
"Duration of time that should occur between periodic
push updates, in units of 0.01 seconds.";
}
leaf anchor-time {
type yang:date-and-time;
description
"Designates a timestamp before or after which a series
of periodic push updates are determined. The next
update will take place at a point in time that is a
multiple of a period from the ’anchor-time’.
For example, for an ’anchor-time’ that is set for the
top of a particular minute and a period interval of a
minute, updates will be sent at the top of every
augment "/sn:subscriptions/sn:subscription/yp:update-trigger" {
description
"This augmentation adds additional subscription parameters
that apply specifically to adaptive subscription.";
case adaptive-subscriptions {
description
"Defines necessary conditions for sending an event record to
the subscriber.";
uses adaptive-subscription-modifiable;
}
}
augment "/sn:establish-subscription/sn:input/yp:update-trigger" {
description
"This augmentation adds additional subscription parameters
that apply specifically to datastore updates to RPC input.";
case adaptive-subscriptions {
description
"Defines necessary conditions for sending an event record to
the subscriber.";
uses adaptive-subscription-modifiable;
}
}
notification adaptive-period-update {
sn:subscription-state-notification;
description
"This notification contains a push update that in turn contains
data subscribed to via a subscription. In the case of a
periodic subscription, this notification is sent for periodic
updates. It can also be used for synchronization updates of
an on-change subscription. This notification shall only be
sent to receivers of a subscription. It does not constitute
a general-purpose notification that would be subscribable as
part of the NETCONF event stream by any receiver.";
leaf id {
type sn:subscription-id;
description
"This references the subscription that drove the
notification to be sent.";
}
leaf period {
type yp:centiseconds;
mandatory true;
description
"New duration of time that should occur between periodic
push updates, in units of 0.01 seconds.";
}
leaf anchor-time {
type yang:date-and-time;
description
"Designates a timestamp before or after which a series
of periodic push updates are determined. The next
update will take place at a point in time that is a
multiple of a period from the ’anchor-time’.
For example, for an ’anchor-time’ that is set for the
top of a particular minute and a period interval of a
minute, updates will be sent at the top of every
minute that this subscription is active.";
}
uses yp:datastore-criteria {
refine "selection-filter/within-subscription" {
description
"Specifies the selection filter and where it originated
from. If the ’selection-filter-ref’ is populated, the
filter in the subscription came from the ’filters’
container. Otherwise, it is populated in-line as part
of the subscription itself.";
}
}
}
}
<CODE ENDS>
5. IANA Considerations
This document registers one URI in the IETF XML registry [RFC3688].
Following the format in [RFC3688], the following registration is
requested to be made:
---------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
---------------------------------------------------------------------
This document registers one YANG module in the YANG Module Names
registry [RFC7950]. Following the format in [RFC6020], the following
registration is requested to be made:
---------------------------------------------------------------------
Name: ietf-adaptive-subscription
Namespace: urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription
Prefix: as
Reference: RFC xxxx
---------------------------------------------------------------------
6. Security Considerations
The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC8446].
There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive in some
network environments. Write operations (e.g., edit-config) to these
data nodes without proper protection can have a negative effect on
network operations. These are the subtrees and data nodes and their
sensitivity/vulnerability:
* /sn:subscriptions/sn:subscription/yp:update-trigger/as:adaptive-
subscriptions/as:adaptive-period/as:period
* /sn:subscriptions/sn:subscription/yp:update-trigger/as:adaptive-
subscriptions/as:adaptive-period/as:anchor-time
* /sn:establish-subscription/sn:input/yp:update-trigger/as:adaptive-
subscriptions/as:adaptive-period/as:period
* /sn:establish-subscription/sn:input/yp:update-trigger/as:adaptive-
subscriptions/as:adaptive-period/as:anchor-time
7. Contributors
Thanks Michael Wang, Liang Geng for their major contributions to the
initial modeling and use cases.
Michael Wang
Email: wangzitao@huawei.com
Liang Geng
China Mobile
32 Xuanwumen West St, Xicheng District
Beijing 10053
Email: gengliang@chinamobile.com
8. Acknowledges
We would like to thank Rob Wilton, Thomas Graf, Andy Bierman, Michael
Richardson, Henk Birkholz for valuable review on this document,
special thanks to Thomas and Michael for organizing the discussion on
several relevant drafts and reach the common understanding on the
concept and ideas. Thanks Michael for providing CHIP/Matter WIFI
statistics reference.
9. References
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
module: example-wifi-network-diagnostic
+--rw server
| +--rw bssid? yang:mac-address
| +--rw security-type? enumeration
| +--rw wifi-version? enumeration
| +--rw channel-num? int8
| +--rw rssi? int8
| +--rw beacon-lost-count? int8
| +--rw beacon-rx-count? int8
| +--rw packet-multicast-rx-count? int8
| +--rw packet-multicast-tx-count? int8
| +--rw packet-unicast-rx-count? int8
| +--rw packet-unicast-tx-count? int8
| +--rw current-max-rate? int8
| +--rw overrun-count? int8
+--rw events
+--rw event* [name]
+--rw name string
+--rw disconnection? enumeration
+--rw association-failure? enumeration
+--rw connection-status? enumeration
module example-wifi-network-diagnostic {
yang-version 1;
namespace "http://example.com/yang/wifi-network-diagnostic";
prefix wnd;
import ietf-yang-types {
prefix yang;
}
container server {
description
"Configuration of the WiFi Server logical entity.";
leaf bssid {
type yang:mac-address;
description
"The MAC address of a wireless access point.";
}
leaf security-type {
type enumeration {
enum unspecified {
value 0;
}
enum none {
value 1;
}
enum wep {
value 2;
}
enum wpa {
value 3;
}
enum wpa2 {
value 4;
}
enum wpa3 {
value 5;
}
}
description
"The type of Wi-Fi security used. A value of 0
indicate that the interface is not currently
configured or operational.";
}
leaf wifi-version {
type enumeration {
enum 80211a {
value 0;
}
enum 80211b {
value 1;
}
enum 80211g {
value 2;
}
enum 80211n {
value 3;
}
enum 80211ac {
value 4;
}
enum 80211ax {
value 5;
}
}
description
"The highest 802.11 standard version usable
by the Node.";
}
leaf channel-num {
type int8;
description
"The channel that Wi-Fi communication is currently
operating on. A value of 0indicates that the interface
is not currently configured or operational.";
}
leaf rssi {
type int8;
description
"The RSSI of the Node’s Wi-Fi radio in dBm.";
}
leaf beacon-lost-count {
type int8;
description
"The count of the number of missed beacons the
Node has detected.";
}
leaf beacon-rx-count {
type int8;
description
"The count of the number of received beacons. The
total number of expected beacons that could have been
received during the interval since association SHOULD
match the sum of BeaconRxCount and BeaconLostCount. ";
}
leaf packet-multicast-rx-count {
type int8;
description
"The number of multicast packets received by
the Node.";
}
leaf packet-multicast-tx-count {
type int8;
description
"The number of multicast packets transmitted by
the Node.";
}
leaf packet-unicast-rx-count {
type int8;
description
"The number of multicast packets received by
the Node.";
}
leaf packet-unicast-tx-count {
type int8;
description
"The number of multicast packets transmitted by
the Node.";
}
leaf current-max-rate {
type int8;
description
"The current maximum PHY rate of transfer of
data in bytes-per-second.";
}
leaf overrun-count {
type int8;
description
"The number of packets dropped either at ingress or
egress, due to lack of buffer memory to retain all
packets on the ethernet network interface. The
OverrunCount attribute SHALL be reset to 0 upon a
reboot of the Node..";
}
}
container events {
description
"Configuration of WIFI Network Diagnostic events.";
list event {
key "name";
description
"The list of event sources configured on the
server.";
leaf name {
type string;
description
"The unique name of an event source.";
}
leaf disconnection {
type enumeration {
enum de-authenticated {
value 1;
}
enum dis-association {
value 2;
}
}
description
"A Node’s Wi-Fi connection has been disconnected as a
result of de-authenticated or dis-association and
indicates the reason.";
}
leaf association-failure {
type enumeration {
enum unknown {
value 0;
}
enum association-failed {
value 1;
}
enum authentication-failed {
value 2;
}
enum ssid-not-found {
value 3;
}
}
description
"A Node has attempted to connect, or reconnect, to
a Wi-Fi access point, but is unable to successfully
associate or authenticate, after exhausting all
internal retries of its supplicant.";
}
leaf connection-status {
type enumeration {
enum connected {
value 1;
}
enum notconnected {
value 2;
}
}
description
"A Node’s connection status to a Wi-Fi network has
changed. Connected, in this context, SHALL mean that
a Node acting as a Wi-Fi station is successfully
associated to a Wi-Fi Access Point.";
}
}
}
}
The examples within this document use the normative YANG module
"ietf-adaptive-subscription" defined in Section 4 and the non-
normative example YANG module "example-wifi-network-diagnostic"
defined in Appendix A.1.
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config
xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<top
xmlns="http://example.com/schema/1.2/config"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:running
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:wnd="https://example.com/sample-data/1.0">
/wnd:example-wifi-network-diagnostic
</yp:datastore-xpath-filter>
<as:adaptive-subscriptions
xmlns:as="urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription">
<as:adaptive-period>
<as:xpath-external-eval>
/wnd:server/wnd:rssi<-65
</as:xpath-external-eval>
<as:period>5</as:period>
</as:adaptive-period>
<as:adaptive-period>
<as:xpath-external-eval>
/wnd:server/wnd:rssi>=-65
</as:xpath-external-eval>
<as:period>60</as:period>
</as:adaptive-period>
</as:adaptive-subscriptions>
</top>
</config>
</edit-config>
</rpc>
<netconf:rpc message-id="101"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<establish-subscription
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:running
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:wnd="https://example.com/sample-data/1.0">
/wnd:example-wifi-network-diagnostic
</yp:datastore-xpath-filter>
<as:adaptive-subscriptions
xmlns:as="urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription">
<as:adaptive-period>
<as:xpath-external-eval>
wnd:server/wnd:rssi<-65
</as:xpath-external-eval>
<as:period>5</as:period>
</as:adaptive-period>
<as:adaptive-period>
<as:xpath-external-eval>
wnd:server/wnd:rssi>=-65
</as:xpath-external-eval>
<as:period>60</as:period>
</as:adaptive-period>
</as:adaptive-subscriptions>
</establish-subscription>
</netconf:rpc>
For instance, if the XPATH 1.0 syntax against the targeted data
object defined in "xpath-external-eval" is not supported by the
server’ s implementation, the server returns a reply indicating a
failure. The following <rpc-reply> illustrates an example:
Upon the server switches from the update interval 5 seconds to the
new update interval 60 seconds, before sending event records to
receivers, the "adaptive-period-update" notification should be
generated and sent to the receivers to inform the receivers that the
update interval value is switched to the new value.
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<eventTime>2016-11-21T13:51:00Z</eventTime>
<adaptive-period-update
xmlns="http://example.com/ietf-adaptive-subscription">
<id>0</id>
<period>60</period>
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:running
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:ex="https://example.com/sample-data/1.0">
/ex:example-wifi-network-diagnostic
</yp:datastore-xpath-filter>
</adaptive-period-update>
</notification>
v00 -v01
* Clarify that existing RPC errrors defined in RFC 8639 and 8641 are
still supported by this document
* Refine the YANG module: add contact information, fix IETF Trust
Copyright statement, fix yanglint validation error
v09 -v10
v08 -v09
v07 -v08
* Add a new example showing how the RPC error being returned by a
publisher.
v06 -v07
v05 -v06
v04 -v05
v03 - v04
v02 - v03
* Format usage example and change ssid into rssi in the appendix;
Authors’ Addresses
Qin Wu
Huawei
101 Software Avenue, Yuhua District
Nanjing
Jiangsu, 210012
China
Email: bill.wu@huawei.com
Wei Song
Huawei
101 Software Avenue, Yuhua District
Nanjing
Jiangsu, 210012
China
Email: songwei80@huawei.com
Peng Liu
China Mobile
32 Xuanwumen West St, Xicheng District
Beijing
Email: liupengyjy@chinamobile.com
Qiufang Ma
Huawei
101 Software Avenue, Yuhua District
Nanjing
Jiangsu, 210012
China
Email: maqiufang1@huawei.com
Wei Wang
China Telecom
32 Xuanwumen West St, Xicheng District
Beijing
Email: wangw36@chinatelecom.cn
Zhixiong Niu
Microsoft
Email: Zhixiong.Niu@microsoft.com
Abstract
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminologies . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Solution Overview . . . . . . . . . . . . . . . . . . . . . . 4
5. Subscription Decomposition . . . . . . . . . . . . . . . . . 6
6. Publication Composition . . . . . . . . . . . . . . . . . . . 6
7. Subscription State Change Notifications . . . . . . . . . . . 7
8. Publisher Configurations . . . . . . . . . . . . . . . . . . 7
9. YANG Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 8
10. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 8
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
12. Security Considerations . . . . . . . . . . . . . . . . . . . 10
13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 11
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
15.1. Normative References . . . . . . . . . . . . . . . . . . 11
15.2. Informative References . . . . . . . . . . . . . . . . . 12
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 13
A.1. Dynamic Subscription . . . . . . . . . . . . . . . . . . 13
A.2. Configured Subscription . . . . . . . . . . . . . . . . . 17
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction
2. Terminologies
The following terms are defined in [RFC8639] and are not redefined
here:
Subscriber
Publisher
Receiver
Subscription
Agent: is the Publisher that interacts with the Master to deal with
the Component Subscription and pushing the data to the Receiver.
3. Motivation
4. Solution Overview
For one subscription, there can be one or more Receivers. And the
Subscriber does not necessarily share the same IP address as the
Receivers.
+-----------------------------------------+
| Collector |-------------+ |
| +------------+ | |
| +------------+ || Receiver | | |
| | Subscriber | |--------------+ |
| +-----^-+----+ +------------^ |
| | | | |
+-----------------------------------------+
Global | | Global |
Capability| | Subscription |
+-----------------------------------------+
| | | | |
| +--------+-v-------------------+ | |
| | Publisher(Master) | | |
| +--------^-+-------------------+ | |
| | | | |
| | | | |
| Component | | Component Push | |
| Capability| | Subscription | |
| +--------+-v-------------------+ | |
| | Publisher(Agent) +--+ |
| +------------------------------+ |
| |
| Device |
+-----------------------------------------+
* Contracts are created between the Master and each Agent on the
Component Capability, and the format for streaming data structure.
5. Subscription Decomposition
The Collector can only subscribe to the Master. This requires the
Master to:
6. Publication Composition
The Publisher Agent collects data and encapsulates the packets per
Component Subscription. The format and structure of the data records
are defined by the YANG schema, so that the decomposition at the
Receiver can benefit from the structured and hierarchical data
records.
8. Publisher Configurations
All Publisher Agents share the same source IP address for data
export. For connectionless data transport such as UDP based
transport [I-D.ietf-netconf-udp-notif] the same Layer 4 source port
for data export can be used. For connection based data transport
such as HTTPS based transport [I-D.ietf-netconf-https-notif], each
Publisher Agent MUST be able to acknowledge packet retrieval from
Receivers, and therefore requires a dedicated Layer 4 source port per
software process.
9. YANG Tree
module: ietf-distributed-notif
augment /sn:subscriptions/sn:subscription:
+--ro message-observation-domain-id* string
augment /sn:subscription-started:
+--ro message-observation-domain-id* string
augment /sn:subscription-modified:
+--ro message-observation-domain-id* string
augment /sn:establish-subscription/sn:output:
+--ro message-observation-domain-id* string
description
"Defines augmentation for ietf-subscribed-notifications to
enable the distributed publication with single subscription.
This version of this YANG module is part of RFC XXXX; see the
RFC itself for full legal notices.";
revision 2021-05-07 {
description
"Initial version";
reference
"RFC XXXX: Subscription to Distributed Notifications";
}
grouping message-observation-domain-ids {
description
"Provides a reusable list of message-observation-domain-ids.";
leaf-list message-observation-domain-id {
type string;
config false;
ordered-by user;
description
"Software process which created the message (e.g.,
processor 1 on line card 1). This field is
used to notify the collector the working originator.";
}
}
augment "/sn:subscriptions/sn:subscription" {
description
"This augmentation allows the message
Observation Domain ID to be exposed for a subscription.";
uses message-observation-domain-ids;
}
augment "/sn:subscription-started" {
description
"This augmentation allows MSO specific parameters to be
exposed for a subscription.";
uses message-observation-domain-ids;
}
augment "/sn:subscription-modified" {
description
"This augmentation allows MSO specific parameters to be
uses message-observation-domain-ids;
}
augment "/sn:establish-subscription/sn:output" {
description
"This augmentation allows MSO specific parameters to be
exposed for a subscription.";
uses message-observation-domain-ids;
}
}
<CODE ENDS>
This document registers the following namespace URI in the IETF XML
Registry [RFC3688]:
URI: urn:ietf:params:xml:ns:yang:ietf-distributed-notif
This document registers the following YANG module in the YANG Module
Names registry [RFC3688]:
Name: ietf-distributed-notif
Namespace: urn:ietf:params:xml:ns:yang:ietf-distributed-notif
Prefix: dn
The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC5246].
The NETCONF Access Control Model (NACM) [RFC6536] provides the means
to restrict access for particular NETCONF or RESTCONF users to a
preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content.
The new data nodes introduced in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get-config or
notification) to this data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability:
* /subscriptions/subscription/message-observation-domain-ids
The entries in the two lists above will show where subscribed
resources might be located on the publishers. Access control MUST be
set so that only someone with proper access permissions has the
ability to access this resource.
13. Contributors
Alexander Clemm
Futurewai
2330 Central Expressway
Santa Clara
California
United States of America
Email: ludwig@clemm.org
14. Acknowledgements
15. References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[I-D.ietf-netconf-https-notif]
Jethanandani, M. and K. Watsen, "An HTTPS-based Transport
for YANG Notifications", Work in Progress, Internet-Draft,
draft-ietf-netconf-https-notif-10, 15 June 2022,
<https://www.ietf.org/archive/id/draft-ietf-netconf-https-
notif-10.txt>.
[I-D.ietf-netconf-notification-messages]
Voit, E., Jenkins, T., Birkholz, H., Bierman, A., and A.
Clemm, "Notification Message Headers and Bundles", Work in
Progress, Internet-Draft, draft-ietf-netconf-notification-
messages-08, 17 November 2019,
<https://www.ietf.org/archive/id/draft-ietf-netconf-
notification-messages-08.txt>.
[I-D.ietf-netconf-udp-notif]
Zhou, T., Zheng, G., Lucente, P., Graf, T., and P.
Francois, "UDP-based Transport for Configured
Subscriptions", Work in Progress, Internet-Draft, draft-
ietf-netconf-udp-notif-01, July 2020,
<https://datatracker.ietf.org/doc/html/draft-ietf-netconf-
udp-notif-01>.
Appendix A. Examples
<netconf:rpc message-id="101"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<establish-subscription
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:operational
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:ex="https://example.com/sample-data/1.0">
/ex:foo
</yp:datastore-xpath-filter>
<yp:periodic>
<yp:period>500</yp:period>
</yp:periodic>
</establish-subscription>
</netconf:rpc>
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications">
22
</id>
<message-observation-domain-id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications>
1
</message-observation-domain-id>
<message-observation-domain-id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications>
2
</message-observation-domain-id>
</rpc-reply>
<rpc message-id="102"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<modify-subscription
xmlns=
"urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<id>22</id>
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:operational
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:ex="https://example.com/sample-data/1.0">
/ex:bar
</yp:datastore-xpath-filter>
<yp:periodic>
<yp:period>250</yp:period>
</yp:periodic>
</modify-subscription>
</rpc>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-09-01T10:00:00Z</eventTime>
<subscription-modified
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<id>22</id>
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:operational
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:ex="https://example.com/sample-data/1.0">
/ex:bar
</yp:datastore-xpath-filter>
<yp:periodic>
<yp:period>250</yp:period>
</yp:periodic>
<message-observation-domain-id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notificationss>
1
</message-observation-domain-id>
</subscription-modified>
</notification>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2007-09-01T10:00:00Z</eventTime>
<subscription-started
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<identifier>39</identifier>
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:operational
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:ex="https://example.com/sample-data/1.0">
/ex:foo
</yp:datastore-xpath-filter>
<yp:periodic>
<yp:period>250</yp:period>
</yp:periodic>
<message-observation-domain-id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications>
1
</message-observation-domain-id>
<message-observation-domain-id
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications>
2
</message-observation-domain-id>
</subscription-started>
</notification>
Authors’ Addresses
Tianran Zhou
Huawei
156 Beiqing Rd., Haidian District
Beijing
China
Email: zhoutianran@huawei.com
Guangying Zheng
Huawei
101 Yu-Hua-Tai Software Road
Nanjing
Jiangsu,
China
Email: zhengguangying@huawei.com
Eric Voit
Cisco Systems
United States of America
Email: evoit@cisco.com
Thomas Graf
Swisscom
Binzring 17
CH- Zuerich 8045
Switzerland
Email: thomas.graf@swisscom.com
Pierre Francois
INSA-Lyon
Lyon
France
Email: pierre.francois@insa-lyon.fr
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 4
1.3. Adherence to the NMDA . . . . . . . . . . . . . . . . . . 4
2. Solution Overview . . . . . . . . . . . . . . . . . . . . . . 4
3. Solution Details . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Query Parameters for a Targeted List or Leaf-List . . . . 5
3.2. Query Parameter for Descendant Lists and Leaf-Lists . . . 8
3.3. Constraints on "where" and "sort-by" for "config false"
Lists . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3.1. Identifying Constrained "config false" Lists and
Leaf-Lists . . . . . . . . . . . . . . . . . . . . . 9
3.3.2. Indicating the Constraints for "where" Filters and
"sort-by" Expressions . . . . . . . . . . . . . . . . 10
4. The "ietf-list-pagination" Module . . . . . . . . . . . . . . 11
4.1. Data Model Overview . . . . . . . . . . . . . . . . . . . 11
4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 11
4.2.1. Constraining a "config false" list . . . . . . . . . 11
4.2.2. Indicating number remaining in a limited list . . . . 12
4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 12
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19
5.1. The "IETF XML" Registry . . . . . . . . . . . . . . . . . 19
5.2. The "YANG Module Names" Registry . . . . . . . . . . . . 19
6. Security Considerations . . . . . . . . . . . . . . . . . . . 19
6.1. Regarding the "ietf-list-pagination" YANG Module . . . . 19
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.1. Normative References . . . . . . . . . . . . . . . . . . 19
7.2. Informative References . . . . . . . . . . . . . . . . . 20
Appendix A. Vector Tests . . . . . . . . . . . . . . . . . . . . 21
A.1. Example YANG Module . . . . . . . . . . . . . . . . . . . 21
A.2. Example Data Set . . . . . . . . . . . . . . . . . . . . 28
A.3. Example Queries . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction
YANG modeled "list" and "leaf-list" nodes may contain a large number
of entries. For instance, there may be thousands of entries in the
configuration for network interfaces or access control lists. And
time-driven logging mechanisms, such as an audit log or a traffic
log, can contain millions of entries.
* A client may need to filter and/or sort list entries in order to,
e.g., present the view requested by a user.
* A server may need to iterate over many more list entries than
needed by a client.
This document defines a generic model for list pagination that can be
implemented by YANG-driven management protocols such as NETCONF
[RFC6241] and RESTCONF [RFC8040]. Details for how such protocols are
updated are outside the scope of this document.
1.1. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
The following terms are defined in [RFC7950] and are not redefined
here: client, data model, data tree, feature, extension, module,
leaf, leaf-list, and server.
1.2. Conventions
2. Solution Overview
3. Solution Details
* Section 3.1 defines five query parameters clients may use to page
through the entries of a single list or leaf-list in a data tree.
* Section 3.2 defines one query parameter that clients may use to
affect the content returned for descendant lists and leaf-lists.
Description
The "where" query parameter specifies a filter expression that
result-set entries must match.
Default Value
If this query parameter is unspecified, then no entries are
filtered from the working result-set.
Allowed Values
The allowed values are XPath 1.0 expressions. It is an error if
the XPath expression references a node identifier that does not
exist in the schema, is optional or conditional in the schema or,
for constrained "config false" lists and leaf-lists (see
Section 3.3), if the node identifier does not point to a node
having the "indexed" extension statement applied to it (see
Section 3.3.2).
Conformance
The "where" query parameter MUST be supported for all "config
true" lists and leaf-lists and SHOULD be supported for "config
false" lists and leaf-lists. Servers MAY disable the support for
some or all "config false" lists and leaf-lists as described in
Section 3.3.2.
Description
The "sort-by" query parameter indicates the node in the working
result-set (i.e., after the "where" parameter has been applied)
that entries should be sorted by. Sorts are in ascending order
(e.g., ’1’ before ’9’, ’a’ before ’z’, etc.). Missing values are
sorted to the end (e.g., after all nodes having values). Sub-
sorts are not supported.
Default Value
If this query parameter is unspecified, then the list or leaf-
list’s default order is used, per the YANG "ordered-by" statement
(see Section 7.7.7 of [RFC7950]).
Allowed Values
The allowed values are node identifiers. It is an error if the
specified node identifier does not exist in the schema, is
optional or conditional in the schema or, for constrained "config
false" lists and leaf-lists (see Section 3.3), if the node
identifier does not point to a node having the "indexed" extension
statement applied to it (see Section 3.3.2).
Conformance
The "sort-by" query parameter MUST be supported for all "config
true" lists and leaf-lists and SHOULD be supported for "config
false" lists and leaf-lists. Servers MAY disable the support for
some or all "config false" lists and leaf-lists as described in
Section 3.3.2.
Description
The "direction" query parameter indicates how the entries in the
working result-set (i.e., after the "sort-by" parameter has been
applied) should be traversed.
Default Value
If this query parameter is unspecified, the default value is
"forwards".
Allowed Values
The allowed values are:
forwards
Return entries in the forwards direction. Also known as the
"default" or "ascending" direction.
backwards
Return entries in the backwards direction. Also known as the
"reverse" or "descending" direction
Conformance
The "direction" query parameter MUST be supported for all lists
and leaf-lists.
Description
The "offset" query parameter indicates the number of entries in
the working result-set (i.e., after the "direction" parameter has
been applied) that should be skipped over when preparing the
response.
Default Value
If this query parameter is unspecified, then no entries in the
result-set are skipped, same as when the offset value ’0’ is
specified.
Allowed Values
The allowed values are unsigned integers. It is an error for the
offset value to exceed the number of entries in the working
result-set, and the "offset-out-of-range" identity SHOULD be
produced in the error output when this occurs.
Conformance
The "offset" query parameter MUST be supported for all lists and
leaf-lists.
Description
The "limit" query parameter limits the number of entries returned
from the working result-set (i.e., after the "offset" parameter
has been applied). Any list or leaf-list that is limited
includes, somewhere in its encoding, a metadata value [RFC7952]
called "remaining", a positive integer indicating the number of
elements that were not included in the result-set by the "limit"
operation, or the value "unknown" in case, e.g., the server
Default Value
If this query parameter is unspecified, the number of entries that
may be returned is unbounded.
Allowed Values
The allowed values are positive integers.
Conformance
The "limit" query parameter MUST be supported for all lists and
leaf-lists.
Description
The "sublist-limit" parameter limits the number of entries
returned for descendent lists and leaf-lists.
Default Value
If this query parameter is unspecified, the number of entries that
may be returned for descendent lists and leaf-lists is unbounded.
Allowed Values
The allowed values are positive integers.
Conformance
The "sublist-limit" query parameter MUST be supported for all
conventional nodes, including a datastore’s top-level node (i.e.,
’/’).
The "constrained" leaf MAY be specified for any "config false" list
or leaf-list.
module: ietf-list-pagination
augment /sysc:system-capabilities/sysc:datastore-capabilities
/sysc:per-node-capabilities:
+--ro constrained? empty
+--ro indexed? empty
Comments:
* As shown, this module augments two optional leaves into the "node-
selector" node of the "ietf-system-capabilities" module.
<system-capabilities
xmlns="urn:ietf:params:xml:ns:yang:ietf-system-capabilities"
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
xmlns:es="http://example.com/ns/example-social"
xmlns:lpg="urn:ietf:params:xml:ns:yang:ietf-list-pagination">
<datastore-capabilities>
<datastore>ds:operational</datastore>
<per-node-capabilities>
<node-selector>/es:audit-logs/es:audit-log</node-selector>
<lpg:constrained/>
</per-node-capabilities>
<per-node-capabilities>
<node-selector>/es:audit-logs/es:audit-log/es:timestamp</node-\
selector>
<lpg:indexed/>
</per-node-capabilities>
<per-node-capabilities>
<node-selector>/es:audit-logs/es:audit-log/es:member-id</node-\
selector>
<lpg:indexed/>
</per-node-capabilities>
<per-node-capabilities>
<node-selector>/es:audit-logs/es:audit-log/es:outcome</node-se\
lector>
<lpg:indexed/>
</per-node-capabilities>
</datastore-capabilities>
</system-capabilities>
module ietf-list-pagination {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-list-pagination";
prefix lpg;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-yang-metadata {
prefix md;
reference
"RFC 7952: Defining and Using Metadata with YANG";
}
import ietf-system-capabilities {
prefix sysc;
reference
"draft-ietf-netconf-notification-capabilities:
YANG Modules describing Capabilities for
Systems and Datastore Update Notifications";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: https://datatracker.ietf.org/wg/netconf
WG List: NETCONF WG list <mailto:netconf@ietf.org>";
description
"This module is used by servers to 1) indicate they support
pagination on ’list’ and ’leaf-list’ resources, 2) define a
grouping for each list-pagination parameter, and 3) indicate
which ’config false’ lists have constrained ’where’ and
’sort-by’ parameters and how they may be used, if at all.
revision 2022-07-24 {
description
"Initial revision.";
reference
"RFC XXXX: List Pagination for YANG-driven Protocols";
}
// Annotations
md:annotation remaining {
type union {
type uint32;
type enumeration {
enum "unknown" {
description
"Indicates that number of remaining entries is unknown
to the server in case, e.g., the server has determined
that counting would be prohibitively expensive.";
}
}
}
description
"This annotation contains the number of elements not included
in the result set (a positive value) due to a ’limit’ or
’sublist-limit’ operation. If no elements were removed,
this annotation MUST NOT appear. The minimum value (0),
which never occurs in normal operation, is reserved to
represent ’unknown’. The maximum value (2^32-1) is
reserved to represent any value greater than or equal
to 2^32-1 elements.";
}
// Identities
identity list-pagination-error {
description
"Base identity for list-pagination errors.";
}
identity offset-out-of-range {
base list-pagination-error;
description
"The ’offset’ query parameter value is greater than the number
of instances in the target list or leaf-list resource.";
}
// Groupings
grouping where-param-grouping {
description
"This grouping may be used by protocol-specific YANG modules
to define a protocol-specific query parameter.";
leaf where {
type union {
type yang:xpath1.0;
type enumeration {
enum "unfiltered" {
description
"Indicates that no entries are to be filtered
from the working result-set.";
}
}
}
default "unfiltered";
description
"The ’where’ parameter specifies a boolean expression
that result-set entries must match.
grouping sort-by-param-grouping {
description
"This grouping may be used by protocol-specific YANG modules
to define a protocol-specific query parameter.";
leaf sort-by {
type union {
type string {
// An RFC 7950 ’descendant-schema-nodeid’.
pattern ’([0-9a-fA-F]*:)?[0-9a-fA-F]*’
+ ’(/([0-9a-fA-F]*:)?[0-9a-fA-F]*)*’;
}
type enumeration {
enum "none" {
description
"Indicates that the list or leaf-list’s default
order is to be used, per the YANG ’ordered-by’
statement.";
}
}
}
default "none";
description
"The ’sort-by’ parameter indicates the node in the
working result-set (i.e., after the ’where’ parameter
has been applied) that entries should be sorted by.
grouping direction-param-grouping {
description
"This grouping may be used by protocol-specific YANG modules
to define a protocol-specific query parameter.";
leaf direction {
type enumeration {
enum forwards {
description
"Indicates that entries should be traversed from
the first to last item in the working result set.";
}
enum backwards {
description
"Indicates that entries should be traversed from
the last to first item in the working result set.";
}
}
default "forwards";
description
"The ’direction’ parameter indicates how the entries in the
working result-set (i.e., after the ’sort-by’ parameter
has been applied) should be traversed.";
}
}
grouping offset-param-grouping {
description
grouping limit-param-grouping {
description
"This grouping may be used by protocol-specific YANG modules
to define a protocol-specific query parameter.";
leaf limit {
type union {
type uint32 {
range "1..max";
}
type enumeration {
enum "unbounded" {
description
"Indicates that the number of entries that may be
returned is unbounded.";
}
}
}
default "unbounded";
description
"The ’limit’ parameter limits the number of entries returned
from the working result-set (i.e., after the ’offset’
parameter has been applied).
grouping sublist-limit-param-grouping {
description
"This grouping may be used by protocol-specific YANG modules
to define a protocol-specific query parameter.";
leaf sublist-limit {
type union {
type uint32 {
range "1..max";
}
type enumeration {
enum "unbounded" {
description
"Indicates that the number of entries that may be
returned is unbounded.";
}
}
}
default "unbounded";
description
"The ’sublist-limit’ parameter limits the number of entries
for descendent lists and leaf-lists.
// Protocol-accessible nodes
or ’sort-by’ parameters.";
}
}
}
<CODE ENDS>
5. IANA Considerations
This document registers one URI in the "ns" subregistry of the IETF
XML Registry [RFC3688] maintained at
https://www.iana.org/assignments/xml-registry/xml-registry.xhtml#ns.
Following the format in [RFC3688], the following registration is
requested:
URI: urn:ietf:params:xml:ns:yang:ietf-list-pagination
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
This document registers one YANG module in the YANG Module Names
registry [RFC6020] maintained at https://www.iana.org/assignments/
yang-parameters/yang-parameters.xhtml. Following the format defined
in [RFC6020], the below registration is requested:
name: ietf-list-pagination
namespace: urn:ietf:params:xml:ns:yang:ietf-list-pagination
prefix: lpg
RFC: XXXX
6. Security Considerations
7. References
[I-D.ietf-netconf-notification-capabilities]
Lengyel, B., Clemm, A., and B. Claise, "YANG Modules
Describing Capabilities for Systems and Datastore Update
Notifications", Work in Progress, Internet-Draft, draft-
ietf-netconf-notification-capabilities-21, 15 October
2021, <https://datatracker.ietf.org/doc/html/draft-ietf-
netconf-notification-capabilities-21>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
Test inputs and outputs are provided in a manner that is both generic
and concise.
This module has been specially crafted to cover every notable edge
condition, especially with regards to the types of the data nodes.
module: example-social
+--rw members
| +--rw member* [member-id]
| +--rw member-id string
| +--rw email-address inet:email-address
| +--rw password ianach:crypt-hash
| +--rw avatar? binary
| +--rw tagline? string
| +--rw privacy-settings
| | +--rw hide-network? boolean
| | +--rw post-visibility? enumeration
| +--rw following* -> /members/member/member-id
| +--rw posts
| | +--rw post* [timestamp]
| | +--rw timestamp yang:date-and-time
| | +--rw title? string
| | +--rw body string
| +--rw favorites
| | +--rw uint8-numbers* uint8
| | +--rw uint64-numbers* uint64
| | +--rw int8-numbers* int8
| | +--rw int64-numbers* int64
| | +--rw decimal64-numbers* decimal64
| | +--rw bits* bits
| +--ro stats
| +--ro joined yang:date-and-time
| +--ro membership-level enumeration
| +--ro last-activity? yang:date-and-time
+--ro audit-logs
+--ro audit-log* []
+--ro timestamp yang:date-and-time
+--ro member-id string
+--ro source-ip inet:ip-address
+--ro request string
+--ro outcome boolean
module example-social {
yang-version 1.1;
namespace "http://example.com/ns/example-social";
prefix es;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import iana-crypt-hash {
prefix ianach;
reference
"RFC 7317: A YANG Data Model for System Management";
}
revision YYYY-MM-DD {
description
"Initial version.";
reference
"RFC XXXX: Example social module.";
}
container members {
description
"Container for list of members.";
list member {
key "member-id";
description
"List of members.";
leaf member-id {
type string {
length "1..80";
pattern ’.*[\n].*’ {
modifier invert-match;
}
}
description
"The member’s identifier.";
}
leaf email-address {
type inet:email-address;
mandatory true;
description
"The member’s email address.";
}
leaf password {
type ianach:crypt-hash;
mandatory true;
description
"The member’s hashed-password.";
}
leaf avatar {
type binary;
description
"An binary image file.";
}
leaf tagline {
type string {
length "1..80";
pattern ’.*[\n].*’ {
modifier invert-match;
}
}
description
"The member’s tagline.";
}
container privacy-settings {
leaf hide-network {
type boolean;
description
"Hide who you follow and who follows you.";
}
leaf post-visibility {
type enumeration {
enum public {
description
"Posts are public.";
}
enum unlisted {
description
"Posts are unlisted, though visable to all.";
}
enum followers-only {
description
"Posts only visible to followers.";
}
}
default public;
description
"The post privacy setting.";
}
description
"Preferences for the member.";
}
leaf-list following {
type leafref {
path "/members/member/member-id";
}
description
"Other members this members is following.";
}
container posts {
description
"The member’s posts.";
list post {
key timestamp;
leaf timestamp {
type yang:date-and-time;
description
"The timestamp for the member’s post.";
}
leaf title {
type string {
length "1..80";
pattern ’.*[\n].*’ {
modifier invert-match;
}
}
description
"A one-line title.";
}
leaf body {
type string;
mandatory true;
description
"The body of the post.";
}
description
"A list of posts.";
}
}
container favorites {
description
"The member’s favorites.";
leaf-list uint8-numbers {
type uint8;
ordered-by user;
description
"The member’s favorite uint8 numbers.";
}
leaf-list uint64-numbers {
type uint64;
ordered-by user;
description
"The member’s favorite uint64 numbers.";
}
leaf-list int8-numbers {
type int8;
ordered-by user;
description
"The member’s favorite int8 numbers.";
}
leaf-list int64-numbers {
type int64;
ordered-by user;
description
"The member’s favorite uint64 numbers.";
}
leaf-list decimal64-numbers {
type decimal64 {
fraction-digits 5;
}
ordered-by user;
description
"The member’s favorite decimal64 numbers.";
}
leaf-list bits {
type bits {
bit zero {
position 0;
description "zero";
}
bit one {
position 1;
description "one";
}
bit two {
position 2;
description "two";
}
}
ordered-by user;
description
container stats {
config false;
description
"Operational state members values.";
leaf joined {
type yang:date-and-time;
mandatory true;
description
"Timestamp when member joined.";
}
leaf membership-level {
type enumeration {
enum admin {
description
"Site administrator.";
}
enum standard {
description
"Standard membership level.";
}
enum pro {
description
"Professional membership level.";
}
}
mandatory true;
description
"The membership level for this member.";
}
leaf last-activity {
type yang:date-and-time;
description
"Timestamp of member’s last activity.";
}
}
}
}
container audit-logs {
config false;
description
"Audit log configuration";
list audit-log {
description
{
"example-social:members": {
"member": [
{
"member-id": "bob",
"email-address": "bob@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Here and now, like never before.",
"posts": {
"post": [
{
"timestamp": "2020-08-14T03:32:25Z",
"body": "Just got in."
},
{
"timestamp": "2020-08-14T03:33:55Z",
"body": "What’s new?"
},
{
"timestamp": "2020-08-14T03:34:30Z",
"body": "I’m bored..."
}
]
},
"favorites": {
"decimal64-numbers": ["3.14159", "2.71828"]
},
"stats": {
"joined": "2020-08-14T03:30:00Z",
"membership-level": "standard",
"last-activity": "2020-08-14T03:34:30Z"
}
},
{
"member-id": "eric",
"email-address": "eric@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Go to bed with dreams; wake up with a purpose.",
"following": ["alice"],
"posts": {
"post": [
{
"timestamp": "2020-09-17T18:02:04Z",
"title": "Son, brother, husband, father",
"body": "What’s your story?"
}
]
},
"favorites": {
"bits": ["two", "one", "zero"]
},
"stats": {
"joined": "2020-09-17T19:38:32Z",
"membership-level": "pro",
"last-activity": "2020-09-17T18:02:04Z"
}
},
{
"member-id": "alice",
"email-address": "alice@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Every day is a new day",
"privacy-settings": {
"hide-network": false,
"post-visibility": "public"
},
"following": ["bob", "eric", "lin"],
"posts": {
"post": [
{
"timestamp": "2020-07-08T13:12:45Z",
"title": "My first post",
"body": "Hiya all!"
},
{
"timestamp": "2020-07-09T01:32:23Z",
"title": "Sleepy...",
"body": "Catch y’all tomorrow."
}
]
},
"favorites": {
"uint8-numbers": [17, 13, 11, 7, 5, 3],
"int8-numbers": [-5, -3, -1, 1, 3, 5]
},
"stats": {
"joined": "2020-07-08T12:38:32Z",
"membership-level": "admin",
"last-activity": "2021-04-01T02:51:11Z"
}
},
{
"member-id": "lin",
"email-address": "lin@example.com",
"password": "$0$1543",
"privacy-settings": {
"hide-network": true,
"post-visibility": "followers-only"
},
},
{
"timestamp": "2020-12-12T21:00:28Z",
"member-id": "eric",
"source-ip": "192.168.254.1",
"request": "POST /groups/group/10",
"outcome": true
},
{
"timestamp": "2021-01-03T06:47:59Z",
"member-id": "alice",
"source-ip": "192.168.0.92",
"request": "POST /groups/group/333",
"outcome": true
},
{
"timestamp": "2021-01-21T10:00:00Z",
"member-id": "bob",
"source-ip": "192.168.2.16",
"request": "POST /groups/group/42",
"outcome": true
},
{
"timestamp": "2020-02-07T09:06:21Z",
"member-id": "alice",
"source-ip": "192.168.0.92",
"request": "POST /groups/group/1202",
"outcome": true
},
{
"timestamp": "2020-02-28T02:48:11Z",
"member-id": "bob",
"source-ip": "192.168.2.16",
"request": "POST /groups/group/345",
"outcome": true
}
]
}
}
A.3.1.1. limit=1
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: 1
RESPONSE
{
"example-social:uint8-numbers": [17],
"@example-social:uint8-numbers": [
{
"ietf-list-pagination:remaining": 5
}
]
}
A.3.1.2. limit=2
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: 2
RESPONSE
{
"example-social:uint8-numbers": [17, 13],
"@example-social:uint8-numbers": [
{
"ietf-list-pagination:remaining": 4
}
]
}
A.3.1.3. limit=5
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: 5
RESPONSE
{
"example-social:uint8-numbers": [17, 13, 11, 7, 5],
"@example-social:uint8-numbers": [
{
"ietf-list-pagination:remaining": 1
}
]
}
A.3.1.4. limit=6
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: 6
RESPONSE
{
"example-social:uint8-numbers": [17, 13, 11, 7, 5, 3]
}
A.3.1.5. limit=7
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: 7
RESPONSE
{
"example-social:uint8-numbers": [17, 13, 11, 7, 5, 3]
}
A.3.2.1. offset=0
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 0
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [17, 13, 11, 7, 5, 3]
}
A.3.2.2. offset=1
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 1
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [13, 11, 7, 5, 3]
}
A.3.2.3. offset=2
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 2
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [11, 7, 5, 3]
}
A.3.2.4. offset=5
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 5
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [3]
}
A.3.2.5. offset=6
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 6
Limit: -
RESPONSE
{
"example-social:uint8-numbers": []
}
A.3.2.6. offset=7
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: 7
Limit: -
RESPONSE
ERROR
A.3.3.1. direction=forwards
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: forwards
Offset: -
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [17, 13, 11, 7, 5, 3]
}
A.3.3.2. direction=backwards
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: -
Direction: backwards
Offset: -
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [3, 5, 7, 11, 13, 17]
}
The section provides three examples, one for a "leaf-list" and two
for a "list", with one using a direct descendent and the other using
an indirect descendent.
REQUEST
Target: /example-social:members/member=alice/favorites/uint8-numbers
Pagination Parameters:
Where: -
Sort-by: .
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:uint8-numbers": [3, 5, 7, 11, 13, 17]
}
This example illustrates when the target node’s type is a "list" and
a direct descendent is the "sort-by" node.
REQUEST
Target: /example-social:members/member
Pagination Parameters:
Where: -
Sort-by: member-id
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:member": [
{
"member-id": "alice",
...
},
{
"member-id": "bob",
...
},
{
"member-id": "eric",
...
},
{
"member-id": "joe",
...
},
{
"member-id": "lin",
...
}
]
}
This example illustrates when the target node’s type is a "list" and
an indirect descendent is the "sort-by" node.
REQUEST
Target: /example-social:members/member
Pagination Parameters:
Where: -
Sort-by: stats/joined
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:member": [
{
"member-id": "alice",
...
},
{
"member-id": "lin",
...
},
{
"member-id": "bob",
...
},
{
"member-id": "eric",
...
},
{
"member-id": "joe",
...
}
]
}
The section provides one example for when the "sort-by" node is not
present in the data set.
FIXME
REQUEST
Target: /example-social:members/member
Pagination Parameters:
Where: //.[contains (@email-address,’@example.com’)]
Sort-by: -
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:member": [
{
"member-id": "bob",
...
},
{
"member-id": "eric",
...
},
{
"member-id": "alice",
...
},
{
"member-id": "joe",
...
},
{
"member-id": "lin",
...
}
]
}
REQUEST
Target: /example-social:members/member
Pagination Parameters:
Where: //posts//post[starts-with(@timestamp,’2020’)]
Sort-by: -
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:member": [
{
"member-id": "bob",
...
},
{
"member-id": "eric",
...
},
{
"member-id": "alice",
...
},
{
"member-id": "joe",
...
}
]
}
This example sets the sublist-limit value ’1’, which returns just the
first entry for all descendent lists and leaf-lists.
REQUEST
Datastore: <intended>
Target: /example-social:members/member=alice
Sublist-limit: 1
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:member": [
{
"member-id": "alice",
"email-address": "alice@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Every day is a new day",
"privacy-settings": {
"hide-network": "false",
"post-visibility": "public"
},
"following": ["bob"],
"@following": [
{
"ietf-list-pagination:remaining": "2"
}
],
"posts": {
"post": [
{
"@": {
"ietf-list-pagination:remaining": "1"
},
"timestamp": "2020-07-08T13:12:45Z",
"title": "My first post",
"body": "Hiya all!"
}
]
},
"favorites": {
"uint8-numbers": [17],
"int8-numbers": [-5],
"@uint8-numbers": [
{
"ietf-list-pagination:remaining": "5"
}
],
"@int8-numbers": [
{
"ietf-list-pagination:remaining": "5"
}
]
}
}
]
}
This example sets the sublist-limit value ’1’, which returns just the
first entry for all descendent lists and leaf-lists.
REQUEST
Datastore: <intended>
Target: /
Sublist-limit: 1
Pagination Parameters:
Where: -
Sort-by: -
Direction: -
Offset: -
Limit: -
RESPONSE
{
"example-social:members": {
"member": [
{
"@": {
"ietf-list-pagination:remaining": "4"
},
"member-id": "bob",
"email-address": "bob@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Here and now, like never before.",
"posts": {
"post": [
{
"@": {
"ietf-list-pagination:remaining": "2"
},
"timestamp": "2020-08-14T03:32:25Z",
"body": "Just got in."
}
]
},
"favorites": {
"decimal64-numbers": ["3.14159"],
"@decimal64-numbers": [
{
"ietf-list-pagination:remaining": "1"
}
]
}
}
]
}
}
REQUEST
Datastore: <operational>
Target: /example-social:members/member
Sublist-limit: 1
Pagination Parameters:
Where: //stats//joined[starts-with(@timestamp,’2020’)]
Sort-by: member-id
Direction: backwards
Offset: 2
Limit: 2
RESPONSE
{
"example-social:member": [
{
"@": {
"ietf-list-pagination:remaining": "1"
},
"member-id": "eric",
"email-address": "eric@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Go to bed with dreams; wake up with a purpose.",
"following": ["alice"],
"posts": {
"post": [
{
"timestamp": "2020-09-17T18:02:04Z",
"title": "Son, brother, husband, father",
"body": "What’s your story?"
}
]
},
"favorites": {
"bits": ["two"],
"@bits": [
{
"ietf-list-pagination:remaining": "2"
}
]
},
"stats": {
"joined": "2020-09-17T19:38:32Z",
"membership-level": "pro",
"last-activity": "2020-09-17T18:02:04Z"
}
},
{
"member-id": "bob",
"email-address": "bob@example.com",
"password": "$0$1543",
"avatar": "BASE64VALUE=",
"tagline": "Here and now, like never before.",
"posts": {
"post": [
{
"@": {
"ietf-list-pagination:remaining": "2"
},
"timestamp": "2020-08-14T03:32:25Z",
"body": "Just got in."
}
]
},
"favorites": {
"decimal64-numbers": ["3.14159"],
"@decimal64-numbers": [
{
"ietf-list-pagination:remaining": "1"
}
]
},
"stats": {
"joined": "2020-08-14T03:30:00Z",
"membership-level": "standard",
"last-activity": "2020-08-14T03:34:30Z"
}
}
}
}
Acknowledgements
The authors would like to thank the following for lively discussions
on list (ordered by first name): Andy Bierman, Martin Bjoerklund, and
Robert Varga.
Authors’ Addresses
Kent Watsen
Watsen Networks
Email: kent+ietf@watsen.net
Qin Wu
Huawei Technologies
Email: bill.wu@huawei.com
Olof Hagsand
Netgate
Email: olof@hagsand.se
Hongwei Li
Hewlett Packard Enterprise
Email: flycoolman@gmail.com
Per Andersson
Cisco Systems
Email: perander@cisco.com
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 3
2. Updates to NETCONF operations . . . . . . . . . . . . . . . . 3
2.1. Updates to RFC 6241 . . . . . . . . . . . . . . . . . . . 3
2.2. Updates to RFC 8526 . . . . . . . . . . . . . . . . . . . 3
3. List Pagination for NETCONF . . . . . . . . . . . . . . . . . 3
4. Error Reporting . . . . . . . . . . . . . . . . . . . . . . . 4
5. YANG Module for List Pagination in NETCONF . . . . . . . . . 5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6.1. The "IETF XML" Registry . . . . . . . . . . . . . . . . . 7
6.2. The "YANG Module Names" Registry . . . . . . . . . . . . 7
7. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7.1. The "ietf-netconf-list-pagination" YANG Module . . . . . 8
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.1. Normative References . . . . . . . . . . . . . . . . . . 8
8.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 10
Appendix B. Example YANG Module . . . . . . . . . . . . . . . . 10
Appendix C. Example Data Set . . . . . . . . . . . . . . . . . . 10
Appendix D. Example Queries . . . . . . . . . . . . . . . . . . 10
D.1. List pagination with all query parameters . . . . . . . . 10
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 12
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 12
1. Introduction
1.1. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
1.2. Conventions
module: ietf-list-pagination-nc
augment /nc:get/nc:input:
+---w list-pagination
+---w where? union
+---w sort-by? union
+---w direction? enumeration
+---w offset? uint32
+---w limit? union
+---w sublist-limit? union
augment /nc:get-config/nc:input:
+---w list-pagination
+---w where? union
+---w sort-by? union
+---w direction? enumeration
+---w offset? uint32
+---w limit? union
+---w sublist-limit? union
augment /ncds:get-data/ncds:input:
+---w list-pagination
+---w where? union
+---w sort-by? union
+---w direction? enumeration
+---w offset? uint32
+---w limit? union
+---w sublist-limit? union
Comments:
* The "get" and "get-config" augments are against the YANG module
defined in [RFC6241]. The "get-data" augment is against the YANG
module defined in [RFC8526].
4. Error Reporting
module ietf-list-pagination-nc {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc";
prefix lpgnc;
import ietf-netconf {
prefix nc;
reference
"RFC 6241: Network Configuration Protocol (NETCONF)";
}
import ietf-netconf-nmda {
prefix ncds;
reference
"RFC 8526: NETCONF Extensions to Support the
Network Management Datastore Architecture";
}
import ietf-list-pagination {
prefix lp;
reference
"RFC XXXX: List Pagination for YANG-driven Protocols";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: https://datatracker.ietf.org/wg/netconf
WG List: NETCONF WG list <mailto:netconf@ietf.org>";
description
"This module augments the <get>, <get-config>, and <get-data>
’rpc’ statements to support list pagination.
revision 2022-07-24 {
description
"Initial revision.";
reference
"RFC XXXX: NETCONF Extensions to Support List Pagination";
}
grouping pagination-parameters {
description "A grouping for list pagination parameters.";
container list-pagination {
description "List pagination parameters.";
uses lp:where-param-grouping;
uses lp:sort-by-param-grouping;
uses lp:direction-param-grouping;
uses lp:offset-param-grouping;
uses lp:limit-param-grouping;
uses lp:sublist-limit-param-grouping;
}
}
augment "/nc:get/nc:input" {
description
"Allow the ’get’ operation to use content filter
augment "/nc:get-config/nc:input" {
description
"Allow the ’get-config’ operation to use content filter
parameter for specifying the YANG list or leaf-list
that is to be retrieved";
uses pagination-parameters;
}
augment "/ncds:get-data/ncds:input" {
description
"Allow the ’get-data’ operation to use content filter
parameter for specifying the YANG list or leaf-list
that is to be retrieved";
uses pagination-parameters;
}
}
<CODE ENDS>
6. IANA Considerations
This document registers one URI in the "ns" subregistry of the IETF
XML Registry [RFC3688] maintained at
https://www.iana.org/assignments/xml-registry/xml-registry.xhtml#ns.
Following the format in [RFC3688], the following registration is
requested:
URI: urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
This document registers one YANG module in the YANG Module Names
registry [RFC6020] maintained at https://www.iana.org/assignments/
yang-parameters/yang-parameters.xhtml. Following the format defined
in [RFC6020], the below registration is requested:
name: ietf-list-pagination-nc
namespace: urn:ietf:params:xml:ns:yang:ietf-list-pagination-nc
prefix: pgnc
RFC: XXXX
7. Security Considerations
The YANG module defined in this document extends the base operations
for NETCONF [RFC6241] and RESTCONF [RFC8040]. The lowest NETCONF
layer is the secure transport layer, and the mandatory-to-implement
secure transport is Secure Shell (SSH) [RFC6242]. The lowest
RESTCONF layer is HTTPS, and the mandatory-to-implement secure
transport is TLS [RFC8446].
8. References
[I-D.ietf-netconf-list-pagination]
"List Pagination...", <FIXME>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
The Example Data Set used by the examples is defined in Appendix A.2
of [I-D.ietf-netconf-list-pagination].
<lp:xml-list xmlns:lp="urn:ietf:params:xml:ns:yang:ietf-restconf-lis\
t-pagination"
xmlns="http://example.com/ns/example-social">
<member lp:remaining="1">
<member-id>eric</member-id>
<email-address>eric@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Go to bed with dreams; wake up with a purpose.</tagline>
<following>alice</following>
<posts>
<post>
<timestamp>2020-09-17T18:02:04Z</timestamp>
<title>Son, brother, husband, father</title>
<body>What’s your story?</body>
</post>
</posts>
<favorites>
<bits lp:remaining="2">two</bits>
</favorites>
<stats>
<joined>2020-09-17T19:38:32Z</joined>
<membership-level>pro</membership-level>
<last-activity>2020-09-17T18:02:04Z</last-activity>
</stats>
</member>
<member lp:remaining="1">
<member-id>bob</member-id>
<email-address>bob@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Here and now, like never before.</tagline>
<posts>
<post lp:remaining="2">
<timestamp>2020-08-14T03:32:25Z</timestamp>
<body>Just got in.</body>
</post>
</posts>
<favorites>
<decimal64-numbers lp:remaining="1">3.14159</bits>
</favorites>
<stats>
<joined>2020-08-14T03:30:00Z</joined>
<membership-level>standard</membership-level>
<last-activity>2020-08-14T03:34:30Z</last-activity>
</stats>
</member>
</lp:xml-list>
Acknowledgements
Authors’ Addresses
Kent Watsen
Watsen Networks
Email: kent+ietf@watsen.net
Qin Wu
Huawei
101 Software Avenue, Yuhua District
Nanjing
Jiangsu, 210012
China
Email: bill.wu@huawei.com
Olof Hagsand
Netgate
Email: olof@hagsand.se
Hongwei Li
HPE
Email: flycoolman@gmail.com
Per Andersson
Cisco Systems
Email: perander@cisco.com
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 3
2. Updates to RFC 8040 . . . . . . . . . . . . . . . . . . . . . 3
2.1. Resource Targets . . . . . . . . . . . . . . . . . . . . 3
2.2. Media Type . . . . . . . . . . . . . . . . . . . . . . . 3
2.3. Query Parameters . . . . . . . . . . . . . . . . . . . . 4
2.3.1. The "limit" Query Parameter . . . . . . . . . . . . . 5
2.3.2. The "offset" Query Parameter . . . . . . . . . . . . 5
2.3.3. The "direction" Query Parameter . . . . . . . . . . . 5
2.3.4. The "sort-by" Query Parameter . . . . . . . . . . . . 6
2.3.5. The "where" Query Parameter . . . . . . . . . . . . . 6
2.3.6. The "sublist-limit" Query Parameter . . . . . . . . . 6
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
3.1. The "RESTCONF Capability URNs" Registry . . . . . . . . . 6
3.2. The "Media Types" Registry . . . . . . . . . . . . . . . 7
3.2.1. Media Type "application/yang-data+xml-list" . . . . . 7
4. Security Considerations . . . . . . . . . . . . . . . . . . . 8
5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Normative References . . . . . . . . . . . . . . . . . . 8
5.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. Example YANG Module . . . . . . . . . . . . . . . . 9
Appendix B. Example Data Set . . . . . . . . . . . . . . . . . . 9
Appendix C. Example Queries . . . . . . . . . . . . . . . . . . 9
C.1. List pagination with all query parameters . . . . . . . . 9
C.2. Deletion of a leaf-list . . . . . . . . . . . . . . . . . 11
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 11
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction
1.1. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
1.2. Conventions
+-----------+---------+-----------------------------------------+
| Name | Methods | Description |
+-----------+---------+-----------------------------------------+
| limit | GET, | Limits the number of entries returned. |
| | HEAD | If not specified, the number of entries |
| | | that may be returned is unbounded. |
| | | |
| offset | GET, | Indicates the number of entries in the |
| | HEAD | result set that should the skipped over |
| | | when preparing the response. If not |
| | | specified, then no entries in the |
| | | result set are skipped. |
| | | |
| direction | GET, | Indicates the direction that the result |
| | HEAD | set is to be traversed. If not |
| | | specified, then the result set is |
| | | traversed in the "forwards" direction. |
| | | |
| sort-by | GET, | Indicates the node name that the result |
| | HEAD | set should be sorted by. If not |
| | | specified, then the result set’s |
| | | default order is used, per YANG’s |
| | | "ordered-by" statement. |
| | | |
| where | GET, | Specifies a filter expression that |
| | HEAD | result set entries must match. If |
| | | not specified, then no entries are |
| | | filtered from the result set. |
| | | |
| sublist- | GET, | Limits the number of entries returned |
| limit | HEAD | returned for descendent lists and |
| | | leaf-lists. If not specified, the |
| | | number of entries that may be returned |
| | | is unbounded. |
+-----------+---------+-----------------------------------------+
For all of the query parameters, the query parameter is only allowed
for the GET and HEAD methods on "list" and "leaf-list" data
resources. A "400 Bad Request" status-line MUST be returned if used
with any other method or resource type. The error-tag value
"operation-not-supported" is used in this case.
3. IANA Considerations
All the registrations are to use this document (RFC XXXX) for the
"Reference" value.
Additional information:
4. Security Considerations
This document does not define a YANG module and hence there are no
data modeling considerations beyond those discussed in
[I-D.ietf-netconf-list-pagination].
5. References
[I-D.ietf-netconf-list-pagination]
"List Pagination...", <FIXME>.
[I-D.ietf-netconf-restconf-collection]
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Collection Resource", Work in Progress, Internet-Draft,
draft-ietf-netconf-restconf-collection-00, 30 January
2015, <https://www.ietf.org/archive/id/draft-ietf-netconf-
restconf-collection-00.txt>.
The Example Data Set used by the examples is defined in Appendix A.2
of [I-D.ietf-netconf-list-pagination].
GET /restconf/ds/ietf-datastores:running/example-social:members/memb\
er?where=//stats//joined[starts-with(@timestamp,’2020’)]&sort-by=tim\
estamp&direction=backwards&offset=2&limit=2&sublist-limit=1 HTTP/1.1
Host: example.com
Accept: application/yang-data+xml-list
HTTP/1.1 200 OK
Date: Thu, 26 Jan 2017 20:56:30 GMT
Server: example-server
Last-Modified: Thu, 26 Jan 2017 20:55:30 GMT
Content-Type: application/yang-data+xml-list
<lp:xml-list xmlns:lp="urn:ietf:params:xml:ns:yang:ietf-restconf-lis\
t-pagination"
xmlns="http://example.com/ns/example-social">
<member lp:remaining="1">
<member-id>eric</member-id>
<email-address>eric@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Go to bed with dreams; wake up with a purpose.</tagline>
<following>alice</following>
<posts>
<post>
<timestamp>2020-09-17T18:02:04Z</timestamp>
<title>Son, brother, husband, father</title>
<body>What’s your story?</body>
</post>
</posts>
<favorites>
<bits lp:remaining="2">two</bits>
</favorites>
<stats>
<joined>2020-09-17T19:38:32Z</joined>
<membership-level>pro</membership-level>
<last-activity>2020-09-17T18:02:04Z</last-activity>
</stats>
</member>
<member lp:remaining="1">
<member-id>bob</member-id>
<email-address>bob@example.com</email-address>
<password>$0$1543</password>
<avatar>BASE64VALUE=</avatar>
<tagline>Here and now, like never before.</tagline>
<posts>
<post lp:remaining="2">
<timestamp>2020-08-14T03:32:25Z</timestamp>
<body>Just got in.</body>
</post>
</posts>
<favorites>
<decimal64-numbers lp:remaining="1">3.14159</bits>
</favorites>
<stats>
<joined>2020-08-14T03:30:00Z</joined>
<membership-level>standard</membership-level>
<last-activity>2020-08-14T03:34:30Z</last-activity>
</stats>
</member>
</lp:xml-list>
DELETE /restconf/ds/ietf-datastores:running/example-social:members/m\
ember=bob/favorites/decimal64-numbers HTTP/1.1
Host: example.com
Accept: application/yang-data+xml
Acknowledgements
Authors’ Addresses
Kent Watsen
Watsen Networks
Email: kent+ietf@watsen.net
Qin Wu
Huawei Technologies
101 Software Avenue, Yuhua District
Nanjing
Jiangsu, 210012
China
Email: bill.wu@huawei.com
Olof Hagsand
Netgate
Email: olof@hagsand.se
Hongwei Li
Hewlett Packard Enterprise
Email: flycoolman@gmail.com
Per Andersson
Cisco Systems
Email: perander@cisco.com
Abstract
RFC 7589 defines how to protect NETCONF messages with TLS 1.2. This
document describes how to protect NETCONF messages with TLS 1.3.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Conventions and Definitions . . . . . . . . . . . . . . . . . 2
3. Early Data . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 3
5. Security Considerations . . . . . . . . . . . . . . . . . . . 4
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1. Normative References . . . . . . . . . . . . . . . . . . 5
7.2. Informative References . . . . . . . . . . . . . . . . . 6
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 6
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction
This document addresses cipher suites and the use of early data,
which is also known as 0-RTT data. It also updates the "netconf-tls"
IANA Registered Port Number entry to refer to this document. All
other provisions set forth in [RFC7589] are unchanged, including
connection initiation, message framing, connection closure,
certificate validation, server identity, and client identity.
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
3. Early Data
4. Cipher Suites
5. Security Considerations
6. IANA Considerations
7. References
[I-D.ietf-tls-rfc8446bis]
Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", Work in Progress, Internet-Draft, draft-
ietf-tls-rfc8446bis-04, 7 March 2022,
<https://datatracker.ietf.org/doc/html/draft-ietf-tls-
rfc8446bis-04>.
[I-D.ietf-uta-rfc7525bis]
Sheffer, Y., Saint-Andre, P., and T. Fossati,
"Recommendations for Secure Use of Transport Layer
Security (TLS) and Datagram Transport Layer Security
(DTLS)", Work in Progress, Internet-Draft, draft-ietf-uta-
rfc7525bis-11, 16 August 2022,
<https://datatracker.ietf.org/doc/html/draft-ietf-uta-
rfc7525bis-11>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/rfc/rfc6241>.
Acknowledgments
Authors’ Addresses
Sean Turner
sn3rd
Email: sean@sn3rd.com
Russ Housley
Vigil Security, LLC
516 Dranesville Road
Herndon, VA, 20170
United States of America
Email: housley@vigilsec.com
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
extracted from this document must include Revised BSD License text as
described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Revised BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. Definitions and terminology . . . . . . . . . . . . . . . . . 3
2.1. Session specific datastore . . . . . . . . . . . . . . . 3
2.2. Shared candidate configuration . . . . . . . . . . . . . 4
2.3. Private candidate configuration . . . . . . . . . . . . . 4
3. Limitations using the shared candidate configuration for
multiple clients . . . . . . . . . . . . . . . . . . . . 4
3.1. Issues . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.1. Unintended deployment of alternate users configuration
changes . . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Current mitigation strategies . . . . . . . . . . . . . . 5
3.2.1. Locking the shared candidate configuration
datastore . . . . . . . . . . . . . . . . . . . . . . 5
3.2.2. Always use the running configuration datastore . . . 5
3.2.3. Fine-grained locking . . . . . . . . . . . . . . . . 5
4. Key choices influencing the solution . . . . . . . . . . . . 6
4.1. When is a private candidate created . . . . . . . . . . . 6
4.2. Interaction between running and private-candidate . . . . 6
4.2.1. Independent private candidate branch (Static branch
mode) . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2.2. Continually updating private candidate (Continuous
rebase mode) . . . . . . . . . . . . . . . . . . . . 7
4.3. Defining and detecting conflicts . . . . . . . . . . . . 8
4.4. Reporting unresolved conflicts to the user . . . . . . . 8
4.5. Resolving conflicts . . . . . . . . . . . . . . . . . . . 9
5. Proposed solutions for using private candidates configurations
with NETCONF . . . . . . . . . . . . . . . . . . . . . . 9
5.1. Client capability declaration . . . . . . . . . . . . . . 9
5.2. Private candidate datastore . . . . . . . . . . . . . . . 10
5.2.1. New and existing NETCONF operation interactions . . . 11
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
7. Security Considerations . . . . . . . . . . . . . . . . . . . 12
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.1. Normative References . . . . . . . . . . . . . . . . . . 12
8.2. Informative References . . . . . . . . . . . . . . . . . 13
Appendix A. NETCONF operations impacted . . . . . . . . . . . . 13
A.1. <get> . . . . . . . . . . . . . . . . . . . . . . . . . . 13
A.2. <get-config> . . . . . . . . . . . . . . . . . . . . . . 13
A.3. <get-data> . . . . . . . . . . . . . . . . . . . . . . . 13
A.4. <copy-config> . . . . . . . . . . . . . . . . . . . . . . 14
A.5. <delete-config> . . . . . . . . . . . . . . . . . . . . . 14
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 14
1. Introduction
As the name shared candidate suggests, all clients have access to the
same candidate configuration. This means that multiple clients may
make changes to the shared candidate prior to the configuration being
committed. This behaviour may be undesirable as one client may
unwittingly commit the configuration changes made by another client.
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
The specific NETCONF session (and user) that created the private
candidate configuration is the only session (user) that has access to
it over NETCONF. Devices may expose this to other users through
other interfaces but this is out of scope for this document.
3.1. Issues
The use of the running configuration datastore as the target for all
configuration changes does not resolve any issues regarding blocking
of system access in the case a lock is taken, nor does it provide a
solution for multiple NETCONF clients as each configuration change is
applied immediately and the client has no knowledge of the current
configuration at the point in time that they commenced the editing
activity nor at the point they commit the activity.
This section captures the key aspects considered when defining the
private candidate solution.
* <commit> is issued
* The output of the <compare> operation may not match the set of
changes made to the session’s private candidate but may include
different output due to the changes in the running configuration
made by other sessions.
Conflicts occur when the intent of the NETCONF client may have been
different had it had a different starting point. When a conflict
occurs it is useful that the client be given the opportunity to re-
evaluate its intent. Examples of conflicts include:
Using this approach clients may improve their performance and reduce
the likelihood of blocking other clients from continuing with valid
operational activities.
One or more private candidates may exist at any one time, however, a
private candidate MUST:
urn:ietf:netconf:pc
All NMDA operations that support NMDA datastores SHOULD support the
private-candidate datastore.
urn:ietf:netconf:pc
5.2.1.1. <update>
5.2.1.2. <edit-config>
Changes in the private-candidate datastore are not lost when the lock
is released.
5.2.1.4. <compare>
6. IANA Considerations
7. Security Considerations
8. References
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
A.1. <get>
The <get> operation does not accept a datastore value and therefore
this document is not applicable to this operation. The use of the
get operation will not create a private candidate configuration.
A.2. <get-config>
A.3. <get-data>
A.4. <copy-config>
A.5. <delete-config>
Contributors
The authors would like to thank Jan Lindblad, Jason Sterne and Rob
Wilton for their contributions and reviews.
Authors’ Addresses
James Cumming
Nokia
Email: james.cumming@nokia.com
Robert Wills
Cisco Systems
Email: rowills@cisco.com
Abstract
Rereading the entire data store and analyzing the response for
changes is an inefficient mechanism for synchronization. This
document specifies an extension to NETCONF that allows clients and
servers to keep synchronized with a much smaller data exchange and
without any need for servers to store information about the clients.
Discussion Venues
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions and Definitions . . . . . . . . . . . . . . . . . 4
3. NETCONF Txid Extension . . . . . . . . . . . . . . . . . . . 4
3.1. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2. General Txid Principles . . . . . . . . . . . . . . . . . 5
3.3. Initial Configuration Retrieval . . . . . . . . . . . . . 6
3.4. Subsequent Configuration Retrieval . . . . . . . . . . . 7
3.5. Conditional Transactions . . . . . . . . . . . . . . . . 10
3.5.1. Transactions toward the Candidate Datastore . . . . . 12
3.6. Dependencies within Transactions . . . . . . . . . . . . 13
3.7. Other NETCONF Operations . . . . . . . . . . . . . . . . 16
3.8. YANG-Push Subscriptions . . . . . . . . . . . . . . . . . 17
4. Txid Mechanisms . . . . . . . . . . . . . . . . . . . . . . . 17
4.1. The etag attribute txid mechanism . . . . . . . . . . . . 17
4.2. The last-modified attribute txid mechanism . . . . . . . 18
4.3. Common features to both etag and last-modified txid
mechanisms . . . . . . . . . . . . . . . . . . . . . . . 19
5. Txid Mechanism Examples . . . . . . . . . . . . . . . . . . . 21
5.1. Initial Configuration Response . . . . . . . . . . . . . 21
5.1.1. With etag . . . . . . . . . . . . . . . . . . . . . . 21
5.1.2. With last-modified . . . . . . . . . . . . . . . . . 25
5.2. Configuration Response Pruning . . . . . . . . . . . . . 27
5.3. Configuration Change . . . . . . . . . . . . . . . . . . 31
5.4. Conditional Configuration Change . . . . . . . . . . . . 35
5.5. Using etags with Other NETCONF Operations . . . . . . . . 37
5.6. YANG-Push . . . . . . . . . . . . . . . . . . . . . . . . 38
6. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 40
6.1. Base module for txid in NETCONF . . . . . . . . . . . . . 40
6.2. Additional support for txid in YANG-Push . . . . . . . . 43
7. Security Considerations . . . . . . . . . . . . . . . . . . . 45
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 45
9. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
1. Introduction
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Versioned node A node in the instantiated YANG data tree for which
the server maintains a transaction id (txid) value.
The common use cases for such mecahnisms are briefly discussed here.
The server returning txid values for the versioned nodes MUST ensure
the txid values are changed every time there has been a configuration
change at or below the node associated with the txid value. This
means any update of a config true node will result in a new txid
value for all ancestor versioned node, up to and including the
datastore root itself.
This also means a server MUST update the txid value for any nodes
that change as a result of a configuration change, regardless of
source, even if the changed nodes are not explicitly part of the
change payload. An example of this is dependent data under YANG RFC
7950 (https://tools.ietf.org/html/rfc7950) when- or choice-
statements.
The server MUST NOT change the txid value of a versioned node unless
the node itself or a child node of that node has been changed. The
server MUST NOT change any txid values due to changes in config false
data.
The exact encoding varies by mechanism, but all txid mechanisms would
have a special "txid-request" txid value (e.g. "?") which is
guaranteed to never be used as a normal txid value. Clients MAY use
this special txid value associated with one or more nodes in the data
tree to indicate to the server that they are interested in txid
values below that point of the data tree.
Client Server
| |
| ------------------------------------------> |
| get-config |
| acls (txid: ?) |
| |
| <------------------------------------------ |
| data |
| acls (txid: 5152) |
| acl A1 (txid: 4711) |
| aces (txid: 4711) |
| ace R1 (txid: 4711) |
| matches ipv4 protocol udp |
| acl A2 (txid: 5152) |
| aces (txid: 5152) |
| ace R7 (txid: 4711) |
| matches ipv4 dscp AF11 |
| ace R8 (txid: 5152) |
| matches udp source-port port 22 |
| ace R9 (txid: 5152) |
| matches tcp source-port port 22 |
v v
Clients MAY request the server to return txid values in the response
by adding one or more txid values received previously in get-config
or get-data requests.
* The node is not a versioned node, i.e. the server does not
maintain a txid value for this node. In this case, the server
MUST look up the closest ancestor that is a versioned node, and
use the txid value of that node as the txid value of this node in
the further handling below. The datastore root is always a
versioned node.
* The node is a versioned node, and the client specified txid value
matches the server’s txid value. In this case the server MUST
return the node decorated with a special "txid-match" txid value
(e.g. "=") to the matching node, pruning any value and child
nodes. A server MUST NOT ever use the txid-match value (e.g. "=")
as an actual txid value.
For list elements, pruning child nodes means that top-level key nodes
MUST be included in the response, and other child nodes MUST NOT be
included. For containers, child nodes MUST NOT be included.
Client Server
| |
| ------------------------------------------> |
| get-config |
| acls (txid: 5152) |
| acl A1 (txid: 4711) |
| aces (txid: 4711) |
| acl A2 (txid: 5152) |
| aces (txid: 5152) |
| |
| <------------------------------------------ |
| data |
| acls (txid: =) |
v v
Client Server
| |
| ------------------------------------------> |
| get-config |
| acls (txid: 5152) |
| acl A1 (txid: 4711) |
| acl A2 (txid: 5152) |
| |
| <------------------------------------------ |
| data |
| acls (txid: 6614) |
| acl A1 (txid: =) |
| acl A2 (txid: 6614) |
| aces (txid: 6614) |
| ace R7 (txid: 4711) |
| matches ipv4 dscp AF11 |
| ace R8 (txid: 5152) |
| matches udp source-port port 22 |
| ace R9 (txid: 6614) |
| matches tcp source-port port 830 |
v v
Client Server
| |
| ------------------------------------------> |
| get-config |
| acls |
| acls A2 |
| aces |
| ace R7 |
| matches |
| ipv4 |
| dscp (txid: 4711) |
| |
| <------------------------------------------ |
| data |
| acls |
| acl A2 |
| aces |
| ace R7 |
| matches |
| ipv4 |
| dscp (txid: =) |
v v
By supplying the latest txid values known to the client in its change
requests (edit-config etc.), it can request the server to reject the
transaction in case any relevant changes have occurred at the server
that the client is not yet aware of.
Clients that are also interested to know the txid assigned to the
modified versioned nodes in the model immediately in the response
could set a flag in the rpc message to request the server to return
the new txid with the ok message.
Client Server
| |
| ------------------------------------------> |
| edit-config (request new txid in response) |
| config (txid: 5152) |
| acls (txid: 5152) |
| acl A1 (txid: 4711) |
| aces (txid: 4711) |
| ace R1 (txid: 4711) |
| matches ipv4 protocol tcp |
| |
| <------------------------------------------ |
| ok (txid: 7688) |
v v
Client Server
| |
| ------------------------------------------> |
| get-config |
| acls (txid: ?) |
| |
| <------------------------------------------ |
| data (txid: 7688) |
| acls (txid: 7688) |
| acl A1 (txid: 7688) |
| aces (txid: 7688) |
| ace R1 (txid: 7688) |
| matches ipv4 protocol tcp |
| acl A2 (txid: 6614) |
| aces (txid: 6614) |
| ace R7 (txid: 4711) |
| matches ipv4 dscp AF11 |
| ace R8 (txid: 5152) |
| matches udp source-port port 22 |
| ace R9 (txid: 6614) |
| matches tcp source-port port 830 |
v v
Figure 6: For all leaf objects that were changed, and all their
ancestors, the txids are updated to the value returned in the ok
message.
error-tag: operation-failed
error-type: protocol
error-severity: error
Client Server
| |
| ------------------------------------------> |
| edit-config |
| config |
| acls |
| acl A1 (txid: 4711) |
| aces (txid: 4711) |
| ace R1 (txid: 4711) |
| ipv4 dscp AF22 |
| |
| <------------------------------------------ |
| rpc-error |
| error-tag operation-failed |
| error-type protocol |
| error-severity error |
| error-info |
| mismatch-path /acls/acl[A1] |
| mismatch-etag-value 6912 |
v v
Client Server
| |
| ------------------------------------------> |
| edit-config |
| config (txid: 5152) |
| acls (txid: 5152) |
| acl A1 (txid: 4711) |
| type ipv4 |
| |
| <------------------------------------------ |
| ok |
| |
| ------------------------------------------> |
| edit-config |
| config |
| acls |
| acl A1 |
| aces (txid: 4711) |
| ace R1 (txid: 4711) |
| matches ipv4 protocol tcp |
| |
| <------------------------------------------ |
| ok |
| |
| ------------------------------------------> |
| commit (request new txid in response) |
| |
| <------------------------------------------ |
| ok (txid: 7688) |
v v
augment /acl:acls/acl:acl {
when /energy-example:energy/energy-example:metering-enabled;
leaf energy-tracing {
type boolean;
default false;
}
leaf energy-consumption {
config false;
type uint64;
units J;
}
}
Client Server
| |
| ------------------------------------------> |
| get-config |
| energy (txid: ?) |
| acls (txid: ?) |
| |
| <------------------------------------------ |
| data (txid: 7688) |
| energy metering-enabled true (txid: 4711) |
| acls (txid: 7688) |
| acl A1 (txid: 7688) |
| energy-tracing false |
| aces (txid: 7688) |
| ace R1 (txid: 7688) |
| matches ipv4 protocol tcp |
| acl A2 (txid: 6614) |
| energy-tracing true |
| aces (txid: 6614) |
| ace R7 (txid: 4711) |
| matches ipv4 dscp AF11 |
| ace R8 (txid: 5152) |
| matches udp source-port port 22 |
| ace R9 (txid: 6614) |
| matches tcp source-port port 830 |
v v
Client Server
| |
| ------------------------------------------> |
| edit-config (request new txid in response) |
| config |
| energy metering-enabled false |
| |
| <------------------------------------------ |
| ok (txid: 9118) |
v v
After the transaction above, the new configuration state has the
energy-tracing leafs removed.
Client Server
| |
| ------------------------------------------> |
| get-config |
| energy (txid: ?) |
| acls (txid: ?) |
| |
| <------------------------------------------ |
| data (txid: 9118) |
| energy metering-enabled false (txid: 9118) |
| acls (txid: 9118) |
| acl A1 (txid: 9118) |
| aces (txid: 7688) |
| ace R1 (txid: 7688) |
| matches ipv4 protocol tcp |
| acl A2 (txid: 9118) |
| aces (txid: 6614) |
| ace R7 (txid: 4711) |
| matches ipv4 dscp AF11 |
| ace R8 (txid: 5152) |
| matches udp source-port port 22 |
| ace R9 (txid: 6614) |
| matches tcp source-port port 830 |
v v
Figure 11: The txid for the energy subtree has changed since that
was the target of the edit-config. The txids of the ACLs have
also changed since the energy-tracing leafs are now removed by
the now false when- expression.
commit At commit, with regards to the txid values, the server MUST
treat the contents of the candidate datastore as if any txid value
provided by the client when updating the candidate was provided in
a single edit-config towards the running datastore. If the
transaction is rejected due to txid value mismatch, an rpc-error
as described in section Conditional Transactions (Section 3.5)
MUST be sent.
4. Txid Mechanisms
If a client uses more than one txid mechanism, such as both etag and
last-modified in a particular message to a server, or patricular
commit, the result is undefined.
The etag attribute values are opaque UTF-8 strings chosen freely,
except that the etag string must not contain space, backslash or
double quotes. The point of this restriction is to make it easy to
reuse implementations that adhere to section 2.3.1 in RFC 7232
(https://tools.ietf.org/html/rfc7232). The probability SHOULD be
made very low that an etag value that has been used historically by a
server is used again by that server if the configuration is
different.
It is RECOMMENDED that the same etag txid values are used across all
management interfaces (i.e. NETCONF, RESTCONF and any other the
server might implement), if it implements more than one.
The detailed rules for when to update the etag value are described in
section General Txid Principles (Section 3.2). These rules are
chosen to be consistent with the ETag mechanism in RESTCONF, RFC 8040
(https://tools.ietf.org/html/rfc8040), specifically sections 3.4.1.2,
3.4.1.3 and 3.5.2.
The detailed rules for when to update the last-modified value are
described in section General Txid Principles (Section 3.2). These
rules are chosen to be consistent with the Last-Modified mechanism in
RESTCONF, RFC 8040 (https://tools.ietf.org/html/rfc8040),
specifically sections 3.4.1.1, 3.4.1.3 and 3.5.1.
elements of the value tag. The txid attribute on the edit tag
reflects the txid associated with the changes encoded in this edit
section, as well as parent nodes. Later edit sections in the same
push-update or push-change-update may still supercede the txid value
for some or all of the nodes in the current edit section.
The txid attributes are valid on the following NETCONF tags, where
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0",
xmlns:ncds="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda",
xmlns:sn="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications",
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-patch" and
xmlns:ypatch="urn:ietf:params:xml:ns:yang:ietf-yang-patch":
* /nc:rpc/nc:get-config
* /nc:rpc/nc:get-config/nc:filter//*
* /nc:rpc/ncds:get-data
* /nc:rpc/ncds:get-data/ncds:subtree-filter//*
* /nc:rpc/ncds:get-data/ncds:xpath-filter//*
* /nc:rpc/nc:edit-config/nc:config
* /nc:rpc/nc:edit-config/nc:config//*
* /nc:rpc/ncds:edit-data/ncds:config
* /nc:rpc/ncds:edit-data/ncds:config//*
* /nc:rpc-reply/nc:data
* /nc:rpc-reply/nc:data//*
* /nc:rpc-reply/ncds:data
* /nc:rpc-reply/ncds:data//*
* /nc:rpc-reply/nc:ok
* /yp:push-update/yp:datastore-contents/ypatch:yang-patch/
ypatch:edit
* /yp:push-update/yp:datastore-contents/ypatch:yang-patch/
ypatch:edit/ypatch:value//*
* /yp:push-change-update/yp:datastore-contents/ypatch:yang-patch/
ypatch:edit
* /yp:push-change-update/yp:datastore-contents/ypatch:yang-patch/
ypatch:edit/ypatch:value//*
NOTE: In the etag examples below, we have chosen to use a txid value
consisting of "nc" followed by a monotonously increasing integer.
This is convenient for the reader trying to make sense of the
examples, but is not an implementation requirement. An etag would
often be implemented as a "random" string of characters, with no
comes-before/after relation defined.
<rpc-reply message-id="1"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data txid:etag="nc5152">
<acls xmlns=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="nc5152">
<acl txid:etag="nc4711">
<name>A1</name>
<aces txid:etag="nc4711">
<ace txid:etag="nc4711">
<name>R1</name>
<matches>
<ipv4>
<protocol>udp</protocol>
</ipv4>
</matches>
</ace>
</aces>
</acl>
<acl txid:etag="nc5152">
<name>A2</name>
<aces txid:etag="nc5152">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R8</name>
<matches>
<udp>
<source-port>
<port>22</port>
</source-port>
</udp>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R9</name>
<matches>
<tcp>
<source-port>
<port>22</port>
</source-port>
</tcp>
</matches>
</ace>
</aces>
</acl>
</acls>
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"
txid:etag="nc3072">
<groups txid:etag="nc3072">
<group txid:etag="nc3072">
<name>admin</name>
<user-name>sakura</user-name>
<user-name>joe</user-name>
</group>
</groups>
</nacm>
</data>
</rpc>
To retrieve etag attributes for "acls", but not for "nacm", a client
might send:
<rpc-reply message-id="3"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls xmlns=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="nc5152">
<acl txid:etag="nc4711">
<name>A1</name>
<aces txid:etag="nc4711">
<ace txid:etag="nc4711">
<name>R1</name>
<matches>
<ipv4>
<protocol>udp</protocol>
</ipv4>
</matches>
</ace>
</aces>
</acl>
<acl txid:etag="nc5152">
<name>A2</name>
<aces txid:etag="nc5152">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R8</name>
<matches>
<udp>
<source-port>
<port>22</port>
</source-port>
</udp>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R9</name>
<matches>
<tcp>
<source-port>
<port>22</port>
</source-port>
</tcp>
</matches>
</ace>
</aces>
</acl>
</acls>
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"/>
<groups>
<group>
<name>admin</name>
<user-name>sakura</user-name>
<user-name>joe</user-name>
</group>
</groups>
</nacm>
</data>
</rpc>
<rpc-reply message-id="4"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:last-modified="2022-04-01T12:34:56.789012Z">
<acl txid:last-modified="2022-03-20T16:20:11.333444Z">
<name>A1</name>
<ace txid:last-modified="2022-03-20T16:20:11.333444Z">
<name>R1</name>
<matches>
<ipv4>
<protocol>udp</protocol>
</ipv4>
</matches>
</ace>
</acl>
<acl txid:last-modified="2022-04-01T12:34:56.789012Z">
<name>A2</name>
<aces txid:last-modified="2022-04-01T12:34:56.789012Z">
<ace txid:last-modified="2022-03-20T16:20:11.333444Z">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
<ace txid:last-modified="2022-04-01T12:34:56.789012Z">
<name>R8</name>
<matches>
<udp>
<source-port>
<port>22</port>
</source-port>
</udp>
</matches>
</ace>
<ace txid:last-modified="2022-04-01T12:34:56.789012Z">
<name>R9</name>
<matches>
<tcp>
<source-port>
<port>22</port>
</source-port>
</tcp>
</matches>
</ace>
</aces>
</acl>
</acls>
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"/>
<groups>
<group>
<name>admin</name>
<user-name>sakura</user-name>
<user-name>joe</user-name>
</group>
</groups>
</nacm>
</data>
</rpc>
A NETCONF client that already knows some txid values MAY request that
the configuration retrieval request is pruned with respect to the
client’s prior knowledge.
To retrieve only changes for "acls" that do not have the last known
etag txid value, a client might send:
<rpc-reply message-id="6"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="="/>
</data>
</rpc>
Or, if a configuration change has taken place under /acls since the
client was last updated, the server’s response may look like:
<rpc-reply message-id="6"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="nc6614">
<acl txid:etag="=">
<name>A1</name>
</acl>
<acl txid:etag="nc6614">
<name>A2</name>
<aces txid:etag="nc6614">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R8</name>
<matches>
<ipv4>
<source-port>
<port>22</port>
</source-port>
</ipv4>
</matches>
</ace>
<ace txid:etag="nc6614">
<name>R9</name>
<matches>
<ipv4>
<source-port>
<port>830</port>
</source-port>
</ipv4>
</matches>
</ace>
</aces>
</acl>
</acls>
</data>
</rpc>
If a txid value is specified for a leaf, and the txid value matches,
the leaf value is pruned.
<rpc-reply message-id="7"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<acl>
<name>A2</name>
<aces>
<ace>
<name>R7</name>
<matches>
<ipv4>
<dscp txid:etag="="/>
</ipv4>
</matches>
</ace>
</aces>
</acl>
</acls>
</data>
</rpc-reply>
A client that wishes to update the ace R1 protocol to tcp might send:
The server would update the protocol leaf in the running datastore,
and return an rpc-reply as follows:
<rpc-reply message-id="8"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<ok txid:etag="nc7688"/>
</rpc-reply>
<rpc-reply message-id="9"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="nc7688">
<acl txid:etag="nc7688">
<name>A1</name>
<aces txid:etag="nc7688">
<ace txid:etag="nc7688">
<name>R1</name>
<matches>
<ipv4>
<protocol>tcp</protocol>
</ipv4>
</matches>
</ace>
</aces>
</acl>
<acl txid:etag="nc6614">
<name>A2</name>
<aces txid:etag="nc6614">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
<ace txid:etag="nc5152">
<name>R8</name>
<matches>
<udp>
<source-port>
<port>22</port>
</source-port>
</udp>
</matches>
</ace>
<ace txid:etag="nc6614">
<name>R9</name>
<matches>
<tcp>
<source-port>
<port>830</port>
</source-port>
</tcp>
</matches>
</ace>
</aces>
</acl>
</acls>
</data>
</rpc>
<rpc-reply message-id="9"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="cli2222">
<acl txid:etag="nc7688">
<name>A1</name>
<aces txid:etag="nc7688">
<ace txid:etag="nc7688">
<name>R1</name>
<matches>
<ipv4>
<protocol>tcp</protocol>
</ipv4>
</matches>
</ace>
</aces>
</acl>
<acl txid:etag="cli2222">
<name>A2</name>
<aces txid:etag="cli2222">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
</aces>
</acl>
</acls>
</data>
</rpc>
If acl A1 now has the etag txid value "nc7688", as expected by the
client, the transaction goes through, and the server responds
something like:
<rpc-reply message-id="10"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<ok txid:etag="nc8008"/>
</rpc-reply>
<rpc-reply message-id="11"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<data>
<acls
xmlns="urn:ietf:params:xml:ns:yang:ietf-access-control-list"
txid:etag="nc8008">
<acl txid:etag="cli2222">
<name>A2</name>
<aces txid:etag="cli2222">
<ace txid:etag="nc4711">
<name>R7</name>
<matches>
<ipv4>
<dscp>AF11</dscp>
</ipv4>
</matches>
</ace>
</aces>
</acl>
</acls>
</data>
</rpc>
In case acl A1 did not have the expected etag txid value "nc7688",
when the server processed this request, it rejects the transaction,
and might send:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:acl=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list"
xmlns:ietf-netconf-txid=
"urn:ietf:params:xml:ns:yang:ietf-netconf-txid"
message-id="11">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<ietf-netconf-txid:txid-value-mismatch-error-info>
<ietf-netconf-txid:mismatch-path>
/acl:acls/acl:acl[acl:name="A1"]
</ietf-netconf-txid:mismatch-path>
<ietf-netconf-txid:mismatch-etag-value>
cli6912
</ietf-netconf-txid:mismatch-etag-value>
</ietf-netconf-txid:txid-value-mismatch-error-info>
</error-info>
</rpc-error>
</rpc-reply>
The client MAY request that the new etag txid value is returned as an
attribute on the ok response for a successful commit. The client
requests this by adding with-etag to the commit operation.
<rpc message-id="12"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
xmlns:ietf-netconf-txid=
"urn:ietf:params:xml:ns:yang:ietf-netconf-txid"
<commit>
<ietf-netconf-txid:with-etag>true<ietf-netconf-txid:with-etag>
</commit>
</rpc>
<rpc-reply message-id="12"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:txid="urn:ietf:params:xml:ns:netconf:txid:1.0">
<ok txid:etag="nc8008"/>
</rpc-reply>
5.6. YANG-Push
A client MAY request that the updates for one or more YANG Push
subscriptions are annotated with the txid values. The request might
look like this:
<netconf:rpc message-id="13"
xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
<establish-subscription
xmlns=
"urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"
xmlns:ietf-netconf-txid-yp=
"urn:ietf:params:xml:ns:yang:ietf-txid-yang-push">
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:running
</yp:datastore>
<yp:datastore-xpath-filter
xmlns:acl=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list">
/acl:acls
</yp:datastore-xpath-filter>
<yp:periodic>
<yp:period>500</yp:period>
</yp:periodic>
<ietf-netconf-txid-yp:with-etag>
true
</ietf-netconf-txid-yp:with-etag>
</establish-subscription>
</netconf:rpc>
<rpc message-id="14"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<modify-subscription
xmlns=
"urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"
xmlns:ietf-netconf-txid-yp=
"urn:ietf:params:xml:ns:yang:ietf-txid-yang-push">
<id>1011</id>
<yp:datastore
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
ds:running
</yp:datastore>
<ietf-netconf-txid-yp:with-etag>
false
</ietf-netconf-txid-yp:with-etag>
</modify-subscription>
</rpc>
<notification
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2022-04-04T06:00:24.16Z</eventTime>
<push-change-update
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<id>89</id>
<datastore-changes>
<yang-patch>
<patch-id>0</patch-id>
<edit txid:etag="nc8008">
<edit-id>edit1</edit-id>
<operation>delete</operation>
<target xmlns:acl=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list">
/acl:acls
</target>
<value>
<acl xmlns=
"urn:ietf:params:xml:ns:yang:ietf-access-control-list">
<name>A1</name>
</acl>
</value>
</edit>
</yang-patch>
</datastore-changes>
</push-change-update>
</notification>
6. YANG Modules
module ietf-netconf-txid {
yang-version 1.1;
namespace
’urn:ietf:params:xml:ns:yang:ietf-netconf-txid’;
prefix ietf-netconf-txid;
import ietf-netconf {
prefix nc;
}
import ietf-netconf-nmda {
prefix ncds;
}
import ietf-yang-structure-ext {
prefix sx;
}
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <netconf@ietf.org>
description
"NETCONF Transaction ID aware operations for NMDA.
revision 2022-04-01 {
description
"Initial revision";
reference
"RFC XXXX: Xxxxxxxxx";
}
typedef etag-t {
type string {
pattern ".* .*" {
modifier invert-match;
}
pattern ’.*".*’ {
modifier invert-match;
}
pattern ".*\\.*" {
modifier invert-match;
}
}
description
"Unique Entity-tag txid value representing a specific
transaction. Could be any string that does not contain
spaces, double quotes or backslash. The txid values ’?’
and ’=’ have special meaning.";
}
typedef last-modified-t {
type union {
type yang:date-and-time;
type enumeration {
enum ? {
description "Txid value used by clients that is
guaranteed not to match any txid on the server.";
}
enum = {
description "Txid value used by servers to indicate
that contents has been pruned due to txid match
grouping txid-grouping {
leaf with-etag {
type boolean;
description
"Indicates whether the client requests the server to include
a txid:etag txid attribute when the configuration has
changed.";
}
leaf with-last-modified {
type boolean;
description
"Indicates whether the client requests the server to include
a txid:last-modified attribute when the configuration has
changed.";
}
description
"Grouping for txid mechanisms, to be augmented into
rpcs that modify configuration data stores.";
}
augment /nc:edit-config/nc:input {
uses txid-grouping;
description
"Injects the txid mechanisms into the
edit-config operation";
}
augment /nc:commit/nc:input {
uses txid-grouping;
description
"Injects the txid mechanisms into the
commit operation";
}
augment /ncds:edit-data/ncds:input {
uses txid-grouping;
description
"Injects the txid mechanisms into the
edit-data operation";
sx:structure txid-value-mismatch-error-info {
container txid-value-mismatch-error-info {
description
"This error is returned by a NETCONF server when a client
sends a configuration change request, with the additonal
condition that the server aborts the transaction if the
server’s configuration has changed from what the client
expects, and the configuration is found not to actually
not match the client’s expectation.";
leaf mismatch-path {
type instance-identifier;
description
"Indicates the YANG path to the element with a mismatching
etag txid value.";
}
leaf mismatch-etag-value {
type etag-t;
description
"Indicates server’s txid value of the etag
attribute for one mismatching element.";
}
leaf mismatch-last-modified-value {
type last-modified-t;
description
"Indicates server’s txid value of the last-modified
attribute for one mismatching element.";
}
}
}
}
module ietf-netconf-txid-yang-push {
yang-version 1.1;
namespace
’urn:ietf:params:xml:ns:yang:ietf-netconf-txid-yang-push’;
prefix ietf-netconf-txid-yp;
import ietf-subscribed-notifications {
prefix sn;
reference
"RFC 8639: Subscription to YANG Notifications";
}
import ietf-netconf-txid {
prefix ietf-netconf-txid;
reference
"RFC XXXX: Xxxxxxxxx";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <netconf@ietf.org>
description
"NETCONF Transaction ID aware operations for YANG Push.
revision 2022-04-01 {
description
"Initial revision";
reference
"RFC XXXX: Xxxxxxxxx";
}
augment "/sn:establish-subscription/sn:input" {
description
7. Security Considerations
TODO Security
8. IANA Considerations
urn:ietf:params:netconf:capability:txid:1.0
This document registers three XML namespace URNs in the ’IETF XML
registry’, following the format defined in RFC 3688
(https://tools.ietf.org/html/rfc3688).
URI: urn:ietf:params:xml:ns:netconf:txid:1.0
URI: urn:ietf:params:xml:ns:yang:ietf-netconf-txid
URI: urn:ietf:params:xml:ns:yang:ietf-netconf-txid-yang-push
This document registers two module names in the ’YANG Module Names’
registry, defined in RFC 6020 (https://tools.ietf.org/html/rfc6020).
name: ietf-netconf-txid
prefix: ietf-netconf-txid
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-txid
RFC: XXXX
and
name: ietf-netconf-txid-yp
prefix: ietf-netconf-txid-yp
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-txid-yang-push
RFC: XXXX
9. Changes
* YANG Push functionality has been added. This allows YANG Push
users to receive txid updates as part of the configuration
updates. This functionality comes in a separate YANG module, to
allow implementors to cleanly keep all this functionality out.
* Moved the actual YANG module code into proper module files that
are included in the source document. These modules can be
compiled as proper modules without any extraction tools.
Acknowledgments
The author wishes to thank Benoit Claise for making this work happen,
and the following individuals, who all provided helpful comments: Per
Andersson, Kent Watsen, Andy Bierman, Robert Wilton, Qiufang Ma.
Author’s Address
Jan Lindblad
Cisco Systems
Email: jlindbla@cisco.com
Abstract
Discussion Venues
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Use cases . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Configuration Mistakes . . . . . . . . . . . . . . . . . 4
3.2. Concurrent NMS Configuration . . . . . . . . . . . . . . 5
3.3. Conflicting Intents . . . . . . . . . . . . . . . . . . . 5
4. Relying on Transaction-id to Trace Configuration
Modifications . . . . . . . . . . . . . . . . . . . . . . 5
4.1. Instantiating the YANG module . . . . . . . . . . . . . . 5
4.2. Using the YANG module . . . . . . . . . . . . . . . . . . 7
5. YANG module . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2. YANG module ietf-external-transaction-id . . . . . . . . 10
6. Security Considerations . . . . . . . . . . . . . . . . . . . 12
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 13
9. Open Issues / TODO . . . . . . . . . . . . . . . . . . . . . 13
9.1. Possibility of setting the transaction Id from the
client . . . . . . . . . . . . . . . . . . . . . . . . . 13
10. Normative References . . . . . . . . . . . . . . . . . . . . 13
1. Introduction
2. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
This document uses the terms client and server from [RFC6241].
3. Use cases
networks.
Building on the previous use case is the situation where two NMS’,
unaware of the each other, configuring routers, each believing that
they are the only NMS for specific device. So one configuration
executed by the NMS1 is overwritten by the NMS2, which in turn is
overwritten by NMS1, etc.
+---------------+
| Orchestrator |
+---------------+
| tx-1
v
+---------------+
| Controller |
+---------------+
| tx-2 | tx-3
v v
+-----+ +-----+
| NE1 | | NE2 |
+-----+ +-----+
The two cases above are not mutually exclusive. A Controller can be
configured by an Orchestrator and configure network equipment in
turn, as shown in Figure 1. In that case, both the northbound
transaction ID, shared with the Orchestrator and the southbound
transaction IDs, shared with the network equipments, are stored in
the Controller. They are both associated to the corresponding
configuration commit in the Controller.
issue is detected.
+---------------+
.----------------[5]match SB tx-1----------->| |
| | Orchestrator |
| ----------------[6]commit-id---------------| |
| | +---------------+
| | | tx-1
| | v
| | +---------------+
| | .-----------[3] match SB tx-2--------->| |
| | | | Controller |
| | | .-----------[4] NB-tx-id tx-1--------| |
| | | | +---------------+
| | | | | tx-2
| v | v v
+-----------+ +----+
| Anomaly |--[1] match commit-id before time t-->| |
| Detection | | NE |
| System |<--------- [2] NB-tx-id tx-2 ----- ---| |
+----------+ +----+
model. In Figure 2, for that step, the software would look for
the id of tx-2 in the southbound transaction IDs stored in the
Controller.
4. From that query, the ADS knows the local-commit-id on the client
(Controller in our case). Since the local-commit-id is
associated to a northbound-transaction-id, namely the id of tx-1,
the ADS continues the investigation. The client to query is
identified by the northbound-client-id, in our case the
Orchestrator.
5. The ADS queries the Orchestrator, trying to find a match for the
Id of tx-1 as a southbound transaction ID.
5. YANG module
5.1. Overview
module: ietf-external-transaction-id
+--ro external-transactions-id
+--ro configuration-change* [local-commit-id]
+--ro local-commit-id string
+--ro northbound-transaction-id? ietf-netconf-txid:etag-t
+--ro northbound-client-id string
+--ro southbound-transaction-id* ietf-netconf-txid:etag-t
Even if this document focuses only on NETCONF, the use cases defined
in Section 3 are not specific to NETCONF and the mechanism described
in this document could be adapted to other configuration mechanisms.
For instance, a configuration modification pushed via CLI can be
identified via a label. As such cases are difficult to standardize,
we won’t cover them in this document. However, our model could be
extended to support such mechanism for instance by using a
configuration label instead of the northbound transaction ID.
import ietf-netconf-txid {
prefix ietf-netconf-txid;
}
organization
"IETF OPSAWG Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/opsawg/>
WG List: <mailto:opsawg@ietf.org>
Author: Benoit Claise <mailto:benoit.claise@huawei.com>
Author: Jean Quilbeuf <mailto:jean.quilbeuf@huawei.com>";
description
"This module enable tracing of configuration changes in an
automated network. It stores the ID of the northbound
transaction when the local device is configured by an enabled
NMS, and the southbound transaction ID when the local device
configures other devices.
revision 2021-11-03 {
description
"Initial revision";
reference
"RFC xxxx: Title to be completed";
}
container external-transactions-id {
config false;
description
"Contains the IDs of configuration transactions that are
external to the current device.";
list configuration-change {
key "local-commit-id";
description
"List of configuration changes, identified by their
local-commit-id";
leaf local-commit-id {
type string;
description
"Id as saved by the server. Can be used to retrieve
the corresponding changes using the server mechanism
if available.";
}
leaf northbound-transaction-id {
type ietf-netconf-txid:etag-t;
description
"External transaction ID, sent by the client, corresponding
to a change initiated by a northbound NMS. There should be
a corresponding entry on the NMS as a
southbound-transaction-id that maps to the actual
configuration commit that triggered the configuration of
this server.
6. Security Considerations
7. IANA Considerations
8. Contributors
[I-D.lindblad-netconf-transaction-id]
Lindblad, J., "Transaction ID Mechanism for NETCONF", Work
in Progress, Internet-Draft, draft-lindblad-netconf-
transaction-id-02, 8 June 2022,
<https://www.ietf.org/archive/id/draft-lindblad-netconf-
transaction-id-02.txt>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[I-D.ietf-opsawg-service-assurance-architecture]
Claise, B., Quilbeuf, J., Lopez, D., Voyer, D., and T.
Arumugam, "Service Assurance for Intent-based Networking
Architecture", Work in Progress, Internet-Draft, draft-
ietf-opsawg-service-assurance-architecture-11, 18 October
2022, <https://www.ietf.org/archive/id/draft-ietf-opsawg-
service-assurance-architecture-11.txt>.
Initial version
Acknowledgements
Authors’ Addresses
Jean Quilbeuf
Huawei
Email: jean.quilbeuf@huawei.com
Benoit Claise
Huawei
Email: benoit.claise@huawei.com
Thomas Graf
Swisscom
Binzring 17
CH-8045 Zurich
Switzerland
Email: thomas.graf@swisscom.com
Diego R. Lopez
Telefonica I+D
Don Ramon de la Cruz, 82
Madrid 28006
Spain
Email: diego.r.lopez@telefonica.com
Qiong Sun
China Telecom
Email: sunqiong@chinatelecom.cn
Abstract
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Implementation example: OpenTelemetry . . . . . . . . . . 4
1.2. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1. Provisioning root cause analysis . . . . . . . . . . 6
1.2.2. System performance profiling . . . . . . . . . . . . 6
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 7
2. NETCONF Extension . . . . . . . . . . . . . . . . . . . . . . 7
3. Security Considerations . . . . . . . . . . . . . . . . . . . 8
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.1. Normative References . . . . . . . . . . . . . . . . . . 9
6.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. TO DO List (to be deleted by RFC Editor) . . . . . . 10
Appendix B. XML Attributes vs RPCs input augmentations discussion
(to be deleted by RFC Editor) . . . . . . . . . . . . . . 10
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction
The W3C has defined two HTTP headers for context propagation that are
useful in use case scenarios of distributed systems like the ones
defined in [RFC8309]. This document defines an extension to the
NETCONF protocol to add the same concepts and enable trace context
propagation over NETCONF.
It is worth noting that the trace context is not meant to have any
relationship with the data that is carried with a given operation
(including configurations, service identifiers or state information).
------------------ -------------
| Orchestrator | | |
| | ------------> | |
.------------------. | |
. : . | |
. : . | Collector |
------------ ------------ ------------ | (Metrics, |
| | | | | | | Events, |
| Controller | | Controller | | Controller | --> | Logs, |
| | | | | | | Traces) |
------------ ------------ ------------ | |
: . . : | |
: . . : | |
: . . : | |
--------- --------- --------- --------- | |
| Network | | Network | | Network | | Network | | |
| Element | | Element | | Element | | Element | -> | |
--------- --------- --------- --------- -------------
------------------ -------------
| Orchestrator | OTLP protocol | |
| | -------------------> | |
.------------------. | |
. NETCONF | |
. edit-config (trace-id "1", parent-id "A") | Collector |
------------ | (Metrics, |
| | | Events, |
| Controller | ------------------------------------> | Logs, |
| | OTLP protocol | Traces) |
------------ | |
: . NETCONF | |
: . edit-config (trace-id "1", parent-id "B") | |
: . | |
--------- --------- | |
| Network | | Network | OTLP protocol | |
| Element | | Element | --------------------------> | |
--------- --------- -------------
1.3. Terminology
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
* xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0",
* xmlns:notif="urn:ietf:params:xml:ns:netconf:notification:1.0",
* xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-patch" and
* xmlns:ypatch="urn:ietf:params:xml:ns:yang:ietf-yang-patch".
2. NETCONF Extension
3. Security Considerations
TODO Security
4. IANA Considerations
urn:ietf:params:netconf:capability:w3ctc:1.0
This document registers one XML namespace URN in the ’IETF XML
registry’, following the format defined in [RFC3688]
(https://tools.ietf.org/html/rfc3688).
URI: urn:ietf:params:xml:ns:netconf:w3ctc:1.0
5. Acknowledgments
TBD
6. References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>.
[W3C-Trace-Context]
"W3C Recommendation on Trace Context", 23 November 2021,
<https://www.w3.org/TR/2021/REC-trace-context-
1-20211123/>.
[I-D.lindblad-netconf-transaction-id]
Lindblad, J., "Transaction ID Mechanism for NETCONF", Work
in Progress, Internet-Draft, draft-lindblad-netconf-
transaction-id-02, 8 June 2022,
<https://www.ietf.org/archive/id/draft-lindblad-netconf-
transaction-id-02.txt>.
[OpenTelemetry]
"OpenTelemetry Cloud Native Computing Foundation project",
29 August 2022, <https://opentelemetry.io>.
[W3C-Baggage]
"W3C Propagation format for distributed context Baggage",
23 November 2021,
<https://www.w3.org/TR/baggage/#examples-of-http-headers>.
There are arguments that can be raised regarding using XML Attribute
or to augment NETCONF RPCs.
* Would need updated RFP for each change at W3C, which will make
adoption of new features slower
Authors’ Addresses
Roque Gagliano
Cisco Systems
Avenue des Uttins 5
CH-1180 Rolle
Switzerland
Email: rogaglia@cisco.com
Kristian Larsson
Deutsche Telekom AG
Email: kll@dev.terastrm.net
Jan Lindblad
Cisco Systems
Email: jlindbla@cisco.com
Abstract
Requirements Language
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Extend the Datastore Selection . . . . . . . . . . . . . . . 3
3. Extend the Metadata in Streaming Update . . . . . . . . . . . 4
4. The "ietf-yang-push-metadata" Module . . . . . . . . . . . . 6
4.1. Data Model Overview . . . . . . . . . . . . . . . . . . . 6
4.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 7
5. Security Considerations . . . . . . . . . . . . . . . . . . . 10
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.1. Normative References . . . . . . . . . . . . . . . . . . 11
8.2. Informative References . . . . . . . . . . . . . . . . . 12
Authors’ Addresses . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction
Along with the subscribed content, besides the Subcription ID, the
following metadata objects are part of a "push-update" or "push-
change-update" notification.
module: Describes the YANG module name for the related streamed
content.
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2022-09-02T10:59:55.32Z</eventTime>
<push-update xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<id>101</id>
<module>ietf-interfaces</module>
<namespace>urn:ietf:params:xml:ns:yang:ietf-interfaces</namespace>
<revision>2014-05-08</revision>
<revision-label>1.0.0</revision-label>
<datastore-xpath-filter>ietf-interfaces:interfaces</datastore-xpath-filter>
<datastore-contents>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>eth0</name>
<oper-status>up</oper-status>
</interface>
</interfaces>
</datastore-contents>
</push-update>
</notification>
{
"ietf-notification:notification": {
"eventTime": "2022-09-02T10:59:55.32Z",
"ietf-yang-push:push-update": {
"id": 101,{
"module": "ietf-interfaces",{
"namespace": "urn:ietf:params:xml:ns:yang:ietf-interfaces",{
"revision": "2014-05-08",{
"revision-label": "1.0.0",{
"datastore-xpath-filter": "ietf-interfaces:interfaces",
"datastore-contents": {
"ietf-interfaces:interface": {
"name": {
"eth0": {
"oper-status": "up",
}
}
}
}
}
}
}
}
}
}
}
module: ietf-yang-push-metadata
augment /yp:push-update:
+--ro module? string
+--ro namespace? string
+--ro revision? rev:revision-date-or-label
+--ro revision-label? ysver:version
+--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?
+--ro datastore-subtree-filter? <anydata> {sn:subtree}?
augment /yp:push-change-update:
+--ro module? string
+--ro namespace? string
+--ro revision? rev:revision-date-or-label
+--ro revision-label? ysver:version
+--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?
+--ro datastore-subtree-filter? <anydata> {sn:subtree}?
augment /sn:establish-subscription/sn:input/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:modify-subscription/sn:input/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscription-started/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscription-modified/sn:target:
+-- revision? rev:revision-date-or-label
+-- revision-label? ysver:version
augment /sn:subscriptions/sn:subscription/sn:target:
+--rw revision? rev:revision-date-or-label
+--rw revision-label? ysver:version
The YANG module has six leaves augmenting the model of YANG-push
[RFC8641].
import ietf-subscribed-notifications {
prefix sn;
reference
"RFC 8639: Subscription to YANG Notifications";
}
import ietf-yang-push {
prefix yp;
reference
"RFC 8641: Subscription to YANG Notifications for Datastore Updates";
}
import ietf-yang-revisions {
prefix rev;
reference
"RFC XXXX: draft-ietf-netmod-yang-module-versioning-06, Updated YANG
Module Revision Handling";
}
import ietf-yang-semver {
prefix ysver;
reference
"RFC XXXX: draft-ietf-netmod-yang-semver-07, YANG Semantic Versioning";
}
description
"Defines YANG push event notification header with metadata.
This version of this YANG module is part of RFC XXXX; see the RFC
itself for full legal notices.";
revision 2022-09-21 {
description
"First revision";
reference
"RFC XXXX: Support of Versioning in YANG Notifications Subscription";
}
feature yang-push-metadata-supported {
description
"This feature indicates the YANG Notifications have the metadata
defined in this YANG module.";
}
grouping yang-push-module-version {
leaf revision {
type rev:revision-date-or-label;
description
"This references the YANG module revision of the sent notification.";
}
leaf revision-label {
type ysver:version;
description
"This references the YANG module semversion of the sent notification."
;
}
}
grouping yang-push-metadata {
leaf module {
type string;
description
"This references the YANG module of the sent notification.";
}
leaf namespace {
type string;
description
"This references the YANG module namespace of the sent notification.";
}
uses ypm:yang-push-module-version;
leaf datastore-xpath-filter {
type yang:xpath1.0;
if-feature "sn:xpath";
description
"This references the YANG module xpath of the sent notification.";
}
anydata datastore-subtree-filter {
if-feature "sn:subtree";
description
"This references the YANG module subtree of the sent notification.";
}
}
// Event notifications
augment "/yp:push-update" {
description
"This augmentation adds the module, the namespace, the revision, the
semversion, the xpath and the subtree in the push-update notification";
uses ypm:yang-push-metadata;
}
augment "/yp:push-change-update" {
description
"This augmentation adds the module, the namespace, the revision, the
semversion, the xpath and the subtree in the push-change-update notifica
tion";
uses ypm:yang-push-metadata;
}
// Subscription parameters
augment "/sn:establish-subscription/sn:input/sn:target" {
uses ypm:yang-push-module-version;
}
augment "/sn:modify-subscription/sn:input/sn:target" {
uses ypm:yang-push-module-version;
}
// Subscription notifications
augment "/sn:subscription-started/sn:target" {
uses ypm:yang-push-module-version;
}
augment "/sn:subscription-modified/sn:target" {
uses ypm:yang-push-module-version;
}
// Subscription container
augment "/sn:subscriptions/sn:subscription/sn:target" {
uses ypm:yang-push-module-version;
}
}
<CODE ENDS>
5. Security Considerations
6. IANA Considerations
7. Acknowledgements
The authors would like to thank xxx for their review and valuable
comments.
8. References
[I-D.ietf-netmod-yang-module-versioning]
Wilton, R., Rahman, R., Lengyel, B., Clarke, J., and J.
Sterne, "Updated YANG Module Revision Handling", Work in
Progress, Internet-Draft, draft-ietf-netmod-yang-module-
versioning-06, 10 July 2022,
<https://www.ietf.org/archive/id/draft-ietf-netmod-yang-
module-versioning-06.txt>.
[I-D.ietf-netmod-yang-semver]
Clarke, J., Wilton, R., Rahman, R., Lengyel, B., Sterne,
J., and B. Claise, "YANG Semantic Versioning", Work in
Progress, Internet-Draft, draft-ietf-netmod-yang-semver-
07, 10 July 2022, <https://www.ietf.org/archive/id/draft-
ietf-netmod-yang-semver-07.txt>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[I-D.ietf-netconf-https-notif]
Jethanandani, M. and K. Watsen, "An HTTPS-based Transport
for YANG Notifications", Work in Progress, Internet-Draft,
draft-ietf-netconf-https-notif-12, 22 August 2022,
<https://www.ietf.org/archive/id/draft-ietf-netconf-https-
notif-12.txt>.
[I-D.ietf-netconf-udp-notif]
Zheng, G., Zhou, T., Graf, T., Francois, P., Feng, A. H.,
and P. Lucente, "UDP-based Transport for Configured
Subscriptions", Work in Progress, Internet-Draft, draft-
ietf-netconf-udp-notif-08, 12 September 2022,
<https://www.ietf.org/archive/id/draft-ietf-netconf-udp-
notif-08.txt>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
[W3C.REC-xml-20081126]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008,
<https://www.w3.org/TR/2008/REC-xml-20081126>.
Authors’ Addresses
Thomas Graf
Swisscom
Binzring 17
CH-8045 Zurich
Switzerland
Email: thomas.graf@swisscom.com
Benoit Claise
Huawei
Email: benoit.claise@huawei.com