a
]i @ sl d dl Z ddlmZ ddlT d dlZd dlmZ d dlm Z d dl
Z
d dlZej
ZG dd dejZdS ) N )hotplug)*)commandsc s e Zd ZdZ fddZ fddZdd Zedd Zd
d Z dd
Z
fddZ fddZ fddZ
edd Zdd Zdd Zdd Zdd Zdd Zed d!d"d#d$ Zed d(d&d'Z ZS ))SCSIHostPlugina
Tunes options for SCSI hosts.
The plug-in sets Aggressive Link Power Management (ALPM) to the value specified
by the [option]`alpm` option. The option takes one of four values:
`min_power`, `med_power_with_dipm`, `medium_power` and `max_performance`.
NOTE: ALPM is only available on SATA controllers that use the Advanced
Host Controller Interface (AHCI).
.ALPM setting when extended periods of idle time are expected
====
----
[scsi_host]
alpm=med_power_with_dipm
----
====
c s" t t| j|i | t | _d S N)superr __init__r _cmd)selfargskwargs __class__ B/usr/lib/python3.9/site-packages/tuned/plugins/plugin_scsi_host.pyr s zSCSIHostPlugin.__init__c sR t t| d| _t | _| jdD ]}| |r(| j |j
q(t | _d S )NTscsi)r r
_init_devicesZ_devices_supportedsetZ
_free_devices_hardware_inventoryZget_devices_device_is_supportedaddZsys_nameZ_assigned_devicesr devicer r r r % s
zSCSIHostPlugin._init_devicesc s fdd|D S )Nc s g | ]} j d |qS )r )r Z
get_device).0xr r r