heat engine : remove KeystoneClient get_user_by_name

Remove get_user_by_name as it's no longer used, and we want to
avoid this style of name->id lookup because it requires keystone
admin role.

Change-Id: I234a235864ac7537df09cae2f07d99ed9d53acd2
Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
Steven Hardy 2012-12-03 11:06:56 +00:00
parent 960a76ba44
commit c44e852103
2 changed files with 0 additions and 14 deletions

View File

@ -86,16 +86,6 @@ class KeystoneClient(object):
return user.id
def get_user_by_name(self, username):
"""
Return the ID for the specified username
"""
users = self.client.users.list(tenant_id=self.context.tenant_id)
for u in users:
if u.name == username:
return u.id
return None
def delete_stack_user(self, user_id):
user = self.client.users.get(user_id)

View File

@ -102,10 +102,6 @@ class FakeKeystoneClient():
def delete_stack_user(self, user_id):
self.user_id = None
def get_user_by_name(self, username):
if username == self.username:
return self.user_id
def get_ec2_keypair(self, user_id):
if user_id == self.user_id:
if not self.creds: