netconfcentral logo

ietf-qos-action@2016-06-15



  module ietf-qos-action {

    yang-version 1;

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

    prefix action;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-qos-policy {
      prefix policy;
    }

    organization
      "IETF RTG (Routing Area) Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/rtgwg/>
     WG List:  <mailto:rtgwg@ietf.org>
     WG Chair: Chris Bowers
               <mailto:cbowers@juniper.net>
     WG Chair: Jeff Tantsura
               <mailto:jefftant.ietf@gmail.com>
     Editor:   Aseem Choudhary
               <mailto:asechoud@cisco.com>
     Editor:   Mahesh Jethanandani
               <mailto:mjethanandani@gmail.com>
     Editor:   Norm Strahle
               <mailto:nstrahle@juniper.net>";

    description
      "This module contains a collection of YANG definitions for
     configuring qos specification implementations.
     Copyright (c) 2014 IETF Trust and the persons identified as
     authors of the code.  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 "2016-06-15" {
      description
        "Latest revision for qos actions";
      reference
        "RFC XXXX";

    }


    feature meter-template-support {
      description
        " This feature allows support of meter-template.";
    }

    identity rate-unit-type {
      base 
      description "base rate-unit type";
    }

    identity bits-per-second {
      base rate-unit-type;
      description "bits per second identity";
    }

    identity kilo-bits-per-second {
      base rate-unit-type;
      description
        "kilo bits per second identity";
    }

    identity mega-bits-per-second {
      base rate-unit-type;
      description
        "mega bits per second identity";
    }

    identity giga-bits-per-second {
      base rate-unit-type;
      description
        "mega bits per second identity";
    }

    identity percent {
      base rate-unit-type;
      description "percentage";
    }

    identity dscp-marking {
      base policy:action-type;
      description "dscp marking action type";
    }

    identity meter-inline {
      base policy:action-type;
      description "meter-inline action type";
    }

    identity meter-reference {
      base policy:action-type;
      description
        "meter reference action type";
    }

    identity min-rate {
      base policy:action-type;
      description "min-rate action type";
    }

    identity max-rate {
      base policy:action-type;
      description "max-rate action type";
    }

    identity queue {
      base policy:action-type;
      description "queue action type";
    }

    identity schedular {
      base policy:action-type;
      description "schedular action type";
    }

    identity discard {
      base policy:action-type;
      description "discard action type";
    }

    identity child-policy {
      base policy:action-type;
      description "child-policy action type";
    }

    identity count {
      base policy:action-type;
      description "discard action type";
    }

    identity meter-type {
      base 
      description
        "This base identity type defines meter types";
    }

    identity one-rate-two-color-meter-type {
      base meter-type;
      description
        "one rate two color meter type";
    }

    identity one-rate-tri-color-meter-type {
      base meter-type;
      description
        "one rate three color meter type";
    }

    identity two-rate-tri-color-meter-type {
      base meter-type;
      description
        "two rate three color meter action type";
    }

    identity drop-type {
      base 
      description "drop algorithm";
    }

    identity tail-drop {
      base drop-type;
      description "tail drop algorithm";
    }

    identity random-detect {
      base drop-type;
      description "random detect algorithm";
    }

    identity meter-action-type {
      base 
      description "action type in a meter";
    }

    identity meter-action-drop {
      base meter-action-type;
      description
        "drop action type in a meter";
    }

    identity meter-action-mark-dscp {
      base meter-action-type;
      description
        "dscp mark action type in a meter";
    }

    grouping rate-value-unit {
      description
        "rate value and unit grouping";
      leaf rate-value {
        type uint64;
        description "rate value";
      }

      leaf rate-unit {
        type identityref {
          base rate-unit-type;
        }
        description "rate unit";
      }
    }  // grouping rate-value-unit

    grouping burst {
      description
        "burst size or interval configuration";
      choice burst-type {
        description "Choice of burst type";
        leaf burst-size {
          type uint64;
          units "bytes";
          description "burst size";
        }
        leaf burst-interval {
          type uint64;
          units "microsecond";
          description "burst interval";
        }
      }  // choice burst-type
    }  // grouping burst

    grouping threshold {
      description "Threshold Parameters";
      container threshold {
        description "threshold";
        choice threshold-type {
          description
            "Choice of threshold type";
          leaf threshold-size {
            type uint64;
            units "bytes";
            description "Threshold size";
          }
          leaf threshold-interval {
            type uint64;
            units "microsecond";
            description "Threshold interval";
          }
        }  // choice threshold-type
      }  // container threshold
    }  // grouping threshold

    grouping drop {
      description "always drop grouping";
      container drop-cfg {
        description "the drop action";
        leaf drop-action {
          type empty;
          description
            "always drop algorithm";
        }
      }  // container drop-cfg
    }  // grouping drop

    grouping queuelimit {
      description
        "the queue limit beyond which queue will not hold any packet";
      container qlimit-thresh {
        description "the queue limit";
        uses threshold;
      }  // container qlimit-thresh
    }  // grouping queuelimit

    grouping meter-action-params {
      description "meter action parameters";
      list meter-action-params {
        key "meter-action-type";
        ordered-by user;
        description
          "Configuration of basic-meter & associated actions";
        leaf meter-action-type {
          type identityref {
            base meter-action-type;
          }
          description "meter action type";
        }

        choice meter-action-val {
          description
            " meter action based on choice of meter action type";
        }  // choice meter-action-val
      }  // list meter-action-params
    }  // grouping meter-action-params

    grouping one-rate-two-color-meter {
      description
        "single rate two color marker meter attributes";
      container one-rate-two-color-meter {
        description
          "single rate two color marker meter";
        leaf meter-rate {
          type uint64;
          units "bits-per-second";
          description "meter rate";
        }

        leaf meter-burst {
          type uint64;
          units "byes";
          description "burst size";
        }

        container conform-action {
          description "conform action";
          uses meter-action-params;
        }  // container conform-action

        container exceed-action {
          description "exceed action";
          uses meter-action-params;
        }  // container exceed-action
      }  // container one-rate-two-color-meter
    }  // grouping one-rate-two-color-meter

    grouping one-rate-tri-color-meter {
      description
        "one-rate-tri-color-meter attributes";
      container one-rate-tri-color-meter {
        description
          "single rate three color meter";
        leaf committed-rate {
          type uint64;
          units "bits-per-second";
          description "meter rate";
        }

        leaf committed-burst {
          type uint64;
          units "byes";
          description "commited burst size";
        }

        leaf excess-burst {
          type uint64;
          units "byes";
          description "excess burst size";
        }

        container conform-action {
          description
            "conform, or green action";
          uses meter-action-params;
        }  // container conform-action

        container exceed-action {
          description
            "exceed, or yellow action";
          uses meter-action-params;
        }  // container exceed-action

        container violate-action {
          description
            "violate, or red action";
          uses meter-action-params;
        }  // container violate-action
      }  // container one-rate-tri-color-meter
    }  // grouping one-rate-tri-color-meter

    grouping two-rate-tri-color-meter {
      description
        "two-rate-tri-color-meter attributes";
      container two-rate-tri-color-meter {
        description
          "two rate three color meter";
        leaf committed-rate {
          type uint64;
          units "bits-per-second";
          description "meter rate";
        }

        leaf committed-burst {
          type uint64;
          units "byes";
          description "commited burst size";
        }

        leaf peak-rate {
          type uint64;
          units "bits-per-second";
          description "meter rate";
        }

        leaf peak-burst {
          type uint64;
          units "byes";
          description "commited burst size";
        }

        container conform-action {
          description
            "conform, or green action";
          uses meter-action-params;
        }  // container conform-action

        container exceed-action {
          description
            "exceed, or yellow action";
          uses meter-action-params;
        }  // container exceed-action

        container violate-action {
          description
            "exceed, or red action";
          uses meter-action-params;
        }  // container violate-action
      }  // container two-rate-tri-color-meter
    }  // grouping two-rate-tri-color-meter

    grouping meter {
      description "meter attributes";
      choice meter-type {
        description
          " meter action based on choice of meter action type";
        case one-rate-two-color-meter-type {
          description "basic meter";
          uses one-rate-two-color-meter;
        }  // case one-rate-two-color-meter-type

        case one-rate-tri-color-meter-type {
          description
            "one rate tri-color meter";
          uses one-rate-tri-color-meter;
        }  // case one-rate-tri-color-meter-type

        case two-rate-tri-color-meter-type {
          description
            "two rate tri-color meter";
          uses two-rate-tri-color-meter;
        }  // case two-rate-tri-color-meter-type
      }  // choice meter-type
    }  // grouping meter

    container meter-template {
      description "list of meter templates";
      list meter-entry {
        if-feature meter-template-support;
        key "meter-name";
        description "meter entry template";
        leaf meter-name {
          type string;
          description "meter identifier";
        }

        uses meter;
      }  // list meter-entry
    }  // container meter-template

    grouping meter-reference {
      description "meter reference";
      container meter-reference-cfg {
        description "meter reference";
        leaf meter-type {
          type identityref {
            base meter-type;
          }
          description
            "This leaf defines type of the filter";
        }
      }  // container meter-reference-cfg
    }  // grouping meter-reference

    grouping count {
      description
        "the count action grouping";
      container count-cfg {
        description "the count action";
        leaf count-action {
          type empty;
          description "count action";
        }
      }  // container count-cfg
    }  // grouping count

    grouping discard {
      description "discard grouping";
      container discard-cfg {
        description "discard action";
        leaf discard {
          type empty;
          description "discard action";
        }
      }  // container discard-cfg
    }  // grouping discard

    grouping priority {
      description
        "priority attributes grouping";
      container priority-cfg {
        description "priority attributes";
        leaf priority-level {
          type uint8;
          description "priority level";
        }
      }  // container priority-cfg
    }  // grouping priority

    grouping min-rate {
      description "minimum rate grouping";
      container min-rate-cfg {
        description
          "min guaranteed bandwidth";
        uses rate-value-unit;
      }  // container min-rate-cfg
    }  // grouping min-rate

    grouping dscp-marking {
      description "dscp marking grouping";
      container dscp-cfg {
        description "dscp marking container";
        leaf dscp {
          type inet:dscp;
          description "dscp marking";
        }
      }  // container dscp-cfg
    }  // grouping dscp-marking

    grouping max-rate {
      description "maximum rate attributes";
      container max-rate-cfg {
        description
          "maximum rate attributes container";
        uses rate-value-unit;

        uses burst;
      }  // container max-rate-cfg
    }  // grouping max-rate

    grouping queue {
      description "Queue grouping";
      container queue-cfg {
        description
          "Queue configuration container";
        uses priority;

        uses min-rate;

        uses max-rate;

        container algorithmic-drop-cfg {
          description
            "Algorithmic Drop configuration container";
          choice drop-algorithm {
            description
              "Choice of Drop Algorithm";
            case tail-drop {
              description "Tail Drop choice";
              container tail-drop-cfg {
                description
                  "Tail Drop configuration container";
                leaf tail-drop-alg {
                  type empty;
                  description
                    "tail drop algorithm";
                }
              }  // container tail-drop-cfg
            }  // case tail-drop
          }  // choice drop-algorithm
        }  // container algorithmic-drop-cfg
      }  // container queue-cfg
    }  // grouping queue

    grouping schedular {
      description
        "Schedular configuration grouping";
      container schedular-cfg {
        description
          "Schedular configuration container";
        uses min-rate;

        uses max-rate;
      }  // container schedular-cfg
    }  // grouping schedular
  }  // module ietf-qos-action