'Adds an image with supplied name and returns the newly-created
image identifier.'

def add_image(self, name):

    image_data = ('*' * FIVE_KB)
    headers = minimal_headers(name)
    path = ('http://%s:%d/v1/images' % ('127.0.0.1', self.api_port))
    http = httplib2.Http()
    (response, content) = http.request(path, 'POST', headers=headers, body=image_data)
    self.assertEqual(http_client.CREATED, response.status)
    data = jsonutils.loads(content)
    self.assertEqual(hashlib.md5(image_data).hexdigest(), data['image']['checksum'])
    self.assertEqual(FIVE_KB, data['image']['size'])
    self.assertEqual(name, data['image']['name'])
    self.assertTrue(data['image']['is_public'])
    return data['image']['id']
