From b61a45c13ffa82356f896f0914d2f28dabea7a7f Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Tue, 23 Sep 2014 11:59:12 +1200 Subject: [PATCH] Include credentials for heat calling self When in standalone mode, heat needs to include heat credentials when calling its own REST API. This change assumes that heat is running in standalone mode if heat.conf [clients_heat] url has been set. Change-Id: I34e662c554ea66c6df6ebee6ce3bfb0dc3f8a948 Closes-Bug: #1302578 --- heat/engine/clients/os/heat_plugin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/heat/engine/clients/os/heat_plugin.py b/heat/engine/clients/os/heat_plugin.py index 9ae6d4320c..8726d5c9bb 100644 --- a/heat/engine/clients/os/heat_plugin.py +++ b/heat/engine/clients/os/heat_plugin.py @@ -34,6 +34,14 @@ class HeatClientPlugin(client_plugin.ClientPlugin): } endpoint = self.get_heat_url() + if self._get_client_option('heat', 'url'): + # assume that the heat API URL is manually configured because + # it is not in the keystone catalog, so include the credentials + # for the standalone auth_password middleware + args['username'] = self.context.username + args['password'] = self.context.password + del(args['token']) + return hc.Client('1', endpoint, **args) def is_not_found(self, ex):