Network Working Group                                            R. Chen
Internet-Draft                                                     C. Gu
Intended status: Standards Track                                  R. Jia
Expires: 4 September 2025                                          Y. Li
                                                         ZTE Corporation
                                                            3 March 2025


              Filter of Configuration Change Notifications
              draft-chen-netconf-yang-push-notif-filter-01

Abstract

   This document extends the YANG-Push notification subscription
   mechanism for on-change to reduce unnecessary reporting after an on-
   change YANG-Push notification is generated.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 4 September 2025.

Copyright Notice

   Copyright (c) 2025 IETF Trust and the persons identified as the
   document authors.  All rights reserved.





Chen, et al.            Expires 4 September 2025                [Page 1]

Internet-Draft        YANG Notifications Filtering            March 2025


   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Extend the On-change Update-trigger . . . . . . . . . . . . .   3
   3.  The "ietf-yang-push-noti-filter" Module . . . . . . . . . . .   5
     3.1.  Data Model Overview . . . . . . . . . . . . . . . . . . .   5
     3.2.  YANG Module . . . . . . . . . . . . . . . . . . . . . . .  13
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  15
     4.1.  IETF XML Registry . . . . . . . . . . . . . . . . . . . .  15
     4.2.  YANG Module Name  . . . . . . . . . . . . . . . . . . . .  15
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  15
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  15
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  16
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  16

1.  Introduction

   According to the YANG PUSH protocol, once the subscriber subscribes
   to notifications of data store changes, the NETCONF server will
   report notifications according to the push-change-update notification
   format defined in the YANG PUSH protocol ([RFC8641]) as soon as
   changes in the data store are detected.

   Even if the change is caused by this subscriber, the notification
   will be reported.  The subscriber MAY not want to receive the
   notificaton.To filter out push-change-update notifications
   originating from this subscriber, a subscription method that supports
   filter local push-change-update notifications based on the
   subscription rules needs to be provided.  This allows for filter of
   on-change YANG-Push notifications according to the subscription
   rules.

   This specification applies to the YANG push dynamic Subscriptions
   defined in Section 2.4 of [RFC8639].  As defined in Section 2.4 of
   [RFC8639], the subscriber can create a dynamic subscription using
   establish-subscription, and change an existing dynamic subscription
   using modify-subscription.




Chen, et al.            Expires 4 September 2025                [Page 2]

Internet-Draft        YANG Notifications Filtering            March 2025


   As described in Section 3.5.2 of [RFC8641], if the update-trigger is
   set to on-change, the NETCONF server will report notifications
   according to the push-change-update notification format defined in
   the YANG PUSH protocol ([RFC8641]) as soon as changes in the data
   store are detected.However, if these changes are caused by the
   subscriber itself, the subscriber already holds these changes and
   does not need to receive additional Yang-Push notifications from the
   publisher.

   This document extends the current on-change YANG-Push notification
   subscription mechanism to reduce unnecessary reports after on-change
   YANG-Push notifications are generated.

2.  Extend the On-change Update-trigger

   The YANG notifications subscription OPTIONALLY can be restricted to
   the following YANG module augment

   excluded-self-change:  Used to restrict a push-change-update
      notification that triggered by the subscriber self if need report
      to subscriber.

   When a NETCONF client uses the RPC establish-subscription to create a
   subscription, if you want to filter out data store change
   notifications caused by the RPC operations of this client, you can
   specify excluded-self-change as enable.

   When a NETCONF client uses the RPC modify-subscription to modify the
   subscription, if you want to change it to filter out, specify
   excluded-self-change as enable; if you want to change it to not
   filter out, specify excluded-self-change as disable.

   Figure 1 provides an example of a "establish-subscription" RPC call
   with excluded-self-change and datastore-xpath-filter for on-change
   subscription.  Figure 2shows the response when the RPC has been
   accepted by the NETCONF server.  Figure 3 provides an example of a
   "modify-subscription" RPC call with excluded-self-change for on-
   change subscription.













Chen, et al.            Expires 4 September 2025                [Page 3]

