o
    *bä  ã                   @   s.   d dl Z d dlmZmZ G dd„ deeƒZdS )é    N)ÚPluginÚIndependentPluginc                   @   s$   e Zd ZdZdZdZdZdd„ ZdS )Ú	IprConfigz8IBM Power RAID storage adapter configuration informationZ	iprconfig)Ziprutils)zppc64.*c                 C   sl  |   g d¢¡ |  d¡}|d dksd S g }|d r;t d¡}|d  ¡ D ]}| d¡}| |d ¡r:| |d ¡ q%|D ]}|   d| ¡ |   d	| ¡ |   d
| ¡ q=|  d¡}|d dksbd S |d shd S d}|  |¡}	|	d dkswd S |	d s}d S |d  ¡ D ]0}d|v r³t d|¡}|d  d¡\}
}|	d  ¡ D ]}||v r²| d¡}|   d|d  ¡ qžqƒd S )N)
úiprconfig -c show-configúiprconfig -c show-alt-configziprconfig -c show-arraysziprconfig -c show-jbod-disksúiprconfig -c show-ioasziprconfig -c show-hot-sparesziprconfig -c show-af-disksziprconfig -c show-all-af-disksziprconfig -c show-slotsziprconfig -c dumpr   Ústatusr   ÚoutputZsgú ziprconfig -c show-details %sz!iprconfig -c show-battery-info %sziprconfig -c show-perf %sr   r   Z	Enclosurez\s+é   ú/ziprconfig -c query-ses-mode %s)Zadd_cmd_outputZcollect_cmd_outputÚreÚcompileÚ
splitlinesÚsplitÚsearchÚappend)ÚselfZ	show_ioasZdevicesÚpÚlineZtempZdeviceZshow_configZshow_alt_configZ	altconfigZpciZscsiZalt_line© r   ú>/usr/lib/python3/dist-packages/sos/report/plugins/iprconfig.pyÚsetup   sN   


€


ÿ€÷zIprConfig.setupN)Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_nameZpackagesZarchitecturesr   r   r   r   r   r      s    r   )r   Zsos.report.pluginsr   r   r   r   r   r   r   Ú<module>   s   
