Internet-Draft | Adaptive Subscription | May 2023 |
Wu, et al. | Expires 1 December 2023 | [Page] |
This document defines a YANG data model and associated mechanism that enable adaptive subscription to a publisher's event streams. The periodic update interval for the event streams can be set adaptively. Applying these elements allows servers to automatically adjust the rate and volume of telemetry traffic sent from a publisher to 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 1 December 2023.¶
Copyright (c) 2023 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
YANG-Push subscriptions [RFC8641] allow subscriber applications to request a continuous customized stream of updates from a YANG datastore without needing to poll. It defines a mechanism (i.e., update trigger) to determine when an update record needs to be generated. Two types of subscription are introduced in [RFC8641], distinguished by how updates are triggered: periodic and on-change.¶
However, in some large-scale deployments (e.g., massive data collection for wireless network performance monitoring) where an increased data collection rate is used, it becomes more likely that both clients and servers could be temporarily overwhelmed with a burst of streamed data, and that network resources (e.g., bandwidth resource, radio resource) and computation resource could be excessively consumed. Therefore, it may be hard to continuously monitor operational data, especially values that fall outside normal operational ranges. Conversely, if the rate at which we collect a stream of data is set too low or chosen so that low priority telemetry data are dropped, these telemetry data will not be sufficient to detect and diagnose problems and to verify correct network behavior.¶
A client might choose to monitor the operational state and send a request to modify the data collection rate on the server. But how often the client evaluates if the modification of the data collection rate is required highly depends on the current collection rate: collecting a stream of data at a low rate prevents the subscriber from capturing sufficient data for timely decision-making, which may result in service discontinuity. In addition, when tens of thousands of network devices need to be managed, frequent follow-up modification requests are prone to errors.¶
There is a need for a service to balance between data management cost and real-time streaming telemetry. To achieve this, servers can be configured with multiple different period intervals and corresponding subscription update policies which allow servers/publishers to automatically switch to different period intervals according to the network condition changes without the interaction with the client for policy update instructions. E.g., when the wireless signal strength falls below a configured threshold, the subscribed data can be streamed at a higher rate to capture potentially important data and events (e.g., continuous service degeneration); while when the wireless signal strength crosses a configured threshold, the subscribed data can be streamed at a lower rate.¶
This document defines a YANG data model and associated mechanism that enable adaptive subscription to a publisher's event streams. The periodic update interval for the event streams can be set adaptively. Applying these elements allows servers to automatically adjust the rate and volume of telemetry traffic sent from a publisher to 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.¶
The following terms are defined in [RFC5277], [RFC7950], [RFC3198], [RFC8342], [RFC8639], [RFC8641] and are not redefined here:¶
This document defines the following term:¶
This document defines a YANG module "ietf-adapt-subscription", which augments the "update-trigger" choice defined in the "ietf-yang-push" module [RFC8641] with subscription configuration parameters that are specific to a subscriber's adaptive subscription.¶
In addition to subscription state notifications defined in [RFC8639] and notifications for subscribed content defined in [RFC8641], "ietf-adapt-subscription" YANG module also defines "adaptive-period-update" notification to report the update interval change.¶
The following tree diagrams [RFC8340] provide an overview of the data model for "ietf-adapt-subscription" module.¶
module: ietf-adapt-subscription augment /sn:subscriptions/sn:subscription/yp:update-trigger: +--:(adaptive-periodic) +--rw adaptive-periods +--rw adaptive-period* [name] +--rw name yang:yang-identifier +--rw xpath-external-eval yang:xpath1.0 +--rw period yp:centiseconds +--rw anchor-time? yang:date-and-time augment /sn:establish-subscription/sn:input/yp:update-trigger: +--:(adaptive-periodic) +-- adaptive-periods +-- adaptive-period* [name] +-- name yang:yang-identifier +-- xpath-external-eval yang:xpath1.0 +-- period yp:centiseconds +-- anchor-time? yang:date-and-time augment /sn:modify-subscription/sn:input/yp:update-trigger: +--:(adaptive-periodic) +-- adaptive-periods +-- adaptive-period* [name] +-- name yang:yang-identifier +-- xpath-external-eval yang:xpath1.0 +-- period yp:centiseconds +-- anchor-time? yang:date-and-time augment /sn:subscription-started/yp:update-trigger: +--:(adaptive-periodic) +-- adaptive-periods +-- adaptive-period* [name] +-- name yang:yang-identifier +-- xpath-external-eval yang:xpath1.0 +-- period yp:centiseconds +-- anchor-time? yang:date-and-time augment /sn:subscription-modified/yp:update-trigger: +--:(adaptive-periodic) +-- adaptive-periods +-- adaptive-period* [name] +-- name yang:yang-identifier +-- xpath-external-eval yang:xpath1.0 +-- period yp:centiseconds +-- anchor-time? yang:date-and-time notifications: +---n adaptive-period-update +--ro id? sn:subscription-id +--ro period yp:centiseconds +--ro period-update-time? yang:date-and-time +--ro datastore identityref +--ro (selection-filter)? +--:(by-reference) | +--ro selection-filter-ref selection-filter-ref +--:(within-subscription) +--ro (filter-spec)? +--:(datastore-subtree-filter) | +--ro datastore-subtree-filter? <anydata> {sn:subtree}? +--:(datastore-xpath-filter) +--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}?¶
For adaptive subscriptions, triggered updates will occur at the boundaries of specified time intervals when a trigger condition is satisfied. These boundaries can be calculated from the following adaptive periodic parameters:¶
an "xpath-external-eval" represents a standard XPath evaluation expression (See section 6.4 of [RFC7950]) that is applied against the targeted data object, which is used to trigger/control the update interval switching within the server. It follows the rules defined in section 3.4 of [XPATH1.0] and contains comparisons of the targeted datastore node with its value to the specific threshold in the XPath format. Different from selection filter defined in [RFC8641],¶
It is not always trivial for a subscriber to determine the threshold used in an XPath expression criterion. Sometimes the threshold needs to be adjusted during the lifecycle of an adaptive subscription, depending on historical fluctuation range and how fast the targeted data object changes, distribution characteristics of the targeted data object or even the generated volume of telemetry traffic.¶
How often the XPath expression criterion is evaluated to decide whether to switch to another period interval is up to the publisher's implementation. With minimal delay, the expression can be evaluated whenever changes to targeted data object occur, or at the end of each shortest streaming update period. To reduce the frequency of evaluation, the server can choose to check targeted object change at every multiple (e.g.,2 or 3) high-frequency streaming update periods.¶
The represented expression defined in "xpath-external-eval" is evaluated in the following XPath context:¶
For the cases where the "xpath-external-eval" parameter refers to multiple list instances, XPath abbreviated syntax can be used to identify a particular instance, e.g., to represent a comparison for a leaf in a list entry:¶
/if:interfaces/if:interface[if:name="eth0"]/if:in-errors>1000.¶
The server MUST convert the XPath expression defined in "xpath-external-eval" to a boolean value and internally apply the "boolean" function defined in Section 4.3 in [XPATH1.0] if the evaluated result is not a boolean value. Only if the Xpath expression is evaluated as "true", does the publisher switch to the corresponding period with which push updates are reported.¶
Note that the adaptive subscription need not be supported by every YANG datastore node. A publisher MAY decide to simply reject an adaptive subscription with "adaptive-unsupported" (defined in Section 2.2.1.1) if the scope of the subscription contains selected data nodes for which adaptive subscription is not supported.¶
The augmentation of YANG module "ietf-yang-push" made to RPCs specified in YANG module "ietf-subscribed-notifications" [RFC8639] is introduced. This augmentation concerns the "establish-subscription" RPC, which is augmented with parameters that are needed to specify a subscriber's adaptive subscriptions. These parameters are the same as the ones defined in Section 2.1.¶
As specified in [RFC8639] and [RFC8641], RPC error responses from the publisher are used to indicate a rejection of an RPC for any reason. This document introduces three new RPC errors for "establish-subscription" RPC.¶
establish-subscription ----------------------------- adaptive-unsupported xpath-evaluation-unsupported multi-xpath-criteria-conflict¶
adaptive-unsupported is used to indicate that the adaptive subscription is not supported for any objects that are selectable by the filter.¶
xpath-evaluation-unsupported is used to indicate that a server failed to parse syntax defined in "xpath-external-eval". The failure can be caused by either a syntax error or some XPath 1.0 syntax not supported against the specific object.¶
multi-xpath-criteria-conflict is used to indicate that the multiple Xpath evaluation criteria represented by "xpath-external-eval" are evaluated as conflicting, i.e., more than one condition expressions are evaluated to "true". However, the publisher should still push updates at the shortest streaming period among multiple corresponding period intervals if multiple Xpath evaluations conflict with each other during the lifecycle of an adaptive subscription.¶
For an example of how the above RPC errors can be returned, see the "xpath-evaluation-unsupported" error response illustrated in Appendix B.3.¶
Note that existing RPC errors defined in RFC 8639 and RFC 8641 are still supported by this document. For example, if any configured period for adaptive subscription is not supported by the publisher, a "period-unsupported" error response could be used.¶
The adaptive update notification is similar to subscription state change notifications defined in [RFC8639]. It is inserted into the sequence of notification messages sent to a particular receiver. As stated in RFC 8639, section 2.7, the adaptive update notification cannot be dropped or filtered out, it cannot be stored in replay buffers, and it is delivered only to impacted receivers of a subscription. The identification of the adaptive update notification is easy to separate from other notification messages through the use of the YANG extension "subscription-state-notif". This extension tags a notification as a subscription state change notification.¶
The objects in the 'adaptive-period-update' notification include:¶
YANG-Push subscriptions [RFC8641] specify selection filters to identify targeted YANG datastore nodes and/or datastore subtrees for which updates are to be pushed. In addition, it specifies update policies which contain conditions that trigger generation and pushing of new update records. To support a subscriber's adaptive subscription defined in this document, the trigger condition can also use similar selection filters to express a standard XPath Evaluation criterion (section 6.4 of [RFC7950]) against targeted data objects.¶
Similar to on-change subscriptions, adaptive subscriptions are particularly effective for data that changes infrequently, the following complex design choices need to be cautious, although these designs have already been well supported by the section 3.4 of [XPATH1.0]:¶
As described in section 6.4 of [RFC7950], Numbers in XPath 1.0 are IEEE 754 [IEEE754-2008] double-precision floating-point values; some values of int64, uint64, and decimal64 types cannot be exactly represented in XPath expressions.¶
If two objects to be compared are in different data types, a conversion function is needed to convert different data types into numbers.¶
If both objects in XPath Evaluation criteria to be compared are node-sets, more computation resources are required which add complexity.¶
To reduce these complexities, the following design principles are recommended:¶
If a server receives an XPath Evaluation criterion with some XPath syntax unsupported against the specific object, an RPC error with "xpath-evaluation-unsupported" MUST be returned.¶
This YANG module makes imports from [RFC8639], [RFC8641] and [I-D.ietf-netmod-rfc6991-bis].¶
<CODE BEGINS> file "ietf-adapt-subscription@2023-05-30.yang" module ietf-adapt-subscription { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-adapt-subscription"; prefix as; import ietf-subscribed-notifications { prefix sn; reference "RFC 8639: Subscription to YANG Notifications"; } import ietf-yang-push { prefix yp; reference "RFC 8641: Subscription to YANG Notifications for Datastore Updates"; } import ietf-yang-types { prefix yang; reference "RFC YYYY: Common YANG Data Types"; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: <http://tools.ietf.org/wg/netconf> WG List: <netconf@ietf.org> Editor: Qin Wu <mailto:bill.wu@huawei.com> Editor: Wei Song <mailto: songwei80@huawei.com> Editor: Peng Liu <mailto: liupengyjy@chinamobile.com> Editor: Qiufang Ma <mailto: maqiufang1@huawei.com> Editor: Wei Wang <mailto: wangw36@chinatelecom.cn> Editor: Zhixiong Niu <mailto: Zhixiong.Niu@microsoft.com>"; description "This module extends the YANG data module defined in YANG-push to enable the subscriber's adaptive subscriptions to a publisher's event streams with various different period intervals to report updates. Copyright (c) 2023 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 Revised 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). This version of this YANG module is part of RFC xxxx (https://www.rfc-editor.org/info/rfcxxxx); see the RFC itself for full legal notices. 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 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here."; revision 2023-05-30 { description "Initial revision"; reference "RFC xxxx: Adaptive Subscription to YANG Notification."; } identity adaptive-unsupported { base sn:establish-subscription-error; description "Adaptive-subscription is not supported for any objects that are selectable by the filter."; } identity xpath-evaluation-unsupported { base sn:establish-subscription-error; description "Unable to parse the xpath evaluation criteria defined in 'xpath-external-eval' because of a syntax error or some XPath 1.0 syntax not supported against the specific object."; } identity multi-xpath-criteria-conflict { base sn:establish-subscription-error; base sn:subscription-terminated-reason; description "Multiple Xpath evaluation criteria represented by 'xpath-external-eval' are evaluated as a conflict. I.e., more than one condition expression is evaluated to 'true'."; } grouping adaptive-subscription-modifiable { description "This grouping describes the datastore-specific adaptive subscription conditions that can be changed during the lifetime of the subscription."; container adaptive-periods { list adaptive-period { key "name"; description "An entry in this list represents an adaptive period which defines a push update interval and trigger conditions to switch to the update interval for sending an event record to the subscriber."; leaf name { type yang:yang-identifier; description "The name of adaptive period."; } leaf xpath-external-eval { type yang:xpath1.0; mandatory true; description "An XPath string, representing a logical expression, which can contain comparisons of datastore values and logical operations in the XPath format."; } leaf period { type yp: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 is determined. The next update will take place at a point in time that is a multiple of a period from the 'anchor-time'. For example, for an 'anchor-time' that is set for the top of a particular minute and a period interval of a minute, updates will be sent at the top of every minute that this subscription is active."; } } description "Container for adaptively periodic subscription."; } } augment "/sn:subscriptions/sn:subscription/yp:update-trigger" { description "This augmentation adds additional subscription parameters that apply specifically to adaptive subscription."; case adaptive-periodic { description "Defines adaptively periodic case for sending an event record to the subscriber."; uses adaptive-subscription-modifiable; } } augment "/sn:establish-subscription/sn:input/yp:update-trigger" { description "This augmentation adds additional establish-subscription parameters that apply specifically to datastore updates to RPC input."; case adaptive-periodic { description "Defines adaptively periodic case for sending an event record to the subscriber."; uses adaptive-subscription-modifiable; } } augment "/sn:modify-subscription/sn:input/yp:update-trigger" { description "This augmentation adds additional modify-subscription parameters that apply specifically to datastore updates to RPC input."; case adaptive-periodic { description "Defines adaptively periodic case for sending an event record to the subscriber."; uses adaptive-subscription-modifiable; } } augment "/sn:subscription-started/yp:update-trigger" { description "This augmentation adds additional adaptive subscription parameters to the notification that a subscription has started."; case adaptive-periodic { description "Defines adaptively periodic case for sending an event record to the subscriber."; uses adaptive-subscription-modifiable; } } augment "/sn:subscription-modified/yp:update-trigger" { description "This augmentation adds additional adaptive subscription parameters to the notification that a subscription has been modified."; case adaptive-periodic { description "Defines adaptively periodic case for sending an event record to the subscriber."; uses adaptive-subscription-modifiable; } } notification adaptive-period-update { sn:subscription-state-notification; description "This notification contains a push update that in turn contains data subscribed to via a subscription. In the case of a periodic subscription, this notification is sent for periodic updates. It can also be used for synchronization updates of an on-change subscription. This notification shall only be sent to receivers of a subscription. It does not constitute a general-purpose notification that would be subscribable as part of the NETCONF event stream by any receiver."; leaf id { type sn:subscription-id; description "This references the subscription that drove the notification to be sent."; } leaf period { type yp:centiseconds; mandatory true; description "New duration of time that should occur between periodic push updates, in units of 0.01 seconds."; } leaf period-update-time { type yang:date-and-time; description "Designates a timestamp when the server starts to switch to another period interval because the evaluated 'xpath- external-eval' expression result changed."; } uses yp:datastore-criteria { refine "selection-filter/within-subscription" { description "Specifies the selection filter and where it originated from. If the 'selection-filter-ref' is populated, the filter in the subscription came from the 'filters' container. Otherwise, it is populated in-line as part of the subscription itself."; } } } } <CODE ENDS>¶
This document registers one URI in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the following registration is requested to be made:¶
--------------------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-adapt-subscription 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 [RFC7950]. Following the format in [RFC6020], the following registration is requested to be made:¶
--------------------------------------------------------------------- Name: ietf-adapt-subscription Namespace: urn:ietf:params:xml:ns:yang:ietf-adapt-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:¶
Thanks Michael Wang, Liang Geng for their major contributions to the initial modeling and use cases.¶
Michael Wang Email: wangzitao@huawei.com Liang Geng China Mobile 32 Xuanwumen West St, Xicheng District Beijing 10053 Email: gengliang@chinamobile.com¶
We would like to thank Rob Wilton, Thomas Graf, Andy Bierman, Michael Richardson, Henk Birkholz, Chong Feng, Adrian Farrel for valuable review on this document, special thanks to Thomas and Michael for organizing the discussion on several relevant drafts and reach the common understanding on the concept and ideas. Thanks Michael for providing CHIP/Matter WIFI statistics reference.¶
This section presents an example YANG module so that Appendix B can give examples of how the YANG module defined in Section 4 is used to perform adaptive subscription. The example YANG module used in this section represents a Wi-Fi Network Diagnostics data specified in [CHIP] which can be used by a Node to assist a user or Administrative Node in diagnosing potential problems.¶
YANG tree diagram for the "example-wifi-network-diagnostic" module:¶
module: example-wifi-network-diagnostic +--ro server | +--ro bssid? yang:mac-address | +--ro security-type? enumeration | +--ro wifi-version? enumeration | +--ro channel-num? int8 | +--ro rssi? int8 | +--ro beacon-lost-count? int8 | +--ro beacon-rx-count? int8 | +--ro packet-multicast-rx-count? int8 | +--ro packet-multicast-tx-count? int8 | +--ro packet-unicast-rx-count? int8 | +--ro packet-unicast-tx-count? int8 | +--ro current-max-rate? int8 | +--ro overrun-count? int8 +--ro events +--ro event* [name] +--ro name string +--ro disconnection? enumeration +--ro association-failure? enumeration +--ro connection-status? enumeration¶
module example-wifi-network-diagnostic { yang-version 1; namespace "http://example.com/yang/wifi-network-diagnostic"; prefix wnd; import ietf-yang-types { prefix yang; } container server { config false; description "Configuration of the WiFi Server logical entity."; leaf bssid { type yang:mac-address; description "The MAC address of a wireless access point."; } leaf security-type { type enumeration { enum unspecified { value 0; } enum none { value 1; } enum wep { value 2; } enum wpa { value 3; } enum wpa2 { value 4; } enum wpa3 { value 5; } } description "The type of Wi-Fi security used. A value of 0 indicate that the interface is not currently configured or operational."; } leaf wifi-version { type enumeration { enum 80211a { value 0; } enum 80211b { value 1; } enum 80211g { value 2; } enum 80211n { value 3; } enum 80211ac { value 4; } enum 80211ax { value 5; } } description "The highest 802.11 standard version usable by the Node."; } leaf channel-num { type int8; description "The channel that Wi-Fi communication is currently operating on. A value of 0indicates that the interface is not currently configured or operational."; } leaf rssi { type int8; description "The RSSI of the Node's Wi-Fi radio in dBm."; } leaf beacon-lost-count { type int8; description "The count of the number of missed beacons the Node has detected."; } leaf beacon-rx-count { type int8; description "The count of the number of received beacons. The total number of expected beacons that could have been received during the interval since association SHOULD match the sum of BeaconRxCount and BeaconLostCount. "; } leaf packet-multicast-rx-count { type int8; description "The number of multicast packets received by the Node."; } leaf packet-multicast-tx-count { type int8; description "The number of multicast packets transmitted by the Node."; } leaf packet-unicast-rx-count { type int8; description "The number of multicast packets received by the Node."; } leaf packet-unicast-tx-count { type int8; description "The number of multicast packets transmitted by the Node."; } leaf current-max-rate { type int8; description "The current maximum PHY rate of transfer of data in bytes-per-second."; } leaf overrun-count { type int8; description "The number of packets dropped either at ingress or egress, due to lack of buffer memory to retain all packets on the ethernet network interface. The OverrunCount attribute SHALL be reset to 0 upon a reboot of the Node.."; } } container events { config false; description "Configuration of WIFI Network Diagnostic events."; list event { key "name"; description "The list of event sources configured on the server."; leaf name { type string; description "The unique name of an event source."; } leaf disconnection { type enumeration { enum de-authenticated { value 1; } enum dis-association { value 2; } } description "A Node's Wi-Fi connection has been disconnected as a result of de-authenticated or dis-association and indicates the reason."; } leaf association-failure { type enumeration { enum unknown { value 0; } enum association-failed { value 1; } enum authentication-failed { value 2; } enum ssid-not-found { value 3; } } description "A Node has attempted to connect, or reconnect, to a Wi-Fi access point, but is unable to successfully associate or authenticate, after exhausting all internal retries of its supplicant."; } leaf connection-status { type enumeration { enum connected { value 1; } enum notconnected { value 2; } } description "A Node's connection status to a Wi-Fi network has changed. Connected, in this context, SHALL mean that a Node acting as a Wi-Fi station is successfully associated to a Wi-Fi Access Point."; } } } }¶
The examples within this document use the normative YANG module "ietf-adapt-subscription" defined in Section 4 and the non-normative example YANG module "example-wifi-network-diagnostic" defined in Appendix A.1.¶
This section shows some typical adaptive subscription and notification message exchanges.¶
The client configures adaptive subscription policy parameters on the server. The adaptive subscription configuration parameters require the server to support two update intervals (i.e., 5 seconds, 60 seconds) and report updates every 60 seconds if the rssi value is greater than or equal to -65dB; If the rssi value is less than -65dB, switch to 5 seconds period value to report updates.¶
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <subscriptions xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications" xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> <subscription> <id>1011</id> <yp:datastore xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> ds:operational </yp:datastore> <yp:datastore-xpath-filter xmlns:wnd="http://example.com/yang/wifi-network-diagnostic"> /wnd:server </yp:datastore-xpath-filter> <as:adaptive-periods xmlns:as="urn:ietf:params:xml:ns:yang:ietf-adapt-subscription"> <as:adaptive-period> <as:name>adaptive-period-1</as:name> <as:xpath-external-eval> /wnd:server/wnd:rssi<-65 </as:xpath-external-eval> <as:period>5</as:period> </as:adaptive-period> <as:adaptive-period> <as:name>adaptive-period-2</as:name> <as:xpath-external-eval> /wnd:server/wnd:rssi>=-65 </as:xpath-external-eval> <as:period>60</as:period> </as:adaptive-period> </as:adaptive-periods> <receivers> <receiver> <name>host.example.com</name> </receiver> </receivers> </subscription> </subscriptions> </config> </edit-config> </rpc>¶
The subscriber sends an "establish-subscription" RPC with the parameters listed in to request the creation of an adaptive subscription. The adaptive subscription configuration parameters require the server to report updates every 5 seconds if the rssi value is less than -65dB; If the rssi value is greater than or equal to -65dB, switch to 60 seconds period value. (Section 2)¶
<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:wnd="http://example.com/yang/wifi-network-diagnostic"> /wnd:server </yp:datastore-xpath-filter> <as:adaptive-periods xmlns:as="urn:ietf:params:xml:ns:yang:ietf-adapt-subscription"> <as:adaptive-period> <as:name>adaptive-period-1</as:name> <as:xpath-external-eval> /wnd:server/wnd:rssi<-65 </as:xpath-external-eval> <as:period>5</as:period> </as:adaptive-period> <as:adaptive-period> <as:name>adaptive-period-2</as:name> <as:xpath-external-eval> /wnd:server/wnd:rssi>=-65 </as:xpath-external-eval> <as:period>60</as:period> </as:adaptive-period> </as:adaptive-periods> </establish-subscription> </netconf:rpc>¶
If the subscriber has authorization to establish the subscription with a server, but the server had not been able to fully satisfy the request from the subscriber, the server should send an RPC error response.¶
For instance, if the XPATH 1.0 syntax against the targeted data object defined in "xpath-external-eval" is not supported by the server' s implementation, the server returns a reply indicating a failure. The following <rpc-reply> illustrates an example:¶
<?xml version="1.0" encoding="utf-8"?> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc-error> <error-type>application</error-type> <error-tag>invalid-value</error-tag> <error-severity>error</error-severity> <error-app-tag> ietf-adapt-subscription:xpath-evaluation-unsupported </error-app-tag> <error-path xmlns:wnd="http://example.com/yang/wifi-network-diagnostic"> /wnd:server/wnd:rssi </error-path> </rpc-error> </rpc-reply>¶
Since adaptive subscription allows a server to be configured with multiple different period intervals and corresponding XPath evaluation criteria to trigger update interval switch in the server, it may be possible for the server to return multiple <rpc-error> elements with "xpath-evaluation-unsupported" failure specified by different error paths. The subscriber can use this information in future attempts to establish a subscription.¶
Upon the server switches from the update interval 5 seconds to the new update interval 60 seconds, before sending event records to receivers, the "adaptive-period-update" notification should be generated and sent to the receivers to inform the receivers that the update interval value is switched to the new value.¶
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"> <eventTime>2016-11-21T13:51:00Z</eventTime> <adaptive-period-update xmlns="urn:ietf:params:xml:ns:yang:ietf-adapt-subscription"> <id>1011</id> <period>60</period> <yp:datastore xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"> ds:operational </yp:datastore> <yp:datastore-xpath-filter xmlns:wnd="http://example.com/yang/wifi-network-diagnostic"> /wnd:server </yp:datastore-xpath-filter> </adaptive-period-update> </notification>¶
This section is to be removed before publishing as an RFC.¶
v02 -v03¶
v01 -v02¶
v00 -v01¶
v09 -v10¶
v08 -v09¶
v07 -v08¶
v06 -v07¶
v05 -v06¶
v04 -v05¶
v03 - v04¶
v02 - v03¶