Internet-Draft        YANG Notifications Filtering            March 2025


 <rpc message-id="101"
      xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <establish-subscription
     xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
     xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
     xmlns:ypf="urn:ietf:params:xml:ns:yang:ietf-yang-push-noti-filter">
      <yp:datastore
           xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
        ds:running
      </yp:datastore>
      <yp:datastore-xpath-filter
          xmlns:ex="https://example.com/sample-data/1.0">
        /ex:foo
      </yp:datastore-xpath-filter>
      <yp:on-change>
        <ypf:excluded-self-change>enable</ypf:excluded-self-change>
      </yp:on-change>
    </establish-subscription>
  </rpc>

          Figure 1: RPC Example for an establish-subscription

  <rpc-reply message-id="101"
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <id
      xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications">
        1011
    </id>
  </rpc-reply>

        Figure 2: RPC Example for establish-subscription response

 <rpc message-id="102"
       xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <modify-subscription
          xmlns=
             "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
          xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
     <id>1011</id>
       <yp:on-change>
         <ypf:excluded-self-change>disable</ypf:excluded-self-change>
       </yp:on-change>
   </modify-subscription>
 </rpc>

            Figure 3: RPC Example for an modify-subscription





Chen, et al.            Expires 4 September 2025                [Page 4]

Internet-Draft        YANG Notifications Filtering            March 2025


3.  The "ietf-yang-push-noti-filter" Module

3.1.  Data Model Overview

   This YANG module extends the "ietf-yang-push" module and the "ietf-
   subscribed-notifications" module by defining "excluded-self-change"
   in the "establish-subscription" and "modify-subscription" RPCs for
   data store push subscription

3.1.1.  Tree View

   The following is the YANG tree diagram [RFC8340] for the ietf-yang-
   push-noti-filter YANG module

module: ietf-yang-push-noti-filter
  augment /sn:establish-subscription/sn:input/yp:update-trigger/yp:on-change:
     +-- excluded-self-change?   enumeration
  augment /sn:modify-subscription/sn:input/yp:update-trigger/yp:on-change:
     +-- excluded-self-change?   enumeration

3.1.2.  Full Tree View

   The following is the YANG tree diagram [RFC8340] for the the ietf-
   yang-push-noti-filter augmentation within the ietf-subscribed-
   notifications, including the RPCs and notifications.

  module: ietf-subscribed-notifications
    +--ro streams
    |  +--ro stream* [name]
    |     +--ro name                       string
    |     +--ro description?               string
    |     +--ro replay-support?            empty {replay}?
    |     +--ro replay-log-creation-time   yang:date-and-time {replay}?
    |     +--ro replay-log-aged-time?      yang:date-and-time {replay}?
    +--rw filters
    |  +--rw stream-filter* [name]
    |  |  +--rw name                           string
    |  |  +--rw (filter-spec)?
    |  |     +--:(stream-subtree-filter)
    |  |     |  +--rw stream-subtree-filter?   <anydata> {subtree}?
    |  |     +--:(stream-xpath-filter)
    |  |        +--rw stream-xpath-filter?     yang:xpath1.0 {xpath}?
    |  +--rw yp:selection-filter* [filter-id]
    |     +--rw yp:filter-id                         string
    |     +--rw (yp:filter-spec)?
    |        +--:(yp:datastore-subtree-filter)
    |        |  +--rw yp:datastore-subtree-filter?   <anydata>
    |        |          {sn:subtree}?



Chen, et al.            Expires 4 September 2025                [Page 5]

