summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@gmail.com>2023-01-09 15:07:59 +0100
committerLuc Provoost <luc.provoost@gmail.com>2023-01-09 15:07:59 +0100
commit20150da55eed2634cda771d8e481b76590c90b75 (patch)
tree31f00ae49224d3e4942c2e6cadbf9527e3566945 /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
parentaacbf08a9f7d286e65f70d7beba3ec1108c0ddef (diff)
Optional MAC address and other changes
The MAC address of the dataplane interfaces in the environment file is now optional. If not specified, the HW MAC address of that interface will be used. When using l2 tests, the parameter will be needed anyway and the test will fail if the MAC address is not specified. Starting from DPDK 20.11, the EAL --pci-whitelist parameter changed into --allow. We are now checking the DPDK version of the PROX instance to determine which parameter to use. For pods using cgroup v2, we are now using a different file to determine the cpuset available to the pod. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I7a88458406b9ae3c8cae9c583cc37121d40c5073
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
index ee8fa67f..1a82671a 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
@@ -170,10 +170,13 @@ class RapidConfigParser(object):
while True:
dp_ip_key = 'dp_ip{}'.format(index)
dp_mac_key = 'dp_mac{}'.format(index)
- if dp_ip_key in machines[int(machine['dest_vm'])-1].keys() and \
- dp_mac_key in machines[int(machine['dest_vm'])-1].keys():
- dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key],
- 'mac' : machines[int(machine['dest_vm'])-1][dp_mac_key]}
+ if dp_ip_key in machines[int(machine['dest_vm'])-1].keys():
+ if dp_mac_key in machines[int(machine['dest_vm'])-1].keys():
+ dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key],
+ 'mac' : machines[int(machine['dest_vm'])-1][dp_mac_key]}
+ else:
+ dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key],
+ 'mac' : None}
dp_ports.append(dict(dp_port))
index += 1
else: