pg: add support to delete pg interface

Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3102fded415c644673fb79a0fdb7a7448ce20f26
This commit is contained in:
Mohsin Kazmi
2024-10-03 23:18:17 +00:00
committed by Beno�t Ganne
parent 28955ceb8b
commit 0b1bd9df33
7 changed files with 132 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ class TestPgTun(VppTestCase):
for i in self.pg_interfaces:
i.unconfig_ip4()
i.admin_down()
i.remove_vpp_config()
super(TestPgTun, self).tearDown()
def test_pg_tun(self):

View File

@@ -147,6 +147,11 @@ class VppPGInterface(VppInterface):
)
self._cap_name = "pcap%u-sw_if_index-%s" % (self.pg_index, self.sw_if_index)
def remove_vpp_config(self):
"""delete Pg interface"""
self.disable_capture()
self.test.vapi.pg_delete_interface(sw_if_index=self.sw_if_index)
def link_pcap_file(self, path, direction, counter):
if not config.keep_pcaps:
return