<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="no" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std" docName="draft-tantsura-fann-yang-00"
  ipr="trust200902" submissionType="IETF" xml:lang="en"
  tocInclude="true" symRefs="true" sortRefs="true"
  version="3" consensus="true">
  <front>
    <title abbrev="FANN YANG">A YANG Data Model for Fast Network Notifications</title>
    <seriesInfo name="Internet-Draft" value="draft-tantsura-fann-yang-00"/>
    <author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
      <organization>Nvidia</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>    
    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <email>yingzhen.ietf@gmail.com</email>
      </address>
    </author>
    <date/>
    <area>General</area>
    <workgroup>Internet</workgroup>
    <abstract>
      <t>This document defines a YANG data model to Fast Network Notifictions.
      </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Overview</name>
      <t>This document defines a YANG <xref target="RFC7950"/> data model for the
      support of fast network notifications.</t>
      <t>The configuration in the model allows network operators to config the
        network conditions to generate notifications. For example, when a queue-depth
        reaches to a configured threshold. The grouping of "recipient" allows the
        configuration of various recipients so a notification can be sent to different
        recipients based on requirement, such as to a link or to a list of subsribers.
      </t>
      <t>
        Notifications are sent when the configured conditions are met.</t>
      <t>
        The meanings of the symbols in the YANG tree diagrams are defined in
        <xref target="RFC8340"/>.
      </t>

      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <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>
      </section>
    </section>

    <section numbered="true" toc="default">
      <name>YANG Module for Fast Network Notifications</name>
      <t>
        This document defines a YANG module to support fast network notifications.
      </t>

