[Docs] [txt|pdf|xml|html] [Tracker] [WG] [Email] [Diff1] [Diff2] [Nits]

Versions: (draft-bierman-netconf-with-defaults) 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 RFC 6243

NETCONF                                                       A. Bierman
Internet-Draft                                         InterWorking Labs
Intended status: Standards Track                              B. Lengyel
Expires: October 21, 2010                                       Ericsson
                                                          April 19, 2010


                  With-defaults capability for NETCONF
                  draft-ietf-netconf-with-defaults-07

Abstract

   The NETCONF protocol defines ways to read configuration data from a
   NETCONF server.  Part of this data is not set by the NETCONF client,
   but rather a default value is used.  In many situations the NETCONF
   client has a priori knowledge about default data, so the NETCONF
   server does not need to send it to the client.  In other situations
   the NETCONF client will need this data as part of the NETCONF <rpc-
   reply> messages.  This document defines a capability-based extension
   to the NETCONF protocol that allows the NETCONF client to control
   whether default values are part of NETCONF <rpc-reply> messages or
   <copy-config> output to the target URL.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   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
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on October 21, 2010.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of



Bierman & Lengyel       Expires October 21, 2010                [Page 1]

Internet-Draft                with-defaults                   April 2010


   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.

































Bierman & Lengyel       Expires October 21, 2010                [Page 2]

Internet-Draft                with-defaults                   April 2010


Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
     1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  4
     1.2.  Current handling of default data . . . . . . . . . . . . .  5
   2.  With-defaults Capability . . . . . . . . . . . . . . . . . . .  6
     2.1.  Overview . . . . . . . . . . . . . . . . . . . . . . . . .  6
     2.2.  Dependencies . . . . . . . . . . . . . . . . . . . . . . .  6
     2.3.  Conformance  . . . . . . . . . . . . . . . . . . . . . . .  6
     2.4.  Capability Identifier  . . . . . . . . . . . . . . . . . .  6
     2.5.  New Operations . . . . . . . . . . . . . . . . . . . . . .  7
     2.6.  Modifications to Existing Operations . . . . . . . . . . .  7
     2.7.  Interactions with Other Capabilities . . . . . . . . . . .  8
   3.  YANG Module  . . . . . . . . . . . . . . . . . . . . . . . . .  8
   4.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 11
   6.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11
   7.  Normative References . . . . . . . . . . . . . . . . . . . . . 11
   Appendix A.  Usage Examples  . . . . . . . . . . . . . . . . . . . 12
     A.1.  Example YANG Module  . . . . . . . . . . . . . . . . . . . 12
     A.2.  Example Data Set . . . . . . . . . . . . . . . . . . . . . 14
     A.3.  Protocol Operation Examples  . . . . . . . . . . . . . . . 15
       A.3.1.  <with-defaults> = 'report-all' . . . . . . . . . . . . 15
       A.3.2.  <with-defaults> = 'trim' . . . . . . . . . . . . . . . 16
       A.3.3.  <with-defaults> = 'explicit' . . . . . . . . . . . . . 17
   Appendix B.  Change Log  . . . . . . . . . . . . . . . . . . . . . 18
     B.1.  06-07  . . . . . . . . . . . . . . . . . . . . . . . . . . 19
     B.2.  05-06  . . . . . . . . . . . . . . . . . . . . . . . . . . 19
     B.3.  04-05  . . . . . . . . . . . . . . . . . . . . . . . . . . 19
     B.4.  03-04  . . . . . . . . . . . . . . . . . . . . . . . . . . 20
     B.5.  02-03  . . . . . . . . . . . . . . . . . . . . . . . . . . 20
     B.6.  01-02  . . . . . . . . . . . . . . . . . . . . . . . . . . 20
     B.7.  00-01  . . . . . . . . . . . . . . . . . . . . . . . . . . 20
     B.8.  -00  . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 21
















Bierman & Lengyel       Expires October 21, 2010                [Page 3]

Internet-Draft                with-defaults                   April 2010


1.  Introduction

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

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

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

   o  The management application often needs a single, definitive and
      complete set of configuration values that determine how the a
      networking device works.
   o  Documentation about default values can be unreliable or
      unavailable.
   o  Some management applications might not have the capabilities to
      correctly parse and interpret formal data models.
   o  Human users might want to understand the received data without
      consultation of the documentation.

   In all these cases the NETCONF client will need default data as part
   of the NETCONF <rpc-reply> messages.

   This document defines a capability-based extension to the NETCONF
   protocol that allows the NETCONF client to control whether default
   data is part of NETCONF <rpc-reply> messages.

1.1.  Terminology

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

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






Bierman & Lengyel       Expires October 21, 2010                [Page 4]

