diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-10 16:56:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-10 16:56:05 +0000 |
| commit | a3dd23f59fa2fd6fa010908f46525509519bf569 (patch) | |
| tree | e620bd5d7ffb2de34bfb1049b1180b8b0bdec0f5 /nova/api | |
| parent | 7da31169d7390227590a3cc5d35d1c0495b688ed (diff) | |
| parent | 7ba533f069aa95c73524f7f0a398a216dfbcdbb3 (diff) | |
| download | nova-a3dd23f59fa2fd6fa010908f46525509519bf569.tar.gz nova-a3dd23f59fa2fd6fa010908f46525509519bf569.tar.xz nova-a3dd23f59fa2fd6fa010908f46525509519bf569.zip | |
Merge "Flavor Extra Specs should require admin privileges"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/flavorextraspecs.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/api/openstack/compute/contrib/flavorextraspecs.py b/nova/api/openstack/compute/contrib/flavorextraspecs.py index 12cc7d9ed..1349abe78 100644 --- a/nova/api/openstack/compute/contrib/flavorextraspecs.py +++ b/nova/api/openstack/compute/contrib/flavorextraspecs.py @@ -62,13 +62,13 @@ class FlavorExtraSpecsController(object): def index(self, req, flavor_id): """Returns the list of extra specs for a given flavor.""" context = req.environ['nova.context'] - authorize(context) + authorize(context, action='index') return self._get_extra_specs(context, flavor_id) @wsgi.serializers(xml=ExtraSpecsTemplate) def create(self, req, flavor_id, body): context = req.environ['nova.context'] - authorize(context) + authorize(context, action='create') self._check_body(body) specs = body.get('extra_specs') try: @@ -82,7 +82,7 @@ class FlavorExtraSpecsController(object): @wsgi.serializers(xml=ExtraSpecTemplate) def update(self, req, flavor_id, id, body): context = req.environ['nova.context'] - authorize(context) + authorize(context, action='update') self._check_body(body) if id not in body: expl = _('Request body and URI mismatch') @@ -102,7 +102,7 @@ class FlavorExtraSpecsController(object): def show(self, req, flavor_id, id): """Return a single extra spec item.""" context = req.environ['nova.context'] - authorize(context) + authorize(context, action='show') specs = self._get_extra_specs(context, flavor_id) if id in specs['extra_specs']: return {id: specs['extra_specs'][id]} @@ -112,7 +112,7 @@ class FlavorExtraSpecsController(object): def delete(self, req, flavor_id, id): """Deletes an existing extra spec.""" context = req.environ['nova.context'] - authorize(context) + authorize(context, action='delete') db.instance_type_extra_specs_delete(context, flavor_id, id) |
