~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/image/s3.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-08-16 14:04:11 UTC
  • mto: This revision was merged to the branch mainline in revision 84.
  • Revision ID: package-import@ubuntu.com-20120816140411-0mr4n241wmk30t9l
Tags: upstream-2012.2~f3
ImportĀ upstreamĀ versionĀ 2012.2~f3

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
 
282
282
            def _update_image_state(context, image_uuid, image_state):
283
283
                metadata = {'properties': {'image_state': image_state}}
284
 
                headers = {'x-glance-registry-purge-props': False}
285
 
                self.service.update(context, image_uuid, metadata, None,
286
 
                                    headers)
 
284
                self.service.update(context, image_uuid, metadata,
 
285
                                    purge_props=False)
287
286
 
288
287
            def _update_image_data(context, image_uuid, image_data):
289
288
                metadata = {}
290
 
                headers = {'x-glance-registry-purge-props': False}
291
289
                self.service.update(context, image_uuid, metadata, image_data,
292
 
                                    headers)
 
290
                                    purge_props=False)
293
291
 
294
292
            _update_image_state(context, image_uuid, 'downloading')
295
293
 
354
352
 
355
353
            metadata = {'status': 'active',
356
354
                        'properties': {'image_state': 'available'}}
357
 
            headers = {'x-glance-registry-purge-props': False}
358
 
            self.service.update(context, image_uuid, metadata, None, headers)
 
355
            self.service.update(context, image_uuid, metadata,
 
356
                    purge_props=False)
359
357
 
360
358
            shutil.rmtree(image_path)
361
359