From 372edf44efd7e028890e4623a950052a606bb123 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 29 Nov 2015 10:03:11 -0500 Subject: [PATCH] Enable running tests against RAX and IBM Rackspace requires performance flavors be used for boot from volume. IBM does not have Ubuntu or Cirros images in the cloud. Change-Id: I95c15d92072311eb4aa0a4b7f551a95c4dc6e082 --- shade/tests/functional/util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shade/tests/functional/util.py b/shade/tests/functional/util.py index 960bec613..07a9a5031 100644 --- a/shade/tests/functional/util.py +++ b/shade/tests/functional/util.py @@ -23,6 +23,13 @@ import operator def pick_flavor(flavors): """Given a flavor list pick the smallest one.""" + # Enable running functional tests against rax - which requires + # performance flavors be used for boot from volume + for flavor in sorted( + flavors, + key=operator.attrgetter('ram')): + if 'performance' in flavor.name: + return flavor for flavor in sorted( flavors, key=operator.attrgetter('ram')): @@ -36,3 +43,6 @@ def pick_image(images): for image in images: if image.name.lower().startswith('ubuntu'): return image + for image in images: + if image.name.lower().startswith('centos'): + return image