From 90c20209088eca3dcf830856a3a3118367dbc09f Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Mon, 17 Nov 2014 01:16:22 -0500
Subject: [PATCH] Configure boto.cfg in tempest to point to SSL bundle

The boto client uses the ca_certificate_files value in the
Boto section of /etc/boto.cfg when making an SSL client
connection. Configure that to be the devstack SSL CA bundle
so the boto tests will pass when running against an SSL or
TLS-proxy configured devstack environment.

Change-Id: I55ae6d6e0c5b3adb4370ec93f40ae1cd47741457
---
 lib/tempest | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/tempest b/lib/tempest
index 8931300b98..ec045a9a4f 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -63,6 +63,7 @@ BUILD_TIMEOUT=${BUILD_TIMEOUT:-196}
 
 
 BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}"
+BOTO_CONF=$TEMPEST_DIR/boto.cfg
 
 # Cinder/Volume variables
 TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
@@ -424,6 +425,12 @@ function configure_tempest {
         fi
     done
 
+    if is_ssl_enabled_service "keystone" || is_service_enabled tls-proxy; then
+        # Use the BOTO_CONFIG environment variable to point to this file
+        iniset $BOTO_CONF Boto ca_certificates_file $SSL_BUNDLE_FILE
+        sudo chown $STACK_USER $BOTO_CONF
+    fi
+
     # Restore IFS
     IFS=$ifs
 }