<artwork align="left" name="" type="" alt=""><![CDATA[
module: ietf-fann
  +--rw fann 
     +--rw fast-network-notification* [notification-id]
        +--rw notification-id               string
        +--rw source-id?                    inet:uri
        +--rw receivers
        |  +--rw (receiver)?
        |     +--:(link)
        |     |  +--rw link?              string
        |     +--:(path)
        |     |  +--rw path?              string
        |     +--:(domain)
        |     |  +--rw domain?            empty
        |     +--:(subscribe-nodes)
        |        +--rw subscribe-nodes*   inet:uri
        +--rw (condition)
           +--:(link-congestion)
           |  +--rw link?                   string
           |  +--rw utilization-level?      decimal64
           |  +--rw congestion-threshold?   uint8
           +--:(microburst)
           |  +--rw duration?               yang:timeticks
           |  +--rw intensity?              decimal64
           |  +--rw affected-resource?      string
           +--:(sla-violation)
           |  +--rw sla-reference?          string
           |  +--rw violated-metric?        string
           |  +--rw measured-value?         decimal64
           |  +--rw threshold?              decimal64
           +--:(queue-build-up)
           |  +--rw queue-id?               string
           |  +--rw depth?                  uint64
           |  +--rw queue-threshold?        uint8
           +--:(local-impairment)
              +--rw impairment-type?        string
              +--rw description?            string
              +--rw domain-id?              string
              +--rw node-id?                string
              +--rw path-id?                string
              +--rw link-id?                string

notifications:
    +---n fast-network-notification-event
       +--ro notification-id?   string
       +--ro timestamp          yang:date-and-time
       +--ro source-id?         inet:uri
       +--ro receivers
       |  +--ro (receiver)?
       |     +--:(link)
       |     |  +--ro link?              string
       |     +--:(path)
       |     |  +--ro path?              string
       |     +--:(domain)
       |     |  +--ro domain?            empty
       |     +--:(subscribe-nodes)
       |        +--ro subscribe-nodes*   inet:uri
       +--ro condition
          +--ro (condition-type)
             +--:(link-congestion)
             |  +--ro link?                string
             |  +--ro utilization-level?   decimal64
             +--:(microburst)
             |  +--ro duration?            yang:timeticks
             |  +--ro intensity?           decimal64
             |  +--ro affected-resource?   string
             +--:(sla-violation)
             |  +--ro sla-reference?       string
             |  +--ro violated-metric?     string
             |  +--ro measured-value?      decimal64
             +--:(queue-build-up)
             |  +--ro queue-id?            string
             |  +--ro depth?               uint64
             +--:(local-impairment)
                +--ro impairment-type?     string
                +--ro description?         string
                +--ro domain-id?           string
                +--ro node-id?             string
                +--ro path-id?             string
                +--ro link-id?             string
]]></artwork>
<sourcecode name="ietf-fann@2026-07-05.yang" type="" markers="true"><![CDATA[
module ietf-fann {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-fann";
  prefix fann;

  import ietf-yang-types {
    prefix yang;
    reference "RFC 6991: Common YANG Data Types";
  }

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }

  organization
    "IETF FANN -  Fast Network Notifications Working Group";
  contact
    "WG Web:   https://datatracker.ietf.org/wg/fantel/
     WG List:  fann@ietf.org

     Author:    Yingzhen Qu
                <mailto:yingzhen.ietf@gmail.com>
     Author:    Jeff Tantsura
                <mailto:jeff.ietf@gmail.com>     
     ";

  description
    "This YANG module defines fast notifications of fine-grained
     network status information. It structures real-time network
     condition data for dissemination to nodes and applications
     that perform traffic engineering, load balancing, flow control,
     and protection switching.

     Copyright (c) 2026 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 Revised 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).

     All revisions of IETF and IANA published modules can be found
     at the YANG Parameters registry group
     (https://www.iana.org/assignments/yang-parameters).

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

  revision 2026-07-05 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A YANG Data Model for Fast Network
       Notifications";
  }

  /*
   * Type definitions
   */

  typedef time-scale-type {
    type enumeration {
      enum microseconds {
        description
          "Time scale in microseconds.";
      }
      enum sub-millisecond {
        description
          "Time scale below one millisecond.";
      }
    }
    description
      "Granularity of the notification or condition in time.";
  }

  typedef notification-scope-type {
    type enumeration {
      enum link {
        description
          "Scope limited to a single link.";
      }
      enum path {
        description
          "Scope along a path.";
      }
      enum domain {
        description
          "Scope within a domain.";
      }
      enum subscribe {
        description
          "Scope based on subscription.";
      }
    }
    description
      "Scope of the fast network notification.";
  }

  typedef severity-level-type {
    type enumeration {
      enum low {
        description "Low severity.";
      }
      enum medium {
        description "Medium severity.";
      }
      enum high {
        description "High severity.";
      }
      enum critical {
        description "Critical severity.";
      }
    }
    description
      "Severity of the network condition.";
  }

  /*
   * Groupings
   */

  grouping network-location {
    description
      "Network location context for the notification or condition.";
    leaf domain-id {
      type string;
      description
        "Identifier of the domain.";
    }
    leaf node-id {
      type string;
      description
        "Node identifiers.";
    }
    leaf path-id {
      type string;
      description
        "Optional path identifier.";
    }
    leaf link-id {
      type string;
      description
        "Optional link identifier.";
    }
  }

  grouping recipient {
    container receivers {
      choice receiver {
        leaf link {
          type string;
          description
            "Uniquely identify the link where the notification
             will be sent to.";
        }
        leaf path {
          type string;
          description
            "Scope along a path.";
        }
        leaf domain {
          type empty;
          description
            "Scope within a domain.";
        }
        leaf-list subscribe-nodes {
          type inet:uri;
          description
            "List of recipient nodes based on subscription.";
        }
        description
          "Receivers of the fast network notification.";    
      }
      description
        "Notification receivers.";
    }
    description
      "Target recipient of the fast network notification.";
  }

  grouping link-congestion {
    description "Link congestion condition.";
    leaf link {
      type string;
      description "Identifier of the congested link.";
    }
    leaf utilization-level {
      type decimal64 {
        fraction-digits 2;
        range "0..100";
      }
      units "percent";
      description "Link utilization level.";
    }
    leaf congestion-threshold {
      type uint8 {
        range "0..100";
      }
      units "percent";
      description
        "A configured threshold. A notification should be
         generated when the threshold is exceeded.";
    }
  }

  grouping microburst {
    description "Microburst condition.";
    leaf duration {
      type yang:timeticks;
      description "Duration of the microburst.";
    }
    leaf intensity {
      type decimal64 {
        fraction-digits 4;
      }
      description "Intensity metric of the microburst.";
    }
    leaf affected-resource {
      type string;
      description "Identifier of the affected resource.";
    }
  }

  grouping sla-violation {
    description "SLA violation condition.";
    leaf sla-reference {
      type string;
      description "Reference to the SLA that was violated.";
    }
    leaf violated-metric {
      type string;
      description "Type of metric that was violated.";
    }
    leaf measured-value {
      type decimal64 {
        fraction-digits 4;
      }
      description "Measured value that caused the violation.";
    }
    leaf threshold {
      type decimal64 {
        fraction-digits 4;
      }
      description "Threshold that was exceeded.";
    }
  }

  grouping queue-build-up {
    description "Queue build-up condition.";
    leaf queue-id {
      type string;
      description "Identifier of the queue.";
    }
    leaf depth {
      type uint64;
      description "Current queue depth (e.g., bytes or packets).";
    }
    leaf queue-threshold {
      type uint8 {
        range "0..100";
      }
      units "percent";
      description
        "A configured threshold. A notification should be
         generated when the threshold is exceeded.";
    }
  }

  grouping local-impairment {
    description "Local impairment condition.";
    leaf impairment-type {
      type string;
      description "Type of local impairment.";
    }
    leaf description {
      type string;
      description "Human-readable description of the impairment.";
    }
    uses network-location;
  }

  grouping network-condition-status {
    description
      "Structured network condition data. One of the condition types
       must be present.";
    choice condition-type {
      mandatory true;
      description "Type of network condition.";
      case link-congestion {
        leaf link {
          type string;
          description "Identifier of the congested link.";
        }
        leaf utilization-level {
          type decimal64 {
            fraction-digits 2;
            range "0..100";
          }
          units "percent";
          description "Link utilization level.";
        }
      }
      case microburst {
        uses microburst;
      }
      case sla-violation {
        leaf sla-reference {
          type string;
          description "Reference to the SLA that was violated.";
        }
        leaf violated-metric {
          type string;
          description "Type of metric that was violated.";
        }
        leaf measured-value {
          type decimal64 {
            fraction-digits 4;
          }
          description "Measured value that caused the violation.";
        }
      }
      case queue-build-up {
        leaf queue-id {
          type string;
          description "Identifier of the queue.";
        }
        leaf depth {
          type uint64;
          description "Current queue depth (e.g., bytes or packets).";
        }
      }
      case local-impairment {
        uses local-impairment;
      }
    }
  }

  grouping fast-network-notification {
    description
      "Fast network notification: on-demand, fine-grained network
       status information for prompt actions by recipients.";
    leaf notification-id {
      type string;
      description "Unique identifier of the notification.";
    }
    leaf timestamp {
      type yang:date-and-time;
      mandatory true;
      description "Time when the notification was generated.";
    }
    leaf source-id {
      type inet:uri;
      description
        "Identifier for a node, uniquely identifies a node.";
    }
    uses recipient;

    container condition {
      uses network-condition-status;
      description "Network condition conveyed by this notification.";
    }
  }

  /*
   * Configuration and status
   */

  container fann {
    description
      "Top-level container for FANN configuration and state.";

    list fast-network-notification {
      key "notification-id";
      description "A fast network notification entry.";
      leaf notification-id {
        type string;
        description "Unique identifier of the notification.";
      }
      
      leaf source-id {
        type inet:uri;
        description
          "Identifier for a node, uniquely identifies a node.";
      }

      uses recipient;

      choice condition {
        mandatory true;
        description "Type of network condition.";
        case link-congestion {
          uses link-congestion;
        }
        case microburst {
          uses microburst;
        }
        case sla-violation {
          uses sla-violation;
        }
        case queue-build-up {
          uses queue-build-up;
        }
        case local-impairment {
          uses local-impairment;
        }
      }
    }
  }

  /*
   * notification
   */

  notification fast-network-notification-event {
    description
      "Fast network notification event for real-time dissemination
       of fine-grained network status.";
    uses fast-network-notification;
  }
}
]]></sourcecode>
    </section>

    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
  <t>
    This section is modeled after the template described in
