diff options
author | Jan <jgelety@cisco.com> | 2016-11-29 10:04:53 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-02 21:34:43 +0000 |
commit | 00dad123ab284ab0c9c4a8387c93ccbc056e6440 (patch) | |
tree | 7f57553fcf6ae31e40985044d0591396a115a4c1 /test/vpp_papi_provider.py | |
parent | 3b222a35e2f343ff70fb03db31dd866d548e32b3 (diff) |
test: l2bd instances multi-context test (CSIT-479)
- add/update/delete L2BD instances and verify results by API
command bridge_domain_dump and by traffic where applicable
Change-Id: Ic9d7f7b5f6f10e5df7053f27cbc87f653704dab1
Signed-off-by: Jan <jgelety@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index d29f90c1789..dc90289ecb2 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -264,6 +264,29 @@ class VppPapiProvider(object): return self.api(vpp_papi.sw_interface_set_l2_bridge, (sw_if_index, bd_id, shg, bvi, enable)) + def bridge_flags(self, bd_id, is_set, feature_bitmap): + """Enable/disable required feature of the bridge domain with defined ID. + + :param int bd_id: Bridge domain ID. + :param int is_set: Set to 1 to enable, set to 0 to disable the feature. + :param int feature_bitmap: Bitmap value of the feature to be set: + - learn (1 << 0), + - forward (1 << 1), + - flood (1 << 2), + - uu-flood (1 << 3) or + - arp-term (1 << 4). + """ + return self.api(vpp_papi.bridge_flags, (bd_id, is_set, feature_bitmap)) + + def bridge_domain_dump(self, bd_id=0): + """ + + :param int bd_id: Bridge domain ID. (Default value = 0 => dump of all + existing bridge domains returned) + :return: Dictionary of bridge domain(s) data. + """ + return self.api(vpp_papi.bridge_domain_dump, (bd_id, )) + def sw_interface_set_l2_xconnect(self, rx_sw_if_index, tx_sw_if_index, enable): """Create or delete unidirectional cross-connect from Tx interface to |