summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-02-27 03:45:38 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-16 20:28:50 +0000
commit039cbfe254be998f7311bc4638bb262b44efac19 (patch)
treecc75e6130f3fdbdd1dbfe48669e6c17534240e11 /test/vpp_papi_provider.py
parent0d65d11053395bde7bd8c36439e9025e50ea8028 (diff)
QoS recording and marking
Change-Id: Ie5a50def4ec1e4a3b3404a8b6ab9ec248bc16744 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index bd770efdd36..da59bc86ca0 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -36,6 +36,13 @@ class L2_VTR_OP:
L2_TRANSLATE_2_2 = 8
+class QOS_SOURCE:
+ EXT = 0
+ VLAN = 1
+ MPLS = 2
+ IP = 3
+
+
class UnexpectedApiReturnValueError(Exception):
""" exception raised when the API return value is unexpected """
pass
@@ -3255,3 +3262,32 @@ class VppPapiProvider(object):
""" IPIP tunnel Delete """
return self.api(self.papi.ipip_del_tunnel,
{'sw_if_index': sw_if_index})
+
+ def qos_egress_map_update(self, id, outputs):
+ """ QOS egress map update """
+ return self.api(self.papi.qos_egress_map_update,
+ {'map_id': id,
+ 'rows': outputs})
+
+ def qos_egress_map_delete(self, id):
+ """ QOS egress map delete """
+ return self.api(self.papi.qos_egress_map_delete,
+ {'map_id': id})
+
+ def qos_mark_enable_disable(self, sw_if_index,
+ output_source,
+ map_id,
+ enable):
+ """ QOS Mark Enable/Disable """
+ return self.api(self.papi.qos_mark_enable_disable,
+ {'map_id': map_id,
+ 'sw_if_index': sw_if_index,
+ 'output_source': output_source,
+ 'enable': enable})
+
+ def qos_record_enable_disable(self, sw_if_index, input_source, enable):
+ """ IP QoS recording Enble/Disable """
+ return self.api(self.papi.qos_record_enable_disable,
+ {'sw_if_index': sw_if_index,
+ 'input_source': input_source,
+ 'enable': enable})