Internet DRAFT - draft-ranade-netmod-yang-push-extension
draft-ranade-netmod-yang-push-extension
NETMOD Working Group R. Ranade
Internet-Draft Huawei
Intended status: Standards Track Feb 05, 2019
Expires: August 9, 2019
Extensions to Yang Push
draft-ranade-netmod-yang-push-extension-02
Abstract
This document defines extensions to the yang push subscription
mechanism, which can provide more granularity in tracking
configuration changes in datastores.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 9, 2019.
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Ranade Expires August 9, 2019 [Page 1]
Internet-Draft Extensions to Yang Push Feb 2019
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2
2. Yang Push Subscription Extensions . . . . . . . . . . . . . . 3
2.1. Config Filter . . . . . . . . . . . . . . . . . . . . . . 3
2.2. Origin Metadata Attribute . . . . . . . . . . . . . . . . 3
3. Examples of usage . . . . . . . . . . . . . . . . . . . . . . 3
4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
7.1. Normative References . . . . . . . . . . . . . . . . . . 9
7.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10
1. Introduction
The subscription mechanism defined in yang-push draft
[I-D.ietf-netconf-yang-push] supports a subscription mechanism where
datastore and its datanodes can be provided as targets. However
there are a few scenarios where a subscription to datanodes may not
be sufficient.
o An application on the client, may want to track the configuration
changes in a particular module. If a module contains "config
true" mixed with "config false" nodes, setting up a filter which
targets only "config true" nodes at multiple levels will be
cumbersome.
o An application on the client, may want to track the origin of the
recently applied configuration. Yang-push subscription currently
does not provide such control.
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
The following terms are defined in [RFC8342] and are not redefined
here:
o operational state datastore
o intended configuration datastore
Ranade Expires August 9, 2019 [Page 2]
Internet-Draft Extensions to Yang Push Feb 2019
2. Yang Push Subscription Extensions
There are two new filter nodes added to the Yang push subscription
mechanism. They are listed below.
o config-filter
o with-origin
2.1. Config Filter
This is a filter for nodes with the given value for their 'config'
property. When this leaf is set to 'true', only 'config true' nodes
are selected and, when set to 'false', only 'config false' nodes are
selected. If this leaf is not present, this filter is not applied.
2.2. Origin Metadata Attribute
This document defines the "with-origin" parameter, which if present,
requests that the server includes "origin" metadata annotations as
defined in [RFC8342] in notifications which are part of this
subscription. This parameter is only valid for the operational state
datastore and any datastores with identities derived from the
"operational" identity. Otherwise, if an invalid datastore is
specified then a suitable error is returned.
Data in the operational state datastore can come from multiple
sources. The server should return the most accurate value for the
"origin" metadata annotation as possible, indicating the source of
the operational value, as specified in Section 5.3.4 of RFC8342 [1]
When encoding the origin metadata annotation for a hierarchy of
returned nodes, the annotation may be omitted for a child node when
the value matches that of the parent node, as described in the "ietf-
origin" YANG module [RFC8342].
The "with-origin" parameter is optional to support. It is identified
with the feature "origin".
3. Examples of usage
In this example, the following fictional module is used:
Ranade Expires August 9, 2019 [Page 3]
Internet-Draft Extensions to Yang Push Feb 2019
module example-interface {
yang-version 1.1;
namespace urn:example:interface;
prefix int;
import ietf-inet-types {
prefix inet;
}
container interface {
leaf name{
type string;
}
leaf speed{
type string;
config false;
}
}
}
A subscription on the "config true" nodes of the operational state
datastore. This subscription also requests to get the origin of the
datanodes as part of Yang-push notifications. This is considering
that the NETCONF protocol was used for this subscription.
<rpc xmlns="urn:ietf:params:xml:ns:netconf:1.0">
<establish-subscription \
xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"\
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push" \
xmlns:ypext="urn:ietf:params:xml:ns:yang:ietf-yang-push-ext">
<yp:datastore>operational</yp:datastore>
<ypext:config-filter>true</ypext:config-filter>
<ypext:with-origin/>
</establish-subscription>
</rpc>
The operator has configured an interface ("eth1"), the system has
recognised an interface ("eth0") which was plugged in recently. The
below NETCONF notification is an example for a yang-push notification
when the device applies the "eth0" configuration.
Ranade Expires August 9, 2019 [Page 4]
Internet-Draft Extensions to Yang Push Feb 2019
<notification \
xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2019-01-25T08:00:11.22Z</eventTime>
<push-change-update
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push" \
xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin" >
<id>10</id>
<datastore-changes>
<yang-patch>
<patch-id>1</patch-id>
<edit>
<edit-id>edit1</edit-id>
<operation>create</operation>
<target>/example-interface:interface</target>
<value>
<interface xmlns="urn:example:interface" \
or:origin="or:system">
<name>eth0</name>
</interface>
</value>
</edit>
</yang-patch>
</push-change-update>
</notification>
4. YANG Module
<CODE BEGINS> file "ietf-yang-push-ext@2019-02-01.yang"
module ietf-yang-push-ext {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-push-ext";
prefix ypext;
import ietf-subscribed-notifications {
prefix sn;
}
import ietf-yang-push {
prefix yp;
}
import ietf-datastores {
prefix ds;
reference "RFC 8342: Network Management Datastore Architecture.";
}
organization
"IETF NETMOD (Network Modeling) Working Group";
Ranade Expires August 9, 2019 [Page 5]
Internet-Draft Extensions to Yang Push Feb 2019
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net>
Editor: Rohit Ranade
<mailto:rohitrranade@huawei.com>";
description
"This module defines extensions to subscription mechanism
to yang-push on operational state datastore.
Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (https://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX
(https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
revision 2019-02-01 {
description
"Initial revision.";
reference "RFCXXXX";
}
feature origin {
description
"Indicates that the server supports the 'origin' annotation.";
reference
"RFC 8342: Network Management Datastore Architecture";
}
grouping subscription-filter-extension{
description
"This grouping describes the extensions to subscription
Ranade Expires August 9, 2019 [Page 6]
Internet-Draft Extensions to Yang Push Feb 2019
conditions.";
leaf config-filter {
type boolean;
description
"Filter for nodes with the given value for their 'config'
property. When this leaf is set to 'true', only 'config
true' nodes are selected and, when set to 'false', only
'config false' nodes are selected. If this leaf is not
present, this filter is not applied.";
}
leaf with-origin {
when 'derived-from-or-self(../yp:datastore, "ds: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.";
}
}
augment "/sn:establish-subscription/sn:input/sn:target"
+ "/yp:datastore" {
description
"This augmentation adds the filter extensions for the
subscription to RPC input.";
uses subscription-filter-extension;
}
augment "/sn:modify-subscription/sn:input/sn:target"
+ "/yp:datastore" {
description
"This augmentation adds the filter extensions for the
subscription to RPC input.";
uses subscription-filter-extension;
}
augment "/sn:subscriptions/sn:subscription/sn:target"
+ "/yp:datastore" {
description
"This augmentation adds the filter extensions to
selection filtering criteria.";
uses subscription-filter-extension;
}
}
<CODE ENDS>
Ranade Expires August 9, 2019 [Page 7]
Internet-Draft Extensions to Yang Push Feb 2019
5. IANA Considerations
This document registers one URI in the IETF XML Registry [RFC3688].
The following registration has been made:
URI: urn:ietf:params:xml:ns:yang:ietf-yang-push-ext
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
This document registers one YANG module in the YANG Module Names
Registry [RFC6020]. The following registration has been made:
name: ietf-yang-push-ext
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-push-ext
prefix: ypext
RFC: xxxx
6. Security Considerations
The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC8446].
The Network Configuration Access Control Model (NACM) [RFC8341]
provides the means to restrict access for particular NETCONF or
RESTCONF users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content.
The origin metadata annotation exposes the origin of values in the
applied configuration. Origin information may provide hints that
certain control-plane protocols are active on a device. Since origin
information is tied to applied configuration values, it is only
accessible to clients that have the permissions to read the applied
configuration values. Security administrators should consider the
sensitivity of origin information while defining access control
rules.
Ranade Expires August 9, 2019 [Page 8]
Internet-Draft Extensions to Yang Push Feb 2019
7. References
7.1. Normative References
[I-D.ietf-netconf-yang-push]
Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen-
Nygaard, E., Bierman, A., and B. Lengyel, "Subscription to
YANG Datastores", draft-ietf-netconf-yang-push-21 (work in
progress), January 2019.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/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>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<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>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>.
Ranade Expires August 9, 2019 [Page 9]
Internet-Draft Extensions to Yang Push Feb 2019
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
7.2. URIs
[1] https://tools.ietf.org/html/rfc8342#section-5.3.4
Author's Address
Rohit R Ranade
Huawei
Divyashree Techno Park, Whitefield
Bangalore, Karnataka 560066
India
Email: rohitrranade@huawei.com
Ranade Expires August 9, 2019 [Page 10]