Internet Engineering Task Force (IETF)                       B. Linowski
Request for Comments: 6095                    TCS/Nokia Siemens Networks
Category: Experimental                                          M. Ersue
ISSN: 2070-1721                                   Nokia Siemens Networks
                                                               S. Kuryla
                                                    360 Treasury Systems
                                                              March 2011
        
Internet Engineering Task Force (IETF)                       B. Linowski
Request for Comments: 6095                    TCS/Nokia Siemens Networks
Category: Experimental                                          M. Ersue
ISSN: 2070-1721                                   Nokia Siemens Networks
                                                               S. Kuryla
                                                    360 Treasury Systems
                                                              March 2011
        

Extending YANG with Language Abstractions

用语言抽象扩展杨

Abstract

摘要

YANG -- the Network Configuration Protocol (NETCONF) Data Modeling Language -- supports modeling of a tree of data elements that represent the configuration and runtime status of a particular network element managed via NETCONF. This memo suggests enhancing YANG with supplementary modeling features and language abstractions with the aim to improve the model extensibility and reuse.

YANG——网络配置协议(NETCONF)数据建模语言——支持对数据元素树进行建模,这些数据元素表示通过NETCONF管理的特定网络元素的配置和运行时状态。该备忘录建议通过补充建模特性和语言抽象来增强YANG,以提高模型的可扩展性和重用性。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for examination, experimental implementation, and evaluation.

本文件不是互联网标准跟踪规范;它是为检查、实验实施和评估而发布的。

This document defines an Experimental Protocol for the Internet community. 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). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

本文档为互联网社区定义了一个实验协议。本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 5741第2节。

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

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

Copyright Notice

版权公告

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

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://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文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Key Words  . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.2.  Motivation . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.3.  Modeling Improvements with Language Abstractions . . . . .  5
     1.4.  Design Approach  . . . . . . . . . . . . . . . . . . . . .  6
     1.5.  Modeling Resource Models with YANG . . . . . . . . . . . .  6
       1.5.1.  Example of a Physical Network Resource Model . . . . .  6
       1.5.2.  Modeling Entity MIB Entries as Physical Resources  . . 12
   2.  Complex Types  . . . . . . . . . . . . . . . . . . . . . . . . 15
     2.1.  Definition . . . . . . . . . . . . . . . . . . . . . . . . 15
     2.2.  complex-type Extension Statement . . . . . . . . . . . . . 15
     2.3.  instance Extension Statement . . . . . . . . . . . . . . . 17
     2.4.  instance-list Extension Statement  . . . . . . . . . . . . 18
     2.5.  extends Extension Statement  . . . . . . . . . . . . . . . 19
     2.6.  abstract Extension Statement . . . . . . . . . . . . . . . 19
     2.7.  XML Encoding Rules . . . . . . . . . . . . . . . . . . . . 20
     2.8.  Type Encoding Rules  . . . . . . . . . . . . . . . . . . . 20
     2.9.  Extension and Feature Definition Module  . . . . . . . . . 21
     2.10. Example Model for Complex Types  . . . . . . . . . . . . . 24
     2.11. NETCONF Payload Example  . . . . . . . . . . . . . . . . . 25
     2.12. Update Rules for Modules Using Complex Types . . . . . . . 26
     2.13. Using Complex Types  . . . . . . . . . . . . . . . . . . . 26
       2.13.1. Overriding Complex Type Data Nodes . . . . . . . . . . 26
       2.13.2. Augmenting Complex Types . . . . . . . . . . . . . . . 27
       2.13.3. Controlling the Use of Complex Types . . . . . . . . . 28
   3.  Typed Instance Identifier  . . . . . . . . . . . . . . . . . . 29
     3.1.  Definition . . . . . . . . . . . . . . . . . . . . . . . . 29
     3.2.  instance-type Extension Statement  . . . . . . . . . . . . 29
     3.3.  Typed Instance Identifier Example  . . . . . . . . . . . . 30
   4.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 31
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 31
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Key Words  . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.2.  Motivation . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.3.  Modeling Improvements with Language Abstractions . . . . .  5
     1.4.  Design Approach  . . . . . . . . . . . . . . . . . . . . .  6
     1.5.  Modeling Resource Models with YANG . . . . . . . . . . . .  6
       1.5.1.  Example of a Physical Network Resource Model . . . . .  6
       1.5.2.  Modeling Entity MIB Entries as Physical Resources  . . 12
   2.  Complex Types  . . . . . . . . . . . . . . . . . . . . . . . . 15
     2.1.  Definition . . . . . . . . . . . . . . . . . . . . . . . . 15
     2.2.  complex-type Extension Statement . . . . . . . . . . . . . 15
     2.3.  instance Extension Statement . . . . . . . . . . . . . . . 17
     2.4.  instance-list Extension Statement  . . . . . . . . . . . . 18
     2.5.  extends Extension Statement  . . . . . . . . . . . . . . . 19
     2.6.  abstract Extension Statement . . . . . . . . . . . . . . . 19
     2.7.  XML Encoding Rules . . . . . . . . . . . . . . . . . . . . 20
     2.8.  Type Encoding Rules  . . . . . . . . . . . . . . . . . . . 20
     2.9.  Extension and Feature Definition Module  . . . . . . . . . 21
     2.10. Example Model for Complex Types  . . . . . . . . . . . . . 24
     2.11. NETCONF Payload Example  . . . . . . . . . . . . . . . . . 25
     2.12. Update Rules for Modules Using Complex Types . . . . . . . 26
     2.13. Using Complex Types  . . . . . . . . . . . . . . . . . . . 26
       2.13.1. Overriding Complex Type Data Nodes . . . . . . . . . . 26
       2.13.2. Augmenting Complex Types . . . . . . . . . . . . . . . 27
       2.13.3. Controlling the Use of Complex Types . . . . . . . . . 28
   3.  Typed Instance Identifier  . . . . . . . . . . . . . . . . . . 29
     3.1.  Definition . . . . . . . . . . . . . . . . . . . . . . . . 29
     3.2.  instance-type Extension Statement  . . . . . . . . . . . . 29
     3.3.  Typed Instance Identifier Example  . . . . . . . . . . . . 30
   4.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 31
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 31
        
   6.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 32
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 32
     7.1.  Normative References . . . . . . . . . . . . . . . . . . . 32
     7.2.  Informative References . . . . . . . . . . . . . . . . . . 32
   Appendix A.  YANG Modules for Physical Network Resource Model
                and Hardware Entities Model . . . . . . . . . . . . . 34
   Appendix B.  Example YANG Module for the IPFIX/PSAMP Model . . . . 40
     B.1.  Modeling Improvements for the IPFIX/PSAMP Model with
           Complex Types and Typed Instance Identifiers . . . . . . . 40
     B.2.  IPFIX/PSAMP Model with Complex Types and Typed
           Instance Identifiers . . . . . . . . . . . . . . . . . . . 41
        
   6.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 32
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 32
     7.1.  Normative References . . . . . . . . . . . . . . . . . . . 32
     7.2.  Informative References . . . . . . . . . . . . . . . . . . 32
   Appendix A.  YANG Modules for Physical Network Resource Model
                and Hardware Entities Model . . . . . . . . . . . . . 34
   Appendix B.  Example YANG Module for the IPFIX/PSAMP Model . . . . 40
     B.1.  Modeling Improvements for the IPFIX/PSAMP Model with
           Complex Types and Typed Instance Identifiers . . . . . . . 40
     B.2.  IPFIX/PSAMP Model with Complex Types and Typed
           Instance Identifiers . . . . . . . . . . . . . . . . . . . 41
        
1. Introduction
1. 介绍

YANG -- the NETCONF Data Modeling Language [RFC6020] -- supports modeling of a tree of data elements that represent the configuration and runtime status of a particular network element managed via NETCONF. This document defines extensions for the modeling language YANG as new language statements, which introduce language abstractions to improve the model extensibility and reuse. The document reports from modeling experience in the telecommunication industry and gives model examples from an actual network management system to highlight the value of proposed language extensions, especially class inheritance and recursiveness. The language extensions defined in this document have been implemented with two open source tools. These tools have been used to validate the model examples through the document. If this experimental specification results in successful usage, it is possible that the language extensions defined herein could be updated to incorporate implementation and deployment experience, then pursued on the Standards Track, possibly as part of a future version of YANG.

YANG——NETCONF数据建模语言[RFC6020]——支持对数据元素树进行建模,这些数据元素表示通过NETCONF管理的特定网络元素的配置和运行时状态。本文档将建模语言YANG的扩展定义为新的语言语句,这些语句引入语言抽象以提高模型的可扩展性和重用性。该文档报告了电信行业的建模经验,并给出了实际网络管理系统的模型示例,以突出所建议的语言扩展的价值,特别是类继承性和递归性。本文档中定义的语言扩展已通过两个开源工具实现。这些工具已用于通过文档验证模型示例。如果此实验性规范成功使用,则有可能对本文定义的语言扩展进行更新,以纳入实现和部署经验,然后在标准轨道上继续,可能作为YANG未来版本的一部分。

1.1. Key Words
1.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].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照BCP 14[RFC2119]中的说明进行解释。

1.2. Motivation
1.2. 动机

Following are non-exhaustive motivation examples highlighting usage scenarios for language abstractions.

以下是非详尽的动机示例,重点介绍了语言抽象的使用场景。

o Many systems today have a Management Information Base (MIB) that in effect is organized as a tree build of recursively nested container nodes. For example, the physical resources in the ENTITY-MIB conceptually form a containment tree. The index

o 今天,许多系统都有一个管理信息库(MIB),实际上它是作为递归嵌套的容器节点的树构建来组织的。例如,ENTITY-MIB中的物理资源在概念上形成一个包含树。索引

entPhysicalContainedIn points to the containing entity in a flat list. The ability to represent nested, recursive data structures of arbitrary depth would enable the representation of the primary containment hierarchy of physical entities as a node tree in the server MIB and in the NETCONF payload.

entPhysicalContainedIn指向平面列表中的包含实体。表示任意深度的嵌套递归数据结构的能力将使物理实体的主包含层次结构能够表示为服务器MIB和NETCONF负载中的节点树。

o A manager scanning the network in order to update the state of an inventory management system might be only interested in data structures that represent a specific type of hardware. Such a manager would then look for entities that are of this specific type, including those that are an extension or specialization of this type. To support this use case, it is helpful to bear the corresponding type information within the data structures, which describe the network element hardware.

o 为了更新库存管理系统的状态而扫描网络的管理员可能只对表示特定类型硬件的数据结构感兴趣。这样的管理者会寻找这种特定类型的实体,包括这种类型的扩展或专门化的实体。为了支持这个用例,在描述网元硬件的数据结构中包含相应的类型信息是很有帮助的。

o A system that is managing network elements is concerned, e.g., with managed objects of type "plug-in modules" that have a name, a version, and an activation state. In this context, it is useful to define the "plug-in module" as a concept that is supposed to be further detailed and extended by additional concrete model elements. In order to realize such a system, it is worthwhile to model abstract entities, which enable reuse and ease concrete refinements of that abstract entity in a second step.

o 管理网络元件的系统涉及例如具有名称、版本和激活状态的“插件模块”类型的受管对象。在这种情况下,将“插件模块”定义为一个概念是很有用的,该概念应该通过附加的具体模型元素进一步细化和扩展。为了实现这样一个系统,有必要对抽象实体进行建模,以便在第二步中重用和简化抽象实体的具体细化。

o As particular network elements have specific types of components that need to be managed (OS images, plug-in modules, equipment, etc.), it should be possible to define concrete types, which describe the managed object precisely. By using type-safe extensions of basic concepts, a system in the manager role can safely and explicitly determine that e.g., the "equipment" is actually of type "network card".

o 由于特定网络元素具有需要管理的特定类型的组件(操作系统映像、插件模块、设备等),因此应该可以定义具体类型,精确描述被管理对象。通过使用基本概念的类型安全扩展,具有管理员角色的系统可以安全明确地确定“设备”实际上是“网卡”类型。

o Currently, different SDOs are working on the harmonization of their management information models. Often, a model mapping or transformation between systems becomes necessary. The harmonization of the models is done e.g., by mapping of the two models on the object level or integrating an object hierarchy into an existing information model. On the one hand, extending YANG with language abstractions can simplify the adoption of IETF resource models by other SDOs and facilitate the alignment with other SDOs' resource models (e.g., TM Forum SID [SID_V8]). On the other hand, the proposed YANG extensions can enable the utilization of the YANG modeling language in other SDOs, which usually model complex management systems in a top-down manner and use high-level language features frequently.

o 目前,不同的SDO正在协调其管理信息模型。通常,需要在系统之间进行模型映射或转换。模型的协调是通过在对象级别映射两个模型或将对象层次结构集成到现有信息模型中来完成的。一方面,通过语言抽象扩展YANG可以简化其他SDO对IETF资源模型的采用,并有助于与其他SDO的资源模型(例如TM Forum SID[SID_V8])保持一致。另一方面,提议的YANG扩展可以在其他SDO中使用YANG建模语言,这些SDO通常以自顶向下的方式对复杂的管理系统进行建模,并经常使用高级语言功能。

This memo specifies additional modeling features for the YANG language in the area of structured model abstractions, typed references, as well as recursive data structures, and it discusses how these new features can improve the modeling capabilities of YANG.

本备忘录规定了YANG语言在结构化模型抽象、类型化引用以及递归数据结构方面的其他建模功能,并讨论了这些新功能如何提高YANG的建模能力。

Section 1.5.1 contains a physical resource model that deals with some of the modeling challenges illustrated above. Section 1.5.2 gives an example that uses the base classes defined in the physical resource model and derives a model for physical entities defined in the Entity MIB.

第1.5.1节包含一个物理资源模型,该模型处理上述一些建模挑战。第1.5.2节给出了一个使用物理资源模型中定义的基类并为实体MIB中定义的物理实体派生模型的示例。

1.3. Modeling Improvements with Language Abstractions
1.3. 语言抽象的建模改进

As an enhancement to YANG 1.0, complex types and typed instance identifiers provide different technical improvements on the modeling level:

作为对YANG 1.0的增强,复杂类型和类型化实例标识符在建模级别提供了不同的技术改进:

o In case the model of a system that should be managed with NETCONF makes use of inheritance, complex types enable an almost one-to-one mapping between the classes in the original model and the YANG module.

o 如果应该使用NETCONF管理的系统模型使用继承,那么复杂类型可以在原始模型和模块中的类之间实现几乎一对一的映射。

o Typed instance identifiers allow representing associations between the concepts in a type-safe way to prevent type errors caused by referring to data nodes of incompatible types. This avoids referring to a particular location in the MIB. Referring to a particular location in the MIB is not mandated by the domain model.

o 类型化实例标识符允许以类型安全的方式表示概念之间的关联,以防止由于引用不兼容类型的数据节点而导致的类型错误。这样可以避免引用MIB中的特定位置。域模型不强制引用MIB中的特定位置。

o Complex types allow defining complete, self-contained type definitions. It is not necessary to explicitly add a key statement to lists, which use a grouping that defines the data nodes.

o 复杂类型允许定义完整、自包含的类型定义。无需向列表显式添加键语句,列表使用定义数据节点的分组。

o Complex types simplify concept refinement by extending a base complex type and make it superfluous to represent concept refinements with workarounds such as huge choice-statements with complex branches.

o 复杂类型通过扩展基本复杂类型简化了概念精化,并使使用变通方法(如具有复杂分支的大型choice语句)表示概念精化变得多余。

o Abstract complex types ensure correct usage of abstract concepts by enforcing the refinement of a common set of properties before instantiation.

o 抽象复杂类型通过在实例化之前强制细化一组公共属性来确保正确使用抽象概念。

o Complex types allow defining recursive structures. This enables representing complex structures of arbitrary depth by nesting instances of basic complex types that may contain themselves.

o 复杂类型允许定义递归结构。这使得能够通过嵌套可能包含自身的基本复杂类型的实例来表示任意深度的复杂结构。

o Complex types avoid introducing metadata types (e.g., type code enumerations) and metadata leafs (e.g., leafs containing a type code) to indicate which concrete type of object is actually represented by a generic container in the MIB. This also avoids explicitly ruling out illegal use of subtype-specific properties in generic containers.

o 复杂类型避免引入元数据类型(例如,类型代码枚举)和元数据叶(例如,包含类型代码的叶)来指示MIB中的泛型容器实际表示的对象的具体类型。这还避免了明确排除在泛型容器中非法使用特定于子类型的属性。

o Complex type instances include the type information in the NETCONF payload. This allows determining the actual type of an instance during the NETCONF payload parsing and avoids the use in the model of additional leafs, which provide the type information as content.

o 复杂类型实例包括NETCONF负载中的类型信息。这允许在NETCONF负载解析期间确定实例的实际类型,并避免在模型中使用额外的leaf,后者将类型信息作为内容提供。

o Complex types may be declared explicitly as optional features, which is not possible when the actual type of an entity represented by a generic container is indicated with a type code enumeration.

o 复杂类型可以显式声明为可选功能,当泛型容器表示的实体的实际类型用类型代码枚举表示时,这是不可能的。

Appendix B, "Example YANG Module for the IPFIX/PSAMP Model", lists technical improvements for modeling with complex types and typed instance identifiers and exemplifies the usage of the proposed YANG extensions based on the IP Flow Information Export (IPFIX) / Packet Sampling (PSAMP) configuration model in [IPFIXCONF].

附录B“IPFIX/PSAMP模型的示例YANG模块”列出了使用复杂类型和类型化实例标识符进行建模的技术改进,并举例说明了基于[IPFIXCONF]中IP流信息导出(IPFIX)/数据包采样(PSAMP)配置模型的拟议YANG扩展的使用。

1.4. Design Approach
1.4. 设计方法

The proposed additional features for YANG in this memo are designed to reuse existing YANG statements whenever possible. Additional semantics is expressed by an extension that is supposed to be used as a substatement of an existing statement.

本备忘录中为YANG提出的附加功能旨在尽可能重用现有的YANG语句。附加语义由一个扩展来表示,该扩展应该用作现有语句的子语句。

The proposed features don't change the semantics of models that is valid with respect to the YANG specification [RFC6020].

建议的特性不会改变YANG规范[RFC6020]中有效的模型语义。

1.5. Modeling Resource Models with YANG
1.5. 基于YANG的资源模型建模
1.5.1. Example of a Physical Network Resource Model
1.5.1. 物理网络资源模型示例

The diagram below depicts a portion of an information model for manageable network resources used in an actual network management system.

下图描述了实际网络管理系统中使用的可管理网络资源的信息模型的一部分。

Note: The referenced model (UDM, Unified Data Model) is based on key resource modeling concepts from [SID_V8] and is compliant with selected parts of SID Resource Abstract Business Entities domain [UDM].

注:参考模型(UDM,统一数据模型)基于[SID_V8]中的关键资源建模概念,并符合SID资源抽象业务实体域[UDM]的选定部分。

The class diagram in Figure 1 and the corresponding YANG module excerpt focus on basic resource ("Resource" and the distinction between logical and physical resources) and hardware abstractions ("Hardware", "Equipment", and "EquipmentHolder"). Class attributes were omitted to achieve decent readability.

图1中的类图和相应的YANG模块摘录侧重于基本资源(“资源”以及逻辑和物理资源之间的区别)和硬件抽象(“硬件”、“设备”和“设备持有者”)。为了获得良好的可读性,省略了类属性。

+--------+
|Resource|
+--------+
 /\   /\
 --   --
 |    |
 |  +---------------+
 |  |LogicalResource|
 |  +---------------+
 |
 | +--------+
 | |Physical|      +-----------+
 '-|Resource|<|-+-|PhysicalLink|
   +---- ---+   | +------------+
                |     |0..* physicalLink
                |     |                                       equipment
                |     |                                       Holder
                |     |                                       0..*
                |     |                                       +-------+
                |     |0..* hardware                          |       |
                | +--------+     +---------------+     +---------+    |
                '-|Hardware|<|-+-|ManagedHardware|<|-+-|Equipment|<>--+
                  +--------+   | +---------------+   | | Holder  |0..1
                      <>       |                     | +---------+
                  0..1|        |                     |   <>
                      |        |                     |   |0..* equipment
                      |        |                     |   |     Holder
                      |        |                     |   |
                      |        |                     |   |0..* equipment
                      |        |                     |   |
                      |        |                     |   |    equipment
                      |        |                     |   |    0..*
                      |        |                     |   |    +-------+
                      |        |                     |   |    |       |
                      |        |                     | +---------+    |
                      |        |                     '-|Equipment|<>--+
                      |        |                       +---------+0..1
                      |        |                    compositeEquipment
                      |        |
                      |        | +-----------------+
                      |        '-|PhysicalConnector|----+0..* source
                      '----------+-----------------+    |     Physical
           physicalConnector 0..*           |           |     Connector
                                            |           |
                                            +-----------+
                                            0..* targetPhysicalConnector
        
+--------+
|Resource|
+--------+
 /\   /\
 --   --
 |    |
 |  +---------------+
 |  |LogicalResource|
 |  +---------------+
 |
 | +--------+
 | |Physical|      +-----------+
 '-|Resource|<|-+-|PhysicalLink|
   +---- ---+   | +------------+
                |     |0..* physicalLink
                |     |                                       equipment
                |     |                                       Holder
                |     |                                       0..*
                |     |                                       +-------+
                |     |0..* hardware                          |       |
                | +--------+     +---------------+     +---------+    |
                '-|Hardware|<|-+-|ManagedHardware|<|-+-|Equipment|<>--+
                  +--------+   | +---------------+   | | Holder  |0..1
                      <>       |                     | +---------+
                  0..1|        |                     |   <>
                      |        |                     |   |0..* equipment
                      |        |                     |   |     Holder
                      |        |                     |   |
                      |        |                     |   |0..* equipment
                      |        |                     |   |
                      |        |                     |   |    equipment
                      |        |                     |   |    0..*
                      |        |                     |   |    +-------+
                      |        |                     |   |    |       |
                      |        |                     | +---------+    |
                      |        |                     '-|Equipment|<>--+
                      |        |                       +---------+0..1
                      |        |                    compositeEquipment
                      |        |
                      |        | +-----------------+
                      |        '-|PhysicalConnector|----+0..* source
                      '----------+-----------------+    |     Physical
           physicalConnector 0..*           |           |     Connector
                                            |           |
                                            +-----------+
                                            0..* targetPhysicalConnector
        

Figure 1: Physical Network Resource Model

图1:物理网络资源模型

Since this model is an abstraction of network-element-specific MIB topologies, modeling it with YANG creates some challenges. Some of these challenges and how they can be addressed with complex types are explained below:

由于该模型是特定于网元的MIB拓扑的抽象,因此使用YANG对其进行建模会带来一些挑战。下面解释其中一些挑战以及如何使用复杂类型解决这些挑战:

o Modeling of abstract concepts: Classes like "Resource" represent concepts that primarily serve as a base class for derived classes. With complex types, such an abstract concept could be represented by an abstract complex type (see "complex-type extension statement" and "abstract extension statement").

o 抽象概念的建模:“资源”类表示主要用作派生类基类的概念。对于复杂类型,这样的抽象概念可以用抽象复杂类型表示(请参见“复杂类型扩展语句”和“抽象扩展语句”)。

o Class Inheritance: Information models for complex management domains often use class inheritance to create specialized classes like "PhysicalConnector" from a more generic base class (here, "Hardware"), which itself might inherit from another base class ("PhysicalResource"), etc. Complex types allow creating enhanced versions of an existing (abstract or concrete) base type via an extension (see "extends extension statement").

o 类继承:复杂管理域的信息模型通常使用类继承从更通用的基类(此处为“硬件”)创建专门的类,如“PhysicalConnector”,其本身可能从另一个基类(“PhysicalResource”)等继承。复杂类型允许创建现有类的增强版本(抽象或具体)通过扩展的基类型(请参阅“扩展扩展语句”)。

o Recursive containment: In order to specify containment hierarchies, models frequently contain different aggregation associations, in which the target (contained element) is either the containing class itself or a base class of the containing class. In the model above, the recursive containment of "EquipmentHolder" is an example of such a relationship (see the description for the "complex-type EquipmentHolder" in the example model "udmcore" below).

o 递归包含:为了指定包含层次结构,模型通常包含不同的聚合关联,其中目标(包含的元素)要么是包含类本身,要么是包含类的基类。在上面的模型中,“EquipmentHolder”的递归包含就是这种关系的一个例子(参见下面的示例模型“udmcore”中“复杂类型EquipmentHolder”的描述)。

o Complex types support such a containment by using a complex type (or one of its ancestor types) as the type of an instance or instance list that is part of its definition (see "instance(-list) extension statement").

o 复杂类型通过使用复杂类型(或其祖先类型之一)作为实例的类型或作为其定义一部分的实例列表(请参阅“实例(-list)扩展语句”)来支持这种包含。

o Reference relationships: A key requirement on large models for network domains with many related managed objects is the ability to define inter-class associations that represent essential relationships between instances of such a class. For example, the relationship between "PhysicalLink" and "Hardware" tells which physical link is connecting which hardware resources. It is important to notice that this kind of relationship does not mandate any particular location of the two connected hardware instances in any MIB module. Such containment-agnostic relationships can be represented by a typed instance identifier that embodies one direction of such an association (see Section 3, "Typed Instance Identifier").

o 引用关系:对于具有许多相关托管对象的网络域,大型模型的一个关键要求是能够定义类间关联,这些关联表示此类实例之间的基本关系。例如,“PhysicalLink”和“Hardware”之间的关系告诉我们哪个物理链接正在连接哪些硬件资源。需要注意的是,这种关系并不要求在任何MIB模块中指定两个连接的硬件实例的任何特定位置。这种包含不可知关系可以由类型化实例标识符表示,该标识符体现了这种关联的一个方向(参见第3节“类型化实例标识符”)。

The YANG module excerpt below shows how the challenges listed above can be addressed by the Complex Types extension (module import prefix "ct:"). The complete YANG module for the physical resource model in Figure 1 can be found in Appendix A, "YANG Modules for Physical Network Resource Model and Hardware Entities Model".

下面的模块摘录显示了复杂类型扩展(模块导入前缀“ct:”)如何解决上面列出的挑战。图1中物理资源模型的完整YANG模块可在附录A“物理网络资源模型和硬件实体模型的YANG模块”中找到。

Note: The YANG extensions proposed in this document have been implemented as the open source tools "Pyang Extension for Complex Types" [Pyang-ct], [Pyang], and "Libsmi Extension for Complex Types" [Libsmi]. All model examples in the document have been validated with the tools Pyang-ct and Libsmi.

注:本文档中提出的YANG扩展已作为开源工具“Pyang Extension for Complex Types”[Pyang ct]、[Pyang]和“Libsmi Extension for Complex Types”[Libsmi]实现。文档中的所有模型示例都已使用Pyang ct和Libsmi工具进行了验证。

<CODE BEGINS>

<代码开始>

module udmcore {

udmcore模块{

   namespace "http://example.com/udmcore";
   prefix "udm";
        
   namespace "http://example.com/udmcore";
   prefix "udm";
        
   import ietf-complex-types {prefix "ct"; }
        
   import ietf-complex-types {prefix "ct"; }
        

// Basic complex types...

//基本复杂类型。。。

   ct:complex-type PhysicalResource {
      ct:extends Resource;
        ct:abstract true;
        // ...
        leaf serialNumber {
         type string;
         description "'Manufacturer-allocated part number' as
           defined in SID, e.g., the part number of a fiber link
           cable.";
      }
   }
        
   ct:complex-type PhysicalResource {
      ct:extends Resource;
        ct:abstract true;
        // ...
        leaf serialNumber {
         type string;
         description "'Manufacturer-allocated part number' as
           defined in SID, e.g., the part number of a fiber link
           cable.";
      }
   }
        
   ct:complex-type Hardware {
      ct:extends PhysicalResource;
        ct:abstract true;
        // ...
       leaf-list physicalLink {
          type instance-identifier {ct:instance-type PhysicalLink;}
       }
       ct:instance-list containedHardware {
       ct:instance-type Hardware;
}
       ct:instance-list physicalConnector {
       ct:instance-type PhysicalConnector;
        
   ct:complex-type Hardware {
      ct:extends PhysicalResource;
        ct:abstract true;
        // ...
       leaf-list physicalLink {
          type instance-identifier {ct:instance-type PhysicalLink;}
       }
       ct:instance-list containedHardware {
       ct:instance-type Hardware;
}
       ct:instance-list physicalConnector {
       ct:instance-type PhysicalConnector;
        
}
   }
        
}
   }
        
   ct:complex-type PhysicalLink {
       ct:extends PhysicalResource;
       // ...
       leaf-list hardware {
          type instance-identifier {ct:instance-type Hardware;}
       }
   }
        
   ct:complex-type PhysicalLink {
       ct:extends PhysicalResource;
       // ...
       leaf-list hardware {
          type instance-identifier {ct:instance-type Hardware;}
       }
   }
        
   ct:complex-type ManagedHardware {
      ct:extends Hardware;
        ct:abstract true;
        // ...
   }
        
   ct:complex-type ManagedHardware {
      ct:extends Hardware;
        ct:abstract true;
        // ...
   }
        
   ct:complex-type PhysicalConnector {
      ct:extends Hardware;
        leaf location {type string;}
        // ...
      leaf-list sourcePhysicalConnector {
         type instance-identifier {ct:instance-type PhysicalConnector;}
      }
      leaf-list targetPhysicalConnector {
         type instance-identifier {ct:instance-type PhysicalConnector;}
      }
   }
        
   ct:complex-type PhysicalConnector {
      ct:extends Hardware;
        leaf location {type string;}
        // ...
      leaf-list sourcePhysicalConnector {
         type instance-identifier {ct:instance-type PhysicalConnector;}
      }
      leaf-list targetPhysicalConnector {
         type instance-identifier {ct:instance-type PhysicalConnector;}
      }
   }
        
   ct:complex-type Equipment {
      ct:extends ManagedHardware;
        // ...
      ct:instance-list equipment {
    ct:instance-type Equipment;
}
   }
        
   ct:complex-type Equipment {
      ct:extends ManagedHardware;
        // ...
      ct:instance-list equipment {
    ct:instance-type Equipment;
}
   }
        
   ct:complex-type EquipmentHolder {
      ct:extends ManagedHardware;
      description "In the SID V8 definition, this is a class based on
        the M.3100 specification.  A base class that represents physical
        objects that are both manageable as well as able to host,
        hold, or contain other physical objects.  Examples of physical
        
   ct:complex-type EquipmentHolder {
      ct:extends ManagedHardware;
      description "In the SID V8 definition, this is a class based on
        the M.3100 specification.  A base class that represents physical
        objects that are both manageable as well as able to host,
        hold, or contain other physical objects.  Examples of physical
        
        objects that can be represented by instances of this object
        class are Racks, Chassis, Cards, and Slots.
        A piece of equipment with the primary purpose of containing
        other equipment.";
        leaf vendorName {type string;}
        // ...
      ct:instance-list equipment {
       ct:instance-type Equipment;
        }
      ct:instance-list equipmentHolder {
       ct:instance-type EquipmentHolder;
       }
   }
   // ...
}
        
        objects that can be represented by instances of this object
        class are Racks, Chassis, Cards, and Slots.
        A piece of equipment with the primary purpose of containing
        other equipment.";
        leaf vendorName {type string;}
        // ...
      ct:instance-list equipment {
       ct:instance-type Equipment;
        }
      ct:instance-list equipmentHolder {
       ct:instance-type EquipmentHolder;
       }
   }
   // ...
}
        

<CODE ENDS>

<代码结束>

1.5.2. Modeling Entity MIB Entries as Physical Resources
1.5.2. 将实体MIB条目建模为物理资源

The physical resource module described above can now be used to model physical entities as defined in the Entity MIB [RFC4133]. For each physical entity class listed in the "PhysicalClass" enumeration, a complex type is defined. Each of these complex types extends the most specific complex type already available in the physical resource module. For example, the type "HWModule" extends the complex type "Equipment" as a hardware module. Physical entity properties that should be included in a physical entity complex type are combined in a grouping, which is then used in each complex type definition of an entity.

上述物理资源模块现在可用于实体MIB[RFC4133]中定义的物理实体建模。对于“PhysicalClass”枚举中列出的每个物理实体类,定义了一个复杂类型。这些复杂类型中的每一个都扩展了物理资源模块中已有的最具体的复杂类型。例如,“HWModule”类型将复杂类型“Equipment”扩展为硬件模块。应包含在物理实体复杂类型中的物理实体属性组合在一个分组中,然后在实体的每个复杂类型定义中使用该分组。

This approach has following benefits:

这种方法有以下好处:

o The definition of the complex types for hardware entities becomes compact as many of the features can be reused from the basic complex type definition.

o 硬件实体的复杂类型定义变得紧凑,因为许多功能可以从基本复杂类型定义中重用。

o Physical entities are modeled in a consistent manner as predefined concepts are extended.

o 随着预定义概念的扩展,物理实体以一致的方式建模。

o Entity-MIB-specific attributes as well as vendor-specific attributes can be added without having to define separate extension data nodes.

o 可以添加实体MIB特定属性以及供应商特定属性,而无需定义单独的扩展数据节点。

                            Module udmcore  :  Module hardware-entities
                                            :
                                equipment   :
                                Holder      :
                                0..*        :
                                +-------+   :
                                |       |   :
   +---------------+     +---------+    |   :
   |ManagedHardware|<|-+-|Equipment|<>--+   :
   +---------------+   | | Holder  |0..1    :     +-------+
                       | |         |<|---------+--|Chassis|
                       | +---------+        :  |  +-------+
                       |   <>               :  |
                       |   |0..* equipment  :  |  +---------+
                       |   |     Holder     :  '--|Container|
                       |   |                :     +---------+
                       |   |0..* equipment  :
                       |   |                :
                       |   |    equipment   :
                       |   |    0..*        :
                       |   |    +-------+   :
                       |   |    |       |   :
                       | +---------+    |   :
                       '-|Equipment|<>--+   :     +--------+
                         |         |<|---------+--|HWModule|
                         +---------+        :  |  +--------+
                      compositeEquipment    :  |
                                            :  |  +---------+
                                            :  |--|Backplane|
                                            :     +---------+
        
                            Module udmcore  :  Module hardware-entities
                                            :
                                equipment   :
                                Holder      :
                                0..*        :
                                +-------+   :
                                |       |   :
   +---------------+     +---------+    |   :
   |ManagedHardware|<|-+-|Equipment|<>--+   :
   +---------------+   | | Holder  |0..1    :     +-------+
                       | |         |<|---------+--|Chassis|
                       | +---------+        :  |  +-------+
                       |   <>               :  |
                       |   |0..* equipment  :  |  +---------+
                       |   |     Holder     :  '--|Container|
                       |   |                :     +---------+
                       |   |0..* equipment  :
                       |   |                :
                       |   |    equipment   :
                       |   |    0..*        :
                       |   |    +-------+   :
                       |   |    |       |   :
                       | +---------+    |   :
                       '-|Equipment|<>--+   :     +--------+
                         |         |<|---------+--|HWModule|
                         +---------+        :  |  +--------+
                      compositeEquipment    :  |
                                            :  |  +---------+
                                            :  |--|Backplane|
                                            :     +---------+
        

Figure 2: Hardware Entities Model

图2:硬件实体模型

Below is an excerpt of the corresponding YANG module using complex types to model hardware entities. The complete YANG module for the Hardware Entities model in Figure 2 can be found in Appendix A, "YANG Modules for Physical Network Resource Model and Hardware Entities Model".

下面是使用复杂类型对硬件实体建模的相应模块的摘录。图2中硬件实体模型的完整YANG模块可在附录A“物理网络资源模型和硬件实体模型的YANG模块”中找到。

<CODE BEGINS>

<代码开始>

