summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@gmail.com>2023-01-30 11:48:00 +0100
committerLuc Provoost <luc.provoost@gmail.com>2023-01-30 11:48:00 +0100
commit942d5e737729a030bd8f436c1c41a71911e6dd45 (patch)
tree2e538a8052666d1124e2a236b4e3ac3c7182cdfa /VNFs
parent77efe56b635f105502270010e365ddadef6ddbe1 (diff)
Create a unique machine name
Using containers, we need a unique --file-prefix parameter in the EAL DPDK configuration. The file-prefix name is the name of the PROX machine. This is defined by the name parameter in the rapid.env file. When the name parameter is not specified in the rapid.env file, the name will be defined in the test file. The machine name will still be defined in the same way, but when a name is not unique, an number will be appended to the name to make it unique. Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: I0b4e3be60f8ddef6c7eb30bca25c041ea270e238
Diffstat (limited to 'VNFs')
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
index 7a1c8eb5..f5b722c8 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
@@ -64,7 +64,16 @@ class RapidTestManager(object):
background_machines = []
sut_machine = gen_machine = None
configonly = test_params['configonly']
+ machine_names = []
+ machine_counter = {}
for machine_params in test_params['machines']:
+ if machine_params['name'] not in machine_names:
+ machine_names.append(machine_params['name'])
+ machine_counter[machine_params['name']] = 1
+ else:
+ machine_counter[machine_params['name']] += 1
+ machine_params['name'] = '{}_{}'.format(machine_params['name'],
+ machine_counter[machine_params['name']])
if 'gencores' in machine_params.keys():
machine = RapidGeneratorMachine(test_params['key'],
test_params['user'], test_params['password'],