Merge "Fix "trove_volume_size" test prop type"

This commit is contained in:
Jenkins 2016-04-22 23:29:23 +00:00 committed by Gerrit Code Review
commit d1624aa6e6
13 changed files with 96 additions and 74 deletions

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.large",
"instance_bigger_flavor_name": "test.large.resize",
"instance_eph_flavor_name": "test.eph.large",
"instance_bigger_eph_flavor_name": "test.eph.large.resize",
"instance_flavor_name": "test.large-5",
"instance_bigger_flavor_name": "test.large-5.resize",
"instance_eph_flavor_name": "test.eph.large-5",
"instance_bigger_eph_flavor_name": "test.eph.large-5.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.large",
"instance_bigger_flavor_name": "test.large.resize",
"instance_eph_flavor_name": "test.eph.large",
"instance_bigger_eph_flavor_name": "test.eph.large.resize",
"instance_flavor_name": "test.large-5",
"instance_bigger_flavor_name": "test.large-5.resize",
"instance_eph_flavor_name": "test.eph.large-5",
"instance_bigger_eph_flavor_name": "test.eph.large-5.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.tiny",
"instance_bigger_flavor_name": "test.tiny.resize",
"instance_eph_flavor_name": "test.eph.tiny",
"instance_bigger_eph_flavor_name": "test.eph.tiny.resize",
"instance_flavor_name": "test.tiny-3",
"instance_bigger_flavor_name": "test.tiny-3.resize",
"instance_eph_flavor_name": "test.eph.tiny-3",
"instance_bigger_eph_flavor_name": "test.eph.tiny-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.small",
"instance_bigger_flavor_name": "test.small.resize",
"instance_eph_flavor_name": "test.eph.small",
"instance_bigger_eph_flavor_name": "test.eph.small.resize",
"instance_flavor_name": "test.small-5",
"instance_bigger_flavor_name": "test.small-5.resize",
"instance_eph_flavor_name": "test.eph.small-5",
"instance_bigger_eph_flavor_name": "test.eph.small-5.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.small",
"instance_bigger_flavor_name": "test.small.resize",
"instance_eph_flavor_name": "test.eph.small",
"instance_bigger_eph_flavor_name": "test.eph.small.resize",
"instance_flavor_name": "test.small-3",
"instance_bigger_flavor_name": "test.small-3.resize",
"instance_eph_flavor_name": "test.eph.small-3",
"instance_bigger_eph_flavor_name": "test.eph.small-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.large",
"instance_bigger_flavor_name": "test.large.resize",
"instance_eph_flavor_name": "test.eph.large",
"instance_bigger_eph_flavor_name": "test.eph.large.resize",
"instance_flavor_name": "test.large-5",
"instance_bigger_flavor_name": "test.large-5.resize",
"instance_eph_flavor_name": "test.eph.large-5",
"instance_bigger_eph_flavor_name": "test.eph.large-5.resize",
"trove_volume_support": true,
"trove_volume_size": "5",
"trove_volume_size": 5,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.small",
"instance_bigger_flavor_name": "test.small.resize",
"instance_eph_flavor_name": "test.eph.small",
"instance_bigger_eph_flavor_name": "test.eph.small.resize",
"instance_flavor_name": "test.small-3",
"instance_bigger_flavor_name": "test.small-3.resize",
"instance_eph_flavor_name": "test.eph.small-3",
"instance_bigger_eph_flavor_name": "test.eph.small-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.small",
"instance_bigger_flavor_name": "test.small.resize",
"instance_eph_flavor_name": "test.eph.small",
"instance_bigger_eph_flavor_name": "test.eph.small.resize",
"instance_flavor_name": "test.small-3",
"instance_bigger_flavor_name": "test.small-3.resize",
"instance_eph_flavor_name": "test.eph.small-3",
"instance_bigger_eph_flavor_name": "test.eph.small-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.medium",
"instance_bigger_flavor_name": "test.medium.resize",
"instance_eph_flavor_name": "test.eph.medium",
"instance_bigger_eph_flavor_name": "test.eph.medium.resize",
"instance_flavor_name": "test.medium-4",
"instance_bigger_flavor_name": "test.medium-4.resize",
"instance_eph_flavor_name": "test.eph.medium-4",
"instance_bigger_eph_flavor_name": "test.eph.medium-4.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.small",
"instance_bigger_flavor_name": "test.small.resize",
"instance_eph_flavor_name": "test.eph.small",
"instance_bigger_eph_flavor_name": "test.eph.small.resize",
"instance_flavor_name": "test.small-3",
"instance_bigger_flavor_name": "test.small-3.resize",
"instance_eph_flavor_name": "test.eph.small-3",
"instance_bigger_eph_flavor_name": "test.eph.small-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.tiny",
"instance_bigger_flavor_name": "test.tiny.resize",
"instance_eph_flavor_name": "test.eph.tiny",
"instance_bigger_eph_flavor_name": "test.eph.tiny.resize",
"instance_flavor_name": "test.tiny-3",
"instance_bigger_flavor_name": "test.tiny-3.resize",
"instance_eph_flavor_name": "test.eph.tiny-3",
"instance_bigger_eph_flavor_name": "test.eph.tiny-3.resize",
"trove_volume_support": true,
"trove_volume_size": 1,

