Skip to content

Commit

Permalink
Update validation functions for new libraries (#141)
Browse files Browse the repository at this point in the history
JIRA: OPENSTACK-99
  • Loading branch information
funkyHat authored and idanmo committed Jan 12, 2017
1 parent af2f149 commit 7d5580d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openstack_plugin_common/__init__.py
Expand Up @@ -846,8 +846,8 @@ def get_quota(self, obj_type_single):
# None if project_id (AKA tenant_name) was used instead; However the
# actual tenant_id must be used to retrieve the quotas)
self.client.authenticate()
tenant_id = self.client.service_catalog.get_token()['tenant_id']
quotas = self.quotas.get(tenant_id)
project_id = self.client.session.get_project_id()
quotas = self.quotas.get(project_id)
return getattr(quotas, self.cosmo_plural(obj_type_single))


Expand All @@ -861,7 +861,7 @@ def __init__(self, *args, **kw):

def cosmo_list(self, obj_type_single, **kw):
obj_type_plural = self.cosmo_plural(obj_type_single)
for obj in getattr(self, obj_type_plural).findall(**kw):
for obj in getattr(self, obj_type_plural).list(**kw):
yield obj

def cosmo_delete_resource(self, obj_type_single, obj_id):
Expand Down

0 comments on commit 7d5580d

Please sign in to comment.