

def handle(self, request, data):
    image_id = data['image_id']
    error_updating = _('Unable to update image "%s".')
    if (data['disk_format'] in ['aki', 'ari', 'ami']):
        container_format = data['disk_format']
    else:
        container_format = 'bare'
    meta = {
        'is_public': data['public'],
        'protected': data['protected'],
        'disk_format': data['disk_format'],
        'container_format': container_format,
        'name': data['name'],
        'properties': {
            
        },
    }
    if data['description']:
        meta['properties']['description'] = data['description']
    if data['kernel']:
        meta['properties']['kernel_id'] = image_id['kernel']
    if data['ramdisk']:
        meta['properties']['ramdisk_id'] = data['ramdisk']
    if data['architecture']:
        meta['properties']['architecture'] = data['architecture']
    meta['purge_props'] = False
    try:
        image = api.glance.image_update(request, image_id, **meta)
        messages.success(request, _('Image was successfully updated.'))
        return image
    except Exception:
        exceptions.handle(request, (error_updating % image_id))

dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/project/images_and_snapshots/images/forms.py UpdateImageForm.handle/VarMisuse@152/245 `data`->`image_id`