DevStack: Allow disabling of API versions

In order to fully remove the V1 API, we need to be able to
deploy DevStack entirely without the API. As a step towards
removing the API, we'll (at a date to be chosen later) disable
API v1 by default in both the codebase and DevStack plugin.

Change-Id: If1f27eb43f014959551c298f10c6c5fcb95e2fe8
This commit is contained in:
Kiall Mac Innes 2016-05-03 18:04:04 +01:00
parent 3240b29b1f
commit 699468c52b
2 changed files with 16 additions and 4 deletions

View File

@ -84,9 +84,9 @@ function configure_designate {
iniset $DESIGNATE_CONF service:api enabled_extensions_admin $DESIGNATE_ENABLED_EXTENSIONS_ADMIN
iniset $DESIGNATE_CONF service:api api_host $DESIGNATE_SERVICE_HOST
iniset $DESIGNATE_CONF service:api api_base_uri $DESIGNATE_SERVICE_PROTOCOL://$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT/
iniset $DESIGNATE_CONF service:api enable_api_v1 True
iniset $DESIGNATE_CONF service:api enable_api_v2 True
iniset $DESIGNATE_CONF service:api enable_api_admin True
iniset $DESIGNATE_CONF service:api enable_api_v1 $DESIGNATE_ENABLE_API_V1
iniset $DESIGNATE_CONF service:api enable_api_v2 $DESIGNATE_ENABLE_API_V2
iniset $DESIGNATE_CONF service:api enable_api_admin $DESIGNATE_ENABLE_API_ADMIN
# mDNS Configuration
iniset $DESIGNATE_CONF service:mdns host $DESIGNATE_SERVICE_HOST
@ -149,6 +149,15 @@ function configure_designatedashboard {
# Configure the needed tempest options
function configure_designate_tempest() {
if is_service_enabled tempest; then
# Tell tempest we're available
iniset $TEMPEST_CONFIG service_available designate True
# Tell tempest which APIs are available
iniset $TEMPEST_CONFIG dns_feature_enabled api_v1 $DESIGNATE_ENABLE_API_V1
iniset $TEMPEST_CONFIG dns_feature_enabled api_v2 $DESIGNATE_ENABLE_API_V2
iniset $TEMPEST_CONFIG dns_feature_enabled api_admin $DESIGNATE_ENABLE_API_ADMIN
# Tell tempest where are nameservers are.
nameservers=$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT_DNS
# TODO(kiall): Remove hardcoded list of plugins
case $DESIGNATE_BACKEND_DRIVER in

View File

@ -10,7 +10,10 @@ DESIGNATE_PERIODIC_RECOVERY_INTERVAL=${DESIGNATE_PERIODIC_RECOVERY_INTERVAL:-120
DESIGNATE_PERIODIC_SYNC_INTERVAL=${DESIGNATE_PERIODIC_SYNC_INTERVAL:-1800}
DESIGNATE_COORDINATION_URL=${DESIGNATE_COORDINATION_URL:-}
# Default extensions
# Default APIs and Extensions
DESIGNATE_ENABLE_API_V1=${DESIGNATE_ENABLE_API_V1:-"True"}
DESIGNATE_ENABLE_API_V2=${DESIGNATE_ENABLE_API_V2:-"True"}
DESIGNATE_ENABLE_API_ADMIN=${DESIGNATE_ENABLE_API_ADMIN:-"True"}
DESIGNATE_ENABLED_EXTENSIONS_V1=${DESIGNATE_ENABLED_EXTENSIONS_V1:-"quotas"}
DESIGNATE_ENABLED_EXTENSIONS_V2=${DESIGNATE_ENABLED_EXTENSIONS_V2:-""}
DESIGNATE_ENABLED_EXTENSIONS_ADMIN=${DESIGNATE_ENABLED_EXTENSIONS_ADMIN:-"quotas"}