Internet-Draft        YANG Notifications Filtering            March 2025


    |        +--:(yp:datastore-xpath-filter)
    |           +--rw yp:datastore-xpath-filter?     yang:xpath1.0
    |                   {sn:xpath}?
    +--rw subscriptions
      +--rw subscription* [id]
        +--rw id
        |       subscription-id
        +--rw (target)
        |  +--:(stream)
        |  |  +--rw (stream-filter)?
        |  |  |  +--:(by-reference)
        |  |  |  |  +--rw stream-filter-name
        |  |  |  |          stream-filter-ref
        |  |  |  +--:(within-subscription)
        |  |  |     +--rw (filter-spec)?
        |  |  |        +--:(stream-subtree-filter)
        |  |  |        |  +--rw stream-subtree-filter?
        |  |  |        |          <anydata> {subtree}?
        |  |  |        +--:(stream-xpath-filter)
        |  |  |           +--rw stream-xpath-filter?
        |  |  |                   yang:xpath1.0 {xpath}?
        |  |  +--rw stream
        |  |  |       stream-ref
        |  |  +--ro replay-start-time?
        |  |  |       yang:date-and-time {replay}?
        |  |  +--rw configured-replay?                         empty
        |  |          {configured,replay}?
        |  +--:(yp:datastore)
        |     +--rw yp:datastore
        |     |       identityref
        |     +--rw (yp:selection-filter)?
        |        +--:(yp:by-reference)
        |        |  +--rw yp:selection-filter-ref
        |        |          selection-filter-ref
        |        +--:(yp:within-subscription)
        |           +--rw (yp:filter-spec)?
        |              +--:(yp:datastore-subtree-filter)
        |              |  +--rw yp:datastore-subtree-filter?
        |              |          <anydata> {sn:subtree}?
        |              +--:(yp:datastore-xpath-filter)
        |                 +--rw yp:datastore-xpath-filter?
        |                         yang:xpath1.0 {sn:xpath}?
        +--rw stop-time?
        |       yang:date-and-time
        +--rw dscp?
        |       inet:dscp {dscp}?
        +--rw weighting?                                       uint8
        |       {qos}?



Chen, et al.            Expires 4 September 2025                [Page 6]

Internet-Draft        YANG Notifications Filtering            March 2025


        +--rw dependency?
        |       subscription-id {qos}?
        +--rw transport?
        |       transport {configured}?
        +--rw encoding?
        |       encoding
        +--rw purpose?                                         string
        |       {configured}?
        +--rw (notification-message-origin)? {configured}?
        |  +--:(interface-originated)
        |  |  +--rw source-interface?
        |  |          if:interface-ref {interface-designation}?
        |  +--:(address-originated)
        |     +--rw source-vrf?
        |     |       -> /ni:network-instances/network-instance/name
        |     |       {supports-vrf}?
        |     +--rw source-address?
        |             inet:ip-address-no-zone
        +--ro configured-subscription-state?
        |       enumeration {configured}?
        +--rw receivers
        |  +--rw receiver* [name]
        |     +--rw name                      string
        |     +--ro sent-event-records?
        |     |       yang:zero-based-counter64
        |     +--ro excluded-event-records?
        |     |       yang:zero-based-counter64
        |     +--ro state                     enumeration
        |     +---x reset {configured}?
        |        +--ro output
        |           +--ro time    yang:date-and-time
        +--rw (yp:update-trigger)?
           +--:(yp:periodic)
           |  +--rw yp:periodic!
           |     +--rw yp:period         centiseconds
           |     +--rw yp:anchor-time?   yang:date-and-time
           +--:(yp:on-change) {on-change}?
              +--rw yp:on-change!
                   +--rw yp:dampening-period?   centiseconds
                   +--rw yp:sync-on-start?      boolean
                   +--rw yp:excluded-change*    change-type

    rpcs:
      +---x establish-subscription
      |  +---w input
      |  |  +---w (target)
      |  |  |  +--:(stream)
      |  |  |  |  +---w (stream-filter)?



Chen, et al.            Expires 4 September 2025                [Page 7]

