2016-08-06 23:32:06 |
Chaoyi Huang |
description |
If use user=demo, project_id=demo, openstack token issue to get the token for the demo user, and then execute the global quota limit show the limit for the tenant with the demo's project-id,
curl -H "Content-Type: application/json" -H "X-Auth-Token: $kb_token" http://127.0.0.1:8118/v1.0/$tenant_id/os-quota-sets/$tenant_id
the response is "{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}", but a tenant use should be able to list his own project's quota limit. |
If use user=demo, project_id=demo, openstack token issue to get the token for the demo user, and then execute the global quota limit show the limit for the tenant with the demo's project-id,
curl -H "Content-Type: application/json" -H "X-Auth-Token: $kb_token" http://127.0.0.1:8118/v1.0/$tenant_id/os-quota-sets/$tenant_id
File "/opt/stack/kingbird/kingbird/api/controllers/quota_manager.py", line 89, in get
context, project_id)
File "/opt/stack/kingbird/kingbird/db/sqlalchemy/api.py", line 112, in wrapper
if not is_admin_context(args[0]) and not is_user_context(args[0]):
File "/opt/stack/kingbird/kingbird/db/sqlalchemy/api.py", line 83, in is_user_context
if not context.user or not context.tenant_id:
AttributeError: 'RequestContext' object has no attribute 'tenant_id' |
|