how to specify project for server creation through compute REST API ?

Asked by Roderick SUMBERS

I have a user allowed to work on 2 different projects.

When using EUCA-RUN-INSTANCES, it is possible to specify into which project the user wants to create a new server, through the ":project45" suffix in the EC2_ACCESSKEY

Question is : how through the COMPUTE REST API is it possible to specify project when issuing a command (POST in servers, GET in servers...)

is there an optionnal parameter not described yet in OpenStack Compute Dev Guide API document ? currently nova decides on its own into which project the server is added (if the user has only one project, it works OK, but when my user has several, the servers are always created in the first project of the user)

best regards to all,

Roderick.

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

The compute rest api doesn't currently support multitenancy. In other words, there is a one to one relationship between users and projects through that api. This will be changing as we integrate a new auth system over the course of the diablo release.

Vish

On May 13, 2011, at 1:01 AM, Roderick SUMBERS wrote:

> Question #157317 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/157317
>
> Description changed to:
> I have a user allowed to work on 2 different projects.
>
> When using EUCA-RUN-INSTANCES, it is possible to specify into which
> project the user wants to create a new server, through the ":project45"
> suffix in the EC2_ACCESSKEY
>
> Question is : how through the COMPUTE REST API is it possible to specify
> project when issuing a command (POST in servers, GET in servers...)
>
> is there an optionnal parameter not described yet in OpenStack Compute
> Dev Guide API document ? currently nova decides on its own into which
> project the server is added (if the user has only one project, it works
> OK, but when my user has several, the servers are always created in the
> first project of the user)
>
> best regards to all,
>
> Roderick.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

FYI, there is a proposed patch here that would allow you to use a different project through the REST api.

https://code.launchpad.net/~usrleon/nova/nova-api-creds/+merge/59916

It is untested so use at your own risk.

On May 13, 2011, at 1:01 AM, Roderick SUMBERS wrote:

> Question #157317 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/157317
>
> Description changed to:
> I have a user allowed to work on 2 different projects.
>
> When using EUCA-RUN-INSTANCES, it is possible to specify into which
> project the user wants to create a new server, through the ":project45"
> suffix in the EC2_ACCESSKEY
>
> Question is : how through the COMPUTE REST API is it possible to specify
> project when issuing a command (POST in servers, GET in servers...)
>
> is there an optionnal parameter not described yet in OpenStack Compute
> Dev Guide API document ? currently nova decides on its own into which
> project the server is added (if the user has only one project, it works
> OK, but when my user has several, the servers are always created in the
> first project of the user)
>
> best regards to all,
>
> Roderick.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Can you help with this problem?

Provide an answer of your own, or ask Roderick SUMBERS for more information if necessary.

To post a message you must log in.