netconfcentral logo

ietf-pmip-qos@2017-10-29



  module ietf-pmip-qos {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-pmip-qos";

    prefix qos-pmip;

    import ietf-inet-types {
      prefix inet;
      revision-date "2013-07-15";
    }
    import ietf-trafficselector-types {
      prefix traffic-selectors;
    }

    organization
      "IETF Distributed Mobility Management (DMM)
      Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>
        WG Chair: Dapeng Liu
                  <mailto:maxpassion@gmail.com>

        WG Chair: Jouni Korhonen
                  <mailto:jouni.nospam@gmail.com>

        Editor:   Satoru Matsushima
                  <mailto:satoru.matsushima@g.softbank.co.jp>

        Editor:   Lyle Bertz
                  <mailto:lylebe551144@gmail.com>";

    description
      "This module contains a collection of YANG definitions for
     quality of service paramaters used in Proxy Mobile IPv6.

     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.";

    revision "2017-10-29" {
      description "Base Version";
      reference
        "RFC 6088: Traffic Selectors for Flow Bindings";

    }


    typedef sr-id {
      type uint8;
      description
        "An 8-bit unsigned integer used for identifying the QoS
        Service Request.";
    }

    typedef traffic-class {
      type inet:dscp;
      description
        "Traffic Class consists of a 6-bit DSCP field followed by a
         2-bit reserved field.";
      reference
        "RFC 3289: Management Information Base for the
           Differentiated Services Architecture
         RFC 2474: Definition of the Differentiated Services Field
        	  (DS Field) in the IPv4 and IPv6 Headers
         RFC 2780: IANA Allocation Guidelines For Values In
        	  the Internet Protocol and Related Headers";

    }

    typedef operational-code {
      type enumeration {
        enum "RESPONSE" {
          value 0;
          description
            "Response to a QoS request";
        }
        enum "ALLOCATE" {
          value 1;
          description
            "Request to allocate QoS resources";
        }
        enum "DE-ALLOCATE" {
          value 2;
          description
            "Request to de-Allocate QoS resources";
        }
        enum "MODIFY" {
          value 3;
          description
            "Request to modify QoS parameters for a
              previously negotiated QoS Service Request";
        }
        enum "QUERY" {
          value 4;
          description
            "Query to list the previously negotiated QoS
              Service Requests that are still active";
        }
        enum "NEGOTIATE" {
          value 5;
          description
            "Response to a QoS Service Request with a
            counter QoS proposal";
        }
      }
      description
        "The type of QoS request. Reserved values:   (6) to (255)
                Currently not used.  Receiver MUST ignore the option
                received with any value in this range.";
    }

    typedef qos-attrubite-type-enum {
      type enumeration {
        enum "Reserved" {
          value 0;
          description
            "This value is reserved and cannot be used";
        }
        enum "Per-MN-Agg-Max-DL-Bit-Rate" {
          value 1;
          description
            "Per-Mobile-Node Aggregate Maximum Downlink
              Bit Rate.";
        }
        enum "Per-MN-Agg-Max-UL-Bit-Rate" {
          value 2;
          description
            "Per-Mobile-Node Aggregate Maximum Uplink Bit
            Rate.";
        }
        enum
          "Per-Session-Agg-Max-DL-Bit-Rate" {
          value 3;
          description
            "Per-Mobility-Session Aggregate Maximum
            Downlink Bit Rate.";
        }
        enum
          "Per-Session-Agg-Max-UL-Bit-Rate" {
          value 4;
          description
            "Per-Mobility-Session Aggregate Maximum
             Uplink Bit Rate.";
        }
        enum "Allocation-Retention-Priority" {
          value 5;
          description
            "Allocation and Retention Priority.";
        }
        enum "Aggregate-Max-DL-Bit-Rate" {
          value 6;
          description
            "Aggregate Maximum Downlink Bit Rate.";
        }
        enum "Aggregate-Max-UL-Bit-Rate" {
          value 7;
          description
            "Aggregate Maximum Uplink Bit Rate.";
        }
        enum "Guaranteed-DL-Bit-Rate" {
          value 8;
          description
            "Guaranteed Downlink Bit Rate.";
        }
        enum "Guaranteed-UL-Bit-Rate" {
          value 9;
          description
            "Guaranteed Uplink Bit Rate.";
        }
        enum "QoS-Traffic-Selector" {
          value 10;
          description
            "QoS Traffic Selector.";
        }
        enum "QoS-Vendor-Specific-Attribute" {
          value 11;
          description
            "QoS Vendor-Specific Attribute.";
        }
      }
      description
        "The type of the QoS attribute.  This specification reserves
       the following reserved values.
         (12) to (254) -  Reserved
            These values are reserved for future allocation.

         (255)  Reserved
            This value is reserved and cannot be used.";
    }

    identity qos-attribute-type {
      base 
      description
        "Base type for Quality of Service Attributes";
    }

    identity Per-MN-Agg-Max-DL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Per-Mobile-Node Aggregate Maximum Downlink Bit Rate.";
    }

    identity Per-MN-Agg-Max-UL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Per-Mobile-Node Aggregate Maximum Uplink Bit Rate";
    }

    identity Per-Session-Agg-Max-DL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Per-Mobility-Session Aggregate Maximum Downlink Bit Rate.";
    }

    identity Per-Session-Agg-Max-UL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Per-Mobility-Session Aggregate Maximum Uplink Bit Rate.";
    }

    identity Allocation-Retention-Priority-type {
      base qos-attribute-type;
      description
        "Allocation and Retention Priority.";
    }

    identity Aggregate-Max-DL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Aggregate Maximum Downlink Bit Rate.";
    }

    identity Aggregate-Max-UL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Aggregate Maximum Uplink Bit Rate.";
    }

    identity Guaranteed-DL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Guaranteed Downlink Bit Rate.";
    }

    identity Guaranteed-UL-Bit-Rate-type {
      base qos-attribute-type;
      description
        "Guaranteed Uplink Bit Rate.";
    }

    identity QoS-Traffic-Selector-type {
      base qos-attribute-type;
      description "QoS Traffic Selector.";
    }

    identity QoS-Vendor-Specific-Attribute-type {
      base qos-attribute-type;
      description
        "QoS Vendor-Specific Attribute.";
    }

    typedef Per-MN-Agg-Max-DL-Bit-Rate-Value {
      type uint32;
      description
        "The aggregate maximum downlink bit rate that is
          requested/allocated for all the mobile node's IP flows.
          The measurement units are bits per second.";
    }

    typedef Per-MN-Agg-Max-UL-Bit-Rate-Value {
      type uint32;
      description
        "The aggregate maximum uplink bit rate that is
            requested/allocated for the mobile node's IP flows. The
            measurement units are bits per second.";
    }

    grouping Per-Session-Agg-Max-Bit-Rate-Value {
      description
        "Per-Session-Agg-Max-Bit-Rate Value";
      leaf max-rate {
        type uint32;
        mandatory true;
        description
          "The aggregate maximum bit rate that is requested/allocated
     for all the IP flows associated with that mobility session.
     The measurement units are bits per second.";
      }

      leaf service-flag {
        type boolean;
        mandatory true;
        description
          "This flag is used for extending the scope of the
        target flows for Per-Session-Agg-Max-UL/DL-Bit-Rate
        from(UL)/to(DL) the mobile node's other mobility sessions
        sharing the same Service Identifier.";
        reference
          "RFC 5149 - Service Selection mobility option";

      }

      leaf exclude-flag {
        type boolean;
        mandatory true;
        description
          "This flag is used to request that the uplink/downlink
       flows for which the network is providing
            Guaranteed-Bit-Rate service be excluded from the
            target IP flows for which
            Per-Session-Agg-Max-UL/DL-Bit-Rate is measured.";
      }
    }  // grouping Per-Session-Agg-Max-Bit-Rate-Value

    grouping Allocation-Retention-Priority-Value {
      description
        "Allocation-Retention-Priority Value";
      leaf prioirty-level {
        type uint8 {
          range "0..15";
        }
        mandatory true;
        description
          "This is a 4-bit unsigned integer value.  It is used to
        decide whether a mobility session establishment or
        modification request can be accepted; this is typically used
        for admission control of Guaranteed Bit Rate traffic in
        case of resource limitations.";
      }

      leaf premption-capability {
        type enumeration {
          enum "enabled" {
            value 0;
            description "enabled";
          }
          enum "disabled" {
            value 1;
            description "disabled";
          }
          enum "reserved1" {
            value 2;
            description "reserved1";
          }
          enum "reserved2" {
            value 3;
            description "reserved2";
          }
        }
        mandatory true;
        description
          "This is a 2-bit unsigned integer value.  It defines whether a
        service data flow can get resources that were already
        assigned to another service data flow with a lower priority
        level.";
      }

      leaf premption-vulnerability {
        type enumeration {
          enum "enabled" {
            value 0;
            description "enabled";
          }
          enum "disabled" {
            value 1;
            description "disabled";
          }
          enum "reserved1" {
            value 2;
            description "reserved1";
          }
          enum "reserved2" {
            value 3;
            description "reserved2";
          }
        }
        mandatory true;
        description
          "This is a 2-bit unsigned integer value.  It defines whether a
         service data flow can lose the resources assigned to it in
         order to admit a service data flow with a higher priority
         level.";
      }
    }  // grouping Allocation-Retention-Priority-Value

    typedef Aggregate-Max-DL-Bit-Rate-Value {
      type uint32;
      description
        "The aggregate maximum downlink bit rate that is
         requested/allocated for downlink IP flows.  The measurement
         units are bits per second.";
    }

    typedef Aggregate-Max-UL-Bit-Rate-Value {
      type uint32;
      description
        "The aggregate maximum downlink bit rate that is
         requested/allocated for downlink IP flows.  The measurement
         units are bits per second.";
    }

    typedef Guaranteed-DL-Bit-Rate-Value {
      type uint32;
      description
        "The guaranteed bandwidth in bits per second for downlink
        IP flows.  The measurement units are bits per second.";
    }

    typedef Guaranteed-UL-Bit-Rate-Value {
      type uint32;
      description
        "The guaranteed bandwidth in bits per second for uplink
         IP flows.  The measurement units are bits per second.";
    }

    grouping QoS-Vendor-Specific-Attribute-Value-Base {
      description
        "QoS Vendor-Specific Attribute.";
      leaf vendorid {
        type uint32;
        mandatory true;
        description
          "The Vendor ID is the SMI (Structure of Management
          Information) Network Management Private Enterprise Code of
          the IANA-maintained 'Private Enterprise Numbers'
          registry.";
        reference
          "'PRIVATE ENTERPRISE NUMBERS', SMI Network Management
           Private Enterprise Codes, April 2014,
            <http://www.iana.org/assignments/enterprise-numbers>";

      }

      leaf subtype {
        type uint8;
        mandatory true;
        description
          "An 8-bit field indicating the type of vendor-specific
           information carried in the option.  The namespace for this
           sub-type is managed by the vendor identified by the
           Vendor ID field.";
      }
    }  // grouping QoS-Vendor-Specific-Attribute-Value-Base

    grouping qosattribute {
      description "PMIP QoS Attribute";
      leaf attributetype {
        type identityref {
          base qos-attribute-type;
        }
        mandatory true;
        description "the attribute type";
      }

      choice attribute-choice {
        description "Attribute Value";
        case per-mn-agg-max-dl-case {
          when
            "./attributetype = "
              + "'Per-MN-Agg-Max-DL-Bit-Rate-type'";
          description
            "Per-MN-Agg-Max-DL-Bit-Rate Case";
          leaf per-mn-agg-max-dl {
            type Per-MN-Agg-Max-DL-Bit-Rate-Value;
            description
              "Per-MN-Agg-Max-DL-Bit-Rate Value";
          }
        }  // case per-mn-agg-max-dl-case

        case per-mn-agg-max-ul-case {
          when
            "./attributetype = "
              + "'Per-MN-Agg-Max-UL-Bit-Rate-type'";
          description
            "Per-MN-Agg-Max-UL-Bit-Rate Case";
          leaf per-mn-agg-max-ul {
            type Per-MN-Agg-Max-UL-Bit-Rate-Value;
            description
              "Per-MN-Agg-Max-UL-Bit-Rate Value";
          }
        }  // case per-mn-agg-max-ul-case

        case per-session-agg-max-dl-case {
          when
            "./attributetype = "
              + "'Per-Session-Agg-Max-DL-Bit-Rate-type'";
          description
            "Per-Session-Agg-Max-Bit-Rate Case";
          container per-session-agg-max-dl {
            description
              "Per-Session-Agg-Max-Bit-Rate Value";
            uses qos-pmip:Per-Session-Agg-Max-Bit-Rate-Value;
          }  // container per-session-agg-max-dl
        }  // case per-session-agg-max-dl-case

        case per-session-agg-max-ul-case {
          when
            "./attributetype = "
              + "'Per-Session-Agg-Max-UL-Bit-Rate-type'";
          description
            "Per-Session-Agg-Max-Bit-Rate Case";
          container per-session-agg-max-ul {
            description
              "Per-Session-Agg-Max-Bit-Rate Value";
            uses qos-pmip:Per-Session-Agg-Max-Bit-Rate-Value;
          }  // container per-session-agg-max-ul
        }  // case per-session-agg-max-ul-case

        case allocation-retention-priority-case {
          when
            "./attributetype = "
              + "'Allocation-Retention-Priority-type'";
          description
            "Allocation-Retention-Priority Case";
          uses qos-pmip:Allocation-Retention-Priority-Value;
        }  // case allocation-retention-priority-case

        case agg-max-dl-case {
          when
            "./attributetype = "
              + "'Aggregate-Max-DL-Bit-Rate-type'";
          description
            "Aggregate-Max-DL-Bit-Rate Case";
          leaf agg-max-dl {
            type Aggregate-Max-DL-Bit-Rate-Value;
            description
              "Aggregate-Max-DL-Bit-Rate Value";
          }
        }  // case agg-max-dl-case

        case agg-max-ul-case {
          when
            "./attributetype = "
              + "'Aggregate-Max-UL-Bit-Rate-type'";
          description
            "Aggregate-Max-UL-Bit-Rate Case";
          leaf agg-max-ul {
            type Aggregate-Max-UL-Bit-Rate-Value;
            description
              "Aggregate-Max-UL-Bit-Rate Value";
          }
        }  // case agg-max-ul-case

        case gbr-dl-case {
          when
            "./attributetype =
                   'Guaranteed-DL-Bit-Rate-type'";
          description
            "Guaranteed-DL-Bit-Rate Case";
          leaf gbr-dl {
            type Guaranteed-DL-Bit-Rate-Value;
            description
              "Guaranteed-DL-Bit-Rate Value";
          }
        }  // case gbr-dl-case

        case gbr-ul-case {
          when
            "./attributetype =
                 'Guaranteed-UL-Bit-Rate-type'";
          description
            "Guaranteed-UL-Bit-Rate Case";
          leaf gbr-ul {
            type Guaranteed-UL-Bit-Rate-Value;
            description
              "Guaranteed-UL-Bit-Rate Value";
          }
        }  // case gbr-ul-case

        case traffic-selector-case {
          when
            "./attributetype = 'QoS-Traffic-Selector-type'";
          description
            "traffic selector Case";
          container traffic-selector {
            description "traffic selector";
            uses traffic-selectors:traffic-selector;
          }  // container traffic-selector
        }  // case traffic-selector-case
      }  // choice attribute-choice
    }  // grouping qosattribute

    grouping qosoption {
      description "PMIP QoS Option";
      leaf srid {
        type sr-id;
        mandatory true;
        description
          "Service Request Identifier";
      }

      leaf trafficclass {
        type traffic-class;
        mandatory true;
        description "Traffic Class";
      }

      leaf operationcode {
        type operational-code;
        mandatory true;
        description "Operation Code";
      }

      list attributes {
        unique "attributetype";
        min-elements 1;
        description "Attributes";
        uses qosattribute;
      }  // list attributes
    }  // grouping qosoption
  }  // module ietf-pmip-qos