관리-도구
편집 파일: repository.cpython-36.pyc
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 �baseZPlugin� _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 s6 t || j�st�tjd| � |j� | jj|� d S )Nzremoving plugin %s)� isinstancer �AssertionErrorr r Zcleanupr �remove)r Zpluginr r r �delete( s zRepository.delete) �__name__� __module__�__qualname__r �propertyr r r r"