<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="std" submissionType="IETF" number="8542" consensus="yes" obsoletes="" updates="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.22.1 -->
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  <front>
    <title abbrev="Data Model for DC Fabric Topology">A YANG Data Model for
    Fabric Topology in Data-Center Networks</title>
    <seriesInfo name="RFC" value="8542"/>
    <author fullname="Yan Zhuang" initials="Y." surname="Zhuang">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>zhuangyan.zhuang@huawei.com</email>
      </address>
    </author>
    <author fullname="Danian Shi" initials="D." surname="Shi">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>shidanian@huawei.com</email>
      </address>
    </author>
    <author fullname="Rong Gu" initials="R." surname="Gu">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>32 Xuanwumen West Ave, Xicheng District</street>
          <city>Beijing</city>
          <region>Beijing</region>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>gurong_cmcc@outlook.com</email>
      </address>
    </author>
    <author fullname="Hariharan Ananthakrishnan" initials="H." surname="Ananthakrishnan">
      <organization>Netflix</organization>
      <address>
        <email>hari@netflix.com</email>
      </address>
    </author>
    <date year="2019" month="March"/>
    <area>RTG Area</area>
    <workgroup>I2RS Working Group</workgroup>
    <keyword>YANG</keyword>
    <keyword>Fabric Topology</keyword>
    <keyword>Data-Center Networks</keyword>
    <abstract>
      <t>This document defines a YANG data model for fabric topology in
      data-center networks and represents one possible view of the data-center
      fabric. This document focuses on the data model only and does not
      endorse any kind of network design that could be based on the
      abovementioned model.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>A data-center (DC) network can be composed of single or multiple
      fabrics, which are also known as Points Of Delivery (PODs). These fabrics
      may be heterogeneous due to implementation of different technologies
      when a DC network is upgraded or new techniques and features are rolled
      out. For example, within a DC network, Fabric A may use Virtual eXtensible Local Area Network
      (VXLAN) while Fabric B may use VLAN. Likewise, an existing fabric may use VXLAN while a
      new fabric (for example, a fabric introduced for DC upgrade and
      expansion) may implement a technique discussed in the NVO3 Working Group, such as
      Geneve <xref target="GENEVE" format="default"/>. The configuration and management
      of such DC networks with heterogeneous fabrics could result in
      considerable complexity.</t>
      <t>For a DC network, a fabric can be considered as an atomic structure
      for management purposes. From this point of view, the management of the
      DC network can be decomposed into a set of tasks to manage each fabric
      separately, as well as the fabric interconnections. The advantage of
      this method is to make the overall management tasks flexible and easy to
      extend in the future.</t>
      <t>As a basis for DC fabric management, this document defines a YANG
      data model <xref target="RFC6020" format="default"/> <xref target="RFC7950" format="default"/> for a possible view of the fabric-based
      data-center topology. To do so, it augments the generic network and
      network topology data models defined in <xref target="RFC8345" format="default"/> with information that
      is specific to data-center fabric networks. </t>
      <t>The model defines the generic configuration and operational state for
      a fabric-based network topology, which can subsequently be extended by
      vendors with vendor-specific information as needed. The model can be
      used by a network controller to represent its view of the fabric
      topology that it controls and expose this view to network administrators
      or applications for DC network management. </t>
      <t>Within the context of topology architecture defined in <xref target="RFC8345" format="default"/>, this model can also be treated as an application of
      the Interface to the Routing System (I2RS) network topology model <xref target="RFC8345" format="default"/> in the scenario of data-center network
      management. It can also act as a service topology when mapping network
      elements at the fabric layer to elements of other topologies, such as
      L3 topologies as defined in <xref target="RFC8346" format="default"/>.</t>
      <t>By using the fabric topology model defined in this document, people
      can treat a fabric as a holistic entity and focus on its characteristics
      (such as encapsulation type and gateway type) as well as its
      connections to other fabrics, while putting the underlay topology
      aside. As such, clients can consume the topology information at the
      fabric level with no need to be aware of the entire set of links and
      nodes in the corresponding underlay networks. A fabric topology can be
      configured by a network administrator using the controller by adding
      physical devices and links into a fabric. Alternatively, fabric topology
      can be learned from the underlay network infrastructure.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Definitions and Acronyms</name>
      <section numbered="true" toc="default">
        <name>Key Words</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" format="default"/> <xref target="RFC8174" format="default"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Terminology</name>
        <t>POD: a module of network, compute, storage, and application components that work together to deliver networking services. It represents a repeatable design pattern. Its components maximize the modularity, scalability, and manageability of data centers.</t>
        <t>Fabric: composed of several PODs to form a data-center network.
        </t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Model Overview</name>
      <t>This section provides an overview of the DC fabric
	topology model and its relationship with other topology models.</t>
      <section numbered="true" toc="default">
        <name>Topology Model Structure</name>
        <t>The relationship of the DC fabric topology model and other topology
	models is shown in <xref target="net-data-model" format="default"/>.</t>
        <figure anchor="net-data-model">
          <name>The Network Data Model Structure</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
          +------------------------+
          |      network model     |
          +------------------------+
                       |
                       |
          +------------V-----------+
          | network topology model |
          +------------------------+
                       |
     +-----------+-----+------+-------------+
     |           |            |             |
 +---V----+  +---V----+   +---V----+   +----V---+
 |   L1   |  |   L2   |   |   L3   |   | Fabric |
 |topology|  |topology|   |topology|   |topology|
 |  model |  |  model |   |  model |   |  model |
 +--------+  +--------+   +--------+   +--------+
          ]]></artwork>
        </figure>
        <t>From the perspective of resource management and service
	provisioning for a data-center network, the fabric topology model
	augments the basic network topology model with definitions and
	features specific to a DC fabric, to provide common configuration and
	operations for heterogeneous fabrics.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Fabric Topology Model</name>
        <t>The fabric topology model module is designed to be generic and can
	be applied to data-center fabrics built with different technologies,
	such as VLAN and VXLAN. The main purpose of this module is to configure
	and manage fabrics and their connections. It provides a fabric-based
	topology view for data-center applications.
