From e7903be79d4451f5b6e6f633b7ea20f8330ac0c1 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 27 Feb 2017 07:39:22 +0100 Subject: HC2VPP-39: yang model for policer configuration in VPP Change-Id: I6c84c5fb85e2a4073a7a885db390b08a6582639d Signed-off-by: Marek Gradzki --- .../api/src/main/yang/vpp-classifier.yang | 38 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'vpp-classifier/api/src/main/yang/vpp-classifier.yang') 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; -- cgit 1.2.3-korg