summaryrefslogtreecommitdiffstats
path: root/test/vpp_sub_interface.py
diff options
context:
space:
mode:
authorMatej Klotton <mklotton@cisco.com>2016-11-23 15:27:17 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-24 09:32:57 +0000
commitc5bf07fabe46c175890bb5661a85ed076fbf7f2d (patch)
tree1397692701d694be941eecb61a69ea2ee5f1b408 /test/vpp_sub_interface.py
parent1cd8f3c98561771c23d04ac825c745b3b1b28735 (diff)
Remove postinit from make-test interfaces
Change-Id: I1eb0f735c5d025e6096d5760eb01419a1c58530a Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'test/vpp_sub_interface.py')
-rw-r--r--test/vpp_sub_interface.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/vpp_sub_interface.py b/test/vpp_sub_interface.py
index 027a24b2a1d..b4c415ca372 100644
--- a/test/vpp_sub_interface.py
+++ b/test/vpp_sub_interface.py
@@ -18,7 +18,7 @@ class VppSubInterface(VppPGInterface):
return self._sub_id
def __init__(self, test, parent, sub_id):
- self._test = test
+ VppInterface.__init__(self, test)
self._parent = parent
self._parent.add_sub_if(self)
self._sub_id = sub_id
@@ -55,11 +55,10 @@ class VppDot1QSubint(VppSubInterface):
def __init__(self, test, parent, sub_id, vlan=None):
if vlan is None:
vlan = sub_id
- super(VppDot1QSubint, self).__init__(test, parent, sub_id)
self._vlan = vlan
- r = self.test.vapi.create_vlan_subif(parent.sw_if_index, self.vlan)
+ r = test.vapi.create_vlan_subif(parent.sw_if_index, vlan)
self._sw_if_index = r.sw_if_index
- VppInterface.post_init_setup(self)
+ super(VppDot1QSubint, self).__init__(test, parent, sub_id)
def create_arp_req(self):
packet = VppPGInterface.create_arp_req(self)
@@ -98,21 +97,15 @@ class VppDot1ADSubint(VppSubInterface):
return self._inner_vlan
def __init__(self, test, parent, sub_id, outer_vlan, inner_vlan):
+ 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
super(VppDot1ADSubint, self).__init__(test, parent, sub_id)
self.DOT1AD_TYPE = 0x88A8
self.DOT1Q_TYPE = 0x8100
self._outer_vlan = outer_vlan
self._inner_vlan = inner_vlan
- r = self.test.vapi.create_subif(
- parent.sw_if_index,
- self.sub_id,
- self.outer_vlan,
- self.inner_vlan,
- dot1ad=1,
- two_tags=1,
- exact_match=1)
- self._sw_if_index = r.sw_if_index
- VppInterface.post_init_setup(self)
def create_arp_req(self):
packet = VppPGInterface.create_arp_req(self)