summaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-21 13:58:48 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-01-25 10:01:44 +0000
commit621e47bb25db52e0b8cebb4f2bbee3911c6992d3 (patch)
tree4572c8e471a4175b422723d49fde9e0ea373eaf7 /testcases/functest_utils.py
parent3e3d42ea84e057234021d02e0987bc6278a00cc5 (diff)
Add support for Promise test cases
JIRA: FUNCTEST-68 Change-Id: I80f8e587e53c7242f8bfa666f2ac450e73c8294f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 76b49b8c1eefcebe69d798157cb7742152a57155)
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)