Network Working Group X. Liu Internet-Draft Kuatro Technologies Intended status: Standards Track I. Bryskin Expires: April 24, 2017 Huawei Technologies V. Beeram Juniper Networks T. Saad Cisco Systems Inc H. Shah Ciena O. Gonzalez de Dios Telefonica October 24, 2016 A YANG Data Model for Configuration Scheduling draft-liu-netmod-yang-schedule-02 Abstract This document describes a data model for configuration scheduling. 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), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. 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." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This Internet-Draft will expire on April 24, 2017. Liu, et al. Expires April 24, 2017 [Page 1] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 Copyright Notice Copyright (c) 2016 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 (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 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction...................................................2 1.1. Terminology...............................................2 2. Motivation.....................................................3 3. Configuration Scheduling YANG Data Model Overview..............3 4. Usage Example..................................................4 5. Configuration Scheduling YANG Module...........................5 6. Security Considerations........................................9 7. References.....................................................9 7.1. Normative References......................................9 7.2. Informative References....................................9 1. Introduction This document introduces a YANG [RFC6020] data model for configuration scheduling. This model can be used together with other YANG data models to specify a schedule applied on a configuration data node, so that the configuration data can take effect according to the schedule. 1.1. Terminology The keywords "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]. The following terms are defined in [RFC6020] and are not redefined here: Liu, et al. Expires April 24, 2017 [Page 2] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 o augment o data model o data node 2. Motivation Some applications benefit from resource scheduling to allow operators to plan ahead of time. Traffic engineering is one of such examples [RFC7399]. When configuration and state models are designed for such applications, it has been considered that certain data objects need to be configured according to predefined schedules. In other situations, operators need to de-configure certain data objects at predefined schedules for the purposes such as maintenance. These data objects are interpreted and implemented by the applicable applications. 3. Configuration Scheduling YANG Data Model Overview This document defines a YANG data model that specifies configuration schedules for other YANG data models. For each targeted configuration data object or a group of configuration data objects, an entry is specified along with requested schedules using this configuration schedule model. The application implementing the targeted schema nodes implements the configuration schedules, configuring or de- configuring the specified objects according to the specified schedules. The model schema of the targeted application does not need changes, so the data model described in this document can be used for any data model. The configuration scheduling YANG data model has the following structure: module: ietf-schedule +--rw configuration-schedules +--rw target* [object] +--rw object yang:xpath1.0 +--rw data-value? string +--rw schedules | +--rw schedule* [schedule-id] | +--rw schedule-id uint32 | +--rw inclusive-exclusive? enumeration | +--rw start? yang:date-and-time | +--rw schedule-duration? string | +--rw repeat-interval? string +--ro state Liu, et al. Expires April 24, 2017 [Page 3] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 +--ro next-event +--ro start? yang:date-and-time +--ro duration? string +--ro operation? enumerationmodule: ietf-schedule 4. Usage Example The following model defines a list of TE (Traffic Engineering) links which can be configured with specified schedules: module: example +--rw te-links +--rw te-link* [id] +--rw id string The following configuration requests that o link-1 is configured weekly for five one-day periods, starting from 2016-09-12T23:20:50.52Z. o link-2 is de-configured for two hours, starting from 2016-09- 15T01:00:00.00Z. /ex:te-links/ex:te-link[ex:link-id='link-1'] 11 2016-09-12T23:20:50.52Z P1D R5/P1W /ex:te-links/ex:te-link[ex:link-id='link-2'] 12 exclusive 2016-09-15T01:00:00.00Z P2H Liu, et al. Expires April 24, 2017 [Page 4] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 5. Configuration Scheduling YANG Module file "ietf-schedule@2016-10-11.yang" module ietf-schedule { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:ietf-schedule"; // replace with IANA namespace when assigned prefix "sch"; import ietf-yang-types { prefix "yang"; } organization "TBD"; contact "TBD"; description "The model allows time scheduling parameters to be specified."; revision "2016-10-11" { description "Initial revision"; reference "TBD"; } /* * Groupings */ grouping schedule-config-attributes { description "A group of attributes for a schedule."; leaf inclusive-exclusive { type enumeration { enum inclusive { description "The schedule element is inclusive."; Liu, et al. Expires April 24, 2017 [Page 5] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 } enum exclusive { description "The schedule element is exclusive."; } } default "inclusive"; description "Whether the list item is inclusive or exclusive."; } leaf start { type yang:date-and-time; description "Start time."; } leaf schedule-duration { type string { pattern 'P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?(\d+M)?(\d+S)?'; } description "Schedule duration in ISO 8601 format."; } leaf repeat-interval { type string { pattern 'R\d*/P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?(\d+M)?' + '(\d+S)?'; } description "Repeat interval in ISO 8601 format."; } } // schedule-config-attributes grouping schedule-state-attributes { description "State attributes for a schedule."; container next-event { description "The state information of the nexte scheduled event."; leaf start { type yang:date-and-time; description "Start time."; } leaf duration { Liu, et al. Expires April 24, 2017 [Page 6] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 type string { pattern 'P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?T(\d+H)?(\d+M)?(\d+S)?'; } description "Schedule duration in ISO 8601 format."; } leaf operation { type enumeration { enum configure { description "Create the configuration data."; } enum deconfigure { description "Remove the configuration data."; } enum set { description "Set the specified configuration data."; } enum reset { description "Revert the specified configuration data back to the original value."; } } description "Operation type."; } } // next-event } // schedule-state-attributes grouping schedules { description "A list of schedules defining when a particular configuration takes effect."; container schedules { description "Container of a schedule list defining when a particular configuration takes effect."; list schedule { key "schedule-id"; Liu, et al. Expires April 24, 2017 [Page 7] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 description "A list of schedule elements."; leaf schedule-id { type uint32; description "Identifies the schedule element."; } uses schedule-config-attributes; } } } // schedules /* * Configuration data nodes */ container configuration-schedules { description "Serves as top-level container for a list of configuration schedules."; list target { key "object"; description "A list of targets that configuration schedules are applied."; leaf object { type yang:xpath1.0; description "Xpath defining the data items of interest."; } leaf data-value { type string; description "The ephemeral value applied to the leaf data node specified by data-objects. This is applicable when object is a leaf."; } uses schedules; container state { config false; description "Operational state data."; uses schedule-state-attributes; } // state Liu, et al. Expires April 24, 2017 [Page 8] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 } // target } // configuration-schedules } 6. Security Considerations The configuration, state, action and notification data defined in this document are designed to be accessed via the NETCONF protocol [RFC6241]. The data-model by itself does not create any security implications. The security considerations for the NETCONF protocol are applicable. The NETCONF protocol used for sending the data supports authentication and encryption. 7. References 7.1. Normative References [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, October 2010. [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. [RFC2234] Crocker, D. and Overell, P.(Editors), "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, Internet Mail Consortium and Demon Internet Ltd., November 1997. [RFC7399] Farrel, A. and King, D., "Unanswered Questions in the Path Computation Element Architecture", RFC 7399, October 2014. 7.2. Informative References [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG Data Model Documents", RFC 6087, January 2011. Liu, et al. Expires April 24, 2017 [Page 9] Internet-Draft draft-liu-netmod-yang-schedule-02 October 2016 Authors' Addresses Xufeng Liu Kuatro Technologies 8281 Greensboro Drive, Suite 200 McLean, VA 22102 USA Email: xliu@kuatrotech.com Igor Bryskin Huawei Technologies Email: Igor.Bryskin@huawei.com Vishnu Pavan Beeram Juniper Networks Email: vbeeram@juniper.net Tarek Saad Cisco Systems Inc Email: tsaad@cisco.com Himanshu Shah Ciena Email: hshah@ciena.com Oscar Gonzalez de Dios Telefonica Email: oscar.gonzalezdedios@telefonica.com Liu, et al. Expires April 24, 2017 [Page 10]