Ask Your Question
0

Project limits from REST

asked 2013-12-20 02:28:00 -0500

efwe gravatar image

updated 2013-12-20 05:56:20 -0500

I'm trying to get projects limits making rest request from http://api.openstack.org/api-ref-compute.html (v2/​{tenant_id}​/limits/tenant_id=​{customer_tenant_id}​) but servers respond is

{
   "notImplemented":
   {
       "message": "The server has either erred or is incapable of performing the requested operation.",
       "code": 501
   }
}

Is there any other method to receive project limits? I'm using devstack.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-12-23 10:07:25 -0500

jtopjian gravatar image

updated 2013-12-24 13:54:28 -0500

Hello,

Rather than v2/​{tenant_id}​/limits/tenant_id=​{customer_tenant_id}, you should just be requesting:

v2/​{tenant_id}​/limits

For example, if your nova-api endpoint is http://example.com:8774 , and your tenand_id is a1b2c3d4 then you would issue a request to:

http://example.com:8774/v2/a1b2c3d4/limits

Th above will only work if you're retrieving the limits for a tenant that you are a member of. If you are the admin user and you want to see the limits for a project that you are not a member of, look at following command:

nova absolute-limits --tenant a1b2c34d

Running the command with --debug will show you the API calls being used.

Hope that helps,

Joe

edit flag offensive delete link more

Comments

No it doesn't help. I want to get limits for different tenant. If i make http://example.com:8774/v2/different_tenant_id/limits I get: "badRequest": { "message": "Malformed request URL: URL's project_id 'abc' doesn't match Context's project_id 'cba'",

efwe gravatar imageefwe ( 2013-12-24 02:32:48 -0500 )edit

ah, understood. Please see revised answer.

jtopjian gravatar imagejtopjian ( 2013-12-24 13:54:43 -0500 )edit

Thank you! With debug key it was shown that request is http://localhost:8774/v2/a1b2c34d/limits?tenant_id=dsag421 . But it returns same result as http://localhost:8774/v2/a1b2c34d/limits . Even if i make request http://localhost:8774/v2/a1b2c34d/limits?tenant_id=incorrect_tenant_id it returns the same answer.

efwe gravatar imageefwe ( 2013-12-25 02:57:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-12-20 02:28:00 -0500

Seen: 378 times

Last updated: Dec 24 '13