</t>
        <section numbered="true" toc="default">
          <name>Fabric Topology</name>
          <t>In the fabric topology module, a fabric is modeled as a node of a
	network; as such, the fabric-based data-center network consists of a
	set of fabric nodes and their connections. The following depicts a
	snippet of the definitions to show the main structure of the
	model. The notation syntax follows <xref target="RFC8340" format="default"/>.</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    module: ietf-dc-fabric-topology
    augment /nw:networks/nw:network/nw:network-types:
       +--rw fabric-network!
    augment /nw:networks/nw:network/nw:node:
       +--rw fabric-attributes
          +--rw fabric-id?   fabric-id
          +--rw name?        string
          +--rw type?        fabrictype:underlay-network-type
          +--rw description?    string
          +--rw options
          +--...
    augment /nw:networks/nw:network/nw:node/nt:termination-point:
       +--ro fport-attributes
          +--ro name?          string
          +--ro role?          fabric-port-role
          +--ro type?          fabric-port-type
]]></artwork>
          <t>The fabric topology module augments the generic ietf-network and
	ietf-network-topology modules as follows:</t>
          <ul spacing="normal">
            <li>A new topology type, "ietf-dc-fabric-topology", is defined and
	    added under the "network-types" container of the ietf-network
	    module.</li>
            <li>Fabric is defined as a node under the network/node container. A
	    new container, "fabric-attributes", is defined to carry attributes
	    for a fabric such as gateway mode, fabric types, involved device
	    nodes, and links.</li>
            <li>Termination points (in the network topology module) are augmented
	    with fabric port attributes defined in a container. The
	    "termination-point" here is used to represent a fabric "port" that
	    provides connections to other nodes, such as an internal device,
	    another fabric externally, or end hosts. </li>
          </ul>
          <t>Details of the fabric node and the fabric termination point
	extension will be explained in the following sections.</t>
        </section>
        <section numbered="true" toc="default">
          <name>Fabric Node Extension</name>
          <t>As an atomic network (that is, a set of nodes and links that
	composes a POD and also supports a single overlay/underlay instance),
	a fabric itself is composed of a set of network elements, i.e., devices
	and related links.  The configuration of a fabric is contained under
	the "fabric-attributes" container depicted as follows. The notation
	syntax follows <xref target="RFC8340" format="default"/>.</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    +--rw fabric-attributes
       +--rw fabric-id?      fabrictypes:fabric-id
       +--rw name?           string
       +--rw type?           fabrictype:underlay-network-type
       +--rw vni-capacity
       |  +--rw min?   int32
       |  +--rw max?   int32
       +--rw description?    string
       +--rw options
       |  +--rw gateway-mode?           enumeration
       |  +--rw traffic-behavior?       enumeration
       |  +--rw capability-supported* fabrictype:service-capabilities
       +--rw device-nodes* [device-ref]
       |  +--rw device-ref    fabrictype:node-ref
       |  +--rw role*?         fabrictype:device-role
       +--rw device-links* [link-ref]
       |  +--rw link-ref    fabrictype:link-ref
       +--rw device-ports* [port-ref]
          +--rw port-ref     fabrictype:tp-ref
          +--rw port-type?   fabrictypes:port-type
          +--rw bandwidth?   fabrictypes:bandwidth
    
        ]]></artwork>
          <t>In the module, additional data objects for fabric nodes are
	introduced by augmenting the "node" list of the network module. New
	objects include fabric name, type of the fabric, and descriptions of the
	fabric, as well as a set of options defined in an "options"
	container. The "options" container includes the gateway-mode type
	(centralized or distributed) and traffic behavior (whether an Access
	Control List (ACL) is needed for the traffic). Also, it includes a
	list of device nodes and related links as "supporting-node" to form a
	fabric network. These device nodes and links are represented as
	leaf-refs of existing nodes and links in the underlay topology. For
	the device node, the "role" object is defined to represent the role of
	a device within the fabric, such as "SPINE" or "LEAF", which should
	work together with the gateway-mode.</t>
        </section>
        <section numbered="true" toc="default">
          <name>Fabric Termination-Point Extension</name>
          <t>Since a fabric can be considered as a node, "termination-points"
	can represent fabric "ports" that connect to other fabrics and end hosts,
	as well as devices inside the fabric.</t>
          <t>As such, the set of "termination-points" of a fabric indicate all
	of its connections, including its internal connections,
	interconnections with other fabrics, and connections to end hosts.</t>
          <t>The structure of fabric ports is as follows. The notation syntax
	follows <xref target="RFC8340" format="default"/>.</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    augment /nw:networks/nw:network/nw:node/nt:termination-point:
        +--ro fport-attributes
           +--ro name?          string
           +--ro role?          fabric-port-role
           +--ro type?          fabric-port-type
           +--ro device-port?   tp-ref
           +--ro (tunnel-option)?
        ]]></artwork>
          <t>This structure augments the termination points (in the network topology module)
	with fabric port attributes defined in a container.</t>
          <t>New nodes are defined for fabric ports, including fabric name, role
	of the port within the fabric (internal port, external port to outside
	network, access port to end hosts), and port type (L2 interface, L3
	interface). By defining the device port as a tp-ref, a fabric port can
	be mapped to a device node in the underlay network.</t>
          <t>Additionally, a new container for tunnel-options is introduced to present
	the tunnel configuration on a port.</t>
          <t>The termination point information is learned from the underlay
	networks, not configured by the fabric topology layer.</t>
        </section>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Fabric YANG Modules</name>
      <t>This module imports typedefs from <xref target="RFC8345" format="default"/>, and it
    references <xref target="RFC7348" format="default"/> and <xref target="RFC8344" format="default"/>.</t>
      <sourcecode name="ietf-dc-fabric-types@2019-02-25.yang" type="" markers="true"><![CDATA[
module ietf-dc-fabric-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types";
  prefix fabrictypes;

  import ietf-network {
    prefix nw;
    reference
      "RFC 8345: A YANG Data Model for Network Topologies";
  }

  organization
    "IETF I2RS (Interface to the Routing System) Working Group";
  contact
    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
     WG List:   <mailto:i2rs@ietf.org>

     Editor:    Yan Zhuang
                <mailto:zhuangyan.zhuang@huawei.com>

     Editor:    Danian Shi
                <mailto:shidanian@huawei.com>";
  description
    "This module contains a collection of YANG definitions for
     fabric.

     Copyright (c) 2019 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 8542;
     see the RFC itself for full legal notices.";

  revision 2019-02-25 {
    description
      "Initial revision.";
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology
       in Data-Center Networks";
  }

  identity fabric-type {
    description
      "Base type for fabric networks";
  }

  identity vxlan-fabric {
    base fabric-type;
    description
      "VXLAN fabric";
  }

  identity vlan-fabric {
    base fabric-type;
    description
      "VLAN fabric";
  }

  identity trill-fabric {
    base fabric-type;
    description
      "TRILL fabric";
  }

  identity port-type {
    description
      "Base type for fabric port";
  }

  identity eth {
    base port-type;
    description
      "Ethernet";
  }

  identity serial {
    base port-type;
    description
      "Serial";
  }

  identity bandwidth {
    description
      "Base for bandwidth";
  }

  identity bw-1M {
    base bandwidth;
    description
      "1M";
  }

  identity bw-10M {
    base bandwidth;
    description
      "10Mbps";
  }

  identity bw-100M {
    base bandwidth;
    description
      "100Mbps";
  }

  identity bw-1G {
    base bandwidth;
    description
      "1Gbps";
  }

  identity bw-10G {
    base bandwidth;
    description
      "10Gbps";
  }

  identity bw-25G {
    base bandwidth;
    description
      "25Gbps";
  }

  identity bw-40G {
    base bandwidth;
    description
      "40Gbps";
  }

  identity bw-100G {
    base bandwidth;
    description
      "100Gbps";
  }

  identity bw-400G {
    base bandwidth;
    description
      "400Gbps";
  }

  identity device-role {
    description
      "Base for the device role in a fabric.";
  }

  identity spine {
    base device-role;
    description
      "This is a spine node in a fabric.";
  }

  identity leaf {
    base device-role;
    description
      "This is a leaf node in a fabric.";
  }

  identity border {
    base device-role;
    description
      "This is a border node to connect to other
       fabric/network.";
  }

  identity fabric-port-role {
    description
      "Base for the port's role in a fabric.";
  }

  identity internal {
    base fabric-port-role;
    description
      "The port is used for devices to access each
       other within a fabric.";
  }

  identity external {
    base fabric-port-role;
    description
      "The port is used for a fabric to connect to
       outside network.";
  }

  identity access {
    base fabric-port-role;
    description
      "The port is used for an endpoint to connect
       to a fabric.";
  }

  identity service-capability {
    description
      "Base for the service of the fabric ";
  }

  identity ip-mapping {
    base service-capability;
    description
      "NAT.";
  }

  identity acl-redirect {
    base service-capability;
    description
      "ACL redirect, which can provide a Service Function Chain (SFC).";
  }

  identity dynamic-route-exchange {
    base service-capability;
    description
      "Dynamic route exchange.";
  }

  /*
   * Typedefs
   */

  typedef fabric-id {
    type nw:node-id;
    description
      "An identifier for a fabric in a topology.
       This identifier can be generated when composing a fabric.
       The composition of a fabric can be achieved by defining an
       RPC, which is left for vendor specific implementation
       and not provided in this model.";
  }

  typedef service-capabilities {
    type identityref {
      base service-capability;
    }
    description
      "Service capability of the fabric";
  }

  typedef port-type {
    type identityref {
      base port-type;
    }
    description
      "Port type: ethernet or serial or others.";
  }

  typedef bandwidth {
    type identityref {
      base bandwidth;
    }
    description
      "Bandwidth of the port.";
  }

  typedef node-ref {
    type instance-identifier;
    description
      "A reference to a node in topology";
  }

  typedef tp-ref {
    type instance-identifier;
    description
      "A reference to a termination point in topology";
  }

  typedef link-ref {
    type instance-identifier;
    description
      "A reference to a link in topology";
  }

  typedef underlay-network-type {
    type identityref {
      base fabric-type;
    }
    description
      "The type of physical network that implements
       this fabric.  Examples are VLAN and TRILL.";
  }

  typedef device-role {
    type identityref {
      base device-role;
    }
    description
      "Role of the device node.";
  }

  typedef fabric-port-role {
    type identityref {
      base fabric-port-role;
    }
    description
      "Role of the port in a fabric.";
  }

  typedef fabric-port-type {
    type enumeration {
      enum layer2interface {
        description
          "L2 interface";
      }
      enum layer3interface {
        description
          "L3 interface";
      }
      enum layer2Tunnel {
        description
          "L2 tunnel";
      }
      enum layer3Tunnel {
        description
          "L3 tunnel";
      }
    }
    description
      "Fabric port type";
  }

  grouping fabric-port {
    description
      "Attributes of a fabric port.";
    leaf name {
      type string;
      description
        "Name of the port.";
    }
    leaf role {
      type fabric-port-role;
      description
        "Role of the port in a fabric.";
    }
    leaf type {
      type fabric-port-type;
      description
        "Type of the port";
    }
    leaf device-port {
      type tp-ref;
      description
        "The device port it mapped to.";
    }
    choice tunnel-option {
      description
        "Tunnel options to connect two fabrics.
         It could be L2 Tunnel or L3 Tunnel.";
    }
  }
}

]]></sourcecode>
      <sourcecode name="ietf-dc-fabric-topology@2019-02-25.yang" type="" markers="true"><![CDATA[
module ietf-dc-fabric-topology {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology";
  prefix fabric;

  import ietf-network {
    prefix nw;
    reference
      "RFC 8345: A YANG Data Model for Network Topologies";
  }
  import ietf-network-topology {
    prefix nt;
    reference
      "RFC 8345: A YANG Data Model for Network Topologies";
  }
  import ietf-dc-fabric-types {
    prefix fabrictypes;
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology in
       Data-Center Networks";
  }

  organization
    "IETF I2RS (Interface to the Routing System) Working Group";
  contact
    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
     WG List:   <mailto:i2rs@ietf.org>

     Editor:    Yan Zhuang
                <mailto:zhuangyan.zhuang@huawei.com>

     Editor:    Danian Shi
                <mailto:shidanian@huawei.com>";
  description
    "This module contains a collection of YANG definitions for
     fabric.

     Copyright (c) 2019 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 8542;
     see the RFC itself for full legal notices.";

  revision 2019-02-25 {
    description
      "Initial revision.";
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology
       in Data-Center Networks";
  }

  //grouping statements

  grouping fabric-network-type {
    description
      "Identify the topology type to be fabric.";
    container fabric-network {
      presence "indicates fabric Network";
      description
        "The presence of the container node indicates
         fabric topology";
    }
  }

  grouping fabric-options {
    description
      "Options for a fabric";
    leaf gateway-mode {
      type enumeration {
        enum centralized {
          description
            "The Fabric uses centralized
             gateway, in which gateway is deployed on SPINE
             node.";
        }
        enum distributed {
          description
            "The Fabric uses distributed
             gateway, in which gateway is deployed on LEAF
             node.";
        }
      }
      default "distributed";
      description
        "Gateway mode of the fabric";
    }
    leaf traffic-behavior {
      type enumeration {
        enum normal {
          description
            "Normal means no policy is needed
             for all traffic";
        }
        enum policy-driven {
          description
            "Policy driven means policy is
             needed for the traffic; otherwise, the traffic
             will be discarded.";
        }
      }
      default "normal";
      description
        "Traffic behavior of the fabric";
    }
    leaf-list capability-supported {
      type fabrictypes:service-capabilities;
      description
        "It provides a list of supported services of the
         fabric.  The service-capabilities is defined as
         identity-ref.  Users can define more services
         by defining new identities.";
    }
  }

  grouping device-attributes {
    description
      "device attributes";
    leaf device-ref {
      type fabrictypes:node-ref;
      description
        "The device that the fabric includes that refers
         to a node in another topology.";
    }
    leaf-list role {
      type fabrictypes:device-role;
      default "fabrictypes:leaf";
      description
        "It is a list of device roles to represent the roles
         that a device plays within a POD, such as SPINE,
         LEAF, Border, or Border-Leaf.
         The device role is defined as identity-ref.  If more
         than 2 stages are used for a POD, users can
         define new identities for the device role.";
    }
  }

  grouping link-attributes {
    description
      "Link attributes";
    leaf link-ref {
      type fabrictypes:link-ref;
      description
        "The link that the fabric includes that refers to
         a link in another topology.";
    }
  }

  grouping port-attributes {
    description
      "Port attributes";
    leaf port-ref {
      type fabrictypes:tp-ref;
      description
        "The port that the fabric includes that refers to
         a termination-point in another topology.";
    }
    leaf port-type {
      type fabrictypes:port-type;
      description
        "Port type is defined as identity-ref.  The current
         types include ethernet or serial.  If more types
         are needed, developers can define new identities.";
    }
    leaf bandwidth {
      type fabrictypes:bandwidth;
      description
        "Bandwidth of the port.  It is defined as identity-ref.
         If more speeds are introduced, developers can define
         new identities for them.  Current speeds include 1M, 10M,
         100M, 1G, 10G, 25G, 40G, 100G, and 400G.";
    }
  }

  grouping fabric-attributes {
    description
      "Attributes of a fabric";
    leaf fabric-id {
      type fabrictypes:fabric-id;
      description
        "An identifier for a fabric in a topology.
         This identifier can be generated when composing a fabric.
         The composition of a fabric can be achieved by defining an
         RPC, which is left for vendor-specific implementation and
         not provided in this model.";
    }
    leaf name {
      type string;
      description
        "Name of the fabric";
    }
    leaf type {
      type fabrictypes:underlay-network-type;
      description
        "The type of physical network that implements this
         fabric.  Examples are VLAN and TRILL.";
    }
    container vni-capacity {
      description
        "The range of the VXLAN Network Identifier
         (VNI) defined in RFC 7348 that the POD uses.";
      leaf min {
        type int32;
        description
          "The lower-limit VNI.";
      }
      leaf max {
        type int32;
        description
          "The upper-limit VNI.";
      }
    }
    leaf description {
      type string;
      description
        "Description of the fabric";
    }
    container options {
      description
        "Options of the fabric";
      uses fabric-options;
    }
    list device-nodes {
      key "device-ref";
      description
        "Device nodes that are included in a fabric.";
      uses device-attributes;
    }
    list device-links {
      key "link-ref";
      description
        "Links that are included within a fabric.";
      uses link-attributes;
    }
    list device-ports {
      key "port-ref";
      description
        "Ports that are included in the fabric.";
      uses port-attributes;
    }
  }

  // augment statements

  augment "/nw:networks/nw:network/nw:network-types" {
    description
      "Introduce a new network type for fabric-based topology";
    uses fabric-network-type;
  }

  augment "/nw:networks/nw:network/nw:node" {
    when '/nw:networks/nw:network/nw:network-types/'
       + 'fabric:fabric-network' {
      description
        "Augmentation parameters apply only for networks
         with fabric topology";
    }
    description
      "Augmentation for fabric nodes created by
       fabric topology.";
    container fabric-attributes {
      description
        "Attributes for a fabric network";
      uses fabric-attributes;
    }
  }

  augment "/nw:networks/nw:network/nw:node/nt:termination-point" {
    when '/nw:networks/nw:network/nw:network-types/'
       + 'fabric:fabric-network' {
      description
        "Augmentation parameters apply only for networks
         with fabric topology";
    }
    description
      "Augmentation for port on fabric.";
    container fport-attributes {
      config false;
      description
        "Attributes for fabric ports";
      uses fabrictypes:fabric-port;
    }
  }
}
]]></sourcecode>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document registers the following namespace URIs in the "IETF XML
Registry" <xref target="RFC3688" format="default"/>:</t>
      <t>URI:urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types</t>
      <t>Registrant Contact: The IESG.</t>
      <t>XML: N/A; the requested URI is an XML namespace.</t>
      <t> URI:urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology</t>
      <t>Registrant Contact: The IESG.</t>
      <t>XML: N/A; the requested URI is an XML namespace.
</t>
      <t> URI:urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state</t>
      <t>Registrant Contact: The IESG.</t>
      <t>XML: N/A; the requested URI is an XML namespace.</t>
      <t>This document registers the following YANG modules in the "YANG
Module Names" registry <xref target="RFC6020" format="default"/>:
</t>
      <t>Name: ietf-dc-fabric-types</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types</t>
      <t>Prefix: fabrictypes</t>
      <t>Reference: RFC 8542
</t>
      <t>Name: ietf-dc-fabric-topology</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology</t>
      <t>Prefix: fabric</t>
      <t>Reference: RFC 8542
</t>
      <t>Name: ietf-dc-fabric-topology-state</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state</t>
      <t>Prefix: sfabric</t>
      <t>Reference: RFC 8542
</t>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The YANG module defined in this document is designed to be accessed
	via network management protocols such as NETCONF <xref target="RFC6241" format="default"/> or RESTCONF <xref target="RFC8040" format="default"/>. The lowest
	NETCONF layer is the secure transport layer, and
	the mandatory-to-implement secure transport is Secure Shell (SSH)
	<xref target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS, and the
	mandatory-to-implement secure transport is TLS <xref target="RFC8446" format="default"/>.</t>
      <t>The Network Configuration Access Control Model (NACM) <xref target="RFC8341" format="default"/> 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). These
 data nodes may be considered sensitive or vulnerable in some network
 environments. Write operations (e.g., edit-config) to these data nodes
 without proper protection can have a negative effect on network
 operations. The subtrees and data nodes and their sensitivity/vulnerability
 in the ietf-dc-fabric-topology module are as follows:</t>
      <t>fabric-attributes: A malicious client could attempt to sabotage the
	configuration of important fabric attributes, such as device nodes or
	type.</t>
      <t>Some of the readable data nodes in this YANG module may be
	considered sensitive or vulnerable in some network environments. It is
	thus important to control read access (e.g., via get, get-config, or
	notification) to these data nodes. The subtrees and data nodes and
	their sensitivity/vulnerability in the ietf-dc-fabric-topology module
	are as follows:</t>
      <t>fport-attributes: A malicious client could attempt to read the
	connections of fabrics without permission, such as device-port and
	name.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688">
          <front>
            <title>The IETF XML Registry</title>
            <seriesInfo name="DOI" value="10.17487/RFC3688"/>
            <seriesInfo name="RFC" value="3688"/>
            <seriesInfo name="BCP" value="81"/>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6020"/>
            <seriesInfo name="RFC" value="6020"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2010" month="October"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6241"/>
            <seriesInfo name="RFC" value="6241"/>
            <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6242" target="https://www.rfc-editor.org/info/rfc6242">
          <front>
            <title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6242"/>
            <seriesInfo name="RFC" value="6242"/>
            <author initials="M." surname="Wasserman" fullname="M. Wasserman">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>This document describes a method for invoking and running the Network Configuration Protocol (NETCONF) within a Secure Shell (SSH) session as an SSH subsystem.  This document obsoletes RFC 4742.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <seriesInfo name="DOI" value="10.17487/RFC7950"/>
            <seriesInfo name="RFC" value="7950"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040">
          <front>
            <title>RESTCONF Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC8040"/>
            <seriesInfo name="RFC" value="8040"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2017" month="January"/>
            <abstract>
              <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341">
          <front>
            <title>Network Configuration Access Control Model</title>
            <seriesInfo name="DOI" value="10.17487/RFC8341"/>
            <seriesInfo name="RFC" value="8341"/>
            <seriesInfo name="STD" value="91"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.  This document defines such an access control model.</t>
              <t>This document obsoletes RFC 6536.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <seriesInfo name="DOI" value="10.17487/RFC8342"/>
            <seriesInfo name="RFC" value="8342"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder">
              <organization/>
            </author>
            <author initials="P." surname="Shafer" fullname="P. Shafer">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <author initials="R." surname="Wilton" fullname="R. Wilton">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8345" target="https://www.rfc-editor.org/info/rfc8345">
          <front>
            <title>A YANG Data Model for Network Topologies</title>
            <seriesInfo name="DOI" value="10.17487/RFC8345"/>
            <seriesInfo name="RFC" value="8345"/>
            <author initials="A." surname="Clemm" fullname="A. Clemm">
              <organization/>
            </author>
            <author initials="J." surname="Medved" fullname="J. Medved">
              <organization/>
            </author>
            <author initials="R." surname="Varga" fullname="R. Varga">
              <organization/>
            </author>
            <author initials="N." surname="Bahadur" fullname="N. Bahadur">
              <organization/>
            </author>
            <author initials="H." surname="Ananthakrishnan" fullname="H. Ananthakrishnan">
              <organization/>
            </author>
            <author initials="X." surname="Liu" fullname="X. Liu">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines an abstract (generic, or base) YANG data model for network/service topologies and inventories.  The data model serves as a base model that is augmented with technology-specific details in other, more specific topology and inventory data models.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8346" target="https://www.rfc-editor.org/info/rfc8346">
          <front>
            <title>A YANG Data Model for Layer 3 Topologies</title>
            <seriesInfo name="DOI" value="10.17487/RFC8346"/>
            <seriesInfo name="RFC" value="8346"/>
            <author initials="A." surname="Clemm" fullname="A. Clemm">
              <organization/>
            </author>
            <author initials="J." surname="Medved" fullname="J. Medved">
              <organization/>
            </author>
            <author initials="R." surname="Varga" fullname="R. Varga">
              <organization/>
            </author>
            <author initials="X." surname="Liu" fullname="X. Liu">
              <organization/>
            </author>
            <author initials="H." surname="Ananthakrishnan" fullname="H. Ananthakrishnan">
              <organization/>
            </author>
            <author initials="N." surname="Bahadur" fullname="N. Bahadur">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines a YANG data model for Layer 3 network topologies.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <seriesInfo name="DOI" value="10.17487/RFC8446"/>
            <seriesInfo name="RFC" value="8446"/>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol.  TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961.  This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <!-- draft-ietf-nvo3-geneve exists  -->
        <reference anchor="GENEVE">
          <front>
            <title>Geneve: Generic Network Virtualization Encapsulation</title>
            <seriesInfo name="Work in Progress," value="draft-ietf-nvo3-geneve-12"/>
            <author initials="J" surname="Gross" fullname="Jesse Gross">
              <organization/>
            </author>
            <author initials="I" surname="Ganga" fullname="Ilango Ganga">
              <organization/>
            </author>
            <author initials="T" surname="Sridhar" fullname="T. Sridhar">
              <organization/>
            </author>
            <date month="March" day="11" year="2019"/>
          </front>
        </reference>
        <reference anchor="RFC7348" target="https://www.rfc-editor.org/info/rfc7348">
          <front>
            <title>Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks</title>
            <seriesInfo name="DOI" value="10.17487/RFC7348"/>
            <seriesInfo name="RFC" value="7348"/>
            <author initials="M." surname="Mahalingam" fullname="M. Mahalingam">
              <organization/>
            </author>
            <author initials="D." surname="Dutt" fullname="D. Dutt">
              <organization/>
            </author>
            <author initials="K." surname="Duda" fullname="K. Duda">
              <organization/>
            </author>
            <author initials="P." surname="Agarwal" fullname="P. Agarwal">
              <organization/>
            </author>
            <author initials="L." surname="Kreeger" fullname="L. Kreeger">
              <organization/>
            </author>
            <author initials="T." surname="Sridhar" fullname="T. Sridhar">
              <organization/>
            </author>
            <author initials="M." surname="Bursell" fullname="M. Bursell">
              <organization/>
            </author>
            <author initials="C." surname="Wright" fullname="C. Wright">
              <organization/>
            </author>
            <date year="2014" month="August"/>
            <abstract>
              <t>This document describes Virtual eXtensible Local Area Network (VXLAN), which is used to address the need for overlay networks within virtualized data centers accommodating multiple tenants.  The scheme and the related protocols can be used in networks for cloud service providers and enterprise data centers.  This memo documents the deployed VXLAN protocol for the benefit of the Internet community.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <seriesInfo name="DOI" value="10.17487/RFC8340"/>
            <seriesInfo name="RFC" value="8340"/>
            <seriesInfo name="BCP" value="215"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="L." surname="Berger" fullname="L. Berger" role="editor">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8344" target="https://www.rfc-editor.org/info/rfc8344">
          <front>
            <title>A YANG Data Model for IP Management</title>
            <seriesInfo name="DOI" value="10.17487/RFC8344"/>
            <seriesInfo name="RFC" value="8344"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document defines a YANG data model for management of IP implementations.  The data model includes configuration and system state.</t>
              <t>The YANG data model in this document conforms to the Network Management Datastore Architecture defined in RFC 8342.</t>
              <t>This document obsoletes RFC 7277.</t>
            </abstract>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="appendix" numbered="true" toc="default">
      <name>Non-NMDA-State Modules</name>
      <t>The YANG module, ietf-dc-fabric-topology, defined in this document
    augments two modules, ietf-network and ietf-network-topology, that are
    designed to be used in conjunction with implementations that support the
    Network Management Datastore Architecture (NMDA) defined in <xref target="RFC8342" format="default"/>. In order to allow implementations to use the model
    even in cases when NMDA is not supported, a set of companion modules have
    been defined that represent a state model of networks and network
    topologies: ietf-network-state and ietf-network-topology-state,
    respectively. </t>
      <t>In order to be able to use the model for fabric topologies defined in
    this document in conjunction with non-NMDA-compliant
    implementations, a corresponding companion module needs to be introduced
    as well.  This companion module, ietf-dc-fabric-topology-state, mirrors
    ietf-dc-fabric-topology. However, the ietf-dc-fabric-topology-state module
    augments ietf-network-state
    (instead of ietf-network and ietf-network-topology), and all of its data
    nodes are non-configurable.</t>
      <t>Like ietf-network-state and ietf-network-topology-state,
   ietf-dc-fabric-topology-state SHOULD NOT be supported by implementations
   that support NMDA. It is for this reason that the module is defined in the
   Appendix.</t>
      <t>The definition of the module follows.  As the structure of the
   module mirrors that of its underlying module, the YANG tree is not
   depicted separately.</t>
      <sourcecode name="ietf-dc-fabric-topology-state@2019-02-25.yang" type="" markers="true"><![CDATA[
module ietf-dc-fabric-topology-state {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state";
  prefix sfabric;

  import ietf-network-state {
    prefix nws;
    reference
      "RFC 8345: A Data Model for Network Topologies";
  }
  import ietf-dc-fabric-types {
    prefix fabrictypes;
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology in
       Data-Center Networks";
  }

  organization
    "IETF I2RS (Interface to the Routing System) Working Group";
  contact
    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
     WG List:   <mailto:i2rs@ietf.org>

     Editor:    Yan Zhuang
                <mailto:zhuangyan.zhuang@huawei.com>

     Editor:    Danian Shi
                <mailto:shidanian@huawei.com>";
  description
    "This module contains a collection of YANG definitions for
     fabric state, representing topology that either is learned
     or results from applying topology that has been
     configured per the ietf-dc-fabric-topology model, mirroring
     the corresponding data nodes in this model.

     This model mirrors the configuration tree of ietf-dc-fabric
     -topology but contains only read-only state data.  The model
     is not needed when the implementation infrastructure supports
     the Network Management Datastore Architecture (NMDA).

     Copyright (c) 2019 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 8542;
     see the RFC itself for full legal notices.";

  revision 2019-02-25 {
    description
      "Initial revision.";
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology in
       Data-Center Networks";
  }

  //grouping statements

  grouping fabric-network-type {
    description
      "Identify the topology type to be fabric.";
    container fabric-network {
      presence "indicates fabric Network";
      description
        "The presence of the container node indicates
         fabric topology";
    }
  }

  grouping fabric-options {
    description
      "Options for a fabric";
    leaf gateway-mode {
      type enumeration {
        enum centralized {
          description
            "The fabric uses centralized
             gateway, in which gateway is deployed on SPINE
             node.";
        }
        enum distributed {
          description
            "The fabric uses distributed
             gateway, in which gateway is deployed on LEAF
             node.";
        }
      }
      default "distributed";
      description
        "Gateway mode of the fabric";
    }
    leaf traffic-behavior {
      type enumeration {
        enum normal {
          description
            "Normal means no policy is needed
             for all traffic";
        }
        enum policy-driven {
          description
            "Policy driven means policy is
             needed for the traffic; otherwise, the traffic
             will be discarded.";
        }
      }
      default "normal";
      description
        "Traffic behavior of the fabric";
    }
    leaf-list capability-supported {
      type fabrictypes:service-capabilities;
      description
        "It provides a list of supported services of the
         fabric.  The service-capabilities is defined as
         identity-ref.  Users can define more services
         by defining new identities.";
    }
  }

  grouping device-attributes {
    description
      "device attributes";
    leaf device-ref {
      type fabrictypes:node-ref;
      description
        "The device that the fabric includes that refers
         to a node in another topology.";
    }
    leaf-list role {
      type fabrictypes:device-role;
      default "fabrictypes:leaf";
      description
        "It is a list of device roles to represent the roles
         that a device plays within a POD, such as SPINE,
         LEAF, Border, or Border-Leaf.
         The device role is defined as identity-ref.  If more
         than 2 stages are used for a POD, users can
         define new identities for the device role.";
    }
  }

  grouping link-attributes {
    description
      "Link attributes";
    leaf link-ref {
      type fabrictypes:link-ref;
      description
        "The link that the fabric includes that refers to
         a link in another topology.";
    }
  }

  grouping port-attributes {
    description
      "Port attributes";
    leaf port-ref {
      type fabrictypes:tp-ref;
      description
        "The port that the fabric includes that refers to
         a termination-point in another topology.";
    }
    leaf port-type {
      type fabrictypes:port-type;
      description
        "Port type is defined as identity-ref.  The current
         types include ethernet or serial.  If more types
         are needed, developers can define new identities.";
    }
    leaf bandwidth {
      type fabrictypes:bandwidth;
      description
        "Bandwidth of the port.  It is defined as
         identity-ref.  If more speeds are introduced,
         developers can define new identities for them.  Current
         speeds include 1M, 10M, 100M, 1G, 10G,
         25G, 40G, 100G, and 400G.";
    }
  }

  grouping fabric-attributes {
    description
      "Attributes of a fabric";
    leaf fabric-id {
      type fabrictypes:fabric-id;
      description
        "Fabric ID";
    }
    leaf name {
      type string;
      description
        "Name of the fabric";
    }
    leaf type {
      type fabrictypes:underlay-network-type;
      description
        "The type of physical network that implements this
         fabric.  Examples are VLAN and TRILL.";
    }
    container vni-capacity {
      description
        "The range of the VXLAN Network
         Identifier (VNI) defined in RFC 7348 that the POD uses.";
      leaf min {
        type int32;
        description
          "The lower-limit VNI.";
      }
      leaf max {
        type int32;
        description
          "The upper-limit VNI.";
      }
    }
    leaf description {
      type string;
      description
        "Description of the fabric";
    }
    container options {
      description
        "Options of the fabric";
      uses fabric-options;
    }
    list device-nodes {
      key "device-ref";
      description
        "Device nodes that are included in a fabric.";
      uses device-attributes;
    }
    list device-links {
      key "link-ref";
      description
        "Links that are included within a fabric.";
      uses link-attributes;
    }
    list device-ports {
      key "port-ref";
      description
        "Ports that are included in the fabric.";
      uses port-attributes;
    }
  }

  // augment statements

  augment "/nws:networks/nws:network/nws:network-types" {
    description
      "Introduce a new network type for fabric-based logical
       topology";
    uses fabric-network-type;
  }

  augment "/nws:networks/nws:network/nws:node" {
    when '/nws:networks/nws:network/nws:network-types'
       + '/sfabric:fabric-network' {
      description
        "Augmentation parameters apply only for
         networks with fabric topology.";
    }
    description
      "Augmentation for fabric nodes.";
    container fabric-attributes-state {
      description
        "Attributes for a fabric network";
      uses fabric-attributes;
    }
  }
}
]]></sourcecode>
    </section>
    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>We wish to acknowledge the helpful contributions, comments, and
 suggestions that were received from Alexander Clemm, Donald
 E. Eastlake 3rd, Xufeng Liu, Susan Hares, Wei Song, Luis
 M. Contreras, and Benoit Claise.</t>
    </section>
  </back>
</rfc>
