From 232711c0ef98baf79bcf4c8bdbae4b84003c9ab9 Mon Sep 17 00:00:00 2001 From: Sarah Ulmer Date: Thu, 11 Aug 2016 09:21:21 -0500 Subject: Added smaller flavors for novaclient functional tests to use Priority is added to pick smaller flavors, m1.nano and m1.micro`, for novaclient functional tests. Functional tests rely on devstack, which should use smaller flavors when available. Closes-Bug: #1611985 Change-Id: Iac75141a3d65b26a3093188ead1b7ed7c65514ad --- novaclient/tests/functional/base.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/novaclient/tests/functional/base.py b/novaclient/tests/functional/base.py index eafa2bf6..5d3f95e0 100644 --- a/novaclient/tests/functional/base.py +++ b/novaclient/tests/functional/base.py @@ -51,12 +51,10 @@ def is_keystone_version_available(session, version): # image / flavor list so that they can be used in standard testing. def pick_flavor(flavors): """Given a flavor list pick a reasonable one.""" - for flavor in flavors: - if flavor.name == 'm1.tiny': - return flavor - for flavor in flavors: - if flavor.name == 'm1.small': - return flavor + for flavor_priority in ('m1.nano', 'm1.micro', 'm1.tiny', 'm1.small'): + for flavor in flavors: + if flavor.name == flavor_priority: + return flavor raise NoFlavorException() -- cgit v1.2.1