Internet Engineering Task Force (IETF)                         Y. Zhuang
Request for Comments: 8542                                        D. Shi
Category: Standards Track                                         Huawei
ISSN: 2070-1721                                                    R. Gu
                                                            China Mobile
                                                      H. Ananthakrishnan
                                                                 Netflix
                                                              March 2019
        
Internet Engineering Task Force (IETF)                         Y. Zhuang
Request for Comments: 8542                                        D. Shi
Category: Standards Track                                         Huawei
ISSN: 2070-1721                                                    R. Gu
                                                            China Mobile
                                                      H. Ananthakrishnan
                                                                 Netflix
                                                              March 2019
        

A YANG Data Model for Fabric Topology in Data-Center Networks

数据中心网络结构拓扑的YANG数据模型

Abstract

摘要

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.

本文档为数据中心网络中的结构拓扑定义了一个数据模型,并表示数据中心结构的一个可能视图。本文件仅关注数据模型,不支持基于上述模型的任何类型的网络设计。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8542.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问https://www.rfc-editor.org/info/rfc8542.

Copyright Notice

版权公告

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

版权(c)2019 IETF信托基金和被确定为文件作者的人员。版权所有。

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

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(https://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Definitions and Acronyms  . . . . . . . . . . . . . . . . . .   3
     2.1.  Key Words . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Model Overview  . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Topology Model Structure  . . . . . . . . . . . . . . . .   4
     3.2.  Fabric Topology Model . . . . . . . . . . . . . . . . . .   4
       3.2.1.  Fabric Topology . . . . . . . . . . . . . . . . . . .   5
       3.2.2.  Fabric Node Extension . . . . . . . . . . . . . . . .   6
       3.2.3.  Fabric Termination-Point Extension  . . . . . . . . .   7
   4.  Fabric YANG Modules . . . . . . . . . . . . . . . . . . . . .   8
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  21
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  22
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  23
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  23
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  24
   Appendix A.  Non-NMDA-State Modules . . . . . . . . . . . . . . .  25
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  32
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  32
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Definitions and Acronyms  . . . . . . . . . . . . . . . . . .   3
     2.1.  Key Words . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Model Overview  . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Topology Model Structure  . . . . . . . . . . . . . . . .   4
     3.2.  Fabric Topology Model . . . . . . . . . . . . . . . . . .   4
       3.2.1.  Fabric Topology . . . . . . . . . . . . . . . . . . .   5
       3.2.2.  Fabric Node Extension . . . . . . . . . . . . . . . .   6
       3.2.3.  Fabric Termination-Point Extension  . . . . . . . . .   7
   4.  Fabric YANG Modules . . . . . . . . . . . . . . . . . . . . .   8
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  21
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  22
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  23
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  23
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  24
   Appendix A.  Non-NMDA-State Modules . . . . . . . . . . . . . . .  25
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  32
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  32
        
1. Introduction
1. 介绍

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 [GENEVE]. The configuration and management of such DC networks with heterogeneous fabrics could result in considerable complexity.

数据中心(DC)网络可以由单个或多个结构组成,这些结构也称为交付点(PODs)。由于DC网络升级或推出新技术和功能时采用了不同的技术,这些结构可能是异构的。例如,在DC网络中,结构a可以使用虚拟可扩展局域网(VXLAN),而结构B可以使用VLAN。同样,现有结构可以使用VXLAN,而新结构(例如,为DC升级和扩展引入的结构)可以实现NVO3工作组中讨论的技术,例如Geneve[Geneve]。这种具有异构结构的DC网络的配置和管理可能会导致相当大的复杂性。

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.

对于DC网络,可以将结构视为用于管理目的的原子结构。从这个角度来看,DC网络的管理可以分解为一组任务,分别管理每个结构以及结构互连。这种方法的优点是使总体管理任务具有灵活性,并且在将来易于扩展。

As a basis for DC fabric management, this document defines a YANG data model [RFC6020] [RFC7950] for a possible view of the fabric-based data-center topology. To do so, it augments the generic

作为DC结构管理的基础,本文档为基于结构的数据中心拓扑的可能视图定义了一个数据模型[RFC6020][RFC7950]。为此,它增加了通用的

network and network topology data models defined in [RFC8345] with information that is specific to data-center fabric networks.

[RFC8345]中定义的网络和网络拓扑数据模型,以及特定于数据中心结构网络的信息。

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.

该模型定义了基于结构的网络拓扑的通用配置和操作状态,供应商随后可以根据需要使用特定于供应商的信息对其进行扩展。网络控制器可以使用该模型来表示其所控制的结构拓扑视图,并将此视图公开给网络管理员或应用程序以进行DC网络管理。

Within the context of topology architecture defined in [RFC8345], this model can also be treated as an application of the Interface to the Routing System (I2RS) network topology model [RFC8345] 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 [RFC8346].

在[RFC8345]中定义的拓扑结构上下文中,该模型也可以被视为数据中心网络管理场景中路由系统(I2RS)网络拓扑模型[RFC8345]接口的应用。当将结构层的网络元素映射到其他拓扑(如[RFC8346]中定义的L3拓扑)的元素时,它还可以充当服务拓扑。

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.

通过使用本文档中定义的结构拓扑模型,人们可以将结构视为一个整体实体,并关注其特性(如封装类型和网关类型)及其与其他结构的连接,同时将底层拓扑放在一边。因此,客户端可以在结构级别使用拓扑信息,而无需知道相应参考底图网络中的整个链接和节点集。网络管理员可以使用控制器通过向结构中添加物理设备和链接来配置结构拓扑。或者,可以从参考底图网络基础结构中学习结构拓扑。

2. Definitions and Acronyms
2. 定义和首字母缩略词
2.1. Key Words
2.1. 关键词

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

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(如图所示)应按照BCP 14[RFC2119][RFC8174]所述进行解释。

2.2. Terminology
2.2. 术语

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.

POD:网络、计算、存储和应用程序组件的一个模块,它们协同工作以提供网络服务。它代表了一种可重复的设计模式。其组件最大限度地提高了数据中心的模块化、可扩展性和可管理性。

Fabric: composed of several PODs to form a data-center network.

结构:由几个吊舱组成,形成一个数据中心网络。

3. Model Overview
3. 模型概述

This section provides an overview of the DC fabric topology model and its relationship with other topology models.

本节概述了DC结构拓扑模型及其与其他拓扑模型的关系。

3.1. Topology Model Structure
3.1. 拓扑模型结构

The relationship of the DC fabric topology model and other topology models is shown in Figure 1.

DC fabric拓扑模型与其他拓扑模型的关系如图1所示。

             +------------------------+
             |      network model     |
             +------------------------+
                          |
                          |
             +------------V-----------+
             | network topology model |
             +------------------------+
                          |
        +-----------+-----+------+-------------+
        |           |            |             |
    +---V----+  +---V----+   +---V----+   +----V---+
    |   L1   |  |   L2   |   |   L3   |   | Fabric |
    |topology|  |topology|   |topology|   |topology|
    |  model |  |  model |   |  model |   |  model |
    +--------+  +--------+   +--------+   +--------+
        
             +------------------------+
             |      network model     |
             +------------------------+
                          |
                          |
             +------------V-----------+
             | network topology model |
             +------------------------+
                          |
        +-----------+-----+------+-------------+
        |           |            |             |
    +---V----+  +---V----+   +---V----+   +----V---+
    |   L1   |  |   L2   |   |   L3   |   | Fabric |
    |topology|  |topology|   |topology|   |topology|
    |  model |  |  model |   |  model |   |  model |
    +--------+  +--------+   +--------+   +--------+
        

Figure 1: The Network Data Model Structure

图1:网络数据模型结构

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.

从数据中心网络的资源管理和服务供应的角度来看,结构拓扑模型使用特定于DC结构的定义和功能扩展了基本网络拓扑模型,以提供异构结构的通用配置和操作。

3.2. Fabric Topology Model
3.2. 结构拓扑模型

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.

结构拓扑模型模块设计为通用,可应用于采用不同技术构建的数据中心结构,如VLAN和VXLAN。本模块的主要目的是配置和管理结构及其连接。它为数据中心应用程序提供了基于结构的拓扑视图。

3.2.1. Fabric Topology
3.2.1. 结构拓扑

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

在结构拓扑模块中,将结构建模为网络的节点;因此,基于结构的数据中心网络由一组结构节点及其连接组成。下面描述了一段定义,以显示模型的主要结构。符号语法如下[RFC8340]。

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

The fabric topology module augments the generic ietf-network and ietf-network-topology modules as follows:

结构拓扑模块扩充了通用ietf网络和ietf网络拓扑模块,如下所示:

o A new topology type, "ietf-dc-fabric-topology", is defined and added under the "network-types" container of the ietf-network module.

o 在ietf网络模块的“网络类型”容器下定义并添加了一种新的拓扑类型“ietf dc结构拓扑”。

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

o 结构定义为网络/节点容器下的节点。定义了一个新的容器“fabric attributes”,用于承载结构的属性,例如网关模式、结构类型、涉及的设备节点和链接。

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

o 终止点(在网络拓扑模块中)通过容器中定义的结构端口属性进行扩展。此处的“终止点”用于表示结构“端口”,该端口提供到其他节点的连接,例如内部设备、外部的另一个结构或终端主机。

Details of the fabric node and the fabric termination point extension will be explained in the following sections.

结构节点和结构终止点扩展的详细信息将在以下部分中解释。

3.2.2. Fabric Node Extension
3.2.2. 结构节点扩展

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

作为一个原子网络(即,一组节点和链接,组成一个POD,还支持单个覆盖/参考底图实例),结构本身由一组网络元素组成,即设备和相关链接。结构的配置包含在“结构属性”容器下,如下所示。符号语法如下[RFC8340]。

       +--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
        
       +--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
        

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.

在该模块中,通过增加网络模块的“节点”列表,为结构节点引入了其他数据对象。新对象包括结构名称、结构类型、结构描述,以及在“选项”容器中定义的一组选项。“选项”容器包括网关模式类型(集中式或分布式)和流量行为(流量是否需要访问控制列表(ACL))。此外,它还包括作为“支持节点”的设备节点和相关链路的列表,以形成结构网络。这些设备节点和链接表示为参考底图拓扑中现有节点和链接的叶参照。对于设备节点,“角色”对象被定义为表示结构中设备的角色,例如“脊椎”或“叶子”,它们应该与网关模式一起工作。

3.2.3. Fabric Termination-Point Extension
3.2.3. 结构终止点扩展

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.

由于结构可以被视为节点,“终止点”可以表示连接到其他结构和终端主机以及结构内设备的结构“端口”。

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.

因此,结构的“终端点”集合表示其所有连接,包括其内部连接、与其他结构的互连以及与终端主机的连接。

The structure of fabric ports is as follows. The notation syntax follows [RFC8340].

结构端口的结构如下所示。符号语法如下[RFC8340]。

       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)?
        
       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)?
        

This structure augments the termination points (in the network topology module) with fabric port attributes defined in a container.

此结构使用容器中定义的结构端口属性来扩展终止点(在网络拓扑模块中)。

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.

为结构端口定义了新节点,包括结构名称、结构中端口的角色(内部端口、到外部网络的外部端口、到终端主机的访问端口)和端口类型(L2接口、L3接口)。通过将设备端口定义为tp ref,可以将结构端口映射到参考底图网络中的设备节点。

Additionally, a new container for tunnel-options is introduced to present the tunnel configuration on a port.

此外,还引入了一个新的隧道选项容器,用于在端口上显示隧道配置。

The termination point information is learned from the underlay networks, not configured by the fabric topology layer.

终止点信息从参考底图网络中学习,而不是由结构拓扑层配置。

4. Fabric YANG Modules
4. 织物杨氏模量

This module imports typedefs from [RFC8345], and it references [RFC7348] and [RFC8344].

此模块从[RFC8345]导入typedefs,并引用[RFC7348]和[RFC8344]。

<CODE BEGINS> file "ietf-dc-fabric-types@2019-02-25.yang"
module ietf-dc-fabric-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types";
  prefix fabrictypes;
        
<CODE BEGINS> file "ietf-dc-fabric-types@2019-02-25.yang"
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";
  }
        
  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>
        
  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:    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.

