Commit ab009fab authored by Robert Schmidt's avatar Robert Schmidt

Refactor Iperf_module()

- Harmonize code for CNs
- Support TCP
- Different port numbers for multiple UEs
- Calculate UDP throughput for multiple UEs
parent 9a727b74
This diff is collapsed.
...@@ -274,31 +274,15 @@ def GetParametersFromXML(action): ...@@ -274,31 +274,15 @@ def GetParametersFromXML(action):
elif action == 'Iperf': elif action == 'Iperf':
CiTestObj.iperf_args = test.findtext('iperf_args') CiTestObj.iperf_args = test.findtext('iperf_args')
ue_id = test.findtext('id') CiTestObj.ue_ids = test.findtext('id').split(' ')
if (ue_id is None): CiTestObj.iperf_direction = test.findtext('direction')
CiTestObj.ue_id = ""
else:
CiTestObj.ue_id = ue_id
CiTestObj.iperf_direction = test.findtext('direction')#used for modules only
CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold') CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
iperf_bitrate_threshold = test.findtext('iperf_bitrate_threshold') CiTestObj.iperf_bitrate_threshold = test.findtext('iperf_bitrate_threshold') or '90'
if (iperf_bitrate_threshold is None): CiTestObj.iperf_profile = test.findtext('iperf_profile') or 'balanced'
CiTestObj.iperf_bitrate_threshold = "90" #if no threshold is specified, default will be 90%
else:
CiTestObj.iperf_bitrate_threshold = iperf_bitrate_threshold
CiTestObj.iperf_profile = test.findtext('iperf_profile')
if (CiTestObj.iperf_profile is None):
CiTestObj.iperf_profile = 'balanced'
else:
if CiTestObj.iperf_profile != 'balanced' and CiTestObj.iperf_profile != 'unbalanced' and CiTestObj.iperf_profile != 'single-ue': if CiTestObj.iperf_profile != 'balanced' and CiTestObj.iperf_profile != 'unbalanced' and CiTestObj.iperf_profile != 'single-ue':
logging.error('test-case has wrong profile ' + CiTestObj.iperf_profile) logging.error(f'test-case has wrong profile {CiTestObj.iperf_profile}, forcing balanced')
CiTestObj.iperf_profile = 'balanced' CiTestObj.iperf_profile = 'balanced'
CiTestObj.iperf_options = test.findtext('iperf_options') CiTestObj.iperf_options = test.findtext('iperf_options') or 'check'
if (CiTestObj.iperf_options is None):
CiTestObj.iperf_options = 'check'
else:
if CiTestObj.iperf_options != 'check' and CiTestObj.iperf_options != 'sink': if CiTestObj.iperf_options != 'check' and CiTestObj.iperf_options != 'sink':
logging.error('test-case has wrong option ' + CiTestObj.iperf_options) logging.error('test-case has wrong option ' + CiTestObj.iperf_options)
CiTestObj.iperf_options = 'check' CiTestObj.iperf_options = 'check'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment