~ttx/nova/lp724325

« back to all changes in this revision

Viewing changes to nova/volume/api.py

  • Committer: Ken Pepple
  • Date: 2011-02-21 21:29:41 UTC
  • mfrom: (708 nova)
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: ken.pepple@gmail.com-20110221212941-6n81tpeyna90erdb
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
        options = {
51
51
            'size': size,
52
 
            'user_id': context.user.id,
 
52
            'user_id': context.user_id,
53
53
            'project_id': context.project_id,
54
54
            'availability_zone': FLAGS.storage_availability_zone,
55
55
            'status': "creating",
85
85
        return self.db.volume_get(context, volume_id)
86
86
 
87
87
    def get_all(self, context):
88
 
        if context.user.is_admin():
 
88
        if context.is_admin:
89
89
            return self.db.volume_get_all(context)
90
90
        return self.db.volume_get_all_by_project(context, context.project_id)
91
91