Your IP : 18.191.192.113


Current Path : /usr/lib/python3.6/site-packages/tuned/profiles/functions/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/tuned/profiles/functions/__pycache__/repository.cpython-36.pyc

3

�<�e�@sTddlmZddlmZddlZddljZddlm	Z	ej
j�ZGdd�de�Z
dS)�)�PluginLoader�)�baseN)�commandscsHeZdZ�fdd�Zedd��Zdd�Zdd�Zd	d
�Zdd�Z	�Z
S)
�
Repositorycstt|�j�i|_dS)N)�superr�__init__�
_functions)�self)�	__class__�� /usr/lib/python3.6/repository.pyrszRepository.__init__cCs|jS)N)r	)r
rrr
�	functionsszRepository.functionscCs d|_tj|_tjjjj|_	dS)Nztuned.profiles.functions)
Z
_namespace�constsZFUNCTION_PREFIX�_prefix�tunedZprofilesrrZFunction�
_interface)r
rrr
�_set_loader_parameterssz!Repository._set_loader_parameterscCs,tjd|�|j|�}|�}||j|<|S)Nzcreating function %s)�log�debugZload_pluginr	)r
�
function_nameZfunction_clsZfunction_instancerrr
�creates


zRepository.createcCs||jkr|j|�S|j|S)N)r	r)r
rrrr
�	load_func!s

zRepository.load_funccCsNt||j�st�tjd|�x*t|jj��D]\}}||kr.|j|=q.WdS)Nzremoving function %s)�
isinstancer�AssertionErrorrr�listr	�items)r
Zfunction�k�vrrr
�delete&s
zRepository.delete)�__name__�
__module__�__qualname__r�propertyrrrrr�
__classcell__rr)rr
r	s	r)Ztuned.utils.plugin_loaderr�rZ
tuned.logsrZtuned.constsrZtuned.utils.commandsrZlogs�getrrrrrr
�<module>s



?>