Internet-Draft                with-defaults                   April 2010


   Management Application:  A computer program running outside the
      NETCONF server that configures or supervises the NETCONF server.
      A management application can reach the device e.g. via NETCONF,
      CLI or SNMP.
   Default data:  Data specified in the data model schema as default,
      that is set or used by the device whenever the NETCONF client or
      other management application/user does not provide a specific
      value for the relevant data item.  Default data MAY or may not be
      stored as part of a configuration datastore.
   Explicitly set data:  Data that is set to any value by a NETCONF
      client or other management application by the way of an actual
      management operation, including any data model schema default
      value.  Any value set by the NETCONF server which is not the
      schema defined default value is also considered explicitly set
      data.

   In addition the following terms are defined in RFC 4741 and are not
   redefined here:
   o  client
   o  operation
   o  server

1.2.  Current handling of default data

   NETCONF does not define whether default data is part of the
   datastore/data model, or if it is meta-data that influences the
   behavior of the NETCONF server, but is not actually part of the
   datastore.  This document is intended to support either type of
   implementation, without deciding which approach is better.

   As a consequence of this approach, NETCONF servers that do not
   implement the :with-defaults capability may or may not return default
   data.

   Different NETCONF servers report default data in different ways.
   This document specifies the following three basic modes:

   report-all:  All default data is always reported.
   trim:  Values are not reported if they match the default value (as
      specified in the data model schema).  Note that non-configuration
      data nodes containing the schema default value are not reported
      either.
   explicit:  Report only values that match the definition of explicitly
      set data.  For non-configuration data, this has the same affect as
      'report-all'.






Bierman & Lengyel       Expires October 21, 2010                [Page 5]

Internet-Draft                with-defaults                   April 2010


2.  With-defaults Capability

2.1.  Overview

   The :with-defaults capability indicates that the NETCONF server makes
   it possible for the NETCONF client to control whether default data is
   part of NETCONF <rpc-reply> messages.  The capability affects both
   configuration and state data (while acknowledging that the usage of
   default values for state data is less prevalent).  Sending of default
   data is controlled for each individual operation separately.

   A NETCONF server implementing the :with-defaults capability MUST
   indicate its basic behavior, whether it sends default data in the
   absence of any specific request from the NETCONF client; and MUST
   support the 'report-all' handling mode and MAY support other modes.

   A server indicating 'explicit' either in the 'basic-mode' or the
   'also-supported' parameter MUST be able to differentiate between
   normal default data and explicitly set data.

2.2.  Dependencies

   None

2.3.  Conformance

   Every NETCONF server SHOULD implement this capability.

2.4.  Capability Identifier

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

   The identifier MUST have a parameter: "basic-mode".  This indicates
   how the server reports default data in <rpc-reply> messages, in the
   case the client does not specify the required behavior in the <rpc>
   request.  The allowed values of this parameter are report-all, trim,
   explicit as listed in Section 1.2.

   The identifier MAY have another parameter: "also-supported".  This
   parameter indicates which additional default handling modes the
   server supports.  The value of the parameter is a comma separated
   list of one or two modes that are supported beside the mode indicated
   in the 'basic-mode' parameter.  Possible modes are taken from the
   list in Section 1.2.

   Note that this protocol capability URI is separate from the YANG
   module capability URI for the YANG module in Section 3.  A server
   which implements this module will also advertise a YANG module



Bierman & Lengyel       Expires October 21, 2010                [Page 6]

Internet-Draft                with-defaults                   April 2010


   capability URI according to the rules specified in
   [I-D.ietf-netmod-yang].

   Examples:

   urn:ietf:params:netconf:capability:with-defaults?basic-mode=report-
   all

   urn:ietf:params:netconf:capability:with-defaults?basic-mode=report-
   all&also-supported=trim,explicit

2.5.  New Operations

   None

2.6.  Modifications to Existing Operations

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

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

   Allowed values of the with-defaults element are taken from the list
   in Section 1.2.  The allowed values are restricted to the values that
   the device indicates support for in the with-defaults capability in
   the basic and also-supported parameters.

   If an unsupported value is used, the NETCONF server MUST return an
   <rpc-reply> with an <rpc-error> element.  The <error-tag> MUST be
   'operation-not-supported', and the <error-app-tag> MUST be 'with-
   defaults-mode-not-supported'.

   If the <with-defaults> element is not present, the server follows its
   basic behavior as indicated by the capability identifier's 'basic-
   mode' parameter see Section 2.4.

   Affected operations:
   o  <get>
   o  <get-config>
   o  <copy-config>

   <copy-config> is only affected if the target of the operation is a
   URL.  If the target is a NETCONF datastore (running, candidate or



Bierman & Lengyel       Expires October 21, 2010                [Page 7]

Internet-Draft                with-defaults                   April 2010


   startup) the capability has no effect; the with-defaults parameter,
   if present, MUST be silently ignored.

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

