U
    *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   s†  |   ddddddddd	d
g
¡ |  d¡}|d dks8d S g }|d r†t d¡}|d  ¡ D ]*}| d¡}| |d ¡rZ| |d ¡ qZ|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rP| d¡}|   d|d  ¡ qPqd S )Nziprconfig -c show-configziprconfig -c show-alt-configziprconfig -c show-arraysziprconfig -c show-jbod-disksz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 dumpZstatusr   ÚoutputZsgú 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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   s^    ö








ÿ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   