'Transform the composite ring attributes to a dict. See
:class:`CompositeRingBuilder` for details of the persisted metadata
format.
:return: a composite ring metadata dict'

def to_dict(self):

    id2builder_file = dict(((component['id'], self._builder_files[i]) for (i, component) in enumerate(self.components)))
    return {'components': self.components, 'component_builder_files': id2builder_file, 'version': self.version}
