Merge lp://qastaging/~cerberus/nova/instance_admin_for_user into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Matt Dietz
Status: Work in progress
Proposed branch: lp://qastaging/~cerberus/nova/instance_admin_for_user
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 97 lines (+32/-1)
4 files modified
nova/api/openstack/__init__.py (+3/-1)
nova/api/openstack/accounts.py (+9/-0)
nova/api/openstack/wsgi.py (+1/-0)
nova/tests/api/openstack/test_accounts.py (+19/-0)
To merge this branch: bzr merge lp://qastaging/~cerberus/nova/instance_admin_for_user
Reviewer Review Type Date Requested Status
Dan Prince (community) Needs Information
Trey Morris (community) Approve
Brian Lamar (community) Needs Information
Review via email: mp+64248@code.qastaging.launchpad.net

Commit message

Implements a projects admin controller in the Openstack API. Includes all basic RESTful functionality plus the ability for an admin to create an instance inside of any project.

Description of the change

Implements a projects admin controller in the Openstack API. Includes all basic RESTful functionality plus the ability for an admin to create an instance inside of any project.

To post a comment you must log in.
Revision history for this message
Brian Lamar (blamar) wrote :

This seems really straight forward, the only questions I have are not really about the code:

1) We have a file "accounts.py" in the same directory which seems to cover a lot of the same thing with a different name. Should we get rid of the concept of 'accounts' for now? I know that there has been a naming battle between projects/accounts.

2) Does creating a project require you to be an admin of the project? Seems like a chicken/egg scenario, but it's been a while since I've looked at the auth code...maybe admin users aren't linked to a project but are just general administrators for the entire system? If you could impart some knowledge on me that would be helpful. :)

Crazy minor nitpicks:
 -Line 90: Remove blank line
 -Line 162: Do you need that import?
 -Line 339: Do you need that import?

review: Needs Information
Revision history for this message
Matt Dietz (cerberus) wrote :

1) I completely missed the accounts controller. I suspect we need that functionality the way it is as per Dragon's multi-tenant accounting work

2) I'm pretty sure an "admin" in the global sense can create a project and assign any nova admin as the project manager. As far as what's proper, I'm not actually sure.

I'll set about merging my change into the accounts controller and dropping the projects controller out.

Revision history for this message
Trey Morris (tr3buchet) wrote :

setting to work in progress..

review: Needs Fixing
Revision history for this message
Matt Dietz (cerberus) wrote :

trey: you're getting a little jumpy. I already made the changes and flipped it back to needs review :-)

Revision history for this message
Trey Morris (tr3buchet) wrote :

Oops, guess I missed that. I'm not seeing any of this in the history.. weird.

Looks good.
Just trying to understand, would be more accurate to say you're creating an instance for an account? Or are all accounts linked to users?

review: Approve
Revision history for this message
Matt Dietz (cerberus) wrote :

For the record, the branch is misnamed now. As per Brian's suggestion, I linked the instance create to an account. All instances have both a project_id and user_id field, yet user_ids are also part of projects. As such, I created the instance for the project/account instead of the user.

Revision history for this message
Brian Lamar (blamar) wrote :

Sorry for the delay here, can you add a test to make sure if you're not a member of that account, you can't create instances for it? I looks like if you're an admin of any project you can create instances in any other project currently?

Revision history for this message
Dan Prince (dan-prince) wrote :

Hi Matt. The dist sched-4 merge went in and added the new CreateInstanceHelper class in the openstack api code. Would using that be a better option here?

review: Needs Information
Revision history for this message
Matt Dietz (cerberus) wrote :

Brian: Can do, and yes, as an admin, right now you can. I was hoping to punt whether or not that's a good idea to the auth system when it finally lands

Dan: Yes, absolutely. Just haven't had a time to come back to it, yet

1178. By Matt Dietz

Merge from trunk

Unmerged revisions

1178. By Matt Dietz

Merge from trunk

1177. By Matt Dietz

Merge prop fixes

1176. By Matt Dietz

Merge from trunk

1175. By Matt Dietz

Refactored to the accounts controller and removed unnecessary projects controller

1174. By Matt Dietz

Removed superfluous servers include in the users controller

1173. By Matt Dietz

Added tests for the projects controller

1172. By Matt Dietz

Change of direction. Added a projects controller

1171. By Matt Dietz

Merge from remote branch

1170. By Matt Dietz

Merge from other branch

1169. By Matt Dietz

Testing the new route

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.