NETCONF Working Group Q. Wu Internet-Draft W. Song Intended status: Standards Track Huawei Expires: January 11, 2022 P. Liu China Mobile Q. Ma Huawei W. Wang China Telecom July 10, 2021 Adaptive Subscription to YANG Notification draft-wang-netconf-adaptive-subscription-06 Abstract This document defines a YANG data model and associated mechanism enabling subscriber's adaptive subscriptions to a publisher's event streams with various different period intervals to report updates. Applying these elements allows servers automatically adjust the volume of telemetry traffic and rate of traffic sent from publisher to the receivers. 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 January 11, 2022. Copyright Notice Copyright (c) 2021 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 Wu, et al. Expires January 11, 2022 [Page 1] Internet-Draft Adaptive Subscription July 2021 (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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 2. Model Overview . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Subscription Configuration . . . . . . . . . . . . . . . 5 2.2. YANG RPC . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1. "establish-subscription" RPC . . . . . . . . . . . . 6 2.3. Notifications for Adaptive Subscribed Content . . . . . . 6 3. Adaptive Subscription YANG Module . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 4.1. Updates to the IETF XML Registry . . . . . . . . . . . . 11 4.2. Updates to the YANG Module Names Registry . . . . . . . . 11 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 12 7. Acknowledges . . . . . . . . . . . . . . . . . . . . . . . . 12 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 8.1. Normative References . . . . . . . . . . . . . . . . . . 13 8.2. Informative References . . . . . . . . . . . . . . . . . 14 Appendix A. Example YANG Module . . . . . . . . . . . . . . . . 14 A.1. "example-wifi-mac" YANG Module . . . . . . . . . . . . . 15 Appendix B. Adaptive Subscription and Notification Example . . . 19 B.1. "edit-config" Example . . . . . . . . . . . . . . . . . . 19 B.2. Create Adaptive Subscription Example . . . . . . . . . . 21 B.3. "adaptive-update" notification example . . . . . . . . . 22 B.4. Changes between Revisions . . . . . . . . . . . . . . . . 23 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 1. Introduction 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. o Periodic subscription allows subscribed data to be streamed to the destination at a configured fixed periodic interval Wu, et al. Expires January 11, 2022 [Page 2] Internet-Draft Adaptive Subscription July 2021 o On-change subscription allows update to be triggered whenever a change in the subscribed information is detected. The periodic interval is set to zero value in the on-change subscription case. However in some large scale deployments (e.g., wireless network performance monitoring) where an increased data collection rate is being used, it becomes more likely that a burst of streamed data may temporarily overwhelm a receiver and consume expensive network resource (e.g., radio resource). If the rate at which we can collect a stream of data is set too low or getting low priority telemetry data dropped, these telemetry data are not sufficient to detect and diagnose problems and verify correct network behavior. There is a need for a service to configure both clients and servers with multiple different period intervals and corresponding subscription policy which allows servers/publishers automatically switch to different period intervals according to resource usage change without the interaction with the remote client, e.g., when the wireless signal strength falls below a configured low watermark, the subscribed data can be streamed at a higher rate while when the wireless signal strength crosses a configured high watermark, the subscribed data can be streamed at lower rate. 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 servers to automatically adjust the volume of telemetry traffic and rate of traffic sent from publisher to the receivers. 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 [RFC5277] [RFC7950] [RFC3198] [RFC8342] [RFC8639] and are not redefined here: o Event o Client o Configuration o Configured subscription o Configuration datastore Wu, et al. Expires January 11, 2022 [Page 3] Internet-Draft Adaptive Subscription July 2021 o Notification message o Publisher o Receiver o Subscriber o Subscription o On-change subscription o Periodic subscription 2. Model Overview This document defines a YANG module "ietf-adaptive-subscription", which augments the "update-trigger" choice defined in the "ietf-yang- push" module [RFC8641] with subscription configuration parameters that are specific to adaptive subscription. In addition to Subscription state notifications defined in [RFC8639] and Notifications for Subscribed Content defined in [RFC8641], "ietf- adaptive-subscription" YANG module also defines "adaptive-period- update" notification to report update interval change. The following tree diagrams [RFC8340] provide an overview of the data model for "ietf-adaptive-subscription.yang" module. Wu, et al. Expires January 11, 2022 [Page 4] Internet-Draft Adaptive Subscription July 2021 module: ietf-adaptive-subscription augment /sn:subscriptions/sn:subscription/yp:update-trigger: +--rw (adaptive-subscription)? +--:(adaptive-subscriptions) +--rw adaptive-subscriptions +--rw adaptive-period* [name] +--rw name string +--rw xpath-external-eval string +--rw watermark? uint32 +--rw period centiseconds +--rw anchor-time? yang:date-and-time augment /sn:establish-subscription/sn:input/yp:update-trigger: +-- (adaptive-subscription)? +--:(adaptive-subscriptions) +--rw adaptive-subscriptions +--rw adaptive-period* [name] +--rw name string +--rw xpath-external-eval string +--rw watermark? uint32 +--rw period centiseconds +--rw anchor-time? yang:date-and-time notifications: +---n adaptive-period-update +--ro id? sn:subscription-id +--ro period centiseconds +--ro anchor-time? yang:date-and-time +--ro (selection-filter)? +--:(by-reference) | +--ro selection-filter-ref selection-filter-ref +--:(within-subscription) +--ro (filter-spec)? +--:(datastore-subtree-filter) | +--ro datastore-subtree-filter? {sn:subtree}? +--:(datastore-xpath-filter) +--ro datastore-xpath-filter? yang:xpath1.0 {sn:xpath}? 2.1. Subscription Configuration 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 adaptive periodic parameters: o a "period" that defines the new duration between push updates, the period can be changed based on trigger condition. o an "anchor-time" update intervals fall on the points in time that are a multiple of a "period" from an "anchor-time". If an Wu, et al. Expires January 11, 2022 [Page 5] Internet-Draft Adaptive Subscription July 2021 "anchor-time" is not provided, then the "anchor-time" MUST be set with the creation time of the initial update record. o a "watermark" that defines the threshold value of the targeted data object, e.g., it can be lower boundary or upper boundary of targeted data object. o a "xpath-external-eval" represents an Evaluation criteria that may be applied against event records in an event stream, which is used to trigger update interval switch in the server. It contains comparisons of datastore node with its value to the specific threshold (i.e., watermark) and associated logical operation in the XPath format. Different from stream-xpath-filter defined in [RFC8639], it doesn't influence the event records output generation from a publisher. 2.2. YANG RPC 2.2.1. "establish-subscription" RPC 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 adaptive subscriptions. These parameters are same as one defined in Section 2.1. 2.3. Notifications for Adaptive Subscribed Content 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. 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 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 'adpative-update' notification include: o a "period" that defines the duration between push updates, the period can be changed based on trigger condition. o an "anchor-time"; update intervals fall on the points in time that are a multiple of a "period" from an "anchor-time". If an Wu, et al. Expires January 11, 2022 [Page 6] Internet-Draft Adaptive Subscription July 2021 "anchor-time" is not provided, then the "anchor-time" MUST be set with the creation time of the initial update record. o A selection filter identifying YANG nodes of interest in a datastore. Filter contents are specified via a reference to an existing filter or via an in-line definition for only that subscription. Referenced filters allow an implementation to avoid evaluating filter acceptability during a dynamic subscription request. The "case" statement differentiates the options. Note that filter contents are not affected by "xpath-external-eval" parameter and "watermark" parameter defined by update trigger. 3. Adaptive Subscription YANG Module 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."; Wu, et al. Expires January 11, 2022 [Page 7] Internet-Draft Adaptive Subscription July 2021 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 seconds { type uint32; description "A period of time, measured in units of 1 seconds."; } grouping adaptive-subscription-modifiable { description "This grouping describes the datastore-specific adaptive subscription conditions that can be changed during the lifetime of the subscription."; choice adaptive-subscription { description "Defines necessary conditions for sending an event record to the subscriber."; container adaptive-subscriptions { list adaptive-period { key "name"; description "Defines necessary conditions to switch update interval for sending an event record to the subscriber. The event record output generation will not be influeced these conditions."; leaf name { type string { length "1..64"; } description "The name of the condition to be matched. A device MAY further restrict the length of this name; space and special characters are not allowed."; } leaf xpath-external-eval { type string; description "A XPath string, representing a logical expression, Wu, et al. Expires January 11, 2022 [Page 8] Internet-Draft Adaptive Subscription July 2021 which can contain comparisons of datastore values and logical operations in the XPath format."; } leaf watermark { type uint32; description "The watermark for targeted data object. The high watermark, lowe watermark can be specified for the targeted data object."; } leaf period { 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'. 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 adaptive subscription."; } } } augment "/sn:subscriptions/sn:subscription/yp:update-trigger" { description "This augmentation adds additional subscription parameters that apply specifically to adaptive subscription."; uses adaptive-subscription-modifiable; } augment "/sn:establish-subscription/sn:input/yp:update-trigger" { description "This augmentation adds additional subscription parameters that apply specifically to datastore updates to RPC input."; uses adaptive-subscription-modifiable; } Wu, et al. Expires January 11, 2022 [Page 9] Internet-Draft Adaptive Subscription July 2021 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 centiseconds; mandatory true; description "New 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'. 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."; } 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."; } } } } Wu, et al. Expires January 11, 2022 [Page 10] Internet-Draft Adaptive Subscription July 2021 4. IANA Considerations 4.1. Updates to the IETF XML Registry 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. --------------------------------------------------------------------- 4.2. Updates to the YANG Module Names Registry 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 --------------------------------------------------------------------- 5. 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 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 Wu, et al. Expires January 11, 2022 [Page 11] Internet-Draft Adaptive Subscription July 2021 data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability: o /sn:subscriptions/sn:subscription/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:watermark o /sn:subscriptions/sn:subscription/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:period o /sn:subscriptions/sn:subscription/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:anchor-time o /sn:establish-subscription/sn:input/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:watermark o /sn:establish-subscription/sn:input/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:period o /sn:establish-subscription/sn:input/yp:update-trigger/as:adaptive- subscriptions/as:adaptive-period/as:anchor-time 6. Contributors Michale Wang, Liang Geng for his major contributions to the initial modeling and use cases. Michale Wang Email: wangzitao@huawei.com Liang Geng China Mobile 32 Xuanwumen West St, Xicheng District Beijing 10053 Email: gengliang@chinamobile.com 7. Acknowledges We would like to thanks Rob Wilton, Thomas Graf, Andy Bierman, Michael Richardson, Henk Birkholz for valuable review on this document, special thanks to Thmas and Michael to organize 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. Wu, et al. Expires January 11, 2022 [Page 12] Internet-Draft Adaptive Subscription July 2021 8. References 8.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [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, . [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, . [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, . [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, . [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018, . [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, . Wu, et al. Expires January 11, 2022 [Page 13] Internet-Draft Adaptive Subscription July 2021 [RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10.17487/RFC8407, October 2018, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . [RFC8641] Clemm, A. and E. Voit, "Subscription to YANG Notifications for Datastore Updates", RFC 8641, DOI 10.17487/RFC8641, September 2019, . 8.2. Informative References [CHIP] Matter, "Connected Home over IP Specification", April 2021. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, . [RFC6020] Bjorklund, M., Ed., "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, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, . Appendix A. Example YANG Module The example YANG module used in this document 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-mac" module: Wu, et al. Expires January 11, 2022 [Page 14] Internet-Draft Adaptive Subscription July 2021 module: example-wifi-network-diagnostic +--rw server | +--rw bssid? yang:mac-address | +--rw security-type? enumeration | +--rw wifi-version? enumeration | +--rw channel-num? int8 | +--rw rssi? int8 | +--rw beacon-lost-count? int8 | +--rw beacon-rx-count? int8 | +--rw packet-multicast-rx-count? int8 | +--rw packet-multicast-tx-count? int8 | +--rw packet-unicast-rx-count? int8 | +--rw packet-unicast-tx-count? int8 | +--rw current-max-rate? int8 | +--rw overrun-count? int8 +--rw events +--rw event* [name] +--rw name string +--rw disconnection? enumeration +--rw association-failure? enumeration +--rw Connection-status? enumeration A.1. "example-wifi-mac" YANG Module 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 { 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; Wu, et al. Expires January 11, 2022 [Page 15] Internet-Draft Adaptive Subscription July 2021 } 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 Wu, et al. Expires January 11, 2022 [Page 16] Internet-Draft Adaptive Subscription July 2021 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; Wu, et al. Expires January 11, 2022 [Page 17] Internet-Draft Adaptive Subscription July 2021 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 { 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; Wu, et al. Expires January 11, 2022 [Page 18] Internet-Draft Adaptive Subscription July 2021 } 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.."; } } } } Appendix B. Adaptive Subscription and Notification Example The examples within this document use the normative YANG module "ietf-adaptive-subscription" as defined in Section 3 and the non- normative example YANG module "example-wifi-network-diagnostic" as defined in Appendix A.1. This section shows some typical adaptive subscription and notification message exchanges. B.1. "edit-config" Example 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 Wu, et al. Expires January 11, 2022 [Page 19] Internet-Draft Adaptive Subscription July 2021 seconds) and scan all clients every 60 seconds in the sampling window if the rssi value of client is greater than or equal to -65dB in the sampling window; If the rssi value of client is less than -65dB, switch to 5 seconds period value, and then scan all clients every 60 seconds. ds:running /wnd:example-wifi-network-diagnostic /wnd:server[rssi < -65] -65 5 /wnd:server[rssi ≥ -65] -65 60 Wu, et al. Expires January 11, 2022 [Page 20] Internet-Draft Adaptive Subscription July 2021 B.2. Create Adaptive Subscription Example The subscriber sends an "establish-subscription" RPC with the parameters listed in to request the creation of a adaptive subscription. The adaptive subscription configuration parameters require the server to scan all clients every 5 seconds if the rssi value of client is less than -65dB; If the rssi value of client is great than or equal to -65dB, switch to 60 seconds period value, and then report all clients every 60 seconds or scan every 5 seconds, collect 12 measurement values but report the last measurement value or average value of 12 measurement values. (Section 2) ds:running /wnd:example-wifi-network-diagnostic wnd:server[rssi < -65] -65 5 wnd:server[rssi ≥ -65] -65 60 In another example, the adaptive subscription configuration parameters could also require the server to scan all clients every 5 seconds and report if the difference between maximum value of client rssi and minimum value of client rssi is greater than 0.20 dB in the sampling window; If the difference between maximum value of client Wu, et al. Expires January 11, 2022 [Page 21] Internet-Draft Adaptive Subscription July 2021 rssi and minimum value of client rssi is less than 0.20 dB, switch to 60 seconds period value and then scan all clients every 60 seconds and report the last measurement value. If the difference between maximum value of client rssi and minimum value of client rssi is greater than or equal to 0.20 dB in two consecutive sampling windows, then in the second sampling window, only report the measurement value not reported by the previous sampling window. ds:running /wnd:example-wifi-network-dianostic wnd:server[max(rssi)-min(rssi) ≥ 20] 20 5 wnd:server[max(rssi)-min(rssi) < 20] 20 60 B.3. "adaptive-update" notification example Upon the server switches to from the update interval 5 seconds to the new update interval 60 seconds, Before sending event records to receivers, the "adaptive-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. Wu, et al. Expires January 11, 2022 [Page 22] Internet-Draft Adaptive Subscription July 2021 2016-11-21T13:51:00Z 0 60 ds:running /ex:example-wifi-network-diagnostic B.4. Changes between Revisions v05 -v06 o Replace example-wifi-mac module with example-wifi-network- diagnostic using WIFI statistics specified in CHIP specification. o Update adaptive subscription Example to align with WIFI example module change. o Add one more reference to CHIP Specification. v04 -v05 o Remove "modify-subscption" RPC usage. o Module update to fix the nits. o Update adaptive subscription Example. o Other Editorial changes. v03 - v04 o Add missing subtrees and data nodes in the security section; o Change "adaptive-update" notification into "adaptive-period- update" notification; Wu, et al. Expires January 11, 2022 [Page 23] Internet-Draft Adaptive Subscription July 2021 o Other Editorial changes. v02 - v03 o Clarify the difference between low priority telemetry data dropping and collection rate switching in the introduction section; o Update the abstract and introduction section to focus on collection rate switching in the server without interaction with the remote client; o Format usage example and change ssid into rssi in the appendix; o Use boilerplate and reuse the terms in the terminology section. Authors' Addresses Qin Wu Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China Email: bill.wu@huawei.com Wei Song Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China Email: songwei80@huawei.com Peng Liu China Mobile 32 Xuanwumen West St, Xicheng District Beijing 10053 Email: liupengyjy@chinamobile.com Wu, et al. Expires January 11, 2022 [Page 24] Internet-Draft Adaptive Subscription July 2021 Qiufang Ma Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China Email: maqiufang1@huawei.com Wei Wang China Telecom 32 Xuanwumen West St, Xicheng District Beijing 102209 Email: wangw36@chinatelecom.cn Wu, et al. Expires January 11, 2022 [Page 25]