module ietf-diffserv-action {
namespace "urn:ietf:params:xml:ns:yang:ietf-diffserv-action";
prefix action;
import ietf-inet-types {
prefix inet;
}
import ietf-diffserv-classifier {
prefix classifier;
}
import ietf-diffserv-policy {
prefix policy;
}
organization "IETF NETMOD (Netmod Working Group) Working Group";
contact
"WG Web:
WG List:
WG Chair: Jurgen Schonwalder
WG Chair: Tom Nadeau
Editor: Aseem Choudhary
Editor: Shitanshu Shah
";
description
"This module contains a collection of YANG definitions for
configuring diffserv 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 2015-04-07 {
description
"Latest revision for diffserv actions";
reference "RFC XXXX";
}
feature hierarchial-policy-support {
description
" This feature allows hierarchial policy to be configured";
}
feature aqm-red-support {
description
" This feature allows AQM RED to be configured";
}
grouping dscp-range {
description
"dscp range definition";
leaf dscp-min {
type inet:dscp;
description
"Minimum of dscp range";
}
leaf dscp-max {
type inet:dscp;
description
"Maximum of dscp range";
}
}
grouping burst {
description
"burst size or interval configuration";
choice burst-type {
case size {
leaf burst-size {
type uint64;
units "bytes";
description
"burst size";
}
}
case interval {
leaf burst-interval {
type uint64;
units "microsecond";
description
"burst interval";
}
}
description
"Choice of burst type";
}
}
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";
}
}
}
identity marking {
base policy:action-type;
description
"marking action type";
}
identity meter {
base policy:action-type;
description
"meter action type";
}
identity priority {
base policy:action-type;
description
"priority 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 algorithmic-drop {
base policy:action-type;
description
"algorithmic-drop action type";
}
identity drop-type {
description
"drop algorithm";
}
identity always-drop {
base drop-type;
description
"always 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 {
description
"action type in a meter";
}
identity meter-action-drop {
base meter-action-type;
description
"drop action type in a meter";
}
identity meter-action-set {
base meter-action-type;
description
"mark action type in a meter";
}
grouping drop {
leaf drop-action {
type empty;
description
"always drop algorithm";
}
description
"the drop action";
}
grouping queuelimit {
list qlimit-dscp-thresh {
key "dscp-min dscp-max";
uses dscp-range;
uses threshold;
description
"the queue limit per dscp range";
}
description
"the queue limit beyond which queue will not hold any packet";
}
grouping meter-action-params {
leaf meter-action-type {
type identityref {
base meter-action-type;
}
description
"meter action type";
}
leaf next-meter-id {
type uint16;
description
"next meter identifier";
}
choice val {
case meter-action-mark {
uses marking;
description
"meter action: mark";
}
case meter-action-drop {
description
"meter action: drop";
uses drop;
}
description
" meter action based on choice of meter action type";
}
description
"meter action parameters";
}
grouping meter {
leaf meter-id {
type uint16;
description
"meter identifier";
}
leaf meter-rate {
type uint64;
units "bits-per-second";
description
"meter rate";
}
uses burst;
container color {
uses classifier:classifier-entry-generic-attr;
description
"color aware & color blind attributes container";
}
container succeed-action {
uses meter-action-params;
description
"confirm action";
}
container fail-action {
uses meter-action-params;
description
"exceed action";
}
description
"meter attributes";
}
grouping priority {
leaf priority-level {
type uint8;
description
"priority level";
}
description
"priority attributes";
}
grouping min-rate {
leaf min-rate {
type uint64;
units "bits-per-second";
description
"minimum rate";
}
description
"minimum rate grouping";
}
grouping marking {
leaf dscp {
type inet:dscp;
description
"dscp marking";
}
description
"marking grouping";
}
grouping max-rate {
leaf absolute-rate {
type uint64;
units "bits-per-second";
description
"rate in bits per second";
}
uses burst;
description
"maximum rate attributes";
}
grouping red-threshold {
container red-min-thresh {
uses threshold;
description
"Minimum threshold";
}
container red-max-thresh {
uses threshold;
description
"Maximum threshold";
}
leaf mark-probability {
type uint32 {
range "1..1000";
}
description
"Mark probability";
}
description
"RED threshold attributes";
}
grouping randomdetect {
leaf exp-weighting-const {
type uint32;
description
"Exponential weighting constant factor for red profile ";
}
uses red-threshold;
description
"Random detect attributes";
}
augment "/policy:policies/policy:policy-entry" +
"/policy:classifier-entry" +
"/policy:classifier-action-entry-cfg" +
"/policy:action-cfg-params" {
case marking {
container marking-cfg {
uses marking;
description
"Marking configuration container";
}
}
case priority {
container priority-cfg {
uses priority;
description
"priority attributes container";
}
}
case meter {
container meter-cfg {
list meter-list {
key "meter-id";
uses meter;
description
"Meter configuration";
}
description
"Meter list configuration container";
}
}
case min-rate {
container min-rate-cfg {
uses min-rate;
description
"min guaranteed bandwidth";
}
}
case max-rate {
container max-rate-cfg {
uses max-rate;
description
"maximum rate attributes";
}
}
case algorithmic-drop {
choice drop-algorithm {
case always-drop {
container drop-cfg {
uses drop;
description
"Always Drop configuration container";
}
}
case tail-drop {
container tail-drop-cfg {
uses queuelimit;
description
"Tail Drop configuration container";
}
}
case random-detect {
container random-detect-cfg {
if-feature aqm-red-support;
uses randomdetect;
description
"Random Detect configuration container";
}
}
description
"Choice of Drop Algorithm";
}
}
description
"Augment the actions to policy entry";
}
}