'Modify the given image with the new data.'

def update(self, context, image_id, image_meta, data=None, purge_props=True):

    sent_service_image_meta = _translate_to_glance(image_meta)
    sent_service_image_meta.pop('id', None)
    sent_service_image_meta['image_id'] = image_id
    try:
        if purge_props:
            all_props = set(self.show(context, image_id)['properties'].keys())
            props_to_update = set(image_meta.get('properties', {}).keys())
            remove_props = list((all_props - props_to_update))
            sent_service_image_meta['remove_props'] = remove_props
        image = self._update_v2(context, sent_service_image_meta, data)
    except Exception:
        _reraise_translated_image_exception(image_id)
    return _translate_from_glance(image)
