draft-ietf-netconf-nmda-netconf-01.txt   draft-ietf-netconf-nmda-netconf-02.txt 
Network Working Group M. Bjorklund Network Working Group M. Bjorklund
Internet-Draft Tail-f Systems Internet-Draft Tail-f Systems
Updates: 7950 (if approved) J. Schoenwaelder Updates: 6241, 7950 (if approved) J. Schoenwaelder
Intended status: Standards Track Jacobs University Intended status: Standards Track Jacobs University
Expires: May 3, 2018 P. Shafer Expires: July 21, 2018 P. Shafer
K. Watsen K. Watsen
Juniper Networks Juniper Networks
R. Wilton R. Wilton
Cisco Systems Cisco Systems
October 30, 2017 January 17, 2018
NETCONF Model for NMDA NETCONF Extensions to Support the Network Management Datastore
draft-ietf-netconf-nmda-netconf-01 Architecture
draft-ietf-netconf-nmda-netconf-02
Abstract Abstract
The "Network Management Datastore Architecture" (NMDA) improves on This document extends the NETCONF protocol defined in RFC 6241 in
NETCONF by adding new features to give more accurate handling of order to support the Network Management Datastore Architecture
configuration and operational data. These include ability to inspect defined in I-D.ietf-netmod-revised-datastores.
the current operational values of configuration data, allowing
clients to use identical paths for retrieving the configured values This document updates both RFC 6241 and RFC 7950. The update to RFC
and the operational values. These new features require additional 6241 adds new operations <get-data> and <edit-data>, and augments
operations in network management applications such as NETCONF. This existing operations <lock>, <unlock>, and <validate>. The update to
document details those new operations. RFC 7950 requires the usage of I-D.ietf-netconf-rfc7895bis by NETCONF
servers implementing the Network Management Datastore Architecture.
REF Editor: please replace "I-D.ietf-netmod-revised-datastores" and
"I-D.ietf-netconf-rfc7895bis" above with their final RFC assignments.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 3, 2018. This Internet-Draft will expire on July 21, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Keywords . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3
2. The NMDA Model for NETCONF . . . . . . . . . . . . . . . . . 3 2. Datastore and YANG Library Requirements . . . . . . . . . . . 3
2.1. Operations . . . . . . . . . . . . . . . . . . . . . . . 3 3. NETCONF Extensions . . . . . . . . . . . . . . . . . . . . . 4
2.1.1. The <get-data> Operation . . . . . . . . . . . . . . 3 3.1. New NETCONF Operations . . . . . . . . . . . . . . . . . 4
2.1.2. The <edit-data> Operation . . . . . . . . . . . . . . 4 3.1.1. The <get-data> Operation . . . . . . . . . . . . . . 4
2.2. Augmentations to the Base NETCONF Model . . . . . . . . . 5 3.1.2. The <edit-data> Operation . . . . . . . . . . . . . . 6
2.3. RPCs and Actions . . . . . . . . . . . . . . . . . . . . 5 3.2. Augmentations to NETCONF Operations . . . . . . . . . . . 6
2.4. YANG Library Capability . . . . . . . . . . . . . . . . . 5 4. NETCONF Datastores YANG Module . . . . . . . . . . . . . . . 7
3. YANG Model . . . . . . . . . . . . . . . . . . . . . . . . . 6 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 6. Security Considerations . . . . . . . . . . . . . . . . . . . 14
5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 14
6. Informative References . . . . . . . . . . . . . . . . . . . 12 7.1. Normative References . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 7.2. Informative References . . . . . . . . . . . . . . . . . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16
1. Introduction 1. Introduction
This document provides a YANG model that adds NETCONF ([RFC6241]) This document extends the NETCONF protocol defined in [RFC6241] in
support for the "Network Management Datastore Architecture" (NMDA) order to support the Network Management Datastore Architecture (NMDA)
[I-D.ietf-netmod-revised-datastores]. NMDA defines a framework for defined in [I-D.ietf-netmod-revised-datastores].
datastores, a fundamental concept binding network management data
models to network management protocols, enabling data models to be
written in a network management protocol agnostic way. NETCONF
operations currently refer to the datastores defined in the original
model, so new operations are required to allow references to the new
datastores.
Operations like <copy-config>, <lock> and <unlock> are augmented to This document updates [RFC6241] in order to enable NETCONF clients to
allow them to target additional datastores. interact with all the datastores supported by a server implementing
the NMDA. The update both adds new operations <get-data> and
<edit-data>, and augments existing operations <lock>, <unlock>, and
<validate>.
In addition the original <get> operation is deprecated, since the This document also updates [RFC7950] in order to enable NETCONF
information it returns is no longer needed. <get>'s deficiencies clients to both discover which datastores are supported by the
were a major motivation for the NMDA. NETCONF server, as well as determine which modules are supported in
each datastore. The update requires NETCONF servers implementing the
NMDA to support [I-D.ietf-netconf-rfc7895bis].
1.1. Keywords 1.1. Terminology
This document uses the terminology defined by the NMDA
[I-D.ietf-netmod-revised-datastores].
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14, [RFC2119] [RFC8174] when, and only when, they appear in all 14, [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.. capitals, as shown here.
1.2. Terminology 1.2. Tree Diagrams
This document uses the terminology defined by the NMDA Tree diagrams used in this document follow the notation defined in
[I-D.ietf-netmod-revised-datastores]. [I-D.ietf-netmod-yang-tree-diagrams].
2. The NMDA Model for NETCONF 2. Datastore and YANG Library Requirements
This section describes the changes needed for NMDA support. These RFC Ed.: Update 201X-XX-XX below with correct date.
changes are contained in a new YANG ([RFC7950]) model
"ietf-netconf-datastores". An NMDA-compliant NETCONF server MUST support the operational state
datastore and it MUST implement at least revision 201X-XX-XX of the
"ietf-yang-library" module defined in [I-D.ietf-netconf-rfc7895bis].
The server MUST advertise the following capability in the <hello>
message (line breaks and whitespaces are used for formatting reasons
only):
urn:ietf:params:netconf:capability:yang-library:1.1?
revision=<date>&checksum=<checksum-value>
The parameter "revision" has the same value as the revision date of
the "ietf-yang-library" module implemented by the server. This
parameter MUST be present.
The parameter "checksum" has the same value as the leaf
"/yang-library/checksum" from "ietf-yang-library". This parameter
MUST be present.
With this mechanism, a client can cache the supported modules for a
server and only update the cache if the "checksum" value in the
<hello> message changes.
This document updates [RFC7950], Section 5.6.4, to allow servers to
advertise the capability :yang-library:1.1 instead of :yang-
library:1.0, and to implement the subtree "/yang-library"
[I-D.ietf-netconf-rfc7895bis] instead of "/modules-state".
3. NETCONF Extensions
This section describes the NETCONF extensions needed to support the
NMDA. These changes are defined in a new YANG ([RFC7950]) module
"ietf-netconf-nmda".
These changes include the use of source and target parameters based These changes include the use of source and target parameters based
on the "datastore" identity defined in the "ietf-datastores" from on the "datastore" identity defined in the "ietf-datastores" module
[I-D.ietf-netmod-revised-datastores]. The use of identities allows [I-D.ietf-netmod-revised-datastores]. The use of identities allows
future expansion in a way that the choice-based strategy from the future expansion in a way that the choice-based strategy from the
original operations (e.g., <get-config>, <edit-config>) do not. original operations (e.g., <get-config>, <edit-config>) does not.
2.1. Operations 3.1. New NETCONF Operations
Support for the NMDA includes two new operations defined in this Two new operations <get-data> and <edit-data> are defined in this
document. document in order to support the NMDA. These operations are similar
to the <get-config> and <edit-config> operations but they can work on
an extensible set of datastores.
2.1.1. The <get-data> Operation 3.1.1. The <get-data> Operation
The <get-data> operation retrieves data from a specific NMDA The <get-data> operation retrieves data from a specific NMDA
datastore. This operation is similar to NETCONF's <get-config> datastore. This operation is similar to NETCONF's <get-config>
operation, but adds flexibility in naming the source datastore. operation defined in [RFC6241], but it adds the flexibility to select
the source datastore.
The "source" parameter indicates the datastore which is the source of +---x get-data
the data to be retrieved. This is a datastore identity. +---w input
| +---w datastore ds:datastore-ref
| +---w (filter-spec)?
| | +--:(subtree-filter)
| | | +---w subtree-filter? <anydata>
| | +--:(xpath-filter)
| | +---w xpath-filter? yang:xpath1.0 {nc:xpath}?
| +---w config-filter? boolean
| +---w origin-filter? identityref {origin}?
| +---w max-depth? union
| +---w with-origin? empty {origin}?
| +---w with-defaults? with-defaults-mode
+--ro output
+--ro data? <anydata>
The "datastore" parameter indicates the datastore which is the source
of the data to be retrieved. This is a datastore identity.
The <get-data> operation accepts a content filter parameter, similar The <get-data> operation accepts a content filter parameter, similar
to the "filter" parameter of "get-config", but using explicit nodes to the "filter" parameter of <get-config>, but using explicit nodes
for subtree filtering and XPath filtering. for subtree filtering ("subtree-filter") and XPath filtering
("xpath-filter").
Additional filters are defined to retrieve only "config true" nodes The "config-filter" parameter can be used to retrieve only "config
or nodes matching a given "origin" value. true" or "config false" nodes. The "origin-filter" can be used to
select nodes matching a given "origin" value.
The "max-depth" parameter can be used by the client to limit the
number of sub-tree levels that are returned in the reply.
The <get-data> operation also supports the "with-defaults" parameter The <get-data> operation also supports the "with-defaults" parameter
as defined in [RFC6243]. The supported values follow the constraints as defined in [RFC6243]. The supported values follow the constraints
given by the "with-defaults" capability. given by the "with-defaults" capability.
2.1.1.1. Origin Metadata Attribute The "with-defaults" parameter does not apply when interacting with an
operational datastore. This means that all "in use" values, as
defined in [I-D.ietf-netmod-revised-datastores] section 5.3, are
returned from the operational state datastore, even if a node happens
to have a default statement in the YANG module, and this default
value is being used by the server. If the "with-defaults" parameter
is present in a request to such a datastore, then the server MUST
return an error, as specified in "ietf-netconf-nmda" (see Section 4).
The <get-data> operation adds a new parameter named "with-origin", 3.1.1.1. Origin Metadata Attribute
The <get-data> operation defines a parameter named "with-origin",
which if present, requests that the server includes "origin" metadata which if present, requests that the server includes "origin" metadata
anotations in its response, as detailed in the NMDA. This parameter anotations in its response, as detailed in the NMDA. This parameter
is only valid for <operational> and any datastores with identities is only valid for the operational state datastore and any datastores
derived from the "operational" identity. Otherwise, if an invalid with identities derived from the "operational" identity. Otherwise,
datastore is specified then an <rpc-error> element is returned with if an invalid datastore is specified then an error is returned, as
an <error-tag> value of "invalid-value". "origin" metadata specified in "ietf-netconf-nmda" (see Section 4). Note that "origin"
annotations are not included unless a client explicitly requesteds metadata annotations are not included in a response unless a client
them. explicitly requests them.
Data from <operational> can come from multiple sources. The server Data in the operational state datastore can come from multiple
should return the most accurate value for the "origin" metadata sources. The server should return the most accurate value for the
annotation as possible, indicating the source of the operational "origin" metadata annotation as possible, indicating the source of
value, as specified in section 5.3.4 of the NMDA. the operational value, as specified in Section 5.3.4 of
[I-D.ietf-netmod-revised-datastores].
When encoding the origin metadata annotation for a hierarchy of When encoding the origin metadata annotation for a hierarchy of
returned nodes, the annotation may be omitted for a child node when returned nodes, the annotation may be omitted for a child node when
the value matches that of the parent node (as described in ietf- the value matches that of the parent node, as described in the
origin@2017-08-17). [RFC Editor, please check published revision "ietf-origin" YANG module [I-D.ietf-netmod-revised-datastores].
date.]
The "with-origin" parameter is optional to support. It is identified The "with-origin" parameter is optional to support. It is identified
with the URI: with the URI:
urn:ietf:params:netconf:capability:with-origin:1.0 urn:ietf:params:netconf:capability:with-origin:1.0
2.1.2. The <edit-data> Operation 3.1.2. The <edit-data> Operation
The <edit-data> operation changes the contents of a specific The <edit-data> operation changes the contents of a writable
datastore, similar to the <edit-config> operation, but with datastore, similar to the <edit-config> operation defined in
additional flexibility in naming the target datastore. [RFC6241], but with additional flexibility in naming the target
datastore. If an <edit-data> operation is invoked on a non-writable
datastore, then an error is returned, as specified in
"ietf-netconf-nmda" (see Section 4).
+---x edit-data
+---w input
+---w datastore? ds:datastore-ref
+---w default-operation? enumeration
+---w (edit-content)
+--:(config)
| +---w config? <anydata>
+--:(url)
+---w url? inet:uri {nc:url}?
The "datastore" parameter is a datastore identity that indicates the The "datastore" parameter is a datastore identity that indicates the
desired target datastore where changes should be made. desired target datastore where changes should be made.
The "edit-content" parameter from "edit-config" it is modified to The "default-operation" parameter is a copy of the
allow use "type anydata" for configuration content, rather than the "default-operation" parameter of the <edit-config> operation.
"edit-config"'s use of "type anyxml".
The "default-operation" parameter mirrors the parameter of the The "edit-content" choice mirrors the "edit-content" choice of the
<edit-config> operation. <edit-config> operation. Note, however, that the "config" element in
the "edit-content" choice of <edit-data> uses "anydata" (introduced
in YANG 1.1) while the "config" element in the "edit-content" choice
of <edit-config> used "anyxml".
2.2. Augmentations to the Base NETCONF Model The <edit-data> operation does not support the "error-option" and the
"test-option" parameters that were part of the <edit-config>
operation.
Several of the operations defined in the base NETCONF data model 3.2. Augmentations to NETCONF Operations
(ietf-netconf@2011-06-01.yang) will continue to be used under the
NMDA. The <lock>, <unlock>, and <validate> operations are augmented
with a new "datastore" leaf can indicate a desired NMDA datastore.
Only writable datastores can be locked. Several of the operations defined in the base NETCONF YANG module
"ietf-netconf" [RFC6241] may be used with new datastores. Hence, the
<lock>, <unlock>, and <validate> operations are augmented with a new
"datastore" leaf that can select the desired datastore. If a <lock>,
<unlock>, or <validate> operation is not supported on a particular
datastore then an error is returned, as specified in
"ietf-netconf-nmda" (see Section 4).
2.3. RPCs and Actions 4. NETCONF Datastores YANG Module
RPC operations and actions can be defined in YANG modules. The This module imports definitions from [RFC6991], [RFC6241], [RFC6243],
evaluation context for constraints and references in RPC operations and [I-D.ietf-netmod-revised-datastores].
and actions is <operational>, as specified in the NMDA.
2.4. YANG Library Capability RFC Ed.: update the date below with the date of RFC publication and
remove this note.
RFC Ed.: Update 201X-XX-XX below with correct date. <CODE BEGINS> file "ietf-netconf-nmda@2018-01-17.yang"
Support for NMDA requires the server to implement at least revision module ietf-netconf-nmda {
201X-XX-XX of the "ietf-yang-library" module defined in yang-version 1.1;
[I-D.nmdsdt-netconf-rfc7895bis]. The server MUST advertise the namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-nmda";
following capability in the <hello> message (line breaks and prefix ncds;
whitespaces are used for formatting reasons only):
urn:ietf:params:netconf:capability:yang-library:1.1? import ietf-yang-types {
revision=<date>&checksum=<checksum-value> prefix yang;
}
import ietf-inet-types {
prefix inet;
}
import ietf-datastores {
prefix ds;
}
import ietf-origin {
prefix or;
}
import ietf-netconf {
prefix nc;
}
import ietf-netconf-with-defaults {
prefix ncwd;
}
The parameter "revision" has the same value as the revision date of organization
the "ietf-yang-library" module implemented by the server. This "IETF NETCONF Working Group";
parameter MUST be present. contact
"WG Web: <https://datatracker.ietf.org/wg/netconf/>
The parameter "checksum" has the same value as the leaf WG List: <mailto:netconf@ietf.org>
"/yang-library/checksum" from "ietf-yang-library". This parameter
MUST be present.
With this mechanism, a client can cache the supported modules for a Author: Martin Bjorklund
server and only update the cache if the "checksum" value in the <mailto:mbj@tail-f.com>
<hello> message changes.
This document updates [RFC7950], section 5.6.4, to allow servers to Author: Juergen Schoenwaelder
advertise the capability :yang-library:1.1 instead of :yang- <mailto:j.schoenwaelder@jacobs-university.de>
library:1.0, and to implement the subtree "/yang-library"
[I-D.nmdsdt-netconf-rfc7895bis] instead of "/modules-state".
3. YANG Model Author: Phil Shafer
<mailto:phil@juniper.net>
<CODE BEGINS> file "ietf-netconf-datastores@2017-08-24.yang" Author: Kent Watsen
<mailto:kwatsen@juniper.net>
module ietf-netconf-datastores { Author: Rob Wilton
yang-version 1.1; <rwilton@cisco.com>";
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-datastores"; description
prefix ncds; "This YANG module defines a set of NETCONF operations to support
the Network Management Datastore Architecture (NMDA).
import ietf-yang-types { Copyright (c) 2018 IETF Trust and the persons identified as
prefix yang; authors of the code. All rights reserved.
}
import ietf-inet-types {
prefix inet;
}
import ietf-datastores {
prefix ds;
}
import ietf-origin {
prefix or;
}
import ietf-netconf {
prefix nc;
}
import ietf-netconf-with-defaults {
prefix ncwd;
}
organization Redistribution and use in source and binary forms, with or
"IETF NETCONF Working Group"; without modification, is permitted pursuant to, and subject to
contact the license terms contained in, the Simplified BSD License set
"WG Web: <https://datatracker.ietf.org/wg/netconf/> forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
WG List: <mailto:netconf@ietf.org> This version of this YANG module is part of RFC XXXX
(http://www.rfc-editor.org/info/rfcxxxx); see the RFC itself
for full legal notices.";
Author: Martin Bjorklund revision 2018-01-17 {
<mailto:mbj@tail-f.com> description
"Initial revision.";
reference
"RFC XXXX: NETCONF Extensions to Support the Network Management
Datastore Architecture";
}
Author: Juergen Schoenwaelder feature origin {
<mailto:j.schoenwaelder@jacobs-university.de> description
"Indicates that the server supports the 'origin' annotation.";
reference
"RFC XXXX: Network Management Datastore Architecture";
}
Author: Phil Shafer rpc get-data {
<mailto:phil@juniper.net> description
"Retrieve data from an NMDA datastore. The content returned
by get-data must satisfy all filters, i.e., the filter
criteria are logically ANDed.
Author: Kent Watsen The 'with-origin' parameter is only valid for an operational
<mailto:kwatsen@juniper.net> datastore. If 'with-origin' is used with an invalid datastore,
then the server MUST return an <rpc-error> element with an
<error-tag> value of 'invalid-value'.
Author: Rob Wilton The 'with-defaults' parameter does not apply to operational
<rwilton@cisco.com>"; datastores. If the 'with-defaults' parameter is present in a
description request to an operational datastore, then the server MUST
"This YANG module defines a set of NETCONF operations for the return an <rpc-error> element with an <error-tag> value of
Network Management Datastore Architecture (NMDA). 'invalid-value'.";
input {
leaf datastore {
type ds:datastore-ref;
mandatory true;
description
"Datastore from which to retrieve data.";
}
Copyright (c) 2017 IETF Trust and the persons identified as choice filter-spec {
authors of the code. All rights reserved. description
"The content filter specification for this request.";
Redistribution and use in source and binary forms, with or anydata subtree-filter {
without modification, is permitted pursuant to, and subject to description
the license terms contained in, the Simplified BSD License set "This parameter identifies the portions of the
forth in Section 4.c of the IETF Trust's Legal Provisions target datastore to retrieve.";
Relating to IETF Documents reference
(http://trustee.ietf.org/license-info). "RFC 6241: Network Configuration Protocol, Section 6.";
}
leaf xpath-filter {
if-feature nc:xpath;
type yang:xpath1.0;
description
"This parameter contains an XPath expression identifying
the portions of the target datastore to retrieve.
This version of this YANG module is part of RFC XXXX If the expression returns a node-set, all nodes in the
(http://www.rfc-editor.org/info/rfcxxxx); see the RFC itself node-set are selected by the filter. Otherwise, if the
for full legal notices."; expression does not return a node-set, then the get-data
operation fails.
revision 2017-08-24 { The expression is evaluated in the following XPath
description context:
"Initial revision.";
reference "RFC XXXX: NETCONF Support for NMDA";
}
feature origin { o The set of namespace declarations are those in
description scope on the 'xpath-filter' leaf element.
"Indicates that the server supports the 'origin' annotation.";
reference "RFC XXXX: Network Management Datastore Architecture";
}
typedef datastore { o The set of variable bindings is empty.
type identityref {
base ds:datastore;
}
description
"An NMDA datastore.";
reference "RFC XXXX: Network Management Datastore Architecture";
}
rpc get-data { o The function library is the core function library,
description and the XPath functions defined in section 10 in
"Retrieve data from an NMDA datastore."; RFC 7950.
input {
leaf datastore {
type ncds:datastore;
mandatory true;
description
"Datastore from which to retrieve data.";
}
choice filter-spec { o The context node is the root node of the target
description datastore.";
"The content filter specification for this request."; }
}
anydata subtree-filter { leaf config-filter {
description type boolean;
"This parameter identifies the portions of the description
target datastore to retrieve."; "Filter for nodes with the given value for their
reference "RFC 6241, Section 6."; 'config' property.";
} }
leaf xpath-filter { leaf origin-filter {
if-feature nc:xpath; when 'derived-from-or-self(../datastore, "or:operational")';
type yang:xpath1.0; if-feature origin;
description type identityref {
"This parameter contains an XPath expression base or:origin;
identifying the portions of the target }
datastore to retrieve."; description
} "Filter based on 'origin' annotation. A node matches the
} filter if its 'origin' annotation is derived from or
equal to the given filter value.";
}
container where { leaf max-depth {
description type union {
"Filter content with the specified criteria. All given type uint16 {
criteria are logically AND:ed."; range "1..65535";
}
type enumeration {
enum "unbounded";
}
}
default "unbounded";
description
"For each node selected by the filter, this parameter
selects how many conceptual sub-tree levels should be
returned in the reply. If the depth is 1, the reply
includes just the selected nodes but no children. If the
depth is 'unbounded', all descendant nodes are included.";
}
leaf config { leaf with-origin {
type boolean; when 'derived-from-or-self(../datastore, "or:operational")';
description if-feature origin;
"Filter for nodes with the given value for their type empty;
'config' property."; description
} "If this parameter is present, the server will return
leaf origin { the 'origin' annotation for the nodes that has one.";
if-feature origin; }
type identityref {
base or:origin;
}
description
"Filter based on 'origin' annotation. A node matches the
filter if its 'origin' annotation is derived from or
equal to the given filter value.";
}
}
leaf with-origin { uses ncwd:with-defaults-parameters;
when 'derived-from-or-self(../datastore, "or:operational")';
if-feature origin;
type empty;
description
"If this parameter is present, the server will return
the 'origin' annotation for the nodes that has one.";
}
uses ncwd:with-defaults-parameters; }
}
output { output {
anydata data { anydata data {
description description
"Copy of the source datastore subset which matched "Copy of the source datastore subset which matched
the filter criteria (if any). An empty data the filter criteria (if any). An empty data
container indicates that the request did not container indicates that the request did not
produce any results."; produce any results.";
} }
} }
} }
rpc edit-data { rpc edit-data {
description description
"Edit data in an NMDA datastore."; "Edit data in an NMDA datastore.";
input { input {
leaf datastore { leaf datastore {
type ncds:datastore; type ds:datastore-ref;
description description
"Datastore which data affects."; "Datastore which is the target of the edit-data operation.
}
leaf default-operation {
type enumeration {
enum "merge" {
description
"The default operation is merge.";
}
enum "replace" {
description
"The default operation is replace.";
}
enum "none" {
description
"There is no default operation.";
}
}
default "merge";
description
"The default operation to use.";
} If the target datastore is not writable, then the server
choice edit-content { MUST return an <rpc-error> element with an <error-tag>
mandatory true; value of 'invalid-value'";
description }
"The content for the edit operation."; leaf default-operation {
type enumeration {
enum "merge" {
description
"The default operation is merge.";
}
enum "replace" {
description
"The default operation is replace.";
}
enum "none" {
description
"There is no default operation.";
}
}
default "merge";
description
"The default operation to use.";
}
choice edit-content {
mandatory true;
description
"The content for the edit operation.";
anydata config { anydata config {
description description
"Inline Config content."; "Inline config content.";
} }
leaf url { leaf url {
if-feature nc:url; if-feature nc:url;
type inet:uri; type inet:uri;
description description
"URL based config content."; "URL based config content.";
} }
} }
} }
} }
/* /*
* Augment the lock and unlock operations with a * Augment the lock and unlock operations with a
* "datastore" parameter. * "datastore" parameter.
*/ */
augment "/nc:lock/nc:input/nc:target/nc:config-target" { augment "/nc:lock/nc:input/nc:target/nc:config-target" {
description description
"Add NMDA Datastore as target."; "Add NMDA Datastore as target.";
leaf datastore { leaf datastore {
type ncds:datastore; type ds:datastore-ref;
description description
"Datastore to lock."; "Datastore to lock.
}
}
augment "/nc:unlock/nc:input/nc:target/nc:config-target" {
description
"Add NMDA Datastore as target.";
leaf datastore {
type ncds:datastore;
description
"Datastore to unlock.";
}
}
/* If the lock operation is not supported by the server on the
* Augment the validate operation with a specified target datastore, then the server MUST return an
* "datastore" parameter. <rpc-error> element with an <error-tag> value of
*/ 'invalid-value'";
}
}
augment "/nc:unlock/nc:input/nc:target/nc:config-target" {
description
"Add NMDA Datastore as target.";
augment "/nc:validate/nc:input/nc:source/nc:config-source" { leaf datastore {
description type ds:datastore-ref;
"Add NMDA Datastore as source."; description
leaf datastore { "Datastore to unlock.
type ncds:datastore;
description If the unlock operation is not supported by the server on the
"Datastore to validate."; specified target datastore, then the server MUST return an
} <rpc-error> element with an <error-tag> value of
} 'invalid-value'";
} }
}
/*
* Augment the validate operation with a
* "datastore" parameter.
*/
augment "/nc:validate/nc:input/nc:source/nc:config-source" {
description
"Add NMDA Datastore as source.";
leaf datastore {
type ds:datastore-ref;
description
"Datastore to validate.
If the validate operation is not supported by the server on
the specified target datastore, then the server MUST return
an <rpc-error> element with an <error-tag> value of
'invalid-value'";
}
}
}
<CODE ENDS> <CODE ENDS>
4. IANA Considerations 5. IANA Considerations
This document registers one capability identifier URN from the This document registers two capability identifier URNs in the
"Network Configuration Protocol (NETCONF) Capability URNs" registry: "Network Configuration Protocol (NETCONF) Capability URNs" registry:
Index Capability Identifier Index Capability Identifier
------------- --------------------------------------------------- ------------- ---------------------------------------------------
:yang-library urn:ietf:params:netconf:capability:yang-library:1.1 :yang-library urn:ietf:params:netconf:capability:yang-library:1.1
:with-origin urn:ietf:params:netconf:capability:with-origin:1.0
This document registers a URI in the "IETF XML Registry" [RFC3688]. This document registers a URI in the "IETF XML Registry" [RFC3688].
Following the format in RFC 3688, the following registration has been Following the format in RFC 3688, the following registration has been
made. made.
URI: urn:ietf:params:xml:ns:yang:ietf-netconf-datastores URI: urn:ietf:params:xml:ns:yang:ietf-netconf-nmda
Registrant Contact: The IESG. Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
This document registers a YANG module in the "YANG Module Names" This document registers a YANG module in the "YANG Module Names"
registry [RFC6020]. registry [RFC6020].
name: ietf-netconf-datastores name: ietf-netconf-nmda
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-datastores namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-nmda
prefix: ncds prefix: ncds
reference: RFC XXXX reference: RFC XXXX
5. Security Considerations 6. Security Considerations
This document has no security considerations. The YANG module defined in this document extends the base operations
of the NETCONF [RFC6241] protocol. The lowest NETCONF layer is the
secure transport layer and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242].
6. Informative References The network configuration access control model
[I-D.ietf-netconf-rfc6536bis] provides the means to restrict access
for particular NETCONF users to a preconfigured subset of all
available NETCONF protocol operations and content.
The security considerations for the base NETCONF protocol operations
(see Section 9 of [RFC6241]) apply to the new NETCONF <get-data> and
<edit-data> operations defined in this document.
7. References
7.1. Normative References
[I-D.ietf-netconf-rfc6536bis]
Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Module", draft-ietf-netconf-rfc6536bis-09
(work in progress), December 2017.
[I-D.ietf-netconf-rfc7895bis]
Bierman, A., Bjorklund, M., and K. Watsen, "YANG Library",
draft-ietf-netconf-rfc7895bis-02 (work in progress),
October 2017.
[I-D.ietf-netmod-revised-datastores] [I-D.ietf-netmod-revised-datastores]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore and R. Wilton, "Network Management Datastore
Architecture", draft-ietf-netmod-revised-datastores-05 Architecture", draft-ietf-netmod-revised-datastores-10
(work in progress), October 2017. (work in progress), January 2018.
[I-D.nmdsdt-netconf-rfc7895bis]
Bierman, A., Bjorklund, M., and K. Watsen, "YANG Library",
draft-nmdsdt-netconf-rfc7895bis-01 (work in progress),
July 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
DOI 10.17487/RFC2119, March 1997, <https://www.rfc- RFC2119, March 1997, <https://www.rfc-editor.org/info/
editor.org/info/rfc2119>. rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, <https://www.rfc-
editor.org/info/rfc3688>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, <https://www.rfc-
editor.org/info/rfc6020>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<https://www.rfc-editor.org/info/rfc6242>.
[RFC6243] Bierman, A. and B. Lengyel, "With-defaults Capability for [RFC6243] Bierman, A. and B. Lengyel, "With-defaults Capability for
NETCONF", RFC 6243, DOI 10.17487/RFC6243, June 2011, NETCONF", RFC 6243, DOI 10.17487/RFC6243, June 2011,
<https://www.rfc-editor.org/info/rfc6243>. <https://www.rfc-editor.org/info/rfc6243>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC
6991, DOI 10.17487/RFC6991, July 2013, <https://www.rfc-
editor.org/info/rfc6991>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
7.2. Informative References
[I-D.ietf-netmod-yang-tree-diagrams]
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft-
ietf-netmod-yang-tree-diagrams-04 (work in progress),
December 2017.
Authors' Addresses Authors' Addresses
Martin Bjorklund Martin Bjorklund
Tail-f Systems Tail-f Systems
Email: mbj@tail-f.com Email: mbj@tail-f.com
Juergen Schoenwaelder Juergen Schoenwaelder
Jacobs University Jacobs University
 End of changes. 93 change blocks. 
360 lines changed or deleted 528 lines changed or added

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