+ # verify enough hugepages are free to run the testcase
+ if not self._check_for_enough_hugepages():
+ raise RuntimeError('Not enough hugepages free to run test.')
+
+ # perform guest related handling
+ if self._vnf_ctl.get_vnfs_number():
+ # copy sources of l2 forwarding tools into VM shared dir if needed
+ self._copy_fwd_tools_for_all_guests()
+
+ # in case of multi VM in parallel, set the number of streams to the number of VMs
+ if self.deployment.startswith('pvpv'):
+ # for each VM NIC pair we need an unique stream
+ streams = 0
+ for vm_nic in S.getValue('GUEST_NICS_NR')[:self._vnf_ctl.get_vnfs_number()]:
+ streams += int(vm_nic / 2) if vm_nic > 1 else 1
+ self._logger.debug("VMs with parallel connection were detected. "
+ "Thus Number of streams was set to %s", streams)
+ self._traffic.update({'multistream': streams})
+
+ # OVS Vanilla requires guest VM MAC address and IPs to work
+ if 'linux_bridge' in S.getValue('GUEST_LOOPBACK'):
+ self._traffic['l2'].update({'srcmac': S.getValue('VANILLA_TGEN_PORT1_MAC'),
+ 'dstmac': S.getValue('VANILLA_TGEN_PORT2_MAC')})
+ self._traffic['l3'].update({'srcip': S.getValue('VANILLA_TGEN_PORT1_IP'),
+ 'dstip': S.getValue('VANILLA_TGEN_PORT2_IP')})
+