Browse code

Merge "Support Tempest config file format transition"

Jenkins authored on 2013/01/21 03:43:20
Showing 1 changed files
... ...
@@ -16,10 +16,9 @@
16 16
 # - ``Q_ROUTER_NAME``
17 17
 # - ``VIRT_DRIVER``
18 18
 # - ``LIBVIRT_TYPE``
19
+# - ``KEYSTONE_SERVICE_PROTOCOL``, ``KEYSTONE_SERVICE_HOST`` from lib/keystone
19 20
 # Optional Dependencies:
20
-# IDENTITY_USE_SSL, IDENTITY_HOST, IDENTITY_PORT, IDENTITY_PATH
21 21
 # ALT_* (similar vars exists in keystone_data.sh)
22
-# ``IMAGE_PORT``, ``IMAGE_HOST``
23 22
 # ``LIVE_MIGRATION_AVAILABLE``
24 23
 # ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION``
25 24
 # ``DEFAULT_INSTANCE_TYPE``
... ...
@@ -124,13 +123,6 @@ function configure_tempest() {
124 124
     # copy every time, because the image UUIDS are going to change
125 125
     cp $TEMPEST_CONF.sample $TEMPEST_CONF
126 126
 
127
-    IDENTITY_USE_SSL=${IDENTITY_USE_SSL:-False}
128
-    IDENTITY_HOST=${IDENTITY_HOST:-127.0.0.1}
129
-    IDENTITY_PORT=${IDENTITY_PORT:-5000}
130
-    # TODO(jaypipes): This is dumb and needs to be removed
131
-    # from the Tempest configuration file entirely...
132
-    IDENTITY_PATH=${IDENTITY_PATH:-tokens}
133
-
134 127
     password=${ADMIN_PASSWORD:-secrete}
135 128
 
136 129
     # See files/keystone_data.sh where alt_demo user
... ...
@@ -203,15 +195,19 @@ function configure_tempest() {
203 203
     iniset $TEMPEST_CONF boto build_interval $BUILD_INTERVAL
204 204
     iniset $TEMPEST_CONF boto http_socket_timeout 5
205 205
 
206
-    iniset $TEMPEST_CONF identity use_ssl $IDENTITY_USE_SSL
207
-    iniset $TEMPEST_CONF identity host $IDENTITY_HOST
208
-    iniset $TEMPEST_CONF identity port $IDENTITY_PORT
209
-    iniset $TEMPEST_CONF identity path $IDENTITY_PATH
210
-
211
-    iniset $TEMPEST_CONF compute password "$password"
212
-    iniset $TEMPEST_CONF compute alt_username $ALT_USERNAME
213
-    iniset $TEMPEST_CONF compute alt_password "$password"
214
-    iniset $TEMPEST_CONF compute alt_tenant_name $ALT_TENANT_NAME
206
+    # Identity
207
+    iniset $TEMPEST_CONF identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
208
+    iniset $TEMPEST_CONF identity password "$password"
209
+    iniset $TEMPEST_CONF identity alt_username $ALT_USERNAME
210
+    iniset $TEMPEST_CONF identity alt_password "$password"
211
+    iniset $TEMPEST_CONF identity alt_tenant_name $ALT_TENANT_NAME
212
+    iniset $TEMPEST_CONF identity admin_password "$password"
213
+
214
+    # Compute
215
+    iniset $TEMPEST_CONF compute password "$password" # DEPRECATED
216
+    iniset $TEMPEST_CONF compute alt_username $ALT_USERNAME # DEPRECATED
217
+    iniset $TEMPEST_CONF compute alt_password "$password" # DEPRECATED
218
+    iniset $TEMPEST_CONF compute alt_tenant_name $ALT_TENANT_NAME # DEPRECATED
215 219
     iniset $TEMPEST_CONF compute resize_available False
216 220
     iniset $TEMPEST_CONF compute change_password_available False
217 221
     iniset $TEMPEST_CONF compute compute_log_level ERROR
... ...
@@ -223,41 +219,47 @@ function configure_tempest() {
223 223
     iniset $TEMPEST_CONF compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
224 224
     #Skip until #1074039 is fixed
225 225
     iniset $TEMPEST_CONF compute run_ssh False
226
-    iniset $TEMPEST_CONF compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
226
+    iniset $TEMPEST_CONF compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
227 227
     iniset $TEMPEST_CONF compute network_for_ssh $PRIVATE_NETWORK_NAME
228 228
     iniset $TEMPEST_CONF compute ip_version_for_ssh 4
229 229
     iniset $TEMPEST_CONF compute ssh_timeout $BUILD_TIMEOUT
230 230
     iniset $TEMPEST_CONF compute image_ref $image_uuid
231
+    iniset $TEMPEST_CONF compute image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
231 232
     iniset $TEMPEST_CONF compute image_ref_alt $image_uuid_alt
233
+    iniset $TEMPEST_CONF compute image_alt_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
232 234
     iniset $TEMPEST_CONF compute flavor_ref $flavor_ref
233 235
     iniset $TEMPEST_CONF compute flavor_ref_alt $flavor_ref_alt
234
-    iniset $TEMPEST_CONF compute source_dir $NOVA_SOURCE_DIR
235 236
     iniset $TEMPEST_CONF compute live_migration_available ${LIVE_MIGRATION_AVAILABLE:-False}
236 237
     iniset $TEMPEST_CONF compute use_block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
237
-    # Inherited behavior, might be wrong
238
-    iniset $TEMPEST_CONF compute bin_dir $NOVA_BIN_DIR
238
+    iniset $TEMPEST_CONF compute source_dir $NOVA_SOURCE_DIR # DEPRECATED
239
+    iniset $TEMPEST_CONF compute bin_dir $NOVA_BIN_DIR # DEPRECATED
240
+    iniset $TEMPEST_CONF compute path_to_private_key $TEMPEST_DIR/id_rsa # DEPRECATED
241
+    iniset $TEMPEST_CONF compute db_uri $BASE_SQL_CONN/nova # DEPRECATED
242
+
243
+    # Whitebox
244
+    iniset $TEMPEST_CONF whitebox source_dir $NOVA_SOURCE_DIR
245
+    iniset $TEMPEST_CONF whitebox bin_dir $NOVA_BIN_DIR
239 246
     # TODO(jaypipes): Create the key file here... right now, no whitebox
240 247
     # tests actually use a key.
241
-    iniset $TEMPEST_CONF compute path_to_private_key $TEMPEST_DIR/id_rsa
242
-    iniset $TEMPEST_CONF compute db_uri $BASE_SQL_CONN/nova
248
+    iniset $TEMPEST_CONF whitebox path_to_private_key $TEMPEST_DIR/id_rsa
249
+    iniset $TEMPEST_CONF whitebox db_uri $BASE_SQL_CONN/nova
250
+
243 251
 
244 252
     # image
245
-    iniset $TEMPEST_CONF image host ${IMAGE_HOST:-127.0.0.1}
246
-    iniset $TEMPEST_CONF image port ${IMAGE_PORT:-9292}
247
-    iniset $TEMPEST_CONF image password "$password"
253
+    iniset $TEMPEST_CONF image password "$password" # DEPRECATED
248 254
 
249 255
     # identity-admin
250
-    iniset $TEMPEST_CONF "identity-admin" password "$password"
256
+    iniset $TEMPEST_CONF "identity-admin" password "$password" # DEPRECATED
251 257
 
252 258
     # compute admin
253
-    iniset $TEMPEST_CONF "compute-admin" password "$password"
259
+    iniset $TEMPEST_CONF "compute-admin" password "$password" # DEPRECATED
254 260
 
255 261
     # network admin
256
-    iniset $TEMPEST_CONF "network-admin" password "$password"
262
+    iniset $TEMPEST_CONF "network-admin" password "$password" # DEPRECATED
257 263
 
258 264
     # network
259 265
     iniset $TEMPEST_CONF network api_version 2.0
260
-    iniset $TEMPEST_CONF network password "$password"
266
+    iniset $TEMPEST_CONF network password "$password" # DEPRECATED
261 267
     iniset $TEMPEST_CONF network tenant_networks_reachable "$tenant_networks_reachable"
262 268
     iniset $TEMPEST_CONF network public_network_id "$public_network_id"
263 269
     iniset $TEMPEST_CONF network public_router_id "$public_router_id"
... ...
@@ -268,6 +270,7 @@ function configure_tempest() {
268 268
     iniset $TEMPEST_CONF boto s3_materials_path "$BOTO_MATERIALS_PATH"
269 269
     iniset $TEMPEST_CONF boto instance_type "$boto_instance_type"
270 270
     iniset $TEMPEST_CONF boto http_socket_timeout 30
271
+    iniset $TEMPEST_CONF boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
271 272
 
272 273
     echo "Created tempest configuration file:"
273 274
     cat $TEMPEST_CONF