module hardware-entities {

模块硬件实体{

   namespace "http://example.com/hardware-entities";
   prefix "hwe";
        
   namespace "http://example.com/hardware-entities";
   prefix "hwe";
        
   import ietf-yang-types {prefix "yt";}
   import ietf-complex-types {prefix "ct";}
   import udmcore {prefix "uc";}
        
   import ietf-yang-types {prefix "yt";}
   import ietf-complex-types {prefix "ct";}
   import udmcore {prefix "uc";}
        
   grouping PhysicalEntityProperties {
      // ...
      leaf mfgDate {type yang:date-and-time; }
      leaf-list uris {type string; }
   }
        
   grouping PhysicalEntityProperties {
      // ...
      leaf mfgDate {type yang:date-and-time; }
      leaf-list uris {type string; }
   }
        

// Physical entities representing equipment

//代表设备的物理实体

   ct:complex-type HWModule {
      ct:extends uc:Equipment;
      description "Complex type representing module entries
                   (entPhysicalClass = module(9)) in entPhysicalTable";
      uses PhysicalEntityProperties;
   }
        
   ct:complex-type HWModule {
      ct:extends uc:Equipment;
      description "Complex type representing module entries
                   (entPhysicalClass = module(9)) in entPhysicalTable";
      uses PhysicalEntityProperties;
   }
        

// ...

// ...

// Physical entities representing equipment holders

//代表设备持有人的实体

   ct:complex-type Chassis {
      ct:extends uc:EquipmentHolder;
      description "Complex type representing chassis entries
                   (entPhysicalClass = chassis(3)) in entPhysicalTable";
      uses PhysicalEntityProperties;
   }
        
   ct:complex-type Chassis {
      ct:extends uc:EquipmentHolder;
      description "Complex type representing chassis entries
                   (entPhysicalClass = chassis(3)) in entPhysicalTable";
      uses PhysicalEntityProperties;
   }
        

// ... }

// ... }

<CODE ENDS>

<代码结束>

2. Complex Types
2. 复杂类型
2.1. Definition
2.1. 释义

YANG type concept is currently restricted to simple types, e.g., restrictions of primitive types, enumerations, or union of simple types.

YANG类型概念目前仅限于简单类型,例如,基本类型的限制、枚举或简单类型的并集。

Complex types are types with a rich internal structure, which may be composed of substatements defined in Table 1 (e.g., lists, leafs, containers, choices). A new complex type may extend an existing complex type. This allows providing type-safe extensions to existing YANG models as instances of the new type.

复杂类型是具有丰富内部结构的类型,可能由表1中定义的子状态组成(例如列表、叶子、容器、选项)。新的复杂类型可以扩展现有的复杂类型。这允许将现有模型作为新类型的实例提供类型安全扩展。

Complex types have the following characteristics:

复杂类型具有以下特征:

o Introduction of new types, as a named, formal description of a concrete manageable resource as well as abstract concepts.

o 引入新类型,作为对具体可管理资源以及抽象概念的命名、形式化描述。

o Types can be extended, i.e., new types can be defined by specializing existing types and adding new features. Instances of such an extended type can be used wherever instances of the base type may appear.

o 可以扩展类型,也就是说,可以通过专门化现有类型和添加新功能来定义新类型。无论基类型的实例出现在何处,都可以使用这种扩展类型的实例。

o The type information is made part of the NETCONF payload in case a derived type substitutes a base type. This enables easy and efficient consumption of payload elements representing complex type instances.

o 在派生类型替换基类型的情况下,类型信息成为NETCONF有效负载的一部分。这使得能够轻松高效地使用表示复杂类型实例的有效负载元素。

2.2. complex-type Extension Statement
2.2. 复杂类型扩展语句

The extension statement "complex-type" is introduced; it accepts an arbitrary number of statements that define node trees, among other common YANG statements ("YANG Statements", Section 7 of [RFC6020]).

引入了扩展语句complex-type;它接受任意数量的定义节点树的语句,以及其他常见的YANG语句(“YANG语句,[RFC6020]第7节”)。

                    +------------------+-------------+
                    |   substatement   | cardinality |
                    +------------------+-------------+
                    |     abstract     |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    description   |     0..1    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |    ct:extends    |     0..1    |
                    |     grouping     |     0..n    |
                    |    if-feature    |     0..n    |
                    |        key       |     0..1    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    |       must       |     0..n    |
                    |    ordered-by    |     0..n    |
                    |     reference    |     0..1    |
                    |      refine      |     0..n    |
                    |      status      |     0..1    |
                    |      typedef     |     0..n    |
                    |       uses       |     0..n    |
                    +------------------+-------------+
        
                    +------------------+-------------+
                    |   substatement   | cardinality |
                    +------------------+-------------+
                    |     abstract     |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    description   |     0..1    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |    ct:extends    |     0..1    |
                    |     grouping     |     0..n    |
                    |    if-feature    |     0..n    |
                    |        key       |     0..1    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    |       must       |     0..n    |
                    |    ordered-by    |     0..n    |
                    |     reference    |     0..1    |
                    |      refine      |     0..n    |
                    |      status      |     0..1    |
                    |      typedef     |     0..n    |
                    |       uses       |     0..n    |
                    +------------------+-------------+
        

Table 1: complex-type's Substatements

表1:复杂类型的子状态

Complex type definitions may appear at every place where a grouping may be defined. That includes the module, submodule, rpc, input, output, notification, container, and list statements.

复杂类型定义可能出现在定义分组的每个位置。包括模块、子模块、rpc、输入、输出、通知、容器和列表语句。

Complex type names populate a distinct namespace. As with YANG groupings, it is possible to define a complex type and a data node (e.g., leaf, list, instance statements) with the same name in the same scope. All complex type names defined within a parent node or at the top level of the module or its submodules share the same type identifier namespace. This namespace is scoped to the parent node or module.

复杂类型名称填充不同的命名空间。与YANG分组一样,可以在同一范围内定义具有相同名称的复杂类型和数据节点(例如,叶、列表、实例语句)。在父节点内或在模块或其子模块的顶层定义的所有复杂类型名称共享相同的类型标识符命名空间。此命名空间的作用域为父节点或模块。

A complex type MAY have an instance key. An instance key is either defined with the "key" statement as part of the complex type or is inherited from the base complex type. It is not allowed to define an additional key if the base complex type or one of its ancestors already defines a key.

复杂类型可能具有实例键。实例键要么是作为复杂类型的一部分使用“key”语句定义的,要么是从基本复杂类型继承的。如果基本复杂类型或其祖先之一已定义了键,则不允许定义其他键。

Complex type definitions do not create nodes in the schema tree.

复杂类型定义不会在架构树中创建节点。

2.3. instance Extension Statement
2.3. 实例扩展语句

The "instance" extension statement is used to instantiate a complex type by creating a subtree in the management information node tree. The instance statement takes one argument that is the identifier of the complex type instance. It is followed by a block of substatements.

“instance”扩展语句用于通过在管理信息节点树中创建子树来实例化复杂类型。instance语句接受一个参数,该参数是复杂类型实例的标识符。它后面是一块子语句。

The type of the instance is specified with the mandatory "ct: instance-type" substatement. The type of an instance MUST be a complex type. Common YANG statements may be used as substatements of the "instance" statement. An instance is optional by default. To make an instance mandatory, "mandatory true" has to be applied as a substatement.

实例的类型由强制的“ct:instance type”子语句指定。实例的类型必须是复杂类型。公共语句可以用作“实例”语句的子语句。默认情况下,实例是可选的。要使实例成为必需的,必须将“mandatory true”作为子语句应用。

                    +------------------+-------------+
                    |   substatement   | cardinality |
                    +------------------+-------------+
                    |    description   |     0..1    |
                    |      config      |     0..1    |
                    | ct:instance-type |      1      |
                    |    if-feature    |     0..n    |
                    |     mandatory    |     0..1    |
                    |       must       |     0..n    |
                    |     reference    |     0..1    |
                    |      status      |     0..1    |
                    |       when       |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    +------------------+-------------+
        
                    +------------------+-------------+
                    |   substatement   | cardinality |
                    +------------------+-------------+
                    |    description   |     0..1    |
                    |      config      |     0..1    |
                    | ct:instance-type |      1      |
                    |    if-feature    |     0..n    |
                    |     mandatory    |     0..1    |
                    |       must       |     0..n    |
                    |     reference    |     0..1    |
                    |      status      |     0..1    |
                    |       when       |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    +------------------+-------------+
        

Table 2: instance's Substatements

表2:实例的子语句

The "instance" and "instance-list" extension statements (see Section 2.4, "instance-list Extension Statement") are similar to the existing "leaf" and "leaf-list" statements, with the exception that the content is composed of subordinate elements according to the instantiated complex type.

“实例”和“实例列表”扩展语句(参见第2.4节“实例列表扩展语句”)与现有的“叶”和“叶列表”语句类似,只是内容根据实例化的复杂类型由从属元素组成。

It is also possible to add additional data nodes by using the corresponding leaf, leaf-list, list, and choice-statements, etc., as substatements of the instance declaration. This is an in-place

还可以使用相应的叶、叶列表、列表和选择语句等作为实例声明的子语句来添加其他数据节点。这是一个到位的解决方案

augmentation of the used complex type confined to a complex type instantiation (see also Section 2.13, "Using Complex Types", for details on augmenting complex types).

仅限于复杂类型实例化的已用复杂类型的扩充(有关扩充复杂类型的详细信息,请参见第2.13节“使用复杂类型”)。

2.4. instance-list Extension Statement
2.4. 实例列表扩展语句

The "instance-list" extension statement is used to instantiate a complex type by defining a sequence of subtrees in the management information node tree. In addition, the "instance-list" statement takes one argument that is the identifier of the complex type instances. It is followed by a block of substatements.

“instance list”扩展语句用于通过在管理信息节点树中定义一系列子树来实例化复杂类型。此外,“instancelist”语句接受一个参数,该参数是复杂类型实例的标识符。它后面是一块子语句。

The type of the instance is specified with the mandatory "ct: instance-type" substatement. In addition, it can be defined how often an instance may appear in the schema tree by using the "min-elements" and "max-elements" substatements. Common YANG statements may be used as substatements of the "instance-list" statement.

实例的类型由强制的“ct:instance type”子语句指定。此外,还可以通过使用“最小元素”和“最大元素”子状态来定义实例在模式树中出现的频率。公共语句可以用作“实例列表”语句的子语句。

In analogy to the "instance" statement, YANG substatements like "list", "choice", "leaf", etc., MAY be used to augment the "instance-list" elements at the root level with additional data nodes.

与“instance”语句类似,可以使用诸如“list”、“choice”、“leaf”等子语句在根级别用额外的数据节点扩充“instance list”元素。

                    +------------------+-------------+
                    |   substatementc  | cardinality |
                    +------------------+-------------+
                    |    description   |     0..1    |
                    |      config      |     0..1    |
                    | ct:instance-type |      1      |
                    |    if-feature    |     0..n    |
                    |   max-elements   |     0..1    |
                    |   min-elements   |     0..1    |
                    |       must       |     0..n    |
                    |    ordered-by    |     0..1    |
                    |     reference    |     0..1    |
                    |      status      |     0..1    |
                    |       when       |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    +------------------+-------------+
        
                    +------------------+-------------+
                    |   substatementc  | cardinality |
                    +------------------+-------------+
                    |    description   |     0..1    |
                    |      config      |     0..1    |
                    | ct:instance-type |      1      |
                    |    if-feature    |     0..n    |
                    |   max-elements   |     0..1    |
                    |   min-elements   |     0..1    |
                    |       must       |     0..n    |
                    |    ordered-by    |     0..1    |
                    |     reference    |     0..1    |
                    |      status      |     0..1    |
                    |       when       |     0..1    |
                    |      anyxml      |     0..n    |
                    |      choice      |     0..n    |
                    |     container    |     0..n    |
                    |    ct:instance   |     0..n    |
                    | ct:instance-list |     0..n    |
                    |       leaf       |     0..n    |
                    |     leaf-list    |     0..n    |
                    |       list       |     0..n    |
                    +------------------+-------------+
        

Table 3: instance-list's Substatements

表3:实例列表的子状态

In case the instance list represents configuration data, the used complex type of an instance MUST have an instance key.

如果实例列表表示配置数据,则所使用的复杂实例类型必须具有实例密钥。

Instances as well as instance lists may appear as arguments of the "deviate" statement.

实例以及实例列表可能会显示为“偏离”语句的参数。

2.5. extends Extension Statement
2.5. 扩展扩展语句

A complex type MAY extend exactly one existing base complex type by using the "extends" extension statement. The keyword "extends" MAY occur as a substatement of the "complex-type" extension statement. The argument of the "complex-type" extension statement refers to the base complex type via its name. In case a complex type represents configuration data (the default), it MUST have a key; otherwise, it MAY have a key. A key is either defined with the "key" statement as part of the complex type or is inherited from the base complex type.

复杂类型可以通过使用“extends”扩展语句精确扩展一个现有的基本复杂类型。关键字“extends”可以作为“complex type”扩展语句的子语句出现。“复杂类型”扩展语句的参数通过其名称引用基本复杂类型。如果复杂类型表示配置数据(默认值),则必须具有密钥;否则,它可能有一个键。键可以用“key”语句定义为复杂类型的一部分,也可以从基复杂类型继承。

                      +--------------+-------------+
                      | substatement | cardinality |
                      +--------------+-------------+
                      |  description |     0..1    |
                      |   reference  |     0..1    |
                      |    status    |     0..1    |
                      +--------------+-------------+
        
                      +--------------+-------------+
                      | substatement | cardinality |
                      +--------------+-------------+
                      |  description |     0..1    |
                      |   reference  |     0..1    |
                      |    status    |     0..1    |
                      +--------------+-------------+
        

Table 4: extends' Substatements

表4:扩展的子状态

2.6. abstract Extension Statement
2.6. 抽象扩展语句

Complex types may be declared to be abstract by using the "abstract" extension statement. An abstract complex type cannot be instantiated, meaning it cannot appear as the most specific type of an instance in the NETCONF payload. In case an abstract type extends a base type, the base complex type MUST be also abstract. By default, complex types are not abstract.

复杂类型可以通过使用“abstract”扩展语句声明为抽象类型。抽象复杂类型无法实例化,这意味着它不能作为NETCONF负载中最具体的实例类型出现。如果抽象类型扩展了基类型,则基复杂类型也必须是抽象的。默认情况下,复杂类型不是抽象类型。

The abstract complex type serves only as a base type for derived concrete complex types and cannot be used as a type for an instance in the NETCONF payload.

抽象复杂类型仅用作派生的具体复杂类型的基类型,不能用作NETCONF负载中实例的类型。

The "abstract" extension statement takes a single string argument, which is either "true" or "false". In case a "complex-type" statement does not contain an "abstract" statement as a substatement, the default is "false". The "abstract" statement does not support any substatements.

“abstract”扩展语句接受单个字符串参数,该参数为“true”或“false”。如果“复杂类型”语句不包含“抽象”语句作为子语句,则默认值为“false”。“abstract”语句不支持任何子语句。

2.7. XML Encoding Rules
2.7. XML编码规则

An "instance" node is encoded as an XML element, where an "instance-list" node is encoded as a series of XML elements. The corresponding XML element names are the "instance" and "instance-list" identifiers, respectively, and they use the same XML namespace as the module.

“实例”节点编码为XML元素,其中“实例列表”节点编码为一系列XML元素。相应的XML元素名称分别是“实例”和“实例列表”标识符,它们使用与模块相同的XML名称空间。

Instance child nodes are encoded as subelements of the instance XML element. Subelements representing child nodes defined in the same complex type may appear in any order. However, child nodes of an extending complex type follow the child nodes of the extended complex type. As such, the XML encoding of lists is similar to the encoding of containers and lists in YANG.

实例子节点编码为实例XML元素的子元素。表示在同一复杂类型中定义的子节点的子元素可以以任何顺序出现。但是,扩展复杂类型的子节点跟随扩展复杂类型的子节点。因此,列表的XML编码类似于YANG中容器和列表的编码。

Instance key nodes are encoded as subelements of the instance XML element. Instance key nodes must appear in the same order as they are defined within the "key" statement of the corresponding complex type definition and precede all other nodes defined in the same complex type. That is, if key nodes are defined in an extending complex type, XML elements representing key data precede all other XML elements representing child nodes. On the other hand, XML elements representing key data follow the XML elements representing data nodes of the base type.

实例键节点编码为实例XML元素的子元素。实例键节点的出现顺序必须与它们在相应复杂类型定义的“key”语句中定义的顺序相同,并且必须位于同一复杂类型中定义的所有其他节点之前。也就是说,如果关键节点是在扩展复杂类型中定义的,则表示关键数据的XML元素优先于表示子节点的所有其他XML元素。另一方面,表示关键数据的XML元素遵循表示基本类型的数据节点的XML元素。

The type of the actual complex type instance is encoded in a type element, which is put in front of all instance child elements, including key nodes, as described in Section 2.8 ("Type Encoding Rules").

实际复杂类型实例的类型编码在类型元素中,该类型元素放在所有实例子元素(包括关键节点)的前面,如第2.8节(“类型编码规则”)所述。

The proposed XML encoding rules conform to the YANG XML encoding rules in [RFC6020]. Compared to YANG, enabling key definitions in derived hierarchies is a new feature introduced with the complex types extension. As a new language feature, complex types also introduce a new payload entry for the instance type identifier.

建议的XML编码规则符合[RFC6020]中的XML编码规则。与YANG相比,在派生层次结构中启用键定义是复杂类型扩展引入的一个新特性。作为一种新的语言特性,复杂类型还为实例类型标识符引入了一个新的有效负载条目。

Based on our implementation experience, the proposed XML encoding rules support consistent mapping of YANG models with complex types to an XML schema using XML complex types.

根据我们的实现经验,建议的XML编码规则支持使用XML复杂类型将复杂类型的模型一致映射到XML模式。

2.8. Type Encoding Rules
2.8. 类型编码规则

In order to encode the type of an instance in the NETCONF payload, XML elements named "type" belonging to the XML namespace "urn:ietf:params:xml:ns:yang:ietf-complex-type-instance" are added to the serialized form of instance and instance-list nodes in the payload. The suggested namespace prefix is "cti". The "cti:type" XML elements are inserted before the serialized form of all members that have been declared in the corresponding complex type definition.

为了对NETCONF负载中的实例类型进行编码,将属于XML命名空间“urn:ietf:params:XML:ns:yang:ietf complex type instance”的名为“type”的XML元素添加到负载中实例和实例列表节点的序列化形式中。建议的名称空间前缀为“cti”。“cti:type”XML元素插入到相应复杂类型定义中声明的所有成员的序列化形式之前。

The "cti:type" element is inserted for each type in the extension chain to the actual type of the instance (most specific last). Each type name includes its corresponding namespace.

将为扩展链中的每个类型插入“cti:type”元素,使其成为实例的实际类型(最具体的最后一个)。每个类型名称都包含其相应的命名空间。

The type of a complex type instance MUST be encoded in the reply to NETCONF <get> and <get-config> operations, and in the payload of a NETCONF <edit-config> operation if the operation is "create" or "replace". The type of the instance MUST also be specified in case <copy-config> is used to export a configuration to a resource addressed with an URI. The type of the instance has to be specified in user-defined remote procedure calls (RPCs).

复杂类型实例的类型必须在对NETCONF<get>和<get config>操作的回复中编码,如果操作为“create”或“replace”,则必须在NETCONF<edit config>操作的有效负载中编码。如果使用<copy config>将配置导出到使用URI寻址的资源,则还必须指定实例的类型。实例的类型必须在用户定义的远程过程调用(RPC)中指定。

The type of the instance MAY be specified in case the operation is "merge" (either because this is explicitly specified or no operation attribute is provided).

在操作为“merge”的情况下,可以指定实例的类型(因为这是显式指定的,或者没有提供操作属性)。

In case the node already exists in the target configuration and the type attribute (type of a complex type instance) is specified but differs from the data in the target, an <rpc-error> element is returned with an <error-app-tag> value of "wrong-complex-type". In case no such element is present in the target configuration but the type attribute is missing in the configuration data, an <rpc-error> element is returned with an <error-tag> value of "missing-attribute".

如果目标配置中已经存在该节点,并且指定了type属性(复杂类型实例的类型),但与目标中的数据不同,则返回一个<rpc error>元素,其<error app tag>值为“error complex type”。如果目标配置中不存在此类元素,但配置数据中缺少type属性,则返回一个<rpc error>元素,其<error tag>值为“missing attribute”。

The type MUST NOT be specified in case the operation is "delete".

如果操作为“删除”,则不能指定类型。

2.9. Extension and Feature Definition Module
2.9. 扩展和特征定义模块

The module below contains all YANG extension definitions for complex types and typed instance identifiers. In addition, a "complex-type" feature is defined, which may be used to provide conditional or alternative modeling, depending on the support status of complex types in a NETCONF server. A NETCONF server that supports the modeling features for complex types and the XML encoding for complex types as defined in this document MUST advertise this as a feature. This is done by including the feature name "complex-types" in the feature parameter list as part of the NETCONF <hello> message as described in Section 5.6.4 in [RFC6020].

下面的模块包含复杂类型和类型化实例标识符的所有扩展定义。此外,还定义了“复杂类型”功能,该功能可用于提供条件建模或替代建模,具体取决于NETCONF服务器中复杂类型的支持状态。支持复杂类型的建模功能和本文档中定义的复杂类型的XML编码的NETCONF服务器必须将其作为功能进行宣传。如[RFC6020]第5.6.4节所述,通过将功能名称“复杂类型”包含在功能参数列表中,作为NETCONF<hello>消息的一部分来实现。

 <CODE BEGINS> file "ietf-complex-types@2011-03-15.yang"
        
 <CODE BEGINS> file "ietf-complex-types@2011-03-15.yang"
        

module ietf-complex-types {

模块ietf复杂类型{

    namespace "urn:ietf:params:xml:ns:yang:ietf-complex-types";
    prefix "ct";
        
    namespace "urn:ietf:params:xml:ns:yang:ietf-complex-types";
    prefix "ct";
        

organization

组织

"NETMOD WG";

“NETMOD WG”;

    contact
      "Editor:  Bernd Linowski
                <bernd.linowski.ext@nsn.com>
       Editor:  Mehmet Ersue
                <mehmet.ersue@nsn.com>
       Editor:  Siarhei Kuryla
                <s.kuryla@gmail.com>";
        
    contact
      "Editor:  Bernd Linowski
                <bernd.linowski.ext@nsn.com>
       Editor:  Mehmet Ersue
                <mehmet.ersue@nsn.com>
       Editor:  Siarhei Kuryla
                <s.kuryla@gmail.com>";
        

description "YANG extensions for complex types and typed instance identifiers.

description“复杂类型和类型化实例标识符的扩展。

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

版权所有(c)2011 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 (http://trustee.ietf.org/license-info).

根据IETF信托有关IETF文件的法律规定第4.c节规定的简化BSD许可证中包含的许可条款,允许以源代码和二进制格式重新分发和使用,无论是否修改(http://trustee.ietf.org/license-info).

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

此模块的此版本是RFC 6095的一部分;有关完整的法律通知,请参见RFC本身。“;

        revision 2011-03-15 {
            description "Initial revision.";
        }
        
        revision 2011-03-15 {
            description "Initial revision.";
        }
        
         extension complex-type {
             description "Defines a complex-type.";
             reference "Section 2.2, complex-type Extension Statement";
             argument type-identifier {
                 yin-element true;
             }
         }
        
         extension complex-type {
             description "Defines a complex-type.";
             reference "Section 2.2, complex-type Extension Statement";
             argument type-identifier {
                 yin-element true;
             }
         }
        
         extension extends {
             description "Defines the base type of a complex-type.";
             reference "Section 2.5, extends Extension Statement";
             argument base-type-identifier {
                 yin-element true;
             }
         }
        
         extension extends {
             description "Defines the base type of a complex-type.";
             reference "Section 2.5, extends Extension Statement";
             argument base-type-identifier {
                 yin-element true;
             }
         }
        
         extension abstract {
             description "Makes the complex-type abstract.";
             reference "Section 2.6, abstract Extension Statement";
             argument status;
         }
        
         extension abstract {
             description "Makes the complex-type abstract.";
             reference "Section 2.6, abstract Extension Statement";
             argument status;
         }
        
         extension instance {
             description "Declares an instance of the given
                  complex type.";
             reference "Section 2.3, instance Extension Statement";
             argument ct-instance-identifier {
                 yin-element true;
             }
         }
        
         extension instance {
             description "Declares an instance of the given
                  complex type.";
             reference "Section 2.3, instance Extension Statement";
             argument ct-instance-identifier {
                 yin-element true;
             }
         }
        
         extension instance-list {
             description "Declares a list of instances of the given
                  complex type";
             reference "Section 2.4, instance-list Extension Statement";
             argument ct-instance-identifier {
                 yin-element true;
             }
         }
        
         extension instance-list {
             description "Declares a list of instances of the given
                  complex type";
             reference "Section 2.4, instance-list Extension Statement";
             argument ct-instance-identifier {
                 yin-element true;
             }
         }
        
         extension instance-type {
             description "Tells to which type instance the instance
                          identifier refers.";
             reference "Section 3.2, instance-type Extension Statement";
             argument target-type-identifier {
                 yin-element true;
             }
         }
        
         extension instance-type {
             description "Tells to which type instance the instance
                          identifier refers.";
             reference "Section 3.2, instance-type Extension Statement";
             argument target-type-identifier {
                 yin-element true;
             }
         }
        
         feature complex-types {
             description "Indicates that the server supports
                          complex types and instance identifiers.";
         }
        
         feature complex-types {
             description "Indicates that the server supports
                          complex types and instance identifiers.";
         }
        

}

}

<CODE ENDS>

<代码结束>

2.10. Example Model for Complex Types
2.10. 复杂类型的示例模型

The example model below shows how complex types can be used to represent physical equipment in a vendor-independent, abstract way. It reuses the complex types defined in the physical resource model in Section 1.5.1.

下面的示例模型显示了如何使用复杂类型以独立于供应商的抽象方式表示物理设备。它重用第1.5.1节中物理资源模型中定义的复杂类型。

<CODE BEGINS>

<代码开始>

module hw {

模块hw{

      namespace "http://example.com/hw";
      prefix "hw";
        
      namespace "http://example.com/hw";
      prefix "hw";
        
      import ietf-complex-types {prefix "ct"; }
      import udmcore {prefix "uc"; }
        
      import ietf-complex-types {prefix "ct"; }
      import udmcore {prefix "uc"; }
        

// Holder types

//支架类型

      ct:complex-type Slot {
              ct:extends uc:EquipmentHolder;
              leaf slotNumber { type uint16; config false; }
                // ...
      }
        
      ct:complex-type Slot {
              ct:extends uc:EquipmentHolder;
              leaf slotNumber { type uint16; config false; }
                // ...
      }
        
      ct:complex-type Chassis {
              ct:extends uc:EquipmentHolder;
              leaf numberOfChassisSlots { type uint32; config false; }
                // ..
      }
        
      ct:complex-type Chassis {
              ct:extends uc:EquipmentHolder;
              leaf numberOfChassisSlots { type uint32; config false; }
                // ..
      }
        

// Equipment types

//设备类型

      ct:complex-type Card {
              ct:extends uc:Equipment;
              leaf position { type uint32; mandatory true; }
                leaf slotsRequired {type unit32; }
      }
        
      ct:complex-type Card {
              ct:extends uc:Equipment;
              leaf position { type uint32; mandatory true; }
                leaf slotsRequired {type unit32; }
      }
        
      // Root Element
       ct:instance hardware { type uc:ManagedHardware; }
        
      // Root Element
       ct:instance hardware { type uc:ManagedHardware; }
        
   } // hw module
        
   } // hw module
        

<CODE ENDS>

<代码结束>

2.11. NETCONF Payload Example
2.11. NETCONF有效负载示例

Following example shows the payload of a reply to a NETCONF <get> command. The actual type of managed hardware instances is indicated with the "cti:type" elements as required by the type encoding rules. The containment hierarchy in the NETCONF XML payload reflects the containment hierarchy of hardware instances. This makes filtering based on the containment hierarchy possible without having to deal with values of leafs of type leafref that represent the tree structure in a flattened hierarchy.

下面的示例显示了对NETCONF<get>命令的应答的有效负载。托管硬件实例的实际类型由类型编码规则所要求的“cti:type”元素指示。NETCONF XML负载中的包含层次结构反映了硬件实例的包含层次结构。这使得基于包容层次结构的过滤成为可能,而不必处理表示扁平层次结构中树结构的leafref类型的叶的值。

 <hardware>
     <cti:type>uc:BasicObject</cti:type>
     <distinguishedName>/R-T31/CH-2</distinguishedName>
     <globalId>6278279001</globalId>
     <cti:type>uc:Resource</cti:type>
     <cti:type>uc:PhysicalResource</cti:type>
     <otherIdentifier>Rack R322-1</otherIdentifier>
     <serialNumber>R-US-3276279a</serialNumber>
     <cti:type>uc:Hardware</cti:type>
     <cti:type>uc:ManagedHardware</cti:type>
     <cti:type>hw:EquipmentHolder</cti:type>
     <equipmentHolder>
         <cti:type>uc:BasicObject</cti:type>
         <distinguishedName>/R-T31/CH-2/SL-1</distinguishedName>
         <globalId>548872003</globalId>
         <cti:type>uc:Resource</cti:type>
         <cti:type>uc:PhysicalResource</cti:type>
         <otherIdentifier>CU-Slot</otherIdentifier>
         <serialNumber>T-K4733890x45</serialNumber>
         <cti:type>uc:Hardware</cti:type>
         <cti:type>uc:ManagedHardware</cti:type>
         <cti:type>uc:EquipmentHolder</cti:type>
         <equipment>
             <cti:type>uc:BasicObject</cti:type>
             <distinguishedName>/R-T31/CH-2/SL-1/C-3</distinguishedName>
             <globalId>89772001</globalId>
             <cti:type>uc:Resource</cti:type>
             <cti:type>uc:PhysicalResource</cti:type>
             <otherIdentifier>ATM-45252</otherIdentifier>
             <serialNumber>A-778911-b</serialNumber>
             <cti:type>uc:Hardware</cti:type>
             <cti:type>uc:ManagedHardware</cti:type>
             <cti:type>uc:Equipment</cti:type>
             <installed>true</installed>
             <version>A2</version>
             <redundancy>1</redundancy>
             <cti:type>hw:Card</cti:type>
        
 <hardware>
     <cti:type>uc:BasicObject</cti:type>
     <distinguishedName>/R-T31/CH-2</distinguishedName>
     <globalId>6278279001</globalId>
     <cti:type>uc:Resource</cti:type>
     <cti:type>uc:PhysicalResource</cti:type>
     <otherIdentifier>Rack R322-1</otherIdentifier>
     <serialNumber>R-US-3276279a</serialNumber>
     <cti:type>uc:Hardware</cti:type>
     <cti:type>uc:ManagedHardware</cti:type>
     <cti:type>hw:EquipmentHolder</cti:type>
     <equipmentHolder>
         <cti:type>uc:BasicObject</cti:type>
         <distinguishedName>/R-T31/CH-2/SL-1</distinguishedName>
         <globalId>548872003</globalId>
         <cti:type>uc:Resource</cti:type>
         <cti:type>uc:PhysicalResource</cti:type>
         <otherIdentifier>CU-Slot</otherIdentifier>
         <serialNumber>T-K4733890x45</serialNumber>
         <cti:type>uc:Hardware</cti:type>
         <cti:type>uc:ManagedHardware</cti:type>
         <cti:type>uc:EquipmentHolder</cti:type>
         <equipment>
             <cti:type>uc:BasicObject</cti:type>
             <distinguishedName>/R-T31/CH-2/SL-1/C-3</distinguishedName>
             <globalId>89772001</globalId>
             <cti:type>uc:Resource</cti:type>
             <cti:type>uc:PhysicalResource</cti:type>
             <otherIdentifier>ATM-45252</otherIdentifier>
             <serialNumber>A-778911-b</serialNumber>
             <cti:type>uc:Hardware</cti:type>
             <cti:type>uc:ManagedHardware</cti:type>
             <cti:type>uc:Equipment</cti:type>
             <installed>true</installed>
             <version>A2</version>
             <redundancy>1</redundancy>
             <cti:type>hw:Card</cti:type>
        
             <usedSlots>1</usedSlots>
         </equipment>
         <cti:type>hw:Slot</cti:type>
         <slotNumber>1</slotNumber>
     </equipmentHolder>
     <cti:type>hw:Chassis</cti:type>
     <numberOfChassisSlots>6</numberOfChassisSlots>
     // ...
 </hardware>
        
             <usedSlots>1</usedSlots>
         </equipment>
         <cti:type>hw:Slot</cti:type>
         <slotNumber>1</slotNumber>
     </equipmentHolder>
     <cti:type>hw:Chassis</cti:type>
     <numberOfChassisSlots>6</numberOfChassisSlots>
     // ...
 </hardware>
        
2.12. Update Rules for Modules Using Complex Types
2.12. 使用复杂类型更新模块的规则

In addition to the module update rules specified in Section 10 in [RFC6020], modules that define complex types, instances of complex types, and typed instance identifiers must obey following rules:

除了[RFC6020]第10节中规定的模块更新规则外,定义复杂类型、复杂类型实例和类型化实例标识符的模块必须遵守以下规则:

o New complex types MAY be added.

o 可能会添加新的复杂类型。

o A new complex type MAY extend an existing complex type.

o 新的复杂类型可以扩展现有的复杂类型。

o New data definition statements MAY be added to a complex type only if:

o 只有在以下情况下,才能将新的数据定义语句添加到复杂类型:

* they are not mandatory or

* 它们不是强制性的,也不是强制性的

* they are not conditionally dependent on a new feature (i.e., they do not have an "if-feature" statement that refers to a new feature).

* 它们没有条件地依赖于新特性(即,它们没有引用新特性的“if-feature”语句)。

o The type referred to by the instance-type statement may be changed to a type that derives from the original type only if the original type does not represent configuration data.

o 只有当原始类型不表示配置数据时,实例类型语句引用的类型才能更改为从原始类型派生的类型。

2.13. Using Complex Types
2.13. 使用复杂类型

All data nodes defined inside a complex type reside in the complex type namespace, which is their parent node namespace.

在复杂类型中定义的所有数据节点都位于复杂类型命名空间中,该命名空间是它们的父节点命名空间。

2.13.1. Overriding Complex Type Data Nodes
2.13.1. 重写复杂类型数据节点

It is not allowed to override a data node inherited from a base type. That is, it is an error if a type "base" with a leaf named "foo" is extended by another complex type ("derived") with a leaf named "foo" in the same module. In case they are derived in different modules, there are two distinct "foo" nodes that are mapped to the XML namespaces of the module, where the complex types are specified.

不允许重写从基类型继承的数据节点。也就是说,如果具有名为“foo”的叶的类型“base”在同一模块中被另一个具有名为“foo”的叶的复杂类型(“派生”)扩展,则这是一个错误。如果它们是在不同的模块中派生的,则有两个不同的“foo”节点映射到模块的XML名称空间,其中指定了复杂类型。

A complex type that extends a basic complex type may use the "refine" statement in order to improve an inherited data node. The target node identifier must be qualified by the module prefix to indicate clearly which inherited node is refined.

扩展基本复杂类型的复杂类型可以使用“refine”语句来改进继承的数据节点。目标节点标识符必须由模块前缀限定,以清楚地指示哪个继承节点被细化。

The following refinements can be done:

可以进行以下改进:

o A leaf or choice node may have a default value, or a new default value if it already had one.

o 叶节点或选择节点可以具有默认值,如果已经具有默认值,则可以具有新的默认值。

o Any node may have a different "description" or "reference" string.

o 任何节点都可能具有不同的“描述”或“引用”字符串。

o A leaf, anyxml, or choice node may have a "mandatory true" statement. However, it is not allowed to change from "mandatory true" to "mandatory false".

o 叶、anyxml或choice节点可能有一个“强制true”语句。但是,不允许从“强制为真”更改为“强制为假”。

o A leaf, leaf-list, list, container, or anyxml node may have additional "must" expressions.

o 叶、叶列表、列表、容器或任意XML节点可能有其他“必须”表达式。

o A list, leaf-list, instance, or instance-list node may have a "min-elements" statement, if the base type does not have one or does not have one with a value that is greater than the minimum value of the base type.

o 如果基类型没有或没有大于基类型最小值的“最小元素”语句,则列表、叶列表、实例或实例列表节点可能有一个“最小元素”语句。

o A list, leaf-list, instance, or instance-list node may have a "max-elements" statement, if the base type does not have one or does not have one with a value that is smaller than the maximum value of the base type.

o 如果基类型没有“max elements”语句,或者没有值小于基类型最大值的语句,则列表、叶列表、实例或实例列表节点可能有“max elements”语句。

It is not allowed to refine complex-type nodes inside "instance" or "instance-list" statements.

不允许在“instance”或“instance list”语句中细化复杂类型节点。

2.13.2. Augmenting Complex Types
2.13.2. 扩充复杂类型

Augmenting complex types is only allowed if a complex type is instantiated in an "instance" or "instance-list" statement. This confines the effect of the augmentation to the location in the schema tree where the augmentation is done. The argument of the "augment" statement MUST be in the descendant form (as defined by the rule "descendant-schema-nodeid" in Section 12 in [RFC6020]).

只有在“instance”或“instance list”语句中实例化了复杂类型时,才允许扩充复杂类型。这将扩展的效果限制在模式树中进行扩展的位置。“augment”语句的参数必须采用子体形式(如[RFC6020]第12节“子体模式节点ID”规则所定义)。

      ct:complex-type Chassis {
              ct:extends EquipmentHolder;
              container chassisInfo {
                     config false;
                     leaf numberOfSlots { type uint16; }
                     leaf occupiedSlots { type uint16; }
                     leaf height {type unit16;}
                     leaf width {type unit16;}
                }
      }
        
      ct:complex-type Chassis {
              ct:extends EquipmentHolder;
              container chassisInfo {
                     config false;
                     leaf numberOfSlots { type uint16; }
                     leaf occupiedSlots { type uint16; }
                     leaf height {type unit16;}
                     leaf width {type unit16;}
                }
      }
        
      ct:instance-list chassis {
              type Chassis;
              augment "chassisInfo" {
                     leaf modelId { type string; }
              }
      }
        
      ct:instance-list chassis {
              type Chassis;
              augment "chassisInfo" {
                     leaf modelId { type string; }
              }
      }
        

When augmenting a complex type, only the "container", "leaf", "list", "leaf-list", "choice", "instance", "instance-list", and "if-feature" statements may be used within the "augment" statement. The nodes added by the augmentation MUST NOT be mandatory nodes. One or many "augment" statements may not cause the creation of multiple nodes with the same name from the same namespace in the target node.

在扩充复杂类型时,“augment”语句中只能使用“container”、“leaf”、“list”、“leaf list”、“choice”、“instance”、“instance list”和“if feature”语句。由扩充添加的节点不能是强制节点。一个或多个“augment”语句可能不会导致从目标节点中的同一命名空间创建具有相同名称的多个节点。

To achieve less-complex modeling, this document proposes the augmentation of complex type instances without recursion.

为了实现不太复杂的建模,本文建议在不使用递归的情况下扩展复杂类型实例。

2.13.3. Controlling the Use of Complex Types
2.13.3. 控制复杂类型的使用

A server might not want to support all complex types defined in a supported module. This issue can be addressed with YANG features as follows:

服务器可能不希望支持受支持模块中定义的所有复杂类型。可以通过以下功能解决此问题:

o Features are defined that are used inside complex type definitions (by using "if-feature" as a substatement) to make them optional. In this case, such complex types may only be instantiated if the feature is supported (advertised as a capability in the NETCONF <hello> message).

o 定义了在复杂类型定义中使用的特征(通过使用“if feature”作为子状态),使其成为可选的。在这种情况下,只有在支持该功能的情况下(在NETCONF<hello>消息中作为一种功能公布),才能实例化这种复杂类型。

o The "deviation" statement may be applied to node trees, which are created by "instance" and "instance-list" statements. In this case, only the substatement "deviate not-supported" is allowed.

o “偏差”语句可应用于节点树,节点树由“实例”和“实例列表”语句创建。在这种情况下,仅允许子状态“不支持偏差”。

o It is not allowed to apply the "deviation" statement to node tree elements that may occur because of the recursive use of a complex type. Other forms of deviations ("deviate add", "deviate replace", "deviate delete") are NOT supported inside node trees spanned by "instance" or "instance-list".

o 不允许将“偏差”语句应用于由于递归使用复杂类型而可能出现的节点树元素。“实例”或“实例列表”跨越的节点树中不支持其他形式的偏差(“偏差添加”、“偏差替换”、“偏差删除”)。

As complex type definitions do not contribute by themselves to the data node tree, data node declarations inside complex types cannot be the target of deviations.

由于复杂类型定义本身并不影响数据节点树,因此复杂类型中的数据节点声明不能成为偏差的目标。

In the example below, client applications are informed that the leaf "occupiedSlots" is not supported in the top-level chassis. However, if a chassis contains another chassis, the contained chassis may support the leaf that reports the number of occupied slots.

在下面的示例中,客户端应用程序被告知顶级机箱不支持叶“OccupiedSlot”。但是,如果机箱包含另一个机箱,则包含的机箱可能支持报告已占用插槽数量的叶。

     deviation "/chassis/chassisSpec/occupiedSlots" {
        deviate not-supported;
     }
        
     deviation "/chassis/chassisSpec/occupiedSlots" {
        deviate not-supported;
     }
        
3. Typed Instance Identifier
3. 类型化实例标识符
3.1. Definition
3.1. 释义

Typed instance identifier relationships are an addition to the relationship types already defined in YANG, where the leafref relationship is location dependent, and the instance-identifier does not specify to which type of instances the identifier points.

类型化实例标识符关系是YANG中已定义的关系类型的补充,其中leafref关系依赖于位置,实例标识符不指定标识符指向的实例类型。

A typed instance identifier represents a reference to an instance of a complex type without being restricted to a particular location in the containment tree. This is done by using the extension statement "instance-type" as a substatement of the existing "type instance identifier" statement.

类型化实例标识符表示对复杂类型实例的引用,而不限于包含树中的特定位置。这是通过使用扩展语句“instance type”作为现有“type instance identifier”语句的子语句来实现的。

Typed instance identifiers allow referring to instances of complex types that may be located anywhere in the schema tree. The "type" statement plays the role of a restriction that must be fulfilled by the target node, which is referred to with the instance identifier. The target node MUST be of a particular complex type, either the type itself or any type that extends this complex type.

类型化实例标识符允许引用可能位于模式树中任何位置的复杂类型实例。“type”语句扮演着必须由目标节点满足的限制的角色,目标节点用实例标识符引用。目标节点必须是特定的复杂类型,类型本身或扩展此复杂类型的任何类型。

3.2. instance-type Extension Statement
3.2. 实例类型扩展语句

The "instance-type" extension statement specifies the complex type of the instance to which the instance-identifier refers. The referred instance may also instantiate any complex type that extends the specified complex type.

“instance type”扩展语句指定实例标识符引用的实例的复杂类型。引用的实例还可以实例化扩展指定复杂类型的任何复杂类型。

The instance complex type is identified by the single name argument. The referred complex type MUST have a key. This extension statement MUST be used as a substatement of the "type instance-identifier" statement. The "instance-type" extension statement does not support any substatements.

实例复杂类型由单名称参数标识。引用的复杂类型必须具有密钥。此扩展语句必须用作“类型实例标识符”语句的子语句。“实例类型”扩展语句不支持任何子语句。

3.3. Typed Instance Identifier Example
3.3. 类型化实例标识符示例

In the example below, a physical link connects an arbitrary number of physical ports. Here, typed instance identifiers are used to denote which "PhysicalPort" instances (anywhere in the data tree) are connected by a "PhysicalLink".

在下面的示例中,物理链路连接任意数量的物理端口。这里,类型化实例标识符用于表示哪些“PhysicalPort”实例(数据树中的任何位置)由“PhysicalLink”连接。

        // Extended version of type Card
        ct:complex-type Card {
           ct:extends Equipment;
           leaf usedSlot { type uint16; mandatory true; }
           ct:instance-list port {
               type PhysicalPort;
           }
        }
        
        // Extended version of type Card
        ct:complex-type Card {
           ct:extends Equipment;
           leaf usedSlot { type uint16; mandatory true; }
           ct:instance-list port {
               type PhysicalPort;
           }
        }
        
        ct:complex-type PhysicalPort {
           ct:extends ManagedHardware;
           leaf portNumber { type int32; mandatory true; }
        }
        
        ct:complex-type PhysicalPort {
           ct:extends ManagedHardware;
           leaf portNumber { type int32; mandatory true; }
        }
        
        ct:complex-type PhysicalLink {
           ct:extends ManagedHardware;
           leaf media { type string; }
           leaf-list connectedPort {
              type instance-identifier {
                ct:instance-type PhysicalPort;
              }
              min-elements 2;
           }
        }
        
        ct:complex-type PhysicalLink {
           ct:extends ManagedHardware;
           leaf media { type string; }
           leaf-list connectedPort {
              type instance-identifier {
                ct:instance-type PhysicalPort;
              }
              min-elements 2;
           }
        }
        

Below is the XML encoding of an element named "link" of type "PhysicalLink":

下面是“PhysicalLink”类型的名为“link”的元素的XML编码:

       <link>
           <objectId>FTCL-771</objectId>
           <media>Fiber</media>
           <connectedPort>/hw:hardware[objectId='R-11']
             /hw:equipment[objectId='AT22']/hw:port[objectId='P12']
           </connectedPort>
           <connectedPort>/hw:hardware[objectId='R-42]
             /hw:equipment[objectId='AT30']/hw:port[objectId='P3']
           </connectedPort>
           <serialNumber>F-7786828</serialNumber>
           <commonName>FibCon 7</commonName>
       </link>
        
       <link>
           <objectId>FTCL-771</objectId>
           <media>Fiber</media>
           <connectedPort>/hw:hardware[objectId='R-11']
             /hw:equipment[objectId='AT22']/hw:port[objectId='P12']
           </connectedPort>
           <connectedPort>/hw:hardware[objectId='R-42]
             /hw:equipment[objectId='AT30']/hw:port[objectId='P3']
           </connectedPort>
           <serialNumber>F-7786828</serialNumber>
           <commonName>FibCon 7</commonName>
       </link>
        
4. IANA Considerations
4. IANA考虑

This document registers two URIs in the IETF XML registry. IANA registered the following URIs, according to [RFC3688]:

本文档在IETF XML注册表中注册了两个URI。IANA根据[RFC3688]注册了以下URI:

   URI: urn:ietf:params:xml:ns:yang:ietf-complex-types
   URI: urn:ietf:params:xml:ns:yang:ietf-complex-type-instance
        
   URI: urn:ietf:params:xml:ns:yang:ietf-complex-types
   URI: urn:ietf:params:xml:ns:yang:ietf-complex-type-instance
        

Registrant Contact: Bernd Linowski (bernd.linowski.ext@nsn.com) Mehmet Ersue (mehmet.ersue@nsn.com) Siarhei Kuryla (s.kuryla@gmail.com)

注册人联系人:Bernd Linowski(Bernd.Linowski。ext@nsn.com)迈赫迈特·埃尔苏埃(迈赫迈特。ersue@nsn.com)西亚雷·库里拉(s。kuryla@gmail.com)

XML: N/A, the requested URIs are XML namespaces.

XML:不适用,请求的URI是XML名称空间。

This document registers one module name in the "YANG Module Names" registry, defined in [RFC6020]. name: ietf-complex-types

本文件在[RFC6020]中定义的“模块名称”注册表中注册了一个模块名称。名称:ietf复杂类型

      namespace: urn:ietf:params:xml:ns:yang:ietf-complex-types
        
      namespace: urn:ietf:params:xml:ns:yang:ietf-complex-types
        

prefix: ct

前缀:ct

RFC: 6095

传真:6095

5. Security Considerations
5. 安全考虑

The YANG module "complex-types" in this memo defines YANG extensions for complex types and typed instance identifiers as new language statements.

本备忘录中的YANG模块“复杂类型”将复杂类型的YANG扩展和类型化实例标识符定义为新的语言语句。

Complex types and typed instance identifiers themselves do not have any security impact on the Internet.

复杂类型和类型化实例标识符本身对Internet没有任何安全影响。

The security considerations described throughout [RFC6020] apply here as well.

[RFC6020]中描述的安全注意事项也适用于此处。

6. Acknowledgements
6. 致谢

The authors would like to thank to Martin Bjorklund, Balazs Lengyel, Gerhard Muenz, Dan Romascanu, Juergen Schoenwaelder, and Martin Storch for their valuable review and comments on different versions of the document.

作者要感谢Martin Bjorklund、Balazs Lengyel、Gerhard Muenz、Dan Romascanu、Juergen Schoenwaeld和Martin Storch对不同版本文件的宝贵评论和评论。

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, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004.

[RFC3688]Mealling,M.“IETF XML注册表”,BCP 81,RFC 3688,2004年1月。

[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010.

[RFC6020]Bjorklund,M.“YANG-网络配置协议(NETCONF)的数据建模语言”,RFC6020,2010年10月。

7.2. Informative References
7.2. 资料性引用

[IPFIXCONF] Muenz, G., Claise, B., and P. Aitken, "Configuration Data Model for IPFIX and PSAMP", Work in Progress, March 2011.

[IPFIXCONF]Muenz,G.,Claise,B.,和P.Aitken,“IPFIX和PSAMP的配置数据模型”,正在进行的工作,2011年3月。

[Libsmi] Kuryla, S., "Libsmi Extension for Complex Types", April 2010, <http://www.ibr.cs.tu-bs.de/svn/libsmi>.

[Libsmi]Kuryla,S.,“复杂类型的Libsmi扩展”,2010年4月<http://www.ibr.cs.tu-bs.de/svn/libsmi>.

[Pyang] Bjorklund, M., "An extensible YANG validator and converter in python", October 2010, <http://code.google.com/p/pyang/>.

[Pyang]Bjorklund,M.,“python中的可扩展YANG验证程序和转换器”,2010年10月<http://code.google.com/p/pyang/>.

[Pyang-ct] Kuryla, S., "Complex type extension for an extensible YANG validator and converter in python", April 2010, <http://code.google.com/p/pyang-ct/>.

[Pyang ct]Kuryla,S.,“python中可扩展YANG验证器和转换器的复杂类型扩展”,2010年4月<http://code.google.com/p/pyang-ct/>.

[RFC4133] Bierman, A. and K. McCloghrie, "Entity MIB (Version 3)", RFC 4133, August 2005.

[RFC4133]Bierman,A.和K.McCloghrie,“实体MIB(版本3)”,RFC 41332005年8月。

[SID_V8] TeleManagement Forum, "GB922, Information Framework (SID) Solution Suite, Release 8.0", July 2008, <http:// www.tmforum.org/DocumentsInformation/ GB922InformationFramework/35499/article.html>.

[SID_V8]远程管理论坛,“GB922,信息框架(SID)解决方案套件,8.0版”,2008年7月,<http://www.tmforum.org/DocumentsInformation/GB922InformationFramework/35499/article.html>。

[UDM] NSN, "Unified Data Model SID Compliance Statement", May 2010, <http://www.tmforum.org/InformationFramework/ NokiaSiemensNetworks/8815/home.html>.

[UDM]NSN,“统一数据模型SID合规性声明”,2010年5月<http://www.tmforum.org/InformationFramework/ 诺基亚西门子网络/8815/home.html>。

Appendix A. YANG Modules for Physical Network Resource Model and Hardware Entities Model

附录A.物理网络资源模型和硬件实体模型的模块

YANG module for the 'Physical Network Resource Model':

“物理网络资源模型”的YANG模块:

<CODE BEGINS>

<代码开始>

module udmcore {

udmcore模块{

      namespace "http://example.com/udmcore";
      prefix "udm";
        
      namespace "http://example.com/udmcore";
      prefix "udm";
        
      import ietf-yang-types {prefix "yang";}
      import ietf-complex-types {prefix "ct";}
        
      import ietf-yang-types {prefix "yang";}
      import ietf-complex-types {prefix "ct";}
        
      ct:complex-type BasicObject {
         ct:abstract true;
         key "distinguishedName";
           leaf globalId {type int64;}
           leaf distinguishedName {type string; mandatory true;}
      }
        
      ct:complex-type BasicObject {
         ct:abstract true;
         key "distinguishedName";
           leaf globalId {type int64;}
           leaf distinguishedName {type string; mandatory true;}
      }
        
      ct:complex-type ManagedObject {
         ct:extends BasicObject;
         ct:abstract true;
         leaf instance {type string;}
         leaf objectState {type int32;}
         leaf release {type string;}
      }
        
      ct:complex-type ManagedObject {
         ct:extends BasicObject;
         ct:abstract true;
         leaf instance {type string;}
         leaf objectState {type int32;}
         leaf release {type string;}
      }
        
      ct:complex-type Resource {
               ct:extends ManagedObject;
               ct:abstract true;
         leaf usageState {type int16;}
         leaf managementMethodSupported {type string;}
         leaf managementMethodCurrent {type string;}
         leaf managementInfo {type string;}
         leaf managementDomain {type string;}
         leaf version {type string;}
         leaf entityIdentification {type string;}
         leaf description {type string;}
         leaf rootEntityType {type string;}
      }
        
      ct:complex-type Resource {
               ct:extends ManagedObject;
               ct:abstract true;
         leaf usageState {type int16;}
         leaf managementMethodSupported {type string;}
         leaf managementMethodCurrent {type string;}
         leaf managementInfo {type string;}
         leaf managementDomain {type string;}
         leaf version {type string;}
         leaf entityIdentification {type string;}
         leaf description {type string;}
         leaf rootEntityType {type string;}
      }
        
      ct:complex-type LogicalResource {
         ct:extends Resource;
         ct:abstract true;
         leaf lrStatus {type int32;}
         leaf serviceState {type int32;}
         leaf isOperational {type boolean;}
      }
        
      ct:complex-type LogicalResource {
         ct:extends Resource;
         ct:abstract true;
         leaf lrStatus {type int32;}
         leaf serviceState {type int32;}
         leaf isOperational {type boolean;}
      }
        
      ct:complex-type PhysicalResource {
         ct:extends Resource;
         ct:abstract true;
         leaf manufactureDate {type string;}
         leaf otherIdentifier {type string;}
         leaf powerState {type int32;}
         leaf serialNumber {type string;}
         leaf versionNumber {type string;}
      }
        
      ct:complex-type PhysicalResource {
         ct:extends Resource;
         ct:abstract true;
         leaf manufactureDate {type string;}
         leaf otherIdentifier {type string;}
         leaf powerState {type int32;}
         leaf serialNumber {type string;}
         leaf versionNumber {type string;}
      }
        
      ct:complex-type Hardware {
         ct:extends PhysicalResource;
         ct:abstract true;
         leaf width {type string;}
         leaf height {type string;}
         leaf depth {type string;}
         leaf measurementUnits {type int32;}
         leaf weight {type string;}
         leaf weightUnits {type int32;}
         leaf-list physicalLink {
            type instance-identifier {
               ct:instance-type PhysicalLink;
            }
         }
         ct:instance-list containedHardware {
            ct:instance-type Hardware;
         }
         ct:instance-list physicalConnector {
            ct:instance-type PhysicalConnector;
         }
      }
        
      ct:complex-type Hardware {
         ct:extends PhysicalResource;
         ct:abstract true;
         leaf width {type string;}
         leaf height {type string;}
         leaf depth {type string;}
         leaf measurementUnits {type int32;}
         leaf weight {type string;}
         leaf weightUnits {type int32;}
         leaf-list physicalLink {
            type instance-identifier {
               ct:instance-type PhysicalLink;
            }
         }
         ct:instance-list containedHardware {
            ct:instance-type Hardware;
         }
         ct:instance-list physicalConnector {
            ct:instance-type PhysicalConnector;
         }
      }
        
      ct:complex-type PhysicalLink {
         ct:extends PhysicalResource;
         leaf isWireless {type boolean;}
         leaf currentLength {type string;}
         leaf maximumLength {type string;}
        
      ct:complex-type PhysicalLink {
         ct:extends PhysicalResource;
         leaf isWireless {type boolean;}
         leaf currentLength {type string;}
         leaf maximumLength {type string;}
        
         leaf mediaType {type int32;}
         leaf-list hardware {
            type instance-identifier {
               ct:instance-type Hardware;
            }
         }
      }
        
         leaf mediaType {type int32;}
         leaf-list hardware {
            type instance-identifier {
               ct:instance-type Hardware;
            }
         }
      }
        
      ct:complex-type ManagedHardware {
         ct:extends Hardware;
         leaf additionalinfo {type string;}
         leaf physicalAlarmReportingEnabled {type boolean;}
         leaf pyhsicalAlarmStatus {type int32;}
         leaf coolingRequirements {type string;}
         leaf hardwarePurpose {type string;}
         leaf isPhysicalContainer {type boolean;}
      }
        
      ct:complex-type ManagedHardware {
         ct:extends Hardware;
         leaf additionalinfo {type string;}
         leaf physicalAlarmReportingEnabled {type boolean;}
         leaf pyhsicalAlarmStatus {type int32;}
         leaf coolingRequirements {type string;}
         leaf hardwarePurpose {type string;}
         leaf isPhysicalContainer {type boolean;}
      }
        
      ct:complex-type AuxiliaryComponent {
         ct:extends ManagedHardware;
         ct:abstract true;
      }
        
      ct:complex-type AuxiliaryComponent {
         ct:extends ManagedHardware;
         ct:abstract true;
      }
        
      ct:complex-type PhysicalPort {
         ct:extends ManagedHardware;
         leaf portNumber {type int32;}
         leaf duplexMode {type int32;}
         leaf ifType {type int32;}
         leaf vendorPortName {type string;}
      }
        
      ct:complex-type PhysicalPort {
         ct:extends ManagedHardware;
         leaf portNumber {type int32;}
         leaf duplexMode {type int32;}
         leaf ifType {type int32;}
         leaf vendorPortName {type string;}
      }
        
      ct:complex-type PhysicalConnector {
         ct:extends Hardware;
         leaf location {type string;}
         leaf cableType {type int32;}
         leaf gender {type int32;}
         leaf inUse {type boolean;}
         leaf pinDescription {type string;}
         leaf typeOfConnector {type int32;}
         leaf-list sourcePhysicalConnector {
            type instance-identifier {
               ct:instance-type PhysicalConnector;
            }
         }
        
      ct:complex-type PhysicalConnector {
         ct:extends Hardware;
         leaf location {type string;}
         leaf cableType {type int32;}
         leaf gender {type int32;}
         leaf inUse {type boolean;}
         leaf pinDescription {type string;}
         leaf typeOfConnector {type int32;}
         leaf-list sourcePhysicalConnector {
            type instance-identifier {
               ct:instance-type PhysicalConnector;
            }
         }
        
         leaf-list targetPhysicalConnector {
            type instance-identifier {
               ct:instance-type PhysicalConnector;
            }
         }
      }
        
         leaf-list targetPhysicalConnector {
            type instance-identifier {
               ct:instance-type PhysicalConnector;
            }
         }
      }
        
      ct:complex-type Equipment {
         ct:extends ManagedHardware;
         leaf installStatus {type int32;}
         leaf expectedEquipmentType {type string;}
         leaf installedEquipmentType {type string;}
         leaf installedVersion {type string;}
         leaf redundancy {type int32;}
         leaf vendorName {type string;}
         leaf dateOfLastService {type yang:date-and-time;}
         leaf interchangeability {type string;}
         leaf identificationCode {type string;}
         ct:instance-list equipment {
            ct:instance-type Equipment;
         }
      }
        
      ct:complex-type Equipment {
         ct:extends ManagedHardware;
         leaf installStatus {type int32;}
         leaf expectedEquipmentType {type string;}
         leaf installedEquipmentType {type string;}
         leaf installedVersion {type string;}
         leaf redundancy {type int32;}
         leaf vendorName {type string;}
         leaf dateOfLastService {type yang:date-and-time;}
         leaf interchangeability {type string;}
         leaf identificationCode {type string;}
         ct:instance-list equipment {
            ct:instance-type Equipment;
         }
      }
        
      ct:complex-type EquipmentHolder {
         ct:extends ManagedHardware;
         leaf vendorName {type string;}
         leaf locationName {type string;}
         leaf dateOfLastService {type yang:date-and-time;}
         leaf partNumber {type string;}
         leaf availabilityStatus {type int16;}
         leaf nameFromPlanningSystem {type string;}
         leaf modelNumber {type string;}
         leaf acceptableEquipmentList {type string;}
         leaf isSolitaryHolder {type boolean;}
         leaf holderStatus {type int16;}
         leaf interchangeability {type string;}
         leaf equipmentHolderSpecificType {type string; }
         leaf position {type string;}
         leaf atomicCompositeType {type int16;}
         leaf uniquePhysical {type boolean;}
         leaf physicalDescription {type string;}
         leaf serviceApproach {type string;}
         leaf mountingOptions {type int32;}
         leaf cableManagementStrategy {type string;}
         leaf isSecureHolder {type boolean;}
         ct:instance-list equipment {
        
      ct:complex-type EquipmentHolder {
         ct:extends ManagedHardware;
         leaf vendorName {type string;}
         leaf locationName {type string;}
         leaf dateOfLastService {type yang:date-and-time;}
         leaf partNumber {type string;}
         leaf availabilityStatus {type int16;}
         leaf nameFromPlanningSystem {type string;}
         leaf modelNumber {type string;}
         leaf acceptableEquipmentList {type string;}
         leaf isSolitaryHolder {type boolean;}
         leaf holderStatus {type int16;}
         leaf interchangeability {type string;}
         leaf equipmentHolderSpecificType {type string; }
         leaf position {type string;}
         leaf atomicCompositeType {type int16;}
         leaf uniquePhysical {type boolean;}
         leaf physicalDescription {type string;}
         leaf serviceApproach {type string;}
         leaf mountingOptions {type int32;}
         leaf cableManagementStrategy {type string;}
         leaf isSecureHolder {type boolean;}
         ct:instance-list equipment {
        
            ct:instance-type Equipment;
               }
         ct:instance-list equipmentHolder {
            ct:instance-type EquipmentHolder;
         }
      }
        
            ct:instance-type Equipment;
               }
         ct:instance-list equipmentHolder {
            ct:instance-type EquipmentHolder;
         }
      }
        

// ... other resource complex types ...

// ... 其他资源复杂类型。。。

} <CODE ENDS>

}<代码结束>

YANG module for the 'Hardware Entities Model':

“硬件实体模型”的模块:

<CODE BEGINS>

<代码开始>

module hardware-entities {

模块硬件实体{

      namespace "http://example.com/:hardware-entities";
      prefix "hwe";
        
      namespace "http://example.com/:hardware-entities";
      prefix "hwe";
        
      import ietf-yang-types {prefix "yang";}
      import ietf-complex-types {prefix "ct";}
      import udmcore {prefix "uc";}
        
      import ietf-yang-types {prefix "yang";}
      import ietf-complex-types {prefix "ct";}
      import udmcore {prefix "uc";}
        
      grouping PhysicalEntityProperties {
         leaf hardwareRev {type string; }
         leaf firmwareRev {type string; }
         leaf softwareRev {type string; }
         leaf serialNum {type string; }
        
      grouping PhysicalEntityProperties {
         leaf hardwareRev {type string; }
         leaf firmwareRev {type string; }
         leaf softwareRev {type string; }
         leaf serialNum {type string; }
        
         leaf mfgName {type string; }
         leaf modelName {type string; }
         leaf alias {type string; }
         leaf ssetID{type string; }
         leaf isFRU {type boolean; }
         leaf mfgDate {type yang:date-and-time; }
         leaf-list uris {type string; }
      }
        
         leaf mfgName {type string; }
         leaf modelName {type string; }
         leaf alias {type string; }
         leaf ssetID{type string; }
         leaf isFRU {type boolean; }
         leaf mfgDate {type yang:date-and-time; }
         leaf-list uris {type string; }
      }
        

// Physical entities representing equipment

//代表设备的物理实体

      ct:complex-type Module {
         ct:extends uc:Equipment;
         description "Complex type representing module entries
        
      ct:complex-type Module {
         ct:extends uc:Equipment;
         description "Complex type representing module entries
        
            (entPhysicalClass = module(9)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
            (entPhysicalClass = module(9)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Backplane {
         ct:extends uc:Equipment;
         description "Complex type representing backplane entries
            (entPhysicalClass = backplane(4)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Backplane {
         ct:extends uc:Equipment;
         description "Complex type representing backplane entries
            (entPhysicalClass = backplane(4)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        

// Physical entities representing auxiliary hardware components

//表示辅助硬件组件的物理实体

      ct:complex-type PowerSupply {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing power supply entries
            (entPhysicalClass = powerSupply(6)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type PowerSupply {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing power supply entries
            (entPhysicalClass = powerSupply(6)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Fan {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing fan entries
            (entPhysicalClass = fan(7)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Fan {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing fan entries
            (entPhysicalClass = fan(7)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Sensor {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing sensor entries
            (entPhysicalClass = sensor(8)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Sensor {
         ct:extends uc:AuxiliaryComponent;
         description "Complex type representing sensor entries
            (entPhysicalClass = sensor(8)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        

// Physical entities representing equipment holders

//代表设备持有人的实体

      ct:complex-type Chassis {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing chassis entries
            (entPhysicalClass = chassis(3)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Chassis {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing chassis entries
            (entPhysicalClass = chassis(3)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Container {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing container entries
        
      ct:complex-type Container {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing container entries
        
            (entPhysicalClass = container(5)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
            (entPhysicalClass = container(5)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Stack {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing stack entries
            (entPhysicalClass = stack(11)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Stack {
         ct:extends uc:EquipmentHolder;
         description "Complex type representing stack entries
            (entPhysicalClass = stack(11)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        

// Other kinds of physical entities

//其他种类的物理实体

      ct:complex-type Port {
         ct:extends uc:PhysicalPort;
         description "Complex type representing port entries
            (entPhysicalClass = port(10)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type Port {
         ct:extends uc:PhysicalPort;
         description "Complex type representing port entries
            (entPhysicalClass = port(10)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type CPU {
         ct:extends uc:Hardware;
         description "Complex type representing cpu entries
            (entPhysicalClass = cpu(12)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        
      ct:complex-type CPU {
         ct:extends uc:Hardware;
         description "Complex type representing cpu entries
            (entPhysicalClass = cpu(12)) in entPhysicalTable";
         uses PhysicalEntityProperties;
      }
        

} <CODE ENDS>

}<代码结束>

Appendix B. Example YANG Module for the IPFIX/PSAMP Model

附录B.IPFIX/PSAMP模型的模块示例

B.1. Modeling Improvements for the IPFIX/PSAMP Model with Complex Types and Typed Instance Identifiers

B.1. 具有复杂类型和类型化实例标识符的IPFIX/PSAMP模型的建模改进

The module below is a variation of the IPFIX/PSAMP configuration model, which uses complex types and typed instance identifiers to model the concept outlined in [IPFIXCONF].

下面的模块是IPFIX/PSAMP配置模型的变体,它使用复杂类型和类型化实例标识符对[IPFIXCONF]中概述的概念进行建模。

When looking at the YANG module with complex types and typed instance identifiers, various technical improvements on the modeling level become apparent.

当查看具有复杂类型和类型化实例标识符的YANG模块时,建模级别上的各种技术改进变得显而易见。

o There is almost a one-to-one mapping between the domain concepts introduced in IPFIX and the complex types in the YANG module.

o IPFIX中引入的域概念与YANG模块中的复杂类型之间几乎存在一对一的映射。

o All associations between the concepts (besides containment) are represented with typed identifiers. That avoids having to refer to a particular location in the tree. Referring to a particular in the tree is not mandated by the original model.

o 概念之间的所有关联(除了包含)都用类型化标识符表示。这样可以避免引用树中的特定位置。原始模型不强制引用树中的特定对象。

o It is superfluous to represent concept refinement (class inheritance in the original model) with containment in the form of quite big choice-statements with complex branches. Instead, concept refinement is realized by complex types extending a base complex type.

o 以具有复杂分支的相当大的choice语句的形式表示包含的概念精化(原始模型中的类继承)是多余的。相反,概念细化是通过扩展基本复杂类型的复杂类型来实现的。

o It is unnecessary to introduce metadata identities and leafs (e.g., "identity cacheMode" and "leaf cacheMode" in "grouping cacheParameters") that just serve the purpose of indicating which concrete subtype of a generic type (modeled as grouping, which contains the union of all features of all subtypes) is actually represented in the MIB.

o 没有必要引入元数据标识和叶(例如,“分组缓存参数”中的“标识缓存模式”和“叶缓存模式”),这些标识和叶仅用于指示MIB中实际表示泛型类型的哪个具体子类型(建模为分组,其中包含所有子类型的所有特性的联合)。

o Ruling out illegal use of subtype-specific properties (e.g., "leaf maxFlows") by using "when" statements that refer to a subtype discriminator is not necessary (e.g., when "../cacheMode != 'immediate'").

o 不需要使用引用子类型鉴别器的“when”语句(例如,“./cacheMode!=”immediate“)来排除非法使用子类型特定属性(例如,“leaf maxFlows”)。

o Defining properties like the configuration status wherever a so called "parameter grouping" is used is not necessary. Instead, those definitions can be put inside the complex type definition itself.

o 在使用所谓的“参数分组”的地方定义诸如配置状态之类的属性是不必要的。相反,这些定义可以放在复杂类型定义本身中。

o Separating the declaration of the key from the related data nodes definitions in a grouping (see use of "grouping selectorParameters") can be avoided.

o 可以避免将密钥声明与分组中的相关数据节点定义分离(请参阅“分组选择器参数”的使用)。

o Complex types may be declared as optional features. If the type is indicated with an identity (e.g., "identity immediate"), this is not possible, since "if-feature" is not allowed as a substatement of "identity".

o 复杂类型可以声明为可选功能。如果使用标识(例如,“标识立即”)指示类型,则这是不可能的,因为“如果特征”不允许作为“标识”的子状态。

B.2. IPFIX/PSAMP Model with Complex Types and Typed Instance Identifiers

B.2. 具有复杂类型和类型化实例标识符的IPFIX/PSAMP模型

<CODE BEGINS>
module ct-ipfix-psamp-example {
     namespace "http://example.com/ns/ct-ipfix-psamp-example";
     prefix ipfix;
        
<CODE BEGINS>
module ct-ipfix-psamp-example {
     namespace "http://example.com/ns/ct-ipfix-psamp-example";
     prefix ipfix;
        
     import ietf-yang-types { prefix yang; }
     import ietf-inet-types { prefix inet; }
     import ietf-complex-types {prefix "ct"; }
        
     import ietf-yang-types { prefix yang; }
     import ietf-inet-types { prefix inet; }
     import ietf-complex-types {prefix "ct"; }
        

description "Example IPFIX/PSAMP Configuration Data Model with complex types and typed instance identifiers";

说明“具有复杂类型和类型化实例标识符的示例IPFIX/PSAMP配置数据模型”;

     revision 2011-03-15 {
        description "The YANG Module ('YANG Module of the IPFIX/PSAMP
          Configuration Data Model') in [IPFIXCONF] modeled with
          complex types and typed instance identifiers.
          Disclaimer: This example model illustrates the use of the
          language extensions defined in this document and does not
          claim to be an exact reproduction of the original YANG
          model referred above. The original description texts have
          been shortened to increase the readability of the model
          example.";
    }
        
     revision 2011-03-15 {
        description "The YANG Module ('YANG Module of the IPFIX/PSAMP
          Configuration Data Model') in [IPFIXCONF] modeled with
          complex types and typed instance identifiers.
          Disclaimer: This example model illustrates the use of the
          language extensions defined in this document and does not
          claim to be an exact reproduction of the original YANG
          model referred above. The original description texts have
          been shortened to increase the readability of the model
          example.";
    }
        
     /*****************************************************************
     * Features
     *****************************************************************/
        
     /*****************************************************************
     * Features
     *****************************************************************/
        
     feature exporter {
       description "If supported, the Monitoring Device can be used as
         an Exporter.  Exporting Processes can be configured.";
     }
        
     feature exporter {
       description "If supported, the Monitoring Device can be used as
         an Exporter.  Exporting Processes can be configured.";
     }
        
     feature collector {
       description "If supported, the Monitoring Device can be used as
         a Collector.  Collecting Processes can be configured.";
     }
        
     feature collector {
       description "If supported, the Monitoring Device can be used as
         a Collector.  Collecting Processes can be configured.";
     }
        
     feature meter {
       description "If supported, Observation Points, Selection
         Processes, and Caches can be configured.";
     }
        
     feature meter {
       description "If supported, Observation Points, Selection
         Processes, and Caches can be configured.";
     }
        
     feature psampSampCountBased {
       description "If supported, the Monitoring Device supports
         count-based Sampling...";
     }
        
     feature psampSampCountBased {
       description "If supported, the Monitoring Device supports
         count-based Sampling...";
     }
        
     feature psampSampTimeBased {
       description "If supported, the Monitoring Device supports
         time-based Sampling...";
     }
        
     feature psampSampTimeBased {
       description "If supported, the Monitoring Device supports
         time-based Sampling...";
     }
        
     feature psampSampRandOutOfN {
       description "If supported, the Monitoring Device supports
         random n-out-of-N Sampling...";
     }
        
     feature psampSampRandOutOfN {
       description "If supported, the Monitoring Device supports
         random n-out-of-N Sampling...";
     }
        
     feature psampSampUniProb {
       description "If supported, the Monitoring Device supports
         uniform probabilistic Sampling...";
     }
        
     feature psampSampUniProb {
       description "If supported, the Monitoring Device supports
         uniform probabilistic Sampling...";
     }
        
     feature psampFilterMatch {
       description "If supported, the Monitoring Device supports
         property match Filtering...";
     }
        
     feature psampFilterMatch {
       description "If supported, the Monitoring Device supports
         property match Filtering...";
     }
        
     feature psampFilterHash {
       description "If supported, the Monitoring Device supports
         hash-based Filtering...";
     }
        
     feature psampFilterHash {
       description "If supported, the Monitoring Device supports
         hash-based Filtering...";
     }
        
     feature cacheModeImmediate {
       description "If supported, the Monitoring Device supports
         Cache Mode 'immediate'.";
     }
        
     feature cacheModeImmediate {
       description "If supported, the Monitoring Device supports
         Cache Mode 'immediate'.";
     }
        
     feature cacheModeTimeout {
       description "If supported, the Monitoring Device supports
         Cache Mode 'timeout'.";
     }
        
     feature cacheModeTimeout {
       description "If supported, the Monitoring Device supports
         Cache Mode 'timeout'.";
     }
        
     feature cacheModeNatural {
       description "If supported, the Monitoring Device supports
         Cache Mode 'natural'.";
     }
        
     feature cacheModeNatural {
       description "If supported, the Monitoring Device supports
         Cache Mode 'natural'.";
     }
        
     feature cacheModePermanent {
       description "If supported, the Monitoring Device supports
         Cache Mode 'permanent'.";
     }
        
     feature cacheModePermanent {
       description "If supported, the Monitoring Device supports
         Cache Mode 'permanent'.";
     }
        
     feature udpTransport {
       description "If supported, the Monitoring Device supports UDP
         as transport protocol.";
     }
        
     feature udpTransport {
       description "If supported, the Monitoring Device supports UDP
         as transport protocol.";
     }
        
     feature tcpTransport {
       description "If supported, the Monitoring Device supports TCP
         as transport protocol.";
     }
        
     feature tcpTransport {
       description "If supported, the Monitoring Device supports TCP
         as transport protocol.";
     }
        
     feature fileReader {
       description "If supported, the Monitoring Device supports the
         configuration of Collecting Processes as File Readers.";
        
     feature fileReader {
       description "If supported, the Monitoring Device supports the
         configuration of Collecting Processes as File Readers.";
        

}

}

     feature fileWriter {
       description "If supported, the Monitoring Device supports the
         configuration of Exporting Processes as File Writers.";
     }
        
     feature fileWriter {
       description "If supported, the Monitoring Device supports the
         configuration of Exporting Processes as File Writers.";
     }
        
     /*****************************************************************
     * Identities
     *****************************************************************/
        
     /*****************************************************************
     * Identities
     *****************************************************************/
        
     /*** Hash function identities ***/
     identity hashFunction {
       description "Base identity for all hash functions...";
     }
     identity BOB {
       base "hashFunction";
       description "BOB hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
     identity IPSX {
       base "hashFunction";
       description "IPSX hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
     identity CRC {
       base "hashFunction";
       description "CRC hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
        
     /*** Hash function identities ***/
     identity hashFunction {
       description "Base identity for all hash functions...";
     }
     identity BOB {
       base "hashFunction";
       description "BOB hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
     identity IPSX {
       base "hashFunction";
       description "IPSX hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
     identity CRC {
       base "hashFunction";
       description "CRC hash function";
       reference "RFC 5475, Section 6.2.4.1.";
     }
        
     /*** Export mode identities ***/
     identity exportMode {
       description "Base identity for different usages of export
         destinations configured for an Exporting Process...";
     }
     identity parallel {
       base "exportMode";
       description "Parallel export of Data Records to all
         destinations configured for the Exporting Process.";
     }
     identity loadBalancing {
       base "exportMode";
       description "Load-balancing between the different
         destinations...";
     }
     identity fallback {
       base "exportMode";
        
     /*** Export mode identities ***/
     identity exportMode {
       description "Base identity for different usages of export
         destinations configured for an Exporting Process...";
     }
     identity parallel {
       base "exportMode";
       description "Parallel export of Data Records to all
         destinations configured for the Exporting Process.";
     }
     identity loadBalancing {
       base "exportMode";
       description "Load-balancing between the different
         destinations...";
     }
     identity fallback {
       base "exportMode";
        
       description "Export to the primary destination...";
     }
        
       description "Export to the primary destination...";
     }
        
     /*** Options type identities ***/
     identity optionsType {
       description "Base identity for report types exported
          with options...";
     }
     identity meteringStatistics {
       base "optionsType";
       description "Metering Process Statistics.";
       reference "RFC 5101, Section 4.1.";
     }
     identity meteringReliability {
       base "optionsType";
       description "Metering Process Reliability Statistics.";
       reference "RFC 5101, Section 4.2.";
     }
     identity exportingReliability {
       base "optionsType";
       description "Exporting Process Reliability
         Statistics.";
       reference "RFC 5101, Section 4.3.";
     }
     identity flowKeys {
       base "optionsType";
       description "Flow Keys.";
       reference "RFC 5101, Section 4.4.";
     }
     identity selectionSequence {
       base "optionsType";
       description "Selection Sequence and Selector Reports.";
       reference "RFC 5476, Sections 6.5.1 and 6.5.2.";
     }
     identity selectionStatistics {
       base "optionsType";
       description "Selection Sequence Statistics Report.";
       reference "RFC 5476, Sections 6.5.3.";
     }
     identity accuracy {
       base "optionsType";
       description "Accuracy Report.";
       reference "RFC 5476, Section 6.5.4.";
     }
     identity reducingRedundancy {
       base "optionsType";
       description "Enables the utilization of Options Templates to
         reduce redundancy in the exported Data Records.";
        
     /*** Options type identities ***/
     identity optionsType {
       description "Base identity for report types exported
          with options...";
     }
     identity meteringStatistics {
       base "optionsType";
       description "Metering Process Statistics.";
       reference "RFC 5101, Section 4.1.";
     }
     identity meteringReliability {
       base "optionsType";
       description "Metering Process Reliability Statistics.";
       reference "RFC 5101, Section 4.2.";
     }
     identity exportingReliability {
       base "optionsType";
       description "Exporting Process Reliability
         Statistics.";
       reference "RFC 5101, Section 4.3.";
     }
     identity flowKeys {
       base "optionsType";
       description "Flow Keys.";
       reference "RFC 5101, Section 4.4.";
     }
     identity selectionSequence {
       base "optionsType";
       description "Selection Sequence and Selector Reports.";
       reference "RFC 5476, Sections 6.5.1 and 6.5.2.";
     }
     identity selectionStatistics {
       base "optionsType";
       description "Selection Sequence Statistics Report.";
       reference "RFC 5476, Sections 6.5.3.";
     }
     identity accuracy {
       base "optionsType";
       description "Accuracy Report.";
       reference "RFC 5476, Section 6.5.4.";
     }
     identity reducingRedundancy {
       base "optionsType";
       description "Enables the utilization of Options Templates to
         reduce redundancy in the exported Data Records.";
        
       reference "RFC 5473.";
     }
     identity extendedTypeInformation {
       base "optionsType";
       description "Export of extended type information for
         enterprise-specific Information Elements used in the
         exported Templates.";
       reference "RFC 5610.";
     }
        
       reference "RFC 5473.";
     }
     identity extendedTypeInformation {
       base "optionsType";
       description "Export of extended type information for
         enterprise-specific Information Elements used in the
         exported Templates.";
       reference "RFC 5610.";
     }
        
     /*****************************************************************
     * Type definitions
     *****************************************************************/
        
     /*****************************************************************
     * Type definitions
     *****************************************************************/
        
     typedef nameType {
       type string {
         length "1..max";
         pattern "\S(.*\S)?";
       }
       description "Type for 'name' leafs...";
     }
        
     typedef nameType {
       type string {
         length "1..max";
         pattern "\S(.*\S)?";
       }
       description "Type for 'name' leafs...";
     }
        
     typedef direction {
       type enumeration {
         enum ingress {
           description "This value is used for monitoring incoming
             packets.";
         }
         enum egress {
           description "This value is used for monitoring outgoing
             packets.";
         }
         enum both {
           description "This value is used for monitoring incoming and
             outgoing packets.";
         }
       }
       description "Direction of packets going through an interface or
         linecard.";
     }
        
     typedef direction {
       type enumeration {
         enum ingress {
           description "This value is used for monitoring incoming
             packets.";
         }
         enum egress {
           description "This value is used for monitoring outgoing
             packets.";
         }
         enum both {
           description "This value is used for monitoring incoming and
             outgoing packets.";
         }
       }
       description "Direction of packets going through an interface or
         linecard.";
     }
        
     typedef transportSessionStatus {
       type enumeration {
         enum inactive {
           description "This value MUST be used for...";
         }
         enum active {
           description "This value MUST be used for...";
        
     typedef transportSessionStatus {
       type enumeration {
         enum inactive {
           description "This value MUST be used for...";
         }
         enum active {
           description "This value MUST be used for...";
        
         }
         enum unknown {
           description "This value MUST be used if the status...";
         }
       }
       description "Status of a Transport Session.";
       reference "RFC 5815, Section 8 (ipfixTransportSessionStatus).";
     }
        
         }
         enum unknown {
           description "This value MUST be used if the status...";
         }
       }
       description "Status of a Transport Session.";
       reference "RFC 5815, Section 8 (ipfixTransportSessionStatus).";
     }
        
     /*****************************************************************
     * Complex types
     *****************************************************************/
        
     /*****************************************************************
     * Complex types
     *****************************************************************/
        
     ct:complex-type ObservationPoint {
       description "Observation Point";
       key name;
       leaf name {
         type nameType;
         description "Key of an observation point.";
       }
       leaf observationPointId {
         type uint32;
         config false;
         description "Observation Point ID...";
         reference "RFC 5102, Section 5.1.10.";
       }
       leaf observationDomainId {
         type uint32;
         mandatory true;
         description "The Observation Domain ID associates...";
         reference "RFC 5101.";
       }
       choice OPLocation {
         mandatory true;
         description "Location of the Observation Point.";
         leaf ifIndex {
           type uint32;
           description "Index of an interface...";
           reference "RFC 2863.";
         }
         leaf ifName {
           type string;
           description "Name of an interface...";
           reference "RFC 2863.";
         }
         leaf entPhysicalIndex {
           type uint32;
           description "Index of a linecard...";
        
     ct:complex-type ObservationPoint {
       description "Observation Point";
       key name;
       leaf name {
         type nameType;
         description "Key of an observation point.";
       }
       leaf observationPointId {
         type uint32;
         config false;
         description "Observation Point ID...";
         reference "RFC 5102, Section 5.1.10.";
       }
       leaf observationDomainId {
         type uint32;
         mandatory true;
         description "The Observation Domain ID associates...";
         reference "RFC 5101.";
       }
       choice OPLocation {
         mandatory true;
         description "Location of the Observation Point.";
         leaf ifIndex {
           type uint32;
           description "Index of an interface...";
           reference "RFC 2863.";
         }
         leaf ifName {
           type string;
           description "Name of an interface...";
           reference "RFC 2863.";
         }
         leaf entPhysicalIndex {
           type uint32;
           description "Index of a linecard...";
        
           reference "RFC 4133.";
         }
         leaf entPhysicalName {
           type string;
           description "Name of a linecard...";
           reference "RFC 4133.";
         }
       }
       leaf direction {
         type direction;
         default both;
         description "Direction of packets....";
       }
       leaf-list selectionProcess {
         type instance-identifier { ct:instance-type SelectionProcess; }
         description "Selection Processes in this list process packets
           in parallel.";
       }
     }
        
           reference "RFC 4133.";
         }
         leaf entPhysicalName {
           type string;
           description "Name of a linecard...";
           reference "RFC 4133.";
         }
       }
       leaf direction {
         type direction;
         default both;
         description "Direction of packets....";
       }
       leaf-list selectionProcess {
         type instance-identifier { ct:instance-type SelectionProcess; }
         description "Selection Processes in this list process packets
           in parallel.";
       }
     }
        
     ct:complex-type Selector {
       ct:abstract true;
       description "Abstract selector";
       key name;
       leaf name {
           type nameType;
           description "Key of a selector";
       }
       leaf packetsObserved {
         type yang:counter64;
         config false;
         description "The number of packets observed ...";
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsPacketsObserved).";
       }
       leaf packetsDropped {
         type yang:counter64;
         config false;
         description "The total number of packets discarded ...";
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsPacketsDropped).";
       }
       leaf selectorDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion at which
           one or more of the Selector counters suffered a
           discontinuity...";
        
     ct:complex-type Selector {
       ct:abstract true;
       description "Abstract selector";
       key name;
       leaf name {
           type nameType;
           description "Key of a selector";
       }
       leaf packetsObserved {
         type yang:counter64;
         config false;
         description "The number of packets observed ...";
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsPacketsObserved).";
       }
       leaf packetsDropped {
         type yang:counter64;
         config false;
         description "The total number of packets discarded ...";
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsPacketsDropped).";
       }
       leaf selectorDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion at which
           one or more of the Selector counters suffered a
           discontinuity...";
        
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsDiscontinuityTime).";
       }
     }
        
         reference "RFC 5815, Section 8
           (ipfixSelectionProcessStatsDiscontinuityTime).";
       }
     }
        
     ct:complex-type SelectAllSelector {
       ct:extends Selector;
       description "Method that selects all packets.";
     }
        
     ct:complex-type SelectAllSelector {
       ct:extends Selector;
       description "Method that selects all packets.";
     }
        
     ct:complex-type SampCountBasedSelector {
           if-feature psampSampCountBased;
           ct:extends Selector;
           description "Selector applying systematic count-based
             packet sampling to the packet stream.";
           reference "RFC 5475, Section 5.1;
             RFC 5476, Section 6.5.2.1.";
           leaf packetInterval {
             type uint32;
             units packets;
             mandatory true;
             description "The number of packets that are consecutively
               sampled between gaps of length packetSpace.
               This parameter corresponds to the Information Element
               samplingPacketInterval.";
             reference "RFC 5477, Section 8.2.2.";
           }
           leaf packetSpace {
             type uint32;
             units packets;
             mandatory true;
             description "The number of unsampled packets between two
               sampling intervals.
               This parameter corresponds to the Information Element
               samplingPacketSpace.";
             reference "RFC 5477, Section 8.2.3.";
           }
     }
        
     ct:complex-type SampCountBasedSelector {
           if-feature psampSampCountBased;
           ct:extends Selector;
           description "Selector applying systematic count-based
             packet sampling to the packet stream.";
           reference "RFC 5475, Section 5.1;
             RFC 5476, Section 6.5.2.1.";
           leaf packetInterval {
             type uint32;
             units packets;
             mandatory true;
             description "The number of packets that are consecutively
               sampled between gaps of length packetSpace.
               This parameter corresponds to the Information Element
               samplingPacketInterval.";
             reference "RFC 5477, Section 8.2.2.";
           }
           leaf packetSpace {
             type uint32;
             units packets;
             mandatory true;
             description "The number of unsampled packets between two
               sampling intervals.
               This parameter corresponds to the Information Element
               samplingPacketSpace.";
             reference "RFC 5477, Section 8.2.3.";
           }
     }
        
     ct:complex-type SampTimeBasedSelector {
           if-feature psampSampTimeBased;
           ct:extends Selector;
           description "Selector applying systematic time-based
             packet sampling to the packet stream.";
           reference "RFC 5475, Section 5.1;
             RFC 5476, Section 6.5.2.2.";
           leaf timeInterval {
             type uint32;
        
     ct:complex-type SampTimeBasedSelector {
           if-feature psampSampTimeBased;
           ct:extends Selector;
           description "Selector applying systematic time-based
             packet sampling to the packet stream.";
           reference "RFC 5475, Section 5.1;
             RFC 5476, Section 6.5.2.2.";
           leaf timeInterval {
             type uint32;
        
             units microseconds;
             mandatory true;
             description "The time interval in microseconds during
               which all arriving packets are sampled between gaps
               of length timeSpace.
               This parameter corresponds to the Information Element
               samplingTimeInterval.";
             reference "RFC 5477, Section 8.2.4.";
           }
           leaf timeSpace {
             type uint32;
             units microseconds;
             mandatory true;
             description "The time interval in microseconds during
               which no packets are sampled between two sampling
               intervals specified by timeInterval.
               This parameter corresponds to the Information Element
               samplingTimeInterval.";
             reference "RFC 5477, Section 8.2.5.";
           }
     }
        
             units microseconds;
             mandatory true;
             description "The time interval in microseconds during
               which all arriving packets are sampled between gaps
               of length timeSpace.
               This parameter corresponds to the Information Element
               samplingTimeInterval.";
             reference "RFC 5477, Section 8.2.4.";
           }
           leaf timeSpace {
             type uint32;
             units microseconds;
             mandatory true;
             description "The time interval in microseconds during
               which no packets are sampled between two sampling
               intervals specified by timeInterval.
               This parameter corresponds to the Information Element
               samplingTimeInterval.";
             reference "RFC 5477, Section 8.2.5.";
           }
     }
        
     ct:complex-type SampRandOutOfNSelector {
           if-feature psampSampRandOutOfN;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying n-out-of-N packet
             sampling to the packet stream.";
           reference "RFC 5475, Section 5.2.1;
             RFC 5476, Section 6.5.2.3.";
           leaf size {
             type uint32;
             units packets;
             mandatory true;
             description "The number of elements taken from the parent
               population.
               This parameter corresponds to the Information Element
               samplingSize.";
             reference "RFC 5477, Section 8.2.6.";
           }
           leaf population {
             type uint32;
             units packets;
             mandatory true;
             description "The number of elements in the parent
               population.
               This parameter corresponds to the Information Element
               samplingPopulation.";
        
     ct:complex-type SampRandOutOfNSelector {
           if-feature psampSampRandOutOfN;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying n-out-of-N packet
             sampling to the packet stream.";
           reference "RFC 5475, Section 5.2.1;
             RFC 5476, Section 6.5.2.3.";
           leaf size {
             type uint32;
             units packets;
             mandatory true;
             description "The number of elements taken from the parent
               population.
               This parameter corresponds to the Information Element
               samplingSize.";
             reference "RFC 5477, Section 8.2.6.";
           }
           leaf population {
             type uint32;
             units packets;
             mandatory true;
             description "The number of elements in the parent
               population.
               This parameter corresponds to the Information Element
               samplingPopulation.";
        
             reference "RFC 5477, Section 8.2.7.";
           }
     }
        
             reference "RFC 5477, Section 8.2.7.";
           }
     }
        
     ct:complex-type SampUniProbSelector {
           if-feature psampSampUniProb;
           ct:extends Selector;
           description "Selector applying uniform probabilistic
             packet sampling (with equal probability per packet) to the
             packet stream.";
           reference "RFC 5475, Section 5.2.2.1;
             RFC 5476, Section 6.5.2.4.";
           leaf probability {
             type decimal64 {
               fraction-digits 18;
               range "0..1";
             }
             mandatory true;
             description "Probability that a packet is sampled,
               expressed as a value between 0 and 1.  The probability
               is equal for every packet.
               This parameter corresponds to the Information Element
               samplingProbability.";
             reference "RFC 5477, Section 8.2.8.";
           }
     }
        
     ct:complex-type SampUniProbSelector {
           if-feature psampSampUniProb;
           ct:extends Selector;
           description "Selector applying uniform probabilistic
             packet sampling (with equal probability per packet) to the
             packet stream.";
           reference "RFC 5475, Section 5.2.2.1;
             RFC 5476, Section 6.5.2.4.";
           leaf probability {
             type decimal64 {
               fraction-digits 18;
               range "0..1";
             }
             mandatory true;
             description "Probability that a packet is sampled,
               expressed as a value between 0 and 1.  The probability
               is equal for every packet.
               This parameter corresponds to the Information Element
               samplingProbability.";
             reference "RFC 5477, Section 8.2.8.";
           }
     }
        
     ct:complex-type FilterMatchSelector {
           if-feature psampFilterMatch;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying property match filtering
             to the packet stream.";
           reference "RFC 5475, Section 6.1;
             RFC 5476, Section 6.5.2.5.";
           choice nameOrId {
             mandatory true;
             description "The field to be matched is specified by
               either the name or the ID of the Information
               Element.";
             leaf ieName {
               type string;
               description "Name of the Information Element.";
             }
             leaf ieId {
               type uint16 {
                 range "1..32767" {
                   description "Valid range of Information Element
        
     ct:complex-type FilterMatchSelector {
           if-feature psampFilterMatch;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying property match filtering
             to the packet stream.";
           reference "RFC 5475, Section 6.1;
             RFC 5476, Section 6.5.2.5.";
           choice nameOrId {
             mandatory true;
             description "The field to be matched is specified by
               either the name or the ID of the Information
               Element.";
             leaf ieName {
               type string;
               description "Name of the Information Element.";
             }
             leaf ieId {
               type uint16 {
                 range "1..32767" {
                   description "Valid range of Information Element
        
                       identifiers.";
                   reference "RFC 5102, Section 4.";
                 }
               }
               description "ID of the Information Element.";
             }
           }
           leaf ieEnterpriseNumber {
             type uint32;
             description "If present, ... ";
           }
           leaf value {
             type string;
             mandatory true;
             description "Matching value of the Information Element.";
           }
     }
        
                       identifiers.";
                   reference "RFC 5102, Section 4.";
                 }
               }
               description "ID of the Information Element.";
             }
           }
           leaf ieEnterpriseNumber {
             type uint32;
             description "If present, ... ";
           }
           leaf value {
             type string;
             mandatory true;
             description "Matching value of the Information Element.";
           }
     }
        
     ct:complex-type FilterHashSelector {
           if-feature psampFilterHash;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying hash-based filtering
             to the packet stream.";
           reference "RFC 5475, Section 6.2;
             RFC 5476, Section 6.5.2.6.";
           leaf hashFunction {
             type identityref {
               base "hashFunction";
             }
             default BOB;
             description "Hash function to be applied.  According to
               RFC 5475, Section 6.2.4.1, BOB hash function must be
               used in order to be compliant with PSAMP.";
           }
           leaf ipPayloadOffset {
             type uint64;
             units octets;
             default 0;
             description "IP payload offset ... ";
             reference "RFC 5477, Section 8.3.2.";
           }
           leaf ipPayloadSize {
             type uint64;
             units octets;
             default 8;
             description "Number of IP payload bytes ... ";
             reference "RFC 5477, Section 8.3.3.";
        
     ct:complex-type FilterHashSelector {
           if-feature psampFilterHash;
           ct:extends Selector;
           description "This container contains the configuration
             parameters of a Selector applying hash-based filtering
             to the packet stream.";
           reference "RFC 5475, Section 6.2;
             RFC 5476, Section 6.5.2.6.";
           leaf hashFunction {
             type identityref {
               base "hashFunction";
             }
             default BOB;
             description "Hash function to be applied.  According to
               RFC 5475, Section 6.2.4.1, BOB hash function must be
               used in order to be compliant with PSAMP.";
           }
           leaf ipPayloadOffset {
             type uint64;
             units octets;
             default 0;
             description "IP payload offset ... ";
             reference "RFC 5477, Section 8.3.2.";
           }
           leaf ipPayloadSize {
             type uint64;
             units octets;
             default 8;
             description "Number of IP payload bytes ... ";
             reference "RFC 5477, Section 8.3.3.";
        
           }
           leaf digestOutput {
             type boolean;
             default false;
             description "If true, the output ... ";
             reference "RFC 5477, Section 8.3.8.";
           }
           leaf initializerValue {
             type uint64;
             description "Initializer value to the hash function.
               If not configured by the user, the Monitoring Device
               arbitrarily chooses an initializer value.";
             reference "RFC 5477, Section 8.3.9.";
           }
           list selectedRange {
             key name;
             min-elements 1;
             description "List of hash function return ranges for
               which packets are selected.";
             leaf name {
               type nameType;
               description "Key of this list.";
             }
             leaf min {
               type uint64;
               description "Beginning of the hash function's selected
                 range.
                 This parameter corresponds to the Information Element
                 hashSelectedRangeMin.";
               reference "RFC 5477, Section 8.3.6.";
             }
             leaf max {
               type uint64;
               description "End of the hash function's selected range.
                 This parameter corresponds to the Information Element
                 hashSelectedRangeMax.";
               reference "RFC 5477, Section 8.3.7.";
             }
           }
     }
        
           }
           leaf digestOutput {
             type boolean;
             default false;
             description "If true, the output ... ";
             reference "RFC 5477, Section 8.3.8.";
           }
           leaf initializerValue {
             type uint64;
             description "Initializer value to the hash function.
               If not configured by the user, the Monitoring Device
               arbitrarily chooses an initializer value.";
             reference "RFC 5477, Section 8.3.9.";
           }
           list selectedRange {
             key name;
             min-elements 1;
             description "List of hash function return ranges for
               which packets are selected.";
             leaf name {
               type nameType;
               description "Key of this list.";
             }
             leaf min {
               type uint64;
               description "Beginning of the hash function's selected
                 range.
                 This parameter corresponds to the Information Element
                 hashSelectedRangeMin.";
               reference "RFC 5477, Section 8.3.6.";
             }
             leaf max {
               type uint64;
               description "End of the hash function's selected range.
                 This parameter corresponds to the Information Element
                 hashSelectedRangeMax.";
               reference "RFC 5477, Section 8.3.7.";
             }
           }
     }
        
     ct:complex-type Cache {
       ct:abstract true;
       description "Cache of a Monitoring Device.";
       key name;
       leaf name {
         type nameType;
         description "Key of a cache";
        
     ct:complex-type Cache {
       ct:abstract true;
       description "Cache of a Monitoring Device.";
       key name;
       leaf name {
         type nameType;
         description "Key of a cache";
        
       }
       leaf-list exportingProcess {
         type leafref { path "/ipfix/exportingProcess/name"; }
         description "Records are exported by all Exporting Processes
           in the list.";
       }
       description "Configuration and state parameters of a Cache.";
       container cacheLayout {
         description "Cache Layout.";
         list cacheField {
           key name;
           min-elements 1;
           description "List of fields in the Cache Layout.";
           leaf name {
             type nameType;
             description "Key of this list.";
           }
           choice nameOrId {
             mandatory true;
             description "Name or ID of the Information Element.";
             reference "RFC 5102.";
             leaf ieName {
               type string;
               description "Name of the Information Element.";
             }
             leaf ieId {
               type uint16 {
                 range "1..32767" {
                   description "Valid range of Information Element
                       identifiers.";
                   reference "RFC 5102, Section 4.";
                 }
               }
               description "ID of the Information Element.";
             }
           }
           leaf ieLength {
             type uint16;
             units octets;
             description "Length of the field ... ";
             reference "RFC 5101, Section 6.2; RFC 5102.";
           }
           leaf ieEnterpriseNumber {
             type uint32;
             description "If present, the Information Element is
               enterprise-specific. ... ";
             reference "RFC 5101; RFC 5102.";
           }
        
       }
       leaf-list exportingProcess {
         type leafref { path "/ipfix/exportingProcess/name"; }
         description "Records are exported by all Exporting Processes
           in the list.";
       }
       description "Configuration and state parameters of a Cache.";
       container cacheLayout {
         description "Cache Layout.";
         list cacheField {
           key name;
           min-elements 1;
           description "List of fields in the Cache Layout.";
           leaf name {
             type nameType;
             description "Key of this list.";
           }
           choice nameOrId {
             mandatory true;
             description "Name or ID of the Information Element.";
             reference "RFC 5102.";
             leaf ieName {
               type string;
               description "Name of the Information Element.";
             }
             leaf ieId {
               type uint16 {
                 range "1..32767" {
                   description "Valid range of Information Element
                       identifiers.";
                   reference "RFC 5102, Section 4.";
                 }
               }
               description "ID of the Information Element.";
             }
           }
           leaf ieLength {
             type uint16;
             units octets;
             description "Length of the field ... ";
             reference "RFC 5101, Section 6.2; RFC 5102.";
           }
           leaf ieEnterpriseNumber {
             type uint32;
             description "If present, the Information Element is
               enterprise-specific. ... ";
             reference "RFC 5101; RFC 5102.";
           }
        
           leaf isFlowKey {
             when "(../../../cacheMode != 'immediate')
               and
               ((count(../ieEnterpriseNumber) = 0)
               or
               (../ieEnterpriseNumber != 29305))" {
               description "This parameter is not available
                 for Reverse Information Elements (which have
                 enterprise number 29305) or if the Cache Mode
                 is 'immediate'.";
             }
             type empty;
             description "If present, this is a flow key.";
           }
         }
       }
       leaf dataRecords {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records generated ... ";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheDataRecords).";
       }
       leaf cacheDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the ... ";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheDiscontinuityTime).";
       }
     }
        
           leaf isFlowKey {
             when "(../../../cacheMode != 'immediate')
               and
               ((count(../ieEnterpriseNumber) = 0)
               or
               (../ieEnterpriseNumber != 29305))" {
               description "This parameter is not available
                 for Reverse Information Elements (which have
                 enterprise number 29305) or if the Cache Mode
                 is 'immediate'.";
             }
             type empty;
             description "If present, this is a flow key.";
           }
         }
       }
       leaf dataRecords {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records generated ... ";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheDataRecords).";
       }
       leaf cacheDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the ... ";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheDiscontinuityTime).";
       }
     }
        
     ct:complex-type ImmediateCache {
       if-feature cacheModeImmediate;
       ct:extends Cache;
     }
        
     ct:complex-type ImmediateCache {
       if-feature cacheModeImmediate;
       ct:extends Cache;
     }
        
     ct:complex-type NonImmediateCache {
       ct:abstract true;
       ct:extends Cache;
       leaf maxFlows {
         type uint32;
         units flows;
         description "This parameter configures the maximum number of
           Flows in the Cache ... ";
       }
        
     ct:complex-type NonImmediateCache {
       ct:abstract true;
       ct:extends Cache;
       leaf maxFlows {
         type uint32;
         units flows;
         description "This parameter configures the maximum number of
           Flows in the Cache ... ";
       }
        
       leaf activeFlows {
         type yang:gauge32;
         units flows;
         config false;
         description "The number of Flows currently active in this
           Cache.";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheActiveFlows).";
       }
       leaf unusedCacheEntries {
         type yang:gauge32;
         units flows;
         config false;
         description "The number of unused Cache entries in this
           Cache.";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheUnusedCacheEntries).";
       }
    }
        
       leaf activeFlows {
         type yang:gauge32;
         units flows;
         config false;
         description "The number of Flows currently active in this
           Cache.";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheActiveFlows).";
       }
       leaf unusedCacheEntries {
         type yang:gauge32;
         units flows;
         config false;
         description "The number of unused Cache entries in this
           Cache.";
         reference "RFC 5815, Section 8
           (ipfixMeteringProcessCacheUnusedCacheEntries).";
       }
    }
        
    ct:complex-type NonPermanentCache {
      ct:abstract true;
      ct:extends NonImmediateCache;
      leaf activeTimeout {
        type uint32;
        units milliseconds;
        description "This parameter configures the time in
          milliseconds after which ... ";
      }
      leaf inactiveTimeout {
        type uint32;
        units milliseconds;
        description "This parameter configures the time in
          milliseconds after which ... ";
      }
    }
        
    ct:complex-type NonPermanentCache {
      ct:abstract true;
      ct:extends NonImmediateCache;
      leaf activeTimeout {
        type uint32;
        units milliseconds;
        description "This parameter configures the time in
          milliseconds after which ... ";
      }
      leaf inactiveTimeout {
        type uint32;
        units milliseconds;
        description "This parameter configures the time in
          milliseconds after which ... ";
      }
    }
        
    ct:complex-type NaturalCache {
      if-feature cacheModeNatural;
      ct:extends NonPermanentCache;
    }
        
    ct:complex-type NaturalCache {
      if-feature cacheModeNatural;
      ct:extends NonPermanentCache;
    }
        
    ct:complex-type TimeoutCache {
      if-feature cacheModeTimeout;
      ct:extends NonPermanentCache;
    }
        
    ct:complex-type TimeoutCache {
      if-feature cacheModeTimeout;
      ct:extends NonPermanentCache;
    }
        

ct:complex-type PermanentCache {

复杂类型永久缓存{

      if-feature cacheModePermanent;
      ct:extends NonImmediateCache;
      leaf exportInterval {
        type uint32;
        units milliseconds;
        description "This parameter configures the interval for
          periodical export of Flow Records in milliseconds.
          If not configured by the user, the Monitoring Device sets
          this parameter.";
       }
    }
        
      if-feature cacheModePermanent;
      ct:extends NonImmediateCache;
      leaf exportInterval {
        type uint32;
        units milliseconds;
        description "This parameter configures the interval for
          periodical export of Flow Records in milliseconds.
          If not configured by the user, the Monitoring Device sets
          this parameter.";
       }
    }
        
    ct:complex-type ExportDestination {
      ct:abstract true;
      description "Abstract export destination.";
      key name;
      leaf name {
        type nameType;
        description "Key of an export destination.";
      }
    }
        
    ct:complex-type ExportDestination {
      ct:abstract true;
      description "Abstract export destination.";
      key name;
      leaf name {
        type nameType;
        description "Key of an export destination.";
      }
    }
        
    ct:complex-type IpDestination {
      ct:abstract true;
      ct:extends ExportDestination;
      description "IP export destination.";
      leaf ipfixVersion {
         type uint16;
         default 10;
         description "IPFIX version number.";
       }
       leaf destinationPort {
         type inet:port-number;
         description "If not configured by the user, the Monitoring
           Device uses the default port number for IPFIX, which is
           4739 without Transport Layer Security, and 4740 if Transport
           Layer Security is activated.";
       }
       choice indexOrName {
         description "Index or name of the interface ... ";
         reference "RFC 2863.";
         leaf ifIndex {
           type uint32;
           description "Index of an interface as stored in the ifTable
             of IF-MIB.";
           reference "RFC 2863.";
         }
         leaf ifName {
        
    ct:complex-type IpDestination {
      ct:abstract true;
      ct:extends ExportDestination;
      description "IP export destination.";
      leaf ipfixVersion {
         type uint16;
         default 10;
         description "IPFIX version number.";
       }
       leaf destinationPort {
         type inet:port-number;
         description "If not configured by the user, the Monitoring
           Device uses the default port number for IPFIX, which is
           4739 without Transport Layer Security, and 4740 if Transport
           Layer Security is activated.";
       }
       choice indexOrName {
         description "Index or name of the interface ... ";
         reference "RFC 2863.";
         leaf ifIndex {
           type uint32;
           description "Index of an interface as stored in the ifTable
             of IF-MIB.";
           reference "RFC 2863.";
         }
         leaf ifName {
        
           type string;
           description "Name of an interface as stored in the ifTable
             of IF-MIB.";
           reference "RFC 2863.";
         }
       }
       leaf sendBufferSize {
         type uint32;
         units bytes;
         description "Size of the socket send buffer.
           If not configured by the user, this parameter is set by
           the Monitoring Device.";
       }
       leaf rateLimit {
         type uint32;
         units "bytes per second";
         description "Maximum number of bytes per second ... ";
         reference "RFC 5476, Section 6.3";
       }
       container transportLayerSecurity {
         presence "If transportLayerSecurity is present, DTLS is
           enabled if the transport protocol is SCTP or UDP, and TLS
           is enabled if the transport protocol is TCP.";
         description "Transport Layer Security configuration.";
         uses transportLayerSecurityParameters;
       }
       container transportSession {
         config false;
         description "State parameters of the Transport Session
           directed to the given destination.";
         uses transportSessionParameters;
       }
    }
        
           type string;
           description "Name of an interface as stored in the ifTable
             of IF-MIB.";
           reference "RFC 2863.";
         }
       }
       leaf sendBufferSize {
         type uint32;
         units bytes;
         description "Size of the socket send buffer.
           If not configured by the user, this parameter is set by
           the Monitoring Device.";
       }
       leaf rateLimit {
         type uint32;
         units "bytes per second";
         description "Maximum number of bytes per second ... ";
         reference "RFC 5476, Section 6.3";
       }
       container transportLayerSecurity {
         presence "If transportLayerSecurity is present, DTLS is
           enabled if the transport protocol is SCTP or UDP, and TLS
           is enabled if the transport protocol is TCP.";
         description "Transport Layer Security configuration.";
         uses transportLayerSecurityParameters;
       }
       container transportSession {
         config false;
         description "State parameters of the Transport Session
           directed to the given destination.";
         uses transportSessionParameters;
       }
    }
        
     ct:complex-type SctpExporter {
       ct:extends IpDestination;
       description "SCTP exporter.";
       leaf-list sourceIPAddress {
         type inet:ip-address;
         description "List of source IP addresses used ... ";
         reference "RFC 4960, Section 6.4
           (Multi-Homed SCTP Endpoints).";
       }
       leaf-list destinationIPAddress {
         type inet:ip-address;
         min-elements 1;
         description "One or multiple IP addresses ... ";
         reference "RFC 4960, Section 6.4
        
     ct:complex-type SctpExporter {
       ct:extends IpDestination;
       description "SCTP exporter.";
       leaf-list sourceIPAddress {
         type inet:ip-address;
         description "List of source IP addresses used ... ";
         reference "RFC 4960, Section 6.4
           (Multi-Homed SCTP Endpoints).";
       }
       leaf-list destinationIPAddress {
         type inet:ip-address;
         min-elements 1;
         description "One or multiple IP addresses ... ";
         reference "RFC 4960, Section 6.4
        
           (Multi-Homed SCTP Endpoints).";
       }
       leaf timedReliability {
         type uint32;
         units milliseconds;
         default 0;
         description "Lifetime in milliseconds ... ";
         reference "RFC 3758; RFC 4960.";
       }
     }
        
           (Multi-Homed SCTP Endpoints).";
       }
       leaf timedReliability {
         type uint32;
         units milliseconds;
         default 0;
         description "Lifetime in milliseconds ... ";
         reference "RFC 3758; RFC 4960.";
       }
     }
        
     ct:complex-type UdpExporter {
       ct:extends IpDestination;
       if-feature udpTransport;
       description "UDP parameters.";
       leaf sourceIPAddress {
         type inet:ip-address;
         description "Source IP address used by the Exporting
            Process ...";
       }
       leaf destinationIPAddress {
         type inet:ip-address;
         mandatory true;
         description "IP address of the Collection Process to which
           IPFIX Messages are sent.";
       }
       leaf maxPacketSize {
         type uint16;
         units octets;
         description "This parameter specifies the maximum size of
           IP packets ... ";
       }
       leaf templateRefreshTimeout {
         type uint32;
         units seconds;
         default 600;
         description "Sets time after which Templates are resent in the
           UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshTimeout).";
       }
       leaf optionsTemplateRefreshTimeout {
         type uint32;
         units seconds;
         default 600;
         description "Sets time after which Options Templates are
           resent in the UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
        
     ct:complex-type UdpExporter {
       ct:extends IpDestination;
       if-feature udpTransport;
       description "UDP parameters.";
       leaf sourceIPAddress {
         type inet:ip-address;
         description "Source IP address used by the Exporting
            Process ...";
       }
       leaf destinationIPAddress {
         type inet:ip-address;
         mandatory true;
         description "IP address of the Collection Process to which
           IPFIX Messages are sent.";
       }
       leaf maxPacketSize {
         type uint16;
         units octets;
         description "This parameter specifies the maximum size of
           IP packets ... ";
       }
       leaf templateRefreshTimeout {
         type uint32;
         units seconds;
         default 600;
         description "Sets time after which Templates are resent in the
           UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshTimeout).";
       }
       leaf optionsTemplateRefreshTimeout {
         type uint32;
         units seconds;
         default 600;
         description "Sets time after which Options Templates are
           resent in the UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
        
           (ipfixTransportSessionOptionsTemplateRefreshTimeout).";
       }
       leaf templateRefreshPacket {
         type uint32;
         units "IPFIX Messages";
         description "Sets number of IPFIX Messages after which
           Templates are resent in the UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshPacket).";
       }
       leaf optionsTemplateRefreshPacket {
         type uint32;
         units "IPFIX Messages";
         description "Sets number of IPFIX Messages after which
           Options Templates are resent in the UDP Transport Session
           protocol. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshPacket).";
       }
    }
        
           (ipfixTransportSessionOptionsTemplateRefreshTimeout).";
       }
       leaf templateRefreshPacket {
         type uint32;
         units "IPFIX Messages";
         description "Sets number of IPFIX Messages after which
           Templates are resent in the UDP Transport Session. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshPacket).";
       }
       leaf optionsTemplateRefreshPacket {
         type uint32;
         units "IPFIX Messages";
         description "Sets number of IPFIX Messages after which
           Options Templates are resent in the UDP Transport Session
           protocol. ... ";
         reference "RFC 5101, Section 10.3.6; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshPacket).";
       }
    }
        
     ct:complex-type TcpExporter {
       ct:extends IpDestination;
       if-feature tcpTransport;
       description "TCP exporter";
       leaf sourceIPAddress {
         type inet:ip-address;
         description "Source IP address used by the Exporting
           Process...";
       }
       leaf destinationIPAddress {
         type inet:ip-address;
         mandatory true;
         description "IP address of the Collection Process to which
           IPFIX Messages are sent.";
       }
     }
        
     ct:complex-type TcpExporter {
       ct:extends IpDestination;
       if-feature tcpTransport;
       description "TCP exporter";
       leaf sourceIPAddress {
         type inet:ip-address;
         description "Source IP address used by the Exporting
           Process...";
       }
       leaf destinationIPAddress {
         type inet:ip-address;
         mandatory true;
         description "IP address of the Collection Process to which
           IPFIX Messages are sent.";
       }
     }
        
     ct:complex-type FileWriter {
       ct:extends ExportDestination;
       if-feature fileWriter;
       description "File Writer.";
       leaf ipfixVersion {
         type uint16;
         default 10;
         description "IPFIX version number.";
       }
       leaf file {
        
     ct:complex-type FileWriter {
       ct:extends ExportDestination;
       if-feature fileWriter;
       description "File Writer.";
       leaf ipfixVersion {
         type uint16;
         default 10;
         description "IPFIX version number.";
       }
       leaf file {
        
         type inet:uri;
         mandatory true;
         description "URI specifying the location of the file.";
       }
       leaf bytes {
         type yang:counter64;
         units octets;
         config false;
         description "The number of bytes written by the File
           Writer...";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages written by the File
           Writer. ... ";
       }
       leaf discardedMessages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages that could not be
           written by the File Writer ... ";
       }
       leaf records {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records written by the File
           Writer. ... ";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         config false;
         description "The number of Template Records (excluding
           Options Template Records) written by the File Writer.
           ... ";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         config false;
         description "The number of Options Template Records written
           by the File Writer. ... ";
       }
       leaf fileWriterDiscontinuityTime {
        
         type inet:uri;
         mandatory true;
         description "URI specifying the location of the file.";
       }
       leaf bytes {
         type yang:counter64;
         units octets;
         config false;
         description "The number of bytes written by the File
           Writer...";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages written by the File
           Writer. ... ";
       }
       leaf discardedMessages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages that could not be
           written by the File Writer ... ";
       }
       leaf records {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records written by the File
           Writer. ... ";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         config false;
         description "The number of Template Records (excluding
           Options Template Records) written by the File Writer.
           ... ";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         config false;
         description "The number of Options Template Records written
           by the File Writer. ... ";
       }
       leaf fileWriterDiscontinuityTime {
        
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion at which
           one or more File Writer counters suffered a discontinuity.
           ... ";
       }
       list template {
         config false;
         description "This list contains the Templates and Options
           Templates that have been written by the File Reader. ... ";
         uses templateParameters;
       }
     }
        
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion at which
           one or more File Writer counters suffered a discontinuity.
           ... ";
       }
       list template {
         config false;
         description "This list contains the Templates and Options
           Templates that have been written by the File Reader. ... ";
         uses templateParameters;
       }
     }
        
     ct:complex-type ExportingProcess {
       if-feature exporter;
       description "Exporting Process of the Monitoring Device.";
       key name;
       leaf name {
         type nameType;
         description "Key of this list.";
       }
       leaf exportMode {
         type identityref {
           base "exportMode";
         }
         default parallel;
         description "This parameter determines to which configured
           destination(s) the incoming Data Records are exported.";
       }
       ct:instance-list destination {
         ct:instance-type ExportDestination;
         min-elements 1;
         description "Export destinations.";
       }
       list options {
         key name;
         description "List of options reported by the Exporting
           Process.";
         leaf name {
           type nameType;
           description "Key of this list.";
         }
         leaf optionsType {
           type identityref {
             base "optionsType";
           }
           mandatory true;
        
     ct:complex-type ExportingProcess {
       if-feature exporter;
       description "Exporting Process of the Monitoring Device.";
       key name;
       leaf name {
         type nameType;
         description "Key of this list.";
       }
       leaf exportMode {
         type identityref {
           base "exportMode";
         }
         default parallel;
         description "This parameter determines to which configured
           destination(s) the incoming Data Records are exported.";
       }
       ct:instance-list destination {
         ct:instance-type ExportDestination;
         min-elements 1;
         description "Export destinations.";
       }
       list options {
         key name;
         description "List of options reported by the Exporting
           Process.";
         leaf name {
           type nameType;
           description "Key of this list.";
         }
         leaf optionsType {
           type identityref {
             base "optionsType";
           }
           mandatory true;
        
           description "Type of the exported options data.";
         }
         leaf optionsTimeout {
           type uint32;
           units milliseconds;
           description "Time interval for periodic export of the options
             data. ... ";
         }
       }
     }
        
           description "Type of the exported options data.";
         }
         leaf optionsTimeout {
           type uint32;
           units milliseconds;
           description "Time interval for periodic export of the options
             data. ... ";
         }
       }
     }
        
     ct:complex-type CollectingProcess {
       description "A Collecting Process.";
       key name;
       leaf name {
         type nameType;
         description "Key of a collecing process.";
       }
       ct:instance-list sctpCollector {
         ct:instance-type SctpCollector;
         description "List of SCTP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list udpCollector {
         if-feature udpTransport;
         ct:instance-type UdpCollector;
         description "List of UDP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list tcpCollector {
         if-feature tcpTransport;
         ct:instance-type TcpCollector;
         description "List of TCP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list fileReader {
         if-feature fileReader;
         ct:instance-type FileReader;
         description "List of File Readers from which the Collecting
           Process reads IPFIX Messages.";
       }
       leaf-list exportingProcess {
         type instance-identifier { ct:instance-type ExportingProcess; }
         description "Export of received records without any
           modifications.  Records are processed by all Exporting
           Processes in the list.";
       }
     }
        
     ct:complex-type CollectingProcess {
       description "A Collecting Process.";
       key name;
       leaf name {
         type nameType;
         description "Key of a collecing process.";
       }
       ct:instance-list sctpCollector {
         ct:instance-type SctpCollector;
         description "List of SCTP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list udpCollector {
         if-feature udpTransport;
         ct:instance-type UdpCollector;
         description "List of UDP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list tcpCollector {
         if-feature tcpTransport;
         ct:instance-type TcpCollector;
         description "List of TCP receivers (sockets) on which the
           Collecting Process receives IPFIX Messages.";
       }
       ct:instance-list fileReader {
         if-feature fileReader;
         ct:instance-type FileReader;
         description "List of File Readers from which the Collecting
           Process reads IPFIX Messages.";
       }
       leaf-list exportingProcess {
         type instance-identifier { ct:instance-type ExportingProcess; }
         description "Export of received records without any
           modifications.  Records are processed by all Exporting
           Processes in the list.";
       }
     }
        
     ct:complex-type Collector {
         ct:abstract true;
         description "Abstract collector.";
         key name;
         leaf name {
           type nameType;
           description "Key of collectors";
         }
     }
        
     ct:complex-type Collector {
         ct:abstract true;
         description "Abstract collector.";
         key name;
         leaf name {
           type nameType;
           description "Key of collectors";
         }
     }
        
     ct:complex-type IpCollector {
       ct:abstract true;
       ct:extends Collector;
       description "Collector for IP transport protocols.";
       leaf localPort {
         type inet:port-number;
         description "If not configured, the Monitoring Device uses the
           default port number for IPFIX, which is 4739 without
           Transport Layer Security, and 4740 if Transport Layer
           Security is activated.";
       }
       container transportLayerSecurity {
         presence "If transportLayerSecurity is present, DTLS is enabled
           if the transport protocol is SCTP or UDP, and TLS is enabled
           if the transport protocol is TCP.";
         description "Transport Layer Security configuration.";
         uses transportLayerSecurityParameters;
       }
       list transportSession {
         config false;
         description "This list contains the currently established
           Transport Sessions terminating at the given socket.";
         uses transportSessionParameters;
       }
     }
        
     ct:complex-type IpCollector {
       ct:abstract true;
       ct:extends Collector;
       description "Collector for IP transport protocols.";
       leaf localPort {
         type inet:port-number;
         description "If not configured, the Monitoring Device uses the
           default port number for IPFIX, which is 4739 without
           Transport Layer Security, and 4740 if Transport Layer
           Security is activated.";
       }
       container transportLayerSecurity {
         presence "If transportLayerSecurity is present, DTLS is enabled
           if the transport protocol is SCTP or UDP, and TLS is enabled
           if the transport protocol is TCP.";
         description "Transport Layer Security configuration.";
         uses transportLayerSecurityParameters;
       }
       list transportSession {
         config false;
         description "This list contains the currently established
           Transport Sessions terminating at the given socket.";
         uses transportSessionParameters;
       }
     }
        
     ct:complex-type SctpCollector {
       ct:extends IpCollector;
       description "Collector listening on an SCTP socket";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses ... ";
         reference "RFC 4960, Section 6.4
           (Multi-Homed SCTP Endpoints).";
       }
     }
        
     ct:complex-type SctpCollector {
       ct:extends IpCollector;
       description "Collector listening on an SCTP socket";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses ... ";
         reference "RFC 4960, Section 6.4
           (Multi-Homed SCTP Endpoints).";
       }
     }
        

ct:complex-type UdpCollector {

ct:复杂型UDP收集器{

       ct:extends IpCollector;
       description "Parameters of a listening UDP socket at a
         Collecting Process.";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses on which the Collecting
           Process listens for IPFIX Messages.";
       }
       leaf templateLifeTime {
         type uint32;
         units seconds;
         default 1800;
         description "Sets the lifetime of Templates for all UDP
           Transport Sessions ... ";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshTimeout).";
       }
       leaf optionsTemplateLifeTime {
         type uint32;
         units seconds;
         default 1800;
         description "Sets the lifetime of Options Templates for all
           UDP Transport Sessions terminating at this UDP socket.
           ... ";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshTimeout).";
       }
       leaf templateLifePacket {
         type uint32;
         units "IPFIX Messages";
         description "If this parameter is configured, Templates
           defined in a UDP Transport Session become invalid if ...";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshPacket).";
       }
       leaf optionsTemplateLifePacket {
         type uint32;
         units "IPFIX Messages";
         description "If this parameter is configured, Options
           Templates defined in a UDP Transport Session become
           invalid if ...";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshPacket).";
       }
     }
        
       ct:extends IpCollector;
       description "Parameters of a listening UDP socket at a
         Collecting Process.";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses on which the Collecting
           Process listens for IPFIX Messages.";
       }
       leaf templateLifeTime {
         type uint32;
         units seconds;
         default 1800;
         description "Sets the lifetime of Templates for all UDP
           Transport Sessions ... ";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshTimeout).";
       }
       leaf optionsTemplateLifeTime {
         type uint32;
         units seconds;
         default 1800;
         description "Sets the lifetime of Options Templates for all
           UDP Transport Sessions terminating at this UDP socket.
           ... ";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshTimeout).";
       }
       leaf templateLifePacket {
         type uint32;
         units "IPFIX Messages";
         description "If this parameter is configured, Templates
           defined in a UDP Transport Session become invalid if ...";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionTemplateRefreshPacket).";
       }
       leaf optionsTemplateLifePacket {
         type uint32;
         units "IPFIX Messages";
         description "If this parameter is configured, Options
           Templates defined in a UDP Transport Session become
           invalid if ...";
         reference "RFC 5101, Section 10.3.7; RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplateRefreshPacket).";
       }
     }
        
     ct:complex-type TcpCollector {
       ct:extends IpCollector;
        
     ct:complex-type TcpCollector {
       ct:extends IpCollector;
        
       description "Collector listening on a TCP socket.";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses on which the Collecting
           Process listens for IPFIX Messages.";
       }
     }
        
       description "Collector listening on a TCP socket.";
       leaf-list localIPAddress {
         type inet:ip-address;
         description "List of local IP addresses on which the Collecting
           Process listens for IPFIX Messages.";
       }
     }
        
     ct:complex-type FileReader {
       ct:extends Collector;
       description "File Reading collector.";
       leaf file {
         type inet:uri;
         mandatory true;
         description "URI specifying the location of the file.";
       }
       leaf bytes {
         type yang:counter64;
         units octets;
         config false;
         description "The number of bytes read by the File Reader.
           ... ";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages read by the File
           Reader. ... ";
       }
       leaf records {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records read by the File
           Reader. ... ";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         config false;
         description "The number of Template Records (excluding
           Options Template Records) read by the File Reader. ...";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         config false;
        
     ct:complex-type FileReader {
       ct:extends Collector;
       description "File Reading collector.";
       leaf file {
         type inet:uri;
         mandatory true;
         description "URI specifying the location of the file.";
       }
       leaf bytes {
         type yang:counter64;
         units octets;
         config false;
         description "The number of bytes read by the File Reader.
           ... ";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         config false;
         description "The number of IPFIX Messages read by the File
           Reader. ... ";
       }
       leaf records {
         type yang:counter64;
         units "Data Records";
         config false;
         description "The number of Data Records read by the File
           Reader. ... ";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         config false;
         description "The number of Template Records (excluding
           Options Template Records) read by the File Reader. ...";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         config false;
        
         description "The number of Options Template Records read by
           the File Reader. ... ";
       }
       leaf fileReaderDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion ... ";
       }
       list template {
         config false;
         description "This list contains the Templates and Options
           Templates that have been read by the File Reader.
           Withdrawn or invalidated (Options) Templates MUST be removed
           from this list.";
         uses templateParameters;
       }
     }
        
         description "The number of Options Template Records read by
           the File Reader. ... ";
       }
       leaf fileReaderDiscontinuityTime {
         type yang:date-and-time;
         config false;
         description "Timestamp of the most recent occasion ... ";
       }
       list template {
         config false;
         description "This list contains the Templates and Options
           Templates that have been read by the File Reader.
           Withdrawn or invalidated (Options) Templates MUST be removed
           from this list.";
         uses templateParameters;
       }
     }
        
     ct:complex-type SelectionProcess {
         description "Selection Process";
         key name;
         leaf name {
           type nameType;
           description "Key of a selection process.";
         }
         ct:instance-list selector {
           ct:instance-type Selector;
           min-elements 1;
           ordered-by user;
           description "List of Selectors that define the action of the
             Selection Process on a single packet.  The Selectors are
             serially invoked in the same order as they appear in this
             list.";
         }
         list selectionSequence {
           config false;
           description "This list contains the Selection Sequence IDs
             which are assigned by the Monitoring Device ... ";
           reference "RFC 5476.";
           leaf observationDomainId {
             type uint32;
             description "Observation Domain ID for which the
               Selection Sequence ID is assigned.";
           }
           leaf selectionSequenceId {
             type uint64;
             description "Selection Sequence ID used in the Selection
               Sequence (Statistics) Report Interpretation.";
        
     ct:complex-type SelectionProcess {
         description "Selection Process";
         key name;
         leaf name {
           type nameType;
           description "Key of a selection process.";
         }
         ct:instance-list selector {
           ct:instance-type Selector;
           min-elements 1;
           ordered-by user;
           description "List of Selectors that define the action of the
             Selection Process on a single packet.  The Selectors are
             serially invoked in the same order as they appear in this
             list.";
         }
         list selectionSequence {
           config false;
           description "This list contains the Selection Sequence IDs
             which are assigned by the Monitoring Device ... ";
           reference "RFC 5476.";
           leaf observationDomainId {
             type uint32;
             description "Observation Domain ID for which the
               Selection Sequence ID is assigned.";
           }
           leaf selectionSequenceId {
             type uint64;
             description "Selection Sequence ID used in the Selection
               Sequence (Statistics) Report Interpretation.";
        
           }
         }
         leaf cache {
           type instance-identifier { ct:instance-type Cache; }
           description "Cache which receives the output of the
             Selection Process.";
         }
       }
        
           }
         }
         leaf cache {
           type instance-identifier { ct:instance-type Cache; }
           description "Cache which receives the output of the
             Selection Process.";
         }
       }
        
     /*****************************************************************
     * Groupings
     *****************************************************************/
        
     /*****************************************************************
     * Groupings
     *****************************************************************/
        
     grouping transportLayerSecurityParameters {
       description "Transport layer security parameters.";
       leaf-list localCertificationAuthorityDN {
         type string;
         description "Distinguished names of certification authorities
           whose certificates may be used to identify the local
           endpoint.";
       }
       leaf-list localSubjectDN {
         type string;
         description "Distinguished names that may be used in the
           certificates to identify the local endpoint.";
       }
       leaf-list localSubjectFQDN {
         type inet:domain-name;
         description "Fully qualified domain names that may be used to
           in the certificates to identify the local endpoint.";
       }
       leaf-list remoteCertificationAuthorityDN {
         type string;
         description "Distinguished names of certification authorities
           whose certificates are accepted to authorize remote
           endpoints.";
       }
       leaf-list remoteSubjectDN {
         type string;
         description "Distinguished names that are accepted in
           certificates to authorize remote endpoints.";
       }
       leaf-list remoteSubjectFQDN {
         type inet:domain-name;
         description "Fully qualified domain names that are accepted in
           certificates to authorize remote endpoints.";
       }
     }
        
     grouping transportLayerSecurityParameters {
       description "Transport layer security parameters.";
       leaf-list localCertificationAuthorityDN {
         type string;
         description "Distinguished names of certification authorities
           whose certificates may be used to identify the local
           endpoint.";
       }
       leaf-list localSubjectDN {
         type string;
         description "Distinguished names that may be used in the
           certificates to identify the local endpoint.";
       }
       leaf-list localSubjectFQDN {
         type inet:domain-name;
         description "Fully qualified domain names that may be used to
           in the certificates to identify the local endpoint.";
       }
       leaf-list remoteCertificationAuthorityDN {
         type string;
         description "Distinguished names of certification authorities
           whose certificates are accepted to authorize remote
           endpoints.";
       }
       leaf-list remoteSubjectDN {
         type string;
         description "Distinguished names that are accepted in
           certificates to authorize remote endpoints.";
       }
       leaf-list remoteSubjectFQDN {
         type inet:domain-name;
         description "Fully qualified domain names that are accepted in
           certificates to authorize remote endpoints.";
       }
     }
        
     grouping templateParameters {
       description "State parameters of a Template used by an Exporting
         Process or received by a Collecting Process ... ";
       reference "RFC 5101; RFC 5815, Section 8 (ipfixTemplateEntry,
         ipfixTemplateDefinitionEntry, ipfixTemplateStatsEntry)";
       leaf observationDomainId {
         type uint32;
         description "The ID of the Observation Domain for which this
           Template is defined.";
         reference "RFC 5815, Section 8
           (ipfixTemplateObservationDomainId).";
       }
       leaf templateId {
         type uint16 {
           range "256..65535" {
             description "Valid range of Template Ids.";
             reference "RFC 5101";
           }
         }
         description "This number indicates the Template Id in the IPFIX
           message.";
         reference "RFC 5815, Section 8 (ipfixTemplateId).";
       }
       leaf setId {
         type uint16;
         description "This number indicates the Set Id of the Template.
           ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateSetId).";
       }
       leaf accessTime {
         type yang:date-and-time;
         description "Used for Exporting Processes, ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateAccessTime).";
       }
       leaf templateDataRecords {
         type yang:counter64;
         description "The number of transmitted or received Data
           Records ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateDataRecords).";
       }
       leaf templateDiscontinuityTime {
         type yang:date-and-time;
         description "Timestamp of the most recent occasion at which
           the counter templateDataRecords suffered a discontinuity.
           ... ";
         reference "RFC 5815, Section 8
           (ipfixTemplateDiscontinuityTime).";
       }
        
     grouping templateParameters {
       description "State parameters of a Template used by an Exporting
         Process or received by a Collecting Process ... ";
       reference "RFC 5101; RFC 5815, Section 8 (ipfixTemplateEntry,
         ipfixTemplateDefinitionEntry, ipfixTemplateStatsEntry)";
       leaf observationDomainId {
         type uint32;
         description "The ID of the Observation Domain for which this
           Template is defined.";
         reference "RFC 5815, Section 8
           (ipfixTemplateObservationDomainId).";
       }
       leaf templateId {
         type uint16 {
           range "256..65535" {
             description "Valid range of Template Ids.";
             reference "RFC 5101";
           }
         }
         description "This number indicates the Template Id in the IPFIX
           message.";
         reference "RFC 5815, Section 8 (ipfixTemplateId).";
       }
       leaf setId {
         type uint16;
         description "This number indicates the Set Id of the Template.
           ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateSetId).";
       }
       leaf accessTime {
         type yang:date-and-time;
         description "Used for Exporting Processes, ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateAccessTime).";
       }
       leaf templateDataRecords {
         type yang:counter64;
         description "The number of transmitted or received Data
           Records ... ";
         reference "RFC 5815, Section 8 (ipfixTemplateDataRecords).";
       }
       leaf templateDiscontinuityTime {
         type yang:date-and-time;
         description "Timestamp of the most recent occasion at which
           the counter templateDataRecords suffered a discontinuity.
           ... ";
         reference "RFC 5815, Section 8
           (ipfixTemplateDiscontinuityTime).";
       }
        
       list field {
         description "This list contains the (Options) Template
           fields of which the (Options) Template is defined.
           ... ";
         leaf ieId {
           type uint16 {
             range "1..32767" {
               description "Valid range of Information Element
                   identifiers.";
               reference "RFC 5102, Section 4.";
             }
           }
           description "This parameter indicates the Information
             Element Id of the field.";
           reference "RFC 5815, Section 8 (ipfixTemplateDefinitionIeId);
             RFC 5102.";
         }
         leaf ieLength {
           type uint16;
           units octets;
           description "This parameter indicates the length of the
             Information Element of the field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionIeLength); RFC 5102.";
         }
         leaf ieEnterpriseNumber {
           type uint32;
           description "This parameter indicates the IANA enterprise
             number of the authority ... ";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionEnterpriseNumber).";
         }
         leaf isFlowKey {
           when "../../setId = 2" {
             description "This parameter is available for non-Options
               Templates (Set Id is 2).";
           }
           type empty;
           description "If present, this is a Flow Key field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionFlags).";
         }
         leaf isScope {
           when "../../setId = 3" {
             description "This parameter is available for Options
               Templates (Set Id is 3).";
           }
           type empty;
        
       list field {
         description "This list contains the (Options) Template
           fields of which the (Options) Template is defined.
           ... ";
         leaf ieId {
           type uint16 {
             range "1..32767" {
               description "Valid range of Information Element
                   identifiers.";
               reference "RFC 5102, Section 4.";
             }
           }
           description "This parameter indicates the Information
             Element Id of the field.";
           reference "RFC 5815, Section 8 (ipfixTemplateDefinitionIeId);
             RFC 5102.";
         }
         leaf ieLength {
           type uint16;
           units octets;
           description "This parameter indicates the length of the
             Information Element of the field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionIeLength); RFC 5102.";
         }
         leaf ieEnterpriseNumber {
           type uint32;
           description "This parameter indicates the IANA enterprise
             number of the authority ... ";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionEnterpriseNumber).";
         }
         leaf isFlowKey {
           when "../../setId = 2" {
             description "This parameter is available for non-Options
               Templates (Set Id is 2).";
           }
           type empty;
           description "If present, this is a Flow Key field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionFlags).";
         }
         leaf isScope {
           when "../../setId = 3" {
             description "This parameter is available for Options
               Templates (Set Id is 3).";
           }
           type empty;
        
           description "If present, this is a scope field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionFlags).";
         }
       }
     }
        
           description "If present, this is a scope field.";
           reference "RFC 5815, Section 8
             (ipfixTemplateDefinitionFlags).";
         }
       }
     }
        
     grouping transportSessionParameters {
       description "State parameters of a Transport Session ... ";
       reference "RFC 5101; RFC 5815, Section 8
         (ipfixTransportSessionEntry,
          ipfixTransportSessionStatsEntry)";
       leaf ipfixVersion {
         type uint16;
         description "Used for Exporting Processes, this parameter
           contains the version number of the IPFIX protocol ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionIpfixVersion).";
       }
       leaf sourceAddress {
         type inet:ip-address;
         description "The source address of the Exporter of the
           IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSourceAddressType,
           ipfixTransportSessionSourceAddress).";
       }
       leaf destinationAddress {
         type inet:ip-address;
         description "The destination address of the Collector of
           the IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDestinationAddressType,
           ipfixTransportSessionDestinationAddress).";
       }
       leaf sourcePort {
         type inet:port-number;
         description "The transport protocol port number of the
           Exporter of the IPFIX Transport Session.";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSourcePort).";
       }
       leaf destinationPort {
         type inet:port-number;
         description "The transport protocol port number of the
           Collector of the IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDestinationPort).";
        
     grouping transportSessionParameters {
       description "State parameters of a Transport Session ... ";
       reference "RFC 5101; RFC 5815, Section 8
         (ipfixTransportSessionEntry,
          ipfixTransportSessionStatsEntry)";
       leaf ipfixVersion {
         type uint16;
         description "Used for Exporting Processes, this parameter
           contains the version number of the IPFIX protocol ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionIpfixVersion).";
       }
       leaf sourceAddress {
         type inet:ip-address;
         description "The source address of the Exporter of the
           IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSourceAddressType,
           ipfixTransportSessionSourceAddress).";
       }
       leaf destinationAddress {
         type inet:ip-address;
         description "The destination address of the Collector of
           the IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDestinationAddressType,
           ipfixTransportSessionDestinationAddress).";
       }
       leaf sourcePort {
         type inet:port-number;
         description "The transport protocol port number of the
           Exporter of the IPFIX Transport Session.";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSourcePort).";
       }
       leaf destinationPort {
         type inet:port-number;
         description "The transport protocol port number of the
           Collector of the IPFIX Transport Session... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDestinationPort).";
        
       }
       leaf sctpAssocId {
         type uint32;
         description "The association id used for the SCTP session
           between the Exporter and the Collector ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSctpAssocId),
           RFC 3871";
       }
       leaf status {
         type transportSessionStatus;
         description "Status of the Transport Session.";
         reference "RFC 5815, Section 8 (ipfixTransportSessionStatus).";
       }
       leaf rate {
         type yang:gauge32;
         units "bytes per second";
         description "The number of bytes per second transmitted by the
           Exporting Process or received by the Collecting Process.
           This parameter is updated every second.";
         reference "RFC 5815, Section 8 (ipfixTransportSessionRate).";
       }
       leaf bytes {
         type yang:counter64;
         units bytes;
         description "The number of bytes transmitted by the
           Exporting Process or received by the Collecting
           Process ... ";
         reference "RFC 5815, Section 8 (ipfixTransportSessionBytes).";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         description "The number of messages transmitted by the
           Exporting Process or received by the Collecting Process... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionMessages).";
       }
       leaf discardedMessages {
         type yang:counter64;
         units "IPFIX Messages";
         description "Used for Exporting Processes, this parameter
           indicates the number of messages that could not be
           sent ...";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDiscardedMessages).";
       }
       leaf records {
        
       }
       leaf sctpAssocId {
         type uint32;
         description "The association id used for the SCTP session
           between the Exporter and the Collector ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionSctpAssocId),
           RFC 3871";
       }
       leaf status {
         type transportSessionStatus;
         description "Status of the Transport Session.";
         reference "RFC 5815, Section 8 (ipfixTransportSessionStatus).";
       }
       leaf rate {
         type yang:gauge32;
         units "bytes per second";
         description "The number of bytes per second transmitted by the
           Exporting Process or received by the Collecting Process.
           This parameter is updated every second.";
         reference "RFC 5815, Section 8 (ipfixTransportSessionRate).";
       }
       leaf bytes {
         type yang:counter64;
         units bytes;
         description "The number of bytes transmitted by the
           Exporting Process or received by the Collecting
           Process ... ";
         reference "RFC 5815, Section 8 (ipfixTransportSessionBytes).";
       }
       leaf messages {
         type yang:counter64;
         units "IPFIX Messages";
         description "The number of messages transmitted by the
           Exporting Process or received by the Collecting Process... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionMessages).";
       }
       leaf discardedMessages {
         type yang:counter64;
         units "IPFIX Messages";
         description "Used for Exporting Processes, this parameter
           indicates the number of messages that could not be
           sent ...";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDiscardedMessages).";
       }
       leaf records {
        
         type yang:counter64;
         units "Data Records";
         description "The number of Data Records transmitted ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionRecords).";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         description "The number of Templates transmitted by the
           Exporting Process or received by the Collecting Process.
           ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionTemplates).";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         description "The number of Option Templates transmitted by the
           Exporting Process or received by the Collecting Process...";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplates).";
       }
       leaf transportSessionStartTime {
         type yang:date-and-time;
         description "Timestamp of the start of the given Transport
           Session... ";
       }
       leaf transportSessionDiscontinuityTime {
         type yang:date-and-time;
         description "Timestamp of the most recent occasion at which
           one or more of the Transport Session counters suffered a
           discontinuity... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDiscontinuityTime).";
       }
       list template {
         description "This list contains the Templates and Options
           Templates that are transmitted by the Exporting Process
           or received by the Collecting Process.
           Withdrawn or invalidated (Options) Templates MUST be removed
           from this list.";
         uses templateParameters;
       }
     }
        
         type yang:counter64;
         units "Data Records";
         description "The number of Data Records transmitted ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionRecords).";
       }
       leaf templates {
         type yang:counter32;
         units "Templates";
         description "The number of Templates transmitted by the
           Exporting Process or received by the Collecting Process.
           ... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionTemplates).";
       }
       leaf optionsTemplates {
         type yang:counter32;
         units "Options Templates";
         description "The number of Option Templates transmitted by the
           Exporting Process or received by the Collecting Process...";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionOptionsTemplates).";
       }
       leaf transportSessionStartTime {
         type yang:date-and-time;
         description "Timestamp of the start of the given Transport
           Session... ";
       }
       leaf transportSessionDiscontinuityTime {
         type yang:date-and-time;
         description "Timestamp of the most recent occasion at which
           one or more of the Transport Session counters suffered a
           discontinuity... ";
         reference "RFC 5815, Section 8
           (ipfixTransportSessionDiscontinuityTime).";
       }
       list template {
         description "This list contains the Templates and Options
           Templates that are transmitted by the Exporting Process
           or received by the Collecting Process.
           Withdrawn or invalidated (Options) Templates MUST be removed
           from this list.";
         uses templateParameters;
       }
     }
        
     /*****************************************************************
     * Main container
        
     /*****************************************************************
     * Main container
        
     *****************************************************************/
        
     *****************************************************************/
        
     container ipfix {
       description "Top-level node of the IPFIX/PSAMP configuration
         data model.";
       ct:instance-list collectingProcess {
         if-feature collector;
         ct:instance-type CollectingProcess;
       }
        
     container ipfix {
       description "Top-level node of the IPFIX/PSAMP configuration
         data model.";
       ct:instance-list collectingProcess {
         if-feature collector;
         ct:instance-type CollectingProcess;
       }
        
       ct:instance-list observationPoint {
         if-feature meter;
         ct:instance-type ObservationPoint;
       }
        
       ct:instance-list observationPoint {
         if-feature meter;
         ct:instance-type ObservationPoint;
       }
        
       ct:instance-list selectionProcess {
         if-feature meter;
         ct:instance-type SelectionProcess;
       }
        
       ct:instance-list selectionProcess {
         if-feature meter;
         ct:instance-type SelectionProcess;
       }
        
       ct:instance-list cache {
         if-feature meter;
         description "Cache of the Monitoring Device.";
         ct:instance-type Cache;
       }
        
       ct:instance-list cache {
         if-feature meter;
         description "Cache of the Monitoring Device.";
         ct:instance-type Cache;
       }
        
       ct:instance-list exportingProcess {
         if-feature exporter;
         description "Exporting Process of the Monitoring Device.";
         ct:instance-type ExportingProcess;
       }
        
       ct:instance-list exportingProcess {
         if-feature exporter;
         description "Exporting Process of the Monitoring Device.";
         ct:instance-type ExportingProcess;
       }
        
     }
}
<CODE ENDS>
        
     }
}
<CODE ENDS>
        

Authors' Addresses

作者地址

Bernd Linowski TCS/Nokia Siemens Networks Heltorfer Strasse 1 Duesseldorf 40472 Germany

Bernd Linowski TCS/Nokia Siemens Networks Heltorfer Strasse 1 Duesseldorf 40472德国

   EMail: bernd.linowski.ext@nsn.com
        
   EMail: bernd.linowski.ext@nsn.com
        

Mehmet Ersue Nokia Siemens Networks St.-Martin-Strasse 76 Munich 81541 Germany

德国慕尼黑圣马丁大街76号诺基亚西门子网络公司慕尼黑81541

   EMail: mehmet.ersue@nsn.com
        
   EMail: mehmet.ersue@nsn.com
        

Siarhei Kuryla 360 Treasury Systems Grueneburgweg 16-18 Frankfurt am Main 60322 Germany

Siarhei Kuryla 360财政系统Grueneburgweg 16-18德国缅因州法兰克福60322

   EMail: s.kuryla@gmail.com
        
   EMail: s.kuryla@gmail.com