NSB Prox minor refactor of BNG 27/44427/1
authorAbhijit Sinha <abhijit.sinha@intel.com>
Wed, 4 Oct 2017 15:02:16 +0000 (16:02 +0100)
committerRoss Brattain <ross.b.brattain@intel.com>
Fri, 6 Oct 2017 09:05:46 +0000 (02:05 -0700)
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 <abhijit.sinha@intel.com>
samples/vnf_samples/traffic_profiles/prox_binsearch.yaml
yardstick/network_services/vnf_generic/vnf/prox_helpers.py

index 80f4dd3..805250e 100644 (file)
@@ -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
index d9fe9a9..63c6467 100644 (file)
@@ -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)