View File

@ -1,6 +1,6 @@
"instance_flavor_name": "test.large",
"instance_bigger_flavor_name": "test.large.resize",
"instance_eph_flavor_name": "test.eph.large",
"instance_bigger_eph_flavor_name": "test.eph.large.resize",
"instance_flavor_name": "test.large-10",
"instance_bigger_flavor_name": "test.large-10.resize",
"instance_eph_flavor_name": "test.eph.large-10",
"instance_bigger_eph_flavor_name": "test.eph.large-10.resize",
"trove_volume_support": true,
"trove_volume_size": 5,

View File

@ -201,26 +201,43 @@ function add_flavor() {
FLAVOR_MEMORY_MB=$3
FLAVOR_ROOT_GB=$4
FLAVOR_VCPUS=$5
FLAVOR_EPHEMERAL=$6
credentials="--os-username=admin --os-password=$ADMIN_PASSWORD --os-tenant-name=admin --os-auth-url=$TROVE_AUTH_ENDPOINT"
resize_name=${FLAVOR_NAME}.resize
for name in ${FLAVOR_NAME} ${resize_name}; do
id=${FLAVOR_ID}
memory=${FLAVOR_MEMORY_MB}
vcpus=${FLAVOR_VCPUS}
if [[ $name == ${resize_name} ]]; then
id=${FLAVOR_ID}r
if [[ $BRANCH_OVERRIDE == "stable/juno" || $BRANCH_OVERRIDE == "stable/kilo" ]]; then
id=1${FLAVOR_ID}
base_id=${FLAVOR_ID}
base_name_prefix=test
ephemeral_name_prefix=${base_name_prefix}.eph
for name_prefix in $base_name_prefix $ephemeral_name_prefix; do
reg_name=${name_prefix}.${FLAVOR_NAME}-${FLAVOR_ROOT_GB}
resize_name=${reg_name}.resize
ephemeral=0
if [[ $name_prefix == $ephemeral_name_prefix ]]; then
ephemeral=1
fi
for name in ${reg_name} ${resize_name}; do
id=$base_id
memory=${FLAVOR_MEMORY_MB}
vcpus=${FLAVOR_VCPUS}
if [[ $ephemeral != 0 ]]; then
if [[ $BRANCH_OVERRIDE == "stable/juno" || $BRANCH_OVERRIDE == "stable/kilo" ]]; then
id=1${id}
else
id=${id}e
fi
fi
memory=$((${FLAVOR_MEMORY_MB} + 16))
vcpus=$((${FLAVOR_VCPUS} + 1))
fi
if [[ -z $(nova $credentials flavor-list | grep "| $name[ ]* |") ]]; then
nova $credentials flavor-create $name $id $memory $FLAVOR_ROOT_GB $vcpus --ephemeral $FLAVOR_EPHEMERAL
fi
if [[ $name == ${resize_name} ]]; then
if [[ $BRANCH_OVERRIDE == "stable/juno" || $BRANCH_OVERRIDE == "stable/kilo" ]]; then
id=2${id}
else
id=${id}r
fi
memory=$((${FLAVOR_MEMORY_MB} + 16))
vcpus=$((${FLAVOR_VCPUS} + 1))
fi
if [[ -z $(nova $credentials flavor-list | grep "| $name[ ]* |") ]]; then
nova $credentials flavor-create $name $id $memory $FLAVOR_ROOT_GB $vcpus --ephemeral $ephemeral
fi
done
done
}
@ -728,16 +745,21 @@ function setup_cluster_configs() {
# Add useful flavors for testing (with corresponding *.resize flavors)
function add_test_flavors() {
# name id ram root_vol vcpu eph_vol
# name id ram root_vol vcpu
# the ram and vcpu for name.resize are automatically calculated
add_flavor 'test.tiny' 10 512 3 1 0
add_flavor 'test.eph.tiny' 11 512 3 1 1
add_flavor 'test.small' 12 768 3 1 0
add_flavor 'test.eph.small' 13 768 3 1 1
add_flavor 'test.medium' 14 1024 4 1 0
add_flavor 'test.eph.medium' 15 1024 4 1 1
add_flavor 'test.large' 16 2048 5 1 0
add_flavor 'test.eph.large' 17 2048 5 1 1
# eph and non-eph flavors are created for each entry
add_flavor 'tiny' 10 512 3 1
add_flavor 'small' 15 768 3 1
add_flavor 'small' 16 768 4 1
add_flavor 'small' 17 768 5 1
add_flavor 'medium' 20 1024 4 1
add_flavor 'medium' 21 1024 5 1
add_flavor 'large' 25 2048 5 1
add_flavor 'large' 26 2048 10 1
add_flavor 'large' 27 2048 15 1
}
function cmd_test_init() {