Configure nova's use of placement more correctly

This change addresses a few inconsistencies in how nova processes
are configured to speak to the placement service.

The initial inspiration was that region_name was not being set in the
[placement] section, despite $REGION_NAME being used when setting
the endpoint in the catalog. That's fixed.

While fixing that two other issues became clear:

* Configuring nova process to use placement should happen in lib/nova
  not lib/placement so the function has been moved.
* auth_strategy is not relevant in the [placement] section of a
  nova process

The name of the function is maintained, in case there are plugins which
call it, but a comment is added to indicate that other services besides
nova compute (such as the cell conductor) may use the function.

Change-Id: I4a46b6460596e9a445bd90de2d52dbb71fb963df
diff --git a/lib/nova b/lib/nova
index d1d0b3c..182ae1e 100644
--- a/lib/nova
+++ b/lib/nova
@@ -597,6 +597,21 @@
     fi
 }
 
+# Configure access to placement from a nova service, usually
+# compute, but sometimes conductor.
+function configure_placement_nova_compute {
+    # Use the provided config file path or default to $NOVA_CONF.
+    local conf=${1:-$NOVA_CONF}
+    iniset $conf placement auth_type "password"
+    iniset $conf placement auth_url "$KEYSTONE_SERVICE_URI"
+    iniset $conf placement username placement
+    iniset $conf placement password "$SERVICE_PASSWORD"
+    iniset $conf placement user_domain_name "$SERVICE_DOMAIN_NAME"
+    iniset $conf placement project_name "$SERVICE_TENANT_NAME"
+    iniset $conf placement project_domain_name "$SERVICE_DOMAIN_NAME"
+    iniset $conf placement region_name "$REGION_NAME"
+}
+
 function configure_console_compute {
     # All nova-compute workers need to know the vnc configuration options
     # These settings don't hurt anything if n-xvnc and n-novnc are disabled