2.7.  Interactions with Other Capabilities

   None


3.  YANG Module

   The following YANG module defines the addition of the with-defaults
   element to the <get>, <get-config> and <copy-config> operations.  The
   YANG language is defined in [I-D.ietf-netmod-yang].  The above
   operations are defined in YANG in [I-D.ietf-netconf-4741bis].  Every
   NETCONF server SHOULD implement this YANG module.



 <CODE BEGINS> file="ietf-netconf-with-defaults.yang"

 module ietf-netconf-with-defaults {

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

    prefix nwd;

    import ietf-netconf { prefix nc; }

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

    contact
     "WG Web:   <http://tools.ietf.org/wg/netconf/>
      WG List:  <mailto:netconf@ietf.org>

      WG Chair: Bert Wijnen
                <mailto:bertietf@bwijnen.net>

      WG Chair: Mehmet Ersue
                <mailto:mehmet.ersue@nsn.com>




Bierman & Lengyel       Expires October 21, 2010                [Page 8]

Internet-Draft                with-defaults                   April 2010


      Editor: Andy Bierman
              <mailto:andyb@iwl.com>

      Editor: Balazs Lengyel
              <mailto:balazs.lengyel@ericsson.com>";

    description
     "This module defines a capability-based extension to the
      NETCONF protocol that allows the NETCONF client to control
      whether default values are part of NETCONF
      <rpc-reply> messages or <copy-config> output to the target URL.


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

      Redistribution and use in source and binary forms, with or
      without modification, is permitted pursuant to, and subject
      to the license terms contained in, the Simplified BSD License
      set forth in Section 4.c of the IETF Trust's Legal Provisions
      Relating to IETF Documents
      (http://trustee.ietf.org/license-info).

      This version of this YANG module is part of RFC XXXX; see
      the RFC itself for full legal notices.";
    // RFC Ed.: replace XXXX with actual RFC number and remove this note

    // RFC Ed.: remove this note
    // Note: extracted from draft-ietf-netmod-with-defaults-06.txt

    revision 2010-04-19 {
      description
        "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 {
       description
         "Possible modes to report default data in
          rpc-reply messages.";
       type enumeration {
          enum report-all {
              description
                "All default data is always reported.";
          }
          enum trim {



Bierman & Lengyel       Expires October 21, 2010                [Page 9]

Internet-Draft                with-defaults                   April 2010


              description
                "Values are not reported if they match the default.";
          }
          enum explicit {
              description
                "Report values that match the definition of
                 explicitly set data.";
          }
      }
    }

    grouping with-defaults-parameters {
      leaf with-defaults {
        description
          "The explicit defaults processing mode requested.";
        type with-defaults-mode;
      }
    }

    // extending the get-config operation
    augment /nc:get-config/nc:input {
        uses with-defaults-parameters;
    }

    // extending the get operation
    augment /nc:get/nc:input {
        uses with-defaults-parameters;
    }

    // extending the copy-config operation
    augment /nc:copy-config/nc:input {
        uses with-defaults-parameters;
    }

 }

 <CODE ENDS>



4.  IANA Considerations

   This document registers one capability identifier URN from the
   'Network Configuration Protocol [RFC4741] Capability URNs' registry,
   and registers the same URN for the NETCONF XML namespace in the "IETF
   XML registry" [RFC3688].  Note that the capability URN is compliant
   to [RFC4741] section 10.3.




Bierman & Lengyel       Expires October 21, 2010               [Page 10]

Internet-Draft                with-defaults                   April 2010


   +----------------+--------------------------------------------------+
   | Index          | Capability Identifier                            |
   +----------------+--------------------------------------------------+
   | :with-defaults | urn:ietf:params:netconf:capability:with-defaults |
   +----------------+--------------------------------------------------+

   This document also registers one module name in the 'YANG Module
   Names' registry, defined in [I-D.ietf-netmod-yang] .  The following
   data should be recorded in this registry:

   +----------+--------------------------------------------------------+
   | Field    | Value                                                  |
   +----------+--------------------------------------------------------+
   | Module   | ietf-netconf-with-defaults                             |
   | Name     |                                                        |
   | Module   | nwd                                                    |
   | Prefix   |                                                        |
   | XML      | urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults |
   | Namespac |                                                        |
   | e        |                                                        |
   | Module   | XXXX // RFC Ed.: replace XXXX and remove               |
   | RFC      |                                                        |
   +----------+--------------------------------------------------------+


5.  Security Considerations

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

   The 'with-defaults' capability gives client control over the
   retrieval of particular types of XML data from a configuration
   database.  They only suppress data that can already be retrieved with
   the standard protocol operations, and do not add any data to the
   configuration database.


6.  Acknowledgements

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


7.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate



Bierman & Lengyel       Expires October 21, 2010               [Page 11]

Internet-Draft                with-defaults                   April 2010


              Requirement Levels", BCP 14, RFC 2119, March 1997.

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

   [RFC4741]  Enns, R., "NETCONF Configuration Protocol", RFC 4741,
              December 2006.

   [I-D.ietf-netconf-4741bis]
              Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
              Bierman, "Network Configuration Protocol (NETCONF)",
              draft-ietf-netconf-4741bis-02 (work in progress),
              February 2010.

   [I-D.ietf-netmod-yang]
              Bjorklund, M., "YANG - A data modeling language for
              NETCONF", draft-ietf-netmod-yang-12 (work in progress),
              April 2010.

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


Appendix A.  Usage Examples

A.1.  Example YANG Module

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

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


   <CODE BEGINS> file="example.yang"

     module example {

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




Bierman & Lengyel       Expires October 21, 2010               [Page 12]

Internet-Draft                with-defaults                   April 2010


     prefix exam;

     typedef itf-status-type {
        description "Interface status";
        type enumeration {
          enum ok;
          enum 'waking up';
          enum 'not feeling so good';
          enum 'better check it out';
          enum 'better call for help';
        }
        default ok;
     }

     container interfaces {
         description "Example interfaces group";

         list interface {
           description "Example interface entry";
           key name;

           leaf name {
             description
               "The administrative name of the interface.
                This is an identifier which is only unique
                within the scope of this list, and only
                within a specific server.";
             type string {
               length "1 .. max";
             }
           }

           leaf mtu {
             description
               "The maximum transmission unit (MTU) value assigned to
                this interface.";
             type uint32;
             default 1500;
           }

           leaf itf-status {
             description
               "The current status of this interface.";
             type itf-status-type;
             config false;
           }
         }
       }



Bierman & Lengyel       Expires October 21, 2010               [Page 13]

Internet-Draft                with-defaults                   April 2010


     }

   <CODE ENDS>


A.2.  Example Data Set

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



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


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









Bierman & Lengyel       Expires October 21, 2010               [Page 14]

Internet-Draft                with-defaults                   April 2010


              +--------------+--------------+--------------+
              | name         | set by       | mtu          |
              +--------------+--------------+--------------+
              | eth0         | client       | 8192         |
              | eth1         | server       | 1500         |
              | eth2         | client       | 9000         |
              | eth3         | client       | 1500         |
              +--------------+--------------+--------------+

A.3.  Protocol Operation Examples

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

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

A.3.1.  <with-defaults> = 'report-all'

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





























Bierman & Lengyel       Expires October 21, 2010               [Page 15]

Internet-Draft                with-defaults                   April 2010


    <rpc message-id="102"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          report-all
        </with-defaults>
      </get>
    </rpc>

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



A.3.2.  <with-defaults> = 'trim'

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




Bierman & Lengyel       Expires October 21, 2010               [Page 16]

Internet-Draft                with-defaults                   April 2010


    <rpc message-id="103"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          trim
        </with-defaults>
      </get>
    </rpc>

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


A.3.3.  <with-defaults> = 'explicit'

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









Bierman & Lengyel       Expires October 21, 2010               [Page 17]

Internet-Draft                with-defaults                   April 2010


    <rpc message-id="104"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/ns/interfaces"/>
        </filter>
        <with-defaults
         xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">
          explicit
        </with-defaults>
      </get>
    </rpc>

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



Appendix B.  Change Log

   -- RFC Ed.: remove this section before publication.






Bierman & Lengyel       Expires October 21, 2010               [Page 18]

Internet-Draft                with-defaults                   April 2010


B.1.  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.2.  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.3.  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.




Bierman & Lengyel       Expires October 21, 2010               [Page 19]

Internet-Draft                with-defaults                   April 2010


   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.4.  03-04

   Clarifications

   Added non-netconf interfaces to the definition of explicitly set
   default data

B.5.  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.6.  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.7.  00-01

   Changed value set of with-default capability and element

   Added version to URI





Bierman & Lengyel       Expires October 21, 2010               [Page 20]

Internet-Draft                with-defaults                   April 2010


B.8.  -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

   Andy Bierman
   InterWorking Labs
   Santa Cruz, CA
   USA

   Phone: +1 831 460 7010
   Email: andyb@iwl.com


   Balazs Lengyel
   Ericsson
   Budapest,
   Hungary

   Email: balazs.lengyel@ericsson.com





















Bierman & Lengyel       Expires October 21, 2010               [Page 21]


Html markup produced by rfcmarkup 1.109, available from https://tools.ietf.org/tools/rfcmarkup/