summaryrefslogtreecommitdiffstats
path: root/vpp-classifier/api/src/main/yang/vpp-classifier.yang
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-02-27 07:39:22 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-03-14 14:31:10 +0100
commite7903be79d4451f5b6e6f633b7ea20f8330ac0c1 (patch)
tree3a6c129ba19b30fc0ef21deebc2bc225b8992095 /vpp-classifier/api/src/main/yang/vpp-classifier.yang
parentb54f6dc31761d4a2f9d951fc551b11d9047eac56 (diff)
HC2VPP-39: yang model for policer configuration in VPP
Change-Id: I6c84c5fb85e2a4073a7a885db390b08a6582639d Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-classifier/api/src/main/yang/vpp-classifier.yang')
-rw-r--r--vpp-classifier/api/src/main/yang/vpp-classifier.yang38
1 files changed, 31 insertions, 7 deletions
diff --git a/vpp-classifier/api/src/main/yang/vpp-classifier.yang b/vpp-classifier/api/src/main/yang/vpp-classifier.yang
index beb4def85..c1aa1794c 100644
--- a/vpp-classifier/api/src/main/yang/vpp-classifier.yang
+++ b/vpp-classifier/api/src/main/yang/vpp-classifier.yang
@@ -19,10 +19,16 @@ module vpp-classifier {
"https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers";
}
+ // TODO add revision (policer inclusion)
+
import ietf-yang-types {
prefix "yang";
}
+ import policer {
+ prefix "policer";
+ }
+
typedef classify-table-ref {
type leafref {
path "/vpp-classifier:vpp-classifier/classify-table/name";
@@ -71,17 +77,35 @@ module vpp-classifier {
grouping classify-session-attributes {
description
"Defines classify session attributes that are mapped to classify_add_del_session
- and classify_session_details messages parameters.";
+ and classify_session_details messages parameters.
+ Either hit_next or policer_hit_next should be defined.";
- leaf hit_next {
- type vpp-node;
+ choice next_node {
mandatory true;
description
- "Vpp node to which packet will be send when it produces a match.";
- }
- leaf opaque_index {
- type opaque-index;
+ "Options for expressing the next node on classify hit and associated metadata to be passed";
+ case standard {
+ leaf hit_next {
+ mandatory true;
+ type vpp-node;
+ description
+ "Vpp node to which packet will be send when it produces a match.";
+ }
+ leaf opaque_index {
+ type opaque-index;
+ }
+ }
+ case policer {
+ leaf policer_hit_next {
+ mandatory true;
+ type policer:policer-ref;
+ }
+ leaf color_classfier {
+ type policer:color-classfier;
+ }
+ }
}
+
leaf advance {
type int32;
default 0;