U
    i©¹dC  ã                   @   s2   d dl Z d dlmZmZmZ G dd„ deeƒZdS )é    N)ÚPluginÚIndependentPluginÚSoSPredicatec                   @   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   s–  | j dt| dgdd}|d dks(d S |  ddd	d
ddddddg
¡ g }|d r”t d¡}|d  ¡ D ]*}| d¡}| |d ¡rh| |d ¡ qh|D ].}|  d| ¡ |  d| ¡ |  d| ¡ q˜|   d¡}|d dksâd S |d sîd S d}|   |¡}	|	d dksd S |	d sd S |d  ¡ D ]h}d|kr(t d|¡}|d  d¡\}
}|	d  ¡ D ],}||kr`| d¡}|  d|d  ¡ q`q(d S )Nziprconfig -c show-ioasZsg)Zkmods)ZpredZstatusr   ziprconfig -c show-configziprconfig -c show-alt-configziprconfig -c show-arraysziprconfig -c show-jbod-disksziprconfig -c show-hot-sparesziprconfig -c show-af-disksziprconfig -c show-all-af-disksziprconfig -c show-slotsziprconfig -c dumpÚoutputú ziprconfig -c show-details %sz!iprconfig -c show-battery-info %sziprconfig -c show-perf %sZ	Enclosurez\s+é   ú/ziprconfig -c query-ses-mode %s)	Zcollect_cmd_outputr   Zadd_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   sd    þö







ÿ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   r   Ú<module>   s   