draft-ietf-netconf-with-defaults-08.txt   draft-ietf-netconf-with-defaults-09.txt 
NETCONF A. Bierman NETCONF A. Bierman
Internet-Draft InterWorking Labs Internet-Draft InterWorking Labs
Intended status: Standards Track B. Lengyel Intended status: Standards Track B. Lengyel
Expires: November 21, 2010 Ericsson Expires: December 11, 2010 Ericsson
May 20, 2010 June 9, 2010
With-defaults capability for NETCONF With-defaults capability for NETCONF
draft-ietf-netconf-with-defaults-08 draft-ietf-netconf-with-defaults-09
Abstract Abstract
The NETCONF protocol defines ways to read and edit configuration data The NETCONF protocol defines ways to read and edit configuration data
from a NETCONF server. Part of this data may not be set by the from a NETCONF server. In some cases, part of this data may not be
NETCONF client, but rather a default value is used. In many set by the NETCONF client, but rather a default value known to the
situations the NETCONF client has a priori knowledge about default server is used instead. In many situations the NETCONF client has a
data, so the NETCONF server does not need to save it in a NETCONF priori knowledge about default data, so the NETCONF server does not
datastore or send it to the client in a retrieval operation reply. need to save it in a NETCONF datastore or send it to the client in a
In other situations the NETCONF client will need this data as part of retrieval operation reply. In other situations the NETCONF client
the NETCONF <rpc-reply> messages. Not all server implementations will need this data from the server. Not all server implementations
treat this default data the same way. This document defines a treat this default data the same way. This document defines a
capability-based extension to the NETCONF protocol that allows the capability-based extension to the NETCONF protocol that allows the
NETCONF client to identify how defaults are handled by the server, NETCONF client to identify how defaults are processed by the server,
and control whether default values are part of NETCONF <rpc-reply> and also defines new mechanisms for client control of server
messages or <copy-config> output to a file. processing of default data.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 21, 2010. This Internet-Draft will expire on December 11, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 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
skipping to change at page 2, line 24 skipping to change at page 2, line 24
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.2. Defaults Handling Behavior . . . . . . . . . . . . . . . . 5 1.2. Defaults 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. Defaults 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 . . . . . . . . . . 6 2.1.1. 'report-all' Basic Mode Retrieval . . . . . . . . . . 6
2.1.2. 'report-all' <with-defaults> Retrieval . . . . . . . . 6 2.1.2. 'report-all' <with-defaults> Retrieval . . . . . . . . 7
2.1.3. 'report-all' <edit-config> Behavior . . . . . . . . . 6 2.1.3. 'report-all' <edit-config> and <copy-config>
2.1.4. 'report-all' Non-volatile Storage Behavior . . . . . . 7 Behavior . . . . . . . . . . . . . . . . . . . . . . . 7
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> Behavior . . . . . . . . . . . . 7 2.2.3. 'trim' <edit-config> and <copy-config> Behavior . . . 7
2.2.4. 'trim' Non-volatile Storage Behavior . . . . . . . . . 8
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> Behavior . . . . . . . . . . 8 2.3.3. 'explicit' <edit-config> and <copy-config> Behavior . 8
2.3.4. 'explicit' Non-volatile Storage Behavior . . . . . . . 9
3. Retrieval of Default Data . . . . . . . . . . . . . . . . . . 9 3. Retrieval of Default Data . . . . . . . . . . . . . . . . . . 9
3.1. 'report-all-tagged' Retrieval Mode . . . . . . . . . . . . 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. With-defaults Capability . . . . . . . . . . . . . . . . . . . 10
4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . . 10 4.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . . 10
4.3. Conformance . . . . . . . . . . . . . . . . . . . . . . . 10 4.3. Conformance . . . . . . . . . . . . . . . . . . . . . . . 10
4.4. Capability Identifier . . . . . . . . . . . . . . . . . . 10 4.4. Capability Identifier . . . . . . . . . . . . . . . . . . 10
4.5. New Operations . . . . . . . . . . . . . . . . . . . . . . 11 4.5. New Operations . . . . . . . . . . . . . . . . . . . . . . 11
4.6. Modifications to Existing Operations . . . . . . . . . . . 11 4.6. Modifications to Existing Operations . . . . . . . . . . . 11
4.6.1. <get>, <get-config>, and <copy-config> Operations . . 11 4.6.1. <get>, <get-config>, and <copy-config> Operations . . 11
4.6.2. <edit-config> Operation . . . . . . . . . . . . . . . 12 4.6.2. <edit-config> Operation . . . . . . . . . . . . . . . 12
4.6.3. Other Operations . . . . . . . . . . . . . . . . . . . 12 4.6.3. Other Operations . . . . . . . . . . . . . . . . . . . 13
4.7. Interactions with Other Capabilities . . . . . . . . . . . 13 4.7. Interactions with Other Capabilities . . . . . . . . . . . 13
5. YANG Module for the <with-defaults> Parameter . . . . . . . . 13 5. YANG Module for the <with-defaults> Parameter . . . . . . . . 13
6. XSD for the 'wd:default' Attribute . . . . . . . . . . . . . . 15 6. XSD for the 'wd:default' Attribute . . . . . . . . . . . . . . 17
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 8. Security Considerations . . . . . . . . . . . . . . . . . . . 19
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 17 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 19
10. Normative References . . . . . . . . . . . . . . . . . . . . . 17 10. Normative References . . . . . . . . . . . . . . . . . . . . . 19
Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 18 Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 20
A.1. Example YANG Module . . . . . . . . . . . . . . . . . . . 18 A.1. Example YANG Module . . . . . . . . . . . . . . . . . . . 20
A.2. Example Data Set . . . . . . . . . . . . . . . . . . . . . 20 A.2. Example Data Set . . . . . . . . . . . . . . . . . . . . . 21
A.3. Protocol Operation Examples . . . . . . . . . . . . . . . 21 A.3. Protocol Operation Examples . . . . . . . . . . . . . . . 22
A.3.1. <with-defaults> = 'report-all' . . . . . . . . . . . . 21 A.3.1. <with-defaults> = 'report-all' . . . . . . . . . . . . 23
A.3.2. <with-defaults> = 'report-all-tagged' . . . . . . . . 22 A.3.2. <with-defaults> = 'report-all-tagged' . . . . . . . . 24
A.3.3. <with-defaults> = 'trim' . . . . . . . . . . . . . . . 25 A.3.3. <with-defaults> = 'trim' . . . . . . . . . . . . . . . 26
A.3.4. <with-defaults> = 'explicit' . . . . . . . . . . . . . 26 A.3.4. <with-defaults> = 'explicit' . . . . . . . . . . . . . 27
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 27 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 28
B.1. 07-08 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 B.1. 08-09 . . . . . . . . . . . . . . . . . . . . . . . . . . 28
B.2. 06-07 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 B.2. 07-08 . . . . . . . . . . . . . . . . . . . . . . . . . . 28
B.3. 05-06 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 B.3. 06-07 . . . . . . . . . . . . . . . . . . . . . . . . . . 28
B.4. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . 28 B.4. 05-06 . . . . . . . . . . . . . . . . . . . . . . . . . . 28
B.5. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 28 B.5. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . 29
B.6. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 28 B.6. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.7. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 29 B.7. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.8. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 29 B.8. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
B.9. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 B.9. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 29 B.10. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 31
1. Introduction 1. Introduction
The NETCONF protocol [RFC4741] defines ways to read configuration and The NETCONF protocol [RFC4741] defines ways to read configuration and
state data from a NETCONF server. Part of the configuration data may 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 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 the data model. In many situations the NETCONF client has a priori
knowledge about default data, so the NETCONF server does not need to knowledge about default data, so the NETCONF server does not need to
send it to the client. A priori knowledge can be e.g., a document send it to the client. A priori knowledge can be obtained, e.g., a
formally describing the data models supported by the NETCONF server. document formally describing the data models supported by the 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 defaults 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
skipping to change at page 4, line 35 skipping to change at page 4, line 36
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,
CLI or SNMP. CLI or 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 item. 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: Data considered by a particular server to contain a Default data: Conceptual data representing a default value. Default
default value. Default data is not kept in a configuration data is not kept in a configuration datastore. Not all servers
datastore. use the same criteria to decide if a data node is actually
instantiated in a database. If a data node is not present in a
database, and a schema default definition is in use by the server
instead, then it is considered to be a default data node.
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 actual 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 which is not the
schema defined default value is also considered explicitly set schema defined default value is also considered explicitly set
data. data.
<with-defaults> retrieval: Refers to a protocol operation which
includes the <with-default> parameter to control the handling of
default data.
:with-defaults: The shorthand notation for the with-defaults
capability identifier.
The following terms are defined in [RFC4741]: The following terms are defined in [RFC4741]:
o client o client
o datastore o datastore
o operation o operation
o server o server
The following term is defined in [I-D.ietf-netmod-yang]: The following term is defined in [I-D.ietf-netmod-yang]:
o data node o data node
1.2. Defaults Handling Behavior 1.2. Defaults Handling Behavior
The defaults handling behavior used by a server will impact NETCONF The defaults handling behavior used by a server will impact NETCONF
protocol operations in three 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 which it considers to contain the default value. The
actual nodes omitted depends on the defaults handling behavior actual nodes omitted depends on the defaults handling behavior
used by the server. The nodes that are returned in this case are used by the server.
the only nodes the server considers to exist in the datastore.
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 the target node
currently exists or not. The server's defaults handling behavior currently exists or not. The server's defaults handling behavior
will determine whether the requested node currently exists in the will determine whether the requested node currently exists in the
datastore or not. datastore or not.
3. NV Storage: The server's defaults handling behavior will affect
which data nodes are saved in non-volatile storage.
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 not interesting or specifically defined with a the default values are not interesting or specifically defined with a
"reasonable" value, so that the management user does not have to "reasonable" value, so that the management user does not have to
handle them. For these reasons it is quite common for networking 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
skipping to change at page 5, line 46 skipping to change at page 6, line 4
handle them. For these reasons it is quite common for networking 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 a complete set of configuration values that determine how the a
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 default data as part In all these cases, the NETCONF client will need a mechanism to
of the NETCONF <rpc-reply> messages. 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, and a YANG module extension to the server defaults handling behavior, an XML attribute to identify
NETCONF protocol that allows the NETCONF client to control whether default data, and a YANG module extension to the NETCONF protocol
default data is returned in certain NETCONF <rpc-reply> messages. that allows the NETCONF client to control whether default data is
returned by the server.
2. Defaults Handling Basic Modes 2. Defaults 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 defaults handling,
and the client can adjust accordingly. and the client can adjust accordingly.
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 defaults handling basic modes that a server
skipping to change at page 6, line 37 skipping to change at page 6, line 42
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 which uses the 'report-all' basic mode does not consider any
data node to be 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
All data nodes MUST be reported. 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.
2.1.2. 'report-all' <with-defaults> Retrieval 2.1.2. 'report-all' <with-defaults> Retrieval
All data nodes MUST be reported, including any data nodes considered The server MUST support the <with-defaults> parameter with a value
to be default data by the server. equal to 'report-all', as specified in Section 3.1.
2.1.3. 'report-all' <edit-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
represented by a schema default value. represented by a schema default value. A valid 'create' operation
attribute for a data node that contains its schema default value MUST
o A valid 'create' operation for a data node that contains its fail with a 'data-exists' error-tag. A valid 'delete' operation
schema default value MUST fail with a 'data-exists' error-tag. attribute for a data node that contains its schema default value MUST
o A valid 'delete' operation for a data node that contains its succeed, even though the data node is immediately replaced by the
schema default value MUST succeed, even though the data node is server with the default value.
immediately replaced by the server with the default value.
2.1.4. 'report-all' Non-volatile Storage Behavior
All data nodes MUST be saved in non-volatile storage. A server which 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 which are omitted in a basic-mode retrieval
operation. If the wd:default attribute is present in any
configuration data, the server MUST return an <rpc-error> response
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 which 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
Data nodes MUST NOT be reported if they match the schema default When data is retrieved from a server using the 'trim' basic mode, and
value. Non-configuration data nodes containing the schema default the <with-defaults> parameter is not present, data nodes MUST NOT be
value MUST NOT be reported. reported if they match the schema default value. Non-configuration
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
Data nodes MUST NOT be reported if they match the schema default The server MUST support the <with-defaults> parameter with a value
value. Non-configuration data nodes containing the schema default equal to 'trim', as specified in Section 3.1.
value MUST NOT be reported.
2.2.3. 'trim' <edit-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. schema default value to exist. A valid 'create' operation attribute
for a data node that has a schema default value defined MUST succeed.
o A valid 'create' operation for a data node that has a schema A valid 'delete' operation attribute for a missing data node that has
default value defined MUST succeed. a schema default value MUST fail. The server MUST return an <rpc-
o A valid 'delete' operation for a missing data node that has a error> response with a 'data-missing' error-tag.
schema default value MUST fail with a 'data-missing' error-tag.
o 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 datastore. This has the same affect
as removing the data node and treating it as default data.
If the server supports the 'report-all-tagged' retrieval mode in its
with-defaults capability, then the 'wd:default' attribute MUST be
accepted in configuration input. If all NETCONF sub-operation
parameters are valid, then the server will treat a tagged data node
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. If the data
node within the NETCONF message contains a value in this case, it
MUST be equal to the schema default value.
2.2.4. 'trim' Non-volatile Storage Behavior 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 datastore. This has the same effect as removing
the data node and treating it as default data.
All data nodes, except those set to their schema default value, MUST If the server supports the 'report-all-tagged' value for the <with-
be saved in non-volatile storage. defaults> parameter, then the 'wd:default' attribute MUST be accepted
in configuration input, as described in Section 4.6.1 and
Section 4.6.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 which 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
If a client set a data node to its schema default value, it MUST If a client sets a data node to its schema default value, it MUST
always be reported. If the server set a data node to its schema always be reported. If the server sets a data node to its schema
default value, it MUST NOT be reported. Non-configuration data nodes default value, it MUST NOT be reported. Non-configuration data nodes
containing the schema default value MUST be reported. containing the schema default value MUST be reported.
2.3.2. 'explicit' <with-defaults> Retrieval 2.3.2. 'explicit' <with-defaults> Retrieval
If a client set a data node to its schema default value, it MUST be The server MUST support the <with-defaults> parameter with a value
reported. If the server set a data node to its schema default value, equal to 'explicit', as specified in Section 3.3.
it MUST NOT be reported. Non-configuration data nodes containing the
schema default value MUST be reported.
2.3.3. 'explicit' <edit-config> Behavior 2.3.3. 'explicit' <edit-config> and <copy-config> Behavior
The server considers any data node that is explicitly set data to The server considers any data node that is explicitly set data to
exist. 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
o A valid 'create' operation for a data node that has been set by a 'data-exists' error-tag. A valid 'create' operation attribute for a
client to its schema default value MUST fail with a 'data-exists' data node that has been set by the server to its schema default value
error-tag. MUST succeed. A valid 'delete' operation attribute for a data node
o A valid 'create' operation for a data node that has been set by that has been set by a client to its schema default value MUST
the server to its schema default value MUST succeed. succeed. A valid 'delete' operation attribute for a data node that
o A valid 'delete' operation for a data node that has been set by a has been set by the server to its schema default value MUST fail with
client to its schema default value MUST succeed. a 'data-missing' error-tag.
o A valid 'delete' operation 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 If the server supports the 'report-all-tagged' retrieval mode in its
with-defaults capability, then the 'wd:default' attribute MUST be :with-defaults capability, then the 'wd:default' attribute MUST be
accepted in configuration input. If all NETCONF sub-operation accepted in configuration input. If all NETCONF <edit-config> or
parameters are valid, then the server will treat a tagged data node <copy-config> parameters are valid, then the server will treat a wd:
as a request to return that node to default data. If this request is default="true" tagged data node as a request to return that node to
valid within the context of the requested NETCONF operation, then the default data. If this request is valid within the context of the
data node is removed and returned to its default value. If the data requested NETCONF operation, then the data node is removed and
node within the NETCONF message contains a value in this case, it returned to its default value. The data node within the NETCONF
MUST be equal to the schema default value. 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>
2.3.4. 'explicit' Non-volatile Storage Behavior response with a 'invalid-value' error-tag.
All data nodes that are explicitly set data MUST be saved in non-
volatile storage.
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.
The server MUST accept the <with-defaults> parameter containing the A server which implements this specification MUST accept the <with-
enumeration for any of the defaults handling modes it supports, as defaults> parameter containing the enumeration for any of the
defined in Section 5. defaults handling modes it supports. The <with-defaults> parameter
contains one of the four enumerations defined in this section.
The <with-defaults> parameter contains one of the three basic mode 3.1. 'report-all' Retrieval Mode
enumerations defined above, to request that the retrieval operation
be performed using the specified defaults handling basic mode.
3.1. 'report-all-tagged' Retrieval Mode 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.
In addition to the basic modes, a special variant of 'report-all' 3.2. 'trim' Retrieval Mode
When data is retrieved with a <with-defaults> parameter equal to
'trim', data nodes MUST NOT be reported if they match the schema
default value. Non-configuration data nodes containing the schema
default value MUST NOT be reported.
3.3. 'explicit' Retrieval Mode
When data is retrieved with a <with-defaults> parameter equal to
'explicit', a data node which was set by a client to its schema
default value MUST be reported. A conceptual data node which 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.
3.4. 'report-all-tagged' Retrieval Mode
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 'wd: A server which supports 'report-all-tagged' MUST also accept the 'wd:
default' XML attribute it is present within configuration input to default' XML attribute within configuration input to the <edit-
the <edit-config> or <copy-config> operations. Refer to Section 6 config> or <copy-config> operations. Refer to Section 6 for XML
for XML encoding details of the 'wd:default' XML attribute. encoding details of the 'wd:default' XML attribute.
4. With-defaults Capability 4. With-defaults Capability
4.1. Overview 4.1. Overview
The :with-defaults capability indicates that the NETCONF server The :with-defaults capability indicates which defaults handling basic
supports a specific defaults handling basic mode. It may also mode is supported by the server. It may also indicate support for
indicate support for additional defaults retrieval modes. These additional defaults retrieval modes. These retrieval modes allow a
retrieval modes allow a NETCONF client to control whether default NETCONF client to control whether default data is returned by the
data is part of NETCONF <rpc-reply> messages. The capability affects server. The capability affects both configuration and state data
both configuration and state data (while acknowledging that the usage (while acknowledging that the usage of default values for state data
of default values for state data is less prevalent). Sending of is less prevalent). Sending of default data is controlled for each
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.4. mode' parameter in the capability URI, as defined in Section 4.4.
o MUST support the YANG module defined in Section 5. o MUST support the YANG module defined in Section 5.
o SHOULD support the 'report-all' or 'report-all-tagged' defaults o SHOULD support the 'report-all' or 'report-all-tagged' defaults
handling mode. handling mode.
o MAY support additional defaults handling modes. o MAY support additional defaults handling modes.
skipping to change at page 10, line 40 skipping to change at page 10, line 49
4.3. Conformance 4.3. Conformance
Every NETCONF server SHOULD implement this capability. Every NETCONF server SHOULD implement this capability.
4.4. Capability Identifier 4.4. 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. how the server will treat default data, as defined in Section 2. The
allowed values of this parameter are 'report-all', 'trim', and
The 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 default handling modes the parameter indicates which additional default handling modes the
server supports. The value of the parameter is a comma separated server supports. The value of the parameter is a comma separated
list of one or more modes that are supported beside the mode list of one or more modes that are supported beside the mode
indicated in the 'basic-mode' parameter. Possible modes are 'report- indicated in the 'basic-mode' parameter. Possible modes are 'report-
all', 'report-all-tagged', 'trim', and 'explicit', as defined in all', 'report-all-tagged', 'trim', and 'explicit', as defined in
Section 5. 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 which implements this module MUST also advertise a YANG module
capability URI according to the rules specified in capability URI according to the rules specified in
[I-D.ietf-netmod-yang]. [I-D.ietf-netmod-yang].
Examples: Examples:
urn:ietf:params:netconf:capability:with-defaults:1.0?basic- urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
skipping to change at page 11, line 42 skipping to change at page 11, line 51
supports the specified retrieval mode. 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 list Allowed values of the with-defaults element are taken from the 'with-
in Section 2. The allowed values are restricted to the values that defaults-type' typedef in Section 5. The allowed values for a
the device indicates it supports within the with-defaults capability, particular server are restricted to the values that the server
in the 'basic-mode' and 'also-supported' parameters. indicates it supports within the :with-defaults capability, in the
'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-reply> with an <rpc-error> element. The <error-tag> SHOULD be <rpc-error> response with an 'invalid-value' error-tag.
'invalid-value', and the <error-app-tag> SHOULD be 'with-defaults-
mode-not-supported'.
If the <with-defaults> element is not present, the server MUST follow If the <with-defaults> element is not present, the server MUST follow
its basic mode behavior as indicated by the with-defaults capability its basic mode behavior as indicated by the :with-defaults capability
identifier's 'basic-mode' parameter, defined in Section 4.4. identifier's 'basic-mode' parameter, defined in Section 4.4.
The <copy-config> operation is only affected if the target of the The <get> and <get-config> operations support a separate filtering
operation is specified with the <url> parameter. If the target is a mechanism, using the <filter> parameter. The defaults filtering is
NETCONF datastore (i.e., running, candidate or startup), the conceptually done before the <filter> parameter is processed. For
capability has no effect. The server MUST use its basic mode when example, if the <with-defaults> parameter is equal to 'report-all',
copying data to a NETCONF datastore. If the with-defaults parameter then the <filter> parameter is conceptually applied to all data nodes
is present in this case, it MUST be silently ignored by the server. and all default data.
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 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
datastore. If the <with-defaults> parameter is present in this case,
it MUST be silently ignored by the server.
If the server supports the 'report-all-tagged' mode, then the 'wd:
default' attribute defined in Section 6 also impacts the <copy-
config> operation. If the wd:default attribute is present and set to
'true', 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
database). 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 a
'invalid-value' error-tag.
4.6.2. <edit-config> Operation 4.6.2. <edit-config> Operation
The <edit-config> operation has four sub-operations. The 'create' The <edit-config> operation has several editing modes. The 'create'
and 'delete' sub-operations are affected by the defaults handling and 'delete' editing operations are affected by the defaults handling
basic mode. basic mode. The other enumeration values for the NETCONF operation
attribute are not affected.
The 'create' sub-operation MUST fail with a 'data-exists' error-tag If the operation attribute contains the value 'create', and the data
value if the server considers the target data node to already have a node already exists in the target database, then the server MUST
current value. return an <rpc-error> response with a 'invalid-value' 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 defaults 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 datastore. NETCONF datastore.
If the server supports the 'report-all-tagged' mode, then the 'wd: If the server supports the 'report-all-tagged' mode, then the 'wd:
default' attribute defined in Section 6 also impacts the edit-config default' attribute defined in Section 6 also impacts the <edit-
operation. If the wd:default attribute is present and set to 'true', config> operation. If the wd:default attribute is present and set to
then the server MUST treat the new data node as a request to return 'true', then the server MUST treat the new data node as a request to
that node to its default value (i.e., remove it from the database). return that node to its default value (i.e., remove it from the
database). 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 a
'invalid-value' error-tag.
If this editing mode is used, then the effective sub-operation for If the wd:default attribute is present, then the effective operation
the target data node MUST be 'create', 'merge' or 'replace'. If for the target data node MUST be 'create', 'merge' or 'replace'. If
'create' is the effective sub-operation, then the create request must not, then the server MUST return an <rpc-error> response with an
be valid on its own (e.g., current data node MUST NOT exist). The 'invalid-value' error-tag. For example, if 'create' is the effective
procedure for determining the effective sub-operation is defined in operation, then the create request must be valid on its own (e.g.,
[I-D.ietf-netconf-4741bis]. It is derived from the 'default- current data node MUST NOT exist). The procedure for determining the
operation' parameter and/or any 'nc:operation' attribute that are effective operation is defined in [I-D.ietf-netconf-4741bis]. It is
present in the data node or any of its ancestor nodes, within the derived from the 'default-operation' parameter and/or any operation
<edit-config> request message. attributes that are present in the data node or any of its ancestor
nodes, within the <edit-config> request.
4.6.3. Other Operations 4.6.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.7. Interactions with Other Capabilities 4.7. 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. The element to the <get>, <get-config>, and <copy-config> operations.
YANG language is defined in [I-D.ietf-netmod-yang]. The above The YANG language is defined in [I-D.ietf-netmod-yang]. The above
operations are defined in YANG in [I-D.ietf-netconf-4741bis]. Every operations are defined in YANG in [I-D.ietf-netconf-4741bis]. Every
NETCONF server which supports the :with-defaults capability MUST NETCONF server which supports the :with-defaults capability MUST
implement this YANG module. implement this YANG module.
<CODE BEGINS> file="ietf-netconf-with-defaults@2010-05-19.yang" <CODE BEGINS> file="ietf-netconf-with-defaults@2010-06-09.yang"
module ietf-netconf-with-defaults { module ietf-netconf-with-defaults {
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"; namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
prefix nwd; prefix ncwd;
import ietf-netconf { prefix nc; } import ietf-netconf { prefix nc; }
organization organization
"IETF NETCONF (Network Configuration Protocol) Working Group"; "IETF NETCONF (Network Configuration Protocol) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/netconf/> "WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
skipping to change at page 14, line 6 skipping to change at page 14, line 37
WG Chair: Mehmet Ersue WG Chair: Mehmet Ersue
<mailto:mehmet.ersue@nsn.com> <mailto:mehmet.ersue@nsn.com>
Editor: Andy Bierman Editor: Andy Bierman
<mailto:andyb@iwl.com> <mailto:andyb@iwl.com>
Editor: Balazs Lengyel Editor: Balazs Lengyel
<mailto:balazs.lengyel@ericsson.com>"; <mailto:balazs.lengyel@ericsson.com>";
description description
"This module defines a capability-based extension to the "This module defines an extension to the NETCONF protocol
NETCONF protocol that allows the NETCONF client to control that allows the NETCONF client to control how default
whether default values are part of NETCONF values are handled by the server in particular NETCONF operations.
<rpc-reply> messages or <copy-config> output to the target URL.
Copyright (c) 2010 IETF Trust and the persons identified as Copyright (c) 2010 IETF Trust and the persons identified as
the document authors. All rights reserved. the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
skipping to change at page 14, line 20 skipping to change at page 15, line 4
Copyright (c) 2010 IETF Trust and the persons identified as Copyright (c) 2010 IETF Trust and the persons identified as
the document authors. All rights reserved. the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual RFC number and remove this note
// RFC Ed.: remove this note // RFC Ed.: remove this note
// Note: extracted from draft-ietf-netmod-with-defaults-08.txt // Note: extracted from draft-ietf-netmod-with-defaults-09.txt
revision 2010-05-19 { revision 2010-06-09 {
description description
"Initial version."; "Initial version.";
reference reference
"RFC XXXX: With-defaults capability for NETCONF"; "RFC XXXX: With-defaults capability for NETCONF";
} }
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual
// RFC number and remove this note
typedef with-defaults-mode { typedef with-defaults-mode {
description description
"Possible modes to report default data in "Possible modes to report default data.";
rpc-reply messages."; reference
"RFC XXXX; section 3.";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
type enumeration { type enumeration {
enum report-all { enum report-all {
description description
"All default data is reported."; "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 { enum report-all-tagged {
description description
"All default data is reported. "All default data is reported.
Any nodes considered to be default data Any nodes considered to be default data
will contain a 'wd:default' XML attribute, will contain a 'wd:default' XML attribute,
set to 'true'."; set to 'true'.";
reference
"RFC XXXX; section 3.4";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
} }
enum trim { enum trim {
description description
"Values are not reported if they match the default."; "Values are not reported if they match the default.";
reference
"RFC XXXX; section 3.2";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
} }
enum explicit { enum explicit {
description description
"Report values that match the definition of "Report values that match the definition of
explicitly set data."; 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 { grouping with-defaults-parameters {
description
"Contains the <with-defaults> parameter for control
of defaults in NETCONF retrieval operations.";
leaf with-defaults { leaf with-defaults {
description description
"The explicit defaults processing mode requested."; "The explicit defaults processing mode requested.";
reference
"RFC XXXX; section 4.6.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
type with-defaults-mode; type with-defaults-mode;
} }
} }
// extending the get-config operation // extending the get-config operation
augment /nc:get-config/nc:input { augment /nc:get-config/nc:input {
description
"Adds the <with-defaults> parameter to the
input of the NETCONF <get-config> operation.";
reference
"RFC XXXX; section 4.6.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
uses with-defaults-parameters; uses with-defaults-parameters;
} }
// extending the get operation // extending the get operation
augment /nc:get/nc:input { augment /nc:get/nc:input {
description
"Adds the <with-defaults> parameter to
the input of the NETCONF <get> operation.";
reference
"RFC XXXX; section 4.6.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 copy-config operation
augment /nc:copy-config/nc:input { augment /nc:copy-config/nc:input {
description
"Adds the <with-defaults> parameter to
the input of the NETCONF <copy-config> operation.";
reference
"RFC XXXX; section 4.6.1";
// RFC Ed.: replace XXXX with actual
// RFC number and remove this note
uses with-defaults-parameters; uses with-defaults-parameters;
} }
} }
<CODE ENDS> <CODE ENDS>
6. XSD for the 'wd:default' Attribute 6. XSD for the 'wd:default' Attribute
The following XML Schema document defines the 'default' attribute, The following XML Schema document defines the 'default' attribute,
skipping to change at page 16, line 25 skipping to change at page 18, line 25
<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" <xs:attribute name="default" type="xs:boolean" default="false">
type="xs:boolean"
form="qualified"
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' then by the server to be default data. If set to 'true' then
the data node is default data. If 'false', then the the data node is default data. If 'false', 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>
skipping to change at page 17, line 19 skipping to change at page 19, line 16
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 [I-D.ietf-netmod-yang] . registry, defined in [I-D.ietf-netmod-yang] .
name: ietf-netconf-with-defaults name: ietf-netconf-with-defaults
prefix: nwd 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: XXXX // RFC Ed.: replace XXXX and remove this comment
8. Security Considerations 8. Security Considerations
This document defines a minor 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 client control over the The 'with-defaults' capability gives clients control over the
retrieval of particular types of XML data from a configuration retrieval of default data from a configuration datastore. The
datastore. They only suppress data that can already be retrieved security consideration of [I-D.ietf-netconf-4741bis] apply to this
with the standard protocol operations, and do not add any data to the document as well.
configuration datastore.
9. Acknowledgements 9. Acknowledgements
Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen
Schoenwaelder, Washam Fan and many other members of the NETCONF WG Schoenwaelder, Washam Fan and many other members of the NETCONF WG
for providing important input to this document. 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
skipping to change at page 18, line 8 skipping to change at page 20, line 4
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.
[RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741, [RFC4741] Enns, R., "NETCONF Configuration Protocol", RFC 4741,
December 2006. December 2006.
[I-D.ietf-netconf-4741bis] [I-D.ietf-netconf-4741bis]
Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
Bierman, "Network Configuration Protocol (NETCONF)", Bierman, "Network Configuration Protocol (NETCONF)",
draft-ietf-netconf-4741bis-02 (work in progress), draft-ietf-netconf-4741bis-02 (work in progress),
February 2010. February 2010.
[I-D.ietf-netmod-yang] [I-D.ietf-netmod-yang]
Bjorklund, M., "YANG - A data modeling language for Bjorklund, M., "YANG - A data modeling language for the
NETCONF", draft-ietf-netmod-yang-12 (work in progress), Network Configuration Protocol (NETCONF)",
April 2010. draft-ietf-netmod-yang-13 (work in progress), June 2010.
[W3C.REC-xml-20081126] [W3C.REC-xml-20081126]
Yergeau, F., Maler, E., Bray, T., Paoli, J., and C. Yergeau, F., Sperberg-McQueen, C., Maler, E., Paoli, J.,
Sperberg-McQueen, "Extensible Markup Language (XML) 1.0 and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth
(Fifth Edition)", World Wide Web Consortium Edition)", World Wide Web Consortium Recommendation REC-
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>.
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.
Note that this is not a real module, and implementation of this Note that this is not a real module, and implementation of this
module is not required for conformance to the :with-defaults protocol module is not required for conformance to the :with-defaults
capability, defined in Section 4. This module is not to be capability, defined in Section 4. This module is not to be
registered with IANA, and is not considered to be a code component. registered with IANA, and is not considered to be a code component.
It is intentionally very terse, and includes few descriptive It is intentionally very terse, and includes few descriptive
statements. statements.
module example { module example {
namespace "http://example.com/ns/interfaces"; namespace "http://example.com/ns/interfaces";
prefix exam; prefix exam;
typedef itf-status-type { typedef status-type {
description "Interface status"; description "Interface status";
type enumeration { type enumeration {
enum ok; enum ok;
enum 'waking up'; enum 'waking up';
enum 'not feeling so good'; enum 'not feeling so good';
enum 'better check it out'; enum 'better check it out';
enum 'better call for help'; enum 'better call for help';
} }
default ok; default ok;
} }
skipping to change at page 19, line 37 skipping to change at page 21, line 33
} }
leaf mtu { leaf mtu {
description description
"The maximum transmission unit (MTU) value assigned to "The maximum transmission unit (MTU) value assigned to
this interface."; this interface.";
type uint32; type uint32;
default 1500; default 1500;
} }
leaf itf-status { leaf status {
description description
"The current status of this interface."; "The current status of this interface.";
type itf-status-type; type status-type;
config false; config false;
} }
} }
} }
} }
A.2. Example Data Set A.2. Example Data Set
The following data element shows the conceptual contents of the The following data element shows the conceptual contents of the
example server for the protocol operation examples in the next example server for the protocol operation examples in the next
section. This includes all the configuration data nodes, non- section. This includes all the configuration data nodes, non-
configuration data nodes, and default leafs. configuration data nodes, and default leafs.
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<interfaces xmlns="http://example.com/ns/interfaces"> <interfaces xmlns="http://example.com/ns/interfaces">
<interface> <interface>
<name>eth0</name> <name>eth0</name>
<mtu>8192</mtu> <mtu>8192</mtu>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth1</name> <name>eth1</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth2</name> <name>eth2</name>
<mtu>9000</mtu> <mtu>9000</mtu>
<itf-status>not feeling so good</itf-status> <status>not feeling so good</status>
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<itf-status>waking up</itf-status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
In this example, the 'mtu' field for each interface entry is set in In this example, the 'mtu' field for each interface entry is set in
the following manner: the following manner:
+--------------+--------------+--------------+ +--------------+--------------+--------------+
| name | set by | mtu | | name | set by | mtu |
+--------------+--------------+--------------+ +--------------+--------------+--------------+
skipping to change at page 22, line 25 skipping to change at page 23, line 30
</get> </get>
</rpc> </rpc>
<rpc-reply message-id="101" <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data> <data>
<interfaces xmlns="http://example.com/ns/interfaces"> <interfaces xmlns="http://example.com/ns/interfaces">
<interface> <interface>
<name>eth0</name> <name>eth0</name>
<mtu>8192</mtu> <mtu>8192</mtu>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth1</name> <name>eth1</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth2</name> <name>eth2</name>
<mtu>9000</mtu> <mtu>9000</mtu>
<itf-status>not feeling so good</itf-status> <status>not feeling so good</status>
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<itf-status>waking up</itf-status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</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 wd:default XML attribute, set to node is an element that contains the wd:default XML attribute, set to
'true'. Any subtrees within the element are also considered to be 'true'.
tagged as dafault data.
The actual data nodes tagged by the server depends on the defaults The actual data nodes tagged by the server depends on the defaults
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.
skipping to change at page 24, line 26 skipping to change at page 25, line 26
</rpc> </rpc>
<rpc-reply message-id="102" <rpc-reply message-id="102"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:wd="urn:ietf:params:xml:ns:netconf:default:1.0"> xmlns:wd="urn:ietf:params:xml:ns:netconf:default:1.0">
<data> <data>
<interfaces xmlns="http://example.com/ns/interfaces"> <interfaces xmlns="http://example.com/ns/interfaces">
<interface> <interface>
<name>eth0</name> <name>eth0</name>
<mtu>8192</mtu> <mtu>8192</mtu>
<itf-status wd:default="true">up</itf-status> <status wd:default="true">up</status>
</interface> </interface>
<interface> <interface>
<name>eth1</name> <name>eth1</name>
<mtu wd:default="true">1500</mtu> <mtu wd:default="true">1500</mtu>
<itf-status wd:default="true">up</itf-status> <status wd:default="true">up</status>
</interface> </interface>
<interface> <interface>
<name>eth2</name> <name>eth2</name>
<mtu>9000</mtu> <mtu>9000</mtu>
<itf-status>not feeling so good</itf-status> <status>not feeling so good</status>
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<mtu wd:default="true">1500</mtu> <mtu wd:default="true">1500</mtu>
<itf-status>waking up</itf-status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
</rpc-reply> </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 The behavior of the <with-defaults> parameter handling for the value
'trim' is demonstrated in this example. 'trim' is demonstrated in this example.
skipping to change at page 25, line 37 skipping to change at page 26, line 37
<interface> <interface>
<name>eth0</name> <name>eth0</name>
<mtu>8192</mtu> <mtu>8192</mtu>
</interface> </interface>
<interface> <interface>
<name>eth1</name> <name>eth1</name>
</interface> </interface>
<interface> <interface>
<name>eth2</name> <name>eth2</name>
<mtu>9000</mtu> <mtu>9000</mtu>
<itf-status>not feeling so good</itf-status> <status>not feeling so good</status>
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<itf-status>waking up</itf-status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
</rpc-reply> </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 The behavior of the <with-defaults> parameter handling for the value
'explicit' is demonstrated in this example. 'explicit' is demonstrated in this example.
skipping to change at page 26, line 30 skipping to change at page 27, line 30
</get> </get>
</rpc> </rpc>
<rpc-reply message-id="104" <rpc-reply message-id="104"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data> <data>
<interfaces xmlns="http://example.com/ns/interfaces"> <interfaces xmlns="http://example.com/ns/interfaces">
<interface> <interface>
<name>eth0</name> <name>eth0</name>
<mtu>8192</mtu> <mtu>8192</mtu>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth1</name> <name>eth1</name>
<itf-status>up</itf-status> <status>up</status>
</interface> </interface>
<interface> <interface>
<name>eth2</name> <name>eth2</name>
<mtu>9000</mtu> <mtu>9000</mtu>
<itf-status>not feeling so good</itf-status> <status>not feeling so good</status>
</interface> </interface>
<interface> <interface>
<name>eth3</name> <name>eth3</name>
<mtu>1500</mtu> <mtu>1500</mtu>
<itf-status>waking up</itf-status> <status>waking up</status>
</interface> </interface>
</interfaces> </interfaces>
</data> </data>
</rpc-reply> </rpc-reply>
Appendix B. Change Log Appendix B. Change Log
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
B.1. 07-08 B.1. 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.2. 07-08
Added report-all-tagged mode. Added report-all-tagged mode.
Changed conformance so report-all or report-all-tagged mode SHOULD be Changed conformance so report-all or report-all-tagged mode SHOULD be
supported. supported.
Clarified capability requirements for each mode, for edit-config and Clarified capability requirements for each mode, for edit-config and
NV storage requirements. NV storage requirements.
Changed rpc-error details for unsupported with-defaults value. Changed rpc-error details for unsupported with-defaults value.
Added XSD for wd:default attribute Added XSD for wd:default attribute
Expanded example to show report-all-tagged for a basic-mode=trim Expanded example to show report-all-tagged for a basic-mode=trim
server. server.
B.2. 06-07 B.3. 06-07
Removed text in capability identifier section about adding YANG Removed text in capability identifier section about adding YANG
module capability URI parameters. module capability URI parameters.
Changed YANG module namespace to match YANG format, and updated Changed YANG module namespace to match YANG format, and updated
examples to use this new namespace. examples to use this new namespace.
Fixed some typos. Fixed some typos.
B.3. 05-06 B.4. 05-06
Removed ':1.0' from capability URI. Removed ':1.0' from capability URI.
Removed open issues section because all known issues are closed. Removed open issues section because all known issues are closed.
Moved examples to a separate appendix, and expanded them. Moved examples to a separate appendix, and expanded them.
Added example.yang as an appendix to properly explain the examples Added example.yang as an appendix to properly explain the examples
used within the document. used within the document.
skipping to change at page 28, line 10 skipping to change at page 29, line 22
Clarified <with-defaults> behavior for non-configuration data nodes. Clarified <with-defaults> behavior for non-configuration data nodes.
Clarified various sections based on WGLC comments on mailing list. Clarified various sections based on WGLC comments on mailing list.
Removed some unused terms. Removed some unused terms.
Reversed the order of the change log sections so the most recent Reversed the order of the change log sections so the most recent
changes are shown first. changes are shown first.
B.4. 04-05 B.5. 04-05
Updated I-D and YANG module boiler-plate. Updated I-D and YANG module boiler-plate.
Removed redundant 'with-defaults' YANG feature. Removed redundant 'with-defaults' YANG feature.
Changed definition of 'explicit' mode to match the YANG definition Changed definition of 'explicit' mode to match the YANG definition
Removed XSD because the YANG is normative and the XSD is Removed XSD because the YANG is normative and the XSD is
unconstrained, and does not properly extend the 3 affected NETCONF unconstrained, and does not properly extend the 3 affected NETCONF
operations. operations.
skipping to change at page 28, line 38 skipping to change at page 30, line 5
the YANG module imports the ietf-netconf module in order to augment the YANG module imports the ietf-netconf module in order to augment
some operations. some operations.
Updated capability requirements to include YANG module capability Updated capability requirements to include YANG module capability
parameters. parameters.
Added a description statement to the with-defaults leaf definition. Added a description statement to the with-defaults leaf definition.
Update open issues section; ready to close all open issues. Update open issues section; ready to close all open issues.
B.5. 03-04 B.6. 03-04
Clarifications Clarifications
Added non-netconf interfaces to the definition of explicitly set Added non-netconf interfaces to the definition of explicitly set
default data default data
B.6. 02-03 B.7. 02-03
Clarifications Clarifications
YAM added YAM added
Use the same URN for the capability and the XML namespace to Use the same URN for the capability and the XML namespace to
accommodate YANG, and avoid two separate URN/URIs being advertised in accommodate YANG, and avoid two separate URN/URIs being advertised in
the HELLO message, for such a small function. the HELLO message, for such a small function.
B.7. 01-02 B.8. 01-02
report-all made mandatory report-all made mandatory
Placeholder for YAM added, XSD will be removed when 4741 provides the Placeholder for YAM added, XSD will be removed when 4741 provides the
NETCONF YAM NETCONF YAM
with-defaults is valid for state data as well (if state data has a 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 defined default which might not be so frequent). The definition of
explicit was modified for state data. explicit was modified for state data.
B.8. 00-01 B.9. 00-01
Changed value set of with-default capability and element Changed value set of with-default capability and element
Added version to URI Added version to URI
B.9. -00 B.10. -00
Created from draft-bierman-netconf-with-defaults-01.txt Created from draft-bierman-netconf-with-defaults-01.txt
It was decided by the NETCONF mailing list, that with-defaults should It was decided by the NETCONF mailing list, that with-defaults should
be a sub-element of each affected operation. While this violates the be a sub-element of each affected operation. While this violates the
XSD of RFC4741 this is acceptable and follows the ideas behind XSD of RFC4741 this is acceptable and follows the ideas behind
NETCONF and YANG. NETCONF and YANG.
Hopefully it will be clarified in the 4741bis RFC whether such Hopefully it will be clarified in the 4741bis RFC whether such
extensions are allowed. extensions are allowed.
 End of changes. 115 change blocks. 
266 lines changed or deleted 364 lines changed or added

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