From 1e67ca426ab0f454fc2d4845efd5d9984782a4db Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Thu, 21 Jul 2016 13:22:05 -0500 Subject: modified to maximize use of resource available at time of deployment. Change-Id: Ia769b4c87bafa62e58aa006468fbb2294da16766 Signed-off-by: Narinder Gupta --- ci/genBundle.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ci/genBundle.py') 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): -- cgit 1.2.3-korg