path: root/install-files
diff options
authorFrancisco Redondo Marchena <>2015-06-17 11:09:29 +0000
committerFrancisco Redondo Marchena <>2015-06-18 15:28:02 +0000
commitcd9e3ba567a704af2585ad5b46d5b1eb9609fdd4 (patch)
tree980f549f5bd0cd87674bc2ded3ed3082c3d251d6 /install-files
parente3ba68f6e5c5080a23e9421e6bc72ef7ba868257 (diff)
Tempest: Create custom flavor for running tempest test in VM
tempest requires to have an alternative flavor and the m1.small flavor by default is very big in terms of RAM and disk for a test VM. Adding the possibility to set a smaller custom flavor gives the possibility to run tempests test for onenode in a VM without having memory or disk allocation problems with libvirt. Change-Id: I14bfb5b8c1cca820e00877649f664fb921f2ec1f
Diffstat (limited to 'install-files')
1 files changed, 13 insertions, 0 deletions
diff --git a/install-files/openstack/etc/tempest/ b/install-files/openstack/etc/tempest/
index 5a74dfcf..30539488 100755
--- a/install-files/openstack/etc/tempest/
+++ b/install-files/openstack/etc/tempest/
@@ -95,6 +95,19 @@ create_image_for_user(){
+ # Set the credential for admin
+ source "${admin_username}_env"
+ # In order to run tests in VMs we need a alternative flavor
+ # smaller than the small and bigger than the tiny flavor.
+ # So we create a flavor with the following features:
+ # name=m1.tempest_tests ID=6 Memory_MB=1024 Disk=1 Ephemeral=0 VCPUS=1
+ echo "Creating custom small flavor for tempest tests and set it as alt_flavor in tempest.conf"
+ nova flavor-create m1.tempest_tests 6 1024 1 1
+ sed -r -i "s/[#]?flavor_ref_alt =.*/flavor_ref_alt = 6/" tempest.conf
# Configure Openstack for running tempest tests.
create_image_for_user "$admin_username" "$admin_test_image"