Browse code

Move default Keystone API version to v3

This patch sets Keystone v3 as default in services
configuration files and in the openrc and stackrc scripts.

Change-Id: I24546f02067ea23d088d383b85e3a78d7b43f166
Partially-Implements: bp keystonev3

Paulo Ewerton authored on 2016/01/23 04:13:31
Showing 5 changed files
... ...
@@ -235,7 +235,7 @@ function configure_glance {
235 235
     iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
236 236
     iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
237 237
     iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_url
238
-    iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI/v2.0
238
+    iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI/v3
239 239
     iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_tenant_name
240 240
     iniset $GLANCE_CACHE_CONF DEFAULT admin_tenant_name $SERVICE_PROJECT_NAME
241 241
     iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_user
... ...
@@ -271,13 +271,15 @@ function configure_tempest {
271 271
         iniset $TEMPEST_CONFIG auth admin_tenant_id $admin_project_id
272 272
         iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name
273 273
     fi
274
-    if [ "$ENABLE_IDENTITY_V2" == "False" ]; then
275
-        # Only Identity v3 is available; then skip Identity API v2 tests
274
+    if [ "$ENABLE_IDENTITY_V2" == "True" ]; then
275
+        # Run Identity API v2 tests ONLY if needed
276
+        iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 True
277
+        iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2}
278
+    else
279
+        # Skip Identity API v2 tests by default
276 280
         iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 False
277
-        # In addition, use v3 auth tokens for running all Tempest tests
281
+        # Use v3 auth tokens for running all Tempest tests
278 282
         iniset $TEMPEST_CONFIG identity auth_version v3
279
-    else
280
-        iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2}
281 283
     fi
282 284
 
283 285
     if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then
... ...
@@ -81,12 +81,12 @@ KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL}
81 81
 KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST}
82 82
 
83 83
 # Identity API version
84
-export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}
84
+export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-3}
85 85
 
86 86
 # Authenticating against an OpenStack cloud using Keystone returns a **Token**
87 87
 # and **Service Catalog**.  The catalog contains the endpoints for all services
88 88
 # the user/project has access to - including nova, glance, keystone, swift, ...
89
-# We currently recommend using the 2.0 *identity api*.
89
+# We currently recommend using the version 3 *identity api*.
90 90
 #
91 91
 export OS_AUTH_URL=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:5000/v${OS_IDENTITY_API_VERSION}
92 92
 
... ...
@@ -158,7 +158,7 @@ else
158 158
 fi
159 159
 
160 160
 # Configure Identity API version: 2.0, 3
161
-IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}
161
+IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-3}
162 162
 
163 163
 # Set the option ENABLE_IDENTITY_V2 to True. It defines whether the DevStack
164 164
 # deployment will be deploying the Identity v2 pipelines. If this option is set
... ...
@@ -152,7 +152,7 @@ if [ -z "$OS_USERNAME" ]; then
152 152
 fi
153 153
 
154 154
 if [ -z "$OS_AUTH_URL" ]; then
155
-    export OS_AUTH_URL=http://localhost:5000/v2.0/
155
+    export OS_AUTH_URL=http://localhost:5000/v3/
156 156
 fi
157 157
 
158 158
 if [ -z "$OS_USER_DOMAIN_ID" -a -z "$OS_USER_DOMAIN_NAME" ]; then