diff options
author | Jan Gelety <jgelety@cisco.com> | 2018-05-11 10:36:41 +0200 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2018-05-31 06:41:15 +0000 |
commit | b5782684055409315412d94d1de2e5f78cffac4d (patch) | |
tree | 9b7bd941d3cdb35ad2c0fd861cb156c767606443 /resources/libraries/python/InterfaceUtil.py | |
parent | 0eeaf6eeeac256a8dfba297c57247b261912d2ca (diff) |
DPDK link bonding: xor mode
CSIT-1073
CSIT-1074
CSIT-1077
Change-Id: I248e079021c30988210fd792b32d5afdca71aadb
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r-- | resources/libraries/python/InterfaceUtil.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index aac78c9e44..6c3aa46a40 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -909,6 +909,29 @@ class InterfaceUtil(object): .format(node['host'])) @staticmethod + def add_bond_eth_interface(node, ifc_name): + """Add BondEthernet interface to current topology. + + :param node: Node to add BondEthernet interface for. + :param ifc_name: Name of the BondEthernet interface. + :type node: dict + :type ifc_name: str + """ + if_key = Topology.add_new_port(node, 'eth_bond') + Topology.update_interface_name(node, if_key, ifc_name) + + vat_executor = VatExecutor() + vat_executor.execute_script_json_out("dump_interfaces.vat", node) + interface_dump_json = vat_executor.get_script_stdout() + + sw_if_idx = VatJsonUtil.get_interface_sw_index_from_json( + interface_dump_json, ifc_name) + Topology.update_interface_sw_if_index(node, if_key, sw_if_idx) + ifc_mac = VatJsonUtil.get_interface_mac_from_json( + interface_dump_json, sw_if_idx) + Topology.update_interface_mac_address(node, if_key, ifc_mac) + + @staticmethod def vpp_enable_input_acl_interface(node, interface, ip_version, table_index): """Enable input acl on interface. |