Network Working Group X. Chen Internet-Draft Z. Li Intended status: Standards Track Huawei Technologies Expires: June 18, 2016 December 16, 2015 Yang Data Model for Resource Management draft-chen-rtgwg-resource-management-yang-01 Abstract This document describes a YANG data model for resource management. The resource includes mpls label etc. The data model defines the configuration and operational state for resource management. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 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 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 June 18, 2016. Copyright Notice Copyright (c) 2015 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 Chen & Li Expires June 18, 2016 [Page 1] Internet-Draft Yang Data Model for Resource Management December 2015 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 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2. Configuration . . . . . . . . . . . . . . . . . . . . . . 4 2.2.1. Label Configuration . . . . . . . . . . . . . . . . . 4 2.3. Operational State . . . . . . . . . . . . . . . . . . . . 5 2.3.1. Operational State of Label . . . . . . . . . . . . . 5 3. Yang Module . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11 6. Normative References . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 1. Introduction YANG [RFC6020] is a data definition language that was introduced to define the contents of a conceptual data store that allows networked devices to be managed using NETCONF[RFC6241]. YANG is proving relevant beyond its initial confines, as bindings to other interfaces(e.g. ReST) and encoding other than XML (e.g. JSON) are being defined. Furthermore, YANG data models can be used as the basis of implementation for other interface, such as CLI and Programmatic APIs. The network device manages all kinds of resources such as memory which is one kind of system resources and MPLS label which is one type of typical service resources. The resource management is responsible for not only the creation and release of the pools of resources but also the allocation and release of the resources. This document focuses on the service resources like MPLS label. The label space which is normally per-platform label space is shared by all the MPLS signalling protocols and applications. The labels used by mpls signalling protocols are allocated from the unified label space and released to the label space by the label management. This document describes a YANG data model for resource management. The data model defines the configuration for pools of resources and operational state about the used and the available resources. Current version of the data model only includes MPLS label Chen & Li Expires June 18, 2016 [Page 2] Internet-Draft Yang Data Model for Resource Management December 2015 management. Data model of other service resources will be defined in the future version. 2. Design of Data Model 2.1. Overview The resource management in the network device is responsible for not only the creation and release of the pools of resources but also the allocation and release of the resources. The delimitation and the size of pools of resources can be system-defined or can be configured by operator. Normally the protocols and services will apply for the resources from resource management. Sometimes the operator uses the resources by configuration when the resources are not occupied. For example MPLS label is one kind of typical resource and when operator configures the transit static LSP manually the incoming label is needed to be configured. Therefore it's necessary to provide the operational state of used and available resources for operator to select available resource to configure to avoid resource conflict configuration. This document describes a YANG data model for resource management. The data model defines the configuration for pools of resources and operational state about the used and the available resources. Current version of the data model only includes MPLS label management. The resource management YANG module is divided into two main containers : o resource-cfg: that contains writable configuration objects about all kinds of resources. o resource-state: that contains read-only operational state objects about all kinds of resources. The figure below describes the overall structure of the resource management yang model : Chen & Li Expires June 18, 2016 [Page 3] Internet-Draft Yang Data Model for Resource Management December 2015 module: ietf-resource-mgmt +--rw resource-cfg | +--rw mpls-label-cfg | +--rw label-space-cfg | +--rw label-spaces* [label-type] | +--rw label-type label-type | +--rw multiple-label-spaces* [label-begin label-end] | +--rw label-begin uint32 | +--rw label-end uint32 +--rw resource-state +--rw mpls-label-state +--ro label-space-state | +--ro label-spaces* [label-type] | +--ro label-type label-type | +--ro label-total-number? uint32 | +--ro label-available-total-number? uint32 | +--ro multiple-label-spaces* [label-begin label-end] | +--ro label-begin uint32 | +--ro label-end uint32 | +--ro label-available-number? uint32 +--ro used-label | +--ro used-labels* [label-value] | +--ro label-value uint32 | +--ro label-app? label-app | +--ro label-type? label-type +--ro used-label-statistics | +--ro used-label-statistics* [label-app] | +--ro label-app label-app | +--ro used-label-count? uint32 +--ro available-label +--ro available-labels* [label-type] +--ro label-type label-type +--ro label-segments* [label-begin label-end] +--ro label-begin uint32 +--ro label-end uint32 2.2. Configuration Resource-cfg container includes writable configuration objects about all kinds of resources like MPLS label. 2.2.1. Label Configuration MPLS-label-cfg container defines the configuration objects about MPLS label. Label-space-cfg container defines the type of label space and a list of label spaces represented by a pair of lower-bound/upper- bound labels for each type of label space. Chen & Li Expires June 18, 2016 [Page 4] Internet-Draft Yang Data Model for Resource Management December 2015 2.3. Operational State Resource-state container includes read-only operational state objects about all kinds of resources like MPLS label. 2.3.1. Operational State of Label MPLS-label-state container defines the operational state objects about MPLS label. It is divided into the following containers: o label-space-state: it contains operational state object about label space which defines the type of label space and a list of label spaces represented by a pair of lower-bound/upper-bound labels for each type of label space and the statistics of number of available labels. o used-label: it contains operational state object about used labels which defines the list of used labels which includes the used label value, what protocol or service uses the label and the type of label space which the label belongs to. o used-label-statistics: it contains operational state object about used label statistics which defines the list of used label statistics of each protocol or service. o available-label: it contains operational state object about available label which defines the type of label space and a list of available label spaces represented by a pair of lower-bound/upper- bound labels for each type of label space. 3. Yang Module file "ietf-resource-mgmt@2015-12-16.yang" module ietf-resource-mgmt{ yang-version 1; namespace "urn:ietf:params:xml:ns:yang:ietf-resource-mgmt"; // replace with IANA namespace when assigned prefix "resource"; organization "huawei"; contact "lizhenbin@huawei.com jescia.chenxia@huawei.com"; description "The yang data model defines the configuration and operation of resource management. The initial version includes only label management."; revision "2015-12-16" { Chen & Li Expires June 18, 2016 [Page 5] Internet-Draft Yang Data Model for Resource Management December 2015 description "2015-10-15: Initial revision"+ "2015-12-16: Add description for list and container"; reference "TBD"; } typedef label-type { type enumeration { enum static { description "The label is used for static configuration."; } enum dynamic { description "The label is used by dynamic mpls signalling protocol like ldp, rsvp."; } enum block { description "The label is used by mpls protocol like kompella bgp with a block of labels allocated."; } } description "The type of label and the label space is partitioned according to the label type."; } typedef label-app { type enumeration { enum p2p-rsvp-te { description "The label is allocated for RSVP-TE point-to-point lsp."; } enum p2p-ldp { description "The label is allocated for LDP point-to-point lsp."; } enum bgp { description "The label is allocated for labeled BGP(RFC3107)."; } enum sr { description "The label is allocated for segment-routing."; } enum l2vpn { description "The label is allocated for l2vpn."; } enum l3vpn { description "The label is allocated for l3vpn."; } enum static-pw { description "The label is allocated for static pseudowire."; } enum static-lsp { description "The label is allocated for static lsp."; } enum mpls-tp-lsp { Chen & Li Expires June 18, 2016 [Page 6] Internet-Draft Yang Data Model for Resource Management December 2015 description "The label is allocated for static mpls tp lsp."; } enum p2mp-ldp { description "The label is allocated for LDP point-to-multipoint lsp."; } enum mp2mp-ldp { description "The label is allocated for LDP multipoint-to-multipoint lsp."; } } description "The application which the label is allocated for."; } container resource-cfg{ description "It includes writable configuration objects about all kinds of resources. The initial version includes only label management."; container mpls-label-cfg{ description "It defines the configuration objects about mpls label."; container label-space-cfg{ description "It defines the type of label space and a list of label spaces."; list label-spaces { key "label-type"; description "List of label spaces. Each label space defines for one type of label space."; leaf label-type { type label-type; description "The type of label and the label sapce is partitioned according to the labe type."; } list multiple-label-spaces { key "label-begin label-end"; description "List of discrete label spaces."; leaf label-begin { type uint32; description "The lower-bound label."; } leaf label-end { type uint32; description "The upper-bound label."; } } } } Chen & Li Expires June 18, 2016 [Page 7] Internet-Draft Yang Data Model for Resource Management December 2015 } } container resource-state{ description "The configuration and operation of resource management. The initial version includes only label management."; container mpls-label-state{ description "The configuration and operation of mpls label management."; container label-space-state{ config false; description "The label space."; list label-spaces { key "label-type"; description "List of label spaces. Each label space defines for one type of label space."; leaf label-type { type label-type; description "The type of label and the label sapce is partitioned according to the labe type."; } leaf label-total-number { type uint32; description "The total number of labels belonging to one type of label space."; } leaf label-available-total-number { type uint32; description "The total number of available labels belonging to one type of label space."; } list multiple-label-spaces { key "label-begin label-end"; description "List of discrete label spaces."; leaf label-begin { type uint32; description "The lower-bound label."; } leaf label-end { type uint32; description "The upper-bound label."; } Chen & Li Expires June 18, 2016 [Page 8] Internet-Draft Yang Data Model for Resource Management December 2015 leaf label-available-number { type uint32; config false; description "The total number of available labels in one label segment belonging to one type of label space."; } } } } container used-label{ config false; description "Used labels."; list used-labels { key "label-value"; description "List of used labels."; leaf label-value { type uint32; description "The value of the used label."; } leaf label-app { type label-app; description "The application which the label is allocated for."; } leaf label-type { type label-type; description "The type of label and the label sapce is partitioned according to the labe type."; } } } container used-label-statistics{ config false; description "The statistics of used labels for each application applying for labels."; list used-label-statistics { key "label-app"; description "The list of the statistics of used labels."; leaf label-app { type label-app; description "The application which the label is allocated for."; } Chen & Li Expires June 18, 2016 [Page 9] Internet-Draft Yang Data Model for Resource Management December 2015 leaf used-label-count { type uint32; description "The count of used labels the special aplication occupies."; } } } container available-label{ config false; description "Available labels."; list available-labels { key "label-type"; description "List of available labels."; leaf label-type { type label-type; description "The type of label and the label sapce is partitioned according to the labe type."; } list label-segments { key "label-begin label-end"; description "List of label segments."; leaf label-begin { type uint32; description "The lower-bound label."; } leaf label-end { type uint32; description "The upper-bound label."; } } } } } } } 4. IANA Considerations This document registers the following URIs in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the following registration is requested to be made. Chen & Li Expires June 18, 2016 [Page 10] Internet-Draft Yang Data Model for Resource Management December 2015 URI: urn:ietf:params:xml:ns:yang:ietf-resource-mgmt XML: N/A, the requested URI is an XML namespace. This document registers a YANG module in the YANG Module Names registry [RFC6020]. name: ietf-resource-mgmt namespace: urn:ietf:params:xml:ns:yang:ietf- resource-mgmt prefix: resource. 5. Security Considerations 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 [RFC6242]. The NETCONF access control model [RFC6536] provides means to restrict access for particular NETCONF users to a pre-configured subset of all available NETCONF protocol operations and content. There are a number of data nodes defined in the YANG module which are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., ) to these data nodes without proper protection can have a negative effect on network operations. 6. Normative References [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 (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, . Chen & Li Expires June 18, 2016 [Page 11] Internet-Draft Yang Data Model for Resource Management December 2015 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, DOI 10.17487/RFC6536, March 2012, . Authors' Addresses Xia Chen Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: jescia.chenxia@huawei.com Zhenbin Li Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: lizhenbin@huawei.com Chen & Li Expires June 18, 2016 [Page 12]