Internet Engineering Task Force (IETF)                        A. Bierman
Request for Comments: 6243                                       Brocade
Category: Standards Track                                     B. Lengyel
ISSN: 2070-1721                                                 Ericsson
                                                               June 2011
        
Internet Engineering Task Force (IETF)                        A. Bierman
Request for Comments: 6243                                       Brocade
Category: Standards Track                                     B. Lengyel
ISSN: 2070-1721                                                 Ericsson
                                                               June 2011
        

With-defaults Capability for NETCONF

具有NETCONF的默认功能

Abstract

摘要

The Network Configuration Protocol (NETCONF) defines ways to read and edit configuration data from a NETCONF server. In some cases, part of this data may not be set by the NETCONF client, but rather a default value known to the server is used instead. In many situations the NETCONF client has a priori knowledge about default data, so the NETCONF server does not need to save it in a NETCONF configuration datastore or send it to the client in a retrieval operation reply. In other situations the NETCONF client will need this data from the server. Not all server implementations treat this default data the same way. This document defines a capability-based extension to the NETCONF protocol that allows the NETCONF client to identify how defaults are processed by the server, and also defines new mechanisms for client control of server processing of default data.

网络配置协议(NETCONF)定义了从NETCONF服务器读取和编辑配置数据的方法。在某些情况下,NETCONF客户端可能不会设置部分数据,而是使用服务器已知的默认值。在许多情况下,NETCONF客户端对默认数据具有先验知识,因此NETCONF服务器不需要将其保存在NETCONF配置数据存储中,也不需要在检索操作应答中将其发送给客户端。在其他情况下,NETCONF客户端需要从服务器获取这些数据。并非所有服务器实现都以相同的方式处理此默认数据。本文档定义了NETCONF协议的基于功能的扩展,允许NETCONF客户端识别服务器如何处理默认值,还定义了客户端控制服务器处理默认数据的新机制。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

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

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

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(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/rfc6243.

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

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.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  3
     1.2.  Default-Handling Behavior  . . . . . . . . . . . . . . . .  5
     1.3.  Client Controlled Retrieval of Default Data  . . . . . . .  5
   2.  Default-Handling Basic Modes . . . . . . . . . . . . . . . . .  6
     2.1.  'report-all' Basic Mode  . . . . . . . . . . . . . . . . .  6
       2.1.1.  'report-all' Basic Mode Retrieval  . . . . . . . . . .  6
       2.1.2.  'report-all' <with-defaults> Retrieval . . . . . . . .  6
       2.1.3.  'report-all' <edit-config> and <copy-config>
               Behavior . . . . . . . . . . . . . . . . . . . . . . .  6
     2.2.  'trim' Basic Mode  . . . . . . . . . . . . . . . . . . . .  7
       2.2.1.  'trim' Basic Mode Retrieval  . . . . . . . . . . . . .  7
       2.2.2.  'trim' <with-defaults> Retrieval . . . . . . . . . . .  7
       2.2.3.  'trim' <edit-config> and <copy-config> Behavior  . . .  7
     2.3.  'explicit' Basic Mode  . . . . . . . . . . . . . . . . . .  8
       2.3.1.  'explicit' Basic Mode Retrieval  . . . . . . . . . . .  8
       2.3.2.  'explicit' <with-defaults> Retrieval . . . . . . . . .  8
       2.3.3.  'explicit' <edit-config> and <copy-config> Behavior  .  8
   3.  Retrieval of Default Data  . . . . . . . . . . . . . . . . . .  9
     3.1.  'report-all' Retrieval Mode  . . . . . . . . . . . . . . .  9
     3.2.  'trim' Retrieval Mode  . . . . . . . . . . . . . . . . . .  9
     3.3.  'explicit' Retrieval Mode  . . . . . . . . . . . . . . . .  9
     3.4.  'report-all-tagged' Retrieval Mode . . . . . . . . . . . .  9
   4.  With-defaults Capability . . . . . . . . . . . . . . . . . . . 10
     4.1.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10
     4.2.  Dependencies . . . . . . . . . . . . . . . . . . . . . . . 10
     4.3.  Capability Identifier  . . . . . . . . . . . . . . . . . . 10
     4.4.  New Operations . . . . . . . . . . . . . . . . . . . . . . 11
     4.5.  Modifications to Existing Operations . . . . . . . . . . . 11
       4.5.1.  <get>, <get-config>, and <copy-config> Operations  . . 11
       4.5.2.  <edit-config> Operation  . . . . . . . . . . . . . . . 12
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  3
     1.2.  Default-Handling Behavior  . . . . . . . . . . . . . . . .  5
     1.3.  Client Controlled Retrieval of Default Data  . . . . . . .  5
   2.  Default-Handling Basic Modes . . . . . . . . . . . . . . . . .  6
     2.1.  'report-all' Basic Mode  . . . . . . . . . . . . . . . . .  6
       2.1.1.  'report-all' Basic Mode Retrieval  . . . . . . . . . .  6
       2.1.2.  'report-all' <with-defaults> Retrieval . . . . . . . .  6
       2.1.3.  'report-all' <edit-config> and <copy-config>
               Behavior . . . . . . . . . . . . . . . . . . . . . . .  6
     2.2.  'trim' Basic Mode  . . . . . . . . . . . . . . . . . . . .  7
       2.2.1.  'trim' Basic Mode Retrieval  . . . . . . . . . . . . .  7
       2.2.2.  'trim' <with-defaults> Retrieval . . . . . . . . . . .  7
       2.2.3.  'trim' <edit-config> and <copy-config> Behavior  . . .  7
     2.3.  'explicit' Basic Mode  . . . . . . . . . . . . . . . . . .  8
       2.3.1.  'explicit' Basic Mode Retrieval  . . . . . . . . . . .  8
       2.3.2.  'explicit' <with-defaults> Retrieval . . . . . . . . .  8
       2.3.3.  'explicit' <edit-config> and <copy-config> Behavior  .  8
   3.  Retrieval of Default Data  . . . . . . . . . . . . . . . . . .  9
     3.1.  'report-all' Retrieval Mode  . . . . . . . . . . . . . . .  9
     3.2.  'trim' Retrieval Mode  . . . . . . . . . . . . . . . . . .  9
     3.3.  'explicit' Retrieval Mode  . . . . . . . . . . . . . . . .  9
     3.4.  'report-all-tagged' Retrieval Mode . . . . . . . . . . . .  9
   4.  With-defaults Capability . . . . . . . . . . . . . . . . . . . 10
     4.1.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10
     4.2.  Dependencies . . . . . . . . . . . . . . . . . . . . . . . 10
     4.3.  Capability Identifier  . . . . . . . . . . . . . . . . . . 10
     4.4.  New Operations . . . . . . . . . . . . . . . . . . . . . . 11
     4.5.  Modifications to Existing Operations . . . . . . . . . . . 11
       4.5.1.  <get>, <get-config>, and <copy-config> Operations  . . 11
       4.5.2.  <edit-config> Operation  . . . . . . . . . . . . . . . 12
        
       4.5.3.  Other Operations . . . . . . . . . . . . . . . . . . . 13
     4.6.  Interactions with Other Capabilities . . . . . . . . . . . 13
   5.  YANG Module for the <with-defaults> Parameter  . . . . . . . . 13
   6.  XSD for the 'default' Attribute  . . . . . . . . . . . . . . . 17
   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 18
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 18
   9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19
   10. Normative References . . . . . . . . . . . . . . . . . . . . . 19
   Appendix A.  Usage Examples  . . . . . . . . . . . . . . . . . . . 20
     A.1.  Example YANG Module  . . . . . . . . . . . . . . . . . . . 20
     A.2.  Example Data Set . . . . . . . . . . . . . . . . . . . . . 21
     A.3.  Protocol Operation Examples  . . . . . . . . . . . . . . . 22
       A.3.1.  <with-defaults> = 'report-all' . . . . . . . . . . . . 22
       A.3.2.  <with-defaults> = 'report-all-tagged'  . . . . . . . . 23
       A.3.3.  <with-defaults> = 'trim' . . . . . . . . . . . . . . . 24
       A.3.4.  <with-defaults> = 'explicit' . . . . . . . . . . . . . 25
        
       4.5.3.  Other Operations . . . . . . . . . . . . . . . . . . . 13
     4.6.  Interactions with Other Capabilities . . . . . . . . . . . 13
   5.  YANG Module for the <with-defaults> Parameter  . . . . . . . . 13
   6.  XSD for the 'default' Attribute  . . . . . . . . . . . . . . . 17
   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 18
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 18
   9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19
   10. Normative References . . . . . . . . . . . . . . . . . . . . . 19
   Appendix A.  Usage Examples  . . . . . . . . . . . . . . . . . . . 20
     A.1.  Example YANG Module  . . . . . . . . . . . . . . . . . . . 20
     A.2.  Example Data Set . . . . . . . . . . . . . . . . . . . . . 21
     A.3.  Protocol Operation Examples  . . . . . . . . . . . . . . . 22
       A.3.1.  <with-defaults> = 'report-all' . . . . . . . . . . . . 22
       A.3.2.  <with-defaults> = 'report-all-tagged'  . . . . . . . . 23
       A.3.3.  <with-defaults> = 'trim' . . . . . . . . . . . . . . . 24
       A.3.4.  <with-defaults> = 'explicit' . . . . . . . . . . . . . 25
        
1. Introduction
1. 介绍

The NETCONF protocol [RFC6241] defines ways to read configuration and state data from a NETCONF server. Part of the configuration data may not be set by the NETCONF client, but rather by a default value from the data model. In many situations the NETCONF client has a priori knowledge about default data, so the NETCONF server does not need to send it to the client. A priori knowledge can be obtained, e.g., from a document formally describing the data models supported by the NETCONF server.

NETCONF协议[RFC6241]定义了从NETCONF服务器读取配置和状态数据的方法。部分配置数据可能不是由NETCONF客户端设置的,而是由数据模型中的默认值设置的。在许多情况下,NETCONF客户机对默认数据有先验知识,因此NETCONF服务器不需要将其发送给客户机。例如,可以从正式描述NETCONF服务器支持的数据模型的文档中获得先验知识。

It can be important for a client to know exactly how a server implementation will handle default data. There are subtle differences in some protocol operations where the default-handling behavior of the server will affect the outcome of the operation.

客户机确切地知道服务器实现将如何处理默认数据可能很重要。在某些协议操作中存在细微差异,其中服务器的默认处理行为将影响操作的结果。

1.1. Terminology
1.1. 术语

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

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

Data model schema: A document or set of documents describing the data models supported by the NETCONF server.

数据模型模式:描述NETCONF服务器支持的数据模型的文档或文档集。

Management application: A computer program running outside the NETCONF server that configures or supervises the NETCONF server. A management application can reach the device, e.g., via NETCONF, command line interface (CLI), or the Simple Network Management Protocol (SNMP).

管理应用程序:在NETCONF服务器外部运行的计算机程序,用于配置或监督NETCONF服务器。管理应用程序可以通过NETCONF、命令行界面(CLI)或简单网络管理协议(SNMP)等方式访问设备。

Schema default data: Data specified in the data model schema as default, that is, set or used by the device whenever the NETCONF client or other management application/user does not provide a specific value for the relevant data node. Schema default data may or may not be stored as part of a configuration datastore, depending on the basic mode used by a particular server.

模式默认数据:数据模型模式中指定为默认值的数据,即每当NETCONF客户端或其他管理应用程序/用户未为相关数据节点提供特定值时,设备设置或使用的数据。架构默认数据可能存储为配置数据存储的一部分,也可能不存储为配置数据存储的一部分,具体取决于特定服务器使用的基本模式。

Default data: Conceptual data containing a default value. Default data is not kept in a datastore. Not all servers use the same criteria to decide if a data node is actually instantiated in a datastore. If a data node is not present in a datastore, and a schema default definition is in use by the server instead, then it is considered to be a default data node.

默认数据:包含默认值的概念数据。默认数据不保存在数据存储中。并非所有服务器都使用相同的标准来决定数据节点是否在数据存储中实际实例化。如果数据存储中不存在数据节点,而服务器正在使用模式默认定义,则将其视为默认数据节点。

Default value: A default value is a value for a data node instance that is conceptually in use by the server, when the data node instance does not exist.

默认值:当数据节点实例不存在时,默认值是服务器概念上正在使用的数据节点实例的值。

Explicitly set data: Data that is set to any value by a NETCONF client or other management application by the way of an explicit management operation, including any data model schema default value. Any value set by the NETCONF server that is not the schema defined default value is also considered explicitly set data.

显式设置数据:NETCONF客户端或其他管理应用程序通过显式管理操作设置为任何值的数据,包括任何数据模型模式默认值。NETCONF服务器设置的任何不是模式定义的默认值的值也被视为显式设置数据。

<with-defaults> retrieval: Refers to a protocol operation that includes the <with-default> parameter to control the handling of default data.

<with defaults>检索:指包含<with default>参数的协议操作,用于控制默认数据的处理。

:with-defaults: The shorthand notation for the with-defaults capability identifier.

:with defaults:with defaults功能标识符的简写符号。

The following terms are defined in [RFC6241]:

[RFC6241]中定义了以下术语:

o client

o 客户

o datastore

o 数据存储

o operation

o 活动

o server

o 服务器

The following term is defined in [RFC6020]:

[RFC6020]中定义了以下术语:

o data node

o 数据节点

1.2. Default-Handling Behavior
1.2. 默认处理行为

The default-handling behavior used by a server will impact NETCONF protocol operations in two ways:

服务器使用的默认处理行为将以两种方式影响NETCONF协议操作:

1. Data retrieval: A server is normally allowed to exclude data nodes that it considers to contain the default value. The actual nodes omitted depend on the default-handling behavior used by the server.

1. 数据检索:通常允许服务器排除其认为包含默认值的数据节点。省略的实际节点取决于服务器使用的默认处理行为。

2. Create and delete operations: The <edit-config> 'operation' attribute can be used to create and/or delete specific data nodes. These operations depend on whether or not the target node currently exists. The server's default-handling behavior will determine whether or not the requested node currently exists in the configuration datastore.

2. 创建和删除操作:《编辑配置》“操作”属性可用于创建和/或删除特定数据节点。这些操作取决于目标节点当前是否存在。服务器的默认处理行为将确定配置数据存储中当前是否存在请求的节点。

1.3. Client Controlled Retrieval of Default Data
1.3. 客户端控制的默认数据检索

A networking device may have a large number of default values. Often the default values are specifically defined with a reasonable value, documented and well-known, so that the management user does not need to handle them. For these reasons, it is quite common for networking devices to suppress the output of parameters having the default value.

网络设备可能有大量默认值。通常,默认值是用一个合理的值专门定义的、有文档记录的和众所周知的,这样管理用户就不需要处理它们了。由于这些原因,网络设备通常会抑制具有默认值的参数的输出。

However, there are use-cases when a NETCONF client will need the default data from the server:

但是,NETCONF客户机需要服务器提供的默认数据时,也有一些用例:

o The management application often needs a single, definitive, and complete set of configuration values that determine how the networking device works.

o 管理应用程序通常需要一组确定联网设备工作方式的单一、确定且完整的配置值。

o Documentation about default values can be unreliable or unavailable.

o 关于默认值的文档可能不可靠或不可用。

o Some management applications might not have the capabilities to correctly parse and interpret formal data models.

o 某些管理应用程序可能不具备正确解析和解释正式数据模型的能力。

o Human users might want to understand the received data without consultation of the documentation.

o 人类用户可能希望在不查阅文档的情况下理解接收到的数据。

In all these cases, the NETCONF client will need a mechanism to retrieve default data from a NETCONF server.

在所有这些情况下,NETCONF客户端都需要一种从NETCONF服务器检索默认数据的机制。

This document defines a NETCONF protocol capability to identify the server's default-handling behavior, an XML [W3C.REC-xmlschema-0-20041028] attribute to identify default data,

本文档定义了一个NETCONF协议功能,用于识别服务器的默认处理行为,一个XML[W3C.REC-xmlschema-0-20041028]属性用于识别默认数据,

and a YANG module extension to the NETCONF protocol that allows the NETCONF client to control whether default data is returned by the server.

NETCONF协议的一个扩展模块,允许NETCONF客户端控制服务器是否返回默认数据。

2. Default-Handling Basic Modes
2. 默认处理基本模式

Not all server implementations treat default data in the same way. Instead of forcing a single implementation strategy, this document allows a server to advertise a particular style of default-handling, and the client can adjust accordingly. Client implementations are expected to be powerful enough to support all three of the server basic default-handling modes.

并非所有服务器实现都以相同的方式处理默认数据。本文档不强制采用单一的实现策略,而是允许服务器公布特定样式的默认处理,客户机可以相应地进行调整。客户机实现的功能应该足够强大,能够支持所有三种服务器基本默认处理模式。

NETCONF servers report default data in different ways. This document specifies three standard default-handling basic modes that a server implementer may choose from:

NETCONF服务器以不同的方式报告默认数据。本文档指定了服务器实现者可以选择的三种标准默认处理基本模式:

o report-all

o 报告所有

o trim

o 修剪

o explicit

o 明确的

A server MUST select one of the three basic modes defined in this section for handling default data.

服务器必须选择本节中定义的三种基本模式之一来处理默认数据。

2.1. 'report-all' Basic Mode
2.1. “全部报告”基本模式

A server that uses the 'report-all' basic mode does not consider any data node to be default data, even schema default data.

使用“报表全部”基本模式的服务器不认为任何数据节点是默认数据,甚至是架构默认数据。

2.1.1. 'report-all' Basic Mode Retrieval
2.1.1. “全部报告”基本模式检索

When data is retrieved from a server using the 'report-all' basic mode, and the <with-defaults> parameter is not present, all data nodes MUST be reported.

使用“全部报告”基本模式从服务器检索数据时,如果<with defaults>参数不存在,则必须报告所有数据节点。

2.1.2. 'report-all' <with-defaults> Retrieval
2.1.2. “全部报告”<使用默认值>检索

If the 'report-all' basic mode is used by the server, then the server MUST support the <with-defaults> parameter with a value equal to 'report-all', as specified in Section 3.1.

如果服务器使用“全部报告”基本模式,则服务器必须支持<with defaults>参数,其值等于“全部报告”,如第3.1节所述。

2.1.3. 'report-all' <edit-config> and <copy-config> Behavior
2.1.3. “报告所有”<edit config>和<copy config>行为

The server MUST consider every data node to exist, even those containing a schema default value. A valid 'create' operation attribute for a data node that contains its schema default value MUST

服务器必须考虑每个数据节点都存在,甚至包含架构默认值的数据节点。必须为包含其架构默认值的数据节点提供有效的“创建”操作属性

fail with a 'data-exists' error-tag. A valid 'delete' operation attribute for a data node that contains its schema default value MUST succeed, even though the data node is immediately replaced by the server with the default value.

使用“数据存在”错误标记失败。包含其架构默认值的数据节点的有效“删除”操作属性必须成功,即使服务器立即用默认值替换该数据节点。

A server that uses the 'report-all' basic mode has no concept of a default node, so the 'report-all-tagged' <with-defaults> retrieval mode is not relevant. There will never be any tagged nodes, since there are no nodes that are omitted in a basic-mode retrieval operation. If the 'default' attribute is present in any configuration data, the server MUST return an <rpc-error> response with an 'unknown-attribute' error-tag.

使用“全部报告”基本模式的服务器没有默认节点的概念,因此“全部报告已标记”<with defaults>检索模式与此无关。不会有任何标记节点,因为在基本模式检索操作中不会忽略任何节点。如果任何配置数据中都存在“default”属性,则服务器必须返回带有“unknown attribute”错误标记的<rpc error>响应。

2.2. 'trim' Basic Mode
2.2. “修剪”基本模式

A server that uses the 'trim' basic mode MUST consider any data node set to its schema default value to be default data.

使用“Trim'”基本模式的服务器必须考虑将任何数据节点设置为其架构默认值为默认数据。

2.2.1. 'trim' Basic Mode Retrieval
2.2.1. “修剪”基本模式检索

When data is retrieved from a server using the 'trim' basic mode, and the <with-defaults> parameter is not present, data nodes MUST NOT be reported if they contain the schema default value. Non-configuration data nodes containing the schema default value MUST NOT be reported.

使用“trim”基本模式从服务器检索数据时,如果<with defaults>参数不存在,则如果数据节点包含架构默认值,则不得报告数据节点。不得报告包含架构默认值的非配置数据节点。

2.2.2. 'trim' <with-defaults> Retrieval
2.2.2. “修剪”<使用默认值>检索

If the 'trim' basic mode is used by the server, then the server MUST support the <with-defaults> parameter with a value equal to 'trim', as specified in Section 3.2.

如果服务器使用“trim”基本模式,则服务器必须支持<with defaults>参数,其值等于“trim”,如第3.2节所述。

2.2.3. 'trim' <edit-config> and <copy-config> Behavior
2.2.3. “修剪”<edit config>和<copy config>行为

The server MUST consider any data node that does not contain its schema default value to exist. A valid 'create' operation attribute for a data node that has a schema default value defined MUST succeed. A valid 'delete' operation attribute for a missing data node that has a schema default value MUST fail. The server MUST return an <rpc-error> response with a 'data-missing' error-tag.

服务器必须考虑任何不包含其架构默认值的数据节点存在。定义了架构默认值的数据节点的有效“创建”操作属性必须成功。具有架构默认值的缺失数据节点的有效“删除”操作属性必须失败。服务器必须返回带有“数据丢失”错误标记的<rpc error>响应。

If a client sets a data node to its schema default value, using any valid operation, it MUST succeed, although the data node MUST NOT be saved in the NETCONF configuration datastore. This has the same effect as removing the data node and treating it as default data.

如果客户机使用任何有效操作将数据节点设置为其模式默认值,则必须成功,尽管数据节点不得保存在NETCONF配置数据存储中。这与删除数据节点并将其视为默认数据具有相同的效果。

If the server supports the 'report-all-tagged' value for the <with-defaults> parameter, then the 'default' attribute MUST be

如果服务器支持<with defaults>参数的“report all taged”值,则“default”属性必须为

accepted in configuration input, as described in Section 4.5.1 and Section 4.5.2.

如第4.5.1节和第4.5.2节所述,在配置输入中接受。

2.3. 'explicit' Basic Mode
2.3. “显式”基本模式

A server that uses the 'explicit' basic mode MUST consider any data node that is not explicitly set data to be default data.

使用“显式”基本模式的服务器必须考虑未显式设置数据的任何数据节点为默认数据。

2.3.1. 'explicit' Basic Mode Retrieval
2.3.1. “显式”基本模式检索

When data is retrieved from a server using the 'explicit' basic mode, and the <with-defaults> parameter is not present, data nodes MUST be reported if explicitly set by the client, even if they contain the schema default value. Non-configuration data nodes containing the schema default value MUST be reported.

使用“显式”基本模式从服务器检索数据时,如果<with defaults>参数不存在,则必须报告由客户端显式设置的数据节点,即使它们包含架构默认值。必须报告包含架构默认值的非配置数据节点。

2.3.2. 'explicit' <with-defaults> Retrieval
2.3.2. “显式”<带默认值>检索

If the 'explicit' basic mode is used by the server, the server MUST support the <with-defaults> parameter with a value equal to 'explicit', as specified in Section 3.3.

如果服务器使用“显式”基本模式,则服务器必须支持<with defaults>参数,其值等于“explicit”,如第3.3节所述。

2.3.3. 'explicit' <edit-config> and <copy-config> Behavior
2.3.3. “显式”<edit config>和<copy config>行为

The server considers any data node that is explicitly set data to exist. A valid 'create' operation attribute for a data node that has been set by a client to its schema default value MUST fail with a 'data-exists' error-tag. A valid 'create' operation attribute for a data node that has been set by the server to its schema default value MUST succeed. A valid 'delete' operation attribute for a data node that has been set by a client to its schema default value MUST succeed. A valid 'delete' operation attribute for a data node that has been set by the server to its schema default value MUST fail with a 'data-missing' error-tag.

服务器会考虑显式设置为存在数据的任何数据节点。已由客户端设置为其架构默认值的数据节点的有效“创建”操作属性必须失败,并带有“数据存在”错误标记。已由服务器设置为其架构默认值的数据节点的有效“创建”操作属性必须成功。已由客户端设置为其架构默认值的数据节点的有效“删除”操作属性必须成功。对于已由服务器设置为其架构默认值的数据节点,有效的“删除”操作属性必须失败,并带有“数据丢失”错误标记。

If the server supports the 'report-all-tagged' retrieval mode in its :with-defaults capability, then the 'default' attribute MUST be accepted in configuration input. If all NETCONF <edit-config> or <copy-config> parameters are valid, then the server will treat a tagged data node (i.e., the 'default' attribute set to 'true' or '1') as a request to return that node to default data. If this request is valid within the context of the requested NETCONF operation, then the data node is removed and returned to its default value. The data node within the NETCONF message MUST contain a value in this case, which MUST be equal to the schema default value. If not, the server MUST return an <rpc-error> response with an 'invalid-value' error-tag.

如果服务器在其:with defaults功能中支持“report all taged”检索模式,则必须在配置输入中接受“default”属性。如果所有NETCONF<edit config>或<copy config>参数都有效,则服务器将把标记的数据节点(即设置为“true”或“1”的“default”属性)视为将该节点返回到默认数据的请求。如果此请求在请求的NETCONF操作的上下文中有效,则数据节点将被删除并返回其默认值。在这种情况下,NETCONF消息中的数据节点必须包含一个值,该值必须等于模式默认值。否则,服务器必须返回带有“无效值”错误标记的<rpc error>响应。

3. Retrieval of Default Data
3. 默认数据的检索

This document defines a new parameter, called <with-defaults>, which can be added to specific NETCONF operation request messages to control how retrieval of default data is treated by the server.

本文档定义了一个名为<with defaults>的新参数,可以将该参数添加到特定的NETCONF操作请求消息中,以控制服务器如何处理默认数据的检索。

A server that implements this specification MUST accept the <with-defaults> parameter containing the enumeration for any of the default-handling modes it supports. The <with-defaults> parameter contains one of the four enumerations defined in this section.

实现此规范的服务器必须接受<with defaults>参数,该参数包含它支持的任何默认处理模式的枚举。<with defaults>参数包含本节中定义的四个枚举之一。

3.1. 'report-all' Retrieval Mode
3.1. “全部报告”检索模式

When data is retrieved with a <with-defaults> parameter equal to 'report-all', all data nodes MUST be reported, including any data nodes considered to be default data by the server.

当使用等于“全部报告”的<with defaults>参数检索数据时,必须报告所有数据节点,包括服务器认为是默认数据的任何数据节点。

3.2. 'trim' Retrieval Mode
3.2. “修剪”检索模式

When data is retrieved with a <with-defaults> parameter equal to 'trim', data nodes MUST NOT be reported if they contain the schema default value. Non-configuration data nodes containing the schema default value MUST NOT be reported.

当使用等于“trim”的<with defaults>参数检索数据时,如果数据节点包含架构默认值,则不得报告它们。不得报告包含架构默认值的非配置数据节点。

3.3. 'explicit' Retrieval Mode
3.3. “显式”检索模式

When data is retrieved with a <with-defaults> parameter equal to 'explicit', a data node that was set by a client to its schema default value MUST be reported. A conceptual data node that would be set by the server to the schema default value MUST NOT be reported. Non-configuration data nodes containing the schema default value MUST be reported.

当使用等于“explicit”的<with defaults>参数检索数据时,必须报告由客户端设置为其架构默认值的数据节点。不得报告将由服务器设置为架构默认值的概念数据节点。必须报告包含架构默认值的非配置数据节点。

3.4. 'report-all-tagged' Retrieval Mode
3.4. “报告所有标记的”检索模式

In addition to the basic modes, a special variant of the 'report-all' basic mode is available called 'report-all-tagged'. This mode MUST be supported on a server if the 'also-supported' parameter in the :with-defaults capability contains the 'report-all-tagged' option. Refer to Section 4 for encoding details for this capability.

除了基本模式外,还有一种特殊的“全部报告”基本模式变体,称为“全部报告标记”。如果:with defaults功能中的“还受支持”参数包含“报告所有标记”选项,则服务器上必须支持此模式。有关此功能的编码详细信息,请参阅第4节。

In this mode the server returns all data nodes, just like the 'report-all' mode, except a data node that is considered by the server to contain default data will include an XML attribute to indicate this condition. This is useful for an application to determine which nodes are considered to contain default data by the server, within a single retrieval operation.

在此模式下,服务器返回所有数据节点,就像“全部报告”模式一样,但服务器认为包含默认数据的数据节点将包含一个XML属性以指示此情况。这对于应用程序在单个检索操作中确定服务器认为哪些节点包含默认数据非常有用。

A server that supports 'report-all-tagged' MUST also accept the 'default' XML attribute within configuration input to the <edit-config> or <copy-config> operations. Refer to Section 6 for XML encoding details of the 'default' XML attribute.

支持“report all taged”的服务器还必须接受<edit config>或<copy config>操作的配置输入中的“default”XML属性。有关“默认”XML属性的XML编码详细信息,请参阅第6节。

4. With-defaults Capability
4. 具有默认功能
4.1. Overview
4.1. 概述

The :with-defaults capability indicates which default-handling basic mode is supported by the server. It may also indicate support for additional defaults retrieval modes. These retrieval modes allow a NETCONF client to control whether default data is returned by the server. The capability affects both configuration and state data (while acknowledging that the usage of default values for state data is less prevalent). Sending of default data is controlled for each individual operation separately.

:with defaults功能指示服务器支持哪种默认处理基本模式。它还可能表示支持其他默认检索模式。这些检索模式允许NETCONF客户端控制服务器是否返回默认数据。该功能同时影响配置和状态数据(同时承认状态数据默认值的使用不太普遍)。对于每个单独的操作,分别控制默认数据的发送。

A NETCONF server implementing the :with-defaults capability:

一个NETCONF服务器,实现:具有默认功能:

o MUST indicate its basic mode behavior by including the 'basic-mode' parameter in the capability URI, as defined in Section 4.3.

o 必须通过在功能URI中包含“基本模式”参数来指示其基本模式行为,如第4.3节所定义。

o MUST support the YANG module defined in Section 5 for the default-handling mode indicated by the 'basic-mode' parameter.

o 必须支持第5节中为“基本模式”参数指示的默认处理模式定义的YANG模块。

o SHOULD support the YANG module in Section 5 for the default-handling mode identified by the 'report-all' or 'report-all-tagged' enumeration value.

o 应支持第5节中的YANG模块,用于“全部报告”或“全部报告标记”枚举值标识的默认处理模式。

o If the 'report-all-tagged' default-handling mode is supported, then the 'default' attribute MUST be supported.

o 如果支持“报告所有标记的”默认处理模式,则必须支持“默认”属性。

o MAY support the YANG module in Section 5 for additional default-handling modes.

o 可支持第5节中的YANG模块,以获得额外的默认处理模式。

4.2. Dependencies
4.2. 依赖关系

None.

没有一个

4.3. Capability Identifier
4.3. 能力标识符
   urn:ietf:params:netconf:capability:with-defaults:1.0
        
   urn:ietf:params:netconf:capability:with-defaults:1.0
        

The identifier MUST have a parameter: "basic-mode". This indicates how the server will treat default data, as defined in Section 2. The allowed values of this parameter are 'report-all', 'trim', and 'explicit', as defined in Section 2.

标识符必须有一个参数:“基本模式”。这表明服务器将如何处理第2节中定义的默认数据。此参数的允许值为第2节中定义的“全部报告”、“修剪”和“显式”。

The identifier MAY have another parameter: "also-supported". This parameter indicates which additional enumeration values (besides the basic-mode enumeration) the server will accept for the <with-defaults> parameter in Section 5. The value of the parameter is a comma-separated list of one or more modes that are supported besides the mode indicated in the 'basic-mode' parameter. Possible modes are 'report-all', 'report-all-tagged', 'trim', and 'explicit', as defined in Section 3.

标识符可能有另一个参数:“也支持”。此参数指示服务器将为第5节中的<with defaults>参数接受哪些附加枚举值(基本模式枚举除外)。该参数的值是一个逗号分隔的列表,其中包含除“基本模式”参数中指示的模式外所支持的一个或多个模式。可能的模式有“全部报告”、“全部报告标记”、“修剪”和“显式”,如第3节所定义。

Note that this protocol capability URI is separate from the YANG module capability URI for the YANG module in Section 5. A server that implements this module MUST also advertise a YANG module capability URI according to the rules specified in [RFC6020].

请注意,此协议功能URI与第5节中YANG模块的YANG模块功能URI是分开的。实现此模块的服务器还必须根据[RFC6020]中指定的规则公布模块功能URI。

Examples:

示例:

   urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
   mode=explicit
        
   urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
   mode=explicit
        
   urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
   mode=explicit&also-supported=report-all,report-all-tagged
        
   urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
   mode=explicit&also-supported=report-all,report-all-tagged
        
4.4. New Operations
4.4. 新业务

None.

没有一个

4.5. Modifications to Existing Operations
4.5. 对现有业务的修改
4.5.1. <get>, <get-config>, and <copy-config> Operations
4.5.1. <get>、<get config>和<copy config>操作

A new <with-defaults> XML element is added to the input for the <get>, <get-config>, and <copy-config> operations. If the <with-defaults> element is present, it controls the reporting of default data. The server MUST return default data in the NETCONF <rpc-reply> messages according to the value of this element, if the server supports the specified retrieval mode.

一个新的<with defaults>XML元素被添加到<get>、<get config>和<copy config>操作的输入中。如果存在<with defaults>元素,则它控制默认数据的报告。如果服务器支持指定的检索模式,则服务器必须根据此元素的值在NETCONF<rpc reply>消息中返回默认数据。

This parameter only controls these specified retrieval operations, and does not impact any other operations or the non-volatile storage of configuration data.

此参数仅控制这些指定的检索操作,不影响任何其他操作或配置数据的非易失性存储。

The <with-defaults> element is defined in the XML namespace for the ietf-netconf-with-defaults.yang module in Section 5, not the XML namespace for the <get>, <get-config>, and <copy-config> operations.

第5节中的ietf-netconf-with-defaults.yang模块的XML名称空间中定义了<with defaults>元素,而不是<get>、<get config>和<copy config>操作的XML名称空间。

Allowed values of the with-defaults element are taken from the 'with-defaults-type' typedef in Section 5. The allowed values for a particular server are restricted to the values that the server

with defaults元素的允许值取自第5节中的“with defaults type”typedef。特定服务器的允许值仅限于服务器所允许的值

indicates it supports within the :with-defaults capability, in the 'basic-mode' and 'also-supported' parameters.

表示它在“基本模式”和“还支持”参数中支持:with defaults功能。

If an unsupported value is used, the NETCONF server MUST return an <rpc-error> response with an 'invalid-value' error-tag.

如果使用了不支持的值,NETCONF服务器必须返回带有“无效值”错误标记的<rpc error>响应。

If the <with-defaults> element is not present, the server MUST follow its basic mode behavior as indicated by the :with-defaults capability identifier's 'basic-mode' parameter, defined in Section 4.3.

如果<with defaults>元素不存在,服务器必须遵循第4.3节中定义的:with defaults功能标识符的“基本模式”参数所指示的基本模式行为。

The <get> and <get-config> operations support a separate filtering mechanism, using the <filter> parameter. The defaults filtering is conceptually done before the <filter> parameter is processed. For example, if the <with-defaults> parameter is equal to 'report-all', then the <filter> parameter is conceptually applied to all data nodes and all default data.

<get>和<get config>操作使用<filter>参数支持单独的过滤机制。默认过滤在概念上是在处理<filter>参数之前完成的。例如,如果<with defaults>参数等于'report all',则<filter>参数在概念上应用于所有数据节点和所有默认数据。

The <copy-config> operation is only affected by the <with-defaults> parameter if the target of the operation is specified with the <url> parameter. If the target is a NETCONF configuration datastore (i.e., running, candidate, or startup), the <with-defaults> parameter has no effect. The server MUST use its basic mode when copying data to a NETCONF configuration datastore. If the <with-defaults> parameter is present in this case, it MUST be silently ignored by the server.

如果操作的目标是用<url>参数指定的,<copy config>操作仅受<with defaults>参数的影响。如果目标是NETCONF配置数据存储(即运行、候选或启动),则<with defaults>参数无效。将数据复制到NETCONF配置数据存储时,服务器必须使用其基本模式。如果在本例中存在<with defaults>参数,则服务器必须以静默方式忽略该参数。

If the server supports the 'report-all-tagged' mode, then the 'default' attribute defined in Section 6 also impacts the <copy-config> operation. If the 'default' attribute is present and set to 'true' or '1', then the server MUST treat the new data node as a request to return that node to its default value (i.e., remove it from the configuration datastore). The data node within the NETCONF message MUST contain a value in this case, which MUST be equal to the schema default value. If not, the server MUST return an <rpc-error> response with an 'invalid-value' error-tag.

如果服务器支持“报告所有标记”模式,则第6节中定义的“默认”属性也会影响<copy config>操作。如果存在“default”属性并将其设置为“true”或“1”,则服务器必须将新数据节点视为将该节点返回其默认值的请求(即,将其从配置数据存储中删除)。在这种情况下,NETCONF消息中的数据节点必须包含一个值,该值必须等于模式默认值。否则,服务器必须返回带有“无效值”错误标记的<rpc error>响应。

4.5.2. <edit-config> Operation
4.5.2. <edit config>操作

The <edit-config> operation has several editing modes. The 'create' and 'delete' editing operations are affected by the default-handling basic mode. The other enumeration values for the NETCONF operation attribute are not affected.

<edit config>操作有几种编辑模式。“创建”和“删除”编辑操作受默认处理基本模式的影响。NETCONF操作属性的其他枚举值不受影响。

If the operation attribute contains the value 'create', and the data node already exists in the target configuration datastore, then the server MUST return an <rpc-error> response with an 'invalid-value' error-tag.

如果操作属性包含值“create”,并且目标配置数据存储中已存在数据节点,则服务器必须返回带有“invalid value”错误标记的<rpc error>响应。

If the client sets a data node to its schema default value, the server MUST accept the request if it is valid. The server MUST keep or discard the new value based on its default-handling basic mode. For the 'trim' basic mode, all schema default values are discarded; otherwise, a client-provided schema default value is saved in a NETCONF configuration datastore.

如果客户端将数据节点设置为其模式默认值,则服务器必须接受有效的请求。服务器必须根据其默认处理基本模式保留或放弃新值。对于“trim”基本模式,将放弃所有模式默认值;否则,客户端提供的模式默认值将保存在NETCONF配置数据存储中。

If the server supports the 'report-all-tagged' mode, then the 'default' attribute defined in Section 6 also impacts the <edit-config> operation. If the 'default' attribute is present and set to 'true' or '1', then the server MUST treat the new data node as a request to return that node to its default value (i.e., remove it from the configuration datastore). The data node within the NETCONF message MUST contain a value in this case, which MUST be equal to the schema default value. If not, the server MUST return an <rpc-error> response with an 'invalid-value' error-tag.

如果服务器支持“报告所有标记”模式,则第6节中定义的“默认”属性也会影响<edit config>操作。如果存在“default”属性并将其设置为“true”或“1”,则服务器必须将新数据节点视为将该节点返回其默认值的请求(即,将其从配置数据存储中删除)。在这种情况下,NETCONF消息中的数据节点必须包含一个值,该值必须等于模式默认值。否则,服务器必须返回带有“无效值”错误标记的<rpc error>响应。

If the 'default' attribute is present, then the effective operation for the target data node MUST be 'create', 'merge', or 'replace'. If not, then the server MUST return an <rpc-error> response with an 'invalid-value' error-tag. For example, if 'create' is the effective operation, then the create request must be valid on its own (e.g., current data node MUST NOT exist). The procedure for determining the effective operation is defined in [RFC6241]. It is derived from the 'default-operation' parameter and/or any operation attributes that are present in the data node or any of its ancestor nodes, within the <edit-config> request.

如果存在“default”属性,则目标数据节点的有效操作必须是“create”、“merge”或“replace”。如果不是,则服务器必须返回带有“无效值”错误标记的<rpc error>响应。例如,如果“创建”是有效操作,则创建请求本身必须有效(例如,当前数据节点不得存在)。[RFC6241]中定义了确定有效操作的程序。它派生自<edit config>请求中数据节点或其任何祖先节点中存在的“默认操作”参数和/或任何操作属性。

4.5.3. Other Operations
4.5.3. 其他业务

Other operations that return configuration data SHOULD also handle default data according to the rules set in this document, and explicitly state this in their documentation. If this is not specified in the document defining the respective operation, the default-handling rules described herein do not affect these operations.

返回配置数据的其他操作也应根据本文档中设置的规则处理默认数据,并在文档中明确说明这一点。如果在定义相应操作的文档中未指定,则本文描述的默认处理规则不会影响这些操作。

4.6. Interactions with Other Capabilities
4.6. 与其他功能的交互

None.

没有一个

5. YANG Module for the <with-defaults> Parameter
5. <with defaults>参数的杨模块

The following YANG module defines the addition of the with-defaults element to the <get>, <get-config>, and <copy-config> operations. The YANG language is defined in [RFC6020]. The above operations are defined in YANG in [RFC6241]. Every NETCONF server that supports the :with-defaults capability MUST implement this YANG module.

下面的模块定义了将with defaults元素添加到<get>、<get config>和<copy config>操作中。杨语在[RFC6020]中有定义。上述操作在[RFC6241]中定义。每个支持:with defaults功能的NETCONF服务器都必须实现此模块。

  <CODE BEGINS> file="ietf-netconf-with-defaults@2011-06-01.yang"
        
  <CODE BEGINS> file="ietf-netconf-with-defaults@2011-06-01.yang"
        

module ietf-netconf-with-defaults {

带有默认值的ietf netconf模块{

     namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
        
     namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
        

prefix ncwd;

前缀ncwd;

     import ietf-netconf { prefix nc; }
        
     import ietf-netconf { prefix nc; }
        

organization "IETF NETCONF (Network Configuration Protocol) Working Group";

组织“IETF网络配置协议工作组”;

     contact
      "WG Web:   <http://tools.ietf.org/wg/netconf/>
        
     contact
      "WG Web:   <http://tools.ietf.org/wg/netconf/>
        
       WG List:  <netconf@ietf.org>
        
       WG List:  <netconf@ietf.org>
        
       WG Chair: Bert Wijnen
                 <bertietf@bwijnen.net>
        
       WG Chair: Bert Wijnen
                 <bertietf@bwijnen.net>
        
       WG Chair: Mehmet Ersue
                 <mehmet.ersue@nsn.com>
        
       WG Chair: Mehmet Ersue
                 <mehmet.ersue@nsn.com>
        
       Editor: Andy Bierman
               <andy.bierman@brocade.com>
        
       Editor: Andy Bierman
               <andy.bierman@brocade.com>
        
       Editor: Balazs Lengyel
               <balazs.lengyel@ericsson.com>";
        
       Editor: Balazs Lengyel
               <balazs.lengyel@ericsson.com>";
        

description "This module defines an extension to the NETCONF protocol that allows the NETCONF client to control how default values are handled by the server in particular NETCONF operations.

description“此模块定义NETCONF协议的扩展,允许NETCONF客户端控制服务器在特定NETCONF操作中如何处理默认值。

Copyright (c) 2011 IETF Trust and the persons identified as the document authors. 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 6243; see the RFC itself for full legal notices.";

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

     revision 2011-06-01 {
       description
         "Initial version.";
       reference
        "RFC 6243: With-defaults Capability for NETCONF";
     }
        
     revision 2011-06-01 {
       description
         "Initial version.";
       reference
        "RFC 6243: With-defaults Capability for NETCONF";
     }
        
     typedef with-defaults-mode {
        description
          "Possible modes to report default data.";
        reference
           "RFC 6243; Section 3.";
        type enumeration {
           enum report-all {
               description
                 "All default data is reported.";
               reference
                 "RFC 6243; Section 3.1";
           }
           enum report-all-tagged {
               description
                 "All default data is reported.
                  Any nodes considered to be default data
                  will contain a 'default' XML attribute,
                  set to 'true' or '1'.";
               reference
                 "RFC 6243; Section 3.4";
           }
           enum trim {
               description
                 "Values are not reported if they contain the default.";
               reference
                 "RFC 6243; Section 3.2";
           }
           enum explicit {
               description
                 "Report values that contain the definition of
                  explicitly set data.";
               reference
                 "RFC 6243; Section 3.3";
           }
       }
     }
        
     typedef with-defaults-mode {
        description
          "Possible modes to report default data.";
        reference
           "RFC 6243; Section 3.";
        type enumeration {
           enum report-all {
               description
                 "All default data is reported.";
               reference
                 "RFC 6243; Section 3.1";
           }
           enum report-all-tagged {
               description
                 "All default data is reported.
                  Any nodes considered to be default data
                  will contain a 'default' XML attribute,
                  set to 'true' or '1'.";
               reference
                 "RFC 6243; Section 3.4";
           }
           enum trim {
               description
                 "Values are not reported if they contain the default.";
               reference
                 "RFC 6243; Section 3.2";
           }
           enum explicit {
               description
                 "Report values that contain the definition of
                  explicitly set data.";
               reference
                 "RFC 6243; Section 3.3";
           }
       }
     }
        
     grouping with-defaults-parameters {
       description
         "Contains the <with-defaults> parameter for control
          of defaults in NETCONF retrieval operations.";
        
     grouping with-defaults-parameters {
       description
         "Contains the <with-defaults> parameter for control
          of defaults in NETCONF retrieval operations.";
        
       leaf with-defaults {
         description
           "The explicit defaults processing mode requested.";
         reference
           "RFC 6243; Section 4.5.1";
        
       leaf with-defaults {
         description
           "The explicit defaults processing mode requested.";
         reference
           "RFC 6243; Section 4.5.1";
        
         type with-defaults-mode;
       }
     }
        
         type with-defaults-mode;
       }
     }
        
     // extending the get-config operation
     augment /nc:get-config/nc:input {
         description
           "Adds the <with-defaults> parameter to the
            input of the NETCONF <get-config> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
     // extending the get-config operation
     augment /nc:get-config/nc:input {
         description
           "Adds the <with-defaults> parameter to the
            input of the NETCONF <get-config> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
         uses with-defaults-parameters;
     }
        
         uses with-defaults-parameters;
     }
        
     // extending the get operation
     augment /nc:get/nc:input {
         description
           "Adds the <with-defaults> parameter to
            the input of the NETCONF <get> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
     // extending the get operation
     augment /nc:get/nc:input {
         description
           "Adds the <with-defaults> parameter to
            the input of the NETCONF <get> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
         uses with-defaults-parameters;
     }
        
         uses with-defaults-parameters;
     }
        
     // extending the copy-config operation
     augment /nc:copy-config/nc:input {
         description
           "Adds the <with-defaults> parameter to
            the input of the NETCONF <copy-config> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
     // extending the copy-config operation
     augment /nc:copy-config/nc:input {
         description
           "Adds the <with-defaults> parameter to
            the input of the NETCONF <copy-config> operation.";
         reference
           "RFC 6243; Section 4.5.1";
        
         uses with-defaults-parameters;
     }
        
         uses with-defaults-parameters;
     }
        

}

}

<CODE ENDS>

<代码结束>

6. XSD for the 'default' Attribute
6. “default”属性的XSD

The following XML Schema document [W3C.REC-xml-20081126] defines the 'default' attribute, described within this document. This XSD is only relevant if the server supports the 'report-all-tagged' defaults retrieval mode.

以下XML模式文档[W3C.REC-XML-20081126]定义了本文档中描述的“default”属性。只有当服务器支持“报告所有标记的”默认检索模式时,此XSD才相关。

The 'default' attribute uses the XSD data type 'boolean'. In accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the allowable lexical representations for the xs:boolean datatype are the strings "0" and "false" for the concept of false and the strings "1" and "true" for the concept of true. Implementations MUST support both styles of lexical representation.

“default”属性使用XSD数据类型“boolean”。根据XML模式第2部分:数据类型的第3.2.2.1节,xs:boolean数据类型允许的词汇表示为字符串“0”和“false”,表示false,表示true。实现必须支持两种类型的词汇表示。

<CODE BEGINS> file="defaults.xsd"
        
<CODE BEGINS> file="defaults.xsd"
        
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="urn:ietf:params:xml:ns:netconf:default:1.0"
           targetNamespace="urn:ietf:params:xml:ns:netconf:default:1.0"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           xml:lang="en">
        
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="urn:ietf:params:xml:ns:netconf:default:1.0"
           targetNamespace="urn:ietf:params:xml:ns:netconf:default:1.0"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           xml:lang="en">
        
  <xs:annotation>
    <xs:documentation>
      This schema defines the syntax for the 'default' attribute
      described within this document.
    </xs:documentation>
  </xs:annotation>
        
  <xs:annotation>
    <xs:documentation>
      This schema defines the syntax for the 'default' attribute
      described within this document.
    </xs:documentation>
  </xs:annotation>
        
  <!--
    default attribute
    -->
  <xs:attribute name="default" type="xs:boolean" default="false">
    <xs:annotation>
      <xs:documentation>
        This attribute indicates whether the data node represented
        by the XML element containing this attribute is considered
        by the server to be default data.  If set to 'true' or '1', then
        the data node is default data.  If 'false' or '0', then the
        data node is not default data.
      </xs:documentation>
    </xs:annotation>
  </xs:attribute>
        
  <!--
    default attribute
    -->
  <xs:attribute name="default" type="xs:boolean" default="false">
    <xs:annotation>
      <xs:documentation>
        This attribute indicates whether the data node represented
        by the XML element containing this attribute is considered
        by the server to be default data.  If set to 'true' or '1', then
        the data node is default data.  If 'false' or '0', then the
        data node is not default data.
      </xs:documentation>
    </xs:annotation>
  </xs:attribute>
        
</xs:schema>
        
</xs:schema>
        

<CODE ENDS>

<代码结束>

7. IANA Considerations
7. IANA考虑

This document registers the following capability identifier URN in the 'Network Configuration Protocol (NETCONF) Capability URNs' registry:

本文档在“网络配置协议(NETCONF)功能URN”注册表中注册以下功能标识符URN:

      urn:ietf:params:netconf:capability:with-defaults:1.0
        
      urn:ietf:params:netconf:capability:with-defaults:1.0
        

This document registers two XML namespace URNs in the 'IETF XML registry', following the format defined in [RFC3688].

本文档按照[RFC3688]中定义的格式,在“IETF XML注册表”中注册了两个XML名称空间URN。

      URI: urn:ietf:params:xml:ns:netconf:default:1.0
        
      URI: urn:ietf:params:xml:ns:netconf:default:1.0
        
      URI: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults
        
      URI: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults
        

Registrant Contact: The NETCONF WG of the IETF.

注册人联系人:IETF的NETCONF工作组。

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

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

name: ietf-netconf-with-defaults

名称:ietf netconf(默认值)

prefix: ncwd

前缀:ncwd

      namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults
        
      namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults
        

RFC: 6243

传真:6243

8. Security Considerations
8. 安全考虑

This document defines an extension to existing NETCONF protocol operations. It does not introduce any new or increased security risks into the management system.

本文档定义了对现有NETCONF协议操作的扩展。它不会给管理系统带来任何新的或增加的安全风险。

The 'with-defaults' capability gives clients control over the retrieval of default data from a NETCONF datastore. The security consideration of [RFC6241] applies to this document as well.

“具有默认值”功能使客户端能够控制从NETCONF数据存储中检索默认数据。[RFC6241]的安全考虑也适用于本文件。

9. Acknowledgements
9. 致谢

Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen Schoenwaelder, Kent Watsen, Washam Fan, and many other members of the NETCONF WG for providing important input to this document.

感谢Martin Bjorklund、Sharon Chisholm、Phil Shafer、Juergen Schoenwaeld、Kent Watsen、Washam Fan和NETCONF工作组的许多其他成员为本文件提供了重要的投入。

10. Normative References
10. 规范性引用文件

[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月。

[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011.

[RFC6241]Enns,R.,Ed.,Bjorklund,M.,Ed.,Schoenwaeld,J.,Ed.,和A.Bierman,Ed.“网络配置协议(NETCONF)”,RFC 62412011年6月。

[W3C.REC-xml-20081126] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation REC-xml-20081126, November 2008, <http://www.w3.org/TR/2008/REC-xml-20081126>.

[W3C.REC-xml-20081126]Bray,T.,Paoli,J.,Sperberg McQueen,C.,Maler,E.,和F.Yergeau,“可扩展标记语言(xml)1.0(第五版)”,万维网联盟建议REC-xml-20081126,2008年11月<http://www.w3.org/TR/2008/REC-xml-20081126>.

[W3C.REC-xmlschema-0-20041028] Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer Second Edition", World Wide Web Consortium Recommendation REC-xmlschema-0-20041028, October 2004, <http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.

[W3C.REC-xmlschema-0-20041028]Fallside,D.和P.Walmsley,“XML模式第0部分:入门第二版”,万维网联盟建议REC-xmlschema-0-20041028,2004年10月<http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.

Appendix A. Usage Examples
附录A.使用示例
A.1. Example YANG Module
A.1. 杨模块示例

The following YANG module defines an example interfaces table to demonstrate how the <with-defaults> parameter behaves for a specific data model.

以下模块定义了一个示例接口表,以演示<with defaults>参数在特定数据模型中的行为。

Note that this is not a real module, and implementation of this module is not required for conformance to the :with-defaults capability, defined in Section 4. This module is not to be registered with IANA, and is not considered to be a code component. It is intentionally very terse, and includes few descriptive statements.

请注意,这不是一个真正的模块,为了符合第4节中定义的:with defaults功能,不需要实现该模块。此模块不向IANA注册,也不被视为代码组件。它有意地非常简洁,并且包含很少的描述性陈述。

module example {

模块示例{

     namespace "http://example.com/ns/interfaces";
        
     namespace "http://example.com/ns/interfaces";
        

prefix exam;

前缀检查;

     typedef status-type {
        description "Interface status";
        type enumeration {
          enum ok;
          enum 'waking up';
          enum 'not feeling so good';
          enum 'better check it out';
          enum 'better call for help';
        }
        default ok;
     }
        
     typedef status-type {
        description "Interface status";
        type enumeration {
          enum ok;
          enum 'waking up';
          enum 'not feeling so good';
          enum 'better check it out';
          enum 'better call for help';
        }
        default ok;
     }
        
     container interfaces {
         description "Example interfaces group";
        
     container interfaces {
         description "Example interfaces group";
        
         list interface {
           description "Example interface entry";
           key name;
        
         list interface {
           description "Example interface entry";
           key name;
        
           leaf name {
             description
               "The administrative name of the interface.
                This is an identifier that is only unique
                within the scope of this list, and only
                within a specific server.";
             type string {
        
           leaf name {
             description
               "The administrative name of the interface.
                This is an identifier that is only unique
                within the scope of this list, and only
                within a specific server.";
             type string {
        
               length "1 .. max";
             }
           }
        
               length "1 .. max";
             }
           }
        
           leaf mtu {
             description
               "The maximum transmission unit (MTU) value assigned to
                this interface.";
             type uint32;
             default 1500;
           }
        
           leaf mtu {
             description
               "The maximum transmission unit (MTU) value assigned to
                this interface.";
             type uint32;
             default 1500;
           }
        
           leaf status {
             description
               "The current status of this interface.";
             type status-type;
             config false;
           }
         }
       }
     }
        
           leaf status {
             description
               "The current status of this interface.";
             type status-type;
             config false;
           }
         }
       }
     }
        
A.2. Example Data Set
A.2. 示例数据集

The following data element shows the conceptual contents of the example server for the protocol operation examples in the next section. This includes all the configuration data nodes, non-configuration data nodes, and default leafs.

下面的数据元素显示了下一节中协议操作示例的示例服务器的概念性内容。这包括所有配置数据节点、非配置数据节点和默认叶。

       <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <interfaces xmlns="http://example.com/ns/interfaces">
           <interface>
             <name>eth0</name>
             <mtu>8192</mtu>
             <status>up</status>
           </interface>
           <interface>
             <name>eth1</name>
             <mtu>1500</mtu>
             <status>up</status>
           </interface>
           <interface>
             <name>eth2</name>
             <mtu>9000</mtu>
             <status>not feeling so good</status>
           </interface>
           <interface>
             <name>eth3</name>
        
       <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <interfaces xmlns="http://example.com/ns/interfaces">
           <interface>
             <name>eth0</name>
             <mtu>8192</mtu>
             <status>up</status>
           </interface>
           <interface>
             <name>eth1</name>
             <mtu>1500</mtu>
             <status>up</status>
           </interface>
           <interface>
             <name>eth2</name>
             <mtu>9000</mtu>
             <status>not feeling so good</status>
           </interface>
           <interface>
             <name>eth3</name>
        
             <mtu>1500</mtu>
             <status>waking up</status>
           </interface>
         </interfaces>
       </data>
        
             <mtu>1500</mtu>
             <status>waking up</status>
           </interface>
         </interfaces>
       </data>
        

In this example, the 'mtu' field for each interface entry is set in the following manner:

在此示例中,每个接口条目的“mtu”字段按以下方式设置:

              +--------------+--------------+--------------+
              | name         | set by       | mtu          |
              +--------------+--------------+--------------+
              | eth0         | client       | 8192         |
              | eth1         | server       | 1500         |
              | eth2         | client       | 9000         |
              | eth3         | client       | 1500         |
              +--------------+--------------+--------------+
        
              +--------------+--------------+--------------+
              | name         | set by       | mtu          |
              +--------------+--------------+--------------+
              | eth0         | client       | 8192         |
              | eth1         | server       | 1500         |
              | eth2         | client       | 9000         |
              | eth3         | client       | 1500         |
              +--------------+--------------+--------------+
        
A.3. Protocol Operation Examples
A.3. 协议操作示例

The following examples show some <get> operations using the 'with-defaults' element. The data model used for these examples is defined in Appendix A.1.

以下示例显示了使用“with defaults”元素的一些<get>操作。附录A.1中定义了用于这些示例的数据模型。

The client is retrieving all the data nodes within the 'interfaces' object, filtered with the <with-defaults> parameter.

客户端正在检索“interfaces”对象中的所有数据节点,并使用<with defaults>参数进行筛选。

A.3.1. <with-defaults> = 'report-all'
A.3.1. <with defaults>=“全部报告”

The behavior of the <with-defaults> parameter handling for the value 'report-all' is demonstrated in this example.

本例演示了值“report all”的<with defaults>参数处理行为。

    <rpc message-id="101"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          report-all
        </with-defaults>
      </get>
    </rpc>
        
    <rpc message-id="101"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          report-all
        </with-defaults>
      </get>
    </rpc>
        
    <rpc-reply message-id="101"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        
    <rpc-reply message-id="101"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <mtu>1500</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu>1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <mtu>1500</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu>1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
A.3.2. <with-defaults> = 'report-all-tagged'
A.3.2. <使用默认值>='报告所有标记的'

The behavior of the <with-defaults> parameter handling for the value 'report-all-tagged' is demonstrated in this example. A 'tagged' data node is an element that contains the 'default' XML attribute, set to 'true' or '1'.

本例演示了值“report all tagged”的<with defaults>参数处理行为。“标记”数据节点是包含“默认”XML属性的元素,设置为“true”或“1”。

The actual data nodes tagged by the server depend on the default-handling basic mode used by the server. Only the data nodes that are considered to be default data will be tagged.

服务器标记的实际数据节点取决于服务器使用的默认处理基本模式。只有被视为默认数据的数据节点才会被标记。

In this example, the server's basic mode is equal to 'trim', so all data nodes that would contain the schema default value are tagged. If the server's basic mode is 'explicit', then only data nodes that are not explicitly set data are tagged. If the server's basic mode is 'report-all', then no data nodes are tagged.

在本例中,服务器的基本模式等于“trim”,因此将标记所有包含模式默认值的数据节点。如果服务器的基本模式为“显式”,则仅标记未显式设置数据的数据节点。如果服务器的基本模式为“全部报告”,则不会标记任何数据节点。

    <rpc message-id="102"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        
    <rpc message-id="102"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          report-all-tagged
        </with-defaults>
      </get>
    </rpc>
        
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          report-all-tagged
        </with-defaults>
      </get>
    </rpc>
        
    <rpc-reply message-id="102"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
               xmlns:wd="urn:ietf:params:xml:ns:netconf:default:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status wd:default="true">up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <mtu wd:default="true">1500</mtu>
            <status wd:default="true">up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu wd:default="true">1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
    <rpc-reply message-id="102"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
               xmlns:wd="urn:ietf:params:xml:ns:netconf:default:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status wd:default="true">up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <mtu wd:default="true">1500</mtu>
            <status wd:default="true">up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu wd:default="true">1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
A.3.3. <with-defaults> = 'trim'
A.3.3. <with defaults>='trim'

The behavior of the <with-defaults> parameter handling for the value 'trim' is demonstrated in this example.

本例演示了值“trim”的<with defaults>参数处理行为。

    <rpc message-id="103"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
        
    <rpc message-id="103"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
        
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          trim
        </with-defaults>
      </get>
    </rpc>
        
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          trim
        </with-defaults>
      </get>
    </rpc>
        
    <rpc-reply message-id="103"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
          </interface>
          <interface>
            <name>eth1</name>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
    <rpc-reply message-id="103"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
          </interface>
          <interface>
            <name>eth1</name>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
A.3.4. <with-defaults> = 'explicit'
A.3.4. <with defaults>='explicit'

The behavior of the <with-defaults> parameter handling for the value 'explicit' is demonstrated in this example.

本例演示了值“explicit”的<with defaults>参数处理行为。

    <rpc message-id="104"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          explicit
        </with-defaults>
      </get>
    </rpc>
        
    <rpc message-id="104"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          explicit
        </with-defaults>
      </get>
    </rpc>
        
    <rpc-reply message-id="104"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <status>up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu>1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        
    <rpc-reply message-id="104"
               xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://example.com/ns/interfaces">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
            <status>up</status>
          </interface>
          <interface>
            <name>eth1</name>
            <status>up</status>
          </interface>
          <interface>
            <name>eth2</name>
            <mtu>9000</mtu>
            <status>not feeling so good</status>
          </interface>
          <interface>
            <name>eth3</name>
            <mtu>1500</mtu>
            <status>waking up</status>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
        

Authors' Addresses

作者地址

Andy Bierman Brocade

安迪·比尔曼·博科

   EMail: andy.bierman@brocade.com
        
   EMail: andy.bierman@brocade.com
        

Balazs Lengyel Ericsson Budapest, Hungary

匈牙利布达佩斯Balazs Lengyel Ericsson

   EMail: balazs.lengyel@ericsson.com
        
   EMail: balazs.lengyel@ericsson.com