<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE rfc SYSTEM "/export/localhome/locbll/netconf/rfcAuthoring/xml2rfc-1.34pre3/rfc2629.dtd" 
[<!ENTITY xsdspec PUBLIC '' '/export/localhome/ethbll/netconf/rfcAuthoring/bibxml4/reference.W3C.REC-xmlschema-2-20041028.xml'>]>

<rfc category="std" docName="draft-ietf-netconf-with-defaults-01" ipr="trust200902">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc strict="yes"?>
<?rfc comments="no" ?>
<?rfc inline="no" ?>
<?rfc editing="no" ?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="no" ?>
<?rfc compact="yes"?>
<?rfc iprnotified="no"?>

 <front>
  <title abbrev="with-defaults">
   With-defaults capability for NETCONF
  </title>
  <author fullname="Andy Bierman" initials="A.B."
   surname="Bierman">
   <organization>Netconf Central</organization>
   <address>
    <postal>
     <street></street>
     <city>Simi Valley</city>
     <region>CA</region>
     <code></code>
     <country>USA</country>
    </postal>
    <email>andy@netconfcentral.com</email>
   </address>
  </author>
  
  <author fullname="Balazs Lengyel" initials="B. L."
   surname="Lengyel">
   <organization>Ericsson</organization>
   <address>
    <postal>
     <street></street>
     <city>Budapest</city>
     <region></region>
     <code></code>
     <country>Hungary</country>
    </postal>
    <email>balazs.lengyel@ericsson.com</email>
   </address>
  </author>
  
  <date year="2009" month="April"  day="06"/>
  <area>OPS</area>
  <workgroup>NETCONF</workgroup>
  <keyword>with-defaults</keyword>
  <keyword>XML</keyword>
  <abstract>
   <t>
    The NETCONF protocol defines ways to read configuration data
    from a NETCONF agent. Part of this data is not set by the NETCONF manager, 
    but rather a default value is used. In many situations the 
    NETCONF manager has a priori knowledge about default data, so the NETCONF 
    agent does not need to send it to the manager. In other situations the 
    NETCONF manger will need this data as part of the NETCONF &lt;rpc-reply> messages. 
    This document defines a capability-based extension to 
    the NETCONF protocol that allows the NETCONF manager to control whether 
    default values are part of NETCONF &lt;rpc-reply> messages.
   </t>
  </abstract>
 </front>

 <middle>
  <section title="Introduction">
   <t>
    The NETCONF protocol defines ways to read configuration data
    from a NETCONF agent. Part of this data is not set by the NETCONF manager, 
    but rather a default value is used. In many situations the 
    NETCONF manager has a priori knowledge about default data, so the NETCONF 
    agent does not need to send it to the manager. A priori knowledge can be 
    e.g. a document formally describing the data models supported by the NETCONF agent. 
    <vspace blankLines="1"/>
    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.
    <vspace blankLines="1"/>
    However there are use-cases when a NETCONF manager 
    will need the default data from the node:
    <vspace blankLines="1"/>
    <list style="symbols">
     <t>Documentation about default values can be  unreliable or unavailable.</t>
     <t>Some management applications might not have the capabilities to 
      correctly parse and interpret formal data models.</t>
     <t>Human users might want to understand the received 
      data without consultation of the documentation.</t>
    </list>
    <vspace blankLines="1"/>
    In all theses cases the NETCONF manager will need default data as part of the NETCONF &lt;rpc-reply> messages. 
    <vspace blankLines="1"/>
    This document defines a capability-based extension to 
    the NETCONF protocol that allows the NETCONF manager to control whether 
    default data is part of NETCONF &lt;rpc-reply> messages.
   </t>
  <section title="Terminology">
    <section title="Requirements Notation">
     <t>
      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 <xref target="RFC2119"/>.
     </t>
    </section>
   <section title="NETCONF Terms" anchor="NetconfTerms">
     <t>
      <list style="symbols">
       <t>Default data: Data that is set or used by the NETCONF 
        agent whenever the NETCONF manager does not provide a specific 
        value for the relevant data item. 
        Default values are often specified in documents describing the 
        data models supported by the NETCONF agent.
        In the context of this document only configuration data is considered, 
        state data is excluded.  
        <vspace blankLines="1"/>
       </t>       
        <t>Explicitly set default data: Data that is explicitly set by the NETCONF manager to it's default value.
         Some agents MIGHT treat explicitly set default data as simple 
         default data, as they MIGHT not be able to differentiate between them.</t>
      </list>      
     </t>     
     <t>
      In addition the following terms are defined in RFC 4741 and are not redefined here:
      <list style="symbols">
       <t>agent</t>
       <t>application</t>
       <t>manager</t>
       <t>operation</t>
       <t>RPC</t>
       <t>RPC request</t>
       <t>RPC response</t>
      </list>
     </t>     
    </section>
   </section>
  </section>
  <section title="With-defaults Capability">
   <section title="Overview"><t>
    The :with-defaults capability indicates that the NETCONF agent makes it possible 
    for the NETCONF manager to control whether default data is part of NETCONF 
    &lt;rpc-reply> messages. The capability only affects configuration data 
    not state data. Sending of default data is controlled for each individual operation separately. 
    The NETCONF agent MUST also indicate its basic behavior, whether it sends default data in 
    the absence of any specific request from the NETCONF manager. 
    </t>
    <section title="Basic handling of default data" anchor="basicHandling">
     <t>
      It is not defined in <xref target="RFC4741"/>, whether default data is part of the datastore/data 
      model, or if it is meta data, that influences the behavior of the NETCONF server, device but is 
      not actually part of the datastore. This document intentionally avoids 
      deciding this question. 
      <vspace blankLines="1"/>
      As a consequence of this issue,  
      NETCONF servers that do not implement the :with-defaults capability may or may not 
      return default data in NETCONF &lt;rpc-reply> messages. 
      <vspace blankLines="1"/>
      Different NETCONF agents report default data in different ways. This 
      document specifies the following three basic methods:
      <vspace blankLines="1"/>
      <list style="symbols">
       <t>Report all: All default data is always reported.</t>
       <t>Trim: Values are not reported if they match the default.</t>
       <t>Explicit: Report values if they are explicitly set.</t>
      </list>        
     </t>
    </section>
   </section>
   <section title="Dependencies"><t>None</t></section>
   <section title="Capability Identifier" anchor="capabilityIdChapter">
    <t>
     urn:ietf:params:netconf:capability:with-defaults:1.0
     <vspace blankLines="1"/>
     The identifier MUST have a parameter: "basic". This indicates how 
     the agent reports default data in &lt;rpc-reply> messages, in the case the 
     manager does not specify the required behavior in the &lt;rpc> request.
     The allowed values of this parameter are 
     report-all, trim, explicit as listed in <xref target="basicHandling"/>. 
    </t>
    <t>
     The identifier MAY have another parameter: "supported". This indicates what 
     other default handling methods does the agent support. 
     The value of the parameter is a colon separated list of one or two supported 
     methods. Possible methods are taken from the list in <xref target="basicHandling"/>.
    </t>
    <t>Example:
     <vspace blankLines="1"/>
     urn:ietf:params:netconf:capability:with-defaults:1.0?basic=report-all    
     <vspace blankLines="1"/>
     urn:ietf:params:netconf:capability:with-defaults:1.0?basic=report-all&amp;supported=trim:explicit    
    </t>
   </section>
   <section title="New Operations"><t>None</t></section>  
   <section title="Modifications to Existing Operations">
    <t>
     A new &lt;with-defaults> XML child element is added to the 'method-name' element. 
     This is the element that indicates the type of the 
      operation e.g. &lt;get>, &lt;get-config> or &lt;copy-config>.
      If the  &lt;with-defaults> element is present, it controls the 
      reporting of default data. The agent MUST return 
      default data in the NETCONF &lt;rpc-reply> messages according to the value of the element.
     </t>
     <t>
      Allowed values of the with-defaults element are taken from 
      the list in <xref target="basicHandling"/>. The allowed values are 
      restricted to the values that the device indicates 
      support for in the with-defaults capability.       
      <vspace blankLines="1"/>
      If the &lt;with-defaults> element is not present, 
      the agent follows its basic behavior as indicated 
      by the capability identifier's parameter see <xref target="capabilityIdChapter"/>.
     </t>
    <t>    
     Affected operations:
     <list style="symbols">
      <t>&lt;get></t>
      <t>&lt;get-config></t>
      <t>&lt;copy-config></t>
     </list>
     <vspace blankLines="1"/>
     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.
    </t>
    <t>
     The following example shows a &lt;get&gt; operation
     which is using the 'with-defaults' element.
     The manager is retrieving the 'interfaces' object,
     defined in the example.com data model.
     (In this simple example, the 'name' field is defined
     as the key, and the 'mtu' field is the only other
     data in the &lt;interface&gt; element).
     The default value of mtu is  '1500'. The basic default handling for the agent is "trim".
     As the 'with-defaults'
     element has the value 'report-all', the mtu is returned not just for eth0 but also for eth1.
    </t>   
    <t>
     <figure anchor="with_defaults_example">
      <artwork>
       <![CDATA[
    <rpc message-id="102"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <get>
        <with-defaults>report-all</with-defaults>
        <filter type="subtree">
          <interfaces xmlns="http://example.com/interfaces/1.2"/>
        </filter>
      </get>
    </rpc>
 
    <rpc-reply message-id="102" 
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://example.com/interfaces/1.2">
          <interface>
            <name>eth0</name>
            <mtu>8192</mtu>
          </interface>
          <interface>
            <name>eth1</name>
            <mtu>1500</mtu>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
 ]]>
      </artwork>
     </figure>
    </t>
   </section>
  </section>
  <section title="Interactions with Other Capabilities"><t>None</t></section>  
  <section title="Data Model XSD" anchor="XSD">
   <t>
    This section contains an XML Schema Definition
    <xref target="W3C.REC-xmlschema-2-20041028"/> which
    defines the XML syntax associated for the with-defaults XML element.
   </t>

   <t>
    <figure>
     <artwork>
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:ietf:params:xml:ns:netconf:with-defaults:1.0"
  targetNamespace="urn:ietf:params:xml:ns:netconf:with-defaults:1.0"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  xml:lang="en">
 
  <xs:annotation>
    <xs:documentation>
      Schema defining the with-defaults element.
      
      Organization: "IETF NETCONF Working Group"
      Contact Info: balazs.lengyel@ericsson.com
    </xs:documentation>
  </xs:annotation>

  <xs:attribute name="with-defaults" >
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="report-all"/>
        <xs:enumeration value="trim"/>
        <xs:enumeration value="explicit"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>

