diff options
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r-- | testcases/functest_utils.py | 6 |
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) |