def fix_metadata(self, data):
        data = copy.deepcopy(data)
        vol_ids = [v['id'] for v in data['volumes']]
        migrated = self.migration[utils.IMAGE_RESOURCE]

        for table in METADATA_TABLES:
            metadata = data.get(table, {})
            metadata = [m for m in metadata if m['volume_id'] in vol_ids]

            for m in metadata:
                if m['key'] == 'image_id':
                    m['value'] = migrated.migrated_id(m['value'])
            data[table] = metadata
        return data
Fix metadata table.
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/os/actions/cinder_database_manipulation.py/CopyVolumes.fix_metadata