draft-ietf-netmod-schema-mount-10.txt | draft-ietf-netmod-schema-mount-11.txt | |||
---|---|---|---|---|
Network Working Group M. Bjorklund | Network Working Group M. Bjorklund | |||
Internet-Draft Tail-f Systems | Internet-Draft Tail-f Systems | |||
Intended status: Standards Track L. Lhotka | Intended status: Standards Track L. Lhotka | |||
Expires: October 14, 2018 CZ.NIC | Expires: February 8, 2019 CZ.NIC | |||
April 12, 2018 | August 7, 2018 | |||
YANG Schema Mount | YANG Schema Mount | |||
draft-ietf-netmod-schema-mount-10 | draft-ietf-netmod-schema-mount-11 | |||
Abstract | Abstract | |||
This document defines a mechanism to add the schema trees defined by | This document defines a mechanism to add the schema trees defined by | |||
a set of YANG modules onto a mount point defined in the schema tree | a set of YANG modules onto a mount point defined in the schema tree | |||
in some YANG module. | in some YANG module. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
skipping to change at page 1, line 33 ¶ | skipping to change at page 1, line 33 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at http://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 | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on October 14, 2018. | This Internet-Draft will expire on February 8, 2019. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(http://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 | publication of this document. Please review these documents | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
2. Terminology and Notation . . . . . . . . . . . . . . . . . . 5 | 2. Terminology and Notation . . . . . . . . . . . . . . . . . . 5 | |||
2.1. Glossary of New Terms . . . . . . . . . . . . . . . . . . 6 | 2.1. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 6 | |||
2.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 6 | 2.2. Namespace Prefixes . . . . . . . . . . . . . . . . . . . 6 | |||
2.3. Namespace Prefixes . . . . . . . . . . . . . . . . . . . 6 | ||||
3. Schema Mount . . . . . . . . . . . . . . . . . . . . . . . . 7 | 3. Schema Mount . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
3.1. Mount Point Definition . . . . . . . . . . . . . . . . . 7 | 3.1. Mount Point Definition . . . . . . . . . . . . . . . . . 7 | |||
3.2. Data Model . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.2. Data Model . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
3.3. Specification of the Mounted Schema . . . . . . . . . . . 8 | 3.3. Specification of the Mounted Schema . . . . . . . . . . . 8 | |||
3.4. Multiple Levels of Schema Mount . . . . . . . . . . . . . 9 | 3.4. Multiple Levels of Schema Mount . . . . . . . . . . . . . 9 | |||
4. Referring to Data Nodes in the Parent Schema . . . . . . . . 9 | 4. Referring to Data Nodes in the Parent Schema . . . . . . . . 9 | |||
5. RPC operations and Notifications . . . . . . . . . . . . . . 10 | 5. RPC operations and Notifications . . . . . . . . . . . . . . 10 | |||
6. Network Management Datastore Architecture (NMDA) | 6. Network Management Datastore Architecture (NMDA) | |||
Considerations . . . . . . . . . . . . . . . . . . . . . . . 11 | Considerations . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
7. Interaction with the Network Configuration Access Control | 7. Interaction with the Network Configuration Access Control | |||
skipping to change at page 3, line 17 ¶ | skipping to change at page 3, line 17 ¶ | |||
these mechanisms are realized through the following YANG statements: | these mechanisms are realized through the following YANG statements: | |||
o The "uses" statement explicitly incorporates the contents of a | o The "uses" statement explicitly incorporates the contents of a | |||
grouping defined in the same or another module. See Section 4.2.6 | grouping defined in the same or another module. See Section 4.2.6 | |||
of [RFC7950] for more details. | of [RFC7950] for more details. | |||
o The "augment" statement explicitly adds contents to a target node | o The "augment" statement explicitly adds contents to a target node | |||
defined in the same or another module. See Section 4.2.8 of | defined in the same or another module. See Section 4.2.8 of | |||
[RFC7950] for more details. | [RFC7950] for more details. | |||
With both mechanisms, the source or target YANG module explicitly | With both mechanisms, the YANG module with the "uses" or "augment" | |||
defines the exact location in the schema tree where the new nodes are | statement explicitly defines the exact location in the schema tree | |||
placed. | where the new nodes are placed. | |||
In some cases these mechanisms are not sufficient; it is sometimes | In some cases these mechanisms are not sufficient; it is sometimes | |||
necessary that an existing module (or a set of modules) is added to | necessary that an existing module (or a set of modules) is added to | |||
the data model starting at locations other than the root. For | the data model starting at locations other than the root. For | |||
example, YANG modules such as "ietf-interfaces" [RFC8343] are defined | example, YANG modules such as "ietf-interfaces" [RFC8343] are defined | |||
so as to be used in a data model of a physical device. Now suppose | so as to be used in a data model of a physical device. Now suppose | |||
we want to model a device that supports multiple logical devices | we want to model a device that supports multiple logical devices | |||
[I-D.ietf-rtgwg-lne-model], each of which has its own instantiation | [I-D.ietf-rtgwg-lne-model], each of which has its own instantiation | |||
of "ietf-interfaces", and possibly other modules, but, at the same | of "ietf-interfaces", and possibly other modules, but, at the same | |||
time, we want to be able to manage all these logical devices from the | time, we want to be able to manage all these logical devices from the | |||
skipping to change at page 5, line 14 ¶ | skipping to change at page 5, line 14 ¶ | |||
scope of this document, and could be possibly dealt with in a future | scope of this document, and could be possibly dealt with in a future | |||
revision of the YANG data modeling language. | revision of the YANG data modeling language. | |||
Schema mount applies to the data model, and specifically does not | Schema mount applies to the data model, and specifically does not | |||
assume anything about the source of instance data for the mounted | assume anything about the source of instance data for the mounted | |||
schemas. It may be implemented using the same instrumentation as the | schemas. It may be implemented using the same instrumentation as the | |||
rest of the system, or it may be implemented by querying some other | rest of the system, or it may be implemented by querying some other | |||
system. Future specifications may define mechanisms to control or | system. Future specifications may define mechanisms to control or | |||
monitor the implementation of specific mount points. | monitor the implementation of specific mount points. | |||
How and when specific mount points are instantiated by the server is | ||||
out of scope for this document. Such mechanisms may be defined in | ||||
future specifications. | ||||
This document allows mounting of complete data models only. Other | This document allows mounting of complete data models only. Other | |||
specifications may extend this model by defining additional | specifications may extend this model by defining additional | |||
mechanisms such as mounting sub-hierarchies of a module. | mechanisms such as mounting sub-hierarchies of a module. | |||
The YANG modules in this document conform to the Network Management | The YANG modules in this document conform to the Network Management | |||
Datastore Architecture (NMDA) [RFC8342]. | Datastore Architecture (NMDA) [RFC8342]. | |||
2. Terminology and Notation | 2. Terminology and Notation | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
skipping to change at page 6, line 4 ¶ | skipping to change at page 6, line 8 ¶ | |||
o schema node | o schema node | |||
o schema tree | o schema tree | |||
The following terms are defined in [RFC8342] and are not redefined | The following terms are defined in [RFC8342] and are not redefined | |||
here: | here: | |||
o client | o client | |||
o notification | o notification | |||
o operational state | o operational state | |||
o server | o server | |||
The following term is defined in [RFC8343] and are not redefined | The following term is defined in [RFC8343] and is not redefined here: | |||
here: | ||||
o system-controlled interface | o system-controlled interface | |||
The following term is defined in [I-D.ietf-netconf-rfc7895bis] and | The following term is defined in [I-D.ietf-netconf-rfc7895bis] is not | |||
are not redefined here: | redefined here: | |||
o YANG library checksum | o YANG library checksum | |||
2.1. Glossary of New Terms | The following additional terms are used within this document: | |||
o mount point: container or list node whose definition contains the | o mount point: A container or a list node whose definition contains | |||
"mount-point" extension statement. The argument of the | the "mount-point" extension statement. The argument of the | |||
"mount-point" statement defines a label for the mount point. | "mount-point" statement defines a label for the mount point. | |||
o schema: collection of schema trees with a common root | o schema: A collection of schema trees with a common root. | |||
o top-level schema: schema rooted at the root node | o top-level schema: A schema rooted at the root node. | |||
o mounted schema: schema rooted at a mount point | o mounted schema: A schema rooted at a mount point. | |||
o parent schema (of a mounted schema): schema containing the mount | o parent schema (of a mounted schema): A schema containing the mount | |||
point | point. | |||
2.2. Tree Diagrams | o schema mount: The mechanism to combine data models defined in this | |||
document. | ||||
2.1. Tree Diagrams | ||||
Tree diagrams used in this document follow the notation defined in | Tree diagrams used in this document follow the notation defined in | |||
[RFC8340] | [RFC8340] | |||
2.3. Namespace Prefixes | 2.2. Namespace Prefixes | |||
In this document, names of data nodes, YANG extensions, actions and | In this document, names of data nodes, YANG extensions, actions and | |||
other data model objects are often used without a prefix, as long as | other data model objects are often used without a prefix, as long as | |||
it is clear from the context in which YANG module each name is | it is clear from the context in which YANG module each name is | |||
defined. Otherwise, names are prefixed using the standard prefix | defined. Otherwise, names are prefixed using the standard prefix | |||
associated with the corresponding YANG module, as shown in Table 1. | associated with the corresponding YANG module, as shown in Table 1. | |||
+---------+------------------------+--------------------------------+ | +---------+------------------------+--------------------------------+ | |||
| Prefix | YANG module | Reference | | | Prefix | YANG module | Reference | | |||
+---------+------------------------+--------------------------------+ | +---------+------------------------+--------------------------------+ | |||
skipping to change at page 12, line 30 ¶ | skipping to change at page 12, line 30 ¶ | |||
o split management: one (master) management session has access to | o split management: one (master) management session has access to | |||
instance data of both parent and mounted schemas but, in addition, | instance data of both parent and mounted schemas but, in addition, | |||
an extra session exists for every instance of the mount point, | an extra session exists for every instance of the mount point, | |||
having access only to the mounted data tree. | having access only to the mounted data tree. | |||
9. Schema Mount YANG Module | 9. Schema Mount YANG Module | |||
This module references [RFC6991]. | This module references [RFC6991]. | |||
<CODE BEGINS> file "ietf-yang-schema-mount@2018-04-05" | <CODE BEGINS> file "ietf-yang-schema-mount@2018-08-07" | |||
module ietf-yang-schema-mount { | module ietf-yang-schema-mount { | |||
yang-version 1.1; | yang-version 1.1; | |||
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"; | namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"; | |||
prefix yangmnt; | prefix yangmnt; | |||
import ietf-inet-types { | import ietf-inet-types { | |||
prefix inet; | prefix inet; | |||
reference | reference | |||
"RFC 6991: Common YANG Data Types"; | "RFC 6991: Common YANG Data Types"; | |||
skipping to change at page 13, line 42 ¶ | skipping to change at page 13, line 42 ¶ | |||
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and | NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and | |||
'OPTIONAL' in the module text are to be interpreted as described | 'OPTIONAL' in the module text are to be interpreted as described | |||
in RFC 2119 (https://tools.ietf.org/html/rfc2119). | in RFC 2119 (https://tools.ietf.org/html/rfc2119). | |||
This version of this YANG module is part of RFC XXXX | This version of this YANG module is part of RFC XXXX | |||
(https://tools.ietf.org/html/rfcXXXX); see the RFC itself for | (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for | |||
full legal notices."; | full legal notices."; | |||
// RFC Ed.: update the date below with the date of RFC publication | // RFC Ed.: update the date below with the date of RFC publication | |||
// and remove this note. | // and remove this note. | |||
revision 2018-04-05 { | revision 2018-08-07 { | |||
description | description | |||
"Initial revision."; | "Initial revision."; | |||
reference | reference | |||
"RFC XXXX: YANG Schema Mount"; | "RFC XXXX: YANG Schema Mount"; | |||
} | } | |||
/* | /* | |||
* Extensions | * Extensions | |||
*/ | */ | |||
skipping to change at page 15, line 47 ¶ | skipping to change at page 15, line 47 ¶ | |||
} | } | |||
choice schema-ref { | choice schema-ref { | |||
mandatory true; | mandatory true; | |||
description | description | |||
"Alternatives for specifying the schema."; | "Alternatives for specifying the schema."; | |||
container inline { | container inline { | |||
presence | presence | |||
"A complete self-contained schema is mounted at the | "A complete self-contained schema is mounted at the | |||
mount point."; | mount point."; | |||
description | description | |||
"This node indicates that the server has mounted | "This node indicates that the server has mounted at least | |||
'ietf-yang-library' at the mount point, and its | the module 'ietf-yang-library' at the mount point, and | |||
instantiation provides the information about the mounted | its instantiation provides the information about the | |||
schema. | mounted schema. | |||
Different instances of the mount point may have | Different instances of the mount point may have | |||
different schemas mounted."; | different schemas mounted."; | |||
} | } | |||
container shared-schema { | container shared-schema { | |||
presence | presence | |||
"The mounted schema together with the 'parent-reference' | "The mounted schema together with the 'parent-reference' | |||
make up the schema for this mount point."; | make up the schema for this mount point."; | |||
description | description | |||
"This node indicates that the server has mounted | "This node indicates that the server has mounted at least | |||
'ietf-yang-library' at the mount point, and its | the module 'ietf-yang-library' at the mount point, and | |||
instantiation provides the information about the mounted | its instantiation provides the information about the | |||
schema. When XPath expressions in the mounted schema | mounted schema. When XPath expressions in the mounted | |||
are evaluated, the 'parent-reference' leaf-list is taken | schema are evaluated, the 'parent-reference' leaf-list | |||
into account. | is taken into account. | |||
Different instances of the mount point MUST have the | Different instances of the mount point MUST have the | |||
same schema mounted."; | same schema mounted."; | |||
leaf-list parent-reference { | leaf-list parent-reference { | |||
type yang:xpath1.0; | type yang:xpath1.0; | |||
description | description | |||
"Entries of this leaf-list are XPath 1.0 expressions | "Entries of this leaf-list are XPath 1.0 expressions | |||
that are evaluated in the following context: | that are evaluated in the following context: | |||
- The context node is the node in the parent data tree | - The context node is the node in the parent data tree | |||
End of changes. 21 change blocks. | ||||
36 lines changed or deleted | 42 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |