Browse Source

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
Kiall Mac Innes 3 years ago
parent
commit
699468c52b
2 changed files with 16 additions and 4 deletions
  1. 12
    3
      devstack/plugin.sh
  2. 4
    1
      devstack/settings

+ 12
- 3
devstack/plugin.sh View File

@@ -84,9 +84,9 @@ function configure_designate {
84 84
     iniset $DESIGNATE_CONF service:api enabled_extensions_admin $DESIGNATE_ENABLED_EXTENSIONS_ADMIN
85 85
     iniset $DESIGNATE_CONF service:api api_host $DESIGNATE_SERVICE_HOST
86 86
     iniset $DESIGNATE_CONF service:api api_base_uri $DESIGNATE_SERVICE_PROTOCOL://$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT/
87
-    iniset $DESIGNATE_CONF service:api enable_api_v1 True
88
-    iniset $DESIGNATE_CONF service:api enable_api_v2 True
89
-    iniset $DESIGNATE_CONF service:api enable_api_admin True
87
+    iniset $DESIGNATE_CONF service:api enable_api_v1 $DESIGNATE_ENABLE_API_V1
88
+    iniset $DESIGNATE_CONF service:api enable_api_v2 $DESIGNATE_ENABLE_API_V2
89
+    iniset $DESIGNATE_CONF service:api enable_api_admin $DESIGNATE_ENABLE_API_ADMIN
90 90
 
91 91
     # mDNS Configuration
92 92
     iniset $DESIGNATE_CONF service:mdns host $DESIGNATE_SERVICE_HOST
@@ -149,6 +149,15 @@ function configure_designatedashboard {
149 149
 # Configure the needed tempest options
150 150
 function configure_designate_tempest() {
151 151
     if is_service_enabled tempest; then
152
+        # Tell tempest we're available
153
+        iniset $TEMPEST_CONFIG service_available designate True
154
+
155
+        # Tell tempest which APIs are available
156
+        iniset $TEMPEST_CONFIG dns_feature_enabled api_v1 $DESIGNATE_ENABLE_API_V1
157
+        iniset $TEMPEST_CONFIG dns_feature_enabled api_v2 $DESIGNATE_ENABLE_API_V2
158
+        iniset $TEMPEST_CONFIG dns_feature_enabled api_admin $DESIGNATE_ENABLE_API_ADMIN
159
+
160
+        # Tell tempest where are nameservers are.
152 161
         nameservers=$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT_DNS
153 162
         # TODO(kiall): Remove hardcoded list of plugins
154 163
         case $DESIGNATE_BACKEND_DRIVER in

+ 4
- 1
devstack/settings View File

@@ -10,7 +10,10 @@ DESIGNATE_PERIODIC_RECOVERY_INTERVAL=${DESIGNATE_PERIODIC_RECOVERY_INTERVAL:-120
10 10
 DESIGNATE_PERIODIC_SYNC_INTERVAL=${DESIGNATE_PERIODIC_SYNC_INTERVAL:-1800}
11 11
 DESIGNATE_COORDINATION_URL=${DESIGNATE_COORDINATION_URL:-}
12 12
 
13
-# Default extensions
13
+# Default APIs and Extensions
14
+DESIGNATE_ENABLE_API_V1=${DESIGNATE_ENABLE_API_V1:-"True"}
15
+DESIGNATE_ENABLE_API_V2=${DESIGNATE_ENABLE_API_V2:-"True"}
16
+DESIGNATE_ENABLE_API_ADMIN=${DESIGNATE_ENABLE_API_ADMIN:-"True"}
14 17
 DESIGNATE_ENABLED_EXTENSIONS_V1=${DESIGNATE_ENABLED_EXTENSIONS_V1:-"quotas"}
15 18
 DESIGNATE_ENABLED_EXTENSIONS_V2=${DESIGNATE_ENABLED_EXTENSIONS_V2:-""}
16 19
 DESIGNATE_ENABLED_EXTENSIONS_ADMIN=${DESIGNATE_ENABLED_EXTENSIONS_ADMIN:-"quotas"}

Loading…
Cancel
Save