aboutsummaryrefslogtreecommitdiffstats
path: root/func/create_zones.py
diff options
context:
space:
mode:
Diffstat (limited to 'func/create_zones.py')
-rw-r--r--func/create_zones.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/func/create_zones.py b/func/create_zones.py
index a21fb41f..44ba7568 100644
--- a/func/create_zones.py
+++ b/func/create_zones.py
@@ -107,6 +107,9 @@ class create_zones:
for x in range(len(zone_machine)):
compute_index = self.get_compute_num(D[x])
+ if compute_index > len(hyper_list):
+ print '\n The specified compute node doesnt exist. using compute 1'
+ compute_index = 1
if not self.check_aggregate(nova, hostnA[compute_index]):
agg_idA = nova.aggregates.create(hostnA[compute_index], D[x])
nova.aggregates.add_host(aggregate=agg_idA, host=hostnA[compute_index])