aboutsummaryrefslogtreecommitdiffstats
path: root/core/pod_controller.py
diff options
context:
space:
mode:
authorSridhar K. N. Rao <srao@linuxfoundation.org>2022-05-04 00:18:03 +0530
committerSridhar K. N. Rao <srao@linuxfoundation.org>2022-05-13 11:38:51 +0530
commit75ea2c825f858b22f79ad1535b733f4a72fd125a (patch)
tree32537f2ada24d1567761aba1b821dc14fb81cdbb /core/pod_controller.py
parent2fcc501a8cf9f5a7dbcedf48946e225dfc485ff8 (diff)
[Core] Minor Updates to the flow.
This patch adds minor updates to the flow. 1. Add license Information 2. Remove spaces. Signed-off-by: Sridhar K. N. Rao <srao@linuxfoundation.org> Change-Id: I805ee93afc5c7b1c7c157dad643b9ddac2d4d55d
Diffstat (limited to 'core/pod_controller.py')
-rw-r--r--core/pod_controller.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/pod_controller.py b/core/pod_controller.py
index e522b823..0e8e1b09 100644
--- a/core/pod_controller.py
+++ b/core/pod_controller.py
@@ -1,4 +1,4 @@
-# Copyright 2020 Spirent Communications
+# Copyright 2022 Spirent Communications, The Linux Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -44,12 +44,14 @@ class PodController():
self._pod_class = pod_class
self._deployment = deployment.lower()
self._pods = []
- if 'pcp' in self._deployment:
+ single_pods = ['pcp', 'c2c']
+ two_pods = ['pccp', 'c2c2c']
+ if any(item in self._deployment for item in single_pods):
pod_number = 1
- elif 'pccp'in self._deployment:
+ elif any(item in self._deployment for item in two_pods):
pod_number = 2
print("POD COUNTING DONE")
- settings.setValue('POD_COUNT', pod_number)
+ settings.setValue('POD_COUNT', pod_number)
# we will have single controller for all pods
if pod_number:
self._pods.append(pod_class())