Skip to content

Commit

Permalink
Include credentials for heat calling self
Browse files Browse the repository at this point in the history
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
  • Loading branch information
steveb committed Sep 26, 2014
1 parent d9eebfd commit b61a45c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions heat/engine/clients/os/heat_plugin.py
Expand Up @@ -34,6 +34,14 @@ def _create(self):
}

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):
Expand Down

0 comments on commit b61a45c

Please sign in to comment.