aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-25 10:01:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-25 10:01:34 +0000
commit71e688eee322a1d6a697d4328783eff5254918d0 (patch)
tree4572c8e471a4175b422723d49fde9e0ea373eaf7 /testcases/functest_utils.py
parente21c11998ea4b412863e09021e3266a98cc55b08 (diff)
parent76b49b8c1eefcebe69d798157cb7742152a57155 (diff)
Merge "Add support for Promise test cases"
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r--testcases/functest_utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py
index 86b474070..ed9e36c89 100644
--- a/testcases/functest_utils.py
+++ b/testcases/functest_utils.py
@@ -88,6 +88,12 @@ def get_instance_by_name(nova_client, instance_name):
except:
return None
+def create_flavor(nova_client, flavor_name, ram, disk, vcpus):
+ try:
+ flavor = nova_client.flavors.create(flavor_name,ram,vcpus,disk)
+ except:
+ return None
+ return flavor.id
def get_flavor_id(nova_client, flavor_name):
flavors = nova_client.flavors.list(detailed=True)