Use ec2 and s3 urls from keystone catalog
In current implemetation these two urls are defined from Nova
definitions. And urls point to nova. But standalone EC2API
project has another urls that are defined in keystone catalog
in plugin setup.
I suggest to use urls from catalog to be able to test
stackforge/ec2-api by current tempest.
Change-Id: Ibec8c36a8c2fc7ea3d8fab57819adae5f7378045
diff --git a/lib/tempest b/lib/tempest
index 3f33512..9f7e626 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -271,6 +271,15 @@
fi
fi
+ EC2_URL=$(openstack endpoint show -f value -c publicurl ec2 || true)
+ if [[ -z $EC2_URL ]]; then
+ EC2_URL="$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/"
+ fi
+ S3_URL=$(openstack endpoint show -f value -c publicurl s3 || true)
+ if [[ -z $S3_URL ]]; then
+ S3_URL="http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
+ fi
+
iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG
# Oslo
@@ -375,8 +384,8 @@
iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions
# boto
- iniset $TEMPEST_CONFIG boto ec2_url "$EC2_SERVICE_PROTOCOL://$SERVICE_HOST:8773/"
- iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
+ iniset $TEMPEST_CONFIG boto ec2_url "$EC2_URL"
+ iniset $TEMPEST_CONFIG boto s3_url "$S3_URL"
iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
iniset $TEMPEST_CONFIG boto ari_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd.manifest.xml
iniset $TEMPEST_CONFIG boto ami_manifest cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img.manifest.xml