diff options
author | juraj.linkes <juraj.linkes@pantheon.tech> | 2019-07-10 11:32:47 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-07-17 07:47:32 +0000 |
commit | 248d1a52e06622dc9eb1dfdd6ca9f6670b4c0bc3 (patch) | |
tree | 75693f1fe6a233a542d78ba64e80c4c5621ed3ac /resources/libraries/python/CpuUtils.py | |
parent | 5287b5307b3e39c4e13545b0c6ea651ac4014a84 (diff) |
Refactor VPP Device VM vhost tests
* replace the current VM image with kernel img
* rework keyword usage to make it consistent with performance tests
* remove resources/libraries/robot/shared/qemu.robot as it's not used
anywhere anymore
Change-Id: Ia5bc19e9e6ed9af031e4d9b5c0c89431fb49fd33
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries/python/CpuUtils.py')
-rw-r--r-- | resources/libraries/python/CpuUtils.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/resources/libraries/python/CpuUtils.py b/resources/libraries/python/CpuUtils.py index 67bf312f5d..07c5032aa8 100644 --- a/resources/libraries/python/CpuUtils.py +++ b/resources/libraries/python/CpuUtils.py @@ -62,15 +62,20 @@ class CpuUtils(object): return bool(count == cpu_mems_len) @staticmethod - def get_cpu_layout_from_all_nodes(nodes): - """Retrieve cpu layout from all nodes, assuming all nodes - are Linux nodes. + def get_cpu_info_from_all_nodes(nodes): + """Assuming all nodes are Linux nodes, retrieve the following + cpu information from all nodes: + - cpu architecture + - cpu layout :param nodes: DICT__nodes from Topology.DICT__nodes. :type nodes: dict - :raises RuntimeError: If the ssh command "lscpu -p" fails. + :raises RuntimeError: If an ssh command retrieving cpu information + fails. """ for node in nodes.values(): + stdout, _ = exec_cmd_no_error(node, 'uname -m') + node['arch'] = stdout.strip() stdout, _ = exec_cmd_no_error(node, 'lscpu -p') node['cpuinfo'] = list() for line in stdout.split("\n"): |