- "sh -c 'cat << EOF > /etc/trex_cfg.yaml\n"
- "- version: 2\n"
- " interfaces: [\"{0}\",\"{1}\"]\n"
- " port_info:\n"
- " - dest_mac: [{2}]\n"
- " src_mac: [{3}]\n"
- " - dest_mac: [{4}]\n"
- " src_mac: [{5}]\n"
- "EOF'"\
- .format(if1_pci, if2_pci,
- "0x"+if1_adj_addr.replace(":", ",0x"),
- "0x"+if1_addr.replace(":", ",0x"),
- "0x"+if2_adj_addr.replace(":", ",0x"),
- "0x"+if2_addr.replace(":", ",0x")),
- sudo=True, message='TRex config generation error')
- elif osi_layer == 'L7':
+ f"sh -c 'cat << EOF > /etc/trex_cfg.yaml\n"
+ f"- version: 2\n"
+ f" interfaces: [\"{if1_pci}\",\"{if2_pci}\"]\n"
+ f" port_info:\n"
+ f" - dest_mac: [{dst_mac0}]\n"
+ f" src_mac: [{src_mac0}]\n"
+ f" - dest_mac: [{dst_mac1}]\n"
+ f" src_mac: [{src_mac1}]\n"
+ f"EOF'",
+ sudo=True, message=u"TRex config generation error"
+ )
+ elif osi_layer == u"L7":