From 8137692dd94e112943dcc576470f4b361fbd8c5c Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Wed, 2 Jun 2021 19:11:18 +0530 Subject: WIP:Infrastructure for supporting more K8S Tests. This patch add multiple changes to ViNePerf to support following tests. 1. External virtual switch - not managed by Vineperf. 2. CNI not based on virtual switch 3. Fixed bugs after successful testing. 4. Pylint issues fixed 4. Fix some license-content and comments Signed-off-by: Sridhar K. N. Rao Change-Id: Ie01735f99c0687cc812eae8e67ee2353347924f2 --- core/pod_controller.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/pod_controller.py b/core/pod_controller.py index 8bc91ec4..109daa43 100644 --- a/core/pod_controller.py +++ b/core/pod_controller.py @@ -16,7 +16,7 @@ import logging import pexpect -#from conf import settings +from conf import settings from pods.pod.pod import IPod class PodController(): @@ -44,12 +44,15 @@ class PodController(): self._pod_class = pod_class self._deployment = deployment.lower() self._pods = [] - if self._deployment == 'p2p': + if 'pcp' in self._deployment or 'p2p' in self._deployment: pod_number = 1 - + elif 'pccp'in self._deployment: + pod_number = 2 + print("POD COUNTING DONE") + settings.setValue('POD_COUNT', pod_number) + # we will have single controller for all pods if pod_number: - self._pods = [pod_class() for _ in range(pod_number)] - + self._pods.append(pod_class()) self._logger.debug('Initializing the pod') def get_pods(self): -- cgit 1.2.3-korg