def fix_wrong_volume_glance_metadata(meta, wrong_glance_metadata):
    volume_glance_metadata_t = Table('volume_glance_metadata', meta, autoload=True)
    for volume_glance_metadata_id in wrong_glance_metadata:
        log.info('-- action: deleting volume_glance_metadata id: %s', volume_glance_metadata_id)
        now = datetime.datetime.utcnow()
        delete_volume_glance_metadata_q = volume_glance_metadata_t.update().where((volume_glance_metadata_t.c.id == volume_glance_metadata_id)).values(updated_at=now, deleted_at=now, deleted=1)
        delete_volume_glance_metadata_q.execute()
def fix_wrong_volume_glance_metadata(meta, wrong_glance_metadata):
    volume_glance_metadata_t = Table('volume_glance_metadata', meta, autoload=True)
    for volume_glance_metadata_id in wrong_glance_metadata:
        log.info('-- action: deleting volume_glance_metadata id: %s', volume_glance_metadata_id)
        now = datetime.datetime.utcnow()
        delete_volume_glance_metadata_q = volume_glance_metadata_t.update().where((volume_glance_metadata_t.c.id == volume_glance_metadata_id)).values(updated_at=now, deleted_at=now, deleted=1)
        delete_volume_glance_metadata_q.execute()