ok
Direktori : /lib/python3.6/site-packages/tuned/monitors/__pycache__/ |
Current File : //lib/python3.6/site-packages/tuned/monitors/__pycache__/repository.cpython-36.pyc |
3 �<�e? � @ s@ d dl Zd dlZd dlmZ ejj� ZdgZG dd� de�Z dS )� N)�PluginLoader� Repositoryc s@ e Zd Z� fdd�Zedd� �Zdd� Zdd� Zd d � Z� Z S )r c s t t| �j� t� | _d S )N)�superr �__init__�set� _monitors)�self)� __class__� � /usr/lib/python3.6/repository.pyr s zRepository.__init__c C s | j S )N)r )r r r r �monitors s zRepository.monitorsc C s d| _ d| _tjj| _d S )Nztuned.monitorsZmonitor_)Z _namespace�_prefix�tunedr ZMonitor� _interface)r r r r �_set_loader_parameters s z!Repository._set_loader_parametersc C s0 t jd| � | j|�}||�}| jj|� |S )Nzcreating monitor %s)�log�debugZload_pluginr �add)r Zplugin_nameZdevicesZmonitor_clsZmonitor_instancer r r �create s zRepository.createc C s( t || j�st�|j� | jj|� d S )N)� isinstancer �AssertionErrorZcleanupr �remove)r Zmonitorr r r �delete s zRepository.delete) �__name__� __module__�__qualname__r �propertyr r r r � __classcell__r r )r r r s ) Z tuned.logsr Ztuned.monitorsZtuned.utils.plugin_loaderr Zlogs�getr �__all__r r r r r �<module> s