Browse code

Merge "Clean up local variable usage - Neutron"

Jenkins authored on 2014/09/16 01:41:14
Showing 1 changed files
... ...
@@ -447,20 +447,20 @@ function create_neutron_cache_dir {
447 447
 # Migrated from keystone_data.sh
448 448
 function create_neutron_accounts {
449 449
 
450
-    SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
451
-    ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
450
+    local service_tenant=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
451
+    local admin_role=$(openstack role list | awk "/ admin / { print \$2 }")
452 452
 
453 453
     if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
454 454
 
455
-        NEUTRON_USER=$(get_or_create_user "neutron" \
456
-            "$SERVICE_PASSWORD" $SERVICE_TENANT)
457
-        get_or_add_user_role $ADMIN_ROLE $NEUTRON_USER $SERVICE_TENANT
455
+        local neutron_user=$(get_or_create_user "neutron" \
456
+            "$SERVICE_PASSWORD" $service_tenant)
457
+        get_or_add_user_role $admin_role $neutron_user $service_tenant
458 458
 
459 459
         if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
460 460
 
461
-            NEUTRON_SERVICE=$(get_or_create_service "neutron" \
461
+            local neutron_service=$(get_or_create_service "neutron" \
462 462
                 "network" "Neutron Service")
463
-            get_or_create_endpoint $NEUTRON_SERVICE \
463
+            get_or_create_endpoint $neutron_service \
464 464
                 "$REGION_NAME" \
465 465
                 "http://$SERVICE_HOST:$Q_PORT/" \
466 466
                 "http://$SERVICE_HOST:$Q_PORT/" \