| < draft-ietf-netconf-yang-push-21.txt | draft-ietf-netconf-yang-push-22.txt > | |||
|---|---|---|---|---|
| NETCONF A. Clemm | NETCONF A. Clemm | |||
| Internet-Draft Huawei USA | Internet-Draft Huawei USA | |||
| Intended status: Standards Track E. Voit | Intended status: Standards Track E. Voit | |||
| Expires: August 2, 2019 Cisco Systems | Expires: August 8, 2019 Cisco Systems | |||
| A. Gonzalez Prieto | A. Gonzalez Prieto | |||
| Microsoft | Microsoft | |||
| A. Tripathy | A. Tripathy | |||
| E. Nilsen-Nygaard | E. Nilsen-Nygaard | |||
| Cisco Systems | Cisco Systems | |||
| A. Bierman | A. Bierman | |||
| YumaWorks | YumaWorks | |||
| B. Lengyel | B. Lengyel | |||
| Ericsson | Ericsson | |||
| January 29, 2019 | February 4, 2019 | |||
| Subscription to YANG Datastores | Subscription to YANG Datastores | |||
| draft-ietf-netconf-yang-push-21 | draft-ietf-netconf-yang-push-22 | |||
| Abstract | Abstract | |||
| Via the mechanism described in this document, subscriber applications | Via the mechanism described in this document, subscriber applications | |||
| may request a continuous, customized stream of updates from a YANG | may request a continuous, customized stream of updates from a YANG | |||
| datastore. Providing such visibility into updates enables new | datastore. Providing such visibility into updates enables new | |||
| capabilities based on the remote mirroring and monitoring of | capabilities based on the remote mirroring and monitoring of | |||
| configuration and operational state. | configuration and operational state. | |||
| Status of This Memo | Status of This Memo | |||
| skipping to change at page 1, line 44 ¶ | skipping to change at page 1, line 44 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on August 2, 2019. | This Internet-Draft will expire on August 8, 2019. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 51 ¶ | skipping to change at page 2, line 51 ¶ | |||
| 3.5. Data Encodings . . . . . . . . . . . . . . . . . . . . . 9 | 3.5. Data Encodings . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 3.6. Defining the Selection with a Datastore . . . . . . . . . 10 | 3.6. Defining the Selection with a Datastore . . . . . . . . . 10 | |||
| 3.7. Streaming Updates . . . . . . . . . . . . . . . . . . . . 11 | 3.7. Streaming Updates . . . . . . . . . . . . . . . . . . . . 11 | |||
| 3.8. Subscription Management . . . . . . . . . . . . . . . . . 13 | 3.8. Subscription Management . . . . . . . . . . . . . . . . . 13 | |||
| 3.9. Receiver Authorization . . . . . . . . . . . . . . . . . 15 | 3.9. Receiver Authorization . . . . . . . . . . . . . . . . . 15 | |||
| 3.10. On-Change Notifiable Datastore Nodes . . . . . . . . . . 16 | 3.10. On-Change Notifiable Datastore Nodes . . . . . . . . . . 16 | |||
| 3.11. Other Considerations . . . . . . . . . . . . . . . . . . 17 | 3.11. Other Considerations . . . . . . . . . . . . . . . . . . 17 | |||
| 4. A YANG Data Model for Management of Datastore Push | 4. A YANG Data Model for Management of Datastore Push | |||
| Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . 18 | Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 18 | 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 4.2. Subscription Configuration . . . . . . . . . . . . . . . 23 | 4.2. Subscription Configuration . . . . . . . . . . . . . . . 24 | |||
| 4.3. YANG Notifications . . . . . . . . . . . . . . . . . . . 24 | 4.3. YANG Notifications . . . . . . . . . . . . . . . . . . . 25 | |||
| 4.4. YANG RPCs . . . . . . . . . . . . . . . . . . . . . . . . 25 | 4.4. YANG RPCs . . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 5. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 30 | 5. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 31 | |||
| 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48 | |||
| 7. Security Considerations . . . . . . . . . . . . . . . . . . . 46 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 48 | |||
| 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 48 | 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 49 | |||
| 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 48 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 50 | |||
| 9.1. Normative References . . . . . . . . . . . . . . . . . . 48 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 50 | |||
| 9.2. Informative References . . . . . . . . . . . . . . . . . 49 | 9.2. Informative References . . . . . . . . . . . . . . . . . 51 | |||
| Appendix A. Appendix A: Subscription Errors . . . . . . . . . . 50 | Appendix A. Appendix A: Subscription Errors . . . . . . . . . . 51 | |||
| A.1. RPC Failures . . . . . . . . . . . . . . . . . . . . . . 50 | A.1. RPC Failures . . . . . . . . . . . . . . . . . . . . . . 52 | |||
| A.2. Notifications of Failure . . . . . . . . . . . . . . . . 51 | A.2. Notifications of Failure . . . . . . . . . . . . . . . . 53 | |||
| Appendix B. Changes Between Revisions . . . . . . . . . . . . . 51 | Appendix B. Changes Between Revisions . . . . . . . . . . . . . 53 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 55 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 57 | |||
| 1. Introduction | 1. Introduction | |||
| Traditional approaches to providing visibility into managed entities | Traditional approaches to providing visibility into managed entities | |||
| from remote have been built on polling. With polling, data is | from remote have been built on polling. With polling, data is | |||
| periodically requested and retrieved by a client from a server to | periodically requested and retrieved by a client from a server to | |||
| stay up-to-date. However, there are issues associated with polling- | stay up-to-date. However, there are issues associated with polling- | |||
| based management: | based management: | |||
| o Polling incurs significant latency. This latency prohibits many | o Polling incurs significant latency. This latency prohibits many | |||
| skipping to change at page 4, line 13 ¶ | skipping to change at page 4, line 13 ¶ | |||
| of "Custom Subscription to Event Streams" | of "Custom Subscription to Event Streams" | |||
| [I-D.draft-ietf-netconf-subscribed-notifications]. Supplementing | [I-D.draft-ietf-netconf-subscribed-notifications]. Supplementing | |||
| that work are YANG data model augmentations, extended RPCs, and new | that work are YANG data model augmentations, extended RPCs, and new | |||
| datastore specific update notifications. Transport options for | datastore specific update notifications. Transport options for | |||
| [I-D.draft-ietf-netconf-subscribed-notifications] will work | [I-D.draft-ietf-netconf-subscribed-notifications] will work | |||
| seamlessly with this solution. | seamlessly with this solution. | |||
| 2. Definitions and Acronyms | 2. Definitions and Acronyms | |||
| 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 terminology defined in [RFC7950], [RFC8341], | This document uses the terminology defined in [RFC7950], [RFC8341], | |||
| [RFC8342], and [I-D.draft-ietf-netconf-subscribed-notifications]. In | [RFC8342], and [I-D.draft-ietf-netconf-subscribed-notifications]. In | |||
| addition, the following terms are introduced: | addition, the following terms are introduced: | |||
| o Datastore node: A node in the instantiated YANG data tree | o Datastore node: A node in the instantiated YANG data tree | |||
| associated with a datastore. In this document, datastore nodes | associated with a datastore. In this document, datastore nodes | |||
| are often also simply referred to as "objects" | are often also simply referred to as "objects" | |||
| o Datastore node update: A data item containing the current value of | o Datastore node update: A data item containing the current value of | |||
| a datastore node at the time the datastore node update was | a datastore node at the time the datastore node update was | |||
| skipping to change at page 13, line 5 ¶ | skipping to change at page 13, line 5 ¶ | |||
| </interfaces> | </interfaces> | |||
| </datastore-contents> | </datastore-contents> | |||
| </push-update> | </push-update> | |||
| </notification> | </notification> | |||
| Figure 1: Push example | Figure 1: Push example | |||
| The following is an example of an on-change notification message for | The following is an example of an on-change notification message for | |||
| the same subscription. | the same subscription. | |||
| <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> | <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> | |||
| <eventTime>2017-10-25T08:22:33.44Z</eventTime> | <eventTime>2017-10-25T08:22:33.44Z</eventTime> | |||
| <push-change-update xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | <push-change-update | |||
| <id>89</id> | xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | |||
| <datastore-changes> | <id>89</id> | |||
| <yang-patch> | <datastore-changes> | |||
| <patch-id>0</patch-id> | <yang-patch> | |||
| <edit> | <patch-id>0</patch-id> | |||
| <edit-id>edit1</edit-id> | <edit> | |||
| <operation>replace</operation> | <edit-id>edit1</edit-id> | |||
| <target>/ietf-interfaces:interfaces</target> | <operation>replace</operation> | |||
| <value> | <target>/ietf-interfaces:interfaces</target> | |||
| <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> | <value> | |||
| <interface> | <interfaces | |||
| <name>eth0</name> | xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> | |||
| <oper-status>down</oper-status> | <interface> | |||
| </interface> | <name>eth0</name> | |||
| </interfaces> | <oper-status>down</oper-status> | |||
| </value> | </interface> | |||
| </edit> | </interfaces> | |||
| </yang-patch> | </value> | |||
| </datastore-changes> | </edit> | |||
| </push-change-update> | </yang-patch> | |||
| </notification> | </datastore-changes> | |||
| </push-change-update> | ||||
| </notification> | ||||
| Figure 2: Push example for on change | Figure 2: Push example for on change | |||
| Of note in the above example is the 'patch-id' with a value of '0'. | Of note in the above example is the 'patch-id' with a value of '0'. | |||
| Per [RFC8072], the 'patch-id' is an arbitrary string. With YANG | Per [RFC8072], the 'patch-id' is an arbitrary string. With YANG | |||
| Push, the publisher SHOULD put into the 'patch-id' a counter starting | Push, the publisher SHOULD put into the 'patch-id' a counter starting | |||
| at '0' which increments with every 'push-change-update' generated for | at '0' which increments with every 'push-change-update' generated for | |||
| a subscription. If used as a counter, this counter MUST be reset to | a subscription. If used as a counter, this counter MUST be reset to | |||
| '0' anytime a resynchronization occurs (i.e., with the sending of a | '0' anytime a resynchronization occurs (i.e., with the sending of a | |||
| 'push-update'). Also if used as a counter, the counter MUST be reset | 'push-update'). Also if used as a counter, the counter MUST be reset | |||
| skipping to change at page 14, line 30 ¶ | skipping to change at page 14, line 32 ¶ | |||
| "establish-subscription-stream-error-info" that is inserted in case | "establish-subscription-stream-error-info" that is inserted in case | |||
| of a stream subscription. | of a stream subscription. | |||
| Below is a tree diagram for "establish-subscription-datastore-error- | Below is a tree diagram for "establish-subscription-datastore-error- | |||
| info". All tree diagrams used in this document follow the notation | info". All tree diagrams used in this document follow the notation | |||
| defined in [RFC8340] | defined in [RFC8340] | |||
| yang-data establish-subscription-datastore-error-info | yang-data establish-subscription-datastore-error-info | |||
| +--ro establish-subscription-datastore-error-info | +--ro establish-subscription-datastore-error-info | |||
| +--ro reason? identityref | +--ro reason? identityref | |||
| +--ro period-hint? yang:timeticks | +--ro period-hint? centiseconds | |||
| +--ro filter-failure-hint? string | +--ro filter-failure-hint? string | |||
| +--ro object-count-estimate? uint32 | +--ro object-count-estimate? uint32 | |||
| +--ro object-count-limit? uint32 | +--ro object-count-limit? uint32 | |||
| +--ro kilobytes-estimate? uint32 | +--ro kilobytes-estimate? uint32 | |||
| +--ro kilobytes-limit? uint32 | +--ro kilobytes-limit? uint32 | |||
| Figure 3: Tree diagram for establish-subscription-datastore-error- | Figure 3: Tree diagram for establish-subscription-datastore-error- | |||
| info | info | |||
| Similarly, in the case of a rejected request for modification of a | Similarly, in the case of a rejected request for modification of a | |||
| skipping to change at page 15, line 8 ¶ | skipping to change at page 15, line 8 ¶ | |||
| info" container inserted into the RPC error response, in lieu of the | info" container inserted into the RPC error response, in lieu of the | |||
| "modify-subscription-stream-error-info" that is inserted in case of a | "modify-subscription-stream-error-info" that is inserted in case of a | |||
| stream subscription. | stream subscription. | |||
| Below is a tree diagram for "modify-subscription-datastore-error- | Below is a tree diagram for "modify-subscription-datastore-error- | |||
| info". | info". | |||
| yang-data modify-subscription-datastore-error-info | yang-data modify-subscription-datastore-error-info | |||
| +--ro modify-subscription-datasore-error-info | +--ro modify-subscription-datasore-error-info | |||
| +--ro reason? identityref | +--ro reason? identityref | |||
| +--ro period-hint? yang:timeticks | +--ro period-hint? centiseconds | |||
| +--ro filter-failure-hint? string | +--ro filter-failure-hint? string | |||
| +--ro object-count-estimate? uint32 | +--ro object-count-estimate? uint32 | |||
| +--ro object-count-limit? uint32 | +--ro object-count-limit? uint32 | |||
| +--ro kilobytes-estimate? uint32 | +--ro kilobytes-estimate? uint32 | |||
| +--ro kilobytes-limit? uint32 | +--ro kilobytes-limit? uint32 | |||
| Figure 4: Tree diagram for modify-subscription-datastore-error-info | Figure 4: Tree diagram for modify-subscription-datastore-error-info | |||
| 3.9. Receiver Authorization | 3.9. Receiver Authorization | |||
| skipping to change at page 18, line 23 ¶ | skipping to change at page 18, line 23 ¶ | |||
| changes (one second periods will consume more resources than one hour | changes (one second periods will consume more resources than one hour | |||
| periods), the amount of data in the datastore subtree that is being | periods), the amount of data in the datastore subtree that is being | |||
| subscribed to, and the number and combination of other subscriptions | subscribed to, and the number and combination of other subscriptions | |||
| that are concurrently being serviced. | that are concurrently being serviced. | |||
| 4. A YANG Data Model for Management of Datastore Push Subscriptions | 4. A YANG Data Model for Management of Datastore Push Subscriptions | |||
| 4.1. Overview | 4.1. Overview | |||
| The YANG data model for datastore push subscriptions is depicted in | The YANG data model for datastore push subscriptions is depicted in | |||
| the following figure. The tree diagram follows the notation defined | the following figures. The tree diagram that is used follows the | |||
| in [RFC8340]. New schema objects defined here (i.e., beyond those | notation defined in [RFC8340]. New schema objects defined here | |||
| from [I-D.draft-ietf-netconf-subscribed-notifications]) are | (i.e., beyond those from | |||
| identified with "yp". For the reader's convenience, in order to | [I-D.draft-ietf-netconf-subscribed-notifications]) are identified | |||
| compact the tree representation, some nodes that are defined in ietf- | with "yp". For the reader's convenience, in order to compact the | |||
| subscribed-notifications and that are not essential to the | tree representation, some nodes that are defined in ietf-subscribed- | |||
| understanding of the data model defined here have been removed. This | notifications and that are not essential to the understanding of the | |||
| is indicated by "..." in the diagram where applicable. | data model defined here have been removed. This is indicated by | |||
| "..." in the diagram where applicable. | ||||
| Because the tree diagram is quite large, its depiction is broken up | ||||
| into several figures. The first figure depicts the augmentations | ||||
| that are introduced in module ietf-yang-push to subscription | ||||
| configuration specified in module ietf-subscribed-notifications. | ||||
| module: ietf-subscribed-notifications | module: ietf-subscribed-notifications | |||
| ... | ... | |||
| +--rw filters | +--rw filters | |||
| | ... | | ... | |||
| | +--rw yp:selection-filter* [filter-id] | | +--rw yp:selection-filter* [filter-id] | |||
| | +--rw yp:filter-id string | | +--rw yp:filter-id string | |||
| | +--rw (yp:filter-spec)? | | +--rw (yp:filter-spec)? | |||
| | +--:(yp:datastore-subtree-filter) | | +--:(yp:datastore-subtree-filter) | |||
| | | +--rw yp:datastore-subtree-filter? <anydata> | | | +--rw yp:datastore-subtree-filter? <anydata> | |||
| skipping to change at page 19, line 20 ¶ | skipping to change at page 19, line 42 ¶ | |||
| | +--:(yp:datastore-subtree-filter) | | +--:(yp:datastore-subtree-filter) | |||
| | | +--rw yp:datastore-subtree-filter? | | | +--rw yp:datastore-subtree-filter? | |||
| | | <anydata> {sn:subtree}? | | | <anydata> {sn:subtree}? | |||
| | +--:(yp:datastore-xpath-filter) | | +--:(yp:datastore-xpath-filter) | |||
| | +--rw yp:datastore-xpath-filter? | | +--rw yp:datastore-xpath-filter? | |||
| | yang:xpath1.0 {sn:xpath}? | | yang:xpath1.0 {sn:xpath}? | |||
| | ... | | ... | |||
| +--rw (yp:update-trigger) | +--rw (yp:update-trigger) | |||
| +--:(yp:periodic) | +--:(yp:periodic) | |||
| | +--rw yp:periodic! | | +--rw yp:periodic! | |||
| | +--rw yp:period yang:timeticks | | +--rw yp:period centiseconds | |||
| | +--rw yp:anchor-time? yang:date-and-time | | +--rw yp:anchor-time? yang:date-and-time | |||
| +--:(yp:on-change) {on-change}? | +--:(yp:on-change) {on-change}? | |||
| +--rw yp:on-change! | +--rw yp:on-change! | |||
| +--rw yp:dampening-period? yang:timeticks | +--rw yp:dampening-period? centiseconds | |||
| +--rw yp:sync-on-start? boolean | +--rw yp:sync-on-start? boolean | |||
| +--rw yp:excluded-change* change-type | +--rw yp:excluded-change* change-type | |||
| Figure 6: Model structure: subscription configuration | ||||
| The next figure depicts the augmentations of module ietf-yang-push | ||||
| made to RPCs specified in module ietf-subscribed-notifications. | ||||
| Specifically, these augmentations concern the establish-subscription | ||||
| and modify-subscription RPCs, which are augmented with parameters | ||||
| that are needed to specify datastore push subscriptions. | ||||
| rpcs: | rpcs: | |||
| +---x establish-subscription | +---x establish-subscription | |||
| | +---w input | | +---w input | |||
| | | ... | | | ... | |||
| | | +---w (target) | | | +---w (target) | |||
| | | | +--:(stream) | | | | +--:(stream) | |||
| | | | | ... | | | | | ... | |||
| | | | +--:(yp:datastore) | | | | +--:(yp:datastore) | |||
| | | | +---w yp:datastore identityref | | | | +---w yp:datastore identityref | |||
| | | | +---w (yp:selection-filter)? | | | | +---w (yp:selection-filter)? | |||
| skipping to change at page 20, line 5 ¶ | skipping to change at page 20, line 36 ¶ | |||
| | | | +--:(yp:datastore-subtree-filter) | | | | +--:(yp:datastore-subtree-filter) | |||
| | | | | +---w yp:datastore-subtree-filter? | | | | | +---w yp:datastore-subtree-filter? | |||
| | | | | <anydata> {sn:subtree}? | | | | | <anydata> {sn:subtree}? | |||
| | | | +--:(yp:datastore-xpath-filter) | | | | +--:(yp:datastore-xpath-filter) | |||
| | | | +---w yp:datastore-xpath-filter? | | | | +---w yp:datastore-xpath-filter? | |||
| | | | yang:xpath1.0 {sn:xpath}? | | | | yang:xpath1.0 {sn:xpath}? | |||
| | | | ... | | | | ... | |||
| | | +---w (yp:update-trigger) | | | +---w (yp:update-trigger) | |||
| | | +--:(yp:periodic) | | | +--:(yp:periodic) | |||
| | | | +---w yp:periodic! | | | | +---w yp:periodic! | |||
| | | | +---w yp:period yang:timeticks | | | | +---w yp:period centiseconds | |||
| | | | +---w yp:anchor-time? yang:date-and-time | | | | +---w yp:anchor-time? yang:date-and-time | |||
| | | +--:(yp:on-change) {on-change}? | | | +--:(yp:on-change) {on-change}? | |||
| | | +---w yp:on-change! | | | +---w yp:on-change! | |||
| | | +---w yp:dampening-period? yang:timeticks | | | +---w yp:dampening-period? centiseconds | |||
| | | +---w yp:sync-on-start? boolean | | | +---w yp:sync-on-start? boolean | |||
| | | +---w yp:excluded-change* change-type | | | +---w yp:excluded-change* change-type | |||
| | +--ro output | | +--ro output | |||
| | +--ro id subscription-id | | +--ro id subscription-id | |||
| | +--ro replay-start-time-revision? yang:date-and-time | | +--ro replay-start-time-revision? yang:date-and-time | |||
| | {replay}? | | {replay}? | |||
| +---x modify-subscription | +---x modify-subscription | |||
| | +---w input | | +---w input | |||
| | ... | | ... | |||
| | +---w (target) | | +---w (target) | |||
| skipping to change at page 20, line 21 ¶ | skipping to change at page 21, line 4 ¶ | |||
| | | +---w yp:excluded-change* change-type | | | +---w yp:excluded-change* change-type | |||
| | +--ro output | | +--ro output | |||
| | +--ro id subscription-id | | +--ro id subscription-id | |||
| | +--ro replay-start-time-revision? yang:date-and-time | | +--ro replay-start-time-revision? yang:date-and-time | |||
| | {replay}? | | {replay}? | |||
| +---x modify-subscription | +---x modify-subscription | |||
| | +---w input | | +---w input | |||
| | ... | | ... | |||
| | +---w (target) | | +---w (target) | |||
| | | ... | | | ... | |||
| | | +--:(yp:datastore) | | | +--:(yp:datastore) | |||
| | | +---w yp:datastore identityref | | | +---w yp:datastore identityref | |||
| | | +---w (yp:selection-filter)? | | | +---w (yp:selection-filter)? | |||
| | | +--:(yp:by-reference) | | | +--:(yp:by-reference) | |||
| | | | +---w yp:selection-filter-ref | | | | +---w yp:selection-filter-ref | |||
| | | | selection-filter-ref | | | | selection-filter-ref | |||
| | | +--:(yp:within-subscription) | | | +--:(yp:within-subscription) | |||
| | | +---w (yp:filter-spec)? | | | +---w (yp:filter-spec)? | |||
| | | +--:(yp:datastore-subtree-filter) | | | +--:(yp:datastore-subtree-filter) | |||
| | | | +---w yp:datastore-subtree-filter? | | | | +---w yp:datastore-subtree-filter? | |||
| | | | <anydata> {sn:subtree}? | | | | <anydata> {sn:subtree}? | |||
| | | +--:(yp:datastore-xpath-filter) | | | +--:(yp:datastore-xpath-filter) | |||
| | | +---w yp:datastore-xpath-filter? | | | +---w yp:datastore-xpath-filter? | |||
| | | yang:xpath1.0 {sn:xpath}? | | | yang:xpath1.0 {sn:xpath}? | |||
| | | ... | | | ... | |||
| | +---w (yp:update-trigger) | | +---w (yp:update-trigger) | |||
| | +--:(yp:periodic) | | +--:(yp:periodic) | |||
| | | +---w yp:periodic! | | | +---w yp:periodic! | |||
| | | +---w yp:period yang:timeticks | | | +---w yp:period centiseconds | |||
| | | +---w yp:anchor-time? yang:date-and-time | | | +---w yp:anchor-time? yang:date-and-time | |||
| | +--:(yp:on-change) {on-change}? | | +--:(yp:on-change) {on-change}? | |||
| | +---w yp:on-change! | | +---w yp:on-change! | |||
| | +---w yp:dampening-period? yang:timeticks | | +---w yp:dampening-period? centiseconds | |||
| +---x delete-subscription | +---x delete-subscription | |||
| | ... | | ... | |||
| +---x kill-subscription | +---x kill-subscription | |||
| ... | ... | |||
| yang-data (for placement into rpc error responses) | yang-data (for placement into rpc error responses) | |||
| ... | ... | |||
| Figure 7: Model structure: RPCs | ||||
| The next figure depicts augmentations of module ietf-yang-push to the | ||||
| notifications that are specified in module ietf-subscribed- | ||||
| notifications. The augmentations allow to include subscription | ||||
| configuration parameters that are specific to datastore push | ||||
| subscriptions as part of subscription-started and subscription- | ||||
| modified notifications. | ||||
| notifications: | notifications: | |||
| +---n replay-completed {replay}? | +---n replay-completed {replay}? | |||
| | ... | | ... | |||
| +---n subscription-completed | +---n subscription-completed | |||
| | ... | | ... | |||
| +---n subscription-started {configured}? | +---n subscription-started {configured}? | |||
| | | ... | | | ... | |||
| | +--ro (target) | | +--ro (target) | |||
| | | ... | | | ... | |||
| | | +--:(yp:datastore) | | | +--:(yp:datastore) | |||
| skipping to change at page 21, line 32 ¶ | skipping to change at page 22, line 23 ¶ | |||
| | | +--:(yp:datastore-subtree-filter) | | | +--:(yp:datastore-subtree-filter) | |||
| | | | +--ro yp:datastore-subtree-filter? | | | | +--ro yp:datastore-subtree-filter? | |||
| | | | <anydata> {sn:subtree}? | | | | <anydata> {sn:subtree}? | |||
| | | +--:(yp:datastore-xpath-filter) | | | +--:(yp:datastore-xpath-filter) | |||
| | | +--ro yp:datastore-xpath-filter? | | | +--ro yp:datastore-xpath-filter? | |||
| | | yang:xpath1.0 {sn:xpath}? | | | yang:xpath1.0 {sn:xpath}? | |||
| | ... | | ... | |||
| | +--ro (yp:update-trigger) | | +--ro (yp:update-trigger) | |||
| | +--:(yp:periodic) | | +--:(yp:periodic) | |||
| | | +--ro yp:periodic! | | | +--ro yp:periodic! | |||
| | | +--ro yp:period yang:timeticks | | | +--ro yp:period centiseconds | |||
| | | +--ro yp:anchor-time? yang:date-and-time | | | +--ro yp:anchor-time? yang:date-and-time | |||
| | +--:(yp:on-change) {on-change}? | | +--:(yp:on-change) {on-change}? | |||
| | +--ro yp:on-change! | | +--ro yp:on-change! | |||
| | +--ro yp:dampening-period? yang:timeticks | | +--ro yp:dampening-period? centiseconds | |||
| | +--ro yp:sync-on-start? boolean | | +--ro yp:sync-on-start? boolean | |||
| | +--ro yp:excluded-change* change-type | | +--ro yp:excluded-change* change-type | |||
| +---n subscription-resumed | +---n subscription-resumed | |||
| | ... | | ... | |||
| +---n subscription-modified | +---n subscription-modified | |||
| | ... | | ... | |||
| | +--ro (target) | | +--ro (target) | |||
| | | | ... | | | | ... | |||
| | | +--:(yp:datastore) | | | +--:(yp:datastore) | |||
| | | +--ro yp:datastore identityref | | | +--ro yp:datastore identityref | |||
| skipping to change at page 22, line 14 ¶ | skipping to change at page 23, line 6 ¶ | |||
| | | +--:(yp:datastore-subtree-filter) | | | +--:(yp:datastore-subtree-filter) | |||
| | | | +--ro yp:datastore-subtree-filter? | | | | +--ro yp:datastore-subtree-filter? | |||
| | | | <anydata> {sn:subtree}? | | | | <anydata> {sn:subtree}? | |||
| | | +--:(yp:datastore-xpath-filter) | | | +--:(yp:datastore-xpath-filter) | |||
| | | +--ro yp:datastore-xpath-filter? | | | +--ro yp:datastore-xpath-filter? | |||
| | | yang:xpath1.0 {sn:xpath}? | | | yang:xpath1.0 {sn:xpath}? | |||
| | ... | | ... | |||
| | +--ro (yp:update-trigger)? | | +--ro (yp:update-trigger)? | |||
| | +--:(yp:periodic) | | +--:(yp:periodic) | |||
| | | +--ro yp:periodic! | | | +--ro yp:periodic! | |||
| | | +--ro yp:period yang:timeticks | | | +--ro yp:period centiseconds | |||
| | | +--ro yp:anchor-time? yang:date-and-time | | | +--ro yp:anchor-time? yang:date-and-time | |||
| | +--:(yp:on-change) {on-change}? | | +--:(yp:on-change) {on-change}? | |||
| | +--ro yp:on-change! | | +--ro yp:on-change! | |||
| | +--ro yp:dampening-period? yang:timeticks | | +--ro yp:dampening-period? centiseconds | |||
| | +--ro yp:sync-on-start? boolean | | +--ro yp:sync-on-start? boolean | |||
| | +--ro yp:excluded-change* change-type | | +--ro yp:excluded-change* change-type | |||
| +---n subscription-terminated | +---n subscription-terminated | |||
| | ... | | ... | |||
| +---n subscription-suspended | +---n subscription-suspended | |||
| ... | ... | |||
| Figure 8: Model structure: Notifications | ||||
| The final figure in this section depicts the parts of module ietf- | ||||
| yang-push that are not simply augmentations to another module, but | ||||
| that are newly introduced. | ||||
| module: ietf-yang-push | module: ietf-yang-push | |||
| rpcs: | rpcs: | |||
| +---x resync-subscription {on-change}? | +---x resync-subscription {on-change}? | |||
| +---w input | +---w input | |||
| +---w id sn:subscription-id | +---w id sn:subscription-id | |||
| yang-data: (for placement into rpc error responses) | yang-data: (for placement into rpc error responses) | |||
| +-- resync-subscription-error | +-- resync-subscription-error | |||
| | +--ro reason? identityref | | +--ro reason? identityref | |||
| | +--ro period-hint? timeticks | | +--ro period-hint? centiseconds | |||
| | +--ro filter-failure-hint? string | | +--ro filter-failure-hint? string | |||
| | +--ro object-count-estimate? uint32 | | +--ro object-count-estimate? uint32 | |||
| | +--ro object-count-limit? uint32 | | +--ro object-count-limit? uint32 | |||
| | +--ro kilobytes-estimate? uint32 | | +--ro kilobytes-estimate? uint32 | |||
| | +--ro kilobytes-limit? uint32 | | +--ro kilobytes-limit? uint32 | |||
| +-- establish-subscription-error-datastore | +-- establish-subscription-error-datastore | |||
| | +--ro reason? identityref | | +--ro reason? identityref | |||
| | +--ro period-hint? timeticks | | +--ro period-hint? centiseconds | |||
| | +--ro filter-failure-hint? string | | +--ro filter-failure-hint? string | |||
| | +--ro object-count-estimate? uint32 | | +--ro object-count-estimate? uint32 | |||
| | +--ro object-count-limit? uint32 | | +--ro object-count-limit? uint32 | |||
| | +--ro kilobytes-estimate? uint32 | | +--ro kilobytes-estimate? uint32 | |||
| | +--ro kilobytes-limit? uint32 | | +--ro kilobytes-limit? uint32 | |||
| +-- modify-subscription-error-datastore | +-- modify-subscription-error-datastore | |||
| +--ro reason? identityref | +--ro reason? identityref | |||
| +--ro period-hint? timeticks | +--ro period-hint? centiseconds | |||
| +--ro filter-failure-hint? string | +--ro filter-failure-hint? string | |||
| +--ro object-count-estimate? uint32 | +--ro object-count-estimate? uint32 | |||
| +--ro object-count-limit? uint32 | +--ro object-count-limit? uint32 | |||
| +--ro kilobytes-estimate? uint32 | +--ro kilobytes-estimate? uint32 | |||
| +--ro kilobytes-limit? uint32 | +--ro kilobytes-limit? uint32 | |||
| notifications: | notifications: | |||
| +---n push-update | +---n push-update | |||
| | +--ro id? sn:subscription-id | | +--ro id? sn:subscription-id | |||
| | +--ro datastore-contents? <anydata> | | +--ro datastore-contents? <anydata> | |||
| | +--ro incomplete-update? empty | | +--ro incomplete-update? empty | |||
| +---n push-change-update {on-change}? | +---n push-change-update {on-change}? | |||
| +--ro id? sn:subscription-id | +--ro id? sn:subscription-id | |||
| +--ro datastore-changes? | +--ro datastore-changes | |||
| | +--ro yang-patch | | +--ro yang-patch | |||
| | +--ro patch-id string | | +--ro patch-id string | |||
| | +--ro ypatch:comment? string | | +--ro comment? string | |||
| | +--ro ypatch:edit* [edit-id] | | +--ro edit* [edit-id] | |||
| | +--ro ypatch:edit-id string | | +--ro edit-id string | |||
| | +--ro ypatch:operation enumeration | | +--ro operation enumeration | |||
| | +--ro ypatch:target target-resource-offset | | +--ro target target-resource-offset | |||
| | +--ro ypatch:point? target-resource-offset | | +--ro point? target-resource-offset | |||
| | +--ro ypatch:where? enumeration | | +--ro where? enumeration | |||
| | +--ro ypatch:value? | | +--ro value? <anydata> | |||
| +--ro incomplete-update? empty | +--ro incomplete-update? empty | |||
| Figure 6: Model structure | Figure 9: Model structure (non-augmentation portions | |||
| Selected components of the model are summarized below. | Selected components of the model are summarized below. | |||
| 4.2. Subscription Configuration | 4.2. Subscription Configuration | |||
| Both configured and dynamic subscriptions are represented within the | Both configured and dynamic subscriptions are represented within the | |||
| list "subscription". New parameters extending the basic subscription | list "subscription". New parameters extending the basic subscription | |||
| data model in [I-D.draft-ietf-netconf-subscribed-notifications] | data model in [I-D.draft-ietf-netconf-subscribed-notifications] | |||
| include: | include: | |||
| skipping to change at page 26, line 5 ¶ | skipping to change at page 27, line 5 ¶ | |||
| YANG-Push subscriptions are established, modified, and deleted using | YANG-Push subscriptions are established, modified, and deleted using | |||
| RPCs augmented from | RPCs augmented from | |||
| [I-D.draft-ietf-netconf-subscribed-notifications]. | [I-D.draft-ietf-netconf-subscribed-notifications]. | |||
| 4.4.1. Establish-subscription RPC | 4.4.1. Establish-subscription RPC | |||
| The subscriber sends an establish-subscription RPC with the | The subscriber sends an establish-subscription RPC with the | |||
| parameters in section 3.1. An example might look like: | parameters in section 3.1. An example might look like: | |||
| <netconf:rpc message-id="101" | <netconf:rpc message-id="101" | |||
| xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> | xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> | |||
| <establish-subscription | <establish-subscription | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | |||
| xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | |||
| <yp:datastore xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | <yp:datastore | |||
| ds:operational | xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | |||
| </yp:datastore> | ds:operational | |||
| <yp:datastore-xpath-filter | </yp:datastore> | |||
| xmlns:ex="http://example.com/sample-data/1.0"> | <yp:datastore-xpath-filter | |||
| /ex:foo | xmlns:ex="http://example.com/sample-data/1.0"> | |||
| </yp:datastore-xpath-filter> | /ex:foo | |||
| <yp:periodic> | </yp:datastore-xpath-filter> | |||
| <yp:period>500</yp:period> | <yp:periodic> | |||
| </yp:periodic> | <yp:period>500</yp:period> | |||
| </establish-subscription> | </yp:periodic> | |||
| </netconf:rpc> | </establish-subscription> | |||
| </netconf:rpc> | ||||
| Figure 7: Establish-subscription RPC | Figure 10: Establish-subscription RPC | |||
| A positive response includes the "id" of the accepted subscription. | A positive response includes the "id" of the accepted subscription. | |||
| In that case a publisher may respond: | In that case a publisher may respond: | |||
| <rpc-reply message-id="101" | <rpc-reply message-id="101" | |||
| xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | |||
| <id | <id | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"> | xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"> | |||
| 52 | 52 | |||
| </id> | </id> | |||
| </rpc-reply> | </rpc-reply> | |||
| Figure 8: Establish-subscription positive RPC response | Figure 11: Establish-subscription positive RPC response | |||
| A subscription can be rejected for multiple reasons, including the | A subscription can be rejected for multiple reasons, including the | |||
| lack of authorization to establish a subscription, no capacity to | lack of authorization to establish a subscription, no capacity to | |||
| serve the subscription at the publisher, or the inability of the | serve the subscription at the publisher, or the inability of the | |||
| publisher to select datastore content at the requested cadence. | publisher to select datastore content at the requested cadence. | |||
| If a request is rejected because the publisher is not able to serve | If a request is rejected because the publisher is not able to serve | |||
| it, the publisher SHOULD include in the returned error hints which | it, the publisher SHOULD include in the returned error hints which | |||
| help a subscriber understand subscription parameters might have been | help a subscriber understand subscription parameters might have been | |||
| accepted for the request. These hints would be included within the | accepted for the request. These hints would be included within the | |||
| yang-data structure "establish-subscription-error-datastore". | yang-data structure "establish-subscription-error-datastore". | |||
| However even with these hints, there are no guarantee that subsequent | However even with these hints, there are no guarantee that subsequent | |||
| requests will in fact be accepted. | requests will in fact be accepted. | |||
| The specific parameters to be returned as part of the RPC error | The specific parameters to be returned as part of the RPC error | |||
| response depend on the specific transport that is used to manage the | response depend on the specific transport that is used to manage the | |||
| subscription. For NETCONF, those parameters are defined in | subscription. For NETCONF, those parameters are defined in | |||
| [I-D.draft-ietf-netconf-netconf-event-notifications]. For example, | [I-D.draft-ietf-netconf-netconf-event-notifications]. For example, | |||
| for the following NETCONF request: | for the following NETCONF request: | |||
| <netconf:rpc message-id="101" | <rpc message-id="101" | |||
| xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> | xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | |||
| <establish-subscription | <establish-subscription | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | xmlns= | |||
| xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | |||
| <yp:datastore | xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | |||
| xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | <yp:datastore | |||
| ds:operational | xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | |||
| </yp:datastore> | ds:operational | |||
| <yp:datastore-xpath-filter | </yp:datastore> | |||
| xmlns:ex="http://example.com/sample-data/1.0"> | <yp:datastore-xpath-filter | |||
| /ex:foo | xmlns:ex="http://example.com/sample-data/1.0"> | |||
| </yp:datastore-xpath-filter> | /ex:foo | |||
| <yp:on-change> | </yp:datastore-xpath-filter> | |||
| <yp:dampening-period>100</yp:dampening-period> | <yp:on-change> | |||
| </yp:on-change> | <yp:dampening-period>100</yp:dampening-period> | |||
| </establish-subscription> | </yp:on-change> | |||
| </netconf:rpc> | </establish-subscription> | |||
| </rpc> | ||||
| Figure 9: Establish-subscription request example 2 | Figure 12: Establish-subscription request example 2 | |||
| a publisher that cannot serve on-change updates but periodic updates | a publisher that cannot serve on-change updates but periodic updates | |||
| might return the following NETCONF response: | might return the following NETCONF response: | |||
| <rpc-reply message-id="101" | <rpc-reply message-id="101" | |||
| xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" | xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" | |||
| xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"> | xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"> | |||
| <rpc-error> | <rpc-error> | |||
| <error-type>application</error-type> | <error-type>application</error-type> | |||
| <error-tag>operation-failed</error-tag> | <error-tag>operation-failed</error-tag> | |||
| <error-severity>error</error-severity> | <error-severity>error</error-severity> | |||
| <error-path>/yp:periodic/yp:period</error-path> | <error-path>/yp:periodic/yp:period</error-path> | |||
| <error-info> | <error-info> | |||
| <yp:establish-subscription-error-datastore> | <yp:establish-subscription-error-datastore> | |||
| <yp:reason>yp:on-change-unsupported</yp:reason> | <yp:reason>yp:on-change-unsupported</yp:reason> | |||
| </yp:establish-subscription-error-datastore> | </yp:establish-subscription-error-datastore> | |||
| </error-info> | </error-info> | |||
| </rpc-error> | </rpc-error> | |||
| </rpc-reply> | </rpc-reply> | |||
| Figure 10: Establish-subscription error response example 2 | Figure 13: Establish-subscription error response example 2 | |||
| 4.4.2. Modify-subscription RPC | 4.4.2. Modify-subscription RPC | |||
| The subscriber MAY invoke the "modify-subscription" RPC for a | The subscriber MAY invoke the "modify-subscription" RPC for a | |||
| subscription it previously established. The subscriber will include | subscription it previously established. The subscriber will include | |||
| newly desired values in the "modify-subscription" RPC. Parameters | newly desired values in the "modify-subscription" RPC. Parameters | |||
| not included MUST remain unmodified. Below is an example where a | not included MUST remain unmodified. Below is an example where a | |||
| subscriber attempts to modify the period and datastore XPath filter | subscriber attempts to modify the period and datastore XPath filter | |||
| of a subscription using NETCONF. | of a subscription using NETCONF. | |||
| <netconf:rpc message-id="102" | <rpc message-id="102" | |||
| xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> | xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | |||
| <modify-subscription | <modify-subscription | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | xmlns= | |||
| xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" | |||
| <id>1011</id> | xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> | |||
| <yp:datastore | <id>1011</id> | |||
| xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | <yp:datastore | |||
| ds:operational | xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> | |||
| </yp:datastore> | ds:operational | |||
| <yp:datastore-xpath-filter | </yp:datastore> | |||
| xmlns:ex="http://example.com/sample-data/1.0"> | <yp:datastore-xpath-filter | |||
| /ex:bar | xmlns:ex="http://example.com/sample-data/1.0"> | |||
| </yp:datastore-xpath-filter> | /ex:bar | |||
| <yp:periodic> | </yp:datastore-xpath-filter> | |||
| <yp:period>250</yp:period> | <yp:periodic> | |||
| </yp:periodic> | <yp:period>250</yp:period> | |||
| </modify-subscription> | </yp:periodic> | |||
| </netconf:rpc> | </modify-subscription> | |||
| </rpc> | ||||
| Figure 11: Modify subscription request | Figure 14: Modify subscription request | |||
| The publisher MUST respond to the subscription modification request. | The publisher MUST respond to the subscription modification request. | |||
| If the request is rejected, the existing subscription is left | If the request is rejected, the existing subscription is left | |||
| unchanged, and the publisher MUST send an RPC error response. This | unchanged, and the publisher MUST send an RPC error response. This | |||
| response might have hints encapsulated within the yang-data structure | response might have hints encapsulated within the yang-data structure | |||
| "modify-subscription-error-datastore". A subscription MAY be | "modify-subscription-error-datastore". A subscription MAY be | |||
| modified multiple times. | modified multiple times. | |||
| The specific parameters to be returned in as part of the RPC error | The specific parameters to be returned in as part of the RPC error | |||
| response depend on the specific transport that is used to manage the | response depend on the specific transport that is used to manage the | |||
| skipping to change at page 29, line 19 ¶ | skipping to change at page 30, line 19 ¶ | |||
| "establish-subscription" RPC, a subscriber can send a "delete- | "establish-subscription" RPC, a subscriber can send a "delete- | |||
| subscription" RPC, which takes as only input the subscription's "id". | subscription" RPC, which takes as only input the subscription's "id". | |||
| This RPC is unmodified from | This RPC is unmodified from | |||
| [I-D.draft-ietf-netconf-subscribed-notifications]. | [I-D.draft-ietf-netconf-subscribed-notifications]. | |||
| 4.4.4. Resync-subscription RPC | 4.4.4. Resync-subscription RPC | |||
| This RPC is supported only for on-change subscriptions previously | This RPC is supported only for on-change subscriptions previously | |||
| established using an "establish-subscription" RPC. For example: | established using an "establish-subscription" RPC. For example: | |||
| <netconf:rpc message-id="103" | <rpc message-id="103" | |||
| xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> | xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | |||
| <resync-subscription | <resync-subscription | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push" | xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push" | |||
| xmlns:sn="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"> | <id>1011</id> | |||
| <id>1011</id> | </resync-subscription> | |||
| </resync-subscription> | </netconf:rpc> | |||
| </netconf:rpc> | ||||
| Resync subscription | Figure 15: Resync subscription | |||
| On receipt, a publisher must either accept the request and quickly | On receipt, a publisher must either accept the request and quickly | |||
| follow with a "push-update", or send an appropriate error within an | follow with a "push-update", or send an appropriate error within an | |||
| rpc error response. Within an error response, the publisher MAY | rpc error response. Within an error response, the publisher MAY | |||
| include supplemental information about the reasons within the yang- | include supplemental information about the reasons within the yang- | |||
| data structure "resync-subscription-error". | data structure "resync-subscription-error". | |||
| 4.4.5. YANG Module Synchronization | 4.4.5. YANG Module Synchronization | |||
| To make subscription requests, the subscriber needs to know the YANG | To make subscription requests, the subscriber needs to know the YANG | |||
| skipping to change at page 30, line 7 ¶ | skipping to change at page 31, line 7 ¶ | |||
| run-time (if supported by the publisher implementation). For this | run-time (if supported by the publisher implementation). For this | |||
| purpose, the YANG library provides a simple "yang-library-change" | purpose, the YANG library provides a simple "yang-library-change" | |||
| notification that informs the subscriber that the library has | notification that informs the subscriber that the library has | |||
| changed. In this case, a subscription may need to be updated to take | changed. In this case, a subscription may need to be updated to take | |||
| the updates into account. The receiver may also need to be informed | the updates into account. The receiver may also need to be informed | |||
| of module changes in order to process updates regarding datastore | of module changes in order to process updates regarding datastore | |||
| nodes from changed modules correctly. | nodes from changed modules correctly. | |||
| 5. YANG Module | 5. YANG Module | |||
| <CODE BEGINS> file "ietf-yang-push@2019-01-29.yang" | This YANG module imports typedefs from [RFC6991], identities from | |||
| module ietf-yang-push { | [RFC8342], the yang-data extension from [RFC8040], and the yang-patch | |||
| yang-version 1.1; | grouping from [RFC8072]. In addition, it imports and augments many | |||
| namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push"; | definitions from [I-D.draft-ietf-netconf-subscribed-notifications]. | |||
| prefix yp; | ||||
| import ietf-yang-types { | <CODE BEGINS> file "ietf-yang-push@2019-02-04.yang" | |||
| prefix yang; | module ietf-yang-push { | |||
| reference | yang-version 1.1; | |||
| "RFC 6991: Common YANG Data Types"; | namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push"; | |||
| } | prefix yp; | |||
| import ietf-subscribed-notifications { | ||||
| prefix sn; | ||||
| reference | ||||
| "draft-ietf-netconf-subscribed-notifications: | ||||
| Customized Subscriptions to a Publisher's Event Streams | ||||
| NOTE TO RFC Editor: Please replace above reference to | ||||
| draft-ietf-netconf-subscribed-notifications with RFC number | ||||
| when published (i.e. RFC xxxx)."; | ||||
| } | ||||
| import ietf-datastores { | ||||
| prefix ds; | ||||
| reference | ||||
| "RFC 8342: Network Management Datastore Architecture (NMDA)"; | ||||
| } | ||||
| import ietf-restconf { | ||||
| prefix rc; | ||||
| reference | ||||
| "RFC 8040: RESTCONF Protocol"; | ||||
| } | ||||
| import ietf-yang-patch { | import ietf-yang-types { | |||
| prefix ypatch; | prefix yang; | |||
| reference | reference | |||
| "RFC 8072: YANG Patch"; | "RFC 6991: Common YANG Data Types"; | |||
| } | } | |||
| organization "IETF"; | import ietf-subscribed-notifications { | |||
| contact | prefix sn; | |||
| "WG Web: <http://tools.ietf.org/wg/netconf/> | reference | |||
| WG List: <mailto:netconf@ietf.org> | "draft-ietf-netconf-subscribed-notifications: | |||
| Editor: Alexander Clemm | Customized Subscriptions to a Publisher's Event Streams | |||
| <mailto:ludwig@clemm.org> | NOTE TO RFC Editor: Please replace above reference to | |||
| Editor: Eric Voit | draft-ietf-netconf-subscribed-notifications with RFC number | |||
| <mailto:evoit@cisco.com> | when published (i.e. RFC xxxx)."; | |||
| Editor: Alberto Gonzalez Prieto | } | |||
| <mailto:agonzalezpri@vmware.com> | import ietf-datastores { | |||
| prefix ds; | ||||
| reference | ||||
| "RFC 8342: Network Management Datastore Architecture (NMDA)"; | ||||
| } | ||||
| import ietf-restconf { | ||||
| prefix rc; | ||||
| reference | ||||
| "RFC 8040: RESTCONF Protocol"; | ||||
| } | ||||
| import ietf-yang-patch { | ||||
| prefix ypatch; | ||||
| reference | ||||
| "RFC 8072: YANG Patch Media Type"; | ||||
| } | ||||
| Editor: Ambika Prasad Tripathy | organization | |||
| <mailto:ambtripa@cisco.com> | "IETF NETCONF Working Group"; | |||
| Editor: Einar Nilsen-Nygaard | contact | |||
| <mailto:einarnn@cisco.com> | "WG Web: <http://tools.ietf.org/wg/netconf/> | |||
| Editor: Andy Bierman | WG List: <mailto:netconf@ietf.org> | |||
| <mailto:andy@yumaworks.com> | ||||
| Editor: Balazs Lengyel | ||||
| <mailto:balazs.lengyel@ericsson.com>"; | ||||
| description | Editor: Alexander Clemm | |||
| "This module contains YANG specifications for YANG push. | <mailto:ludwig@clemm.org> | |||
| Copyright (c) 2019 IETF Trust and the persons identified as | Editor: Eric Voit | |||
| authors of the code. All rights reserved. | <mailto:evoit@cisco.com> | |||
| Redistribution and use in source and binary forms, with or | Editor: Alberto Gonzalez Prieto | |||
| without modification, is permitted pursuant to, and subject to | <mailto:agonzalezpri@vmware.com> | |||
| the license terms contained in, the Simplified BSD License set | Editor: Ambika Prasad Tripathy | |||
| forth in Section 4.c of the IETF Trust's Legal Provisions | <mailto:ambtripa@cisco.com> | |||
| Relating to IETF Documents | Editor: Einar Nilsen-Nygaard | |||
| (https://trustee.ietf.org/license-info). | <mailto:einarnn@cisco.com> | |||
| This version of this YANG module is part of | Editor: Andy Bierman | |||
| draft-ietf-netconf-yang-push-21; see the RFC itself for full | <mailto:andy@yumaworks.com> | |||
| legal notices. | Editor: Balazs Lengyel | |||
| NOTE TO RFC EDITOR: Please replace above reference to | <mailto:balazs.lengyel@ericsson.com>"; | |||
| draft-ietf-netconf-yang-push-21 with RFC number when published | description | |||
| (i.e. RFC xxxx)."; | "This module contains YANG specifications for YANG push. | |||
| revision 2019-01-29 { | The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL | |||
| description | NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', | |||
| "Initial revision. | 'MAY', and 'OPTIONAL' in this document are to be interpreted as | |||
| NOTE TO RFC EDITOR: | described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, | |||
| (1)Please replace the above revision date to | they appear in all capitals, as shown here. | |||
| the date of RFC publication when published. | ||||
| (2) Please replace the date in the file name | ||||
| (ietf-yang-push@2019-01-29.yang) to the date of RFC | ||||
| publication. | ||||
| (3) Please replace the following reference to | ||||
| draft-ietf-netconf-yang-push-21 with RFC number when | ||||
| published (i.e. RFC xxxx)."; | ||||
| reference | ||||
| "draft-ietf-netconf-yang-push-21"; | ||||
| } | ||||
| /* | Copyright (c) 2019 IETF Trust and the persons identified as | |||
| * FEATURES | authors of the code. All rights reserved. | |||
| */ | ||||
| feature on-change { | ||||
| description | ||||
| "This feature indicates that on-change triggered | ||||
| subscriptions are supported."; | ||||
| } | ||||
| /* | Redistribution and use in source and binary forms, with or | |||
| * IDENTITIES | without modification, is permitted pursuant to, and subject to | |||
| */ | the license terms contained in, the Simplified BSD License set | |||
| forth in Section 4.c of the IETF Trust's Legal Provisions | ||||
| Relating to IETF Documents | ||||
| (https://trustee.ietf.org/license-info). | ||||
| /* Error type identities for datastore subscription */ | This version of this YANG module is part of RFC XXXX; | |||
| see the RFC itself for full legal notices."; | ||||
| identity resync-subscription-error { | // RFC Ed.: replace XXXX with actual RFC number and remove this | |||
| // note. | ||||
| revision 2019-02-04 { | ||||
| description | description | |||
| "Problem found while attempting to fulfill an | "Initial revision. | |||
| 'resync-subscription' RPC request."; | NOTE TO RFC EDITOR: | |||
| } | (1)Please replace the above revision date to | |||
| the date of RFC publication when published. | ||||
| (2) Please replace the date in the file name | ||||
| (ietf-yang-push@2019-02-04.yang) to the date of RFC | ||||
| publication. | ||||
| (3) Please replace the following reference to | ||||
| draft-ietf-netconf-yang-push-22 with RFC number when | ||||
| published (i.e. RFC xxxx)."; | ||||
| reference | ||||
| "draft-ietf-netconf-yang-push-22"; | ||||
| } | ||||
| identity cant-exclude { | /* | |||
| base sn:establish-subscription-error; | * FEATURES | |||
| description | */ | |||
| "Unable to remove the set of 'excluded-changes'. This means | ||||
| the publisher is unable to restrict 'push-change-update's to | ||||
| just the change types requested for this subscription."; | ||||
| } | ||||
| identity datastore-not-subscribable { | feature on-change { | |||
| base sn:establish-subscription-error; | description | |||
| base sn:subscription-terminated-reason; | "This feature indicates that on-change triggered subscriptions | |||
| description | are supported."; | |||
| "This is not a subscribable datastore."; | } | |||
| } | ||||
| identity no-such-subscription-resync { | /* | |||
| base resync-subscription-error; | * IDENTITIES | |||
| description | */ | |||
| "Referenced subscription doesn't exist. This may be as a | ||||
| result of a non-existent subscription ID, an ID which | ||||
| belongs to another subscriber, or an ID for configured | ||||
| subscription."; | ||||
| } | ||||
| identity on-change-unsupported { | /* Error type identities for datastore subscription */ | |||
| base sn:establish-subscription-error; | ||||
| description | ||||
| "On-change is not supported for any objects which are | ||||
| selectable by this filter."; | ||||
| } | ||||
| identity on-change-sync-unsupported { | ||||
| base sn:establish-subscription-error; | ||||
| description | ||||
| "Neither sync on start nor resynchronization are supported | ||||
| for this subscription. This error will be used for two | ||||
| reasons. First if an 'establish-subscription' RPC includes | ||||
| 'sync-on-start', yet the publisher can't support sending a | ||||
| 'push-update' for this subscription for reasons other than | ||||
| 'on-change-unsupported' or 'sync-too-big'. And second, | ||||
| if the 'resync-subscription' RPC is invoked either for an | ||||
| existing periodic subscription, or for an on-change | ||||
| subscription which can't support resynchronization."; | ||||
| } | ||||
| identity period-unsupported { | identity resync-subscription-error { | |||
| base sn:establish-subscription-error; | description | |||
| base sn:modify-subscription-error; | "Problem found while attempting to fulfill an | |||
| base sn:subscription-suspended-reason; | 'resync-subscription' RPC request."; | |||
| description | } | |||
| "Requested time period or dampening-period is too short. This | ||||
| can be for both periodic and on-change subscriptions (with or | ||||
| without dampening.) Hints suggesting alternative periods may | ||||
| be returned as supplemental information."; | ||||
| } | ||||
| identity update-too-big { | identity cant-exclude { | |||
| base sn:establish-subscription-error; | base sn:establish-subscription-error; | |||
| base sn:modify-subscription-error; | description | |||
| base sn:subscription-suspended-reason; | "Unable to remove the set of 'excluded-changes'. This means | |||
| description | the publisher is unable to restrict 'push-change-update's to | |||
| "Periodic or on-change push update datatrees exceed a maximum | just the change types requested for this subscription."; | |||
| size limit. Hints on estimated size of what was too big may | } | |||
| be returned as supplemental information."; | ||||
| } | ||||
| identity sync-too-big { | identity datastore-not-subscribable { | |||
| base sn:establish-subscription-error; | base sn:establish-subscription-error; | |||
| base sn:modify-subscription-error; | base sn:subscription-terminated-reason; | |||
| base resync-subscription-error; | description | |||
| base sn:subscription-suspended-reason; | "This is not a subscribable datastore."; | |||
| description | } | |||
| "Sync-on-start or resynchronization datatree exceeds a | ||||
| maximum size limit. Hints on estimated size of what was too | ||||
| big may be returned as supplemental information."; | ||||
| } | ||||
| identity unchanging-selection { | identity no-such-subscription-resync { | |||
| base sn:establish-subscription-error; | base resync-subscription-error; | |||
| base sn:modify-subscription-error; | description | |||
| base sn:subscription-terminated-reason; | "Referenced subscription doesn't exist. This may be as a result | |||
| description | of a non-existent subscription ID, an ID which belongs to | |||
| "Selection filter is unlikely to ever select datatree nodes. | another subscriber, or an ID for configured subscription."; | |||
| This means that based on the subscriber's current access | } | |||
| rights, the publisher recognizes that the selection filter is | ||||
| unlikely to ever select datatree nodes which change. Examples | ||||
| for this might be that node or subtree doesn't exist, read | ||||
| access is not permitted for a receiver, or static objects | ||||
| that only change at reboot have been chosen."; | ||||
| } | ||||
| /* | identity on-change-unsupported { | |||
| * TYPE DEFINITIONS | base sn:establish-subscription-error; | |||
| */ | description | |||
| "On-change is not supported for any objects which are | ||||
| selectable by this filter."; | ||||
| } | ||||
| typedef change-type { | identity on-change-sync-unsupported { | |||
| type enumeration { | base sn:establish-subscription-error; | |||
| enum "create" { | description | |||
| description | "Neither sync on start nor resynchronization are supported for | |||
| "A change that refers to the creation of a new datastore | this subscription. This error will be used for two | |||
| node."; | reasons. First if an 'establish-subscription' RPC includes | |||
| } | 'sync-on-start', yet the publisher can't support sending a | |||
| enum "delete" { | 'push-update' for this subscription for reasons other than | |||
| description | 'on-change-unsupported' or 'sync-too-big'. And second, if the | |||
| "A change that refers to the deletion of a datastore | 'resync-subscription' RPC is invoked either for an existing | |||
| node."; | periodic subscription, or for an on-change subscription which | |||
| } | can't support resynchronization."; | |||
| enum "insert" { | } | |||
| description | ||||
| "A change that refers to the insertion of a new | ||||
| user-ordered datastore node."; | ||||
| } | ||||
| enum "move" { | ||||
| description | ||||
| "A change that refers to a reordering of the target | ||||
| datastore node"; | ||||
| } | ||||
| enum "replace" { | ||||
| description | ||||
| "A change that refers to a replacement of the target | ||||
| datastore node's value."; | ||||
| } | ||||
| } | ||||
| description | ||||
| "Specifies different types of datastore changes."; | ||||
| reference | ||||
| "RFC 8072 section 2.5, with a delta that it is valid for a | ||||
| receiver to process an update record which performs a create | ||||
| operation on a datastore node the receiver believes exists, | ||||
| or to process a delete on a datastore node the receiver | ||||
| believes is missing."; | ||||
| } | ||||
| typedef selection-filter-ref { | identity period-unsupported { | |||
| type leafref { | base sn:establish-subscription-error; | |||
| path "/sn:filters/yp:selection-filter/yp:filter-id"; | base sn:modify-subscription-error; | |||
| } | base sn:subscription-suspended-reason; | |||
| description | description | |||
| "This type is used to reference a selection filter."; | "Requested time period or dampening-period is too short. This | |||
| } | can be for both periodic and on-change subscriptions (with or | |||
| without dampening.) Hints suggesting alternative periods may | ||||
| be returned as supplemental information."; | ||||
| } | ||||
| /* | identity update-too-big { | |||
| * GROUP DEFINITIONS | base sn:establish-subscription-error; | |||
| */ | base sn:modify-subscription-error; | |||
| base sn:subscription-suspended-reason; | ||||
| description | ||||
| "Periodic or on-change push update datatrees exceed a maximum | ||||
| size limit. Hints on estimated size of what was too big may | ||||
| be returned as supplemental information."; | ||||
| } | ||||
| identity sync-too-big { | ||||
| base sn:establish-subscription-error; | ||||
| base sn:modify-subscription-error; | ||||
| base resync-subscription-error; | ||||
| base sn:subscription-suspended-reason; | ||||
| description | ||||
| "Sync-on-start or resynchronization datatree exceeds a maximum | ||||
| size limit. Hints on estimated size of what was too big may | ||||
| be returned as supplemental information."; | ||||
| } | ||||
| grouping datastore-criteria { | identity unchanging-selection { | |||
| description | base sn:establish-subscription-error; | |||
| "A grouping to define criteria for which selected objects | base sn:modify-subscription-error; | |||
| from a targeted datastore should be included in push | base sn:subscription-terminated-reason; | |||
| updates."; | description | |||
| leaf datastore { | "Selection filter is unlikely to ever select datatree nodes. | |||
| This means that based on the subscriber's current access | ||||
| rights, the publisher recognizes that the selection filter is | ||||
| unlikely to ever select datatree nodes which change. Examples | ||||
| for this might be that node or subtree doesn't exist, read | ||||
| access is not permitted for a receiver, or static objects that | ||||
| only change at reboot have been chosen."; | ||||
| } | ||||
| /* | ||||
| * TYPE DEFINITIONS | ||||
| */ | ||||
| typedef change-type { | ||||
| type enumeration { | ||||
| enum create { | ||||
| description | ||||
| "A change that refers to the creation of a new datastore | ||||
| node."; | ||||
| } | ||||
| enum delete { | ||||
| description | ||||
| "A change that refers to the deletion of a datastore | ||||
| node."; | ||||
| } | ||||
| enum insert { | ||||
| description | ||||
| "A change that refers to the insertion of a new | ||||
| user-ordered datastore node."; | ||||
| } | ||||
| enum move { | ||||
| description | ||||
| "A change that refers to a reordering of the target | ||||
| datastore node."; | ||||
| } | ||||
| enum replace { | ||||
| description | ||||
| "A change that refers to a replacement of the target | ||||
| datastore node's value."; | ||||
| } | ||||
| } | ||||
| description | ||||
| "Specifies different types of datastore changes. | ||||
| This type is based on the edit operations defined for YANG | ||||
| Patch, with the difference that it is valid for a receiver to | ||||
| process an update record which performs a create operation on | ||||
| a datastore node the receiver believes exists, or to process a | ||||
| delete on a datastore node the receiver believes is missing."; | ||||
| reference | ||||
| "RFC 8072: YANG Patch Media Type, section 2.5"; | ||||
| } | ||||
| typedef selection-filter-ref { | ||||
| type leafref { | ||||
| path "/sn:filters/yp:selection-filter/yp:filter-id"; | ||||
| } | ||||
| description | ||||
| "This type is used to reference a selection filter."; | ||||
| } | ||||
| typedef centiseconds { | ||||
| type uint32; | ||||
| description | ||||
| "A period of time, measured in units of 0.01 seconds."; | ||||
| } | ||||
| /* | ||||
| * GROUP DEFINITIONS | ||||
| */ | ||||
| grouping datastore-criteria { | ||||
| description | ||||
| "A grouping to define criteria for which selected objects | ||||
| from a targeted datastore should be included in push | ||||
| updates."; | ||||
| leaf datastore { | ||||
| type identityref { | type identityref { | |||
| base ds:datastore; | base ds:datastore; | |||
| } | } | |||
| mandatory true; | mandatory true; | |||
| description | description | |||
| "Datastore from which to retrieve data."; | "Datastore from which to retrieve data."; | |||
| } | } | |||
| uses selection-filter-objects; | uses selection-filter-objects; | |||
| } | } | |||
| grouping selection-filter-types { | grouping selection-filter-types { | |||
| description | description | |||
| "This grouping defines the types of selectors for objects | "This grouping defines the types of selectors for objects | |||
| from a datastore."; | from a datastore."; | |||
| choice filter-spec { | choice filter-spec { | |||
| description | description | |||
| "The content filter specification for this request."; | "The content filter specification for this request."; | |||
| anydata datastore-subtree-filter { | anydata datastore-subtree-filter { | |||
| if-feature "sn:subtree"; | if-feature "sn:subtree"; | |||
| description | description | |||
| "This parameter identifies the portions of the | "This parameter identifies the portions of the | |||
| target datastore to retrieve."; | target datastore to retrieve."; | |||
| reference | reference | |||
| "RFC 6241: Network Configuration Protocol, Section 6."; | "RFC 6241: Network Configuration Protocol, Section 6."; | |||
| } | } | |||
| leaf datastore-xpath-filter { | leaf datastore-xpath-filter { | |||
| if-feature "sn:xpath"; | if-feature "sn:xpath"; | |||
| type yang:xpath1.0; | type yang:xpath1.0; | |||
| description | description | |||
| "This parameter contains an XPath expression identifying | "This parameter contains an XPath expression identifying | |||
| the portions of the target datastore to retrieve. | the portions of the target datastore to retrieve. | |||
| If the expression returns a node-set, all nodes in the | ||||
| node-set are selected by the filter. Otherwise, if the | ||||
| expression does not return a node-set, the filter | ||||
| doesn't select any nodes. | ||||
| The expression is evaluated in the following XPath | ||||
| context: | ||||
| o The set of namespace declarations are those in scope | ||||
| on the 'datastore-xpath-filter' leaf element. | ||||
| o The set of variable bindings is empty. | ||||
| o The function library is the core function library, and | ||||
| the XPath functions defined in section 10 in RFC 7950. | ||||
| o The context node is the root node of the target | ||||
| datastore."; | ||||
| } | ||||
| } | ||||
| } | ||||
| grouping selection-filter-objects { | If the expression returns a node-set, all nodes in the | |||
| description | node-set are selected by the filter. Otherwise, if the | |||
| "This grouping defines a selector for objects from a | expression does not return a node-set, the filter | |||
| datastore."; | doesn't select any nodes. | |||
| choice selection-filter { | ||||
| description | ||||
| "The source of the selection filter applied to the | ||||
| subscription. This will come either referenced from a | ||||
| global list, or be provided within the subscription | ||||
| itself."; | ||||
| case by-reference { | ||||
| description | ||||
| "Incorporate a filter that has been configured | ||||
| separately."; | ||||
| leaf selection-filter-ref { | ||||
| type selection-filter-ref; | ||||
| mandatory true; | ||||
| description | ||||
| "References an existing selection filter which is to be | ||||
| applied to the subscription."; | ||||
| } | ||||
| } | ||||
| case within-subscription { | ||||
| description | ||||
| "Local definition allows a filter to have the same | ||||
| lifecycle as the subscription."; | ||||
| uses selection-filter-types; | ||||
| } | The expression is evaluated in the following XPath | |||
| } | context: | |||
| } | ||||
| grouping update-policy-modifiable { | o The set of namespace declarations is the set of prefix | |||
| description | and namespace pairs for all YANG modules implemented | |||
| "This grouping describes the datastore specific subscription | by the server, where the prefix is the YANG module | |||
| conditions that can be changed during the lifetime of the | name and the namespace is as defined by the | |||
| subscription."; | 'namespace' statement in the YANG module. | |||
| choice update-trigger { | ||||
| description | ||||
| "Defines necessary conditions for sending an event record to | ||||
| the subscriber."; | ||||
| case periodic { | ||||
| container periodic { | ||||
| presence "indicates a periodic subscription"; | ||||
| description | ||||
| "The publisher is requested to notify periodically the | ||||
| current values of the datastore as defined by the | ||||
| selection filter."; | ||||
| leaf period { | ||||
| type yang:timeticks; | ||||
| mandatory true; | ||||
| description | ||||
| "Duration of time which should occur between periodic | ||||
| push updates, in one hundredths of a second."; | ||||
| } | ||||
| 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 whole multiple | ||||
| interval from the anchor time. For example, for an | ||||
| anchor time 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 this | ||||
| subscription is active."; | ||||
| } | ||||
| } | ||||
| } | ||||
| case on-change { | ||||
| if-feature "on-change"; | ||||
| container on-change { | ||||
| presence "indicates an on-change subscription"; | ||||
| description | ||||
| "The publisher is requested to notify changes in | ||||
| values in the datastore subset as defined by a | ||||
| selection filter."; | ||||
| leaf dampening-period { | ||||
| type yang:timeticks; | ||||
| default 0; | ||||
| description | ||||
| "Specifies the minimum interval between the assembly | ||||
| of successive update records for a single receiver | ||||
| of a subscription. Whenever subscribed objects | ||||
| change, and a dampening period interval (which may | ||||
| be zero) has elapsed since the previous update | ||||
| record creation for a receiver, then any subscribed | ||||
| objects and properties which have changed since the | ||||
| previous update record will have their current | ||||
| values marshalled and placed into a new update | ||||
| record."; | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| grouping update-policy { | If the leaf is encoded in XML, all namespace | |||
| description | declarations in scope on the 'stream-xpath-filter' | |||
| "This grouping describes the datastore-specific subscription | leaf element are added to the set of namespace | |||
| conditions of a subscription."; | declarations. If a prefix found in the XML is | |||
| uses update-policy-modifiable { | already present in the set of namespace declarations, | |||
| augment "update-trigger/on-change/on-change" { | the namespace in the XML is used. | |||
| description | ||||
| "Includes objects not modifiable once subscription is | ||||
| established."; | ||||
| leaf sync-on-start { | ||||
| type boolean; | ||||
| default "true"; | ||||
| description | ||||
| "When this object is set to false, it restricts an | ||||
| on-change subscription from sending push-update | ||||
| notifications. When false, pushing a full selection | ||||
| per the terms of the selection filter MUST NOT be done | ||||
| for this subscription. Only updates about changes, | ||||
| i.e. only push-change-update notifications are sent. | ||||
| When true (default behavior), in order to facilitate a | ||||
| receiver's synchronization, a full update is sent when | ||||
| the subscription starts using a push-update | ||||
| notification. After that, push-change-update | ||||
| notifications are exclusively sent unless the | ||||
| publisher chooses to resync the subscription via a new | ||||
| push-update notification."; | ||||
| } | ||||
| leaf-list excluded-change { | ||||
| type change-type; | ||||
| description | ||||
| "Use to restrict which changes trigger an update. | ||||
| For example, if modify is excluded, only creation and | ||||
| deletion of objects is reported."; | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| grouping hints { | o The set of variable bindings is empty. | |||
| description | ||||
| "Parameters associated with some error for a subscription | ||||
| made upon a datastore."; | ||||
| leaf period-hint { | ||||
| type yang:timeticks; | ||||
| description | ||||
| "Returned when the requested time period is too short. This | ||||
| hint can assert a viable period for either a periodic push | ||||
| cadence or an on-change dampening interval."; | ||||
| } | ||||
| leaf filter-failure-hint { | ||||
| type string; | ||||
| description | ||||
| "Information describing where and/or why a provided filter | ||||
| was unsupportable for a subscription."; | ||||
| } | ||||
| leaf object-count-estimate { | ||||
| type uint32; | ||||
| description | ||||
| "If there are too many objects which could potentially be | ||||
| returned by the selection filter, this identifies the | ||||
| estimate of the number of objects which the filter would | ||||
| potentially pass."; | ||||
| } | ||||
| leaf object-count-limit { | ||||
| type uint32; | ||||
| description | ||||
| "If there are too many objects which could be returned by | ||||
| the selection filter, this identifies the upper limit of | ||||
| the publisher's ability to service for this subscription."; | ||||
| } | ||||
| leaf kilobytes-estimate { | ||||
| type uint32; | ||||
| description | ||||
| "If the returned information could be beyond the capacity | ||||
| of the publisher, this would identify the data size which | ||||
| could result from this selection filter."; | ||||
| } | ||||
| leaf kilobytes-limit { | ||||
| type uint32; | ||||
| description | ||||
| "If the returned information would be beyond the capacity | ||||
| of the publisher, this identifies the upper limit of the | ||||
| publisher's ability to service for this subscription."; | ||||
| } | ||||
| } | ||||
| /* | o The function library is the core function library, and | |||
| * RPCs | the XPath functions defined in section 10 in RFC 7950. | |||
| */ | ||||
| rpc resync-subscription { | o The context node is the root node of the target | |||
| if-feature "on-change"; | datastore."; | |||
| description | } | |||
| "This RPC allows a subscriber of an active on-change | } | |||
| subscription to request a full push of objects. | } | |||
| A successful invocation results in a push-update of all | ||||
| datastore nodes that the subscriber is permitted to access. | ||||
| This RPC can only be invoked on the same session on which the | ||||
| subscription is currently active. In case of an error, a | ||||
| resync-subscription-error is sent as part of an error | ||||
| response."; | ||||
| input { | ||||
| leaf id { | ||||
| type sn:subscription-id; | ||||
| mandatory true; | ||||
| description | ||||
| "Identifier of the subscription that is to be resynced."; | ||||
| } | ||||
| } | ||||
| } | ||||
| rc:yang-data resync-subscription-error { | grouping selection-filter-objects { | |||
| container resync-subscription-error { | description | |||
| description | "This grouping defines a selector for objects from a | |||
| "If a 'resync-subscription' RPC fails, the subscription is | datastore."; | |||
| not resynced and the RPC error response MUST indicate the | choice selection-filter { | |||
| reason for this failure. This yang-data MAY be inserted as | description | |||
| structured data within a subscription's RPC error response | "The source of the selection filter applied to the | |||
| to indicate the failure reason."; | subscription. This will come either referenced from a global | |||
| leaf reason { | list, or be provided within the subscription itself."; | |||
| type identityref { | case by-reference { | |||
| base resync-subscription-error; | description | |||
| } | "Incorporate a filter that has been configured | |||
| mandatory true; | separately."; | |||
| description | leaf selection-filter-ref { | |||
| "Indicates the reason why the publisher has declined a | type selection-filter-ref; | |||
| request for subscription resynchronization."; | mandatory true; | |||
| } | description | |||
| uses hints; | "References an existing selection filter which is to be | |||
| } | applied to the subscription."; | |||
| } | } | |||
| } | ||||
| case within-subscription { | ||||
| description | ||||
| "Local definition allows a filter to have the same | ||||
| lifecycle as the subscription."; | ||||
| uses selection-filter-types; | ||||
| } | ||||
| } | ||||
| } | ||||
| augment "/sn:establish-subscription/sn:input" { | grouping update-policy-modifiable { | |||
| description | description | |||
| "This augmentation adds additional subscription parameters | "This grouping describes the datastore specific subscription | |||
| that apply specifically to datastore updates to RPC input."; | conditions that can be changed during the lifetime of the | |||
| uses update-policy; | subscription."; | |||
| } | choice update-trigger { | |||
| description | ||||
| "Defines necessary conditions for sending an event record to | ||||
| the subscriber."; | ||||
| case periodic { | ||||
| container periodic { | ||||
| presence "indicates a periodic subscription"; | ||||
| description | ||||
| "The publisher is requested to notify periodically the | ||||
| current values of the datastore as defined by the | ||||
| selection filter."; | ||||
| leaf period { | ||||
| type centiseconds; | ||||
| mandatory true; | ||||
| description | ||||
| "Duration of time which should occur between periodic | ||||
| push updates, in one hundredths of a second."; | ||||
| } | ||||
| 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 whole multiple interval | ||||
| from the anchor time. For example, for an anchor time | ||||
| 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 this subscription is active."; | ||||
| } | ||||
| } | ||||
| } | ||||
| case on-change { | ||||
| if-feature "on-change"; | ||||
| container on-change { | ||||
| presence "indicates an on-change subscription"; | ||||
| description | ||||
| "The publisher is requested to notify changes in values | ||||
| in the datastore subset as defined by a selection | ||||
| filter."; | ||||
| leaf dampening-period { | ||||
| type centiseconds; | ||||
| default "0"; | ||||
| description | ||||
| "Specifies the minimum interval between the assembly of | ||||
| successive update records for a single receiver of a | ||||
| subscription. Whenever subscribed objects change, and | ||||
| a dampening period interval (which may be zero) has | ||||
| elapsed since the previous update record creation for | ||||
| a receiver, then any subscribed objects and properties | ||||
| which have changed since the previous update record | ||||
| will have their current values marshalled and placed | ||||
| into a new update record."; | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| augment "/sn:establish-subscription/sn:input/sn:target" { | grouping update-policy { | |||
| description | description | |||
| "This augmentation adds the datastore as a valid target | "This grouping describes the datastore-specific subscription | |||
| for the subscription to RPC input."; | conditions of a subscription."; | |||
| case datastore { | uses update-policy-modifiable { | |||
| description | augment "update-trigger/on-change/on-change" { | |||
| "Information specifying the parameters of an request for a | description | |||
| datastore subscription."; | "Includes objects not modifiable once subscription is | |||
| uses datastore-criteria; | established."; | |||
| } | leaf sync-on-start { | |||
| } | type boolean; | |||
| default "true"; | ||||
| description | ||||
| "When this object is set to false, it restricts an | ||||
| on-change subscription from sending push-update | ||||
| notifications. When false, pushing a full selection per | ||||
| the terms of the selection filter MUST NOT be done for | ||||
| this subscription. Only updates about changes, | ||||
| i.e. only push-change-update notifications are sent. | ||||
| When true (default behavior), in order to facilitate a | ||||
| receiver's synchronization, a full update is sent when | ||||
| the subscription starts using a push-update | ||||
| notification. After that, push-change-update | ||||
| notifications are exclusively sent unless the publisher | ||||
| chooses to resync the subscription via a new push-update | ||||
| notification."; | ||||
| } | ||||
| leaf-list excluded-change { | ||||
| type change-type; | ||||
| description | ||||
| "Use to restrict which changes trigger an update. For | ||||
| example, if modify is excluded, only creation and | ||||
| deletion of objects is reported."; | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| grouping hints { | ||||
| description | ||||
| "Parameters associated with some error for a subscription | ||||
| made upon a datastore."; | ||||
| leaf period-hint { | ||||
| type centiseconds; | ||||
| description | ||||
| "Returned when the requested time period is too short. This | ||||
| hint can assert a viable period for either a periodic push | ||||
| cadence or an on-change dampening interval."; | ||||
| } | ||||
| leaf filter-failure-hint { | ||||
| type string; | ||||
| description | ||||
| "Information describing where and/or why a provided filter | ||||
| was unsupportable for a subscription."; | ||||
| } | ||||
| leaf object-count-estimate { | ||||
| type uint32; | ||||
| description | ||||
| "If there are too many objects which could potentially be | ||||
| returned by the selection filter, this identifies the | ||||
| estimate of the number of objects which the filter would | ||||
| potentially pass."; | ||||
| } | ||||
| leaf object-count-limit { | ||||
| type uint32; | ||||
| description | ||||
| "If there are too many objects which could be returned by | ||||
| the selection filter, this identifies the upper limit of | ||||
| the publisher's ability to service for this subscription."; | ||||
| } | ||||
| leaf kilobytes-estimate { | ||||
| type uint32; | ||||
| description | ||||
| "If the returned information could be beyond the capacity | ||||
| of the publisher, this would identify the data size which | ||||
| could result from this selection filter."; | ||||
| } | ||||
| leaf kilobytes-limit { | ||||
| type uint32; | ||||
| description | ||||
| "If the returned information would be beyond the capacity | ||||
| of the publisher, this identifies the upper limit of the | ||||
| publisher's ability to service for this subscription."; | ||||
| } | ||||
| } | ||||
| /* | ||||
| * RPCs | ||||
| */ | ||||
| rc:yang-data establish-subscription-datastore-error-info { | rpc resync-subscription { | |||
| container establish-subscription-datastore-error-info { | if-feature "on-change"; | |||
| description | description | |||
| "If any 'establish-subscription' RPC parameters are | "This RPC allows a subscriber of an active on-change | |||
| unsupportable against the datastore, a subscription is not | subscription to request a full push of objects. | |||
| created and the RPC error response MUST indicate the reason | ||||
| why the subscription failed to be created. This yang-data | ||||
| MAY be inserted as structured data within a subscription's | ||||
| RPC error response to indicate the failure reason. This | ||||
| yang-data MUST be inserted if hints are to be provided back | ||||
| to the subscriber."; | ||||
| leaf reason { | ||||
| type identityref { | ||||
| base sn:establish-subscription-error; | ||||
| } | ||||
| description | ||||
| "Indicates the reason why the subscription has failed to | ||||
| be created to a targeted datastore."; | ||||
| } | ||||
| uses hints; | ||||
| } | A successful invocation results in a push-update of all | |||
| } | datastore nodes that the subscriber is permitted to access. | |||
| This RPC can only be invoked on the same session on which the | ||||
| subscription is currently active. In case of an error, a | ||||
| resync-subscription-error is sent as part of an error | ||||
| response."; | ||||
| input { | ||||
| leaf id { | ||||
| type sn:subscription-id; | ||||
| mandatory true; | ||||
| description | ||||
| "Identifier of the subscription that is to be resynced."; | ||||
| } | ||||
| } | ||||
| } | ||||
| augment "/sn:modify-subscription/sn:input" { | rc:yang-data resync-subscription-error { | |||
| description | container resync-subscription-error { | |||
| "This augmentation adds additional subscription parameters | description | |||
| specific to datastore updates."; | "If a 'resync-subscription' RPC fails, the subscription is | |||
| uses update-policy-modifiable; | not resynced and the RPC error response MUST indicate the | |||
| } | reason for this failure. This yang-data MAY be inserted as | |||
| structured data within a subscription's RPC error response | ||||
| to indicate the failure reason."; | ||||
| leaf reason { | ||||
| type identityref { | ||||
| base resync-subscription-error; | ||||
| } | ||||
| mandatory true; | ||||
| description | ||||
| "Indicates the reason why the publisher has declined a | ||||
| request for subscription resynchronization."; | ||||
| } | ||||
| uses hints; | ||||
| } | ||||
| } | ||||
| augment "/sn:modify-subscription/sn:input/sn:target" { | augment "/sn:establish-subscription/sn:input" { | |||
| description | description | |||
| "This augmentation adds the datastore as a valid target | "This augmentation adds additional subscription parameters | |||
| for the subscription to RPC input."; | that apply specifically to datastore updates to RPC input."; | |||
| case datastore { | uses update-policy; | |||
| description | } | |||
| "Information specifying the parameters of an request for a | ||||
| datastore subscription."; | ||||
| uses datastore-criteria; | ||||
| } | ||||
| } | ||||
| rc:yang-data modify-subscription-datastore-error-info { | augment "/sn:establish-subscription/sn:input/sn:target" { | |||
| container modify-subscription-datastore-error-info { | description | |||
| description | "This augmentation adds the datastore as a valid target | |||
| "This yang-data MAY be provided as part of a subscription's | for the subscription to RPC input."; | |||
| RPC error response when there is a failure of a | case datastore { | |||
| 'modify-subscription' RPC which has been made against a | description | |||
| datastore. This yang-data MUST be used if hints are to be | "Information specifying the parameters of an request for a | |||
| provides back to the subscriber."; | datastore subscription."; | |||
| leaf reason { | uses datastore-criteria; | |||
| type identityref { | } | |||
| base sn:modify-subscription-error; | } | |||
| } | ||||
| description | ||||
| "Indicates the reason why the subscription has failed to | ||||
| be modified."; | ||||
| } | ||||
| uses hints; | ||||
| } | ||||
| } | ||||
| /* | rc:yang-data establish-subscription-datastore-error-info { | |||
| * NOTIFICATIONS | container establish-subscription-datastore-error-info { | |||
| */ | description | |||
| "If any 'establish-subscription' RPC parameters are | ||||
| unsupportable against the datastore, a subscription is not | ||||
| created and the RPC error response MUST indicate the reason | ||||
| why the subscription failed to be created. This yang-data | ||||
| MAY be inserted as structured data within a subscription's | ||||
| RPC error response to indicate the failure reason. This | ||||
| yang-data MUST be inserted if hints are to be provided back | ||||
| to the subscriber."; | ||||
| leaf reason { | ||||
| type identityref { | ||||
| base sn:establish-subscription-error; | ||||
| } | ||||
| description | ||||
| "Indicates the reason why the subscription has failed to | ||||
| be created to a targeted datastore."; | ||||
| } | ||||
| uses hints; | ||||
| } | ||||
| } | ||||
| notification push-update { | augment "/sn:modify-subscription/sn:input" { | |||
| description | description | |||
| "This notification contains a push update, containing data | "This augmentation adds additional subscription parameters | |||
| subscribed to via a subscription. This notification is sent | specific to datastore updates."; | |||
| for periodic updates, for a periodic subscription. It can | uses update-policy-modifiable; | |||
| also be used for synchronization updates of an on-change | } | |||
| subscription. This notification shall only be sent to | augment "/sn:modify-subscription/sn:input/sn:target" { | |||
| receivers of a subscription. It does not constitute a | description | |||
| general-purpose notification that would be subscribable as | "This augmentation adds the datastore as a valid target | |||
| part of the NETCONF event stream by any receiver."; | for the subscription to RPC input."; | |||
| leaf id { | case datastore { | |||
| type sn:subscription-id; | description | |||
| description | "Information specifying the parameters of an request for a | |||
| "This references the subscription which drove the | datastore subscription."; | |||
| notification to be sent."; | uses datastore-criteria; | |||
| } | } | |||
| anydata datastore-contents { | } | |||
| description | ||||
| "This contains the updated data. It constitutes a snapshot | ||||
| at the time-of-update of the set of data that has been | ||||
| subscribed to. The snapshot corresponds to the same | ||||
| snapshot that would be returned in a corresponding get | ||||
| operation with the same selection filter parameters | ||||
| applied."; | ||||
| } | ||||
| leaf incomplete-update { | ||||
| type empty; | ||||
| description | ||||
| "This is a flag which indicates that not all datastore | ||||
| nodes subscribed to are included with this update. In | ||||
| other words, the publisher has failed to fulfill its full | ||||
| subscription obligations, and despite its best efforts is | ||||
| providing an incomplete set of objects."; | ||||
| } | ||||
| } | ||||
| notification push-change-update { | rc:yang-data modify-subscription-datastore-error-info { | |||
| if-feature "on-change"; | container modify-subscription-datastore-error-info { | |||
| description | description | |||
| "This notification contains an on-change push update. This | "This yang-data MAY be provided as part of a subscription's | |||
| notification shall only be sent to the receivers of a | RPC error response when there is a failure of a | |||
| subscription; it does not constitute a general-purpose | 'modify-subscription' RPC which has been made against a | |||
| notification."; | datastore. This yang-data MUST be used if hints are to be | |||
| leaf id { | provides back to the subscriber."; | |||
| type sn:subscription-id; | leaf reason { | |||
| description | type identityref { | |||
| "This references the subscription which drove the | base sn:modify-subscription-error; | |||
| notification to be sent."; | } | |||
| } | description | |||
| container datastore-changes { | "Indicates the reason why the subscription has failed to | |||
| description | be modified."; | |||
| "This contains the set of datastore changes of the | } | |||
| target datastore starting at the time of the | uses hints; | |||
| previous update, per the terms of the subscription. | } | |||
| The datastore changes are encoded per RFC 8027 | } | |||
| (YANG Patch)."; | ||||
| uses ypatch:yang-patch; | ||||
| } | ||||
| leaf incomplete-update { | ||||
| type empty; | ||||
| description | ||||
| "The presence of this object indicates not all changes which | ||||
| have occurred since the last update are included with this | ||||
| update. In other words, the publisher has failed to | ||||
| fulfill its full subscription obligations, for example in | ||||
| cases where it was not able to keep up with a change | ||||
| burst."; | ||||
| } | ||||
| } | ||||
| augment "/sn:subscription-started" { | /* | |||
| description | * NOTIFICATIONS | |||
| "This augmentation adds datastore-specific objects to | */ | |||
| the notification that a subscription has started."; | ||||
| uses update-policy; | ||||
| } | ||||
| augment "/sn:subscription-started/sn:target" { | notification push-update { | |||
| description | description | |||
| "This augmentation allows the datastore to be included as | "This notification contains a push update, containing data | |||
| part of the notification that a subscription has started."; | subscribed to via a subscription. This notification is sent | |||
| case datastore { | for periodic updates, for a periodic subscription. 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 which drove the | ||||
| notification to be sent."; | ||||
| } | ||||
| anydata datastore-contents { | ||||
| description | ||||
| "This contains the updated data. It constitutes a snapshot | ||||
| at the time-of-update of the set of data that has been | ||||
| subscribed to. The snapshot corresponds to the same | ||||
| snapshot that would be returned in a corresponding get | ||||
| operation with the same selection filter parameters | ||||
| applied."; | ||||
| } | ||||
| leaf incomplete-update { | ||||
| type empty; | ||||
| description | ||||
| "This is a flag which indicates that not all datastore | ||||
| nodes subscribed to are included with this update. In | ||||
| other words, the publisher has failed to fulfill its full | ||||
| subscription obligations, and despite its best efforts is | ||||
| providing an incomplete set of objects."; | ||||
| } | ||||
| } | ||||
| notification push-change-update { | ||||
| if-feature "on-change"; | ||||
| description | ||||
| "This notification contains an on-change push update. This | ||||
| notification shall only be sent to the receivers of a | ||||
| subscription; it does not constitute a general-purpose | ||||
| notification."; | ||||
| leaf id { | ||||
| type sn:subscription-id; | ||||
| description | ||||
| "This references the subscription which drove the | ||||
| notification to be sent."; | ||||
| } | ||||
| container datastore-changes { | ||||
| description | ||||
| "This contains the set of datastore changes of the target | ||||
| datastore starting at the time of the previous update, per | ||||
| the terms of the subscription."; | ||||
| uses ypatch:yang-patch; | ||||
| } | ||||
| leaf incomplete-update { | ||||
| type empty; | ||||
| description | ||||
| "The presence of this object indicates not all changes which | ||||
| have occurred since the last update are included with this | ||||
| update. In other words, the publisher has failed to | ||||
| fulfill its full subscription obligations, for example in | ||||
| cases where it was not able to keep up with a change | ||||
| burst."; | ||||
| } | ||||
| } | ||||
| augment "/sn:subscription-started" { | ||||
| description | ||||
| "This augmentation adds datastore-specific objects to | ||||
| the notification that a subscription has started."; | ||||
| uses update-policy; | ||||
| } | ||||
| augment "/sn:subscription-started/sn:target" { | ||||
| description | ||||
| "This augmentation allows the datastore to be included as | ||||
| part of the notification that a subscription has started."; | ||||
| case datastore { | ||||
| uses datastore-criteria { | uses datastore-criteria { | |||
| refine "selection-filter/within-subscription" { | refine "selection-filter/within-subscription" { | |||
| description | description | |||
| "Specifies the selection filter and where it | "Specifies the selection filter and where it originated | |||
| originated from. If the 'selection-filter-ref' is | from. If the 'selection-filter-ref' is populated, the | |||
| populated, the filter within the subscription came | filter within the subscription came from the 'filters' | |||
| from the 'filters' container. Otherwise it is | container. Otherwise it is populated in-line as part of | |||
| populated in-line as part of the subscription itself."; | the subscription itself."; | |||
| } | } | |||
| } | } | |||
| } | } | |||
| } | } | |||
| augment "/sn:subscription-modified" { | augment "/sn:subscription-modified" { | |||
| description | description | |||
| "This augmentation adds datastore-specific objects to | "This augmentation adds datastore-specific objects to | |||
| the notification that a subscription has been modified."; | the notification that a subscription has been modified."; | |||
| uses update-policy; | uses update-policy; | |||
| } | } | |||
| augment "/sn:subscription-modified/sn:target" { | augment "/sn:subscription-modified/sn:target" { | |||
| description | description | |||
| "This augmentation allows the datastore to be included as | "This augmentation allows the datastore to be included as | |||
| part of the notification that a subscription has been | part of the notification that a subscription has been | |||
| modified."; | modified."; | |||
| case datastore { | case datastore { | |||
| uses datastore-criteria { | uses datastore-criteria { | |||
| refine "selection-filter/within-subscription" { | refine "selection-filter/within-subscription" { | |||
| description | description | |||
| "Specifies where the selection filter, and where it | "Specifies where the selection filter, and where it came | |||
| came from within the subscription and then populated | from within the subscription and then populated within | |||
| within this notification. If the | this notification. If the 'selection-filter-ref' is | |||
| 'selection-filter-ref' is populated, the filter within | populated, the filter within the subscription came from | |||
| the subscription came from the 'filters' container. | the 'filters' container. Otherwise it is populated | |||
| Otherwise it is populated in-line as part of the | in-line as part of the subscription itself."; | |||
| subscription itself."; | } | |||
| } | } | |||
| } | } | |||
| } | } | |||
| } | ||||
| /* | /* | |||
| * DATA NODES | * DATA NODES | |||
| */ | */ | |||
| augment "/sn:filters" { | augment "/sn:filters" { | |||
| description | description | |||
| "This augmentation allows the datastore to be included as part | "This augmentation allows the datastore to be included as part | |||
| of the selection filtering criteria for a subscription."; | of the selection filtering criteria for a subscription."; | |||
| list selection-filter { | list selection-filter { | |||
| key "filter-id"; | key "filter-id"; | |||
| description | description | |||
| "A list of pre-configured filters that can be applied | "A list of pre-configured filters that can be applied | |||
| to datastore subscriptions."; | to datastore subscriptions."; | |||
| leaf filter-id { | leaf filter-id { | |||
| type string; | type string; | |||
| description | description | |||
| "An identifier to differentiate between selection | "An identifier to differentiate between selection | |||
| filters."; | filters."; | |||
| } | } | |||
| uses selection-filter-types; | uses selection-filter-types; | |||
| } | } | |||
| } | } | |||
| augment "/sn:subscriptions/sn:subscription" { | ||||
| when "yp:datastore"; | augment "/sn:subscriptions/sn:subscription" { | |||
| description | when 'yp:datastore'; | |||
| "This augmentation adds many datastore specific objects to a | description | |||
| subscription."; | "This augmentation adds many datastore specific objects to a | |||
| uses update-policy; | subscription."; | |||
| } | uses update-policy; | |||
| augment "/sn:subscriptions/sn:subscription/sn:target" { | } | |||
| description | ||||
| "This augmentation allows the datastore to be included as | augment "/sn:subscriptions/sn:subscription/sn:target" { | |||
| part of the selection filtering criteria for a subscription."; | description | |||
| case datastore { | "This augmentation allows the datastore to be included as | |||
| part of the selection filtering criteria for a subscription."; | ||||
| case datastore { | ||||
| uses datastore-criteria; | uses datastore-criteria; | |||
| } | } | |||
| } | } | |||
| } | } | |||
| <CODE ENDS> | ||||
| <CODE ENDS> | ||||
| 6. IANA Considerations | 6. IANA Considerations | |||
| This document registers the following namespace URI in the "IETF XML | This document registers the following namespace URI in the "IETF XML | |||
| Registry" [RFC3688]: | Registry" [RFC3688]: | |||
| URI: urn:ietf:params:xml:ns:yang:ietf-yang-push | URI: urn:ietf:params:xml:ns:yang:ietf-yang-push | |||
| Registrant Contact: The IESG. | Registrant Contact: The IESG. | |||
| XML: N/A; the requested URI is an XML namespace. | XML: N/A; the requested URI is an XML namespace. | |||
| skipping to change at page 46, line 47 ¶ | skipping to change at page 48, line 36 ¶ | |||
| Reference: draft-ietf-netconf-yang-push-21.txt (RFC form) | Reference: draft-ietf-netconf-yang-push-21.txt (RFC form) | |||
| 7. Security Considerations | 7. Security Considerations | |||
| The YANG module specified in this document defines a schema for data | The YANG module specified in this document defines a schema for data | |||
| that is designed to be accessed via network management protocols such | that is designed to be accessed via network management protocols such | |||
| as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer | as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer | |||
| is the secure transport layer, and the mandatory-to-implement secure | is the secure transport layer, and the mandatory-to-implement secure | |||
| transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer | transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer | |||
| is HTTPS, and the mandatory-to-implement secure transport is TLS | is HTTPS, and the mandatory-to-implement secure transport is TLS | |||
| [RFC5246]. | [RFC8446]. | |||
| The Network Configuration Access Control Model (NACM) [RFC8341] | The Network Configuration Access Control Model (NACM) [RFC8341] | |||
| provides the means to restrict access for particular NETCONF or | provides the means to restrict access for particular NETCONF or | |||
| RESTCONF users to a preconfigured subset of all available NETCONF or | RESTCONF users to a preconfigured subset of all available NETCONF or | |||
| RESTCONF protocol operations and content. | RESTCONF protocol operations and content. | |||
| There are a number of data nodes defined in this YANG module that are | There are a number of data nodes defined in this YANG module that are | |||
| writable/creatable/deletable (i.e., config true, which is the | writable/creatable/deletable (i.e., config true, which is the | |||
| default). These data nodes may be considered sensitive or vulnerable | default). These data nodes may be considered sensitive or vulnerable | |||
| in some network environments. Write operations (e.g., edit-config) | in some network environments. Write operations (e.g., edit-config) | |||
| skipping to change at page 48, line 22 ¶ | skipping to change at page 50, line 15 ¶ | |||
| 9. References | 9. References | |||
| 9.1. Normative References | 9.1. Normative References | |||
| [I-D.draft-ietf-netconf-subscribed-notifications] | [I-D.draft-ietf-netconf-subscribed-notifications] | |||
| Voit, E., Clemm, A., Gonzalez Prieto, A., Tripathy, A., | Voit, E., Clemm, A., Gonzalez Prieto, A., Tripathy, A., | |||
| and E. Nilsen-Nygaard, "Subscription to YANG Event | and E. Nilsen-Nygaard, "Subscription to YANG Event | |||
| NOtifications", draft-ietf-netconf-subscribed- | NOtifications", draft-ietf-netconf-subscribed- | |||
| notifications-22 (work in progress), January 2019. | notifications-22 (work in progress), January 2019. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | ||||
| Requirement Levels", BCP 14, RFC 2119, | ||||
| DOI 10.17487/RFC2119, March 1997, | ||||
| <https://www.rfc-editor.org/info/rfc2119>. | ||||
| [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, | [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, | |||
| DOI 10.17487/RFC3688, January 2004, | DOI 10.17487/RFC3688, January 2004, | |||
| <https://www.rfc-editor.org/info/rfc3688>. | <https://www.rfc-editor.org/info/rfc3688>. | |||
| [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for | [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for | |||
| the Network Configuration Protocol (NETCONF)", RFC 6020, | the Network Configuration Protocol (NETCONF)", RFC 6020, | |||
| DOI 10.17487/RFC6020, October 2010, | DOI 10.17487/RFC6020, October 2010, | |||
| <https://www.rfc-editor.org/info/rfc6020>. | <https://www.rfc-editor.org/info/rfc6020>. | |||
| [RFC6470] Bierman, A., "Network Configuration Protocol (NETCONF) | ||||
| Base Notifications", RFC 6470, DOI 10.17487/RFC6470, | ||||
| February 2012, <https://www.rfc-editor.org/info/rfc6470>. | ||||
| [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", | [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", | |||
| RFC 6991, DOI 10.17487/RFC6991, July 2013, | RFC 6991, DOI 10.17487/RFC6991, July 2013, | |||
| <https://www.rfc-editor.org/info/rfc6991>. | <https://www.rfc-editor.org/info/rfc6991>. | |||
| [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module | [RFC7895] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module | |||
| Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, | Library", RFC 7895, DOI 10.17487/RFC7895, June 2016, | |||
| <https://www.rfc-editor.org/info/rfc7895>. | <https://www.rfc-editor.org/info/rfc7895>. | |||
| [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", | [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", | |||
| RFC 7950, DOI 10.17487/RFC7950, August 2016, | RFC 7950, DOI 10.17487/RFC7950, August 2016, | |||
| <https://www.rfc-editor.org/info/rfc7950>. | <https://www.rfc-editor.org/info/rfc7950>. | |||
| [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF | [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF | |||
| Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, | Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, | |||
| <https://www.rfc-editor.org/info/rfc8040>. | <https://www.rfc-editor.org/info/rfc8040>. | |||
| [RFC8072] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Patch | [RFC8072] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Patch | |||
| Media Type", RFC 8072, DOI 10.17487/RFC8072, February | Media Type", RFC 8072, DOI 10.17487/RFC8072, February | |||
| 2017, <https://www.rfc-editor.org/info/rfc8072>. | 2017, <https://www.rfc-editor.org/info/rfc8072>. | |||
| [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
| 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
| [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration | [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration | |||
| Access Control Model", STD 91, RFC 8341, | Access Control Model", STD 91, RFC 8341, | |||
| DOI 10.17487/RFC8341, March 2018, | DOI 10.17487/RFC8341, March 2018, | |||
| <https://www.rfc-editor.org/info/rfc8341>. | <https://www.rfc-editor.org/info/rfc8341>. | |||
| [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., | [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., | |||
| and R. Wilton, "Network Management Datastore Architecture | and R. Wilton, "Network Management Datastore Architecture | |||
| (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, | (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, | |||
| <https://www.rfc-editor.org/info/rfc8342>. | <https://www.rfc-editor.org/info/rfc8342>. | |||
| 9.2. Informative References | 9.2. Informative References | |||
| [I-D.draft-ietf-netconf-netconf-event-notifications] | [I-D.draft-ietf-netconf-netconf-event-notifications] | |||
| Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard, | Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard, | |||
| E., and A. Tripathy, "Dynamic subscription to YANG Events | E., and A. Tripathy, "Dynamic subscription to YANG Events | |||
| and DAtastores over NETCONF", January 2019. | and DAtastores over NETCONF", January 2019. | |||
| [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | ||||
| (TLS) Protocol Version 1.2", RFC 5246, | ||||
| DOI 10.17487/RFC5246, August 2008, | ||||
| <https://www.rfc-editor.org/info/rfc5246>. | ||||
| [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event | ||||
| Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008, | ||||
| <https://www.rfc-editor.org/info/rfc5277>. | ||||
| [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., | [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., | |||
| and A. Bierman, Ed., "Network Configuration Protocol | and A. Bierman, Ed., "Network Configuration Protocol | |||
| (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, | (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, | |||
| <https://www.rfc-editor.org/info/rfc6241>. | <https://www.rfc-editor.org/info/rfc6241>. | |||
| [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure | [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure | |||
| Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, | Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, | |||
| <https://www.rfc-editor.org/info/rfc6242>. | <https://www.rfc-editor.org/info/rfc6242>. | |||
| [RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements | [RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements | |||
| skipping to change at page 50, line 9 ¶ | skipping to change at page 51, line 44 ¶ | |||
| <https://www.rfc-editor.org/info/rfc7923>. | <https://www.rfc-editor.org/info/rfc7923>. | |||
| [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", | [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", | |||
| BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, | BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, | |||
| <https://www.rfc-editor.org/info/rfc8340>. | <https://www.rfc-editor.org/info/rfc8340>. | |||
| [RFC8343] Bjorklund, M., "A YANG Data Model for Interface | [RFC8343] Bjorklund, M., "A YANG Data Model for Interface | |||
| Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, | Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, | |||
| <https://www.rfc-editor.org/info/rfc8343>. | <https://www.rfc-editor.org/info/rfc8343>. | |||
| Appendix A. Appendix A: Subscription Errors | [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | |||
| Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, | ||||
| <https://www.rfc-editor.org/info/rfc8446>. | ||||
| Appendix A. Appendix A: Subscription Errors | ||||
| A.1. RPC Failures | A.1. RPC Failures | |||
| Rejection of an RPC for any reason is indicated by via RPC error | Rejection of an RPC for any reason is indicated by via RPC error | |||
| response from the publisher. Valid RPC errors returned include both | response from the publisher. Valid RPC errors returned include both | |||
| existing transport layer RPC error codes, such as those seen with | existing transport layer RPC error codes, such as those seen with | |||
| NETCONF in [RFC6241], as well as subscription specific errors such as | NETCONF in [RFC6241], as well as subscription specific errors such as | |||
| those defined within the YANG model. As a result, how subscription | those defined within the YANG model. As a result, how subscription | |||
| errors are encoded within an RPC error response is transport | errors are encoded within an RPC error response is transport | |||
| dependent. | dependent. | |||
| References to specific identities within the either the subscribed- | References to specific identities in the ietf-subscribed- | |||
| notifications YANG model or the yang-push YANG model may be returned | notifications YANG model or the ietf-yang-push YANG model may be | |||
| as part of the error responses resulting from failed attempts at | returned as part of the error responses resulting from failed | |||
| datastore subscription. Following are valid errors per RPC (note: | attempts at datastore subscription. For errors defined as part of | |||
| throughout this section the prefix 'sn' indicates an item imported | ietf-subscribed-notifications, please refer to | |||
| from the subscribed-notifications.yang model): | [I-D.draft-ietf-netconf-subscribed-notifications]. The errors | |||
| introduced in this document, grouped per RPC, are as follows: | ||||
| establish-subscription modify-subscription | ||||
| ---------------------- ------------------- | ||||
| cant-exclude sn:filter-unsupported | ||||
| datastore-not-subscribable sn:insufficient-resources | ||||
| sn:dscp-unavailable sn:no-such-subscription | ||||
| sn:filter-unsupported period-unsupported | ||||
| sn:insufficient-resources update-too-big | ||||
| on-change-unsupported sync-too-big | ||||
| on-change-sync-unsupported unchanging-selection | ||||
| period-unsupported | ||||
| update-too-big resync-subscription | ||||
| sync-too-big -------------------- | ||||
| unchanging-selection no-such-subscription-resync | ||||
| sync-too-big | ||||
| delete-subscription kill-subscription | establish-subscription modify-subscription | |||
| ---------------------- ----------------- | ---------------------- ------------------- | |||
| sn:no-such-subscription sn:no-such-subscription | cant-exclude period-unsupported | |||
| datastore-not-subscribable update-too-big | ||||
| on-change-unsupported sync-too-big | ||||
| on-change-sync-unsupported unchanging-selection | ||||
| period-unsupported | ||||
| update-too-big resync-subscription | ||||
| sync-too-big -------------------- | ||||
| unchanging-selection no-such-subscription-resync | ||||
| sync-too-big | ||||
| There is one final set of transport independent RPC error elements | There is one final set of transport independent RPC error elements | |||
| included in the YANG model. These are the following four yang-data | included in the YANG model. These are the following four yang-data | |||
| structures for failed datastore subscriptions: | structures for failed datastore subscriptions: | |||
| 1. yang-data establish-subscription-error-datastore | 1. yang-data establish-subscription-error-datastore | |||
| This MUST be returned if information identifying the reason for an | This MUST be returned if information identifying the reason for an | |||
| RPC error has not been placed elsewhere within the transport | RPC error has not been placed elsewhere within the transport | |||
| portion of a failed "establish-subscription" RPC response. This | portion of a failed "establish-subscription" RPC response. This | |||
| MUST be sent if hints are included. | MUST be sent if hints are included. | |||
| skipping to change at page 51, line 33 ¶ | skipping to change at page 53, line 33 ¶ | |||
| 4. yang-data resync-subscription-error | 4. yang-data resync-subscription-error | |||
| This MUST be returned if information identifying the reason for an | This MUST be returned if information identifying the reason for an | |||
| RPC error has not been placed elsewhere within the transport | RPC error has not been placed elsewhere within the transport | |||
| portion of a failed "resync-subscription" RPC response. | portion of a failed "resync-subscription" RPC response. | |||
| A.2. Notifications of Failure | A.2. Notifications of Failure | |||
| A subscription may be unexpectedly terminated or suspended | A subscription may be unexpectedly terminated or suspended | |||
| independent of any RPC or configuration operation. In such cases, | independent of any RPC or configuration operation. In such cases, | |||
| indications of such a failure MUST be provided. To accomplish this, | indications of such a failure MUST be provided. To accomplish this, | |||
| the following types of error identities may be returned within the | a number of errors can be returned as part of the corresponding | |||
| corresponding subscription state change notification: | subscription state change notification. For this purpose, the | |||
| following error identities have been introduced in this document, in | ||||
| addition to those that were already defined in | ||||
| [I-D.draft-ietf-netconf-subscribed-notifications]: | ||||
| subscription-terminated subscription-suspended | subscription-terminated subscription-suspended | |||
| ----------------------- ---------------------- | ----------------------- ---------------------- | |||
| datastore-not-subscribable sn:insufficient-resources | datastore-not-subscribable period-unsupported | |||
| sn:filter-unavailable period-unsupported | unchanging-selection update-too-big | |||
| sn:no-such-subscription update-too-big | synchronization-size | |||
| sn:suspension-timeout synchronization-size | ||||
| unchanging-selection | ||||
| Appendix B. Changes Between Revisions | Appendix B. Changes Between Revisions | |||
| (To be removed by RFC editor prior to publication) | (To be removed by RFC editor prior to publication) | |||
| v21 - v22 | ||||
| o Minor updates per Martin Bjorklund's YANG doctor review. | ||||
| v20 - v21 | v20 - v21 | |||
| o Minor updates, simplifying RPC input conditions. | o Minor updates, simplifying RPC input conditions. | |||
| v19 - v20 | v19 - v20 | |||
| o Minor updates per WGLC comments. | o Minor updates per WGLC comments. | |||
| v18 - v19 | v18 - v19 | |||
| End of changes. 109 change blocks. | ||||
| 932 lines changed or deleted | 1000 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||