@classmethod
    def create_common_metadata(cls, plugin, attributes, enabled=None):
        metadata = attributes.setdefault('metadata', {
            'class': 'plugin',
            'toggleable': True,
            'weight': 70
        })
        metadata['label'] = plugin.title
        if enabled is None:
            enabled = plugin.enabled
        metadata['enabled'] = enabled or metadata.get('enabled', False)
Create common metadata attribute for all versions of plugin.
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/plugins/manager.py/PluginManager.create_common_metadata