X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_l2bd.py;h=5eca48c6e9b9c3103ad51684b19be1e6376c96b8;hb=b4e5e50fe;hp=db831f35405825c015a4632397b75458cd195772;hpb=eaea421e1fefedc47325f970475c5d48c899433c;p=vpp.git diff --git a/test/test_l2bd.py b/test/test_l2bd.py index db831f35405..5eca48c6e9b 100644 --- a/test/test_l2bd.py +++ b/test/test_l2bd.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import unittest import random @@ -75,7 +75,7 @@ class TestL2bd(VppTestCase): for pg_if in cls.pg_interfaces: sw_if_index = pg_if.sub_if.sw_if_index \ if hasattr(pg_if, 'sub_if') else pg_if.sw_if_index - cls.vapi.sw_interface_set_l2_bridge(sw_if_index, + cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=sw_if_index, bd_id=cls.bd_id) # setup all interfaces @@ -94,6 +94,10 @@ class TestL2bd(VppTestCase): super(TestL2bd, cls).tearDownClass() raise + @classmethod + def tearDownClass(cls): + super(TestL2bd, cls).tearDownClass() + def setUp(self): """ Clear trace and packet infos before running each test. @@ -122,7 +126,7 @@ class TestL2bd(VppTestCase): :param count: Integer number of hosts to create MAC/IPv4 addresses for. """ n_int = len(cls.pg_interfaces) - macs_per_if = count / n_int + macs_per_if = count // n_int i = -1 for pg_if in cls.pg_interfaces: i += 1 @@ -252,7 +256,7 @@ class TestL2bd(VppTestCase): Test scenario: 1.config MAC learning enabled - learn 100 MAC enries + learn 100 MAC entries 3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of dot1ad in the first version) @@ -269,7 +273,7 @@ class TestL2bd(VppTestCase): Test scenario: 1.config MAC learning enabled - learn 100 MAC enries + learn 100 MAC entries 3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of dot1ad in the first version)