module ietf-qos-action {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-qos-action";
prefix action;
import ietf-inet-types {
prefix inet;
reference "RFC 6991: Common YANG Data Types";
}
organization
"IETF Routing Area Working Group";
contact
"WG Web:
WG List:
Editor: Aseem Choudhary
Editor: Mahesh Jethanandani
";
description
"This module contains a collection of YANG definitions for
configuring qos specification implementations.
Copyright (c) 2021 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 Revised 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 2022-07-08 {
description
"Initial version";
reference
"RFC XXXX: YANG Models for Quality of Service (QoS).";
}
feature child-policy-feature {
description
" This feature allows configuration of hierarchical policy.";
}
feature count-feature {
description
"This feature allows action configuration to enable
counter in a classifier";
}
feature named-counter-feature {
description
"This feature allows action configuration to enable
named counter in a classifier";
}
identity rate-unit-type {
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 burst-unit-type {
description
"base burst-unit type";
}
identity bytes {
base burst-unit-type;
description
"bytes";
}
identity kilo-bytes {
base burst-unit-type;
description
"kilo bytes";
}
identity mega-bytes {
base burst-unit-type;
description
"mega bytes";
}
identity millisecond {
base burst-unit-type;
description
"milli seconds";
}
identity microsecond {
base burst-unit-type;
description
"micro seconds";
}
identity red-threshold-unit {
description
"base red-unit type";
}
identity red-threshold-bytes {
base red-threshold-unit;
description
"bytes";
}
identity red-threshold-kb {
base red-threshold-unit;
description
"kilo bytes";
}
identity red-threshold-mb {
base red-threshold-unit;
description
"mega bytes";
}
identity red-threshold-ms {
base red-threshold-unit;
description
"milli seconds";
}
identity red-threshold-us {
base red-threshold-unit;
description
"micro seconds";
}
identity red-threshold-pc {
base red-threshold-unit;
description
"per-centage";
}
identity red-theshold-pt {
base red-threshold-unit;
description
"per-thousand";
}
identity red-threshold-pm {
base red-threshold-unit;
description
"per-million";
}
identity wred-color-type {
description
"base wred color type";
}
identity wred-color-dscp {
base wred-color-type;
description
"dscp wred color type";
}
identity probability-unit {
description
"base probability unit type";
}
identity probability-pc {
base probability-unit;
description
"probability in percentage";
}
identity probability-pt {
base probability-unit;
description
"probability in per thousand";
}
identity probability-pm {
base probability-unit;
description
"probability in per million";
}
identity probability-denominator {
base probability-unit;
description
"probability value is denominator value
while numerator is always 1";
}
identity meter-type {
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 {
description
"drop algorithm";
}
identity tail-drop {
base drop-type;
description
"tail drop algorithm";
}
identity red {
base drop-type;
description
"Random Early Detect drop algorithm";
}
identity wred {
base drop-type;
description
"Weighted Random Early Detect drop algorithm";
}
identity conform-2color-meter-action-type {
description
"action type in a meter";
}
identity exceed-2color-meter-action-type {
description
"action type in a meter";
}
identity conform-3color-meter-action-type {
description
"action type in a meter";
}
identity exceed-3color-meter-action-type {
description
"action type in a meter";
}
identity violate-3color-meter-action-type {
description
"action type in a meter";
}
grouping rate-value-unit {
leaf rate-value {
type uint64;
description
"rate value";
}
leaf rate-unit {
type identityref {
base rate-unit-type;
}
description
"rate unit";
}
description
"rate value and unit grouping";
}
grouping burst {
description
"burst value and unit configuration";
leaf burst-value {
type uint64;
description
"burst value";
}
leaf burst-unit {
type identityref {
base burst-unit-type;
}
description
"burst unit";
}
}
grouping threshold {
description
"Threshold Parameters";
container threshold {
description
"threshold";
choice threshold-type {
case size {
leaf threshold-size {
type uint64;
units "bytes";
description
"Threshold size";
}
}
case interval {
leaf threshold-interval {
type uint64;
units "microsecond";
description
"Threshold interval";
}
}
description
"Choice of threshold type";
}
}
}
grouping drop {
container drop {
leaf drop-action {
type empty;
description
"always drop algorithm";
}
description
"the drop action";
}
description
"always drop grouping";
}
grouping queuelimit {
container qlimit-thresh {
uses threshold;
description
"the queue limit";
}
description
"the queue limit beyond which queue will not hold any packet";
}
grouping conform-2color-meter-action-params {
description
"meter action parameters";
list conform-2color-meter-action-params {
key "conform-2color-meter-action-type";
ordered-by user;
description
"Configuration of basic-meter & associated actions";
leaf conform-2color-meter-action-type {
type identityref {
base conform-2color-meter-action-type;
}
description
"meter action type";
}
choice conform-2color-meter-action-val {
description
" meter action based on choice of meter action type";
}
}
}
grouping exceed-2color-meter-action-params {
description
"meter action parameters";
list exceed-2color-meter-action-params {
key "exceed-2color-meter-action-type";
ordered-by user;
description
"Configuration of basic-meter & associated actions";
leaf exceed-2color-meter-action-type {
type identityref {
base exceed-2color-meter-action-type;
}
description
"meter action type";
}
choice exceed-2color-meter-action-val {
description
" meter action based on choice of meter action type";
}
}
}
grouping conform-3color-meter-action-params {
description
"meter action parameters";
list conform-3color-meter-action-params {
key "conform-3color-meter-action-type";
ordered-by user;
description
"Configuration of basic-meter & associated actions";
leaf conform-3color-meter-action-type {
type identityref {
base conform-3color-meter-action-type;
}
description
"meter action type";
}
choice conform-3color-meter-action-val {
description
" meter action based on choice of meter action type";
}
}
}
grouping exceed-3color-meter-action-params {
description
"meter action parameters";
list exceed-3color-meter-action-params {
key "exceed-3color-meter-action-type";
ordered-by user;
description
"Configuration of basic-meter & associated actions";
leaf exceed-3color-meter-action-type {
type identityref {
base exceed-3color-meter-action-type;
}
description
"meter action type";
}
choice exceed-3color-meter-action-val {
description
" meter action based on choice of meter action type";
}
}
}
grouping violate-3color-meter-action-params {
description
"meter action parameters";
list violate-3color-meter-action-params {
key "violate-3color-meter-action-type";
ordered-by user;
description
"Configuration of basic-meter & associated actions";
leaf violate-3color-meter-action-type {
type identityref {
base violate-3color-meter-action-type;
}
description
"meter action type";
}
choice violate-3color-meter-action-val {
description
" meter action based on choice of meter action type";
}
}
}
grouping one-rate-two-color-meter {
container one-rate-two-color-meter {
description
"single rate two color marker meter";
leaf committed-rate-value {
type uint64;
description
"committed rate value";
}
leaf committed-rate-unit {
type identityref {
base rate-unit-type;
}
description
"committed rate unit";
}
leaf committed-burst-value {
type uint64;
description
"burst value";
}
leaf committed-burst-unit {
type identityref {
base burst-unit-type;
}
description
"committed burst unit";
}
container conform-action {
uses conform-2color-meter-action-params;
description
"conform action";
}
container exceed-action {
uses exceed-2color-meter-action-params;
description
"exceed action";
}
}
description
"single rate two color marker meter attributes";
}
grouping one-rate-tri-color-meter {
container one-rate-tri-color-meter {
description
"single rate three color meter";
leaf committed-rate-value {
type uint64;
description
"meter rate";
}
leaf committed-rate-unit {
type identityref {
base rate-unit-type;
}
description
"committed rate unit";
}
leaf committed-burst-value {
type uint64;
description
"committed burst size";
}
leaf committed-burst-unit {
type identityref {
base burst-unit-type;
}
description
"committed burst unit";
}
leaf excess-burst-value {
type uint64;
description
"excess burst size";
}
leaf excess-burst-unit {
type identityref {
base burst-unit-type;
}
description
"excess burst unit";
}
container conform-action {
uses conform-3color-meter-action-params;
description
"conform, or green action";
}
container exceed-action {
uses exceed-3color-meter-action-params;
description
"exceed, or yellow action";
}
container violate-action {
uses violate-3color-meter-action-params;
description
"violate, or red action";
}
}
description
"one-rate-tri-color-meter attributes";
}
grouping two-rate-tri-color-meter {
container two-rate-tri-color-meter {
description
"two rate three color meter";
leaf committed-rate-value {
type uint64;
units "bits-per-second";
description
"committed rate";
}
leaf committed-rate-unit {
type identityref {
base rate-unit-type;
}
description
"committed rate unit";
}
leaf committed-burst-value {
type uint64;
description
"commited burst size";
}
leaf committed-burst-unit {
type identityref {
base burst-unit-type;
}
description
"committed burst unit";
}
leaf peak-rate-value {
type uint64;
description
"peak rate";
}
leaf peak-rate-unit {
type identityref {
base rate-unit-type;
}
description
"committed rate unit";
}
leaf peak-burst-value {
type uint64;
description
"commited burst size";
}
leaf peak-burst-unit {
type identityref {
base burst-unit-type;
}
description
"peak burst unit";
}
container conform-action {
uses conform-3color-meter-action-params;
description
"conform, or green action";
}
container exceed-action {
uses exceed-3color-meter-action-params;
description
"exceed, or yellow action";
}
container violate-action {
uses violate-3color-meter-action-params;
description
"exceed, or red action";
}
}
description
"two-rate-tri-color-meter attributes";
}
grouping meter {
choice meter-type {
case one-rate-two-color-meter-type {
uses one-rate-two-color-meter;
description
"basic meter";
}
case one-rate-tri-color-meter-type {
uses one-rate-tri-color-meter;
description
"one rate tri-color meter";
}
case two-rate-tri-color-meter-type {
uses two-rate-tri-color-meter;
description
"two rate tri-color meter";
}
description
" meter action based on choice of meter action type";
}
description
"meter attributes";
}
container meters {
description
"list of meter templates";
list meter {
key "name";
description
"meter entry template";
leaf name {
type string;
description
"meter identifier";
}
uses meter;
}
}
grouping meter-reference {
container meter {
leaf name {
type string ;
mandatory true;
description
"This leaf defines name of the meter referenced";
}
leaf type {
type identityref {
base meter-type;
}
mandatory true;
description
"This leaf defines type of the meter";
}
description
"meter reference name";
}
description
"meter reference";
}
grouping count {
container count {
if-feature count-feature;
leaf count-action {
type empty;
description
"count action";
}
description
"the count action";
}
description
"the count action grouping";
}
grouping named-counter {
container named-counter {
if-feature named-counter-feature;
leaf count-name-action {
type string;
description
"count action";
}
description
"the count action";
}
description
"the count action grouping";
}
grouping discard {
container discard {
leaf discard {
type empty;
description
"discard action";
}
description
"discard action";
}
description
"discard grouping";
}
grouping priority {
container priority {
leaf priority-level {
type uint8;
description
"priority level";
}
description
"priority attributes";
}
description
"priority attributes grouping";
}
grouping min-rate {
container min-rate {
uses rate-value-unit;
description
"min guaranteed bandwidth";
}
description
"minimum rate grouping";
}
grouping dscp-marking {
container dscp {
leaf dscp {
type inet:dscp;
description
"dscp marking";
}
description
"dscp marking container";
}
description
"dscp marking grouping";
}
grouping traffic-group-marking {
container traffic-group {
leaf traffic-group {
type string;
description
"traffic group marking";
}
description
"traffic group marking container";
}
description
"traffic group marking grouping";
}
grouping child-policy {
container child-policy {
if-feature child-policy-feature;
leaf policy-name {
type string;
description
"Hierarchical Policy";
}
description
"Hierarchical Policy configuration container";
}
description
"Grouping of Hierarchical Policy configuration";
}
grouping max-rate {
container max-rate {
uses rate-value-unit;
uses burst;
description
"maximum rate attributes container";
}
description
"maximum rate attributes";
}
grouping red-config-parameters {
leaf min-threshold-val {
type uint64;
description
"minimum value of red threshold";
}
leaf min-threshold-unit {
type identityref {
base red-threshold-unit;
}
description
"unit of minimum red threshold";
}
leaf max-threshold-val {
type uint64;
description
"maximum value of red threshold";
}
leaf max-threshold-unit {
type identityref {
base red-threshold-unit;
}
description
"unit of maximum red threshold";
}
leaf weight {
type uint8;
description
"the decay factor for the average queue size
calculation. the numbers are 2's exponent";
}
leaf max-probability-val {
type uint64;
description
"value of maximum probability value. this value need
be interpreted along with max-probability-unit";
}
leaf max-probability-unit {
type identityref {
base probability-unit;
}
description
"probability unit type as defined
by probability-unit";
}
description
"Random Early Detect Configuration Parameters";
}
grouping queue {
container queue {
uses priority;
uses min-rate;
uses max-rate;
container algorithmic-drop {
choice drop-algorithm {
case tail-drop {
container tail-drop {
leaf tail-drop {
type empty;
description
"tail drop algorithm";
}
description
"Tail Drop configuration container";
}
description
"Tail Drop choice";
}
case red {
container red {
uses red-config-parameters;
leaf ecn-enabled {
type boolean;
default "false";
description
"ecn is enabled on the queue";
}
description
"Random Early Detect configuration";
}
}
case wred {
container wred {
list wred {
key "profile";
leaf profile {
type uint8;
description
"profile id of each wred profile";
}
leaf color-type {
type identityref {
base wred-color-type;
}
description
"wred color-type of each profile";
}
list color-val {
key "min max";
leaf min {
type uint8;
description
"minimum value of color types";
}
leaf max {
type uint8;
description
"maximum value of color types";
}
description
"list of color markings which constitute
a traffic profile";
}
uses red-config-parameters;
description
"list of RED profiles each with its own
threshold values";
}
leaf ecn-enabled {
type boolean;
default "false";
description
"ecn is enabled on the queue";
}
description
"Weighted Random Early Detect configuration";
}
}
description
"Choice of Drop Algorithm";
}
description
"Algorithmic Drop configuration container";
}
description
"Queue configuration container";
}
description
"Queue grouping";
}
grouping scheduler {
container scheduler {
uses min-rate;
uses max-rate;
description
"Schedular configuration container";
}
description
"Schedular configuration grouping";
}
}