summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
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})