~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/api/openstack/compute/image_metadata.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        if 'metadata' in body:
65
65
            for key, value in body['metadata'].iteritems():
66
66
                image['properties'][key] = value
67
 
        common.check_img_metadata_quota_limit(context, image['properties'])
 
67
        common.check_img_metadata_properties_quota(context,
 
68
                                                   image['properties'])
68
69
        self.image_service.update(context, image_id, image, None)
69
70
        return dict(metadata=image['properties'])
70
71
 
88
89
 
89
90
        image = self._get_image(context, image_id)
90
91
        image['properties'][id] = meta[id]
91
 
        common.check_img_metadata_quota_limit(context, image['properties'])
 
92
        common.check_img_metadata_properties_quota(context,
 
93
                                                   image['properties'])
92
94
        self.image_service.update(context, image_id, image, None)
93
95
        return dict(meta=meta)
94
96
 
98
100
        context = req.environ['nova.context']
99
101
        image = self._get_image(context, image_id)
100
102
        metadata = body.get('metadata', {})
101
 
        common.check_img_metadata_quota_limit(context, metadata)
 
103
        common.check_img_metadata_properties_quota(context, metadata)
102
104
        image['properties'] = metadata
103
105
        self.image_service.update(context, image_id, image, None)
104
106
        return dict(metadata=metadata)