</xs:schema>
]]>
     </artwork>
    </figure>
   </t>
  </section>
  <section anchor="IANA" title="IANA Considerations">
   <t>This document registers two URIs for the NETCONF XML namespace in
    the IETF XML registry <xref target="RFC3688"></xref>. Note that the capability URN is compliant to
    <xref target="RFC4741"></xref> section 10.3.</t>
   <texttable>
    <ttcol  align="left" width="20%">Index</ttcol>
    <ttcol align="left">Capability Identifier</ttcol>
    <c>:with-defaults</c>
    <c>urn:ietf:params:netconf:capability:with-defaults:1.0</c>
   </texttable>
   <?rfc compact="no"?>
   <t>URI: urn:ietf:params:xml:ns:netconf:with-defaults:1.0
    <vspace blankLines="1"/>
    Registrant Contact: The IESG.
    <vspace blankLines="1"/>    
    XML: N/A, the requested URI is an XML namespace.
   </t>
  </section>
  <section anchor="Security" title="Security Considerations">
   <t>
    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.
   </t>
   <t>
    The 'with-defaults' capability
    provides manager controls 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.
   </t>
  </section>  
  <section title="Open Issues">
   <section title="Other default handling methods in the real world?">
    <t>
     Are there any other basic default handling methods out there we need to include? 
    </t>
   </section>
   <section title="XSD needed?">
    <t>Is the XSD needed? Does it add any value, any clarity to the document?</t>
   </section>
  </section>
  <section title="Appendix A  -  Change Log"> 
   <section title="00-01">
    <t>Changed value set of with-default capability and element</t>
    <t>Added version to URI</t>
   </section>
   <section title="-00">
    <t>Created from draft-bierman-netconf-with-defaults-01.txt</t>
    <t>
     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.
     <vspace blankLines="1"/>
     Hopefully it will be clarified in the 4741bis RFC whether such extensions are allowed.
    </t>
   </section>
  </section>
  <section title="Acknowledgements">
   <t>Thanks to Martin Bjorklund, Sharon Chisholm, Phil Shafer, Juergen Schoenwaelder and 
    many other members of the NETCONF WG for providing important input to this document.</t>
  </section>
 </middle>
 <back>
  <references title="Normative References">
    &xsdspec;
   <reference anchor='RFC4741'>
    <front>
     <title>NETCONF Configuration Protocol</title>
     <author initials='R.' surname='Enns' fullname='R. Enns'>
      <organization /></author>
     <date year='2006' month='December' />
     <abstract>
      <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized on top of a simple Remote Procedure Call (RPC) layer. [STANDARDS TRACK]</t></abstract></front>
    
    <seriesInfo name='RFC' value='4741' />
    <format type='TXT' octets='173914' target='ftp://ftp.isi.edu/in-notes/rfc4741.txt' />
   </reference>
   <reference anchor='RFC2119'>
    <front>
     <title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
     <author initials='S.' surname='Bradner' fullname='Scott Bradner'>
      <organization>Harvard University</organization>
      <address>
       <postal>
        <street>1350 Mass. Ave.</street>
        <street>Cambridge</street>
        <street>MA 02138</street></postal>
       <phone>- +1 617 495 3864</phone>
       <email>sob@harvard.edu</email></address></author>
     <date year='1997' month='March' />
     <area>General</area>
     <keyword>keyword</keyword>
     <abstract>
      <t>
       In many standards track documents several words are used to signify
       the requirements in the specification.  These words are often
       capitalized.  This document defines these words as they should be
       interpreted in IETF documents.  Authors who follow these guidelines
       should incorporate this phrase near the beginning of their document:
       
       <list>
        <t>
         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
         RFC 2119.
        </t></list></t>
      <t>
       Note that the force of these words is modified by the requirement
       level of the document in which they are used.
      </t></abstract></front>
    
    <seriesInfo name='BCP' value='14' />
    <seriesInfo name='RFC' value='2119' />
    <format type='TXT' octets='4723' target='ftp://ftp.isi.edu/in-notes/rfc2119.txt' />
    <format type='HTML' octets='17491' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
    <format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
   </reference>
   <reference anchor='RFC3688'>                
    <front>
     <title>The IETF XML Registry</title>
     <author initials='M.' surname='Mealling' fullname='M. Mealling'>
      <organization /></author>
     <date year='2004' month='January' />
     <abstract>
      <t>This document describes an IANA maintained registry for IETF standards which use 
       Extensible Markup Language (XML) related items such as Namespaces, 
       Document Type Declarations (DTDs), Schemas, and 
       Resource Description Framework (RDF) Schemas.</t></abstract></front>
    <seriesInfo name='BCP' value='81' />
    <seriesInfo name='RFC' value='3688' />
    <format type='TXT' octets='17325' target='ftp://ftp.isi.edu/in-notes/rfc3688.txt' />
   </reference>            
  </references>
 </back>
</rfc>

