~jaypipes/+junk/creiht-paste-deploy

« back to all changes in this revision

Viewing changes to glance/client.py

  • Committer: Tarmac
  • Author(s): Rick Harris
  • Date: 2010-12-23 19:41:59 UTC
  • mfrom: (27.1.2 use_datetime_obj)
  • Revision ID: tarmac-20101223194159-304tpg996wuo6mwf
Converts timestamp attributes to datetime objects before persisting.

Refactors image_update and image_create to use the same basic code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
            headers['content-type'] = 'application/octet-stream'
256
256
        else:
257
257
            body = None
258
 
        
 
258
 
259
259
        res = self.do_request("POST", "/images", body, headers)
260
260
        data = json.loads(res.read())
261
261
        return data['image']['id']