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
committerjose.lausuch <jose.lausuch@ericsson.com>2016-01-22 11:25:12 +0100
commit76b49b8c1eefcebe69d798157cb7742152a57155 (patch)
tree44f2827b10e9fb1dba28e20a330d58635f5060f2 /testcases/functest_utils.py
parent2520c3221bdbb5ca75ad0c2d70f30388528d01de (diff)
Add support for Promise test cases
JIRA: FUNCTEST-68 Change-Id: I80f8e587e53c7242f8bfa666f2ac450e73c8294f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
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 e76ef991b..9c618f75a 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)