NETCONF Working Group | Z. Wang |
Internet-Draft | Q. Wu |
Intended status: Standards Track | W. Song |
Expires: September 4, 2020 | Huawei |
L. Geng | |
P. Liu | |
China Mobile | |
March 3, 2020 |
Adaptive Subscription to YANG Notification
draft-wang-netconf-adaptive-subscription-00
This document defines a YANG data model and associated mechanism enabling subscriber's adaptive subscriptions to a publisher's event streams. Applying these elements allows a subscriber to automatically adjust the volume of telemetry traffic sent from publisher to the receivers.
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 September 4, 2020.
Copyright (c) 2020 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.
YANG-Push subscriptions [RFC8641] allow client applications to subscribe to continuous datastore updates without needing to poll. It defines a mechanism (i.e.,update trigger) to determine when an update record needs to be generated. Two type of subscriptions are introduced in [RFC8641], distinguished by how updates are triggered: periodic and on-change.
However in some cases (e.g., wireless channel contention and interference causes the WLAN throughput and per-packet delays to vary over time), both collectors and publishers are configured with multiple periodic intervals and the subscribed data set can be streamed out to the destination at adaptive sampling or export rate, e.g., when wireless signal strength drops below a certain threshold, more data should be collected at high frequency.
This document defines a YANG data model and associated mechanism enabling subscriber's adaptive subscriptions to a publisher's event streams. Applying these elements allows a subscriber to automatically adjust the volume of telemetry traffic sent from publisher to the receivers.
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.
This document uses the following terms:
The YANG data model for the "Adaptive Subscription to YANG Notification" augments the "update-trigger" in the YANG Push model to add a "adaptive-period" case. Under the "adaptive-period" case, a "adaptive-period" list is defined. The "adaptive-period" list uses the key "id" for indexing. Within the "adaptive-period" list, an "interval" leaf and the corresponding trigger conditions are defined. When the trigger condition is satisfied, e.g., "op-field" exceeds the "op-value" and the change of "op-field" is monotonically increasing, the update interval will be changed into the value of "interval" leaf and the objects being filtered will be exported every interval specified by the value of "interval" leaf. The "anchor-time" is used to indciate at which points in time periodic updates need to be assembled and sent.
The following tree diagrams [RFC8340] provide an overview of the data model for "ietf-adaptive-subscription.yang" module.
module: ietf-adaptive-subscription augment /sn:subscriptions/sn:subscription/yp:update-trigger: +--:(adaptive-subscription) +--rw adaptive-subsciptions +--rw adaptive-period* [id] | +--rw id string | +--rw op-field? yang:xpath1.0 | +--rw op-value? string | +--rw operator? operator | +--rw interval centiseconds | +--rw anchor-time yang:date-time
<CODE BEGINS> file "ietf-adaptive-subscription@2020-02-14.yang" module ietf-adaptive-subscription { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription"; prefix as; import ietf-subscribed-notifications { prefix sn; } import ietf-yang-push { prefix yp; } import ietf-yang-types { prefix yang; } organization "IETF NETCONF (Network Configuration) Working Group"; contact ""; description "NETCONF Protocol Data Types and Protocol Operations. Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC xxxx; see the RFC itself for full legal notices."; revision 2019-12-15 { description "Initial revision"; reference "RFCxxx Adaptive subscription to YANG notification."; } typedef centiseconds { type uint32; description "A period of time, measured in units of 0.01 seconds."; } typedef operator { type enumeration { enum unequal { description "Indicates that the comparision type is unequal to."; } enum equal { description "Indicates that the comparision type is equal to."; } enum less { description "Indicates that the comparision type is less than."; } enum less-or-equal { description "Indicates that the comparision type is less than or equal to."; } enum greater { description "Indicates that the comparision type is greater than."; } enum greater-or-equal { description "Indicates that the comparision type is greater than or equal to."; } } description "definition of the operator"; } augment "/sn:subscriptions/sn:subscription/yp:update-trigger" { description "This augmentation adds additional subscription parameters that apply specifically to adaptive subscription."; case adaptive-period { container adaptive-periods { list adaptive-period { key "id"; leaf id { type string; description "identifier"; } leaf op-field { type yang:xpath1.0; description "targeted objects"; } leaf op-value { type string; description "Compartion value which is static threshold value."; } leaf operator { type operator; description "Comparison type."; } leaf interval { type centiseconds; mandatory true; description "Duration of time that should occur between periodic push updates, in units of 0.01 seconds."; } leaf anchor-time { type yang:date-and-time; description "Designates a timestamp before or after which a series of periodic push updates are determined. The next update will take place at a point in time that is a multiple of a period from the 'anchor-time'. If an anchor-time is not provided, then the anchor-time MUST be set with the creation time of the initial update record. "; } description "List for adaptive periods"; } description "Container for adaptive periods."; } } } } <CODE ENDS>
This document registers two URIs in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the following registrations are requested to be made:
--------------------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. ---------------------------------------------------------------------
This document registers two YANG modules in the YANG Module Names registry [RFC7950]. . Following the format in [RFC6020], the following registration has been made:
--------------------------------------------------------------------- Name: ietf-adaptive-subscription Namespace: urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription Prefix: as Reference: RFC xxxx ---------------------------------------------------------------------
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 NETCONF 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.
There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability:
[RFC3688] | Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004. |
[RFC6020] | Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010. |
[RFC8340] | Bjorklund, M. and L. Berger, "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018. |
The example YANG module used in this document represents performance data telemetry on a simple optical device. The collector can control the rate of telemtry data to be streamed to the destination by switching to different time interval for the update to be sent.
module example-opticalbox-telemetry { namespace "tag:ietf:example:opticalbox"; prefix "optibox"; container opticalstat { leaf transmit-power { description "Transmit optical power reading"; type int; config false; } leaf receiving-power { description " Receiving optical power reading"; type int; config false; } leaf power-threhold { description "Optical Power Threshold"; type int; } leaf high-voltage { description "High voltage threshold"; type int; } leaf low-voltage { description "Low voltage threshold"; type int; } leaf voltage { description "current voltage reading"; type int; config false; } leaf current-temperature { description "Current temperature reading"; type int; config false; } leaf cup-usage { type uint32; config false; } } }
YANG tree diagram for the "example-opticalbox-telemetry" module:
The adaptive subscription model can be used to keep track of performance data change such as temperature, voltage, power,cup usage. In addition, it can adjust update period based on performance data change, e.g., when the current receiving power is higher than the pre-configured threshold, the notification for the optical performance data from publisher can be sent at a low frequency. When the current receiving power is lower than the pre-configured threshold, the notification for the optical performance data can be sent at a high frequency.
<netconf:rpc message-id="101" xmlns:netconf="urn:ietf:params:xml:ns:netconf:base: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"> <yp:datastore xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> ds:operational </yp:datastore> <yp:datastore-xpath-filter xmlns:ex="https://example.com/sample-data/1.0"> /ex:foo </yp:datastore-xpath-filter> <as:adaptive-periods> <as:adaptive-period> <as:id>01</as:id> <as:op-field>/opticalstat/current-voltage</as:op-field> <as:op-value>60</as:op-value> <as:operator>greater</as:operator> <as:period>500</as:period> </as:adaptive-period> <as:adaptive-period> <as:id>02</as:id> <as:op-field>/opticalstat/current-voltage</as:op-field> <as:op-value>60</as:op-value> <as:operator>less-or-equal</as:operator> <as:period>100</as:period> </as:adaptive-period> </yp:adaptive-periods> </establish-subscription> </netconf:rpc>
In another example, when the time interval for update to be sent is set to 5 seconds and specific performance data,e.g., 5 receiving power values (0.48dB、0.57dB、0.61dB、0.69dB、0.70dB) can be sampled per second and collected during this time interval changes. When power changes exceed the preconfigured threhold (e.g.,0.20dB), all these 5 receiving power values falling within detection time window or update time interval should be published to the destinations for data analysis.