~ubuntu-branches/ubuntu/quantal/glance/quantal

« back to all changes in this revision

Viewing changes to glance/api/v2/image_access.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-06-01 10:56:09 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20120601105609-dn3nvmxq63eb6gth
Tags: 2012.2~f2~20120531.1560-0ubuntu1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from glance.api.v2 import base
21
21
from glance.common import exception
 
22
from glance.common import utils
22
23
from glance.common import wsgi
23
24
import glance.registry.db.api
24
25
 
42
43
        except exception.NotFound:
43
44
            raise webob.exc.HTTPNotFound()
44
45
 
 
46
    @utils.mutating
45
47
    def create(self, req, image_id, access_record):
46
48
        #TODO(bcwaldon): Refactor these methods so we don't need to
47
49
        # explicitly retrieve a session object here
65
67
        access_record['image_id'] = image_id
66
68
        return self.db_api.image_member_create(req.context, access_record)
67
69
 
 
70
    @utils.mutating
68
71
    def delete(self, req, image_id, tenant_id):
69
72
        #TODO(bcwaldon): Refactor these methods so we don't need to explicitly
70
73
        # retrieve a session object here