diff --git a/lib/neutron b/lib/neutron index f72ee5934f..ab2022739d 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/" \