<xref target="RFC9907" section="3.7.1" format="default" sectionFormat="of" derivedLink="https://rfc-editor.org/rfc/rfc9907#section-3.7.1" derivedContent="RFC9907"/>.
 </t>
  <t>
   The YANG modules defined in this document are
   designed to be accessed via YANG-based management protocols, such as
   NETCONF <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>.
   These protocols have to use a secure transport layer (e.g., SSH
   <xref target="RFC4252"/>, TLS <xref target="I-D.ietf-tls-rfc8446bis"/>, and
   QUIC <xref target="RFC9000"/>) and have to use mutual authentication.
  </t>
  <t>
    The Network Configuration Access Control Model (NACM) <xref target="RFC8341"/>
    provides the means to restrict access for particular NETCONF or
    RESTCONF users to a preconfigured subset of all available NETCONF or
    RESTCONF protocol operations and content.
 </t>

 <t>
   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., "config true", which is the
   default).  All writable data nodes are likely to be reasonably
   sensitive or vulnerable in some network environments.  Write
   operations (e.g., edit-config) and delete operations to these data
   nodes without proper protection or authentication can have a negative
   effect on network operations.  The following subtrees and data nodes
   have particular sensitivities/vulnerabilities:
 </t>
 <ul empty="true" spacing="normal">
   <li>
    /fann/fast-entwork-notifcation/receivers - Modification to the configuration
    of notification receivers can be used to mount a DoS attack. 
   </li>
   <li>
    /fann/ast-entwork-notifcation/condition - Modification to the configuration
    of notification conditions can be used to mount a DoS attack. 
   </li>
  </ul>
  <t>
    Some of the readable data nodes in the modules
    may be considered sensitive or vulnerable in some network environments. It is thus
    important to control read access (e.g., via get, get-config, or notification)
    to these data nodes. The exposure of the network conditions will
    expose the detailed operaton state of the network. This may be undesirable since
    exposure may facilitate other attacks.
  </t>
  <t>
    The notification defined in this document may reveal information about 
    network status.  Access to this notification SHOULD be restricted
    using NACM <xref target="RFC8341"/> to authorized management stations.
  </t>
  <t>
    The YANG modules defined in this document do not include any RPC or
    action operations. Hence, there are no security considerations associated
    with these YANG constructs.
  </t>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document registers two URIs in the IETF XML registry
        <xref target="RFC3688" format="default"/>.  Following the format in <xref target="RFC3688" format="default"/>,
        the following registrations are requested:
      </t>
<artwork align="left" name="" type="" alt=""><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-fann
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.

]]></artwork>
      <t>This document registers the YANG modules in the YANG Module Names
        registry <xref target="RFC7950" format="default"/>.
      </t>
<artwork align="left" name="" type="" alt=""><![CDATA[
   name: ietf-fann
   Maintained by IANA?  N
   namespace: urn:ietf:params:xml:ns:yang:ietf-fann
   prefix: fann
   reference: RFC XXXX
]]></artwork>
    </section>
    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
        TBD.
      </t>
    </section>
  </middle>

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references>
      <name>References</name>
    <references>
      <name>Normative References</name>
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
    </references>
    <references>
      <name>Informative References</name>
      <xi:include href='https://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-ietf-tls-rfc8446bis-14.xml'/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9907.xml"/>
    </references>
  </references>
  </back>
</rfc>