编者:石大年<mailto:shidanian@huawei.com>“说明”此模块包含结构的定义集合。

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

版权(c)2019 IETF信托基金和被认定为代码作者的人员。版权所有。

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

根据IETF信托有关IETF文件的法律规定第4.c节规定的简化BSD许可证中包含的许可条款,允许以源代码和二进制格式重新分发和使用,无论是否修改(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.";
        
     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.";
        
  revision 2019-02-25 {
    description
      "Initial revision.";
        
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology
       in Data-Center Networks";
  }
        
    reference
      "RFC 8542: A YANG Data Model for Fabric Topology
       in Data-Center Networks";
  }
        
  identity fabric-type {
    description
      "Base type for fabric networks";
  }
        
  identity fabric-type {
    description
      "Base type for fabric networks";
  }
        
  identity vxlan-fabric {
    base fabric-type;
    description
      "VXLAN fabric";
  }
        
  identity vxlan-fabric {
    base fabric-type;
    description
      "VXLAN fabric";
  }
        
  identity vlan-fabric {
    base fabric-type;
    description
      "VLAN fabric";
  }
        
  identity vlan-fabric {
    base fabric-type;
    description
      "VLAN fabric";
  }
        
  identity trill-fabric {
    base fabric-type;
    description
      "TRILL fabric";
  }
        
  identity trill-fabric {
    base fabric-type;
    description
      "TRILL fabric";
  }
        
  identity port-type {
    description
      "Base type for fabric port";
  }
        
  identity port-type {
    description
      "Base type for fabric port";
  }
        
  identity eth {
    base port-type;
    description
      "Ethernet";
  }
        
  identity eth {
    base port-type;
    description
      "Ethernet";
  }
        
  identity serial {
    base port-type;
    description
      "Serial";
  }
        
  identity serial {
    base port-type;
    description
      "Serial";
  }
        
  identity bandwidth {
    description
      "Base for bandwidth";
        
  identity bandwidth {
    description
      "Base for bandwidth";
        

}

}

  identity bw-1M {
    base bandwidth;
    description
      "1M";
  }
        
  identity bw-1M {
    base bandwidth;
    description
      "1M";
  }
        
  identity bw-10M {
    base bandwidth;
    description
      "10Mbps";
  }
        
  identity bw-10M {
    base bandwidth;
    description
      "10Mbps";
  }
        
  identity bw-100M {
    base bandwidth;
    description
      "100Mbps";
  }
        
  identity bw-100M {
    base bandwidth;
    description
      "100Mbps";
  }
        
  identity bw-1G {
    base bandwidth;
    description
      "1Gbps";
  }
        
  identity bw-1G {
    base bandwidth;
    description
      "1Gbps";
  }
        
  identity bw-10G {
    base bandwidth;
    description
      "10Gbps";
  }
        
  identity bw-10G {
    base bandwidth;
    description
      "10Gbps";
  }
        
  identity bw-25G {
    base bandwidth;
    description
      "25Gbps";
  }
        
  identity bw-25G {
    base bandwidth;
    description
      "25Gbps";
  }
        
  identity bw-40G {
    base bandwidth;
    description
      "40Gbps";
  }
        
  identity bw-40G {
    base bandwidth;
    description
      "40Gbps";
  }
        
  identity bw-100G {
    base bandwidth;
    description
      "100Gbps";
        
  identity bw-100G {
    base bandwidth;
    description
      "100Gbps";
        

}

}

  identity bw-400G {
    base bandwidth;
    description
      "400Gbps";
  }
        
  identity bw-400G {
    base bandwidth;
    description
      "400Gbps";
  }
        
  identity device-role {
    description
      "Base for the device role in a fabric.";
  }
        
  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 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 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 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 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 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
        
  identity external {
    base fabric-port-role;
    description
      "The port is used for a fabric to connect to
        
       outside network.";
  }
        
       outside network.";
  }
        
  identity access {
    base fabric-port-role;
    description
      "The port is used for an endpoint to connect
       to a fabric.";
  }
        
  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 service-capability {
    description
      "Base for the service of the fabric ";
  }
        
  identity ip-mapping {
    base service-capability;
    description
      "NAT.";
  }
        
  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 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.";
  }
        
  identity dynamic-route-exchange {
    base service-capability;
    description
      "Dynamic route exchange.";
  }
        
  /*
   * Typedefs
   */
        
  /*
   * 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 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 {

typedef服务功能{

    type identityref {
      base service-capability;
    }
    description
      "Service capability of the fabric";
  }
        
    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 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 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 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 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 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 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 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-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";
  }
        
  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.";
        
  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.";
    }
  }
}
        
    }
    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.";
    }
  }
}
        

<CODE ENDS>

<代码结束>

   <CODE BEGINS> file "ietf-dc-fabric-topology@2019-02-25.yang"
   module ietf-dc-fabric-topology {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology";
     prefix fabric;
        
   <CODE BEGINS> file "ietf-dc-fabric-topology@2019-02-25.yang"
   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";
     }
        
     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>
        
     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:    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.

编者:石大年<mailto:shidanian@huawei.com>“说明”此模块包含结构的定义集合。

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

版权(c)2019 IETF信托基金和被认定为代码作者的人员。版权所有。

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

根据IETF信托有关IETF文件的法律规定第4.c节规定的简化BSD许可证中包含的许可条款,允许以源代码和二进制格式重新分发和使用,无论是否修改(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.";
        
        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";
     }
        
     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-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 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 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 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
        
     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.";
       }
     }
        
            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
        
     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;
       }
     }
        
             "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: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";
       }
        
     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;
       }
     }
        
       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;
       }
     }
   }
   <CODE ENDS>
        
     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;
       }
     }
   }
   <CODE ENDS>
        
5. IANA Considerations
5. IANA考虑

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

本文档在“IETF XML注册表”[RFC3688]中注册以下命名空间URI:

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

URI:urn:ietf:params:xml:ns:yang:ietf dc结构类型注册人联系人:IESG。XML:不适用;请求的URI是一个XML命名空间。

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

URI:urn:ietf:params:xml:ns:yang:ietf dc结构拓扑注册人联系人:IESG。XML:不适用;请求的URI是一个XML命名空间。

URI:urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state Registrant Contact: The IESG. XML: N/A; the requested URI is an XML namespace.

URI:urn:ietf:params:xml:ns:yang:ietf dc结构拓扑状态注册人联系人:IESG。XML:不适用;请求的URI是一个XML命名空间。

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

本文件在“YANG模块名称”注册表[RFC6020]中注册以下YANG模块:

   Name: ietf-dc-fabric-types
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types
   Prefix: fabrictypes
   Reference: RFC 8542
        
   Name: ietf-dc-fabric-types
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types
   Prefix: fabrictypes
   Reference: RFC 8542
        
   Name: ietf-dc-fabric-topology
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology
   Prefix: fabric
   Reference: RFC 8542
        
   Name: ietf-dc-fabric-topology
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology
   Prefix: fabric
   Reference: RFC 8542
        
   Name: ietf-dc-fabric-topology-state
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state
   Prefix: sfabric
   Reference: RFC 8542
        
   Name: ietf-dc-fabric-topology-state
   Namespace: urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state
   Prefix: sfabric
   Reference: RFC 8542
        
6. Security Considerations
6. 安全考虑

The YANG module defined in this document is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446].

本文档中定义的YANG模块旨在通过网络管理协议(如NETCONF[RFC6241]或RESTCONF[RFC8040])进行访问。最低的NETCONF层是安全传输层,实现安全传输的强制要求是安全Shell(SSH)[RFC6242]。最低的RESTCONF层是HTTPS,实现安全传输的强制层是TLS[RFC8446]。

The Network Configuration Access Control Model (NACM) [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.

网络配置访问控制模型(NACM)[RFC8341]提供了将特定NETCONF或RESTCONF用户的访问限制为所有可用NETCONF或RESTCONF协议操作和内容的预配置子集的方法。

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:

此模块中定义了许多可写/可创建/可删除的数据节点(即,默认为config true)。在某些网络环境中,这些数据节点可能被视为敏感或易受攻击。对这些数据节点的写入操作(如编辑配置)如果没有适当的保护,可能会对网络操作产生负面影响。ietf dc结构拓扑模块中的子树和数据节点及其敏感度/漏洞如下:

fabric-attributes: A malicious client could attempt to sabotage the configuration of important fabric attributes, such as device nodes or type.

结构属性:恶意客户端可能试图破坏重要结构属性(如设备节点或类型)的配置。

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

在某些网络环境中,此模块中的某些可读数据节点可能被视为敏感或易受攻击。因此,控制读取访问(例如,通过get、get config或

notification) to these data nodes. The subtrees and data nodes and their sensitivity/vulnerability in the ietf-dc-fabric-topology module are as follows:

通知)发送到这些数据节点。ietf dc结构拓扑模块中的子树和数据节点及其敏感度/漏洞如下:

fport-attributes: A malicious client could attempt to read the connections of fabrics without permission, such as device-port and name.

fport属性:恶意客户端可能会在未经许可的情况下尝试读取结构的连接,例如设备端口和名称。

7. References
7. 工具书类
7.1. Normative References
7.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<https://www.rfc-editor.org/info/rfc2119>.

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, <https://www.rfc-editor.org/info/rfc3688>.

[RFC3688]Mealling,M.,“IETF XML注册表”,BCP 81,RFC 3688,DOI 10.17487/RFC3688,2004年1月<https://www.rfc-editor.org/info/rfc3688>.

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

[RFC6020]Bjorklund,M.,Ed.“YANG-网络配置协议的数据建模语言(NETCONF)”,RFC 6020,DOI 10.17487/RFC6020,2010年10月<https://www.rfc-editor.org/info/rfc6020>.

[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, <https://www.rfc-editor.org/info/rfc6241>.

[RFC6241]Enns,R.,Ed.,Bjorklund,M.,Ed.,Schoenwaeld,J.,Ed.,和A.Bierman,Ed.,“网络配置协议(NETCONF)”,RFC 6241,DOI 10.17487/RFC6241,2011年6月<https://www.rfc-editor.org/info/rfc6241>.

[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, <https://www.rfc-editor.org/info/rfc6242>.

[RFC6242]Wasserman,M.“在安全外壳上使用NETCONF协议(SSH)”,RFC 6242,DOI 10.17487/RFC6242,2011年6月<https://www.rfc-editor.org/info/rfc6242>.

[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, <https://www.rfc-editor.org/info/rfc7950>.

[RFC7950]Bjorklund,M.,Ed.“YANG 1.1数据建模语言”,RFC 7950,DOI 10.17487/RFC7950,2016年8月<https://www.rfc-editor.org/info/rfc7950>.

[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, <https://www.rfc-editor.org/info/rfc8040>.

[RFC8040]Bierman,A.,Bjorklund,M.,和K.Watsen,“RESTCONF协议”,RFC 8040,DOI 10.17487/RFC8040,2017年1月<https://www.rfc-editor.org/info/rfc8040>.

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.

[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018, <https://www.rfc-editor.org/info/rfc8341>.

[RFC8341]Bierman,A.和M.Bjorklund,“网络配置访问控制模型”,STD 91,RFC 8341,DOI 10.17487/RFC8341,2018年3月<https://www.rfc-editor.org/info/rfc8341>.

[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, <https://www.rfc-editor.org/info/rfc8342>.

[RFC8342]Bjorklund,M.,Schoenwaeld,J.,Shafer,P.,Watsen,K.,和R.Wilton,“网络管理数据存储体系结构(NMDA)”,RFC 8342,DOI 10.17487/RFC8342,2018年3月<https://www.rfc-editor.org/info/rfc8342>.

[RFC8345] Clemm, A., Medved, J., Varga, R., Bahadur, N., Ananthakrishnan, H., and X. Liu, "A YANG Data Model for Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March 2018, <https://www.rfc-editor.org/info/rfc8345>.

[RFC8345]Clemm,A.,Medved,J.,Varga,R.,Bahadur,N.,Ananthakrishnan,H.,和X.Liu,“网络拓扑的杨数据模型”,RFC 8345,DOI 10.17487/RFC83452018年3月<https://www.rfc-editor.org/info/rfc8345>.

[RFC8346] Clemm, A., Medved, J., Varga, R., Liu, X., Ananthakrishnan, H., and N. Bahadur, "A YANG Data Model for Layer 3 Topologies", RFC 8346, DOI 10.17487/RFC8346, March 2018, <https://www.rfc-editor.org/info/rfc8346>.

[RFC8346]Clemm,A.,Medved,J.,Varga,R.,Liu,X.,Ananthakrishnan,H.,和N.Bahadur,“第3层拓扑的杨数据模型”,RFC 8346,DOI 10.17487/RFC8346,2018年3月<https://www.rfc-editor.org/info/rfc8346>.

[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, <https://www.rfc-editor.org/info/rfc8446>.

[RFC8446]Rescorla,E.“传输层安全(TLS)协议版本1.3”,RFC 8446,DOI 10.17487/RFC8446,2018年8月<https://www.rfc-editor.org/info/rfc8446>.

7.2. Informative References
7.2. 资料性引用

[GENEVE] Gross, J., Ganga, I., and T. Sridhar, "Geneve: Generic Network Virtualization Encapsulation", Work in Progress, draft-ietf-nvo3-geneve-12, March 2019.

[GENEVE]Gross,J.,Ganga,I.,和T.Sridhar,“GENEVE:通用网络虚拟化封装”,正在进行的工作,草稿-ietf-nvo3-GENEVE-12,2019年3月。

[RFC7348] Mahalingam, M., Dutt, D., Duda, K., Agarwal, P., Kreeger, L., Sridhar, T., Bursell, M., and C. Wright, "Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks", RFC 7348, DOI 10.17487/RFC7348, August 2014, <https://www.rfc-editor.org/info/rfc7348>.

[RFC7348]Mahalingam,M.,Dutt,D.,Duda,K.,Agarwal,P.,Kreeger,L.,Sridhar,T.,Bursell,M.,和C.Wright,“虚拟可扩展局域网(VXLAN):在第3层网络上覆盖虚拟化第2层网络的框架”,RFC 7348,DOI 10.17487/RFC7348,2014年8月<https://www.rfc-editor.org/info/rfc7348>.

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

[RFC8340]Bjorklund,M.和L.Berger,编辑,“杨树图”,BCP 215,RFC 8340,DOI 10.17487/RFC8340,2018年3月<https://www.rfc-editor.org/info/rfc8340>.

[RFC8344] Bjorklund, M., "A YANG Data Model for IP Management", RFC 8344, DOI 10.17487/RFC8344, March 2018, <https://www.rfc-editor.org/info/rfc8344>.

[RFC8344]Bjorklund,M.,“知识产权管理的杨氏数据模型”,RFC 8344,DOI 10.17487/RFC8344,2018年3月<https://www.rfc-editor.org/info/rfc8344>.

Appendix A. Non-NMDA-State Modules
附录A.非NMDA状态模块

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

本文件中定义的ietf dc结构拓扑模块是对ietf网络和ietf网络拓扑两个模块的扩充,这两个模块旨在与支持[RFC8342]中定义的网络管理数据存储体系结构(NMDA)的实现结合使用。为了允许实现在不支持NMDA的情况下使用该模型,定义了一组表示网络和网络拓扑状态模型的配套模块:ietf网络状态和ietf网络拓扑状态。

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.

为了能够将本文档中定义的结构拓扑模型与非NMDA兼容的实现结合使用,还需要引入相应的配套模块。该配套模块ietf dc结构拓扑状态反映了ietf dc结构拓扑。然而,ietf dc结构拓扑状态模块增强了ietf网络状态(而不是ietf网络和ietf网络拓扑),其所有数据节点都是不可配置的。

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.

与ietf网络状态和ietf网络拓扑状态一样,支持NMDA的实现不应支持ietf dc结构拓扑状态。因此,附录中定义了该模块。

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.

模块的定义如下。由于模块的结构反映了其底层模块的结构,因此不会单独描述杨树。

<CODE BEGINS> file "ietf-dc-fabric-topology-state@2019-02-25.yang"
module ietf-dc-fabric-topology-state {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology-state";
  prefix sfabric;
        
<CODE BEGINS> file "ietf-dc-fabric-topology-state@2019-02-25.yang"
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";
  }
        
  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>
        
    "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:    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.

编者:石大年<mailto:shidanian@huawei.com>“说明”此模块包含结构状态的定义集合,表示根据ietf dc结构拓扑模型配置的拓扑的学习或应用结果,镜像此模型中的相应数据节点。

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

该模型反映了ietf dc结构拓扑的配置树,但只包含只读状态数据。当实施基础设施支持网络管理数据存储体系结构(NMDA)时,不需要该模型。

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

版权(c)2019 IETF信托基金和被认定为代码作者的人员。版权所有。

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

根据IETF信托有关IETF文件的法律规定第4.c节规定的简化BSD许可证中包含的许可条款,允许以源代码和二进制格式重新分发和使用,无论是否修改(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.";
        
     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";
  }
        
  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.";
        
  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";
    }
  }
        
    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";
    }
        
  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.";
    }
  }
        
    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 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 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;
        
  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.";
    }
  }
        
      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
        
  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.";
      }
    }
        
          "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;
    }
  }
        
    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: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;
    }
  }
}
<CODE ENDS>
        
  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;
    }
  }
}
<CODE ENDS>
        

Acknowledgements

致谢

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.

我们希望感谢亚历山大·克莱姆、唐纳德·E·伊斯特莱克三世、刘旭峰、苏珊·哈雷斯、魏松、路易斯·M·孔特雷拉斯和贝诺伊特·克莱斯提供的有益贡献、意见和建议。

Authors' Addresses

作者地址

Yan Zhuang Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China

中国江苏省南京市雨花区燕庄华为软件大道101号210012

   Email: zhuangyan.zhuang@huawei.com
        
   Email: zhuangyan.zhuang@huawei.com
        

Danian Shi Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China

中国江苏省南京市雨花区大年石华为软件大道101号210012

   Email: shidanian@huawei.com
        
   Email: shidanian@huawei.com
        

Rong Gu China Mobile 32 Xuanwumen West Ave, Xicheng District Beijing, Beijing 100053 China

中国移动北京市西城区宣武门西大街32号荣谷,邮编100053

   Email: gurong_cmcc@outlook.com
        
   Email: gurong_cmcc@outlook.com
        

Hariharan Ananthakrishnan Netflix

Hariharan Ananthakrishnan Netflix

   Email: hari@netflix.com
        
   Email: hari@netflix.com