blob: 7039f29ca8d46e5e6525f85280cd6a30576c9e54 [file] [log] [blame]
Neale Ranns192b13f2019-03-15 02:16:20 -07001from vpp_object import VppObject
2from vpp_interface import VppInterface
3
4
5class VppBviInterface(VppInterface, VppObject):
6 """VPP bvi interface."""
7
8 def __init__(self, test):
9 """ Create VPP BVI interface """
10 super(VppBviInterface, self).__init__(test)
11 self.add_vpp_config()
12
13 def add_vpp_config(self):
14 r = self.test.vapi.bvi_create(user_instance=0xffffffff,
15 mac="00:00:00:00:00:00")
16 self.set_sw_if_index(r.sw_if_index)
17
18 def remove_vpp_config(self):
19 self.test.vapi.bvi_delete(sw_if_index=self.sw_if_index)
20
21 def object_id(self):
22 return "bvi-%d" % self._sw_if_index