draft-ietf-netconf-with-defaults-14.txt   rfc6243.txt 
NETCONF A. Bierman Internet Engineering Task Force (IETF) A. Bierman
Internet-Draft Brocade Request for Comments: 6243 Brocade
Intended status: Standards Track B. Lengyel Category: Standards Track B. Lengyel
Expires: May 15, 2011 Ericsson ISSN: 2070-1721 Ericsson
November 11, 2010 June 2011
With-defaults capability for NETCONF With-defaults Capability for NETCONF
draft-ietf-netconf-with-defaults-14
Abstract Abstract
The NETCONF protocol defines ways to read and edit configuration data The Network Configuration Protocol (NETCONF) defines ways to read and
from a NETCONF server. In some cases, part of this data may not be edit configuration data from a NETCONF server. In some cases, part
set by the NETCONF client, but rather a default value known to the of this data may not be set by the NETCONF client, but rather a
server is used instead. In many situations the NETCONF client has a default value known to the server is used instead. In many
priori knowledge about default data, so the NETCONF server does not situations the NETCONF client has a priori knowledge about default
need to save it in a NETCONF configuration datastore or send it to data, so the NETCONF server does not need to save it in a NETCONF
the client in a retrieval operation reply. In other situations the configuration datastore or send it to the client in a retrieval
NETCONF client will need this data from the server. Not all server operation reply. In other situations the NETCONF client will need
implementations treat this default data the same way. This document this data from the server. Not all server implementations treat this
defines a capability-based extension to the NETCONF protocol that default data the same way. This document defines a capability-based
allows the NETCONF client to identify how defaults are processed by extension to the NETCONF protocol that allows the NETCONF client to
the server, and also defines new mechanisms for client control of identify how defaults are processed by the server, and also defines
server processing of default data. new mechanisms for client control of server processing of default
data.
Status of this Memo
This Internet-Draft is submitted in full conformance with the Status of This Memo
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering This is an Internet Standards Track document.
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on May 15, 2011. 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.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Defaults Handling Behavior . . . . . . . . . . . . . . . . 5 1.2. Default-Handling Behavior . . . . . . . . . . . . . . . . 5
1.3. Client Controlled Retrieval of Default Data . . . . . . . 5 1.3. Client Controlled Retrieval of Default Data . . . . . . . 5
2. Defaults Handling Basic Modes . . . . . . . . . . . . . . . . 6 2. Default-Handling Basic Modes . . . . . . . . . . . . . . . . . 6
2.1. 'report-all' Basic Mode . . . . . . . . . . . . . . . . . 6 2.1. 'report-all' Basic Mode . . . . . . . . . . . . . . . . . 6
2.1.1. 'report-all' Basic Mode Retrieval . . . . . . . . . . 7 2.1.1. 'report-all' Basic Mode Retrieval . . . . . . . . . . 6
2.1.2. 'report-all' <with-defaults> Retrieval . . . . . . . . 7 2.1.2. 'report-all' <with-defaults> Retrieval . . . . . . . . 6
2.1.3. 'report-all' <edit-config> and <copy-config> 2.1.3. 'report-all' <edit-config> and <copy-config>
Behavior . . . . . . . . . . . . . . . . . . . . . . . 7 Behavior . . . . . . . . . . . . . . . . . . . . . . . 6
2.2. 'trim' Basic Mode . . . . . . . . . . . . . . . . . . . . 7 2.2. 'trim' Basic Mode . . . . . . . . . . . . . . . . . . . . 7
2.2.1. 'trim' Basic Mode Retrieval . . . . . . . . . . . . . 7 2.2.1. 'trim' Basic Mode Retrieval . . . . . . . . . . . . . 7
2.2.2. 'trim' <with-defaults> Retrieval . . . . . . . . . . . 7 2.2.2. 'trim' <with-defaults> Retrieval . . . . . . . . . . . 7
2.2.3. 'trim' <edit-config> and <copy-config> Behavior . . . 8 2.2.3. 'trim' <edit-config> and <copy-config> Behavior . . . 7
2.3. 'explicit' Basic Mode . . . . . . . . . . . . . . . . . . 8 2.3. 'explicit' Basic Mode . . . . . . . . . . . . . . . . . . 8
2.3.1. 'explicit' Basic Mode Retrieval . . . . . . . . . . . 8 2.3.1. 'explicit' Basic Mode Retrieval . . . . . . . . . . . 8
2.3.2. 'explicit' <with-defaults> Retrieval . . . . . . . . . 8 2.3.2. 'explicit' <with-defaults> Retrieval . . . . . . . . . 8
2.3.3. 'explicit' <edit-config> and <copy-config> Behavior . 8 2.3.3. 'explicit' <edit-config> and <copy-config> Behavior . 8
3. Retrieval of Default Data . . . . . . . . . . . . . . . . . . 9 3. Retrieval of Default Data . . . . . . . . . . . . . . . . . . 9
3.1. 'report-all' Retrieval Mode . . . . . . . . . . . . . . . 9 3.1. 'report-all' Retrieval Mode . . . . . . . . . . . . . . . 9
3.2. 'trim' Retrieval Mode . . . . . . . . . . . . . . . . . . 9 3.2. 'trim' Retrieval Mode . . . . . . . . . . . . . . . . . . 9
3.3. 'explicit' Retrieval Mode . . . . . . . . . . . . . . . . 9 3.3. 'explicit' Retrieval Mode . . . . . . . . . . . . . . . . 9
3.4. 'report-all-tagged' Retrieval Mode . . . . . . . . . . . . 10 3.4. 'report-all-tagged' Retrieval Mode . . . . . . . . . . . . 9
4. With-defaults Capability . . . . . . . . . . . . . . . . . . . 10 4. With-defaults Capability . . . . . . . . . . . . . . . . . . . 10
4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . . 11 4.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . . 10
4.3. Capability Identifier . . . . . . . . . . . . . . . . . . 11 4.3. Capability Identifier . . . . . . . . . . . . . . . . . . 10
4.4. New Operations . . . . . . . . . . . . . . . . . . . . . . 11 4.4. New Operations . . . . . . . . . . . . . . . . . . . . . . 11
4.5. Modifications to Existing Operations . . . . . . . . . . . 11 4.5. Modifications to Existing Operations . . . . . . . . . . . 11
4.5.1. <get>, <get-config>, and <copy-config> Operations . . 11 4.5.1. <get>, <get-config>, and <copy-config> Operations . . 11
4.5.2. <edit-config> Operation . . . . . . . . . . . . . . . 13 4.5.2. <edit-config> Operation . . . . . . . . . . . . . . . 12
4.5.3. Other Operations . . . . . . . . . . . . . . . . . . . 13 4.5.3. Other Operations . . . . . . . . . . . . . . . . . . . 13
4.6. Interactions with Other Capabilities . . . . . . . . . . . 14 4.6. Interactions with Other Capabilities . . . . . . . . . . . 13
5. YANG Module for the <with-defaults> Parameter . . . . . . . . 14 5. YANG Module for the <with-defaults> Parameter . . . . . . . . 13
6. XSD for the 'default' Attribute . . . . . . . . . . . . . . . 17 6. XSD for the 'default' Attribute . . . . . . . . . . . . . . . 17
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
8. Security Considerations . . . . . . . . . . . . . . . . . . . 19 8. Security Considerations . . . . . . . . . . . . . . . . . . . 18
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19
10. Normative References . . . . . . . . . . . . . . . . . . . . . 20 10. Normative References . . . . . . . . . . . . . . . . . . . . . 19
Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 20 Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 20
A.1. Example YANG Module . . . . . . . . . . . . . . . . . . . 20 A.1. Example YANG Module . . . . . . . . . . . . . . . . . . . 20
A.2. Example Data Set . . . . . . . . . . . . . . . . . . . . . 22 A.2. Example Data Set . . . . . . . . . . . . . . . . . . . . . 21
A.3. Protocol Operation Examples . . . . . . . . . . . . . . . 23 A.3. Protocol Operation Examples . . . . . . . . . . . . . . . 22
A.3.1. <with-defaults> = 'report-all' . . . . . . . . . . . . 23 A.3.1. <with-defaults> = 'report-all' . . . . . . . . . . . . 22
A.3.2. <with-defaults> = 'report-all-tagged' . . . . . . . . 24 A.3.2. <with-defaults> = 'report-all-tagged' . . . . . . . . 23
A.3.3. <with-defaults> = 'trim' . . . . . . . . . . . . . . . 27 A.3.3. <with-defaults> = 'trim' . . . . . . . . . . . . . . . 24
A.3.4. <with-defaults> = 'explicit' . . . . . . . . . . . . . 28 A.3.4. <with-defaults> = 'explicit' . . . . . . . . . . . . . 25
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 29
B.1. 13-14 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.2. 12-13 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.3. 11-12 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.4. 10-11 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.5. 09-10 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.6. 08-09 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.7. 07-08 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.8. 06-07 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.9. 05-06 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.10. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . 31
B.11. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 31
B.12. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 31
B.13. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 32
B.14. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 32
B.15. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction 1. Introduction
The NETCONF protocol [I-D.ietf-netconf-4741bis] defines ways to read The NETCONF protocol [RFC6241] defines ways to read configuration and
configuration and state data from a NETCONF server. Part of the state data from a NETCONF server. Part of the configuration data may
configuration data may not be set by the NETCONF client, but rather not be set by the NETCONF client, but rather by a default value from
by a default value from the data model. In many situations the the data model. In many situations the NETCONF client has a priori
NETCONF client has a priori knowledge about default data, so the knowledge about default data, so the NETCONF server does not need to
NETCONF server does not need to send it to the client. A priori send it to the client. A priori knowledge can be obtained, e.g.,
knowledge can be obtained, e.g., a document formally describing the from a document formally describing the data models supported by the
data models supported by the NETCONF server. NETCONF server.
It can be important for a client to know exactly how a server It can be important for a client to know exactly how a server
implementation will handle default data. There are subtle implementation will handle default data. There are subtle
differences in some protocol operations where the defaults handling differences in some protocol operations where the default-handling
behavior of the server will affect the outcome of the operation. behavior of the server will affect the outcome of the operation.
1.1. Terminology 1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
Data model schema: A document or set of documents describing the Data model schema: A document or set of documents describing the
data models supported by the NETCONF server. data models supported by the NETCONF server.
Management Application: A computer program running outside the
Management application: A computer program running outside the
NETCONF server that configures or supervises the NETCONF server. NETCONF server that configures or supervises the NETCONF server.
A management application can reach the device e.g. via NETCONF, A management application can reach the device, e.g., via NETCONF,
command line interface (CLI) or Simple Network Management Protocol command line interface (CLI), or the Simple Network Management
(SNMP). Protocol (SNMP).
Schema default data: Data specified in the data model schema as Schema default data: Data specified in the data model schema as
default, that is set or used by the device whenever the NETCONF default, that is, set or used by the device whenever the NETCONF
client or other management application/user does not provide a client or other management application/user does not provide a
specific value for the relevant data node. Schema default data specific value for the relevant data node. Schema default data
may or may not be stored as part of a configuration datastore, may or may not be stored as part of a configuration datastore,
depending on the basic mode used by a particular server. depending on the basic mode used by a particular server.
Default data: Conceptual data containing a default value. Default Default data: Conceptual data containing a default value. Default
data is not kept in a datastore. Not all servers use the same 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 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 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 schema default definition is in use by the server instead, then it
is considered to be a default data node. is considered to be a default data node.
Default value: A default value is a value for a data node instance 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 that is conceptually in use by the server, when the data node
instance does not exist. instance does not exist.
Explicitly set data: Data that is set to any value by a NETCONF Explicitly set data: Data that is set to any value by a NETCONF
client or other management application by the way of an explicit client or other management application by the way of an explicit
management operation, including any data model schema default management operation, including any data model schema default
value. Any value set by the NETCONF server which is not the value. Any value set by the NETCONF server that is not the schema
schema defined default value is also considered explicitly set defined default value is also considered explicitly set data.
data.
<with-defaults> retrieval: Refers to a protocol operation which <with-defaults> retrieval: Refers to a protocol operation that
includes the <with-default> parameter to control the handling of includes the <with-default> parameter to control the handling of
default data. default data.
:with-defaults: The shorthand notation for the with-defaults :with-defaults: The shorthand notation for the with-defaults
capability identifier. capability identifier.
The following terms are defined in [I-D.ietf-netconf-4741bis]: The following terms are defined in [RFC6241]:
o client o client
o datastore o datastore
o operation o operation
o server o server
The following term is defined in [RFC6020]: The following term is defined in [RFC6020]:
o data node o data node
1.2. Defaults Handling Behavior 1.2. Default-Handling Behavior
The defaults handling behavior used by a server will impact NETCONF The default-handling behavior used by a server will impact NETCONF
protocol operations in two ways: protocol operations in two ways:
1. Data retrieval: A server is normally allowed to exclude data 1. Data retrieval: A server is normally allowed to exclude data
nodes which it considers to contain the default value. The nodes that it considers to contain the default value. The actual
actual nodes omitted depends on the defaults handling behavior nodes omitted depend on the default-handling behavior used by the
used by the server. server.
2. Create and delete operations: The <edit-config> 'operation' 2. Create and delete operations: The <edit-config> 'operation'
attribute can be used to create and/or delete specific data attribute can be used to create and/or delete specific data
nodes. These operations depend on whether the target node nodes. These operations depend on whether or not the target node
currently exists or not. The server's defaults handling behavior currently exists. The server's default-handling behavior will
will determine whether the requested node currently exists in the determine whether or not the requested node currently exists in
configuration datastore or not. the configuration datastore.
1.3. Client Controlled Retrieval of Default Data 1.3. Client Controlled Retrieval of Default Data
A networking device may have a large number of default values. Often A networking device may have a large number of default values. Often
the default values are specifically defined with a reasonable value, the default values are specifically defined with a reasonable value,
documented and well-known, so that the management user does not need documented and well-known, so that the management user does not need
to handle them. For these reasons it is quite common for networking to handle them. For these reasons, it is quite common for networking
devices to suppress the output of parameters having the default devices to suppress the output of parameters having the default
value. value.
However, there are use-cases when a NETCONF client will need the However, there are use-cases when a NETCONF client will need the
default data from the server: default data from the server:
o The management application often needs a single, definitive and o The management application often needs a single, definitive, and
complete set of configuration values that determine how the complete set of configuration values that determine how the
networking device works. networking device works.
o Documentation about default values can be unreliable or o Documentation about default values can be unreliable or
unavailable. unavailable.
o Some management applications might not have the capabilities to o Some management applications might not have the capabilities to
correctly parse and interpret formal data models. correctly parse and interpret formal data models.
o Human users might want to understand the received data without o Human users might want to understand the received data without
consultation of the documentation. consultation of the documentation.
In all these cases, the NETCONF client will need a mechanism to In all these cases, the NETCONF client will need a mechanism to
retrieve default data from a NETCONF server. retrieve default data from a NETCONF server.
This document defines a NETCONF protocol capability to identify the This document defines a NETCONF protocol capability to identify the
server defaults handling behavior, an XML attribute to identify server's default-handling behavior, an XML
default data, and a YANG module extension to the NETCONF protocol [W3C.REC-xmlschema-0-20041028] attribute to identify default data,
that allows the NETCONF client to control whether default data is and a YANG module extension to the NETCONF protocol that allows the
returned by the server. NETCONF client to control whether default data is returned by the
server.
2. Defaults Handling Basic Modes 2. Default-Handling Basic Modes
Not all server implementations treat default data in the same way. Not all server implementations treat default data in the same way.
Instead of forcing a single implementation strategy, this document Instead of forcing a single implementation strategy, this document
allows a server to advertise a particular style of defaults handling, allows a server to advertise a particular style of default-handling,
and the client can adjust accordingly. 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 NETCONF servers report default data in different ways. This document
specifies three standard defaults handling basic modes that a server specifies three standard default-handling basic modes that a server
implementor may choose from: implementer may choose from:
o report-all o report-all
o trim o trim
o explicit o explicit
A server MUST select one of the three basic modes defined in this A server MUST select one of the three basic modes defined in this
section for handling default data. section for handling default data.
2.1. 'report-all' Basic Mode 2.1. 'report-all' Basic Mode
A server which uses the 'report-all' basic mode does not consider any A server that uses the 'report-all' basic mode does not consider any
data node to be default data, even schema default data. data node to be default data, even schema default data.
2.1.1. 'report-all' Basic Mode Retrieval 2.1.1. 'report-all' Basic Mode Retrieval
When data is retrieved from a server using the 'report-all' basic When data is retrieved from a server using the 'report-all' basic
mode, and the <with-defaults> parameter is not present, all data mode, and the <with-defaults> parameter is not present, all data
nodes MUST be reported. nodes MUST be reported.
2.1.2. 'report-all' <with-defaults> Retrieval 2.1.2. 'report-all' <with-defaults> Retrieval
skipping to change at page 7, line 27 skipping to change at page 7, line 9
2.1.3. 'report-all' <edit-config> and <copy-config> Behavior 2.1.3. 'report-all' <edit-config> and <copy-config> Behavior
The server MUST consider every data node to exist, even those The server MUST consider every data node to exist, even those
containing a schema default value. A valid 'create' operation containing a schema default value. A valid 'create' operation
attribute for a data node that contains its schema default value MUST attribute for a data node that contains its schema default value MUST
fail with a 'data-exists' error-tag. A valid 'delete' operation fail with a 'data-exists' error-tag. A valid 'delete' operation
attribute for a data node that contains its schema default value MUST attribute for a data node that contains its schema default value MUST
succeed, even though the data node is immediately replaced by the succeed, even though the data node is immediately replaced by the
server with the default value. server with the default value.
A server which uses the 'report-all' basic-mode has no concept of a A server that uses the 'report-all' basic mode has no concept of a
default node, so the 'report-all-tagged' <with-defaults> retrieval default node, so the 'report-all-tagged' <with-defaults> retrieval
mode is not relevant. There will never be any tagged nodes, since mode is not relevant. There will never be any tagged nodes, since
there are no nodes which are omitted in a basic-mode retrieval there are no nodes that are omitted in a basic-mode retrieval
operation. If the 'default' attribute is present in any operation. If the 'default' attribute is present in any
configuration data, the server MUST return an <rpc-error> response configuration data, the server MUST return an <rpc-error> response
with an 'unknown-attribute' error-tag. with an 'unknown-attribute' error-tag.
2.2. 'trim' Basic Mode 2.2. 'trim' Basic Mode
A server which uses the 'trim' basic mode MUST consider any data node A server that uses the 'trim' basic mode MUST consider any data node
set to its schema default value to be default data. set to its schema default value to be default data.
2.2.1. 'trim' Basic Mode Retrieval 2.2.1. 'trim' Basic Mode Retrieval
When data is retrieved from a server using the 'trim' basic mode, and 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 the <with-defaults> parameter is not present, data nodes MUST NOT be
reported if they contain the schema default value. Non-configuration reported if they contain the schema default value. Non-configuration
data nodes containing the schema default value MUST NOT be reported. data nodes containing the schema default value MUST NOT be reported.
2.2.2. 'trim' <with-defaults> Retrieval 2.2.2. 'trim' <with-defaults> Retrieval
skipping to change at page 8, line 11 skipping to change at page 7, line 41
If the 'trim' basic mode is used by the server, then the server MUST 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', support the <with-defaults> parameter with a value equal to 'trim',
as specified in Section 3.2. as specified in Section 3.2.
2.2.3. 'trim' <edit-config> and <copy-config> Behavior 2.2.3. 'trim' <edit-config> and <copy-config> Behavior
The server MUST consider any data node that does not contain its The server MUST consider any data node that does not contain its
schema default value to exist. A valid 'create' operation attribute schema default value to exist. A valid 'create' operation attribute
for a data node that has a schema default value defined MUST succeed. 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 valid 'delete' operation attribute for a missing data node that has
a schema default value MUST fail. The server MUST return an <rpc- a schema default value MUST fail. The server MUST return an
error> response with a 'data-missing' error-tag. <rpc-error> response with a 'data-missing' error-tag.
If a client sets a data node to its schema default value, using any 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 valid operation, it MUST succeed, although the data node MUST NOT be
saved in the NETCONF configuration datastore. This has the same saved in the NETCONF configuration datastore. This has the same
effect as removing the data node and treating it as default data. effect as removing the data node and treating it as default data.
If the server supports the 'report-all-tagged' value for the <with- If the server supports the 'report-all-tagged' value for the
defaults> parameter, then the 'default' attribute MUST be accepted in <with-defaults> parameter, then the 'default' attribute MUST be
configuration input, as described in Section 4.5.1 and Section 4.5.2. accepted in configuration input, as described in Section 4.5.1 and
Section 4.5.2.
2.3. 'explicit' Basic Mode 2.3. 'explicit' Basic Mode
A server which uses the 'explicit' basic mode MUST consider any data A server that uses the 'explicit' basic mode MUST consider any data
node that is not explicitly set data to be default data. node that is not explicitly set data to be default data.
2.3.1. 'explicit' Basic Mode Retrieval 2.3.1. 'explicit' Basic Mode Retrieval
When data is retrieved from a server using the 'explicit' basic mode, When data is retrieved from a server using the 'explicit' basic mode,
and the <with-defaults> parameter is not present, data nodes MUST be and the <with-defaults> parameter is not present, data nodes MUST be
reported if explicitly set by the client, even if they contain the reported if explicitly set by the client, even if they contain the
schema default value. Non-configuration data nodes containing the schema default value. Non-configuration data nodes containing the
schema default value MUST be reported. schema default value MUST be reported.
skipping to change at page 9, line 16 skipping to change at page 8, line 49
If the server supports the 'report-all-tagged' retrieval mode in its If the server supports the 'report-all-tagged' retrieval mode in its
:with-defaults capability, then the 'default' attribute MUST be :with-defaults capability, then the 'default' attribute MUST be
accepted in configuration input. If all NETCONF <edit-config> or accepted in configuration input. If all NETCONF <edit-config> or
<copy-config> parameters are valid, then the server will treat a <copy-config> parameters are valid, then the server will treat a
tagged data node (i.e., the 'default' attribute set to 'true' or '1') 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 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 valid within the context of the requested NETCONF operation, then the
data node is removed and returned to its default value. The data data node is removed and returned to its default value. The data
node within the NETCONF message MUST contain a value in this case, 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 which MUST be equal to the schema default value. If not, the server
MUST return an <rpc-error> response with a 'invalid-value' error-tag. MUST return an <rpc-error> response with an 'invalid-value' error-
tag.
3. Retrieval of Default Data 3. Retrieval of Default Data
This document defines a new parameter, called <with-defaults>, which This document defines a new parameter, called <with-defaults>, which
can be added to specific NETCONF operation request messages to can be added to specific NETCONF operation request messages to
control how retrieval of default data is treated by the server. control how retrieval of default data is treated by the server.
A server which implements this specification MUST accept the <with- A server that implements this specification MUST accept the
defaults> parameter containing the enumeration for any of the <with-defaults> parameter containing the enumeration for any of the
defaults handling modes it supports. The <with-defaults> parameter default-handling modes it supports. The <with-defaults> parameter
contains one of the four enumerations defined in this section. contains one of the four enumerations defined in this section.
3.1. 'report-all' Retrieval Mode 3.1. 'report-all' Retrieval Mode
When data is retrieved with a <with-defaults> parameter equal to When data is retrieved with a <with-defaults> parameter equal to
'report-all', all data nodes MUST be reported, including any data 'report-all', all data nodes MUST be reported, including any data
nodes considered to be default data by the server. nodes considered to be default data by the server.
3.2. 'trim' Retrieval Mode 3.2. 'trim' Retrieval Mode
When data is retrieved with a <with-defaults> parameter equal to When data is retrieved with a <with-defaults> parameter equal to
'trim', data nodes MUST NOT be reported if they contain the schema 'trim', data nodes MUST NOT be reported if they contain the schema
default value. Non-configuration data nodes containing the schema default value. Non-configuration data nodes containing the schema
default value MUST NOT be reported. default value MUST NOT be reported.
3.3. 'explicit' Retrieval Mode 3.3. 'explicit' Retrieval Mode
When data is retrieved with a <with-defaults> parameter equal to When data is retrieved with a <with-defaults> parameter equal to
'explicit', a data node which was set by a client to its schema 'explicit', a data node that was set by a client to its schema
default value MUST be reported. A conceptual data node which would default value MUST be reported. A conceptual data node that would be
be set by the server to the schema default value MUST NOT be set by the server to the schema default value MUST NOT be reported.
reported. Non-configuration data nodes containing the schema default Non-configuration data nodes containing the schema default value MUST
value MUST be reported. be reported.
3.4. 'report-all-tagged' Retrieval Mode 3.4. 'report-all-tagged' Retrieval Mode
In addition to the basic modes, a special variant of the 'report-all' In addition to the basic modes, a special variant of the 'report-all'
basic mode is available called 'report-all-tagged'. This mode MUST basic mode is available called 'report-all-tagged'. This mode MUST
be supported on a server if the 'also-supported' parameter in the be supported on a server if the 'also-supported' parameter in the
:with-defaults capability contains the 'report-all-tagged' option. :with-defaults capability contains the 'report-all-tagged' option.
Refer to Section 4 for encoding details for this capability. Refer to Section 4 for encoding details for this capability.
In this mode the server returns all data nodes, just like the In this mode the server returns all data nodes, just like the
'report-all' mode, except a data node that is considered by the 'report-all' mode, except a data node that is considered by the
server to contain default data will include an XML attribute to server to contain default data will include an XML attribute to
indicate this condition. This is useful for an application to indicate this condition. This is useful for an application to
determine which nodes are considered to contain default data by the determine which nodes are considered to contain default data by the
server, within a single retrieval operation. server, within a single retrieval operation.
A server which supports 'report-all-tagged' MUST also accept the A server that supports 'report-all-tagged' MUST also accept the
'default' XML attribute within configuration input to the <edit- 'default' XML attribute within configuration input to the
config> or <copy-config> operations. Refer to Section 6 for XML <edit-config> or <copy-config> operations. Refer to Section 6 for
encoding details of the 'default' XML attribute. XML encoding details of the 'default' XML attribute.
4. With-defaults Capability 4. With-defaults Capability
4.1. Overview 4.1. Overview
The :with-defaults capability indicates which defaults handling basic The :with-defaults capability indicates which default-handling basic
mode is supported by the server. It may also indicate support for mode is supported by the server. It may also indicate support for
additional defaults retrieval modes. These retrieval modes allow a additional defaults retrieval modes. These retrieval modes allow a
NETCONF client to control whether default data is returned by the NETCONF client to control whether default data is returned by the
server. The capability affects both configuration and state data server. The capability affects both configuration and state data
(while acknowledging that the usage of default values for state data (while acknowledging that the usage of default values for state data
is less prevalent). Sending of default data is controlled for each is less prevalent). Sending of default data is controlled for each
individual operation separately. individual operation separately.
A NETCONF server implementing the :with-defaults capability: A NETCONF server implementing the :with-defaults capability:
o MUST indicate its basic mode behavior by including the 'basic- o MUST indicate its basic mode behavior by including the 'basic-
mode' parameter in the capability URI, as defined in Section 4.3. mode' parameter in the capability URI, as defined in Section 4.3.
o MUST support the YANG module defined in Section 5 for the defaults
o MUST support the YANG module defined in Section 5 for the default-
handling mode indicated by the 'basic-mode' parameter. handling mode indicated by the 'basic-mode' parameter.
o SHOULD support the YANG module in Section 5 for the defaults
o SHOULD support the YANG module in Section 5 for the default-
handling mode identified by the 'report-all' or 'report-all- handling mode identified by the 'report-all' or 'report-all-
tagged' enumeration value. tagged' enumeration value.
o If the 'report-all-tagged' defaults handling mode is supported,
o If the 'report-all-tagged' default-handling mode is supported,
then the 'default' attribute MUST be supported. then the 'default' attribute MUST be supported.
o MAY support the YANG module in Section 5 for additional defaults
o MAY support the YANG module in Section 5 for additional default-
handling modes. handling modes.
4.2. Dependencies 4.2. Dependencies
None None.
4.3. Capability Identifier 4.3. Capability Identifier
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 The identifier MUST have a parameter: "basic-mode". This indicates
how the server will treat default data, as defined in Section 2. The how the server will treat default data, as defined in Section 2. The
allowed values of this parameter are 'report-all', 'trim', and allowed values of this parameter are 'report-all', 'trim', and
'explicit', as defined in Section 2. 'explicit', as defined in Section 2.
The identifier MAY have another parameter: "also-supported". This The identifier MAY have another parameter: "also-supported". This
parameter indicates which additional enumeration values (besides the parameter indicates which additional enumeration values (besides the
basic-mode enumeration), the server will accept for the <with- basic-mode enumeration) the server will accept for the
defaults> parameter in Section 5. The value of the parameter is a <with-defaults> parameter in Section 5. The value of the parameter
comma separated list of one or more modes that are supported beside is a comma-separated list of one or more modes that are supported
the mode indicated in the 'basic-mode' parameter. Possible modes are besides the mode indicated in the 'basic-mode' parameter. Possible
'report-all', 'report-all-tagged', 'trim', and 'explicit', as defined modes are 'report-all', 'report-all-tagged', 'trim', and 'explicit',
in Section 3. as defined in Section 3.
Note that this protocol capability URI is separate from the YANG Note that this protocol capability URI is separate from the YANG
module capability URI for the YANG module in Section 5. A server module capability URI for the YANG module in Section 5. A server
which implements this module MUST also advertise a YANG module that implements this module MUST also advertise a YANG module
capability URI according to the rules specified in [RFC6020]. capability URI according to the rules specified in [RFC6020].
Examples: Examples:
urn:ietf:params:netconf:capability:with-defaults:1.0?basic- urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
mode=explicit mode=explicit
urn:ietf:params:netconf:capability:with-defaults:1.0?basic- urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
mode=explicit&also-supported=report-all,report-all-tagged mode=explicit&also-supported=report-all,report-all-tagged
4.4. New Operations 4.4. New Operations
None None.
4.5. Modifications to Existing Operations 4.5. Modifications to Existing Operations
4.5.1. <get>, <get-config>, and <copy-config> Operations 4.5.1. <get>, <get-config>, and <copy-config> Operations
A new <with-defaults> XML element is added to the input for the A new <with-defaults> XML element is added to the input for the
<get>, <get-config> and <copy-config> operations. If the <with- <get>, <get-config>, and <copy-config> operations. If the
defaults> element is present, it controls the reporting of default <with-defaults> element is present, it controls the reporting of
data. The server MUST return default data in the NETCONF <rpc-reply> default data. The server MUST return default data in the NETCONF
messages according to the value of this element, if the server <rpc-reply> messages according to the value of this element, if the
supports the specified retrieval mode. server supports the specified retrieval mode.
This parameter only controls these specified retrieval operations, This parameter only controls these specified retrieval operations,
and does not impact any other operations or the non-volatile storage and does not impact any other operations or the non-volatile storage
of configuration data. of configuration data.
The <with-defaults> element is defined in the XML namespace for the The <with-defaults> element is defined in the XML namespace for the
ietf-netconf-with-defaults.yang module in Section 5, not the XML ietf-netconf-with-defaults.yang module in Section 5, not the XML
namespace for the <get>, <get-config> and <copy-config> operations. namespace for the <get>, <get-config>, and <copy-config> operations.
Allowed values of the with-defaults element are taken from the 'with- Allowed values of the with-defaults element are taken from the 'with-
defaults-type' typedef in Section 5. The allowed values for a defaults-type' typedef in Section 5. The allowed values for a
particular server are restricted to the values that the server particular server are restricted to the values that the server
indicates it supports within the :with-defaults capability, in the indicates it supports within the :with-defaults capability, in the
'basic-mode' and 'also-supported' parameters. 'basic-mode' and 'also-supported' parameters.
If an unsupported value is used, the NETCONF server MUST return an If an unsupported value is used, the NETCONF server MUST return an
<rpc-error> response with an 'invalid-value' error-tag. <rpc-error> response with an 'invalid-value' error-tag.
skipping to change at page 12, line 37 skipping to change at page 12, line 24
The <get> and <get-config> operations support a separate filtering The <get> and <get-config> operations support a separate filtering
mechanism, using the <filter> parameter. The defaults filtering is mechanism, using the <filter> parameter. The defaults filtering is
conceptually done before the <filter> parameter is processed. For conceptually done before the <filter> parameter is processed. For
example, if the <with-defaults> parameter is equal to 'report-all', example, if the <with-defaults> parameter is equal to 'report-all',
then the <filter> parameter is conceptually applied to all data nodes then the <filter> parameter is conceptually applied to all data nodes
and all default data. and all default data.
The <copy-config> operation is only affected by the <with-defaults> 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 of the operation is specified with the <url>
parameter. If the target is a NETCONF configuration datastore (i.e., parameter. If the target is a NETCONF configuration datastore (i.e.,
running, candidate or startup), the <with-defaults> parameter has no running, candidate, or startup), the <with-defaults> parameter has no
effect. The server MUST use its basic mode when copying data to a effect. The server MUST use its basic mode when copying data to a
NETCONF configuration datastore. If the <with-defaults> parameter is NETCONF configuration datastore. If the <with-defaults> parameter is
present in this case, it MUST be silently ignored by the server. present in this case, it MUST be silently ignored by the server.
If the server supports the 'report-all-tagged' mode, then the If the server supports the 'report-all-tagged' mode, then the
'default' attribute defined in Section 6 also impacts the <copy- 'default' attribute defined in Section 6 also impacts the
config> operation. If the 'default' attribute is present and set to <copy-config> operation. If the 'default' attribute is present and
'true' or '1', then the server MUST treat the new data node as a set to 'true' or '1', then the server MUST treat the new data node as
request to return that node to its default value (i.e., remove it a request to return that node to its default value (i.e., remove it
from the configuration datastore). The data node within the NETCONF from the configuration datastore). The data node within the NETCONF
message MUST contain a value in this case, which MUST be equal to the 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> schema default value. If not, the server MUST return an <rpc-error>
response with a 'invalid-value' error-tag. response with an 'invalid-value' error-tag.
4.5.2. <edit-config> Operation 4.5.2. <edit-config> Operation
The <edit-config> operation has several editing modes. The 'create' The <edit-config> operation has several editing modes. The 'create'
and 'delete' editing operations are affected by the defaults handling and 'delete' editing operations are affected by the default-handling
basic mode. The other enumeration values for the NETCONF operation basic mode. The other enumeration values for the NETCONF operation
attribute are not affected. attribute are not affected.
If the operation attribute contains the value 'create', and the data If the operation attribute contains the value 'create', and the data
node already exists in the target configuration datastore, then the node already exists in the target configuration datastore, then the
server MUST return an <rpc-error> response with a 'invalid-value' server MUST return an <rpc-error> response with an 'invalid-value'
error-tag. error-tag.
If the client sets a data node to its schema default value, the 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 server MUST accept the request if it is valid. The server MUST keep
or discard the new value based on its defaults handling basic mode. or discard the new value based on its default-handling basic mode.
For the 'trim' basic mode, all schema default values are discarded, For the 'trim' basic mode, all schema default values are discarded;
otherwise a client-provided schema default value is saved in a otherwise, a client-provided schema default value is saved in a
NETCONF configuration datastore. NETCONF configuration datastore.
If the server supports the 'report-all-tagged' mode, then the If the server supports the 'report-all-tagged' mode, then the
'default' attribute defined in Section 6 also impacts the <edit- 'default' attribute defined in Section 6 also impacts the
config> operation. If the 'default' attribute is present and set to <edit-config> operation. If the 'default' attribute is present and
'true' or '1', then the server MUST treat the new data node as a set to 'true' or '1', then the server MUST treat the new data node as
request to return that node to its default value (i.e., remove it a request to return that node to its default value (i.e., remove it
from the configuration datastore). The data node within the NETCONF from the configuration datastore). The data node within the NETCONF
message MUST contain a value in this case, which MUST be equal to the 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> schema default value. If not, the server MUST return an <rpc-error>
response with a 'invalid-value' error-tag. response with an 'invalid-value' error-tag.
If the 'default' attribute is present, then the effective operation If the 'default' attribute is present, then the effective operation
for the target data node MUST be 'create', 'merge' or 'replace'. If for the target data node MUST be 'create', 'merge', or 'replace'. If
not, then the server MUST return an <rpc-error> response with an not, then the server MUST return an <rpc-error> response with an
'invalid-value' error-tag. For example, if 'create' is the effective 'invalid-value' error-tag. For example, if 'create' is the effective
operation, then the create request must be valid on its own (e.g., operation, then the create request must be valid on its own (e.g.,
current data node MUST NOT exist). The procedure for determining the current data node MUST NOT exist). The procedure for determining the
effective operation is defined in [I-D.ietf-netconf-4741bis]. It is effective operation is defined in [RFC6241]. It is derived from the
derived from the 'default-operation' parameter and/or any operation 'default-operation' parameter and/or any operation attributes that
attributes that are present in the data node or any of its ancestor are present in the data node or any of its ancestor nodes, within the
nodes, within the <edit-config> request. <edit-config> request.
4.5.3. Other Operations 4.5.3. Other Operations
Other operations that return configuration data SHOULD also handle Other operations that return configuration data SHOULD also handle
default data according to the rules set in this document, and default data according to the rules set in this document, and
explicitly state this in their documentation. If this is not explicitly state this in their documentation. If this is not
specified in the document defining the respective operation, the specified in the document defining the respective operation, the
default handling rules described herein do not affect these default-handling rules described herein do not affect these
operations. operations.
4.6. Interactions with Other Capabilities 4.6. Interactions with Other Capabilities
None None.
5. YANG Module for the <with-defaults> Parameter 5. YANG Module for the <with-defaults> Parameter
The following YANG module defines the addition of the with-defaults The following YANG module defines the addition of the with-defaults
element to the <get>, <get-config>, and <copy-config> operations. element to the <get>, <get-config>, and <copy-config> operations.
The YANG language is defined in [RFC6020]. The above operations are The YANG language is defined in [RFC6020]. The above operations are
defined in YANG in [I-D.ietf-netconf-4741bis]. Every NETCONF server defined in YANG in [RFC6241]. Every NETCONF server that supports the
which supports the :with-defaults capability MUST implement this YANG :with-defaults capability MUST implement this YANG module.
module.
<CODE BEGINS> file="ietf-netconf-with-defaults@2010-11-11.yang"
module ietf-netconf-with-defaults { <CODE BEGINS> file="ietf-netconf-with-defaults@2011-06-01.yang"
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"; module ietf-netconf-with-defaults {
prefix ncwd; namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
import ietf-netconf { prefix nc; } prefix ncwd;
organization import ietf-netconf { prefix nc; }
"IETF NETCONF (Network Configuration Protocol) Working Group";
contact organization
"WG Web: <http://tools.ietf.org/wg/netconf/> "IETF NETCONF (Network Configuration Protocol) Working Group";
WG List: <mailto:netconf@ietf.org>
WG Chair: Bert Wijnen contact
<mailto:bertietf@bwijnen.net> "WG Web: <http://tools.ietf.org/wg/netconf/>
WG Chair: Mehmet Ersue WG List: <netconf@ietf.org>
<mailto:mehmet.ersue@nsn.com>
Editor: Andy Bierman WG Chair: Bert Wijnen
<mailto:andy.bierman@brocade.com> <bertietf@bwijnen.net>
Editor: Balazs Lengyel WG Chair: Mehmet Ersue
<mailto:balazs.lengyel@ericsson.com>"; <mehmet.ersue@nsn.com>
description Editor: Andy Bierman
"This module defines an extension to the NETCONF protocol <andy.bierman@brocade.com>
that allows the NETCONF client to control how default
values are handled by the server in particular NETCONF operations.
Copyright (c) 2010 IETF Trust and the persons identified as Editor: Balazs Lengyel
the document authors. All rights reserved. <balazs.lengyel@ericsson.com>";
Redistribution and use in source and binary forms, with or description
without modification, is permitted pursuant to, and subject "This module defines an extension to the NETCONF protocol
to the license terms contained in, the Simplified BSD License that allows the NETCONF client to control how default
set forth in Section 4.c of the IETF Trust's Legal Provisions values are handled by the server in particular NETCONF
Relating to IETF Documents operations.
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see Copyright (c) 2011 IETF Trust and the persons identified as
the RFC itself for full legal notices."; the document authors. All rights reserved.
// RFC Ed.: replace XXXX with actual RFC number and remove this note
// RFC Ed.: remove this note Redistribution and use in source and binary forms, with or
// Note: extracted from draft-ietf-netmod-with-defaults-14.txt 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).
revision 2010-11-11 { This version of this YANG module is part of RFC 6243; see
description the RFC itself for full legal notices.";
"Initial version.";
reference
"RFC XXXX: With-defaults capability for NETCONF";
}
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
typedef with-defaults-mode { revision 2011-06-01 {
description description
"Possible modes to report default data."; "Initial version.";
reference reference
"RFC XXXX; section 3."; "RFC 6243: With-defaults Capability for NETCONF";
// RFC Ed.: replace XXXX with actual }
// RFC number and remove this note
type enumeration {
enum report-all {
description
"All default data is reported.";
reference
"RFC XXXX; section 3.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
}
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 XXXX; section 3.4";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
}
enum trim {
description
"Values are not reported if they contain the default.";
reference
"RFC XXXX; section 3.2";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
}
enum explicit {
description
"Report values that contain the definition of
explicitly set data.";
reference
"RFC XXXX; section 3.3";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
}
}
}
grouping with-defaults-parameters {
description
"Contains the <with-defaults> parameter for control
of defaults in NETCONF retrieval operations.";
leaf with-defaults { typedef with-defaults-mode {
description description
"The explicit defaults processing mode requested."; "Possible modes to report default data.";
reference reference
"RFC XXXX; section 4.6.1"; "RFC 6243; Section 3.";
// RFC Ed.: replace XXXX with actual type enumeration {
// RFC number and remove this note 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";
}
}
}
type with-defaults-mode; grouping with-defaults-parameters {
} description
} "Contains the <with-defaults> parameter for control
of defaults in NETCONF retrieval operations.";
// extending the get-config operation leaf with-defaults {
augment /nc:get-config/nc:input { description
description "The explicit defaults processing mode requested.";
"Adds the <with-defaults> parameter to the reference
input of the NETCONF <get-config> operation."; "RFC 6243; Section 4.5.1";
reference
"RFC XXXX; section 4.6.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
uses with-defaults-parameters; type with-defaults-mode;
} }
}
// extending the get operation // extending the get-config operation
augment /nc:get/nc:input { augment /nc:get-config/nc:input {
description description
"Adds the <with-defaults> parameter to "Adds the <with-defaults> parameter to the
the input of the NETCONF <get> operation."; input of the NETCONF <get-config> operation.";
reference reference
"RFC XXXX; section 4.6.1"; "RFC 6243; Section 4.5.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
uses with-defaults-parameters; uses with-defaults-parameters;
} }
// extending the copy-config operation // extending the get operation
augment /nc:copy-config/nc:input { augment /nc:get/nc:input {
description description
"Adds the <with-defaults> parameter to "Adds the <with-defaults> parameter to
the input of the NETCONF <copy-config> operation."; the input of the NETCONF <get> operation.";
reference reference
"RFC XXXX; section 4.6.1"; "RFC 6243; Section 4.5.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
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";
<CODE ENDS> uses with-defaults-parameters;
}
}
<CODE ENDS>
6. XSD for the 'default' Attribute 6. XSD for the 'default' Attribute
The following XML Schema document [W3C.REC-xml-20081126] defines the The following XML Schema document [W3C.REC-xml-20081126] defines the
'default' attribute, described within this document. This XSD is 'default' attribute, described within this document. This XSD is
only relevant if the server supports the 'report-all-tagged' defaults only relevant if the server supports the 'report-all-tagged' defaults
retrieval mode. retrieval mode.
The 'default' attribute uses the XSD data type 'boolean'. In The 'default' attribute uses the XSD data type 'boolean'. In
accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the accordance with Section 3.2.2.1 of XML Schema Part 2: Datatypes, the
allowable lexical representations for the xs:boolean datatype are the allowable lexical representations for the xs:boolean datatype are the
strings "0" and "false" for the concept of false and the strings "1" strings "0" and "false" for the concept of false and the strings "1"
and "true" for the concept of true. Implementations MUST support and "true" for the concept of true. Implementations MUST support
both styles of lexical representation. both styles of lexical representation.
<CODE BEGINS> file="defaults.xsd" <CODE BEGINS> file="defaults.xsd"
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:ietf:params:xml:ns:netconf:default:1.0" xmlns="urn:ietf:params:xml:ns:netconf:default:1.0"
targetNamespace="urn:ietf:params:xml:ns:netconf:default:1.0" targetNamespace="urn:ietf:params:xml:ns:netconf:default:1.0"
elementFormDefault="qualified" elementFormDefault="qualified"
attributeFormDefault="unqualified" attributeFormDefault="unqualified"
xml:lang="en"> xml:lang="en">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This schema defines the syntax for the 'default' attribute This schema defines the syntax for the 'default' attribute
described within this document. described within this document.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<!-- <!--
default attribute default attribute
--> -->
<xs:attribute name="default" type="xs:boolean" default="false"> <xs:attribute name="default" type="xs:boolean" default="false">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This attribute indicates whether the data node represented This attribute indicates whether the data node represented
by the XML element containing this attribute is considered by the XML element containing this attribute is considered
by the server to be default data. If set to 'true' or '1' then 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 the data node is default data. If 'false' or '0', then the
data node is not default data. data node is not default data.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:schema> </xs:schema>
<CODE ENDS> <CODE ENDS>
7. IANA Considerations 7. IANA Considerations
This document registers the following capability identifier URN in This document registers the following capability identifier URN in
the 'Network Configuration Protocol Capability URNs registry': the 'Network Configuration Protocol (NETCONF) Capability URNs'
registry:
urn:ietf:params:netconf:capability:with-defaults:1.0 urn:ietf:params:netconf:capability:with-defaults:1.0
Note that the capability URN is compliant to
[I-D.ietf-netconf-4741bis] section 10.3.
This document registers two XML namespace URNs in the 'IETF XML This document registers two XML namespace URNs in the 'IETF XML
registry', following the format defined in [RFC3688]. registry', following the format defined in [RFC3688].
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. Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URIs are XML namespaces. XML: N/A, the requested URIs are XML namespaces.
This document registers one module name in the 'YANG Module Names' This document registers one module name in the 'YANG Module Names'
registry, defined in [RFC6020] . registry, defined in [RFC6020] .
name: ietf-netconf-with-defaults name: ietf-netconf-with-defaults
skipping to change at page 19, line 29 skipping to change at page 18, line 32
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. Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URIs are XML namespaces. XML: N/A, the requested URIs are XML namespaces.
This document registers one module name in the 'YANG Module Names' This document registers one module name in the 'YANG Module Names'
registry, defined in [RFC6020] . registry, defined in [RFC6020] .
name: ietf-netconf-with-defaults name: ietf-netconf-with-defaults
prefix: ncwd prefix: ncwd
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults
RFC: XXXX // RFC Ed.: replace XXXX and remove this comment
RFC: 6243
8. Security Considerations 8. Security Considerations
This document defines an extension to existing NETCONF protocol This document defines an extension to existing NETCONF protocol
operations. It does not introduce any new or increased security operations. It does not introduce any new or increased security
risks into the management system. risks into the management system.
The 'with-defaults' capability gives clients control over the The 'with-defaults' capability gives clients control over the
retrieval of default data from a NETCONF datastore. The security retrieval of default data from a NETCONF datastore. The security
consideration of [I-D.ietf-netconf-4741bis] apply to this document as consideration of [RFC6241] applies to this document as well.
well.
9. Acknowledgements 9. Acknowledgements
Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen
Schoenwaelder, Kent Watsen, Washam Fan and many other members of the Schoenwaelder, Kent Watsen, Washam Fan, and many other members of the
NETCONF WG for providing important input to this document. NETCONF WG for providing important input to this document.
10. Normative References 10. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004. January 2004.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020, Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010. October 2010.
[I-D.ietf-netconf-4741bis] [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
Enns, R., Bjorklund, M., Schoenwaelder, J., and A. and A. Bierman, Ed., "Network Configuration Protocol
Bierman, "Network Configuration Protocol (NETCONF)", (NETCONF)", RFC 6241, June 2011.
draft-ietf-netconf-4741bis-06 (work in progress),
October 2010.
[W3C.REC-xml-20081126] [W3C.REC-xml-20081126]
Maler, E., Yergeau, F., Sperberg-McQueen, C., Paoli, J., Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and
and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC- Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008, xml-20081126, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>. <http://www.w3.org/TR/2008/REC-xml-20081126>.
[W3C.REC-xmlschema-0-20041028] [W3C.REC-xmlschema-0-20041028]
Walmsley, P. and D. Fallside, "XML Schema Part 0: Primer Fallside, D. and P. Walmsley, "XML Schema Part 0: Primer
Second Edition", World Wide Web Consortium Second Edition", World Wide Web Consortium Recommendation
Recommendation REC-xmlschema-0-20041028, October 2004, REC-xmlschema-0-20041028, October 2004,
<http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>. <http://www.w3.org/TR/2004/REC-xmlschema-0-20041028>.
Appendix A. Usage Examples Appendix A. Usage Examples
A.1. Example YANG Module A.1. Example YANG Module
The following YANG module defines an example interfaces table to The following YANG module defines an example interfaces table to
demonstrate how the <with-defaults> parameter behaves for a specific demonstrate how the <with-defaults> parameter behaves for a specific
data model. data model.
skipping to change at page 21, line 33 skipping to change at page 20, line 48
container interfaces { container interfaces {
description "Example interfaces group"; description "Example interfaces group";
list interface { list interface {
description "Example interface entry"; description "Example interface entry";
key name; key name;
leaf name { leaf name {
description description
"The administrative name of the interface. "The administrative name of the interface.
This is an identifier which is only unique This is an identifier that is only unique
within the scope of this list, and only within the scope of this list, and only
within a specific server."; within a specific server.";
type string { type string {
length "1 .. max"; length "1 .. max";
} }
} }
leaf mtu { leaf mtu {
description description
"The maximum transmission unit (MTU) value assigned to "The maximum transmission unit (MTU) value assigned to
skipping to change at page 23, line 16 skipping to change at page 22, line 24
| name | set by | mtu | | name | set by | mtu |
+--------------+--------------+--------------+ +--------------+--------------+--------------+
| eth0 | client | 8192 | | eth0 | client | 8192 |
| eth1 | server | 1500 | | eth1 | server | 1500 |
| eth2 | client | 9000 | | eth2 | client | 9000 |
| eth3 | client | 1500 | | eth3 | client | 1500 |
+--------------+--------------+--------------+ +--------------+--------------+--------------+
A.3. Protocol Operation Examples A.3. Protocol Operation Examples
The following examples shows some <get> operations using the 'with- The following examples show some <get> operations using the 'with-
defaults' element. The data model used for these examples is defined defaults' element. The data model used for these examples is defined
in Appendix A.1. in Appendix A.1.
The client is retrieving all the data nodes within the 'interfaces' The client is retrieving all the data nodes within the 'interfaces'
object, filtered with the <with-defaults> parameter. object, filtered with the <with-defaults> parameter.
A.3.1. <with-defaults> = 'report-all' A.3.1. <with-defaults> = 'report-all'
The behavior of the <with-defaults> parameter handling for the value The behavior of the <with-defaults> parameter handling for the value
'report-all' is demonstrated in this example. 'report-all' is demonstrated in this example.
skipping to change at page 25, line 6 skipping to change at page 23, line 36
</data> </data>
</rpc-reply> </rpc-reply>
A.3.2. <with-defaults> = 'report-all-tagged' A.3.2. <with-defaults> = 'report-all-tagged'
The behavior of the <with-defaults> parameter handling for the value The behavior of the <with-defaults> parameter handling for the value
'report-all-tagged' is demonstrated in this example. A 'tagged' data 'report-all-tagged' is demonstrated in this example. A 'tagged' data
node is an element that contains the 'default' XML attribute, set to node is an element that contains the 'default' XML attribute, set to
'true' or '1'. 'true' or '1'.
The actual data nodes tagged by the server depends on the defaults 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 handling basic mode used by the server. Only the data nodes that are
considered to be default data will be tagged. considered to be default data will be tagged.
In this example, the server's basic mode is equal to 'trim', so all 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. data nodes that would contain the schema default value are tagged.
If the server's basic mode is 'explicit', then only data nodes that 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 are not explicitly set data are tagged. If the server's basic mode
is 'report-all', then no data nodes are tagged. is 'report-all', then no data nodes are tagged.
<rpc message-id="102" <rpc message-id="102"
skipping to change at page 29, line 5 skipping to change at page 26, line 31
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<status>waking up</status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
</rpc-reply> </rpc-reply>
Appendix B. Change Log
-- RFC Ed.: remove this section before publication.
B.1. 13-14
Removed reference to RFC 4741 and using 4741bis instead.
B.2. 12-13
Removed with-defaults capability conformance section.
Changed 'wd:default' to 'default'.
Added normative reference to XSD.
Clarified conditional support for with-defaults enumerations, based
on capability parameters.
Clarified that all xs:boolean encoding values must be supported.
Clarified purpose of also-supported parameter in capability URI.
B.3. 11-12
Made editorial clarifications based on AD review.
B.4. 10-11
Changed term 'database' to 'configuration datastore' or generic
'datastore'.
B.5. 09-10
Changed term 'datastore' to 'database'.
Added term 'default value'.
Clarified verbage for data node containing a default value.
B.6. 08-09
Removed non-volatile server requirements.
Moved some text from basic-mode section into the the retrieval modes
section.
Added description and reference statements to the YANG module.
Many bugfixes and clarifications, based on WGLC review comments.
B.7. 07-08
Added report-all-tagged mode.
Changed conformance so report-all or report-all-tagged mode SHOULD be
supported.
Clarified capability requirements for each mode, for edit-config and
NV storage requirements.
Changed rpc-error details for unsupported with-defaults value.
Added XSD for wd:default attribute
Expanded example to show report-all-tagged for a basic-mode=trim
server.
B.8. 06-07
Removed text in capability identifier section about adding YANG
module capability URI parameters.
Changed YANG module namespace to match YANG format, and updated
examples to use this new namespace.
Fixed some typos.
B.9. 05-06
Removed ':1.0' from capability URI.
Removed open issues section because all known issues are closed.
Moved examples to a separate appendix, and expanded them.
Added example.yang as an appendix to properly explain the examples
used within the document.
Replaced normative term 'SHALL' with 'MUST' to be consistent within
this document.
Clarified <with-defaults> behavior for non-configuration data nodes.
Clarified various sections based on WGLC comments on mailing list.
Removed some unused terms.
Reversed the order of the change log sections so the most recent
changes are shown first.
B.10. 04-05
Updated I-D and YANG module boiler-plate.
Removed redundant 'with-defaults' YANG feature.
Changed definition of 'explicit' mode to match the YANG definition
Removed XSD because the YANG is normative and the XSD is
unconstrained, and does not properly extend the 3 affected NETCONF
operations.
Made the YANG module a normative section instead of non-normative
appendix.
Changed YANG from an informative to a normative reference,
Changed 4741bis from an informative to a normative reference because
the YANG module imports the ietf-netconf module in order to augment
some operations.
Updated capability requirements to include YANG module capability
parameters.
Added a description statement to the with-defaults leaf definition.
Update open issues section; ready to close all open issues.
B.11. 03-04
Clarifications
Added non-netconf interfaces to the definition of explicitly set
default data
B.12. 02-03
Clarifications
YAM added
Use the same URN for the capability and the XML namespace to
accommodate YANG, and avoid two separate URN/URIs being advertised in
the HELLO message, for such a small function.
B.13. 01-02
report-all made mandatory
Placeholder for YAM added, XSD will be removed when 4741 provides the
NETCONF YAM
with-defaults is valid for state data as well (if state data has a
defined default which might not be so frequent). The definition of
explicit was modified for state data.
B.14. 00-01
Changed value set of with-default capability and element
Added version to URI
B.15. -00
Created from draft-bierman-netconf-with-defaults-01.txt
It was decided by the NETCONF mailing list, that with-defaults should
be a sub-element of each affected operation. While this violates the
XSD of RFC4741 this is acceptable and follows the ideas behind
NETCONF and YANG.
Hopefully it will be clarified in the 4741bis RFC whether such
extensions are allowed.
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
Brocade Brocade
Email: andy.bierman@brocade.com EMail: andy.bierman@brocade.com
Balazs Lengyel Balazs Lengyel
Ericsson Ericsson
Budapest, Budapest,
Hungary Hungary
Email: balazs.lengyel@ericsson.com EMail: balazs.lengyel@ericsson.com
 End of changes. 138 change blocks. 
548 lines changed or deleted 350 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/