Internet-Draft        YANG Notifications Filtering            March 2025


      |  |  |  |  |  +--:(by-reference)
      |  |  |  |  |  |  +---w stream-filter-name
      |  |  |  |  |  |          stream-filter-ref
      |  |  |  |  |  +--:(within-subscription)
      |  |  |  |  |     +---w (filter-spec)?
      |  |  |  |  |        +--:(stream-subtree-filter)
      |  |  |  |  |        |  +---w stream-subtree-filter?
      |  |  |  |  |        |          <anydata> {subtree}?
      |  |  |  |  |        +--:(stream-xpath-filter)
      |  |  |  |  |           +---w stream-xpath-filter?
      |  |  |  |  |                   yang:xpath1.0 {xpath}?
      |  |  |  |  +---w stream
      |  |  |  |  |       stream-ref
      |  |  |  |  +---w replay-start-time?
      |  |  |  |          yang:date-and-time {replay}?
      |  |  |  +--:(yp:datastore)
      |  |  |     +---w yp:datastore
      |  |  |     |       identityref
      |  |  |     +---w (yp:selection-filter)?
      |  |  |        +--:(yp:by-reference)
      |  |  |        |  +---w yp:selection-filter-ref
      |  |  |        |          selection-filter-ref
      |  |  |        +--:(yp:within-subscription)
      |  |  |           +---w (yp:filter-spec)?
      |  |  |              +--:(yp:datastore-subtree-filter)
      |  |  |              |  +---w yp:datastore-subtree-filter?
      |  |  |              |          <anydata> {sn:subtree}?
      |  |  |              +--:(yp:datastore-xpath-filter)
      |  |  |                 +---w yp:datastore-xpath-filter?
      |  |  |                         yang:xpath1.0 {sn:xpath}?
      |  |  +---w stop-time?
      |  |  |       yang:date-and-time
      |  |  +---w dscp?
      |  |  |       inet:dscp {dscp}?
      |  |  +---w weighting?                                       uint8
      |  |  |       {qos}?
      |  |  +---w dependency?
      |  |  |       subscription-id {qos}?
      |  |  +---w encoding?
      |  |  |       encoding
      |  |  +---w (yp:update-trigger)?
      |  |     +--:(yp:periodic)
      |  |     |  +---w yp:periodic!
      |  |     |     +---w yp:period         centiseconds
      |  |     |     +---w yp:anchor-time?   yang:date-and-time
      |  |     +--:(yp:on-change) {on-change}?
      |  |        +---w yp:on-change!
      |  |           +---w yp:dampening-period?         centiseconds



Chen, et al.            Expires 4 September 2025                [Page 8]

Internet-Draft        YANG Notifications Filtering            March 2025


      |  |           +---w yp:sync-on-start?            boolean
      |  |           +---w yp:excluded-change*          change-type
      |  |           +---w ypf:excluded-self-change*    enumeration
      |  +--ro output
      |     +--ro id                            subscription-id
      |     +--ro replay-start-time-revision?   yang:date-and-time
      |             {replay}?
      +---x modify-subscription
      |  +---w input
      |     +---w id
      |     |       subscription-id
      |     +---w (target)
      |     |  +--:(stream)
      |     |  |  +---w (stream-filter)?
      |     |  |     +--:(by-reference)
      |     |  |     |  +---w stream-filter-name
      |     |  |     |          stream-filter-ref
      |     |  |     +--:(within-subscription)
      |     |  |        +---w (filter-spec)?
      |     |  |           +--:(stream-subtree-filter)
      |     |  |           |  +---w stream-subtree-filter?
      |     |  |           |          <anydata> {subtree}?
      |     |  |           +--:(stream-xpath-filter)
      |     |  |              +---w stream-xpath-filter?
      |     |  |                      yang:xpath1.0 {xpath}?
      |     |  +--:(yp:datastore)
      |     |     +---w yp:datastore
      |     |     |       identityref
      |     |     +---w (yp:selection-filter)?
      |     |        +--:(yp:by-reference)
      |     |        |  +---w yp:selection-filter-ref
      |     |        |          selection-filter-ref
      |     |        +--:(yp:within-subscription)
      |     |           +---w (yp:filter-spec)?
      |     |              +--:(yp:datastore-subtree-filter)
      |     |              |  +---w yp:datastore-subtree-filter?
      |     |              |          <anydata> {sn:subtree}?
      |     |              +--:(yp:datastore-xpath-filter)
      |     |                 +---w yp:datastore-xpath-filter?
      |     |                         yang:xpath1.0 {sn:xpath}?
      |     +---w stop-time?
      |     |       yang:date-and-time
      |     +---w (yp:update-trigger)?
      |        +--:(yp:periodic)
      |        |  +---w yp:periodic!
      |        |     +---w yp:period         centiseconds
      |        |     +---w yp:anchor-time?   yang:date-and-time
      |        +--:(yp:on-change) {on-change}?



