Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/django-openstack/django_openstack/api.py b/django-openstack/django_openstack/api.py
- index ab08226..3b88fc6 100644
- --- a/django-openstack/django_openstack/api.py
- +++ b/django-openstack/django_openstack/api.py
- @@ -634,7 +634,7 @@ def token_create_scoped_with_token(request, tenant, token):
- def tenant_quota_get(request, tenant):
- - return admin_api(request).quota_sets.get(tenant)
- + return novaclient(request).quotas.get(tenant)
- @check_openstackx
- diff --git a/django-openstack/django_openstack/dash/views/images.py b/django-openstack/django_openstack/dash/views/images.py
- index 42a1f89..d94677a 100644
- --- a/django-openstack/django_openstack/dash/views/images.py
- +++ b/django-openstack/django_openstack/dash/views/images.py
- @@ -118,7 +118,7 @@ def index(request, tenant_id):
- tenant = {}
- try:
- - tenant = api.token_get_tenant(request, request.user.tenant)
- + tenant = api.token_get_tenant(request, request.user.tenant_id)
- except api_exceptions.ApiException, e:
- messages.error(request, "Unable to retrienve tenant info\
- from keystone: %s" % e.message)
- @@ -185,8 +185,8 @@ def launch(request, tenant_id, image_id):
- # TODO(mgius): Any reason why these can't be after the launchform logic?
- # If The form is valid, we've just wasted these two api calls
- image = api.image_get(request, image_id)
- - tenant = api.token_get_tenant(request, request.user.tenant)
- - quotas = api.tenant_quota_get(request, request.user.tenant)
- + tenant = api.token_get_tenant(request, request.session['tenant_id'])
- + quotas = api.tenant_quota_get(request, request.session['tenant_id'])
- try:
- quotas.ram = int(quotas.ram) / 100
- except Exception, e:
Add Comment
Please, Sign In to add comment