Configure region name in neutron & ceilometer config files
Because of lacking some options in multi-region env, neutron and
ceilometer can not work after setup a multi-region env using
devstack.
This patch adds related options for multi-region env.
Change-Id: I4de890b233366f9526fa283aa9078a4d6ed0ca23
Closes-Bug: #1409589
diff --git a/lib/ceilometer b/lib/ceilometer
index f6280d9..d9064e2 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -200,6 +200,8 @@
iniset $CEILOMETER_CONF service_credentials os_username ceilometer
iniset $CEILOMETER_CONF service_credentials os_password $SERVICE_PASSWORD
iniset $CEILOMETER_CONF service_credentials os_tenant_name $SERVICE_TENANT_NAME
+ iniset $CEILOMETER_CONF service_credentials os_region_name $REGION_NAME
+ iniset $CEILOMETER_CONF service_credentials os_auth_url $KEYSTONE_SERVICE_URI/v2.0
configure_auth_token_middleware $CEILOMETER_CONF ceilometer $CEILOMETER_AUTH_CACHE_DIR
diff --git a/lib/neutron b/lib/neutron
index 5678769..8a8fe3c 100755
--- a/lib/neutron
+++ b/lib/neutron
@@ -1011,6 +1011,7 @@
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_status_changes $Q_NOTIFY_NOVA_PORT_STATUS_CHANGES
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_data_changes $Q_NOTIFY_NOVA_PORT_DATA_CHANGES
iniset $NEUTRON_CONF DEFAULT nova_url "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2"
+ iniset $NEUTRON_CONF DEFAULT nova_region_name $REGION_NAME
iniset $NEUTRON_CONF DEFAULT nova_admin_username nova
iniset $NEUTRON_CONF DEFAULT nova_admin_password $SERVICE_PASSWORD
ADMIN_TENANT_ID=$(openstack project list | awk "/ service / { print \$2 }")