Merge "Add NOVA_API_VERSIONS"

This commit is contained in:
Jenkins 2014-12-04 21:47:24 +00:00 committed by Gerrit Code Review
commit dead777ea3

View File

@ -45,6 +45,12 @@ NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf
NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell}
NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini}
# NOVA_API_VERSIONS valid options
# - default - setup API end points as nova does out of the box
# - v21default - make v21 the default on /v2
# NOTE(sdague): this is for transitional testing of the Nova v21 API.
# Expect to remove in L or M.
NOVA_API_VERSIONS=${NOVA_API_VERSIONS:-default}
if is_ssl_enabled_service "nova" || is_service_enabled tls-proxy; then
NOVA_SERVICE_PROTOCOL="https"
@ -263,6 +269,11 @@ function configure_nova {
# Get the sample configuration file in place
cp $NOVA_DIR/etc/nova/api-paste.ini $NOVA_CONF_DIR
# For testing v21 is equivalent to v2
if [[ "$NOVA_API_VERSION" == "v21default" ]]; then
sed -i s/": openstack_compute_api_v2$"/": openstack_compute_api_v21"/ "$NOVA_API_PASTE_INI"
fi
fi
if is_service_enabled n-cpu; then