summaryrefslogtreecommitdiffstats
path: root/test/vpp_policer.py
diff options
context:
space:
mode:
authorBrian Russell <brian@graphiant.com>2021-02-17 15:54:52 +0000
committerNeale Ranns <neale@graphiant.com>2021-02-19 10:48:20 +0000
commit6e6920d4e096bd158a0057ce0f8dd8a08cbabf72 (patch)
tree95c897162eef66b8fad8092d47a096541451c9d8 /test/vpp_policer.py
parentb046830173a95b9f2d72865b3389174b7b7ff5d9 (diff)
tests: test input policer
Apply a policer to an interface, check it's policing packets. Remove it and check it no longer polices packets. Type: test Signed-off-by: Brian Russell <brian@graphiant.com> Change-Id: I6f694c8a9804cadf010b5831770aaae81f42e027
Diffstat (limited to 'test/vpp_policer.py')
-rw-r--r--test/vpp_policer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/vpp_policer.py b/test/vpp_policer.py
index 387ab270214..2c47eed75fd 100644
--- a/test/vpp_policer.py
+++ b/test/vpp_policer.py
@@ -61,6 +61,10 @@ class VppPolicer(VppObject):
self._test.vapi.policer_bind(name=self.name, worker_index=worker,
bind_enable=bind)
+ def apply_vpp_config(self, if_index, apply):
+ self._test.vapi.policer_input(name=self.name, sw_if_index=if_index,
+ apply=apply)
+
def query_vpp_config(self):
dump = self._test.vapi.policer_dump(
match_name_valid=True, match_name=self.name)