+function parse_env_variables () {
+
+ # Parse environment variables.
+ #
+ # Variables read, set or exported: Multiple,
+ # see the code for the current list.
+
+ set -exuo pipefail
+
+ IFS=@ read -a TG_NETMACS <<< "${CSIT_TG_INTERFACES_PORT_MAC}"
+ IFS=@ read -a TG_PCIDEVS <<< "${CSIT_TG_INTERFACES_PORT_PCI}"
+ IFS=@ read -a TG_DRIVERS <<< "${CSIT_TG_INTERFACES_PORT_DRV}"
+ IFS=@ read -a TG_VLANS <<< "${CSIT_TG_INTERFACES_PORT_VLAN}"
+ IFS=@ read -a TG_MODELS <<< "${CSIT_TG_INTERFACES_PORT_MODEL}"
+ IFS=@ read -a DUT1_NETMACS <<< "${CSIT_DUT1_INTERFACES_PORT_MAC}"
+ IFS=@ read -a DUT1_PCIDEVS <<< "${CSIT_DUT1_INTERFACES_PORT_PCI}"
+ IFS=@ read -a DUT1_DRIVERS <<< "${CSIT_DUT1_INTERFACES_PORT_DRV}"
+ IFS=@ read -a DUT1_VLANS <<< "${CSIT_DUT1_INTERFACES_PORT_VLAN}"
+ IFS=@ read -a DUT1_MODELS <<< "${CSIT_DUT1_INTERFACES_PORT_MODEL}"
+
+ for port in $(seq "${#TG_NETMACS[*]}"); do
+ CSIT_TG_INTERFACES+=$(cat << EOF
+ port$((port-1)):
+ mac_address: "${TG_NETMACS[$((port-1))]}"
+ pci_address: "${TG_PCIDEVS[$((port-1))]}"
+ link: "link$((port-1))"
+ model: ${TG_MODELS[$((port-1))]}
+ driver: "${TG_DRIVERS[$((port-1))]}"
+ vlan: ${TG_VLANS[$((port-1))]}
+EOF
+ )
+ CSIT_TG_INTERFACES+=$'\n'
+ done
+ for port in $(seq "${#DUT1_NETMACS[*]}"); do
+ CSIT_DUT1_INTERFACES+=$(cat << EOF
+ port$((port-1)):
+ mac_address: "${DUT1_NETMACS[$((port-1))]}"
+ pci_address: "${DUT1_PCIDEVS[$((port-1))]}"
+ link: "link$((port-1))"
+ model: ${DUT1_MODELS[$((port-1))]}
+ driver: "${DUT1_DRIVERS[$((port-1))]}"
+ vlan: ${DUT1_VLANS[$((port-1))]}
+EOF
+ )
+ CSIT_DUT1_INTERFACES+=$'\n'
+ done
+}
+
+