From 188493d50d888bd38665cd676f126b543692cc70 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 25 Jul 2014 15:54:11 -0500 Subject: [PATCH] Clean up local variable usage - Neutron Change-Id: I3e19efd46cadcf0b4129a0f923fa7881f702d65c --- lib/neutron | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/neutron b/lib/neutron index a00664e6a0..6778589a0c 100644 --- a/lib/neutron +++ b/lib/neutron @@ -447,20 +447,20 @@ function create_neutron_cache_dir { # Migrated from keystone_data.sh function create_neutron_accounts { - SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }") - ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }") + local service_tenant=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }") + local admin_role=$(openstack role list | awk "/ admin / { print \$2 }") if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then - NEUTRON_USER=$(get_or_create_user "neutron" \ - "$SERVICE_PASSWORD" $SERVICE_TENANT) - get_or_add_user_role $ADMIN_ROLE $NEUTRON_USER $SERVICE_TENANT + local neutron_user=$(get_or_create_user "neutron" \ + "$SERVICE_PASSWORD" $service_tenant) + get_or_add_user_role $admin_role $neutron_user $service_tenant if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then - NEUTRON_SERVICE=$(get_or_create_service "neutron" \ + local neutron_service=$(get_or_create_service "neutron" \ "network" "Neutron Service") - get_or_create_endpoint $NEUTRON_SERVICE \ + get_or_create_endpoint $neutron_service \ "$REGION_NAME" \ "http://$SERVICE_HOST:$Q_PORT/" \ "http://$SERVICE_HOST:$Q_PORT/" \