Chen, et al.            Expires 4 September 2025                [Page 9]

Internet-Draft        YANG Notifications Filtering            March 2025


      |           +---w yp:on-change!
      |              +---w yp:dampening-period?         centiseconds
      |              +---w ypf:excluded-self-change*    enumeration
      +---x delete-subscription
      |  +---w input
      |     +---w id    subscription-id
      +---x kill-subscription
         +---w input
            +---w id    subscription-id

    notifications:
      +---n replay-completed {replay}?
      |  +--ro id    subscription-id
      +---n subscription-completed {configured}?
      |  +--ro id    subscription-id
      +---n subscription-modified
      |  +--ro id
      |  |       subscription-id
      |  +--ro (target)
      |  |  +--:(stream)
      |  |  |  +--ro (stream-filter)?
      |  |  |  |  +--:(by-reference)
      |  |  |  |  |  +--ro stream-filter-name
      |  |  |  |  |          stream-filter-ref
      |  |  |  |  +--:(within-subscription)
      |  |  |  |     +--ro (filter-spec)?
      |  |  |  |        +--:(stream-subtree-filter)
      |  |  |  |        |  +--ro stream-subtree-filter?
      |  |  |  |        |          <anydata> {subtree}?
      |  |  |  |        +--:(stream-xpath-filter)
      |  |  |  |           +--ro stream-xpath-filter?
      |  |  |  |                   yang:xpath1.0 {xpath}?
      |  |  |  +--ro stream
      |  |  |  |       stream-ref
      |  |  |  +--ro replay-start-time?
      |  |  |          yang:date-and-time {replay}?
      |  |  +--:(yp:datastore)
      |  |     +--ro yp:datastore
      |  |     |       identityref
      |  |     +--ro (yp:selection-filter)?
      |  |        +--:(yp:by-reference)
      |  |        |  +--ro yp:selection-filter-ref
      |  |        |          selection-filter-ref
      |  |        +--:(yp:within-subscription)
      |  |           +--ro (yp:filter-spec)?
      |  |              +--:(yp:datastore-subtree-filter)
      |  |              |  +--ro yp:datastore-subtree-filter?
      |  |              |          <anydata> {sn:subtree}?



Chen, et al.            Expires 4 September 2025               [Page 10]

Internet-Draft        YANG Notifications Filtering            March 2025


      |  |              +--:(yp:datastore-xpath-filter)
      |  |                 +--ro yp:datastore-xpath-filter?
      |  |                         yang:xpath1.0 {sn:xpath}?
      |  +--ro stop-time?
      |  |       yang:date-and-time
      |  +--ro dscp?
      |  |       inet:dscp {dscp}?
      |  +--ro weighting?                                       uint8
      |  |       {qos}?
      |  +--ro dependency?
      |  |       subscription-id {qos}?
      |  +--ro transport?
      |  |       transport {configured}?
      |  +--ro encoding?                                        encoding
      |  +--ro purpose?                                         string
      |  |       {configured}?
      |  +--ro (yp:update-trigger)?
      |     +--:(yp:periodic)
      |     |  +--ro yp:periodic!
      |     |     +--ro yp:period         centiseconds
      |     |     +--ro yp:anchor-time?   yang:date-and-time
      |     +--:(yp:on-change) {on-change}?
      |        +--ro yp:on-change!
      |           +--ro yp:dampening-period?   centiseconds
      |           +--ro yp:sync-on-start?      boolean
      |           +--ro yp:excluded-change*    change-type
      +---n subscription-resumed
      |  +--ro id    subscription-id
      +---n subscription-started {configured}?
      |  +--ro id
      |  |       subscription-id
      |  +--ro (target)
      |  |  +--:(stream)
      |  |  |  +--ro (stream-filter)?
      |  |  |  |  +--:(by-reference)
      |  |  |  |  |  +--ro stream-filter-name
      |  |  |  |  |          stream-filter-ref
      |  |  |  |  +--:(within-subscription)
      |  |  |  |     +--ro (filter-spec)?
      |  |  |  |        +--:(stream-subtree-filter)
      |  |  |  |        |  +--ro stream-subtree-filter?
      |  |  |  |        |          <anydata> {subtree}?
      |  |  |  |        +--:(stream-xpath-filter)
      |  |  |  |           +--ro stream-xpath-filter?
      |  |  |  |                   yang:xpath1.0 {xpath}?
      |  |  |  +--ro stream
      |  |  |  |       stream-ref
      |  |  |  +--ro replay-start-time?



