resource: remove cores args 67/45267/6
authorRoss Brattain <ross.b.brattain@intel.com>
Mon, 16 Oct 2017 21:30:13 +0000 (14:30 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Fri, 27 Oct 2017 20:45:38 +0000 (13:45 -0700)
We used to try to probe all the cores that the VNF was using
and only dump CPU stats for those cores.

We can't really detect those core accurately and we would rather
dump all the core information and let influxdb and grafana filter
the information.

We do end up with excessive KPI output, especially on systems with 88
cores, but this is manageable.

The core logic was partially removed, this finishes the removal.

Change-Id: I5cbb694fd982519e2df54db49a21ed5948e13537
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
tests/unit/network_services/nfvi/test_resource.py
yardstick/network_services/nfvi/resource.py
yardstick/network_services/vnf_generic/vnf/sample_vnf.py

index f3244fd..2eef784 100644 (file)
@@ -99,7 +99,7 @@ class TestResourceProfile(unittest.TestCase):
             port_names = \
                 self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]['vdu'][0]['external-interface']
             self.resource_profile = \
-                ResourceProfile(mgmt, port_names, [1, 2, 3])
+                ResourceProfile(mgmt, port_names)
             self.resource_profile.connection = self.ssh_mock
 
     def test___init__(self):
index 5b96aaf..190e1f7 100644 (file)
@@ -55,8 +55,7 @@ class ResourceProfile(object):
     DEFAULT_TIMEOUT = 3600
     OVS_SOCKET_PATH = "/usr/local/var/run/openvswitch/db.sock"
 
-    def __init__(self, mgmt, port_names=None, cores=None, plugins=None,
-                 interval=None, timeout=None):
+    def __init__(self, mgmt, port_names=None, plugins=None, interval=None, timeout=None):
 
         if plugins is None:
             self.plugins = {}
@@ -91,7 +90,6 @@ class ResourceProfile(object):
         plugins = collectd_options.get("plugins", {})
         interval = collectd_options.get("interval")
 
-        # use default cores = None to MatchAllCores
         return cls(node, plugins=plugins, interval=interval, timeout=timeout)
 
     def check_if_sa_running(self, process):
index 08ec44f..f0c276a 100644 (file)
@@ -323,7 +323,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
         else:
             self.socket = 1
 
-        cores = self._validate_cpu_cfg()
         # implicit ordering, presumably by DPDK port num, so pre-sort by port_num
         # this won't work because we don't have DPDK port numbers yet
         ports = sorted(self.vnfd_helper.interfaces, key=self.vnfd_helper.port_num)
@@ -331,7 +330,7 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
         collectd_options = self.get_collectd_options()
         plugins = collectd_options.get("plugins", {})
         # we must set timeout to be the same as the VNF otherwise KPIs will die before VNF
-        return ResourceProfile(self.vnfd_helper.mgmt_interface, port_names=port_names, cores=cores,
+        return ResourceProfile(self.vnfd_helper.mgmt_interface, port_names=port_names,
                                plugins=plugins, interval=collectd_options.get("interval"),
                                timeout=self.scenario_helper.timeout)