- Execute the "sw_interface_set_l2_bridge sw_if_index {sw_if_index}
- bd_id {bd_id} shg {shg} enable" VAT command on the given node.
-
- :param node: Node where we want to execute the command that does this.
- :param sw_if_index: Interface index.
- :param bd_id: Bridge domain index number to add SW IF ID to.
- :param shg: Split horizon group.
- :type node: dict
- :type sw_if_index: int
- :type bd_id: int
- :type shg: int
- """
- VatExecutor.cmd_from_template(node, "l2_bd_add_sw_if_index.vat",
- bd_id=bd_id, sw_if_index=sw_if_index,
- shg=shg)
-
- @staticmethod
- @keyword('Create dict used in bridge domain template file for node '
- '"${node}" with links "${link_names}" and bd_id "${bd_id}"')
- def create_bridge_domain_vat_dict(node, link_names, bd_id):
- """Create dictionary that can be used in l2 bridge domain template.
-
- The resulting dictionary looks like this:
- 'interface1': interface name of first interface
- 'interface2': interface name of second interface
- 'bd_id': bridge domain index
-
- :param node: Node data dictionary.
- :param link_names: List of names of links the bridge domain should be
- connecting.
- :param bd_id: Bridge domain index number.
- :type node: dict
- :type link_names: list
- :returns: Dictionary used to generate l2 bridge domain VAT configuration
- from template file.
- :rtype: dict
- """
- bd_dict = Topology().get_interfaces_by_link_names(node, link_names)
- bd_dict['bd_id'] = bd_id
- return bd_dict