NETCONF B. Lengyel Internet-Draft Ericsson Intended status: Standards Track A. Clemm Expires: February 14, 2020 Futurewei B. Claise Cisco Systems, Inc. August 13, 2019 Yang-Push Notification Capabilities draft-ietf-netconf-notification-capabilities-03 Abstract This document proposes a YANG module that allows a server to specify server capabilities related to "Subscription to YANG Datastores" (Yang-Push). It proposes to use YANG Instance Data to document this information and make it already available at implementation time, but also allow it to be reported at runtime. 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 February 14, 2020. 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 Lengyel, et al. Expires February 14, 2020 [Page 1] Internet-Draft Yang-Push Notification Capabilities August 2019 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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Notification Capability Model . . . . . . . . . . . . . . . . 4 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 5 3.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 6 4. Security Considerations . . . . . . . . . . . . . . . . . . . 12 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 12 5.2. The YANG Module Names Registry . . . . . . . . . . . . . 12 6. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 12 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 7.1. Normative References . . . . . . . . . . . . . . . . . . 13 7.2. Informative References . . . . . . . . . . . . . . . . . 13 Appendix A. Instance data examples . . . . . . . . . . . . . . . 14 Appendix B. Changes between revisions . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 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 terms Yang-Push, On-change subscription and Periodic subscription are used as defined in [I-D.ietf-netconf-yang-push] On-change Notification Capability: The capability of the server to support On-change subscriptions. The term Server is used as defined in [RFC8342] Implementation-time information: Information about the server's behavior that is made available during the implementation of the server, available from a source other then a running server. Runtime-information: Information about the server's behavior that is available from the running server via management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. Lengyel, et al. Expires February 14, 2020 [Page 2] Internet-Draft Yang-Push Notification Capabilities August 2019 2. Introduction As defined in [I-D.ietf-netconf-yang-push] a server may allow clients to subscribe to updates from a datastore and subsequently push such update notifications to the client. Notifications may be sent periodically or on-change (more or less immediately after each change). A server supporting YANG-Push has a number of capabilities defined in [I-D.ietf-netconf-yang-push] that are often determined during the implementation of the server. These include: o Supported (reporting) periods for periodic subscriptions o Maximum number of objects that can be sent in an update If the optional on-change feature is supported, additionally: o Supported dampening periods for on-change subscriptions o The set of data nodes for which on-change notification is supported Servers MAY have limitations in how many update notifications and how many datastore node updates they can send out in a certain time- period. In some cases, a publisher supporting on-change notifications will not be able to push updates for some object types on-change. Reasons for this might be that the value of the datastore node changes frequently (e.g. in-octets counter), that small object changes are frequent and meaningless (e.g., a temperature gauge changing 0.1 degrees), or that the implementation is not capable of on-change notification for a particular object. In those cases, it will be important for client applications to have a way to identify for which objects on-change notifications are supported and for which ones not. Faced with the reality that support for on-change notification does not mean that such notifications will be sent for any specific data node, client/management applications can not rely on the on-change functionality unless the client has some means to identify for which objects on-change notifications are supported. YANG models are meant to be used as an interface contract. Without identification of the data nodes actually supporting on-change, this contract would be incomplete. Lengyel, et al. Expires February 14, 2020 [Page 3] Internet-Draft Yang-Push Notification Capabilities August 2019 This document proposes a YANG module that allows a client to discover YANG-Push related capabilities both at implementation-time and run- time. Implementation time information is needed by Network Management System (NMS) implementers. During NMS implementation for any functionality that depends on the notifications the information about on change notification capability is needed. If the information is not available early in some document, but only as instance data from the network node once it is deployed, the NMS implementation will be delayed, because it has to wait for the network node to be ready. In addition, the assumption that all NMS implementers will have a correctly configured network node available to retrieve data from, is an expensive proposition and may not always hold. (An NMS may need to be able to handle many dozens of network node types.) Often a fully functional NMS is a requirement for introducing a new network node type into a network, so delaying NMS readiness effectively also delays the time at which a new network node type can be introduced into the network. Implementation time information is needed by system integrators. When introducing a network node type into their network, operators often need to integrate the node type into their own management system. The NMS may have management functions that depend on on- change notifications. The network operator needs to plan his management practices and NMS implementation before he even decides to buy the specific network node type. Moreover the decision to buy the node type sometimes depends on these management possibilities. Run-time information is needed: o for any "purely model driven" client, e.g. a NETCONF-browser. As long as it has a valid model to read the capability information, it does not care which data nodes send notification, it will just handle what is available. o in case the capability might change during run-time e.g. due to licensing, HW constraints etc. o to check that early, implementation time capability information about the capabilities is indeed what the server implements (is the supplied documentation correct?) 3. Notification Capability Model It is a goal to provide Yang-Push notification capability information in a format that is: Lengyel, et al. Expires February 14, 2020 [Page 4] Internet-Draft Yang-Push Notification Capabilities August 2019 o vendor independent o formal o identical for implementation-time and run-time The YANG module ietf-notification-capabilities is defined to provide the information. It contains: a set of capabilities related to the amount of notifications the server can send out specification of which data nodes support on-change notifications. Capability values can be specified on server level, datastore level or on specific data nodes (and their contained sub-tree) of a specific datastore. Capability values on a smaller, more specific part of the server's data always override more generic values. On-change capability is not specified on a server level as different datastores usually have different on-change capabilities. On a datastore level on-change capability for configuration and state data can be specified separately. The information SHALL be provided in two ways both following the ietf-notification-capabilities module: o For the implementation-time use-case: It SHALL be provided by the implementer as YANG instance data file complying to [I-D.ietf-netmod-yang-instance-file-format]. The file SHALL be available already in implementation time retrievable in a way that does not depend on a live network node. E.g. download from product Website. o For the run-time use-case: It SHALL be available via NETCONF [RFC6241] or RESTCONF [RFC8040] from the live server during runtime. As these capabilities might change during run-time, implementations that support the YANG-Push on-change feature, SHOULD support sending on-change notifications about this module. 3.1. Tree Diagram The following tree diagram [RFC8340] provides an overview of the data model. Lengyel, et al. Expires February 14, 2020 [Page 5] Internet-Draft Yang-Push Notification Capabilities August 2019 module: ietf-notification-capabilities +--ro datastore-subscription-capabilities +--ro (update-period)? | +--:(minimum-update-period) | | +--ro minimum-update-period? uint32 | +--:(supported-update-period) | +--ro supported-update-period* uint32 +--ro max-objects-per-update? uint32 +--ro minimum-dampening-period? uint32 {yp:on-change}? +--ro datastore-capabilities* [datastore] +--ro datastore union +--ro (update-period)? | +--:(minimum-update-period) | | +--ro minimum-update-period? uint32 | +--:(supported-update-period) | +--ro supported-update-period* uint32 +--ro max-objects-per-update? uint32 +--ro minimum-dampening-period? uint32 {yp:on-change}? +--ro on-change-supported-for-config? boolean {yp:on-change}? +--ro on-change-supported-for-state? boolean {yp:on-change}? +--ro per-node-capabilities* [node-selector] +--ro node-selector nacm:node-instance-identifier +--ro (update-period)? | +--:(minimum-update-period) | | +--ro minimum-update-period? uint32 | +--:(supported-update-period) | +--ro supported-update-period* uint32 +--ro max-objects-per-update? uint32 +--ro minimum-dampening-period? uint32 {yp:on-change}? +--ro on-change-supported boolean {yp:on-change}? 3.2. YANG Module file "ietf-notification-capabilities@2019-08-13.yang" module ietf-notification-capabilities { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-notification-capabilities"; prefix inc; import ietf-netconf-acm { prefix nacm; } import ietf-yang-push { prefix yp; } import ietf-yang-library { prefix yanglib; description "Requires revision 2019-01-04 or a revision derived from it."; } Lengyel, et al. Expires February 14, 2020 [Page 6] Internet-Draft Yang-Push Notification Capabilities August 2019 organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: Editor: Balazs Lengyel "; description "This module specifies YANG-Push related server capabilities. The module contains - capabilities related to the amount of notifications the server can send out. (Note that for a specific subscription the server MAY still allow only longer periods or smaller updates depending on e.g. actual load conditions.) - specification of which data nodes support on-change notifications. Capability values on a smaller, more specific part of the server's data always override more generic values. The hierarchy of specifications from generic to more specific is: 1) top level values valid for all datastores 2) values for a specific datastore (including the special 'all' datastore identifier) 3) Value for a specific data node and its contained sub-tree in one of the datastores. Such capability values are inherited down the containment tree unless a more specific value is provided, as described in 4) 4) A contained, smaller, more specific sub-tree in a specific datastore (could be a single leaf) Any capability value MAY be absent if a more generic capability value is already provided or if the server is not capable of providing a value. 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. Copyright (c) 2019 IETF Trust and the persons identified as authors of the code. All rights reserved. Lengyel, et al. Expires February 14, 2020 [Page 7] Internet-Draft Yang-Push Notification Capabilities August 2019 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-08-13 { description "Initial version"; reference "RFC XXX: Yang-Push Notification Capabilities"; } container datastore-subscription-capabilities { config false; description "YANG-Push related server capabilities"; grouping datastore-subscription-throughput-capabilities { description "Capability values that affect the amount of notifications the server can send out."; choice update-period { description "Supported update-period values."; leaf minimum-update-period { type uint32; units "centiseconds"; description "Minimum update period supported for a periodic subscription."; } leaf-list supported-update-period { type uint32; units "centiseconds"; description "Specific supported update period values for a periodic subscription."; } } leaf max-objects-per-update { type uint32 { Lengyel, et al. Expires February 14, 2020 [Page 8] Internet-Draft Yang-Push Notification Capabilities August 2019 range "1..max"; } description "Maximum number of objects that can be sent in an update."; } leaf minimum-dampening-period { if-feature yp:on-change ; type uint32; units "centiseconds"; description "The minimum dampening period supported for on-change subscriptions."; } } uses datastore-subscription-throughput-capabilities { description "Top level throughput capabilities. These values can be overridden by values provided per datastore or for individual data nodes in a datastore."; } list datastore-capabilities { key datastore ; description "Capabilities values per datastore. For non-NMDA servers the config=false data is considered as if it was part of the running datastore. Indicates per datastore throughput capabilities. Indicates per datastore the data nodes for which the server is capable of sending on-change notifications. If a datastore implemented by the server is not specified in this list and there is no list element for 'all' datastores the datastore does not support any on-change notifications. On-change notifications SHALL be sent for a config=true data node if one of the following is true: - if it is a top level data-node and is not specified in the per-node-capabilities list and on-change-supported-for-config is true; or - notifications are sent for its parent data node and it is not specified in the per-node-capabilities list; or - it is specified in the per-node-capabilities list and has an on-change-supported value true. On-change notifications SHALL be sent for a config=false Lengyel, et al. Expires February 14, 2020 [Page 9] Internet-Draft Yang-Push Notification Capabilities August 2019 data node if one of the following is true: - if it is a top level data-node (a config=false data node with a config=true parent SHALL be treated as a top level data node) and is not specified in the per-node-capabilities list and on-change-supported-for-state is true; or - notifications are sent for its parent data node which is also config=false and it is not specified in the per-node-capabilities list; or - it is specified in the per-node-capabilities list and has an on-change-supported value true"; leaf datastore { type union { type leafref { path /yanglib:yang-library/yanglib:datastore/yanglib:name ; } type enumeration { enum all ; } } must '. != "all" or count(..) = "1" ' { error-message "If 'all' is present individual datastores cannot be " + "specified."; } description "The datastore for which capabilities are defined."; } uses datastore-subscription-throughput-capabilities { description "Throughput capabilities for a datastore. These values will override top level values and can be overridden by values provided for individual data nodes in a datastore."; } leaf on-change-supported-for-config { if-feature yp:on-change ; type boolean; default "true"; description "Specifies the default value for top level config=true data nodes for the on-change-supported capability."; } leaf on-change-supported-for-state { if-feature yp:on-change ; type boolean; Lengyel, et al. Expires February 14, 2020 [Page 10] Internet-Draft Yang-Push Notification Capabilities August 2019 default "false"; description "Specifies the default value for top level config=false data nodes for the on-change-supported capability."; } list per-node-capabilities { key "node-selector"; description "A list of data nodes that have either a throughput or on-change-notification capability specifically defined. Should be used only when specific data nodes support capabilities that are different from capabilities of their parent nodes or the default for the datastore."; leaf node-selector { type nacm:node-instance-identifier; description "Selects the data nodes for which a capability is specified."; } uses datastore-subscription-throughput-capabilities { description "Throughput capabilities for a specific data node. These values will override top level or datastore specific values."; } leaf on-change-supported { if-feature yp:on-change ; type boolean; mandatory true; description "Specifies whether the server is capable of sending on-change notifications for the selected data nodes."; } } } } } Lengyel, et al. Expires February 14, 2020 [Page 11] Internet-Draft Yang-Push Notification Capabilities August 2019 4. 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 data in this module is not security sensitive. 5. IANA Considerations 5.1. The IETF XML Registry This document registers one URI in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the following registrations are requested: URI: urn:ietf:params:xml:ns:yang:ietf-notification-capabilities Registrant Contact: The NETCONF WG of the IETF. XML: N/A, the requested URI is an XML namespace. 5.2. The YANG Module Names Registry This document registers one YANG module in the YANG Module Names registry [RFC7950]. Following the format in [RFC7950], the the following registrations are requested: name: ietf-notification-capabilities namespace: urn:ietf:params:xml:ns:yang:ietf-notification-capabilities prefix: inc reference: RFC XXXX 6. Open Issues - Lengyel, et al. Expires February 14, 2020 [Page 12] Internet-Draft Yang-Push Notification Capabilities August 2019 7. References 7.1. Normative References [I-D.ietf-netconf-yang-push] Clemm, A. and E. Voit, "Subscription to YANG Datastores", draft-ietf-netconf-yang-push-25 (work in progress), May 2019. [I-D.ietf-netmod-yang-instance-file-format] Lengyel, B. and B. Claise, "YANG Instance Data File Format", draft-ietf-netmod-yang-instance-file-format-04 (work in progress), August 2019. [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, . [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, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . 7.2. Informative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . Lengyel, et al. Expires February 14, 2020 [Page 13] Internet-Draft Yang-Push Notification Capabilities August 2019 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, . Appendix A. Instance data examples The following example is instance-data describing the notification capabilities of a hypothetical "acme-switch". The switch implements the running, candidate and operational datastores. Every change can be reported on-change from running, nothing from candidate and all config=false data from operational. Lengyel, et al. Expires February 14, 2020 [Page 14] Internet-Draft Yang-Push Notification Capabilities August 2019 acme-switch-notification-capabilities ietf-notification-capabilities@2019-08-13.yang Notification capabilities of acme-switch. Acme-switch implements the running, candidate and operational datastores. Every change can be reported on-change from running, nothing from candidate and all config=false data from operational. 500 2000 100 running operational false true Figure 1: Notification Capabilities with default settings The following is the instance-data describing the notification capabilities of a hypothetical "acme-router". The router implements the running, and operational datastores. Every change can be reported on-change from running, but only config=true nodes and some Lengyel, et al. Expires February 14, 2020 [Page 15] Internet-Draft Yang-Push Notification Capabilities August 2019 config=false data from operational. Interface statistics are not reported on-change only 2 important counters. acme-router-notification-capabilities ietf-notification-capabilities@2019-08-13.yang Defines the notification capabilities of an acme-router. The router only has running, and operational datastores. Every change can be reported on-change from running, but only config=true nodes and some config=false data from operational. Statistics are not reported on-change only 2 important counters, for these a smaller dampening period is possible. 500 2000 100 running operational true /if:interfaces/if:interface/if:statistics false /if:interfaces/if:interface/if:statistics/if:in-octets 10 true Lengyel, et al. Expires February 14, 2020 [Page 16] Internet-Draft Yang-Push Notification Capabilities August 2019 /if:interfaces/if:interface/if:statistics/if:out-octets true 10 Figure 2: Notification Capabilities with data node specific settings Appendix B. Changes between revisions v02 - v03 o Allow throughput related capabilities to be defined on top, datastore or data node level. Described that specific capability values always override generic ones. o Indicate that non-NMDA servers can also use this model. o Updated according to draft-ietf-netmod-yang-instance-file- format-04 v01 - v02 o Added instance data examples o On-change capability can be defined per datastore o Added "if-feature yp:on-change" where relevant o Unified units used v00 - v01 o Add more capabilities: minimum period, supported period max-number of objects, min dampening period, dampening supported Authors' Addresses Lengyel, et al. Expires February 14, 2020 [Page 17] Internet-Draft Yang-Push Notification Capabilities August 2019 Balazs Lengyel Ericsson Magyar Tudosok korutja 11 1117 Budapest Hungary Email: balazs.lengyel@ericsson.com Alexander Clemm Futurewei 2330 Central Expressway Santa Clara, CA 95050 USA Email: ludwig@clemm.org Benoit Claise Cisco Systems, Inc. De Kleetlaan 6a b1 1831 Diegem Belgium Email: bclaise@cisco.com Lengyel, et al. Expires February 14, 2020 [Page 18]