diff --git a/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.txt b/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.txt index e9a926f..1e7ddf1 100644 --- a/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.txt +++ b/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.txt @@ -5,12 +5,12 @@ Network Working Group R. Wilton Internet-Draft R. Rahman Intended status: Standards Track J. Clarke -Expires: August 30, 2020 Cisco Systems, Inc. +Expires: August 31, 2020 Cisco Systems, Inc. J. Sterne Nokia B. Wu Huawei - February 27, 2020 + February 28, 2020 YANG Schema Selection @@ -36,14 +36,14 @@ Status of This Memo 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/. + Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on August 30, 2020. + This Internet-Draft will expire on August 31, 2020. Copyright Notice @@ -53,14 +53,14 @@ Copyright Notice -Wilton, et al. Expires August 30, 2020 [Page 1] +Wilton, et al. Expires August 31, 2020 [Page 1] Internet-Draft YANG Schema Selection February 2020 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 + (http://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 @@ -88,28 +88,28 @@ Table of Contents 7.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 12 8. Limitations of the solution . . . . . . . . . . . . . . . . . 13 9. Schema Selection YANG module . . . . . . . . . . . . . . . . 13 - 10. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 15 + 10. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 14 11. Security Considerations . . . . . . . . . . . . . . . . . . . 20 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 12.1. NETCONF Capability URNs . . . . . . . . . . . . . . . . 20 - 13. Open Questions/Issues . . . . . . . . . . . . . . . . . . . . 21 + 13. Open Questions/Issues . . . . . . . . . . . . . . . . . . . . 20 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 15.1. Normative References . . . . . . . . . . . . . . . . . . 21 - 15.2. Informative References . . . . . . . . . . . . . . . . . 23 + 15.2. Informative References . . . . . . . . . . . . . . . . . 22 Appendix A. Schema selection examples . . . . . . . . . . . . . 23 A.1. Supporting older versions of a schema . . . . . . . . . . 23 A.1.1. Variation - Multiple selectable schema-sets . . . . . 26 A.2. Supporting different schema families . . . . . . . . . . 26 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 30 + A.2.1. Choosing a single schema family . . . . . . . . . . . 30 + A.2.2. Restricting some sessions to particular schema family 30 + A.2.3. Custom combinable schema-set . . . . . . . . . . . . 30 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 - - - -Wilton, et al. Expires August 30, 2020 [Page 2] +Wilton, et al. Expires August 31, 2020 [Page 2] Internet-Draft YANG Schema Selection February 2020 @@ -142,14 +142,11 @@ Internet-Draft YANG Schema Selection February 2020 version number, e.g., as might be described by a YANG package[I-D.rwilton-netmod-yang-packages]. - o schema set: A named set of datastore schemas for supported + o schema-set: A named set of datastore schemas for supported datastores, where every datastore schema is specified as a union - of compatible YANG packages. A schema set is the basic unit of + of compatible YANG packages. A schema-set is the basic unit of client schema selection. - TODO - 'YANG schema' and 'versioned schema' could be defined in the - packages draft. - 2. Introduction This document describes how NETCONF and RESTCONF clients can use @@ -162,18 +159,17 @@ Internet-Draft YANG Schema Selection February 2020 YANG Semver [I-D.verdt-netmod-yang-semver], based on YANG Module Versioning, specifies a partial solution to the YANG versioning requirements that focuses on using semantic versioning within + individual YANG modules, but does not address all requirements listed + in the YANG versioning requirements document. Of particular + relevance here, requirements 3.1 and 3.2 are not addressed. -Wilton, et al. Expires August 30, 2020 [Page 3] +Wilton, et al. Expires August 31, 2020 [Page 3] Internet-Draft YANG Schema Selection February 2020 - individual YANG modules, but does not address all requirements listed - in the YANG versioning requirements document. Of particular - relevance here, requirements 3.1 and 3.2 are not addressed. - YANG Packages describes how sets of related YANG module revisions can be grouped together into a logical entity that defines a YANG schema. Different packages can be defined for different sets of YANG modules, @@ -221,7 +217,11 @@ Internet-Draft YANG Schema Selection February 2020 -Wilton, et al. Expires August 30, 2020 [Page 4] + + + + +Wilton, et al. Expires August 31, 2020 [Page 4] Internet-Draft YANG Schema Selection February 2020 @@ -277,7 +277,7 @@ Internet-Draft YANG Schema Selection February 2020 -Wilton, et al. Expires August 30, 2020 [Page 5] +Wilton, et al. Expires August 31, 2020 [Page 5] Internet-Draft YANG Schema Selection February 2020 @@ -333,7 +333,7 @@ Internet-Draft YANG Schema Selection February 2020 -Wilton, et al. Expires August 30, 2020 [Page 6] +Wilton, et al. Expires August 31, 2020 [Page 6] Internet-Draft YANG Schema Selection February 2020 @@ -389,7 +389,7 @@ Internet-Draft YANG Schema Selection February 2020 -Wilton, et al. Expires August 30, 2020 [Page 7] +Wilton, et al. Expires August 31, 2020 [Page 7] Internet-Draft YANG Schema Selection February 2020 @@ -399,11 +399,6 @@ Internet-Draft YANG Schema Selection February 2020 from being selected at the same time. Hence, each schema-set lists the other schema-sets that it compatible with. - TODO - It also makes sense for schema-sets to be made available - offline in YANG instance-data documents. The intention is that the - ietf-schema-selection YANG module should be usable in a YANG instance - data document. - 5.3. Defining and changing client selectable schema-sets A device may have to allocate resources to support selectable schema- @@ -441,22 +436,20 @@ Internet-Draft YANG Schema Selection February 2020 The server sends a comma separated list (with no white spaces) of selectable schema-sets it supports. For consistency, the list SHOULD contain the default selectable schema-set first, followed by the + remaining selectable schema-sets, matching the order in the '/schema- + set-selection/selectable' leaf-list. + This capability is used by clients to select a particular schema. + The client sends an ordered list of selectable schema that it is + willing to use. -Wilton, et al. Expires August 30, 2020 [Page 8] +Wilton, et al. Expires August 31, 2020 [Page 8] Internet-Draft YANG Schema Selection February 2020 - remaining selectable schema-sets, matching the order in the '/schema- - set-selection/selectable' leaf-list. - - This capability is used by clients to select a particular schema. - The client sends an ordered list of selectable schema that it is - willing to use. - The selected schema is the first entry in the client schema-set list that is also contained in the server schema-set list. If there is no common entry then the session is terminated with an error. @@ -497,18 +490,22 @@ Internet-Draft YANG Schema Selection February 2020 schema version 2.1.0, but can also use version 1.3.1. Because both the client and server support version 2.1.0, and because the client listed it first, the selected schema-set is example-ietf- + routing@2.1.0: Some extra white spaces have been added for display + purposes only. + -Wilton, et al. Expires August 30, 2020 [Page 9] + + + + +Wilton, et al. Expires August 31, 2020 [Page 9] Internet-Draft YANG Schema Selection February 2020 - routing@2.1.0: Some extra white spaces have been added for display - purposes only. - urn:ietf:params:netconf:base:1.1 @@ -552,22 +549,19 @@ Internet-Draft YANG Schema Selection February 2020 3. /restconf/schema/vendor-schema@X.Y.Z/operations/module-B:op-Y for RPC "op-Y" defined in module "module-B" + 4. /restconf/schema/vendor-schema@X.Y.Z/data/module-C:containerZ/ + myaction for action "myaction" defined in top-container + "containerZ" of module "module-C" + Examples for servers which are NMDA-compliant as per [RFC8527]: - -Wilton, et al. Expires August 30, 2020 [Page 10] +Wilton, et al. Expires August 31, 2020 [Page 10] Internet-Draft YANG Schema Selection February 2020 - 4. /restconf/schema/vendor-schema@X.Y.Z/data/module-C:containerZ/ - myaction for action "myaction" defined in top-container - "containerZ" of module "module-C" - - Examples for servers which are NMDA-compliant as per [RFC8527]: - 1. /restconf/schema/vendor-schema@X.Y.Z/ds// for datastore resources, e.g. /restconf/schema/vendor- schema@X.Y.Z/ds/ietf-datastores:running refers to the Running @@ -610,19 +604,20 @@ Internet-Draft YANG Schema Selection February 2020 the different schema. The expectation is that this would be achieved by mapping all requests to the device's native schema version. + Datastore validation MAY need to be performed in two places, firstly + in whichever schema a client is interacting in, and secondly in the + native schema for the device. This could have a negative performance + impact. + -Wilton, et al. Expires August 30, 2020 [Page 11] + +Wilton, et al. Expires August 31, 2020 [Page 11] Internet-Draft YANG Schema Selection February 2020 - Datastore validation MAY need to be performed in two places, firstly - in whichever schema a client is interacting in, and secondly in the - native schema for the device. This could have a negative performance - impact. - Depending on the complexity of the mappings between schema versions, it may be necessary for the mappings to be stateful. @@ -642,7 +637,9 @@ Internet-Draft YANG Schema Selection February 2020 returned matches the schema-set that has been selected by the client. The selection of a schema-set by a client MUST NOT change the - behavior of other clients connected using a different schema set. + behaviour of the server experienced by other clients. For example, + the get-data response to one client MUST be the same before and after + another client selects a schema-set. The server may not support a schema with the exact version desired by the client, and the client may have to choose a later version that is @@ -658,8 +655,7 @@ Internet-Draft YANG Schema Selection February 2020 If clients interact with a server using multiple versions, they should not expect that all data nodes in later module versions can - always be backported to older schema versions. TODO - Specify how - mapping errors can be reported to client. + always be backported to older schema versions. 7.1. Examples @@ -667,15 +663,17 @@ Internet-Draft YANG Schema Selection February 2020 schema-set with a server that has multiple schema-sets in the 'selectable' leaf-list: + 1. Disconnect the current session + + + -Wilton, et al. Expires August 30, 2020 [Page 12] +Wilton, et al. Expires August 31, 2020 [Page 12] Internet-Draft YANG Schema Selection February 2020 - 1. Disconnect the current session - 2. Reconnect and select a new schema-set from the 'selectable' leaf- list @@ -719,37 +717,23 @@ Internet-Draft YANG Schema Selection February 2020 9. Schema Selection YANG module - The YANG schema selection YANG module is used by a device to report - the schema-sets that are available, and to allow clients to choose - which schema-set they wish to use. + The YANG schema selection YANG module is used by a server to report + the schema-sets that are generally available, and to allow clients to + configure which schema-sets are available for client selection and + which is the default. -Wilton, et al. Expires August 30, 2020 [Page 13] + +Wilton, et al. Expires August 31, 2020 [Page 13] Internet-Draft YANG Schema Selection February 2020 - Feature are used to allow servers to decide whether they allow the - primary schema-set to be changed, and/or allow secondary schema-sets - to be configured. - - The primary schema-set is the datastore schema reported by YANG - Library. - - If secondary schema-sets are configured: - - With NETCONF, the "select-schema-sets" RPC is used by the client - to chosse which schema-set(s) it wants to use for the current - NETCONF session. - - With RESTCONF, the configured root path prefix is used by the - client for a particular schema-set. + Custom schema-sets, if supported, allows clients to configure custom + combinations of schema-sets that can then be selected by clients. - Different schema-sets may support different datastores. - - The "ietf-schema-version-selection" YANG module has the following - structure: + The "ietf-schema-selection" YANG module has the following structure: module: ietf-schema-selection @@ -771,28 +755,20 @@ Internet-Draft YANG Schema Selection February 2020 | +--ro name -> /pkgs:packages/package/name | +--ro version leafref | +--ro checksum? leafref - +--ro compatible-with* + +--ro selectable-with* | -> /schema-set-selection/schema-set/name +--ro custom-selectable! {custom-schema-set}? - +--ro combinable* + +--ro combinable-with* -> /schema-set-selection/schema-set/name - - - -Wilton, et al. Expires August 30, 2020 [Page 14] - -Internet-Draft YANG Schema Selection February 2020 - - 10. YANG Module The YANG module definition for the module described in the previous sections. - file "ietf-schema-version-selection@2019-11-29.yang" + file "ietf-schema-selection@2019-02-14.yang" module ietf-schema-selection { yang-version 1.1; namespace @@ -802,6 +778,14 @@ Internet-Draft YANG Schema Selection February 2020 import ietf-yang-revisions { prefix rev; reference "XXXX: Updated YANG Module Revision Handling"; + + + +Wilton, et al. Expires August 31, 2020 [Page 14] + +Internet-Draft YANG Schema Selection February 2020 + + } import ietf-datastores { @@ -835,13 +819,6 @@ Internet-Draft YANG Schema Selection February 2020 "This module provide a data model to advertise and allow the selection of schema versions by clients. - - -Wilton, et al. Expires August 30, 2020 [Page 15] - -Internet-Draft YANG Schema Selection February 2020 - - Copyright (c) 2019 IETF Trust and the persons identified as authors of the code. All rights reserved. @@ -857,6 +834,14 @@ Internet-Draft YANG Schema Selection February 2020 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + + + +Wilton, et al. Expires August 31, 2020 [Page 15] + +Internet-Draft YANG Schema Selection February 2020 + + '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."; @@ -890,14 +875,6 @@ Internet-Draft YANG Schema Selection February 2020 presence "Enable schema selection"; description - - - -Wilton, et al. Expires August 30, 2020 [Page 16] - -Internet-Draft YANG Schema Selection February 2020 - - "YANG schema-set selection. Contains configuration and state related to client selectable @@ -913,6 +890,14 @@ Internet-Draft YANG Schema Selection February 2020 description "Specifies the selectable schema used by this server, that can be selected by clients (either through NETCONF + + + +Wilton, et al. Expires August 31, 2020 [Page 16] + +Internet-Draft YANG Schema Selection February 2020 + + capability negotiation or RESTCONF schema specific path)."; } @@ -946,14 +931,6 @@ Internet-Draft YANG Schema Selection February 2020 '@'. The selectable-schema name is used in NETCONF capabilties - - - -Wilton, et al. Expires August 30, 2020 [Page 17] - -Internet-Draft YANG Schema Selection February 2020 - - negotiation and also the RESTCONF path (XXX, is encoding required, e.g. for '@'?)"; } @@ -969,6 +946,14 @@ Internet-Draft YANG Schema Selection February 2020 path "/schema-set-selection/schema-set/name"; require-instance false; } + + + +Wilton, et al. Expires August 31, 2020 [Page 17] + +Internet-Draft YANG Schema Selection February 2020 + + description "Lists the schema that are combined together into a single selectable schema (i.e. via a union operation on each @@ -1002,14 +987,6 @@ Internet-Draft YANG Schema Selection February 2020 the full configurable schema of the device."; } - - - -Wilton, et al. Expires August 30, 2020 [Page 18] - -Internet-Draft YANG Schema Selection February 2020 - - list datastore { key "name"; @@ -1025,6 +1002,14 @@ Internet-Draft YANG Schema Selection February 2020 with."; reference "RFC 8342: Network Management Datastore Architecture + + + +Wilton, et al. Expires August 31, 2020 [Page 18] + +Internet-Draft YANG Schema Selection February 2020 + + (NMDA)"; } @@ -1041,31 +1026,13 @@ Internet-Draft YANG Schema Selection February 2020 operational, that are defined as being read-only."; } - list package { - key "name version"; - - description - "YANG packages that define the datastore schema - - The datastore schema is defined as the union of all - datastore packages."; - - uses pkgs:yang-pkg-ref; - } + uses pkgs:yang-ds-pkg-ref; } - leaf-list compatible-with { + leaf-list selectable-with { type leafref { path "/schema-set-selection/schema-set/name"; } - - - -Wilton, et al. Expires August 30, 2020 [Page 19] - -Internet-Draft YANG Schema Selection February 2020 - - description "Lists other schema-sets that MAY be selected at the same time as this schema."; @@ -1081,7 +1048,7 @@ Internet-Draft YANG Schema Selection February 2020 custom schema-set and also lists other schema-sets that may be combined together into a custom schema-set."; - leaf-list combinable { + leaf-list combinable-with { type leafref { path "/schema-set-selection/schema-set/name"; } @@ -1091,6 +1058,14 @@ Internet-Draft YANG Schema Selection February 2020 } } } + + + +Wilton, et al. Expires August 31, 2020 [Page 19] + +Internet-Draft YANG Schema Selection February 2020 + + } } @@ -1102,7 +1077,21 @@ Internet-Draft YANG Schema Selection February 2020 12. IANA Considerations - TODO - Add registrations for YANG modules defined in this document. + This document requests IANA to registers a URI in the "IETF XML + Registry" [RFC3688]. Following the format in RFC 3688, the following + registrations are requested. + + URI: urn:ietf:params:xml:ns:yang:ietf-schema-selection + Registrant Contact: The IESG. + XML: N/A, the requested URI is an XML namespace. + + This document requests that the following YANG modules are added in + the "YANG Module Names" registry [RFC6020]: + + Name: ietf-schema-selection.yang + Namespace: urn:ietf:params:xml:ns:yang:ietf-schema-selection + Prefix: schema + Reference: RFC XXXX This document registers a URI. @@ -1113,15 +1102,6 @@ Internet-Draft YANG Schema Selection February 2020 Capability URNs" needs to be updated to include the following capability. - - - - -Wilton, et al. Expires August 30, 2020 [Page 20] - -Internet-Draft YANG Schema Selection February 2020 - - Index Capability Identifier ------------------------- @@ -1134,6 +1114,14 @@ Internet-Draft YANG Schema Selection February 2020 at: https://github.com/netmod-wg/yang-ver-dt/labels/version- selection-solution + + + +Wilton, et al. Expires August 31, 2020 [Page 20] + +Internet-Draft YANG Schema Selection February 2020 + + 14. Acknowledgements The ideas that formed this draft are based on discussions with the @@ -1170,22 +1158,30 @@ Internet-Draft YANG Schema Selection February 2020 verdt-netmod-yang-versioning-reqs-02 (work in progress), November 2018. + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, + DOI 10.17487/RFC2119, March 1997, . + + [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, + DOI 10.17487/RFC3688, January 2004, . + -Wilton, et al. Expires August 30, 2020 [Page 21] + + + +Wilton, et al. Expires August 31, 2020 [Page 21] Internet-Draft YANG Schema Selection February 2020 - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, - DOI 10.17487/RFC2119, March 1997, - . - - [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, . [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol @@ -1194,8 +1190,8 @@ Internet-Draft YANG Schema Selection February 2020 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, - DOI 10.17487/RFC6536, March 2012, - . + DOI 10.17487/RFC6536, March 2012, . [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, @@ -1216,26 +1212,28 @@ Internet-Draft YANG Schema Selection February 2020 [RFC8525] Bierman, A., Bjorklund, M., Schoenwaelder, J., Watsen, K., and R. Wilton, "YANG Library", RFC 8525, - DOI 10.17487/RFC8525, March 2019, - . + DOI 10.17487/RFC8525, March 2019, . [RFC8527] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "RESTCONF Extensions to Support the Network Management Datastore Architecture", RFC 8527, - DOI 10.17487/RFC8527, March 2019, - . + DOI 10.17487/RFC8527, March 2019, . + +15.2. Informative References + -Wilton, et al. Expires August 30, 2020 [Page 22] + +Wilton, et al. Expires August 31, 2020 [Page 22] Internet-Draft YANG Schema Selection February 2020 -15.2. Informative References - [I-D.ietf-netmod-artwork-folding] Watsen, K., Auerswald, E., Farrel, A., and Q. WU, "Handling Long Lines in Inclusions in Internet-Drafts and @@ -1281,18 +1279,17 @@ A.1. Supporting older versions of a schema vendor-schema@2.1.0, a preceding NBC software version - vendor-schema@1.3.1, a preceding NBC software version + vendor-schema@1.4.5, a preceding NBC software version + + Schema selection data from the operational state datastore: -Wilton, et al. Expires August 30, 2020 [Page 23] +Wilton, et al. Expires August 31, 2020 [Page 23] Internet-Draft YANG Schema Selection February 2020 - Schema selection data from the operational state datastore: - - @@ -1331,24 +1328,24 @@ Internet-Draft YANG Schema Selection February 2020 3.0.0 - vendor-schema@1.4.5 - vendor-schema@2.1.0 + vendor-schema@1.4.5 + vendor-schema@2.1.0 vendor-schema@2.1.0 ds:running + + vendor-schema + 2.1.0 -Wilton, et al. Expires August 30, 2020 [Page 24] +Wilton, et al. Expires August 31, 2020 [Page 24] Internet-Draft YANG Schema Selection February 2020 - - vendor-schema - 2.1.0 @@ -1358,8 +1355,8 @@ Internet-Draft YANG Schema Selection February 2020 2.1.0 - vendor-schema@1.4.5 - vendor-schema@3.0.0 + vendor-schema@1.4.5 + vendor-schema@3.0.0 vendor-schema@1.4.5 @@ -1377,8 +1374,8 @@ Internet-Draft YANG Schema Selection February 2020 1.4.5 - vendor-schema@2.1.0 - vendor-schema@3.0.0 + vendor-schema@2.1.0 + vendor-schema@3.0.0 @@ -1393,18 +1390,18 @@ Internet-Draft YANG Schema Selection February 2020 NETCONF sessions (that were previously interacting using vendor- schema@3.0.0) will be closed, and clients need to reconnect, at which point they will interact with schema-set vendor-schema@1.4.5, and + also see the contents of YANG library updated to reflect the + datastore-schema reported in vendor-schema@1.4.5. + -Wilton, et al. Expires August 30, 2020 [Page 25] +Wilton, et al. Expires August 31, 2020 [Page 25] Internet-Draft YANG Schema Selection February 2020 - also see the contents of YANG library updated to reflect the - datastore-schema reported in vendor-schema@1.4.5. - Configuration a new default selectable schema: @@ -1447,204 +1444,262 @@ A.2. Supporting different schema families Some devices may allow clients to configure the device using different YANG schema (e.g. vendor native, vs IETF, vs OpenConfig). - TODO - Expand description + This example illustrates a device is that capable of supporting 3 + different schema families (native, oc, ietf). + + + + + + vendor-schema + 1.0.0 + + vendor-interfaces + + + + + ietf-schema + 1.0.0 + + ietf-interfaces + + + + + oc-schema + 1.0.0 + + openconfig-interfaces + + + + + + + combined-schema + + ds:running + + vendor-schema + 1.0.0 + + + ietf-schema + 1.0.0 + + + oc-schema + 1.0.0 + + + + ds:operational + + + +Wilton, et al. Expires August 31, 2020 [Page 27] + +Internet-Draft YANG Schema Selection February 2020 -This example illustrates a device is that capable of supporting 3 different schema families (native, oc, ietf). -The clients may configure the device in three different ways: + + vendor-schema + 1.0.0 + + + ietf-schema + 1.0.0 + + + oc-schema + 1.0.0 + + + + + vendor-schema + + + ds:running + + vendor-schema + 1.0.0 + + + + ds:operational + + vendor-schema + 1.0.0 + + + combined-schema + ietf-schema + oc-schema + + ietf-schema + oc-schema + + + + ietf-schema + + + ds:running + + ietf-schema + 1.0.0 + -(1) If the client wants to use a single schema family for all interactions with the device then they can choose a single schema-set and configure it as the default schema-set: - - - - oc-schema - oc-schema - - +Wilton, et al. Expires August 31, 2020 [Page 28] + +Internet-Draft YANG Schema Selection February 2020 -(2) If the clients wants to use multiple schema families, but restrict some interactions to a particular schema family, then they configure the default schema as "combined-schema", but also configure their desired secondary schema (any combination or "vendor-schema", "ietf-schema" or "oc-schema"). - - - - combined-schema - oc-schema - combined-schema - - + + + ds:operational + + ietf-schema + 1.0.0 + + + combined-schema + vendor-schema + oc-schema + + vendor-schema + + + + oc-schema + + + ds:running + + oc-schema + 1.0.0 + + + + ds:operational + + oc-schema + 1.0.0 + + + combined-schema + vendor-schema + ietf-schema + + vendor-schema + + + + + -(3) If there is a need for the client to use ietf or OC schema alongside the vendor schema, then this can be achieved by configuring a custom schema. Two custom schema can be configured, either "vendor + ietf schema", or "vendor + oc schema". Once the custom schema has been configured then it could be used either as the single default schema, or it could be used as a selectable schema with the default schema set to "combined-schema". + The clients may configure the device in three different ways. - - - - - my-custom-schema - Restrict the primary schema to OC and vendor - vendor-schema - oc-schema - - my-custom-schema - my-custom-schema - - -Note, for the last case, rather than requiring the client to configure custom schema, the device could predefine "vendor + ietf" and "vendor + oc" schema-sets. -Wilton, et al. Expires August 30, 2020 [Page 27] +Wilton, et al. Expires August 31, 2020 [Page 29] Internet-Draft YANG Schema Selection February 2020 - - - - - - vendor-schema - 1.0.0 - - vendor-interfaces - - - - - ietf-schema - 1.0.0 - - ietf-interfaces - - - - - oc-schema - 1.0.0 - - openconfig-interfaces - - - - - - - full-schema - - vendor-schema - 1.0.0 - - - ietf-schema - 1.0.0 - - - oc-schema - 1.0.0 - - - ds:running - - - - - -Wilton, et al. Expires August 30, 2020 [Page 28] - -Internet-Draft YANG Schema Selection February 2020 +A.2.1. Choosing a single schema family + + A client that wishes to use a single schema family for all + interactions with the device can choose a single schema-set and + configure it as the default schema-set: + + + + + + oc-schema + oc-schema + + + + +A.2.2. Restricting some sessions to particular schema family + + If a client wishes to use multiple schema families for configuration, + but restrict some sessions to a particular schema family, then they + may configure the default schema as "combined-schema", but also 'oc- + schema' that can be selected via client sessions as a named schema- + set. + + + + + + combined-schema + oc-schema + combined-schema + + + + +A.2.3. Custom combinable schema-set + + If there is a need for the client to use IETF or OC schema alongside + the vendor schema, then this can be achieved by configuring a custom + schema-set. Two custom schema-sets can be configured, either "vendor + + ietf schema", or "vendor + oc schema". The example below defines + and selects a custom schema-set that combines the vendor and OC + schema-sets. + + + + - ds:operational - - - - vendor-schema - - - vendor-schema - 1.0.0 - - - ds:running - - - ds:operational - - combined-schema - ietf-schema - oc-schema - - ietf-schema - oc-schema - - - - ietf-schema - - - ietf-schema - 1.0.0 - - - ds:running - - - ds:operational - - combined-schema - vendor-schema - oc-schema - - vendor-schema - - - - oc-schema - - - - - -Wilton, et al. Expires August 30, 2020 [Page 29] + + +Wilton, et al. Expires August 31, 2020 [Page 30] Internet-Draft YANG Schema Selection February 2020 - oc-schema - 1.0.0 - - - ds:running - - - ds:operational - - combined-schema - vendor-schema - ietf-schema - - vendor-schema - - - - - + + + + + my-custom-schema + Vendor and OC schema-sets only + vendor-schema + oc-schema + + my-custom-schema + my-custom-schema + + + + + Note, for the last case, rather than requiring the client to + configure custom schema, the device could predefine "vendor + ietf" + and "vendor + oc" as named schema-sets available for selection. Authors' Addresses @@ -1677,7 +1732,8 @@ Authors' Addresses -Wilton, et al. Expires August 30, 2020 [Page 30] + +Wilton, et al. Expires August 31, 2020 [Page 31] Internet-Draft YANG Schema Selection February 2020 @@ -1733,4 +1789,4 @@ Internet-Draft YANG Schema Selection February 2020 -Wilton, et al. Expires August 30, 2020 [Page 31] +Wilton, et al. Expires August 31, 2020 [Page 32] diff --git a/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.xml b/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.xml index 9594801..57c6c01 100644 --- a/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.xml +++ b/yang-ver-selection/draft-wilton-netmod-yang-ver-selection.xml @@ -1037,7 +1037,8 @@ module ietf-schema-selection { - + @@ -1199,9 +1200,9 @@ module ietf-schema-selection {
- If the clients wishes to use multiple schema families for configuration, but restrict + If a client wishes to use multiple schema families for configuration, but restrict some sessions to a particular schema family, then they may configure the default schema as - "combined-schema", but also allow secondary schema to be selected. + "combined-schema", but also 'oc-schema' that can be selected via client sessions as a named schema-set.
@@ -1219,10 +1220,10 @@ module ietf-schema-selection {
- If there is a need for the client to use ietf or OC schema alongside the vendor schema, + If there is a need for the client to use IETF or OC schema alongside the vendor schema, then this can be achieved by configuring a custom schema-set. Two custom schema-sets can be configured, either "vendor + ietf schema", or "vendor + oc schema". The example below - defines and selects a custom schema-set that combines the vandor and oc schema-sets. + defines and selects a custom schema-set that combines the vendor and OC schema-sets.
@@ -1232,7 +1233,7 @@ module ietf-schema-selection { my-custom-schema - Restrict the primary schema to OC and vendor + Vendor and OC schema-sets only vendor-schema oc-schema @@ -1244,7 +1245,7 @@ module ietf-schema-selection {
Note, for the last case, rather than requiring the client to configure custom schema, the - device could predefine "vendor + ietf" and "vendor + oc" schema-sets. + device could predefine "vendor + ietf" and "vendor + oc" as named schema-sets available for selection.