<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4107 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4107.xml">
<!ENTITY RFC4960 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4960.xml">
<!ENTITY RFC5339 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5339.xml">
<!ENTITY RFC5424 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5424.xml">
<!ENTITY RFC6020 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6242 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6242.xml">
<!ENTITY RFC6244 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6244.xml">
<!ENTITY RFC6536 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6536.xml">
<!ENTITY RFC6921 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6921.xml">
<!ENTITY RFC7158 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7158.xml">
<!ENTITY RFC7589 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7589.xml">
<!ENTITY RFC7803 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7803.xml">
<!ENTITY RFC7895 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7895.xml">
<!ENTITY RFC7920 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7920.xml">
<!ENTITY RFC7921 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7921.xml">
<!ENTITY RFC7922 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7922.xml">
<!ENTITY RFC7923 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7923.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC7951 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7951.xml">
<!ENTITY RFC7952 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7952.xml">
<!ENTITY RFC7958 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7958.xml">
<!ENTITY RFC8022 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8022.xml">

<!ENTITY I-D.ietf-i2rs-ephemeral-state SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-ephemeral-state.xml">
<!ENTITY I-D.ietf-i2rs-protocol-security-requirements 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-protocol-security-requirements.xml">
 <!ENTITY I-D.ietf-i2rs-security-environment-reqs
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-security-environment-reqs.xml">
<!ENTITY I-D.ietf-i2rs-rib-info-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-info-model.xml">
<!ENTITY I-D.ietf-i2rs-rib-data-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-data-model.xml">
<!ENTITY I-D.ietf-i2rs-yang-l3-topology SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-yang-l3-topology.xml">

<!ENTITY I-D.ietf-i2rs-usecase-reqs-summary SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-usecase-reqs-summary.xml">

<!ENTITY I-D.ietf-netconf-restconf SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-restconf.xml">

<!ENTITY I-D.ietf-netconf-yang-patch 
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-patch.xml">
<!ENTITY I-D.ietf-netconf-yang-push 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-yang-push.xml">

<!ENTITY I-D.ietf-netconf-restconf-client-server
    SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-restconf-client-server.xml">

<!ENTITY I-D.ietf-netconf-zerotouch 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-zerotouch.xml">
<!ENTITY I-D.ietf-netconf-call-home 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-call-home.xml">
   
<!ENTITY I-D.ietf-netconf-netconf-event-notifications
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-netconf-event-notifications">

 <!ENTITY I-D.ietf-netconf-rfc5277bis
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-rfc5277bis">
   
   
<!ENTITY I-D.ietf-netconf-keystore
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-keystore.xml">
   

<!ENTITY I-D.ietf-netmod-opstate-reqs 
	SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-opstate-reqs.xml">

	
<!ENTITY I-D.ietf-netmod-syslog-model 
   SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-syslog-model.xml">
<!ENTITY I-D.ietf-netmod-schema-mount 
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-schema-mount.xml">
 <!ENTITY I-D.ietf-netconf-call-home SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-call-home.xml">
 
  <!ENTITY I-D.ietf-netconf-tls-client-server SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-tls-client-server.xml">
 
  <!ENTITY I-D.ietf-netmod-revised-datatstores SYSTEM 
  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-revised-datastores.xml">
 
 
   <!ENTITY I-D.ietf-netconf-rfc6536bis SYSTEM 
  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-rfc6536bis.xml">


   <!ENTITY I-D.hares-netmod-i2rs-yang SYSTEM 
  "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-netmod-i2rs-yang.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<rfc category="info" docName="draft-hares-netconf-i2rs-netconf-01.txt"  ipr="trust200902">
  <front>
    <title abbrev="I2RS Protocol Yang">NETCONF Changes to Support I2RS Protocol</title>
	<author fullname="Susan Hares" initials="S." surname="Hares">
	<organization> Huawei </organization>
	<address>
	  <postal>
	   <street></street>
	    <city>Saline</city>
		<country>US</country>
	  </postal>
	 <email>shares@ndzh.com </email>
	</address>
	</author>
		<author fullname="Amit Daas" initials="A." surname="Dass">
	<organization> Ericsson </organization>
	<address>
	 <email>amit.dass@ericsson.com</email>
	</address>
	</author> 
    <date year="2017" />
    <area>Routing Area</area>
    <workgroup>I2RS working group</workgroup>
    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>I2RS</keyword>
    <abstract>
      <t>This document describes a NETCONF capabiilty to 
	  support the Interface to Routing system (I2RS) 
	  protocol requirements for I2RS protocol version 1.
	  The I2RS  protocol is a re-use 
	  higher layer protocol which defines extensions to 
	  other protocols (NETCONF and RESTCONf) and 
	  extensions to the Yang Data Modeling language. 
	  </t>
	  <t>
	  The I2RS protocol supports ephemeral state datastores
      as control plane datastores. Initial versions of this 
      document contain descriptions of the ephemeral datastore. 
      Future versions may move this description to NETMOD 
      datastore description documents. 	  
	  </t>
	 </abstract>
  </front>
  <middle>
 <section anchor="intro" title="Introduction">
    <t>This a proposal for Yang additions to support the first version of the I2RS protocol.
    </t>
    <t>	
    The I2RS architecture <xref target="RFC7921"></xref> defines 
	the I2RS interface "a programmatic interface for state transfer in and out of 
	the Internet routing system".  The I2RS protocol is a protocol designed to a
	higher level protocol comprised of a set of existing protocols which 
	have been extended to work together to support a new interface to the routing system. 
    The I2RS protocol is a "reuse" management protocol which creates new management protocols
    by reusing existing protocols and extending these protocols for new 
	uses, and has been designed to be implemented in phases <xref target="RFC7921"></xref>.
	</t>
	<t>
	The first version of the I2RS protocol is comprised of extensions to 
   existing features of NETCONF <xref target="RFC6241"></xref> and 
   RESTCONF <xref target="I-D.ietf-netconf-restconf"></xref>. 
   The data modeling language for the I2RS protocol will be 
   Yang <xref target="RFC7950"></xref> with features 
   and extensions proposed in this draft. 
   </t>
  <t> 
   The structure of this document is:
   <list> 
   <t>Section 2 provides definitions for terms in this document.
   </t>
   <t>Section 3 summarizes the I2RS requirements behind these changes.  
   </t>
   <t>Section 4 describes the NETCONF capability to support a control protocol datastore. 
   </t>
   <t>Section 5 the NETCONF capability to support ephemeral state. <xref target="I-D.ietf-i2rs-ephemeral-state"></xref> specifies the I2RS requirements for the ephemeral state. 
   </t>
   <t>Section 6 provides a Tiny Routing Rib Yang module used by the examples in this document. 
   </t>
   </list>
