Move url_for into heat_keystoneclient.
This allows faking of this call, and removes one instance of accessing the encapsulated keystone client. Change-Id: Iad2a9aaad2e9f1dc3cbeb509c822a61427f12817
This commit is contained in:
parent
808e34ee15
commit
b02b826083
@ -151,3 +151,6 @@ class KeystoneClient(object):
|
||||
def enable_stack_user(self, user_id):
|
||||
# FIXME : This won't work with the v3 keystone API
|
||||
self.client.users.update_enabled(user_id, True)
|
||||
|
||||
def url_for(self, **kwargs):
|
||||
return self.client.service_catalog.url_for(**kwargs)
|
||||
|
@ -69,7 +69,7 @@ class OpenStackClients(object):
|
||||
return self._keystone
|
||||
|
||||
def url_for(self, **kwargs):
|
||||
return self.keystone().client.service_catalog.url_for(**kwargs)
|
||||
return self.keystone().url_for(**kwargs)
|
||||
|
||||
def nova(self, service_type='compute'):
|
||||
if service_type in self._nova:
|
||||
|
@ -133,3 +133,6 @@ class FakeKeystoneClient():
|
||||
|
||||
def disable_stack_user(self, user_id):
|
||||
pass
|
||||
|
||||
def url_for(self, **kwargs):
|
||||
return 'http://example.com:1234/v1'
|
||||
|
Loading…
Reference in New Issue
Block a user