Chen, et al.            Expires 4 September 2025               [Page 11]

Internet-Draft        YANG Notifications Filtering            March 2025


      |  |  |  |       yang:date-and-time {replay}?
      |  |  |  +--ro replay-previous-event-time?
      |  |  |          yang:date-and-time {replay}?
      |  |  +--:(yp:datastore)
      |  |     +--ro yp:datastore
      |  |     |       identityref
      |  |     +--ro (yp:selection-filter)?
      |  |        +--:(yp:by-reference)
      |  |        |  +--ro yp:selection-filter-ref
      |  |        |          selection-filter-ref
      |  |        +--:(yp:within-subscription)
      |  |           +--ro (yp:filter-spec)?
      |  |              +--:(yp:datastore-subtree-filter)
      |  |              |  +--ro yp:datastore-subtree-filter?
      |  |              |          <anydata> {sn:subtree}?
      |  |              +--:(yp:datastore-xpath-filter)
      |  |                 +--ro yp:datastore-xpath-filter?
      |  |                         yang:xpath1.0 {sn:xpath}?
      |  +--ro stop-time?
      |  |       yang:date-and-time
      |  +--ro dscp?
      |  |       inet:dscp {dscp}?
      |  +--ro weighting?                                       uint8
      |  |       {qos}?
      |  +--ro dependency?
      |  |       subscription-id {qos}?
      |  +--ro transport?
      |  |       transport {configured}?
      |  +--ro encoding?                                        encoding
      |  +--ro purpose?                                         string
      |  |       {configured}?
      |  +--ro (yp:update-trigger)?
      |     +--:(yp:periodic)
      |     |  +--ro yp:periodic!
      |     |     +--ro yp:period         centiseconds
      |     |     +--ro yp:anchor-time?   yang:date-and-time
      |     +--:(yp:on-change) {on-change}?
      |        +--ro yp:on-change!
      |           +--ro yp:dampening-period?   centiseconds
      |           +--ro yp:sync-on-start?      boolean
      |           +--ro yp:excluded-change*    change-type
      +---n subscription-suspended
      |  +--ro id        subscription-id
      |  +--ro reason    identityref
      +---n subscription-terminated
         +--ro id        subscription-id
         +--ro reason    identityref




Chen, et al.            Expires 4 September 2025               [Page 12]

Internet-Draft        YANG Notifications Filtering            March 2025


