From: Abhijit Sinha Date: Wed, 4 Oct 2017 15:02:16 +0000 (+0100) Subject: NSB Prox minor refactor of BNG X-Git-Tag: opnfv-6.0.0~380^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F44231%2F1;p=yardstick.git NSB Prox minor refactor of BNG JIRA: YARDSTICK-802 - Updated the BNG code with minor refactor. - Corrected the CPE core name - Update binsearch traffic profile with 64B Change-Id: Iae0be766edb986520045655fa567651711813a8b Signed-off-by: Abhijit Sinha --- diff --git a/samples/vnf_samples/traffic_profiles/prox_binsearch.yaml b/samples/vnf_samples/traffic_profiles/prox_binsearch.yaml index 80f4dd335..805250ee3 100644 --- a/samples/vnf_samples/traffic_profiles/prox_binsearch.yaml +++ b/samples/vnf_samples/traffic_profiles/prox_binsearch.yaml @@ -22,7 +22,7 @@ traffic_profile: tolerated_loss: 0.001 test_precision: 0.1 # packet_sizes: [64, 128, 256, 512, 1024, 1280, 1518] - packet_sizes: [64, 65] + packet_sizes: [64] duration: 10 lower_bound: 0.0 upper_bound: 100.0 diff --git a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py index d9fe9a948..63c6467f4 100644 --- a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py +++ b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py @@ -1267,23 +1267,26 @@ class ProxBngProfileHelper(ProxProfileHelper): continue for item_key, item_value in section: - if item_key == "name" and item_value.startswith("cpe"): + if item_key != 'name': + continue + + if item_value.startswith("cpe"): core_tuple = CoreSocketTuple(section_name) - core_tag = core_tuple.find_in_topology(self.cpu_topology) - cpe_cores.append(core_tag) + cpe_core = core_tuple.find_in_topology(self.cpu_topology) + cpe_cores.append(cpe_core) - elif item_key == "name" and item_value.startswith("inet"): + elif item_value.startswith("inet"): core_tuple = CoreSocketTuple(section_name) inet_core = core_tuple.find_in_topology(self.cpu_topology) inet_cores.append(inet_core) - elif item_key == "name" and item_value.startswith("arp"): + elif item_value.startswith("arp"): core_tuple = CoreSocketTuple(section_name) arp_core = core_tuple.find_in_topology(self.cpu_topology) arp_cores.append(arp_core) # We check the tasks/core separately - if item_key == "name" and item_value.startswith("arp_task"): + if item_value.startswith("arp_task"): core_tuple = CoreSocketTuple(section_name) arp_task_core = core_tuple.find_in_topology(self.cpu_topology) arp_tasks_core.append(arp_task_core)