summaryrefslogtreecommitdiffstats
path: root/ci/genBundle.py
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-07-21 13:22:05 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-07-21 13:22:51 -0500
commit1e67ca426ab0f454fc2d4845efd5d9984782a4db (patch)
tree75971890123704b43d2cc18f945e4e630ef029df /ci/genBundle.py
parent037d0f5a87970e414b7678e0a71b12e383fe644f (diff)
modified to maximize use of resource available at time of
deployment. Change-Id: Ia769b4c87bafa62e58aa006468fbb2294da16766 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/genBundle.py')
-rw-r--r--ci/genBundle.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ci/genBundle.py b/ci/genBundle.py
index ffa1119d..8648ac3a 100644
--- a/ci/genBundle.py
+++ b/ci/genBundle.py
@@ -76,7 +76,10 @@ def unit_ceph_qty():
if config['os']['ha']['mode'] == 'ha':
return config['os']['ha']['cluster_size']
else:
- return 2
+ if config['opnfv']['units'] >= 3:
+ return config['os']['ha']['cluster_size']
+ else:
+ return 2
def to_select(qty=False):
@@ -85,10 +88,7 @@ def to_select(qty=False):
if not qty:
qty = config['os']['ha']['cluster_size'] if \
config['os']['ha']['mode'] == 'ha' else 1
- if config['os']['ha']['mode'] == 'ha':
- return random.sample(range(0, config['opnfv']['units']), qty)
- else:
- return random.sample(range(0, 2), qty)
+ return random.sample(range(0, config['opnfv']['units']), qty)
def get_password(key, length=16, special=False):