3.2.  YANG Module

   The YANG module has two leaves augmenting the model of Subscription
   to YANG Notifications [RFC8639] and Subscription to YANG
   Notifications for Datastore Updates [RFC8641].

   <CODE BEGINS> file "ietf-yang-push-noti-filter@2024-05-31.yang"
   module ietf-yang-push-noti-filter {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push-noti-filter";
     prefix ypf;
     import ietf-subscribed-notifications {
       prefix sn;
     }
     import ietf-yang-push {
       prefix yp;
       revision-date 2019-09-09;
     }

     organization "IETF NETCONF(Network Configuration) Working Group";
     contact
       "ZTE Corporation &#xD;
         Nanjing Institute of ZTE Corporation&#xD;
         &#xD;
         No.68 Zijinghua Rd. Yuhuatai District, Nanjing, China&#xD;
         &#xD;
         Tel: +86-25-52870000";

     description
       "This module augments the YANG push subscription RPCs.

        Copyright (c) 2023 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject to
        the license terms contained in, the Simplified BSD License set
        forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents(https://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX; see the
        RFC itself for full legal notices.";

     revision 2024-05-31 {
       description
         "First revision";
       reference
         "RFC XXXX: Filter of Configuration Change Notifications



Chen, et al.            Expires 4 September 2025               [Page 13]

Internet-Draft        YANG Notifications Filtering            March 2025


          Subscription";
     }

     augment "/sn:establish-subscription/sn:input/yp:update-trigger/" +
               "yp:on-change/yp:on-change" {
       leaf excluded-self-change {
         type enumeration {
           enum enable {
             description
               "Enable excluded-self-change.";
           }
           enum disable {
             description
               "Disable excluded-self-change.";
           }
         }
         description
           "Used to restrict a push-change-update notification that
           triggered by the subscriber self if need report to
           subscriber.";
       }

       description
         "This augmentation adds additional subscription parameters to
          the establish-subscription RPC.";
     }

     augment "/sn:modify-subscription/sn:input/yp:update-trigger/" +
               "yp:on-change/yp:on-change" {
       leaf excluded-self-change {
         type enumeration {
           enum enable {
             description
               "Enable excluded-self-change.";
           }
           enum disable {
             description
               "Disable excluded-self-change.";
           }
         }

         description
           "Used to restrict a push-change-update notification that
            triggered by the subscriber self if need report to subscriber.";
       }
       description
         "This augmentation adds additional subscription parameters to the
          modify-subscription RPC.";



Chen, et al.            Expires 4 September 2025               [Page 14]

Internet-Draft        YANG Notifications Filtering            March 2025


     }
   }
   <CODE ENDS>

4.  IANA Considerations

4.1.  IETF XML Registry

   This document registers the following URIs in the "IETF XML Registry"
   [RFC3688]:

     URI: urn:ietf:params:xml:ns:yang:ietf-yang-push-noti-filter
     Registrant Contact: The IESG.
     XML: N/A; the requested URI is an XML namespace.

4.2.  YANG Module Name

   This document registers the following YANG modules in the "YANG
   Module Names" registry [RFC6020]:

     name: ietf-yang-push-noti-filter
     namespace: urn:ietf:params:xml:ns:yang:ietf-yang-push-noti-filter
     prefix: ypf
     reference: RFC-to-be

5.  Security Considerations

   The security considerations for the YANG notifications subscription
   mechanism are described in [RFC8641].  This documents adds no
   additional security considerations.

6.  References

6.1.  Normative References

   [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,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.



Chen, et al.            Expires 4 September 2025               [Page 15]

Internet-Draft        YANG Notifications Filtering            March 2025


   [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>.

   [RFC8639]  Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard,
              E., and A. Tripathy, "Subscription to YANG Notifications",
              RFC 8639, DOI 10.17487/RFC8639, September 2019,
              <https://www.rfc-editor.org/info/rfc8639>.

   [RFC8641]  Clemm, A. and E. Voit, "Subscription to YANG Notifications
              for Datastore Updates", RFC 8641, DOI 10.17487/RFC8641,
              September 2019, <https://www.rfc-editor.org/info/rfc8641>.

6.2.  Informative References

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

Authors' Addresses

   Ran Chen
   ZTE Corporation
   Nanjing
   China
   Email: chen.ran@zte.com.cn


   Gu ChunHua
   ZTE Corporation
   Nanjing
   China
   Email: gu.chunhua@zte.com.cn


   Jia Rui
   ZTE Corporation
   Nanjing
   China
   Email: jia.rui@zte.com.cn


   Li YunFang
   ZTE Corporation
   Nanjing
   China
   Email: li.yunfang@zte.com.cn




Chen, et al.            Expires 4 September 2025               [Page 16]