summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-06-05 09:32:01 (GMT)
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-06-05 11:10:11 (GMT)
commitbbbbca09890f550d50c0f74e6ec2bab1064acd8a (patch)
treedd4dac27be6135760fff1628f0d3f2ff080609cc
parent608086d835b3152353f84a765b430b11648c085e (diff)
downloaddefinitions-bbbbca09890f550d50c0f74e6ec2bab1064acd8a.tar.gz
WIP: remove unnecessary functions from setup tempest script
Change-Id: I7f61100213c09c56ed008387b79b9f56696897b5
-rwxr-xr-xopenstack/etc/tempest/set_openstack_to_run_tempest.sh38
1 files changed, 6 insertions, 32 deletions
diff --git a/openstack/etc/tempest/set_openstack_to_run_tempest.sh b/openstack/etc/tempest/set_openstack_to_run_tempest.sh
index 2b9bd7b..5270424 100755
--- a/openstack/etc/tempest/set_openstack_to_run_tempest.sh
+++ b/openstack/etc/tempest/set_openstack_to_run_tempest.sh
@@ -22,27 +22,11 @@ create_admin_user_env(){
# Create a file with the environment variables
# required for setting a Openstack admin user in the
# admin tenant.
- cat > "$admin_filename" <<'EOF'
+ cat > "$admin_filename" <<EOF
export OS_USERNAME=admin
export OS_PASSWORD=veryinsecure
export OS_TENANT_NAME=admin
- export OS_AUTH_URL=http://franred.onenode:35357/v2.0
-EOF
-}
-
-create_user_env(){
-# Create a file with the environment variables
-# required for setting a Openstack demo user in the
-# demo tenant.
- local tenant_name="$1"
- local user_name="$2"
- local password="$3"
-
- cat > "${user_name}_env" <<EOF
- export OS_TENANT_NAME="$tenant_name"
- export OS_USERNAME="$user_name"
- export OS_PASSWORD="$password"
- export OS_AUTH_URL=http://franred.onenode:5000/v2.0
+ export OS_AUTH_URL=http://$(hostname):35357/v2.0
EOF
}
@@ -60,6 +44,10 @@ configure_image_ref(){
sed -r -i "s/[#]?image_ssh_user =.*/image_ssh_user = cirros/" tempest.conf
# Configure image_ssh_password for the created image
sed -r -i "s/[#]?image_ssh_password =.*/image_ssh_password = 'cubswin:)'/" tempest.conf
+ # Configure the UUID (image_ref_alt) for the created image
+ sed -r -i "s/[#]?image_ref_alt =.*/image_ref_alt = $image_ref/" tempest.conf
+ # Configure image_alt_ssh_user for the created image
+ sed -r -i "s/[#]?image_alt_ssh_user =.*/image_alt_ssh_user = cirros/" tempest.conf
}
create_image_for_user(){
@@ -87,20 +75,6 @@ create_image_for_user(){
fi
}
-create_user() {
-# Create an user in a tenant in Openstack
- local user_name="$1"
- local tenant_name="$2"
- local password="$3"
-
- source "$admin_filename"
- keystone tenant-create --name "$tenant_name" --description "$tenant_name Tenant"
- keystone user-create --name "$user_name" --tenant "$tenant_name" --pass "$password" --email "$user_name"
- create_user_env "$user_name" "$tenant_name" "$password"
-}
-
image_ref=""
create_admin_user_env
create_image_for_user "admin"
-#create_user "demo" "demo" "demo"
-#create_image_for_user "demo"