</t>   
</section> 
 <section title="Definitions Related to Ephemeral Configuration">
<t> This section reviews definitions from I2RS architecture 
<xref target="RFC7921"></xref> and 
NETCONF operational state definitions
<xref target="I-D.ietf-netmod-revised-datastores"></xref>
before using these to construct a definition of the ephemeral data store. 
</t>
<section title="Requirements language">
  <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">RFC 2119</xref>.
	</t>
 </section>
<section title="I2RS Definitions">
 <t>The I2RS architecture <xref target="RFC7921"></xref>
defines the following terms: 
<list style="hanging">
<t hangText="ephemeral data: "> is data which does not persist across a 
reboot (software or hardware) or a power on/off condition.  Ephemeral 
data can be configured data or data recorded from operations of the router. 
Ephemeral configuration data also has the property that a system 
cannot roll back to a previous ephemeral configuration state.
(See <xref target="RFC7921"></xref> for an architectural overview, 
 <xref target="I-D.ietf-i2rs-ephemeral-state"></xref> for requirements, 
 and <xref target="I-D.ietf-netmod-revised-datastores"></xref>
 for discussion of how the ephemeral datastore as a control plane 
 datastore interacts with intended datstore and dynamic configuration 
 protocols to form the applied datastore".
</t>
<t hangText="local configuration: ">is the data on a routing system 
which does persist across a reboot (software or hardware) and a 
power on/off condition.  Local configuration has the ability to 
roll back to a pervious configuration state. 
Local configuration is defined as the intended datastore
 <xref target="I-D.ietf-netmod-revised-datastores"></xref>
 which is modified by dynamic configuration protocols (such as 
 DHCP) and the I2RS ephemeral data store
</t>
<t hangText="dynamic configuration protocols datastore">
are configuration protocols such as DHCP that interact
with the intended datastore (which does persist across a reboot 
(software or hardware) power on/off condition), 
and the I2RS ephemeral state control plane datastore.  
</t>
<t hangText="operator-applied policy:  "> is a policy that 
an operator sets that determines how the ephemeral datastore
as a control plane data store interacts with applied datastore (as defined 
in <xref target="I-D.ietf-netmod-revised-datastores"></xref>). 
This operator policy consists of setting a priority 
for each of the following (per <xref target="I-D.ietf-i2rs-ephemeral-state"></xref>):
<list style="symbols">
<t>intended configuration,
</t>
<t>any dynamic configuration protocols,
 </t>
<t>any control plane datastores (one of which is ephemeral.)
</t>
</list>
</t>
</list>
</t>
</section>
</section>
 <section title="Requirements control-plane datstore and ephemeral capabilities ">
 <section title="I2RS protocol requirements">
 <t>The requirements for the I2RS protocol are defined in 
 the following documents:
 <list style="symbols">
 <t>I2RS Problem Statement <xref target="RFC7920"></xref>,
 </t>
 <t>I2RS Architecture <xref target="RFC7921"></xref>, 
 </t>
 <t>I2RS Traceability <xref target="RFC7922"></xref>,
 </t>
 <t>Publication and Subscription <xref target="RFC7923"></xref>, 
 </t>
 <t>I2RS Ephemeral State Requrements, <xref target="I-D.ietf-i2rs-ephemeral-state">,</xref>
 </t>
 <t>I2RS Protocol Security Requirements, <xref target="I-D.ietf-i2rs-protocol-security-requirements"> </xref>
 </t>
 </list>
 </t>
 <t>The Interface to the routing System (I2RS) creates a new capability for the 
 routing systems, and with greater capaiblities come a greater need for security. 
 The requirements for a secure environment for I2RS are described in 
 <xref target="I-D.ietf-i2rs-security-environment-reqs"></xref>.
 </t>
</section> 
<section title="Overview of NETCONF support for I2RS protocol requirements"> 
   <t>This oveview reviews the following: 
   <list style="symbols">
   <t>Dependencies on Existing features
   </t>
   <t> Additions to use NETCONF <xref target="RFC6241"></xref> to support control plane datastores
    changes get to get data, write data,(via target [merge, replace, create, delete, copy, delete-all]),
	close-session, kill-session, rollback-on-error (all-or-nothing), validate (validation + roll-back-on-error (all-or-nothing), 
	</t>
    <t>Additions for I2RS ephemeral
	</t>
	<t>NETCONF <xref target="RFC6241"></xref> 
    changes to obtain control-plane datastore. 
	</t>
   </list>
   </t>
  </section> 
 </section> 
<section title="NETCONF capability for control-plane datastore">
<t>
capability-name: control-plane
</t>
<section title="Overview">
<t>
This capability defines the NETCONF protocol extensions for use with control plane 
protocols. 
</t>
<t>A control plane datastore is not part of the configuration datastore
per <xref target="I-D.ietf-netmod-revised-datastores"></xref>. 
The control plane datastore many contain configuration and operational state. 
A router implementation may merge the configuration from a control plane datastore with 
configuration data from the configuration datastore.  A query of the applied datastore 
will provide a list of the installed configuration from all datastores with meta data.  
The current architectural provides an origin identityref with the following mappimg to datastores for the 
<list style="symbols">
<t>static - configuration data store. 
</t>
<t>dynamic - dynamic configuration or dynamic control plane datastores.  
</t>
<t>system - created by system, 
</t>
<t>data-model - created by "default" in use. 
</t>
</list>
</t>
<t>
Clearly, the dynamic origin title is not enough to uniquely identify a 
control plane datastore entry in the applied datastore. 
Additional definitions will need to be added to the architectural model, 
but this will be specified in another document. 
</t>
<t>The control plane datastores do not restrict multiple access via the locking mechanisms
(&lt;lock&gt; and &lt;unlock&gt;), but use a priority scheme to
handle multiple clients attempting to write the same data.
The default validation within 
a control plane datastore's config objects (e.g. config=TRUE) 
is the configuration datastore validation, but if Yang data modules 
specify different validation for the datastore or specific nodes then 
the control plane datastores will use this validation. 
</t>
<t>Some data modules may be used for both a control plane 
datastore and the configuration datastore.  If additional 
validation is used for these modules, it is recommend that 
these modules use the "rpc" function for the additional validation 
rather than the &lt;write-data&gt; functions. 
</t> 
</section>
<section title="Dependencies">
<t>The following are the dependencies for the :control-plane capability
<list style="symbols">
<t>Yang features: 
<list style="symbols">
<t><xref target="I-D.ietf-netmod-revised-datastores"></xref> functionality 
including the ietf-yang-architecture" data module. 
</t>
<t><xref target="I-D.hares-netmod-i2rs-yang"></xref> Yang additions related to datastores 
definitions related to control plane datastores (datastoredef, datastore, dstype, 
precedence, protosup, validation), and ephemeral state. 
</t>
</list>
</t>
<t>The following NETCONF features: 
   <list style="symbols">
   <t>NETCONF <xref target="RFC6241"></xref> with its updates
   <xref target="RFC7803"></xref>, 
   </t>
   <t>Network Access Control Model <xref target="RFC6536"></xref>
   with update by <xref target="I-D.ietf-netconf-rfc6536bis"></xref>
   </t>
   <t>Running NETCONF over TLS with mutually X.509 authentication
   <xref target="RFC7589"></xref>
   </t>
  <t>Keystore Model <xref target="I-D.ietf-netconf-keystore"></xref>, </t>
  <t>Subscribing to Yang Datastore updates 
  <xref target="I-D.ietf-netconf-yang-push"></xref>,
  </t>
   <t>NETCONF support for Event Notifications 
   <xref target="I-D.ietf-netconf-netconf-event-notifications"></xref>,
   </t>
   <t>Subscribing to NETCONF Events (updated)
    <xref target="I-D.ietf-netconf-rfc5277bis"></xref>
   </t>
   <t>Yang Patch Media type <xref target="I-D.ietf-netconf-yang-patch"></xref>, 
    </t>
    <t>NETCONF/RESTCONF Zero Touch provisioning
	 <xref target="I-D.ietf-netconf-zerotouch"></xref>, 
   </t>
   <t>TLS Client and Server Models 
     <xref target="I-D.ietf-netconf-tls-client-server"></xref>
   </t>
   <t>Call Home <xref target="I-D.ietf-netconf-call-home"></xref>, 
   </t>
   <t>Module library <xref target="RFC7895"></xref>,
  </t>
  <t>NETCONF/RESTCONF Zero Touch provisioning <xref target="I-D.ietf-netconf-zerotouch"></xref>, 
  </t>
  </list>  
   </t>  
   </list>
   </t>
</section>
<section title="Capability identifier">
<t>
The controlplane-datastore capability is identified by the following capability
 string: (:control-plane (uri-tbd))  where the uri-tbd is to be assigned by IANA.
 </t>
</section>
<section title="New Operations">
<t>
The following are additional protocol operations 
NETCONF <xref target="RFC6241"></xref> to support the following queries based on a datastore source/target datastore
being specified:  
<list style="symbols">
<t>"get-data" </t>
<t> "write-data" </t>
<t> "validate-data" </t>
</list>
The &lt;target-datastore&gt; must be registered with IANA. 
</t>
<section title="&lt;get-data&gt;">
<t>The get-data command has obtains configuration and operational data.  
The parameters the following: 
<list style="hanging">
<t hangText ="source ">name of the datastore being queried. The valid 
  names are "applied", "opstate", or a datstore name registered 
  with IANA. </t>
<t hangText ="filter ">this identifies the portions of the device 
 configuration datastore is to receive.  If this parameter is not 
 present, the entire datastore is returned.  The filter MAY support
 subtypes "subtree", "uri", and "xpath" capabilities described
 in <xref target="RFC6241"></xref>.  Filters may also include the 
 elements for state (E.g. config true, config false, ephemeral true;
 ephemeral false;). 
  </t>
</list>
</t>
<t>
<list style="hanging">
<t hangText ="Positive Response ">If the device was able to 
satify the request, an &lt;rpc-reply&gt; is sent. The &lt;data&gt;
section contains the appropriate subset. 
</t>
<t hangText ="Negative Response ">If the device was unable to
satify the request, an &lt;rpc-error&gt; is included in the 
&lt;rpc-reply&gt;
</t>
</list>
</t>
<t>
<figure>
<artwork>
Example - retrieve route1 in route list. 
wfrom control plane datastore (cp-alpha)
and gets both configuration and ephemeral data.  

 &lt;rpc message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;get-data/
      &lt;source&gt;
        &lt;cp-alpha/&gt;
      &lt;/source&gt;
      &lt;filter type="subtree"&gt;
      &lt;top xmlns:t=
         "http://example.com/schema/1.0/i2rs/tiny-rt-instance">
		  &lt;route-list&gt;
		     &lt;route-index&gt;1&lt;/route-index&gt;
		  &lt;/route-list&lt;
      &lt;/filter&gt;
    &lt;/get-data&gt;
 &lt;/rpc&gt;
 
  &lt;rpc-rply message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;get-data&lt;
      &lt;source&gt;
        &lt;cp-alpha/&gt;
      &lt;/source&gt;
      &lt;filter type="subtree"&gt;
      &lt;top xmlns:t=
         "http://example.com/schema/1.0/i2rs/tiny-rt-instance">
		  &lt;route-list&gt;
		     &lt;route-index&gt;1&lt;/route-index&gt;
			 &lt;prefix-match&gt;192.2/8 /16&lt;prefix-match&gt;
			 &lt;nexthop&gt;129.1.5.1&lt;/nexthop&gt;
			 &lt;if-outgoing&gt;Eth0&lt;/if-outgoing&gt;
			 &lt;installed&gt;true&lt;/installed&gt;
		  &lt;/route-list&lt;
      &lt;/filter&gt;
    &lt;/get-data&gt;
 &lt;/rpc&gt;

 Figure 1   
</artwork>
</figure>
</t>
<t>
<figure>
<artwork>
Example 2 - retrieve users subtree from the ephemeral database 
which has example control plane datastore (cp-alpha)
and gets only config=true data; 

 &lt;rpc message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;get-data/
      &lt;source&gt;
        &lt;cp-alpha/&gt;
      &lt;/source&gt;
      &lt;filter type="subtree"&gt;
      &lt;top xmlns:t=
         "http://example.com/schema/1.0/i2rs/tiny-rt-instance">
		 &lt;route-list&gt;
		     &lt;route-index&gt;1&lt;/route-index&gt;
		  &lt;/route-list&lt;
		 type="state" select "config";
      &lt;/filter&gt;
    &lt;/get-data&gt;
 &lt;/rpc&gt;
  
  &lt;rpc-rply message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;get-data&lt;
      &lt;source&gt;
        &lt;cp-alpha/&gt;
      &lt;/source&gt;
      &lt;filter type="subtree"&gt;
      &lt;top xmlns:t=
         "http://example.com/schema/1.0/i2rs/tiny-rt-instance"&gt;
		  &lt;route-list&gt;
		     &lt;route-index&gt;1&lt;/route-index&gt;
			 &lt;prefix-match&gt;192.2/8 /16&lt;prefix-match&gt;
			 &lt;nexthop&gt;129.1.5.1&lt;/nexthop&gt;
			 &lt;if-outgoing&gt;Eth0&lt;/if-outgoing&gt;
		  &lt;/route-list&lt;
      &lt;/filter&gt;
    &lt;/get-data&gt;
 &lt;/rpc&gt;

 
 Figure 2 - get config data  
</artwork>
</figure>
</t>
</section>
<section title="&lt;write data gt;">
<t>The write data operationals has the attributes of operation parameters, 
and parameters of target datastore, default-operations, test-option, error-option, a priority, secondary-id, 
config, and opstate.  
The attributes of the operation for individual nodes wutg "config-true" are: create, delete, merge, remove, and replace.
The attributes for all-datastore operations are create-datastore, copy-datastore, delete-datastore. 
The operations handle multiple-client writes by using priority values rather than a locking mechanism.  
If two or more clients interact over changing the data node, the priority values arbitrate between
the the clients where the greatest priority (1=lowest) wins.  The following operations can enact 
changes in opstate data nodes: create, delete, remove, reset. 
</t>
<t>
The default-operations parameter flags are: merge, replace, or none.  
The test-option parameters flags are: test-then-set, set, and test-only. 
The error-option oarameter flags are: stop-on-error, continue-on-error, 
and rollback-on-error. 
The priority parameter is a integer giving the priority (range 1..5000). 
</t>
<section title="Limitations based on other capability flags">
<t>
The test-option parameters MAY only be set if the device advertises the
:validate:1.1 capability. If test-option is set without the 
:validate:1.1 capability, an error is returned "no support for test-option". 
</t>
<t>The error-option subparameter "rollback-on-error" is enabled only if 
the :rollback-on-error capability is set and the data is under the config parameter. 
</t>
<t>A URL is accepted within the &lt;source&gt; or &lt;target&gt; parameters if 
the :url capability is set.  An XPATH is accepted within the 
&lt;source&gt; or &lt;target&gt; parameters if 
the :xpath capability is set.
</t>
</section>
<section title="defaults">
<t>The following are the defaults: 
<list style="symbols">
<t>The target datastore does not exists, it will be created if local support exists. 
Otherwise, the reply will indicate "non-supported datastore".
</t>
<t>
If no sub-operations is specified the sub-operation, the default is merge. 
</t> 
<t>If no priority parameter is specified, the priority will be set to 1 (lowest external priority).
</t>
<t>If error-option is not set, then the default is "stop-on-error".  
(Note: for I2RS WG input.  Is "stop-on-error" the same as "none"? )
</t>
<t>If no test-option parameter is set, the write data operates as a 'set" without
validation first. 
</t>
<t>if no secondary-identifier is given, the secondary identifier stored is "" indicating a null string. 
</t>
</list>
</t>
<t>The NETCONF priority for the "write data" function is simply the Netconf
priority range.  If implementations have an internal priority, the precedence between 
the local configuration and the NETCONF supplied configuration is set by a 
operator applied knob.  For example, an implementation could indicate 
that the local configuration priority can range from 0-10 and the 
NETCONF priority is 10 plus the value of the priority parameter.   
</t>
</section>
<section title="target">
<t>
The target is a datastore whose name is registered with IANA. 
</t>
<t>
<figure>
<artwork>

Example Write data 

dsname = i2rs-agent

&lt;rpc message-id="101"
    xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
  &lt;write data&gt;
    &lt;target&gt;&lt;i2rs-agent&gt;&lt;/target&gt;
	&lt;operation&gt;merge&lt;/operation&gt;
    &lt;priority&gt;50&lt;&lt;/priority&gt;
	&lt;error-option&gt;all-or-nothing&lt;/error-option&gt;
	&lt;config&gt;
	     &lt;top xmlns:t=
         "http://example.com/schema/1.0/i2rs/tiny-rt-instance"&gt;
		  &lt;route-list&gt;
		     &lt;route-index&gt;1&lt;/route-index&gt;
			 &lt;prefix-match&gt;192.2/8 /16&lt;prefix-match&gt;
			 &lt;nexthop&gt;129.1.5.1&lt;/nexthop&gt;
			 &lt;if-outgoing&gt;Eth0&lt;/if-outgoing&gt;
		  &lt;/route-list&lt;   
	      &lt;/top&gt;
	&lt;/config&gt;
   &lt;/write data&gt;
         		 
</artwork>
</figure>
</t>
</section>
<section title="write data operations attributes">
<t>
The description of each operation is below: 
<list style="hanging">
<t hangText="&lt;create&gt; (config, opstate) :"> the creation of the 
data node in the datatstore if and only if the data does not already exist in the target datastore.  
If the data already exists, then an &lt;rpc-error&gt; is return wtih an 
error tag of "data-exists". Failure information or Success informatnoi 
is also pass to the notification functions (events 
and traceability).   
</t>
<t hangText="&lt;create-datastore &gt; (config, opstate) :"> the creation of the 
datastore based on datastructures in the config and opstate parameters. 
The datastore ownership is set to client creating the datastore plus the 
priority. 
</t>
<t hangText="&lt;delete&gt; (config) :"> the deletion of the data node if
the data node exists in the configuration and either the same client deletes the node
or a client with a high priority deletes the node. 
If configuration data does not  exist in the datastore, 
then the &lt;rpc-error&gt; element is returned with 
a &lt;error-tag&gt; with value of "data-missing".  The error information 
is passed to the notification functions to be
sent as event or (optionally) placed in a tracing file. 
</t>
 <t hangText="&lt;delete-datastore&gt; "> Delete all configuration
and operational data configured into the datastore, and the delete the 
datastore. The client requesting a delete-store must either be the owner of the 
datastore or have a higher priority than the client that owns the datastore. 
If a higher priority client takes ownership, the lower priority client is notified.  
If the devices is able to satisfy request, the positive response is 
&lt;rcp-reply&gt; that includes &lt;ok&gt; element. If the device is 
unable to complete request, the &lt;rcp-reply&gt; that includes &lt;rpc-error&gt; element.
The operations results are forwarded to event and traceabilty functions.
</t>
 <t hangText="&lt;copy-datastore&gt; "> If the datastore does not exist, 
 it creates the datastore and copies the configuration values and opstate values
 into the datastore. The ownership information (client identity and priority)
 is saved as part of the datastore.  If the datastore does exist and the client with ownership 
 of the datastore changes it, then the client can replace all the 
 datastore nodes. If a different client with lower priority than the client having ownership 
 wants to change the datastore, the request is rejected. 
 If a client with higher priority than the client having ownership, then the 
 the owership changed to the new client, all the data in the datastore is deleted, all  
 new data uploaded (config and opstate nodes).  If a server is able to satisfy request, 
 the positive response is &lt;rcp-reply&gt; that includes &lt;ok&gt; element. If the server is 
 unable to complete request, the &lt;rcp-reply&gt; that includes &lt;rpc-error&gt; element.
 The operational results are forwarded to event and traceabilty functions.
 If a copy-datastore action is in progress, and a client with a higher priority 
 asks to copy-datastore, the original 
</t>
 
<t hangText="&lt;merge&gt; (config) :"> parameter specifies merge.  If the 
&lt;priority&lt; specifies 
The current data is modified by the new data in a merge of the 
data based on priorities.  If the same client merges the data, 
priority is ignored.  If a different client merges the data, 
the priority must be created than the current client's priority. 
If any data is replaced, this event is passed to the notification   
and traceability functions to pass to the setting 
client and the client that set the original value.  
</t>
<t hangText="&lt;remove&gt; (config, opstate) :"> the remove of the data node if the 
data nodes specified in the &lt;config&gt; or the &lt;opstaste&gt; node exist. 
If data nodes do not exist, the "remove" operation is silently ignored and 
error results are forwarded to traceabilty functions. 
</t>
<t hangText="&lt;replace&gt; (config) :"> replaces data in target if the
same client replaces the top-level node, priority is ignored.  
If a different client replaces the note, the priority 
must be higher than the top level node's priority.   
If any data is replaced, this event is passed to the 
notification function (events and traceability), and a notification 
is sent to the previous client setting this data that the 
data has been reset.  If the request to replace is reject due to 
the current top-level node having a higher priority, then
an &lt;rpc-error&gt; returns with an error tag of "insufficient-priority".
If the node is replace by a different client, the 
original client is notified of the change.  
</t>
<t hangText="&lt;reset&gt; (opstate) :"> resets opstate
nodes with counters to initial settings.  
</t>
</list>
</t>
</section> 
<section title="&lt;priority parameters&gt;">
<t>
The priority parameter sets a integer value for the priority
as shown in figure x. 
</t>
</section> 
<section title="&lt;test-op parameter&gt;">
<t>
The &lt;test-option&gt; parameter performs basic function it does 
in the &lt;edit-config&gt; basic function. 
Just in <xref target="RFC6241"></xref>, the &lt;test-option&gt; 
parameter MAY be specified only if the device advertises the ":validate:1.1"
capability. The only difference is that the validation specified
by the data model may augment the validation test and the valdiation will 
also include the ability of the client to set this element. 
If a validation error occurs, the test-then-set will not 
perform the write-data function. 
</t>
</section> 
<section title="&lt;error-option&gt; parameter">
<t>&lt;error-option&gt; has the following attributes 
<list style="hanging">
<t hangText="stop-on-error :">Abort the write-data on 
the first error. This is the default. </t>
<t hangText="msg-rollback-on-error :"> if an error condition 
occurs such that error serverity &lt;rpc-error&gt; is 
generated, the server will stop processing the write-data
operation and restore the specific configuratoin to its 
complete state at the start of the "write-data" operation. 
This option only processes roll-back on single messages which includes
<list style="symbols">
<t>if multiple operations occur in single message, 
error in one operation (E.g. read data) must not impact other operations
(write-data);  
</t>
<t>multiple operations in multiple message should be supported, 
but roll-back should only include a single message. 
</t>
</list>
This option requires the server to support the :rollback-on-error
capability.</t>
</list>
</t>
</section> 
<section title="secondary-id">
<t>This operation associates a secondary 
identifier with a set of write-data operations. 
The secondary identifier is an opaque string.  
</t>
</section>
</section>
</section> 
<section title="Modification to protocol operations">
<section title="Unsupported protocol operations">
<t>The following protocol operations are not supported in the 
control plane datastore: 
<list style="symbols">
<t>&lt;get-config&gt;,
</t>
<t>&lt;edit-config&gt;,
</t>
<t>&lt;copy-config&gt;,
</t>
<t>&lt;delete-config&gt;,
</t>
<t>&lt;lock&gt;, 
</t>
<t>&lt;unlock&gt;
</t>
</list>
</t>
</section>
<section title="Modified protocol operations">
<section title="&lt;close-session&gt; and &lt;kill-session&gt;">
<t>The &lt;close-session&gt; is modified to take a target of a control plane 
datastore name (registered with IANA). Since no locks are set, none should be released. 
</t>
<t>The &lt;kill-session&gt; is modified to take a target of a control plane 
datastore name (registered with IANA). Since no locks are set, none should be released. </t>
</section>
</section>
</section>
<section title="Interactions with Capabilities">
<section title="Unsupported Capabiltiies">
<t>The following capabilities are not supported: 
<list style="symbols:">
<t>writeable-running capability,
</t>
<t>candidate configuration capability, 
</t>
<t>confirmed commit capability, 
</t>
<t>distinct startup capbility, 
</t>
</list> 
</t>
</section>
<section title="Modified Capabilities">
<section title="rollback-on-error">
<t> The rollback-on-error allows the error handling to be roll-back-on-error
(all-or-nothing in I2RS terms) for the control plane datastore. The control plane datastore 
name is a valid target if the rollback-on-error capability is combined with the 
control plane datastore capability. 
</t>
</section>
<section title="validate">
<t>The validation capability engated with the control plane capability 
operates to validate the config portion of the 
control plane datastore. Therefore, the &lt;target&gt; is allowed to have
a datstore name which is registered with IANA. 
</t>
<t>The validation of the configuration 
portion may contain the "validation" yang command which provides 
alternative validation mechanisms for specific data objects.  
 </t>
</section>
<section title="URL capability and XPATH capability">
<t>The URL capabilities specify a &lt;url&gt; in the &lt;source&gt;
and &lt;target&gt; operate as normal, but are allowed to 
specify a module within a control plane datastore. 
</t>
</section>
</section>
</section> 
</section> 

<section title="NETCONF Ephemeral capability">
<t>
capability-name: control-plane
</t>
<section title="Overview">
<t>The ephemeral capability is the ability to support control 
plane datastores which are entirely ephemeral or have
 ephemeral state modules, or ephemeral statements within objects in a modules.  These objects can be 
 configuration state (config=TRUE) or operational state
(config=FALSE).
</t>
<t>Ephemeral state in datastores, ephemeral modules 
or ephemeral objects within a module 
have one key characteristics: the data does not 
persist across reboots.  The 
ephemeral configuration state must be restored by a client, 
and the operational state will need to be regenerated. 
</t>
<t>
The entire requirements for ephemeral state for the I2RS control plane protocol are listed in
<xref target="I-D.ietf-i2rs-ephemeral-state"></xref>.
Many of these require fulfilled by the NETCONF 
control-plane capabilty(Ephemeral-REQ-07,  
Ephemeral-REQ-11, Ephemeral-REQ-12, Ephemeral-REQ-13, 
Ephemeral-REQ-14, Ephemeral-REQ-16). 
</t>
<t>
The key features include: 
<list style="symbols">
<t> references between (to/from) ephemeral state
and non-ephemeral state for constraints purposes 
(see Ephemeral-REQ-02, Ephemeral-REQ-03, and 
Ephemeral-REQ-04 in  <xref target="I-D.ietf-i2rs-ephemeral-state"></xref>). 
</t>
<t>operations to set and modify the 
constraints on the amount of resources 
the I2RS Agent (aka NETCONF server) can 
consume (Ephemeral-REQ-05)
</t>
<t> Yang modules must identify Yang objects
(modules, submodules or objects within 
yang modules which are ephemeral and augment 
other nodes) and allow an "ephemeral=TRUE" feature. 
</t>
</list>
</t>
</section> 
<section title="Dependencies">
<t>Ephemeral state is not supported in the configuration 
datstore.  The ephemeral state capability depends on 
having the control-plane datastore capability enabled
(with appropriate NETCONF capabilities described above), 
and an IANA registered datastore name. 
</t>
<t>Yang must support the ability to to denote that 
a datastore, module, submodule or object within a module 
can be denoted as ephemeral.  This capbility depends on the 
yang additions described in <xref target="I-D.hares-netmod-i2rs-yang"></xref>
for control plane datastores, ephemeral key word, and 
validation key word.   
</t>
<t>Ephemeral state operation depends on notification 
of events and traceability of errors. I2RS ephemeral 
state requires that 
</t>
</section>
<section title="New Operations">
<t>Note: One operation that is suggested for ephemeral 
state is to set resource limits. It does not 
seem to be an ephemeral state issue, but a control 
plane issue. This feature is placed here until 
future discussion for I2RS WG. 
</t>
<section title="resource-limits">
<t>resource-limits</t>
<t>definition - TBD 
</t>
<t>The <xref target="I-D.ietf-i2rs-ephemeral-state"></xref>
suggests setting these limits, but it does not seem to 
be an ephemeral function. 
</t>
</section> 
</section> 
<section title="Modifications to Protocol Operations">
<section title="Unsupported Operations">
<t>The ephemeral state only works as an augment to the 
control-plane datastore.  Therefore, the following
 protocol operations, which are not supported in the 
control-plane datastore capability, are also not supported
in the ephemeral capability:  
<list style="symbols">
<t>&lt;get-config&gt;,
</t>
<t>&lt;edit-config&gt;,
</t>
<t>&lt;copy-config&gt;,
</t>
<t>&lt;delete-config&gt;,
</t>
<t>&lt;lock&gt;, 
</t>
<t>&lt;unlock&gt;
</t>
</list>
</t>
</section>
<section title="Modified Operations">
<t>The ephemeral state only works as an augment to the 
control-plane datastore with specific ephemeral validations. 
Therefore, the &lt;close-session&gt; and &lt;kill-session&gt; are modified as described 
in the sections below. 
</t> 
<section title="&lt;close-session&gt; Modifications"> 
<t>The &lt;close-session&gt; is modified to take a target of a control plane 
datastore name (registered with IANA). Since no locks are set, none should be released. 
</t>
</section>

<section title="&lt;close-session&gt; Modifications">
<t>The &lt;kill-session&gt; is modified to take a target of a control plane 
datastore name (registered with IANA). Since no locks are set, none should be released. 
</t> 
</section> 
<section title="&lt;validate&gt; Modifications">
<t>The ephemeral state may require validation to determine if the 
constraints obey ephemeral-state rules. If the
:validate capability is used, the following parameter 
requires ephemeral-state contraints (Ephemeral-REQ-02, Ephemeral-REQ-03, 
and Ephemeral-REQ-04). If the ephemeral-constraint parameter is 
engaged for a module or object that is not ephemeral, the parameter is 
silently ignored. Error information is forwarded to the event notification processes
and the traceability functions. 
</t>
<t>Additional Parameter</t>
<t>ephemeral-constraint</t>
<t>
</t>
</section> 
</section> 
</section> 
</section> 
<section title="Yang model Simple Ephemeral Data model">
<t>
<figure>
<artwork>
datastoredef cp-alpha {
   dstype control-plane; 
   description {
	  "example control plane datastore ";
     }
   module-list tiny-rt-instance;  
   precedence applied {
     precedenceval 5; 
   }
   precedence opstate {
      precedenceval 5; 
   }
}

datastoredef cp-beta {
   dstype control-plane i2rs-v0;  
   description {
	  "example control plane datastore ";
     }
   module-list tiny-rib;  
   ephemeral true;
   precedence applied {
     precedenceval 50; 
   }
   precedence opstate {
      precedenceval 50; 
   }
}
module cp-example-1 {
 namespace "http://exaple.com/schema/cp-examples/1.1/tiny-rib";
 prefix trib; 
 import ietf-inet-types {
    prefix inet;
 }
 import ietf-yang-types {
    prefix yang; 
  }
 
 grouping trib-rt {
    description "tiny rib route";
    leaf route-index  {
	   type uint64;
	   mandatory true;	   
	   description "route index";
	 }
	leaf v4-prefix-match {
		type inet:ipv4-prefix;
		mandatory true; 
	}
	leaf v4-nexthop {
	    type inet:ipv4
		mandatory true; 
	   }
	leaf if-outgoing {
	    type if:interface-ref;
		mandatory true; 
		description {
		 "Name of outgoing interface";
		}
	leaf installed {
		type boolean;
        config false; 		
		description "rt install status ";
	   }
	}
   container tiny-rt-instance {
     description 
	    "Tiny routing instance for 
		 example purposes";
	 leaf name {
	    type string;
		description 
		 "The name of routing instance 
          which must be unique. ";
     }
	 list route-list {
	   key "route-index"; 
	   description 
	     "a list of routes of rib"
	   uses trib-rt; 
	 }
   }
  
   rpc trib-add {
    description "add route to tiny rib";
	input {
	  leaf datastore {
         type string; //iana registered 
         mandatory true;
         description 
		   "iana datastore name";  
	  }
	  container trib-routes {
	     description 
		   "Tiny rib routes to be added
		    to tiny rib";
		 list route-list {
		   key "route-index";
		   users trib-rt; 
		 }
	  }
     }
	 output {
	   container trib-add-status {
	     leaf success {
		  type boolean; 
		  description "add succeded"; 
		 }
		 leaf failure-reason {
		  type string; 
		  description "reason for failure ";
		 }
	   }
    }
 }
 
</artwork>

</figure>
</t>
<t>
</t>
</section> 
<section anchor="IANA" title="IANA Considerations">
 <t>TBD  </t>
 </section>
 <section title="Security Considerations">
 <t>
 The security requirements for the I2RS protocol are 
 covered in <xref target="I-D.ietf-i2rs-protocol-security-requirements"></xref>.
 The security environment the I2RS protocol is covered in
 <xref target="I-D.ietf-i2rs-security-environment-reqs"></xref>.
 Any person implementing or deploying the I2RS protocol
 should consider both security requirements.  
</t>
</section>
<section anchor="Acknowledgements" title="Acknowledgements"> 
	<t> TBD </t>

</section>
</middle>
 <back>
    <references title="Normative References:">
	 &RFC2119;
	 &RFC4107;
	 &RFC4960;
	 &RFC5339;
	 &RFC5424;
	 &RFC6020;
	 &RFC6241;
	 &RFC6242;
	 &RFC6244;
	 &RFC6536;
	 &RFC7158;
	 &RFC7589;
 	 &RFC7895;
	 &RFC7803;
	 &RFC7920;
	 &RFC7921;
	 &RFC7922;
	 &RFC7923;
	 &RFC7950;
	 &RFC7952;
	 &RFC7958;
 
	 </references>
	 <references title="Informative References">
	 &I-D.ietf-netconf-keystore;
	 &I-D.ietf-netmod-revised-datatstores;
	 &I-D.ietf-i2rs-ephemeral-state;
	 &I-D.ietf-i2rs-protocol-security-requirements;
	 &I-D.ietf-i2rs-security-environment-reqs;	
	 &I-D.ietf-i2rs-yang-l3-topology;
     &I-D.ietf-i2rs-rib-info-model;
	 &I-D.ietf-i2rs-rib-data-model;
	 &I-D.ietf-netconf-yang-patch;
	 &I-D.ietf-netconf-yang-push;
     &I-D.ietf-netconf-restconf;
	 &I-D.ietf-netconf-call-home;
	 &I-D.ietf-netconf-zerotouch;
	 &I-D.ietf-netmod-syslog-model;
  	 &I-D.ietf-netmod-schema-mount;
	 &I-D.ietf-netconf-netconf-event-notifications;
	 &I-D.ietf-netconf-rfc5277bis;
	 &I-D.ietf-netconf-tls-client-server;
	 &I-D.hares-netmod-i2rs-yang;
	 &I-D.ietf-netconf-rfc6536bis;
	 </references>
  </back>
</rfc>