+ def add_dpdk_eth_bond_dev(self, ethbond_id, mode, xmit_policy, *slaves):
+ """Add DPDK Eth_bond device configuration.
+
+ :param ethbond_id: Eth_bond device ID.
+ :param mode: Link bonding mode.
+ :param xmit_policy: Transmission policy.
+ :param slaves: PCI device(s) to be bonded (format xxxx:xx:xx.x).
+ :type ethbond_id: str or int
+ :type mode: str or int
+ :type xmit_policy: str
+ :type slaves: list
+ """
+ slaves_config = ',slave=' + \
+ ',slave='.join(slave if pci_dev_check(slave) else ''
+ for slave in slaves)
+ ethbond_config = 'vdev eth_bond{id},mode={mode}{slaves},' \
+ 'xmit_policy={xmit_pol}'.format(id=ethbond_id,
+ mode=mode,
+ slaves=slaves_config,
+ xmit_pol=xmit_policy)
+ path = ['dpdk', ethbond_config]
+ self.add_config_item(self._nodeconfig, '', path)
+