<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="2"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std"
     docName="draft-yan-netconf-yang-push-notif-filter-00"
     ipr="trust200902">
  <front>
    <title abbrev="YANG Notifications Filtering">Filter of 
    Configuration Change Notifications</title>

  <author fullname="Jinjie Yan"
		        initials="J"
		        surname="Yan">
			<organization>ZTE Corporation</organization>
			<address>
				<postal>
					<street/>
					<city>Nanjing</city>
					<region/>
					<code/>
					<country>China</country>
				</postal>
				<phone/>
				<email>yan.jinjie@zte.com.cn</email>
			</address>
		</author>

    <author fullname="Gu ChunHua " initials="C." surname="Gu">
      <organization>ZTE Corporation</organization>
 <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>gu.chunhua@zte.com.cn</email>
      </address>
    </author>

    <author fullname="Jia Rui" initials="R." surname="Jia">
      <organization>ZTE Corporation</organization>
 <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>jia.rui@zte.com.cn</email>
      </address>
    </author>

    <author fullname="Li YunFang" initials="Y." surname="Li">
      <organization>ZTE Corporation</organization>
 <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>li.yunfang@zte.com.cn</email>

        <uri/>
      </address>
    </author>
	
	 <author fullname="Ran Chen" initials="R." surname="Chen">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <email>chen.ran@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

   

    <abstract>
      <t>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.</t>
    </abstract>

    <note title="Requirements Language">
      <t>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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>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 (<xref target="RFC8641"/>)
      as soon as changes in the data store are detected.</t>

      <t>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 capability enables the filtering of on-change YANG-Push
      notifications according to the subscription rules.</t>

      <t>This specification applies to the YANG push dynamic Subscriptions
      defined in Section 2.4 of <xref target="RFC8639"/>. As defined in
      Section 2.4 of <xref target="RFC8639"/>, the subscriber can create a
      dynamic subscription using establish-subscription, and change an
      existing dynamic subscription using modify-subscription.</t>

      <t>As described in Section 3.5.2 of <xref target="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 (<xref target="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.</t>      

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

    <section anchor="On-change Update-trigger"
             title="Extend the On-change Update-trigger">
      <t>The YANG notifications subscription OPTIONALLY can be restricted to
      the following YANG module augment</t>

      <dl>
        <dt>excluded-self-change:</dt>

        <dd>Used to restrict a push-change-update notification that 
       was triggered by the subscriber itself if need report to subscriber.</dd>
      </dl>

      <t>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.</t>

      <t>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.</t>

      <t><xref target="subscription_establish_sub_example_xml_fig"/>
      provides an example of a "establish-subscription" RPC call with
      excluded-self-change and datastore-xpath-filter for on-change 
      subscription. <xref 
      target="subscription_establish_response_example_xml_fig"/>shows
      the response when the RPC has been accepted by the NETCONF server.
      <xref target="subscription_modify_sub_example_xml_fig"/> provides
      an example of a "modify-subscription" RPC call with
      excluded-self-change for on-change subscription.</t>

      <figure anchor="subscription_establish_sub_example_xml_fig"
              title="RPC Example for an establish-subscription">
        <artwork><![CDATA[
<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>
        ]]></artwork>
      </figure>

      <figure anchor="subscription_establish_response_example_xml_fig"
              title="RPC Example for establish-subscription response">
        <artwork><![CDATA[
<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>
        ]]></artwork>
      </figure>

      <figure anchor="subscription_modify_sub_example_xml_fig"
              title="RPC Example for an modify-subscription">
        <artwork><![CDATA[
<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>
        ]]></artwork>
      </figure>
    </section>

    <section anchor="ietf-yang-push-noti-filter-module"
             title="The &quot;ietf-yang-push-noti-filter&quot; Module">
      <section anchor="YANG-model" title="Data Model Overview">
        <t>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</t>

        <section anchor="Tree View" title="Tree View">
          <t>The following is the YANG tree diagram <xref target="RFC8340"/>
          for the ietf-yang-push-noti-filter YANG module</t>

          <t><figure>
              <artwork><![CDATA[
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
]]></artwork>
            </figure></t>
        </section>

        <section anchor="Full Tree View" title="Full Tree View">
          <t>The following is the YANG tree diagram <xref target="RFC8340"/>
          for the the ietf-yang-push-noti-filter augmentation 
          within the ietf-subscribed-notifications, including the RPCs and
          notifications.</t>

          <t><figure>
              <artwork><![CDATA[
  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}?
    |        +--:(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}?
        +--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)?
      |  |  |  |  |  +--:(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
      |  |           +---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}?
      |           +---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}?
      |  |              +--:(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?
      |  |  |  |       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
]]></artwork>
            </figure></t>
        </section>
      </section>

      <section anchor="YANG-module" title="YANG Module">
        <t>The YANG module has two leaves augmenting the model of 
        <xref target="RFC8639">Subscription to YANG Notifications
        </xref> and <xref target="RFC8641">Subscription to YANG 
        Notifications for Datastore Updates</xref>.</t>

        <t><figure>
            <artwork><![CDATA[
<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 
       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.";
  }
}
<CODE ENDS>]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="IANA_Considerations" title="IANA Considerations">
      <section title="IETF XML Registry">
        <t>This document registers the following URIs in the "IETF XML
        Registry" <xref target="RFC3688"/>:</t>

        <t><figure>
            <artwork align="left"><![CDATA[
  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.]]></artwork>
          </figure></t>
      </section>

      <section title="YANG Module Name">
        <t>This document registers the following YANG modules in the "YANG
        Module Names" registry <xref target="RFC6020"/>:</t>

        <t><figure>
            <artwork align="left"><![CDATA[
  name: ietf-yang-push-noti-filter
  namespace: urn:ietf:params:xml:ns:yang:ietf-yang-push-noti-filter
  prefix: ypf
  reference: RFC-to-be]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The security considerations for the YANG notifications subscription
      mechanism are described in <xref target="RFC8641"/>. This documents 
      adds no additional security considerations.</t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'?>

      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml'?>

      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml'?>

      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'?>

      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8639.xml'?>

      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml'?>
    </references>

    <references title="Informative References">
      <?rfc include='https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml'?>
    </references>
  </back>
</rfc>
