Merge "Revert "Disable Cinder v1 API support by default""
This commit is contained in:
commit
0a4cbde358
@ -588,13 +588,6 @@ with ``VOLUME_BACKING_FILE_SIZE``.
|
||||
VOLUME_BACKING_FILE_SIZE=10250M
|
||||
|
||||
|
||||
Cinder v1 API is depricated and disabled by default. You can enable v1 API by
|
||||
setting ``CINDER_ENABLE_V1_API`` to ``True``.
|
||||
|
||||
::
|
||||
CINDER_ENABLE_V1_API=True
|
||||
|
||||
|
||||
Keystone
|
||||
~~~~~~~~
|
||||
|
||||
|
29
lib/cinder
29
lib/cinder
@ -27,9 +27,6 @@ set +o xtrace
|
||||
# Defaults
|
||||
# --------
|
||||
|
||||
# NOTE (e0ne): Cinder API v1 is deprecated and will be disabled by default.
|
||||
CINDER_ENABLE_V1_API=$(trueorfalse False CINDER_ENABLE_V1_API)
|
||||
|
||||
# set up default driver
|
||||
CINDER_DRIVER=${CINDER_DRIVER:-default}
|
||||
CINDER_PLUGINS=$TOP_DIR/lib/cinder_plugins
|
||||
@ -228,12 +225,9 @@ function configure_cinder {
|
||||
iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH
|
||||
iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL
|
||||
# NOTE(thingee): Cinder V1 API is deprecated and defaults to off as of
|
||||
# Juno.
|
||||
if [[ ${CINDER_ENABLE_V1_API} = True ]]; then
|
||||
iniset $CINDER_CONF DEFAULT enable_v1_api true
|
||||
else
|
||||
iniset $CINDER_CONF DEFAULT enable_v1_api false
|
||||
fi
|
||||
# Juno. Keep it enabled so we can continue testing while it's still
|
||||
# supported.
|
||||
iniset $CINDER_CONF DEFAULT enable_v1_api true
|
||||
|
||||
iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME"
|
||||
|
||||
@ -332,13 +326,12 @@ function create_cinder_accounts {
|
||||
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
|
||||
if [[ ${CINDER_ENABLE_V1_API} = True ]]; then
|
||||
get_or_create_service "cinder" "volume" "Cinder Volume Service"
|
||||
get_or_create_endpoint "volume" "$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s"
|
||||
fi
|
||||
get_or_create_service "cinder" "volume" "Cinder Volume Service"
|
||||
get_or_create_endpoint "volume" "$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(tenant_id)s"
|
||||
|
||||
get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2"
|
||||
get_or_create_endpoint "volumev2" "$REGION_NAME" \
|
||||
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(tenant_id)s" \
|
||||
@ -489,7 +482,9 @@ function create_volume_types {
|
||||
local be be_name
|
||||
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
||||
be_name=${be##*:}
|
||||
openstack volume type create --os-volume-api-version 2 --property volume_backend_name="${be_name}" ${be_name}
|
||||
# FIXME(jamielennox): Remove --os-volume-api-version pinning when
|
||||
# osc supports volume type create on v2 api. bug #1475060
|
||||
openstack volume type create --os-volume-api-version 1 --property volume_backend_name="${be_name}" ${be_name}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
@ -492,15 +492,6 @@ function configure_tempest {
|
||||
iniset $TEMPEST_CONFIG volume-feature-enabled backup False
|
||||
fi
|
||||
|
||||
# Use only Cinder API v2
|
||||
if [[ ${CINDER_ENABLE_V1_API} = True ]]; then
|
||||
iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 True
|
||||
iniset $TEMPEST_CONFIG volume catalog_type volume
|
||||
else
|
||||
iniset $TEMPEST_CONFIG volume-feature-enabled api_v1 False
|
||||
iniset $TEMPEST_CONFIG volume catalog_type volumev2
|
||||
fi
|
||||
|
||||
# Using ``CINDER_ENABLED_BACKENDS``
|
||||
if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then
|
||||
iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True"
|
||||
|
Loading…
Reference in New Issue
Block a user