Viewing File: /usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyo

ó
æ”\c@sWddlmZddljZddlZejjƒZdej	fd„ƒYZ	dS(i(tbaseiÿÿÿÿNtPlugincBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„ZRS(s:
	Base class for plugins with device hotpluging support.
	cOstt|ƒj||ŽdS(N(tsuperRt__init__(tselftargstkwargs((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyRscCs!tt|ƒjƒ|jƒdS(N(RRtcleanupt_hardware_events_cleanup(R((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyRscCs
tƒ‚dS(N(tNotImplementedError(R((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt_hardware_events_initscCs
tƒ‚dS(N(R	(R((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyRscCs|jƒdS(N(R
(R((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt
_init_devicesscCsd|dkr0tjd|jƒ|j|ƒn0|dkr`tjd|jƒ|j|ƒndS(Ntaddsdevice '%s' addedtremovesdevice '%s' removed(tlogtinfotsys_namet_add_devicet_remove_device(Rteventtdevice((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt_hardware_events_callbackscCs|j}||j|jBkr#dSxèt|jjƒƒD]°\}}t|j||gƒƒdkr9tj	d||fƒ|jj
|ƒ|j||jd|gƒ|j
||ƒ|j||jd|gƒ|jj
|ƒPq9q9Wtjd|ƒ|jj
|ƒdS(Nis!instance %s: adding new device %stapplysno instance wants %s(Rt_assigned_devicest
_free_devicestlistt
_instancestitemstlent_get_matching_devicesRRRt_call_device_scriptt
script_pret_added_device_apply_tuningtscript_posttprocessed_devicestdebug(RRtdevice_namet
instance_nametinstance((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR$s	"!cCs÷|j}||j|jBkr#dSxÍt|jjƒƒD]¦}||jkr9|j||jd|gƒ|j	||ƒ|j||j
d|gƒ|jj|ƒt|jƒt|j
ƒdk|_|jj|ƒPq9q9W|jj|ƒdS(Ntunapplyi(RRRRRtvaluesR"RR!t_removed_device_unapply_tuningRR
Rtassigned_devicestactive(RRR$R&((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR6s	cCsN|j||gƒ|jrJ|jjtjtjƒrJ|j||ƒndS(N(t_execute_all_device_commandsthas_dynamic_tuningt_global_cfgtgettconststCFG_DYNAMIC_TUNINGtCFG_DEF_DYNAMIC_TUNINGt_instance_apply_dynamic(RR&R$((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR Js$cCsN|jr7|jjtjtjƒr7|j||ƒn|j||gƒdS(N(R-R.R/R0R1R2t_instance_unapply_dynamict_cleanup_all_device_commands(RR&R$((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyR)Os$(
t__name__t
__module__t__doc__RRR
RRRRRR R)(((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyRs									(
tRttuned.constsR0t
tuned.logsttunedtlogsR/RR(((s9/usr/lib/python2.7/site-packages/tuned/plugins/hotplug.pyt<module>s
Back to Directory File Manager