summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-06-05 09:32:01 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-06-05 09:32:01 +0000
commit177b302dbc3ee44356845ab8562e3889a05e1b24 (patch)
treea38d807a310e532aa478d314a9d830fa46348b41
parent000fb55c63fed8c6595326a2e76fc761a17fc033 (diff)
downloaddefinitions-177b302dbc3ee44356845ab8562e3889a05e1b24.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 2b9bd7b9..5270424f 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"