Revert "Revert "make test: fix broken interfaces""
This reverts commit c8efa29b6f.
Change-Id: I1d5c5773d5f86a63073e255336bd9de628e26179
Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:
+4
-6
@@ -558,18 +558,16 @@ class VppTestCase(unittest.TestCase):
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def create_loopback_interfaces(cls, interfaces):
|
||||
def create_loopback_interfaces(cls, count):
|
||||
"""
|
||||
Create loopback interfaces.
|
||||
|
||||
:param interfaces: iterable indexes of the interfaces.
|
||||
:param count: number of interfaces created.
|
||||
:returns: List of created interfaces.
|
||||
"""
|
||||
result = []
|
||||
for i in interfaces:
|
||||
intf = VppLoInterface(cls, i)
|
||||
result = [VppLoInterface(cls) for i in range(count)]
|
||||
for intf in result:
|
||||
setattr(cls, intf.name, intf)
|
||||
result.append(intf)
|
||||
cls.lo_interfaces = result
|
||||
return result
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class TestIpIrb(VppTestCase):
|
||||
|
||||
# create 3 pg interfaces, 1 loopback interface
|
||||
cls.create_pg_interfaces(range(3))
|
||||
cls.create_loopback_interfaces(range(1))
|
||||
cls.create_loopback_interfaces(1)
|
||||
|
||||
cls.interfaces = list(cls.pg_interfaces)
|
||||
cls.interfaces.extend(cls.lo_interfaces)
|
||||
|
||||
@@ -63,7 +63,7 @@ class MethodHolder(VppTestCase):
|
||||
try:
|
||||
# create 4 pg interfaces, 1 loopback interface
|
||||
cls.create_pg_interfaces(range(4))
|
||||
cls.create_loopback_interfaces(range(1))
|
||||
cls.create_loopback_interfaces(1)
|
||||
|
||||
# create 2 subinterfaces
|
||||
cls.subifs = [
|
||||
|
||||
+3
-3
@@ -629,7 +629,7 @@ class BFD4TestCase(VppTestCase):
|
||||
cls.vapi.cli("set log class bfd level debug")
|
||||
try:
|
||||
cls.create_pg_interfaces([0])
|
||||
cls.create_loopback_interfaces([0])
|
||||
cls.create_loopback_interfaces(1)
|
||||
cls.loopback0 = cls.lo_interfaces[0]
|
||||
cls.loopback0.config_ip4()
|
||||
cls.loopback0.admin_up()
|
||||
@@ -1439,7 +1439,7 @@ class BFD6TestCase(VppTestCase):
|
||||
cls.pg0.configure_ipv6_neighbors()
|
||||
cls.pg0.admin_up()
|
||||
cls.pg0.resolve_ndp()
|
||||
cls.create_loopback_interfaces([0])
|
||||
cls.create_loopback_interfaces(1)
|
||||
cls.loopback0 = cls.lo_interfaces[0]
|
||||
cls.loopback0.config_ip6()
|
||||
cls.loopback0.admin_up()
|
||||
@@ -2557,7 +2557,7 @@ class BFDCLITestCase(VppTestCase):
|
||||
|
||||
def test_set_del_udp_echo_source(self):
|
||||
""" set/del udp echo source """
|
||||
self.create_loopback_interfaces([0])
|
||||
self.create_loopback_interfaces(1)
|
||||
self.loopback0 = self.lo_interfaces[0]
|
||||
self.loopback0.admin_up()
|
||||
self.cli_verify_response("show bfd echo-source",
|
||||
|
||||
@@ -73,7 +73,7 @@ class ContainerIntegrationTestCase(VppTestCase):
|
||||
|
||||
def test_0050_loopback_prepare_test(self):
|
||||
""" Create loopbacks overlapping with remote addresses """
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
for i in range(2):
|
||||
intf = self.lo_interfaces[i]
|
||||
intf.admin_up()
|
||||
|
||||
+4
-8
@@ -1,18 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
import random
|
||||
import socket
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from vpp_sub_interface import VppSubInterface, VppDot1QSubint
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath, DpoProto, VppIpMRoute, \
|
||||
VppMRoutePath, MRouteEntryFlags, MRouteItfFlags
|
||||
from vpp_sub_interface import VppDot1QSubint
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath
|
||||
from vpp_papi_provider import L2_VTR_OP
|
||||
|
||||
from scapy.packet import Raw
|
||||
from scapy.layers.l2 import Ether, Dot1Q, ARP
|
||||
from scapy.layers.l2 import Ether, Dot1Q
|
||||
from scapy.layers.inet import IP, UDP
|
||||
from util import ppp
|
||||
from socket import AF_INET, inet_pton
|
||||
|
||||
|
||||
@@ -23,7 +19,7 @@ class TestDVR(VppTestCase):
|
||||
super(TestDVR, self).setUp()
|
||||
|
||||
self.create_pg_interfaces(range(4))
|
||||
self.create_loopback_interfaces(range(1))
|
||||
self.create_loopback_interfaces(1)
|
||||
|
||||
for i in self.pg_interfaces:
|
||||
i.admin_up()
|
||||
|
||||
+3
-5
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
import socket
|
||||
import struct
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from vpp_object import VppObject
|
||||
@@ -13,12 +11,12 @@ from scapy.packet import Raw
|
||||
from scapy.layers.l2 import Ether, ARP
|
||||
from scapy.layers.inet import IP, UDP
|
||||
from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6NDOptSrcLLAddr, \
|
||||
ICMPv6NDOptDstLLAddr, ICMPv6ND_NA
|
||||
ICMPv6ND_NA
|
||||
from scapy.utils6 import in6_getnsma, in6_getnsmac
|
||||
|
||||
from socket import AF_INET, AF_INET6
|
||||
from scapy.utils import inet_pton, inet_ntop
|
||||
from util import Host, mactobinary
|
||||
from util import mactobinary
|
||||
|
||||
|
||||
class VppGbpEndpoint(VppObject):
|
||||
@@ -300,7 +298,7 @@ class TestGBP(VppTestCase):
|
||||
super(TestGBP, self).setUp()
|
||||
|
||||
self.create_pg_interfaces(range(9))
|
||||
self.create_loopback_interfaces(range(9))
|
||||
self.create_loopback_interfaces(9)
|
||||
|
||||
self.router_mac = "00:11:22:33:44:55"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class TestLoopbackInterfaceCRUD(VppTestCase):
|
||||
|
||||
def test_crud(self):
|
||||
# create
|
||||
loopbacks = self.create_loopback_interfaces(range(20))
|
||||
loopbacks = self.create_loopback_interfaces(20)
|
||||
for i in loopbacks:
|
||||
i.local_ip4_prefix_len = 32
|
||||
i.config_ip4()
|
||||
@@ -121,7 +121,7 @@ class TestLoopbackInterfaceCRUD(VppTestCase):
|
||||
|
||||
def test_down(self):
|
||||
# create
|
||||
loopbacks = self.create_loopback_interfaces(range(20))
|
||||
loopbacks = self.create_loopback_interfaces(20)
|
||||
for i in loopbacks:
|
||||
i.local_ip4_prefix_len = 32
|
||||
i.config_ip4()
|
||||
|
||||
@@ -54,7 +54,7 @@ class TestIpIrb(VppTestCase):
|
||||
|
||||
# create 3 pg interfaces, 1 loopback interface
|
||||
cls.create_pg_interfaces(range(3))
|
||||
cls.create_loopback_interfaces(range(1))
|
||||
cls.create_loopback_interfaces(1)
|
||||
|
||||
cls.interfaces = list(cls.pg_interfaces)
|
||||
cls.interfaces.extend(cls.lo_interfaces)
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
import unittest
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from vpp_sub_interface import VppSubInterface, VppDot1QSubint, VppDot1ADSubint
|
||||
from vpp_ip_route import VppIpMRoute, VppMRoutePath, VppMFibSignal, \
|
||||
MRouteItfFlags, MRouteEntryFlags, VppIpTable, DpoProto
|
||||
|
||||
from scapy.packet import Raw
|
||||
from scapy.layers.l2 import Ether
|
||||
from scapy.layers.inet import IP, UDP, getmacbyip, ICMP
|
||||
from scapy.layers.inet import IP, UDP, getmacbyip
|
||||
from scapy.layers.inet6 import IPv6, getmacbyip6
|
||||
from util import ppp
|
||||
|
||||
#
|
||||
# The number of packets sent is set to 91 so that when we replicate more than 3
|
||||
|
||||
+2
-6
@@ -1,17 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
import socket
|
||||
import struct
|
||||
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from vpp_object import VppObject
|
||||
from vpp_papi_provider import QOS_SOURCE
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath, VppMplsRoute
|
||||
from vpp_sub_interface import VppSubInterface, VppDot1QSubint
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath
|
||||
|
||||
from scapy.packet import Raw
|
||||
from scapy.layers.l2 import Ether, Dot1Q
|
||||
from scapy.layers.l2 import Ether
|
||||
from scapy.layers.inet import IP, UDP
|
||||
from scapy.layers.inet6 import IPv6
|
||||
from scapy.contrib.mpls import MPLS
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class TestSCTP(VppTestCase):
|
||||
def setUp(self):
|
||||
super(TestSCTP, self).setUp()
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 0
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class TestSession(VppTestCase):
|
||||
super(TestSession, self).setUp()
|
||||
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 0
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class TestTCP(VppTestCase):
|
||||
def setUp(self):
|
||||
super(TestTCP, self).setUp()
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 0
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
from framework import VppTestCase, VppTestRunner
|
||||
from vpp_udp_encap import *
|
||||
from vpp_udp_encap import VppUdpEncap
|
||||
from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, VppMplsLabel
|
||||
|
||||
from scapy.packet import Raw
|
||||
from scapy.layers.l2 import Ether, ARP
|
||||
from scapy.layers.l2 import Ether
|
||||
from scapy.layers.inet import IP, UDP
|
||||
from scapy.layers.inet6 import IPv6
|
||||
from scapy.contrib.mpls import MPLS
|
||||
@@ -233,7 +233,7 @@ class TestUDP(VppTestCase):
|
||||
def setUp(self):
|
||||
super(TestUDP, self).setUp()
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 0
|
||||
|
||||
|
||||
+4
-4
@@ -68,12 +68,12 @@ class VCLTestCase(VppTestCase):
|
||||
worker_client.join(self.timeout)
|
||||
try:
|
||||
self.validateResults(worker_client, worker_server, self.timeout)
|
||||
except Exception, error:
|
||||
except Exception as error:
|
||||
self.fail("Failed with %s" % error)
|
||||
|
||||
def thru_host_stack_setup(self):
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 1
|
||||
|
||||
@@ -117,7 +117,7 @@ class VCLTestCase(VppTestCase):
|
||||
|
||||
def thru_host_stack_ipv6_setup(self):
|
||||
self.vapi.session_enable_disable(is_enabled=1)
|
||||
self.create_loopback_interfaces(range(2))
|
||||
self.create_loopback_interfaces(2)
|
||||
|
||||
table_id = 1
|
||||
|
||||
@@ -182,7 +182,7 @@ class VCLTestCase(VppTestCase):
|
||||
|
||||
try:
|
||||
self.validateResults(worker_client, worker_server, self.timeout)
|
||||
except Exception, error:
|
||||
except Exception as error:
|
||||
self.fail("Failed with %s" % error)
|
||||
|
||||
def validateResults(self, worker_client, worker_server, timeout):
|
||||
|
||||
@@ -9,7 +9,7 @@ class VppBondInterface(VppInterface):
|
||||
use_custom_mac=0, mac_address=''):
|
||||
|
||||
""" Create VPP Bond interface """
|
||||
self._test = test
|
||||
super(VppBondInterface, self).__init__(test)
|
||||
self.mode = mode
|
||||
self.lb = lb
|
||||
self.use_custom_mac = use_custom_mac
|
||||
@@ -20,8 +20,7 @@ class VppBondInterface(VppInterface):
|
||||
self.lb,
|
||||
self.use_custom_mac,
|
||||
self.mac_address)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
super(VppBondInterface, self).__init__(self._test)
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
self.test.vapi.bond_delete(self.sw_if_index)
|
||||
|
||||
@@ -11,7 +11,7 @@ class VppGreInterface(VppInterface):
|
||||
def __init__(self, test, src_ip, dst_ip, outer_fib_id=0, type=0,
|
||||
session=0):
|
||||
""" Create VPP GRE interface """
|
||||
self._test = test
|
||||
super(VppGreInterface, self).__init__(test)
|
||||
self.t_src = src_ip
|
||||
self.t_dst = dst_ip
|
||||
self.t_outer_fib = outer_fib_id
|
||||
@@ -25,10 +25,9 @@ class VppGreInterface(VppInterface):
|
||||
outer_fib_id=self.t_outer_fib,
|
||||
tunnel_type=self.t_type,
|
||||
session_id=self.t_session)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
self.generate_remote_hosts()
|
||||
self.test.registry.register(self, self.test.logger)
|
||||
super(VppGreInterface, self).__init__(self.test)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
s = socket.inet_pton(socket.AF_INET, self.t_src)
|
||||
@@ -55,7 +54,7 @@ class VppGre6Interface(VppInterface):
|
||||
def __init__(self, test, src_ip, dst_ip, outer_fib_id=0, type=0,
|
||||
session=0):
|
||||
""" Create VPP GRE interface """
|
||||
self._test = test
|
||||
super(VppGre6Interface, self).__init__(test)
|
||||
self.t_src = src_ip
|
||||
self.t_dst = dst_ip
|
||||
self.t_outer_fib = outer_fib_id
|
||||
@@ -70,10 +69,9 @@ class VppGre6Interface(VppInterface):
|
||||
tunnel_type=self.t_type,
|
||||
session_id=self.t_session,
|
||||
is_ip6=1)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
self.generate_remote_hosts()
|
||||
self.test.registry.register(self, self.test.logger)
|
||||
super(VppGre6Interface, self).__init__(self.test)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
s = socket.inet_pton(socket.AF_INET6, self.t_src)
|
||||
|
||||
@@ -5,16 +5,14 @@ from vpp_interface import VppInterface
|
||||
class VppLoInterface(VppInterface, VppObject):
|
||||
"""VPP loopback interface."""
|
||||
|
||||
def __init__(self, test, lo_index):
|
||||
def __init__(self, test):
|
||||
""" Create VPP loopback interface """
|
||||
self._test = test
|
||||
self.add_vpp_config()
|
||||
super(VppLoInterface, self).__init__(test)
|
||||
self._lo_index = lo_index
|
||||
self.add_vpp_config()
|
||||
|
||||
def add_vpp_config(self):
|
||||
r = self.test.vapi.create_loopback()
|
||||
self._sw_if_index = r.sw_if_index
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
self.test.vapi.delete_loopback(self.sw_if_index)
|
||||
|
||||
@@ -9,7 +9,7 @@ class VppMPLSTunnelInterface(VppInterface):
|
||||
|
||||
def __init__(self, test, paths, is_multicast=0, is_l2=0):
|
||||
""" Create MPLS Tunnel interface """
|
||||
self._test = test
|
||||
super(VppMPLSTunnelInterface, self).__init__(test)
|
||||
self.t_paths = paths
|
||||
self.is_multicast = is_multicast
|
||||
self.is_l2 = is_l2
|
||||
@@ -31,8 +31,7 @@ class VppMPLSTunnelInterface(VppInterface):
|
||||
is_multicast=self.is_multicast,
|
||||
l2_only=self.is_l2)
|
||||
sw_if_index = reply.sw_if_index
|
||||
self._sw_if_index = sw_if_index
|
||||
super(VppMPLSTunnelInterface, self).__init__(self.test)
|
||||
self.set_sw_if_index(sw_if_index)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
for path in self.t_paths:
|
||||
|
||||
@@ -12,7 +12,7 @@ class VppPppoeInterface(VppInterface):
|
||||
def __init__(self, test, client_ip, client_mac,
|
||||
session_id, decap_vrf_id=0):
|
||||
""" Create VPP PPPoE4 interface """
|
||||
self._test = test
|
||||
super(VppPppoeInterface, self).__init__(test)
|
||||
self.client_ip = client_ip
|
||||
self.client_mac = client_mac
|
||||
self.session_id = session_id
|
||||
@@ -25,15 +25,14 @@ class VppPppoeInterface(VppInterface):
|
||||
cip, cmac,
|
||||
session_id=self.session_id,
|
||||
decap_vrf_id=self.decap_vrf_id)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
super(VppPppoeInterface, self).__init__(self._test)
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
self.generate_remote_hosts()
|
||||
|
||||
def remove_vpp_config(self):
|
||||
cip = socket.inet_pton(socket.AF_INET, self.client_ip)
|
||||
cmac = mactobinary(self.client_mac)
|
||||
self.unconfig()
|
||||
r = self.test.vapi.pppoe_add_del_session(
|
||||
self.test.vapi.pppoe_add_del_session(
|
||||
cip, cmac,
|
||||
session_id=self.session_id,
|
||||
decap_vrf_id=self.decap_vrf_id,
|
||||
|
||||
+11
-14
@@ -35,10 +35,13 @@ class VppSubInterface(VppPGInterface):
|
||||
self._parent = parent
|
||||
self._parent.add_sub_if(self)
|
||||
self._sub_id = sub_id
|
||||
self.set_vtr(L2_VTR_OP.L2_DISABLED)
|
||||
self.DOT1AD_TYPE = 0x88A8
|
||||
self.DOT1Q_TYPE = 0x8100
|
||||
|
||||
def set_sw_if_index(self, sw_if_index):
|
||||
super(VppSubInterface, self).set_sw_if_index(sw_if_index)
|
||||
self.set_vtr(L2_VTR_OP.L2_DISABLED)
|
||||
|
||||
@abstractmethod
|
||||
def create_arp_req(self):
|
||||
pass
|
||||
@@ -47,18 +50,12 @@ class VppSubInterface(VppPGInterface):
|
||||
def create_ndp_req(self):
|
||||
pass
|
||||
|
||||
def resolve_arp(self):
|
||||
super(VppSubInterface, self).resolve_arp(self.parent)
|
||||
|
||||
def resolve_ndp(self):
|
||||
super(VppSubInterface, self).resolve_ndp(self.parent)
|
||||
|
||||
@abstractmethod
|
||||
def add_dot1_layer(self, pkt):
|
||||
pass
|
||||
|
||||
def remove_vpp_config(self):
|
||||
self.test.vapi.delete_subif(self._sw_if_index)
|
||||
self.test.vapi.delete_subif(self.sw_if_index)
|
||||
|
||||
def _add_tag(self, packet, vlan, tag_type):
|
||||
payload = packet.payload
|
||||
@@ -129,12 +126,12 @@ class VppDot1QSubint(VppSubInterface):
|
||||
return self._vlan
|
||||
|
||||
def __init__(self, test, parent, sub_id, vlan=None):
|
||||
super(VppDot1QSubint, self).__init__(test, parent, sub_id)
|
||||
if vlan is None:
|
||||
vlan = sub_id
|
||||
self._vlan = vlan
|
||||
r = test.vapi.create_vlan_subif(parent.sw_if_index, vlan)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
super(VppDot1QSubint, self).__init__(test, parent, sub_id)
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
|
||||
def create_arp_req(self):
|
||||
packet = VppPGInterface.create_arp_req(self)
|
||||
@@ -166,13 +163,13 @@ class VppDot1ADSubint(VppSubInterface):
|
||||
return self._inner_vlan
|
||||
|
||||
def __init__(self, test, parent, sub_id, outer_vlan, inner_vlan):
|
||||
super(VppDot1ADSubint, self).__init__(test, parent, sub_id)
|
||||
r = test.vapi.create_subif(parent.sw_if_index, sub_id, outer_vlan,
|
||||
inner_vlan, dot1ad=1, two_tags=1,
|
||||
exact_match=1)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
self._outer_vlan = outer_vlan
|
||||
self._inner_vlan = inner_vlan
|
||||
super(VppDot1ADSubint, self).__init__(test, parent, sub_id)
|
||||
|
||||
def create_arp_req(self):
|
||||
packet = VppPGInterface.create_arp_req(self)
|
||||
@@ -193,12 +190,12 @@ class VppDot1ADSubint(VppSubInterface):
|
||||
class VppP2PSubint(VppSubInterface):
|
||||
|
||||
def __init__(self, test, parent, sub_id, remote_mac):
|
||||
super(VppP2PSubint, self).__init__(test, parent, sub_id)
|
||||
r = test.vapi.create_p2pethernet_subif(parent.sw_if_index,
|
||||
remote_mac, sub_id)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
self.parent_sw_if_index = parent.sw_if_index
|
||||
self.p2p_remote_mac = remote_mac
|
||||
super(VppP2PSubint, self).__init__(test, parent, sub_id)
|
||||
|
||||
def add_dot1_layer(self, packet):
|
||||
return packet
|
||||
|
||||
@@ -9,7 +9,7 @@ class VppVhostInterface(VppInterface):
|
||||
tag=''):
|
||||
|
||||
""" Create VPP Vhost interface """
|
||||
self._test = test
|
||||
super(VppVhostInterface, self).__init__(test)
|
||||
self.is_server = is_server
|
||||
self.sock_filename = sock_filename
|
||||
self.renumber = renumber
|
||||
@@ -26,8 +26,7 @@ class VppVhostInterface(VppInterface):
|
||||
self.use_custom_mac,
|
||||
self.mac_address,
|
||||
self.tag)
|
||||
self._sw_if_index = r.sw_if_index
|
||||
super(VppVhostInterface, self).__init__(self._test)
|
||||
self.set_sw_if_index(r.sw_if_index)
|
||||
|
||||
def remove_vpp_config(self):
|
||||
self.test.vapi.delete_vhost_user_if(self.sw_if_index)
|
||||
|
||||
Reference in New Issue
Block a user