aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_acl_plugin_macip.py
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-03-23 12:20:56 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-23 13:00:52 +0000
commitbeca26622983018255d87b8031e39e517e4e4242 (patch)
treee9ccb2d78ba21472e76fb966883d72f0f7103947 /test/test_acl_plugin_macip.py
parent915899a827968d4d6534ddb09e3797a58771f922 (diff)
acl-plugin: make test: do not use a debug CLI where API can be used
Parsing the list of applied ACLs from the debug CLI output is not a good idea, since the debug CLI can and will change. Fix that. Change-Id: Ia47214863f2658a54219f59cb974b5cbc536f862 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'test/test_acl_plugin_macip.py')
-rw-r--r--test/test_acl_plugin_macip.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/test_acl_plugin_macip.py b/test/test_acl_plugin_macip.py
index bf87e02ecd9..b009fb4598b 100644
--- a/test/test_acl_plugin_macip.py
+++ b/test/test_acl_plugin_macip.py
@@ -287,13 +287,10 @@ class MethodHolder(VppTestCase):
reply = self.vapi.macip_acl_dump()
self.assertEqual(len(reply), 0)
- intf_acls = self.vapi.ppcli("sh acl-plugin interface").split(
- "\nsw_if_index")
+ intf_acls = self.vapi.acl_interface_list_dump()
for i_a in intf_acls:
- ia = i_a.split(":")
- if len(ia) == 3:
- sw_if_index = int(ia[0])
- acl_index = int(ia[2])
+ sw_if_index = i_a.sw_if_index
+ for acl_index in i_a.acls:
self.vapi.acl_interface_add_del(sw_if_index, acl_index, 0)
self.vapi.acl_del(acl_index)