diff options
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py')
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py index 445aed4b..143323b8 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py @@ -63,12 +63,6 @@ class RapidConfigParser(object): test_params['user'] = config.get('ssh', 'user') if config.has_option('ssh', 'key'): test_params['key'] = config.get('ssh', 'key') - if test_params['user'] in ['rapid']: - if test_params['key'] != 'rapid_rsa_key': - RapidLog.debug(("Key file {} for user {} overruled by key file:" - " rapid_rsa_key").format(test_params['key'], - test_params['user'])) - test_params['key'] = 'rapid_rsa_key' else: test_params['key'] = None if config.has_option('ssh', 'password'): @@ -91,7 +85,7 @@ class RapidConfigParser(object): 'flowsize','warmupflowsize','warmuptime', 'steps']: test[option] = int(testconfig.get(section, option)) elif option in ['startspeed', 'step', 'drop_rate_threshold', - 'lat_avg_threshold','lat_perc_threshold', + 'generator_threshold','lat_avg_threshold','lat_perc_threshold', 'lat_max_threshold','accuracy','maxr','maxz', 'ramp_step','warmupspeed','mis_ordered_threshold']: test[option] = float(testconfig.get(section, option)) @@ -99,11 +93,12 @@ class RapidConfigParser(object): test[option] = testconfig.get(section, option) tests.append(dict(test)) for test in tests: - if test['test'] in ['flowsizetest','TST009test']: + if test['test'] in ['flowsizetest', 'TST009test', 'increment_till_fail']: if 'drop_rate_threshold' not in test.keys(): test['drop_rate_threshold'] = 0 - latency_thresholds = ['lat_avg_threshold','lat_perc_threshold','lat_max_threshold','mis_ordered_threshold'] - for threshold in latency_thresholds: + thresholds = ['generator_threshold','lat_avg_threshold', \ + 'lat_perc_threshold','lat_max_threshold','mis_ordered_threshold'] + for threshold in thresholds: if threshold not in test.keys(): test[threshold] = inf test_params['tests'] = tests @@ -142,7 +137,8 @@ class RapidConfigParser(object): for option in options: if option in ['prox_socket','prox_launch_exit','monitor']: machine[option] = testconfig.getboolean(section, option) - elif option in ['mcore', 'cores', 'gencores','latcores']: + elif option in ['mcore', 'cores', 'gencores', 'latcores', + 'altcores']: machine[option] = ast.literal_eval(testconfig.get( section, option)) elif option in ['bucket_size_exp']: @@ -169,10 +165,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: |