Update to 8.0.0~b3
[openstack-build/neutron-build.git] / trusty / debian / neutron-common.postinst.in
index c9010ea71e2cc7cb8985d102c26d70409484b2f1..e65290df94c9782da6c3f89f1aa8464903884577 100644 (file)
@@ -57,6 +57,25 @@ neutron_core_plugin_class () {
        esac
 }
 
+write_nova_admin_credentials () {
+        db_get neutron/nova_url
+       pkgos_inifile set ${N_CONF} nova url ${RET}
+
+       db_get neutron/nova_region
+       pkgos_inifile set ${N_CONF} nova region_name ${RET}
+
+       db_get neutron/nova_admin_tenant_name
+       NOVA_TENANT_NAME_IN_NEUTRON=${RET}
+       pkgos_inifile set ${N_CONF} nova tenant_name ${RET}
+       pkgos_inifile set ${N_CONF} nova project_name ${RET}
+
+       db_get neutron/nova_admin_username
+       pkgos_inifile set ${N_CONF} nova username ${RET}
+
+       db_get neutron/nova_admin_password
+       pkgos_inifile set ${N_CONF} nova password ${RET}
+}
+
 if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
        . /usr/share/debconf/confmodule
 
@@ -109,6 +128,7 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
                pkgos_inifile set ${OVS_CONF} OVS local_ip "${RET}"
        fi
 
+       write_nova_admin_credentials
        db_stop
 
        chown -R neutron:adm /var/log/neutron/