NETMOD Working Group | Q. Wu |
Internet-Draft | C. Feng |
Intended status: Standards Track | R. Ranade |
Expires: September 2, 2019 | Huawei |
March 1, 2019 |
NMDA Base Notification for Applied Intended Configuration
draft-wu-netmod-base-notification-nmda-02
The Network Configuration Protocol (NETCONF)and RESTCONF provides mechanisms to manipulate configuration datastores. NMDA introduces additional datastores for systems that support more advanced processing chains converting configuration to operational state. However, client applications are not able to be aware of common events in these additional datstores of the management system, such as a applied configuration state change in NETCONF server or RESTCONF server, that may impact management applications. This document define a YANG module that allows a client to receive additional notifications for some common system events pertaining to the Network Management Datastore Architecture (NMDA) defined in [RFC8342].
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 September 2, 2019.
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 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.
The Network Configuration Protocol (NETCONF) [RFC6241] and RESTCONF [RFC8040] provides mechanisms to manipulate configuration datastores. NMDA introduces additional datastores (e.g., <intended>, <operational>) for systems that support more advanced processing chains converting configuration to operational state. However, client applications are not able to be aware of common events in those additional datastores of the management system, e.g., there are many background system activities (e.g.,the system moving the config from running->intended->operational,NMDA datastore consistency checking [I-D.ietf-netmod-nmda-diff]) that happen during the time that configuration is committed to <running> to the time that the configuration is actually applied to <operational>. It is possible that some configuration could not be applied to <operational> due to either validation issues, or missing resource, etc. There is a need for user to know the applying result of <intended> datastore and the reason why the configuration were not applied.
This document define a YANG module that allows a NMS client to receive additional notifications for some common system events pertaining to the Network Management Datastore Architecture (NMDA) defined in [RFC8342]. These notifications are designed to support the monitoring of the base system events within the server and not specific to any network management protocols such as NETCONF and RESTCONF.
The solution presented in this document is backwards compatible with [RFC6470].
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 [RFC8342] and are not redefined here:
The YANG module in NETCONF Base Notifications [RFC6470] specifies the following 5 event notifications for the 'NETCONF' stream to notify a client application that the NETCONF server state has changed:
These event notifications used within the 'NETCONF' stream are accessible to clients via the subscription mechanism described in [RFC5277].
This document introduces NMDA specific extension which allows a client to receive 2 notifications for additional common system events as follows:
The following figure shows event notification sequence defined in this document.
+-------------+ +-----------+ | <candidate> | | <startup> | | (ct, rw) |<---+ +--->| (ct, rw) | +-------------+ | | +-----------+ | | | | | +-----------+ | +-------->| <running> |<--------+ | (ct, rw) | +-----------+ | | // configuration transformations, | // e.g., removal of nodes marked as | // "inactive", expansion of | // templates v +------------+ | <intended> | // subject to validation | (ct, ro) | +------------+ | // changes applied, subject to (a)apply-intended-updated | // local factors,e.g., missing | // resources, delays | dynamic | +-------- learned configuration configuration | +-------- system configuration datastores -----+ | +-------- default configuration | | | v v v +---------------+ | <operational> | <-- system state | (ct + cf, ro) | +---------------+ ct = config true; cf = config false rw = read-write; ro = read-only boxes denote named datastores
These notification messages are accessible to clients via either the subscription mechanism described in [RFC5277] or dynamic subscription mechanism and configured subscription mechanism described in [I-D.ietf-netconf-netconf-event-notifications].
The data model is defined in the ietf-nmda-notifications YANG module. Its structure is shown in the following figure. The notation syntax follows [RFC8340].
notifications: +---n apply-intended-updated +--ro username string +--ro session-id session-id-or-zero-type +--ro app-tag? tags:tag +--ro source-host? inet:ip-address +--ro commit-persist-id? string +--ro datastore? identityref +--ro (filter-spec)? | +--:(subtree-filter) | | +--ro subtree-filter? <anydata> | +--:(xpath-filter) | +--ro xpath-filter? yang:xpath1.0 {nc:xpath}? +--ro apply-result? enumeration +--ro fail-applied-target* [edit-id] +--ro edit-id string +--ro operation enumeration +--ro target? ypatch:target-resource-offset +--ro value? <anydata> +--ro errors +--ro error* [] +--ro error-type enumeration +--ro error-tag string +--ro error-app-tag? string +--ro error-path? instance-identifier +--ro error-message? string +--ro error-info? <anydata>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <eventTime>2017-06-16T16:30:59.137045+09:00</eventTime> <apply-intended-updated xmlns="urn:ietf:params:xml:ns:yang:ietf-nmda-notifications"> <username>admin</username> <session-id>0</session-id> <app-tag>user:app1</app-tag> <source-host>10.251.93.83</source-host> <commit-persist>IQ,d4668</commit-persist> <apply-result>fail</apply-result> <datastore>operational</datastore> <fail-applied-taget> <edit-id>1<edit-id> <operation>merge</operation> <target>/ietf-interfaces:interfaces-state</target> <value> <interfaces-state xmlns="http://foo.com/ietf-interfaces"> <interface> <name>eth0</name> <oper-status>down</oper-status> </interface> </interfaces-state> </value> </fail-applied-target> <fail-applied-taget> <edit-id>2<edit-id> <target>/ietf-system:system</target> <errors> <error-type>protocol</error-type> <error-tag>mis-resource</error-tag> <error-path xmlns:ops="https://example.com/ns/ietf-system">\ \/if:interfaces-state\ \</error-path> <error-message>refer to resources that are not \ \available or otherwise not physically present.\ \</error-message> </errors> </fail-applied-target> </apply-intended-updated> </notification>
The following are examples of a apply-intended-updated notification message:
NMDA datastore compare [NMDA-DIFF]could be used to check which part of intended configuration data is applied or which part of intended configuration data is not applied. On the other hand, the event notification for apply-intended-start or netconf-confirmed-commit can be used to trigger NMDA datastore compare procedure to be started.
This section presents the YANG module defined in this document. This module imports data types from the 'ietf-datastores' module defined in [RFC8342] and 'ietf-inet-types' module defined in [RFC6021].
<CODE BEGINS> file "ietf-nmda-notifications@2018-12-26.yang" module ietf-nmda-notifications { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-nmda-notifications"; prefix ndn; import ietf-datastores { prefix ds; } import ietf-inet-types { prefix inet; } import ietf-module-tags { prefix tags;} import ietf-yang-types { prefix yang;} import ietf-yang-patch { prefix ypatch; } import ietf-netconf { prefix nc; } import ietf-restconf { prefix rc;} organization "IETF NETMOD (Network Modeling) Working Group"; contact "WG Web: <http://tools.ietf.org/wg/netmod/> WG List: <mailto:netmod@ietf.org> WG Chair: Kent Watsen <mailto:kwatsen@juniper.net> Editor: Qin Wu <mailto:bill.wu@huawei.com> Editor: Rohit R Ranade <mailto:rohitrranade@huawei.com>"; description "This module defines a YANG data model for use with the NETCONF and RESTCONF protocol that allows the client to receive additional common event notifications related to NMDA. Copyright (c) 2012 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."; revision 2018-12-26 { description "Initial version."; reference "RFC xxx: NETCONF Base Notifications for NMDA"; } typedef session-id-or-zero-type { type uint32; description "NETCONF Session Id or Zero to indicate none"; } feature error-info { description "This feature must also be enabled for that session if error-info can be advertised by the server. Otherwise, this feature must not be enabled."; } grouping common-session-parms { description "Common session parameters to identify a management session."; leaf username { type string; mandatory true; description "Name of the user for the session."; } leaf session-id { type session-id-or-zero-type; mandatory true; description "Identifier of the session. A NETCONF session MUST be identified by a non-zero value. A non-NETCONF session MAY be identified by the value zero."; } leaf app-tag { type tags:tag; description "The relationship between username and application tag can be one to many."; } leaf source-host { type inet:ip-address; description "Address of the remote host for the session."; } leaf commit-persist-id { type string; description "This parameter is used to identify each commit. The value of this parameter is a token that must be given in the 'persist-id' parameter of <commit> or <cancel-commit> operations in order to confirm or cancel the persistent confirmed commit. The token should be a random string."; reference "RFC 6241, Section 8.3.4.1"; } } notification apply-intended-updated { description "Generated when a server detects that a intended configuration applied event has occurred. Indicates the event and the current state of the intended data applying procedure in progress."; reference "RFC 8342, Section 5"; uses common-session-parms; leaf datastore { type identityref { base ds:datastore; } default "ds:operational"; description "Indicates which datastore has changed or which datastore is target of edit-data operation."; } choice filter-spec { description "The content filter specification for this request."; anydata subtree-filter { description "This parameter identifies the portions of the target datastore to retrieve."; reference "RFC 6241: Network Configuration Protocol, Section 6."; } leaf xpath-filter { if-feature nc:xpath; type yang:xpath1.0; description "This parameter contains an XPath expression identifying the portions of the target datastore to retrieve. If the expression returns a node-set, all nodes in the node-set are selected by the filter. Otherwise, if the expression does not return a node-set, then the get-data operation fails. The expression is evaluated in the following XPath context: o The set of namespace declarations are those in scope on the 'xpath-filter' leaf element. o The set of variable bindings is empty. o The function library is the core function library, and the XPath functions defined in section 10 in RFC 7950. o The context node is the root node of the target datastore."; } } leaf apply-result { type enumeration { enum "ok" { description "The intended data is succesfully applied."; } enum "fail" { description " The intended data is not succesfully applied."; } } description "Apply result."; } list fail-applied-target { when "../apply-result = 'fail'"; key edit-id; ordered-by user; leaf edit-id { type string; description "Response status is for the 'edit' list entry with this 'edit-id' value."; } leaf operation { type enumeration { enum create { description "The target data node is created using the supplied value, only if it does not already exist. The 'target' leaf identifies the data node to be created, not the parent data node."; } enum delete { description "Delete the target node, only if the data resource currently exists; otherwise, return an error."; } enum insert { description "Insert the supplied value into a user-ordered list or leaf-list entry. The target node must represent a new data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point for the target node."; } enum merge { description "The supplied value is merged with the target data node."; } enum move { description "Move the target node. Reorder a user-ordered list or leaf-list. The target node must represent an existing data resource. If the 'where' parameter is set to 'before' or 'after', then the 'point' parameter identifies the insertion point to move the target node."; } enum replace { description "The supplied value is used to replace the target data node."; } enum remove { description "Delete the target node if it currently exists."; } } mandatory true; description "The datastore operation requested for the associated 'edit' entry."; } leaf target { type ypatch:target-resource-offset; description "Topmost node associated with the configuration change. A server SHOULD set this object to the node within the datastore that is being altered. A server MAY set this object to one of the ancestors of the actual node that was changed, or omit this object, if the exact node is not known."; } anydata value { description "Value used for this edit operation. The anydata 'value' contains the target resource associated with the 'target' leaf. For example, suppose the target node is a YANG container named foo: container foo { leaf a { type string; } leaf b { type int32; } } The 'value' node contains one instance of foo: <value> <foo xmlns='example-foo-namespace'> <a>some value</a> <b>42</b> </foo> </value> "; } uses rc:errors {if-feature error-info;} description "List for fail applied targets. The fail applied targets are only applied when the intended data is not applied."; } } } <CODE ENDS>
The YANG module defined in this memo is designed to be accessed via the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH, defined in [RFC6242].
Some of the readable data nodes in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g., via get, get-config, or notification) to these data nodes. These are the subtrees and data nodes and their sensitivity/vulnerability:
/apply-intended-updated:
/apply-intended-updated/apply-result:
This document registers one XML namespace URN in the 'IETF XML registry', following the format defined in [RFC3688]:
This document registers one module name in the 'YANG Module Names' registry, defined in [RFC7950]:
Thanks to Juergen Schoenwaelder, Alex Clemm,Carey Timothy and Andy Berman, Sterne Jason to review this draft and Thank Xiaojian Ding provide important input to the initial version of this document.
[I-D.ietf-netmod-nmda-diff] | Clemm, A., Qu, Y., Tantsura, J. and A. Bierman, "Comparison of NMDA datastores", Internet-Draft draft-ietf-netmod-nmda-diff-00, October 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. |
[RFC5277] | Chisholm, S. and H. Trevino, "NETCONF Event Notifications", RFC 5277, DOI 10.17487/RFC5277, July 2008. |
[RFC6020] | Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010. |
[RFC6021] | Schoenwaelder, J., "Common YANG Data Types", RFC 6021, DOI 10.17487/RFC6021, October 2010. |
[RFC6241] | Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "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. |
[RFC6470] | Bierman, A., "Network Configuration Protocol (NETCONF) Base Notifications", RFC 6470, DOI 10.17487/RFC6470, February 2012. |
[RFC8072] | Bierman, A., Bjorklund, M. and K. Watsen, "YANG Patch Media Type", RFC 8072, DOI 10.17487/RFC8072, February 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. |
v01 - v00