aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2017-10-17 14:17:49 +0200
committerPeter Mikus <pmikus@cisco.com>2017-10-18 13:40:49 +0000
commitdfaa7feaefa4745078c158b3eafd5642b7267533 (patch)
treea0bac022cddef966cdf7a0d9cb450dccf0d53916 /resources/libraries/python
parentebbefcdade022d325b60785d8619efe24a2f3d2e (diff)
CSIT-748 Add K8S 2memif-2vnf topologies
Change-Id: I23e118bf9fc9cfd638ac3ec0589f2ced14cc240c Signed-off-by: Peter Mikus <pmikus@cisco.com> (cherry picked from commit 59eb880b002cc73cc6e8834814c2da34b2ddfd54)
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/KubernetesUtils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/resources/libraries/python/KubernetesUtils.py b/resources/libraries/python/KubernetesUtils.py
index 69e7e832b4..bcbb7f5dff 100644
--- a/resources/libraries/python/KubernetesUtils.py
+++ b/resources/libraries/python/KubernetesUtils.py
@@ -322,12 +322,14 @@ class KubernetesUtils(object):
for _ in range(48):
(ret_code, stdout, _) = ssh.exec_command_sudo(cmd, timeout=120)
if int(ret_code) == 0:
- ready = True
+ ready = False
for line in stdout.splitlines():
try:
state = line.split()[1].split('/')
ready = True if 'Running' in line and\
state == state[::-1] else False
+ if not ready:
+ break
except ValueError, IndexError:
ready = False
if ready:
@@ -392,10 +394,11 @@ class KubernetesUtils(object):
:param kwargs: Key-value pairs used to create configuration.
:param kwargs: dict
"""
+ skip_cnt = kwargs['cpu_skip'] + (kwargs['i'] - 1) * kwargs['cpu_cnt']
cpuset_cpus = \
CpuUtils.cpu_slice_of_list_per_node(node=kwargs['node'],
cpu_node=kwargs['cpu_node'],
- skip_cnt=kwargs['cpu_skip'],
+ skip_cnt=skip_cnt,
cpu_cnt=kwargs['cpu_cnt'],
smt_used=kwargs['smt_used'])