Browse code

Inject all account details in tempest.conf

The tempest configuration function did not inject all account
details in tempest.conf. The only reason why it worked, was
because tempest uses default config values which are valid for
the current devstack setup.

To remove this dependency, two patches are needed:
- this one in devstack, to inject all values
- https://review.openstack.org/#/c/77602/ in tempest, to change
default values to None

Partially fixes bug 1287191

Change-Id: I01507b142703a1ff66707464b9a743e9d0ca3e01

Andrea Frittoli authored on 2014/03/05 22:38:19
Showing 1 changed files
... ...
@@ -149,8 +149,12 @@ function configure_tempest {
149 149
 
150 150
     password=${ADMIN_PASSWORD:-secrete}
151 151
 
152
-    # See files/keystone_data.sh where alt_demo user
153
-    # and tenant are set up...
152
+    # See files/keystone_data.sh and stack.sh where admin, demo and alt_demo
153
+    # user and tenant are set up...
154
+    ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
155
+    ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-admin}
156
+    TEMPEST_USERNAME=${TEMPEST_USERNAME:-demo}
157
+    TEMPEST_TENANT_NAME=${TEMPEST_TENANT_NAME:-demo}
154 158
     ALT_USERNAME=${ALT_USERNAME:-alt_demo}
155 159
     ALT_TENANT_NAME=${ALT_TENANT_NAME:-alt_demo}
156 160
 
... ...
@@ -254,11 +258,15 @@ function configure_tempest {
254 254
     # Identity
255 255
     iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
256 256
     iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v3/"
257
+    iniset $TEMPEST_CONFIG identity username $TEMPEST_USERNAME
257 258
     iniset $TEMPEST_CONFIG identity password "$password"
259
+    iniset $TEMPEST_CONFIG identity tenant_name $TEMPEST_TENANT_NAME
258 260
     iniset $TEMPEST_CONFIG identity alt_username $ALT_USERNAME
259 261
     iniset $TEMPEST_CONFIG identity alt_password "$password"
260 262
     iniset $TEMPEST_CONFIG identity alt_tenant_name $ALT_TENANT_NAME
263
+    iniset $TEMPEST_CONFIG identity admin_username $ADMIN_USERNAME
261 264
     iniset $TEMPEST_CONFIG identity admin_password "$password"
265
+    iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME
262 266
 
263 267
     # Image
264 268
     # for the gate we want to be able to override this variable so we aren't
... ...
@@ -285,7 +293,9 @@ function configure_tempest {
285 285
     iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method
286 286
 
287 287
     # Compute admin
288
+    iniset $TEMPEST_CONFIG "compute-admin" username $USERNAME
288 289
     iniset $TEMPEST_CONFIG "compute-admin" password "$password" # DEPRECATED
290
+    iniset $TEMPEST_CONFIG "compute-admin" tenant_name $TENANT_NAME
289 291
 
290 292
     # Network
291 293
     iniset $TEMPEST_CONFIG network api_version 2.0