3 À<×eú ã @ s@ d dl mZ d dlZd dlZejjƒ ZdgZG dd„ deƒZ dS )é )ÚPluginLoaderNÚ Repositoryc s@ e Zd Z‡ fdd„Zedd„ ƒZdd„ Zdd„ Zd d „ Z‡ Z S )r c sJ t t| ƒjƒ tƒ | _|| _|| _|| _|| _|| _ || _ || _|| _d S )N) Úsuperr Ú__init__ÚsetÚ_pluginsÚ_monitor_repositoryÚ_storage_factoryÚ_hardware_inventoryÚ_device_matcherÚ_device_matcher_udevÚ_plugin_instance_factoryÚ_global_cfgÚ _variables) ÚselfZmonitor_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZplugin_instance_factoryZ global_cfgÚ variables)Ú __class__© ú /usr/lib/python3.6/repository.pyr s zRepository.__init__c C s | j S )N)r )r r r r Úplugins s zRepository.pluginsc C s d| _ d| _tjjj| _d S )Nz tuned.pluginsZplugin_)Z _namespaceÚ_prefixÚtunedr ÚbaseZPluginZ _interface)r r r r Ú_set_loader_parameters s z!Repository._set_loader_parametersc C sN t jd| ƒ | j|ƒ}|| j| j| j| j| j| j| j | j ƒ}| jj|ƒ |S )Nzcreating plugin %s) ÚlogÚdebugZload_pluginr r r r r r r r r Úadd)r Zplugin_nameZ plugin_clsZplugin_instancer r r Úcreate s zRepository.createc C s&