From a9388834e30e0866b75f3027b490f711443fd3b9 Mon Sep 17 00:00:00 2001
From: Emilien Macchi <emilien@redhat.com>
Date: Fri, 26 Aug 2016 14:27:37 -0400
Subject: [PATCH] configure Heat with new authtoken parameters

Configure Heat with new authtoken parameters provided by puppet-heat
module.
Also move the authtoken parameters in heat-base, required by both
heat-engine and heat-api.

Depends-On: I7a9d10b0a8092b3d0c70708b57637098cfe2b56d
Change-Id: Id5cd3e830f64263c8d39c7d2973c99d0380e772c
---
 puppet/services/heat-base.yaml   | 10 ++++++++--
 puppet/services/heat-engine.yaml |  2 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/puppet/services/heat-base.yaml b/puppet/services/heat-base.yaml
index 226d2a5100..7eb58f5658 100644
--- a/puppet/services/heat-base.yaml
+++ b/puppet/services/heat-base.yaml
@@ -32,6 +32,10 @@ parameters:
                  via parameter_defaults in the resource registry.  This
                  mapping overrides those in ServiceNetMapDefaults.
     type: json
+  HeatPassword:
+    description: The password for the Heat service and db account, used by the Heat services.
+    type: string
+    hidden: true
   DefaultPasswords:
     default: {}
     type: json
@@ -60,11 +64,13 @@ outputs:
             key: 'context_is_admin'
             value: 'role:admin'
         heat::rabbit_heartbeat_timeout_threshold: 60
-        heat::keystone_tenant: 'service'
+        heat::keystone::authtoken::project_name: 'service'
+        heat::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
+        heat::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
+        heat::keystone::authtoken::password: {get_param: HeatPassword}
         heat::keystone::domain::domain_name: 'heat_stack'
         heat::keystone::domain::domain_admin: 'heat_stack_domain_admin'
         heat::keystone::domain::domain_admin_email: 'heat_stack_domain_admin@localhost'
-        heat::auth_plugin: 'password'
         heat::cron::purge_deleted::age: 30
         heat::cron::purge_deleted::age_type: 'days'
         heat::cron::purge_deleted::maxdelay: 3600
diff --git a/puppet/services/heat-engine.yaml b/puppet/services/heat-engine.yaml
index b230ec1d92..1b4f8e7f0d 100644
--- a/puppet/services/heat-engine.yaml
+++ b/puppet/services/heat-engine.yaml
@@ -71,8 +71,6 @@ outputs:
                   - {get_param: [EndpointMap, MysqlInternal, host]}
                   - '/heat'
             heat::keystone_ec2_uri: {get_param: [EndpointMap, KeystoneEC2, uri]}
-            heat::identity_uri: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
-            heat::keystone_password: {get_param: HeatPassword}
             heat::db::mysql::password: {get_param: HeatPassword}
             heat::keystone::domain::domain_password: {get_param: HeatStackDomainAdminPassword}
             heat::db::mysql::user: heat