diff options
author | Sridhar Rao <sridhar.rao@spirent.com> | 2021-06-17 12:00:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2021-06-17 12:00:09 +0000 |
commit | 7e7df7806ac7fdd23f29f26217eb3385134cbf1e (patch) | |
tree | 3e93cc76d9af6c1e0f09ee42100b9aedf016183c /core/pod_controller.py | |
parent | b3d8f3e6b150a9c1a031e4f27f3d192119e26d85 (diff) | |
parent | 8137692dd94e112943dcc576470f4b361fbd8c5c (diff) |
Merge "WIP:Infrastructure for supporting more K8S Tests."
Diffstat (limited to 'core/pod_controller.py')
-rw-r--r-- | core/pod_controller.py | 13 |
1 files changed, 8 insertions, 5 deletions
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): |