U
    -_g                     @   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 rtd}|d  D ]*}|d}||d rh||d  qh|D ]4}| d|  | d|  | d|  q|  d}|d dksd S |d sd S d}|  |}	|	d dks|	d sd S |d  D ]j}d|kr*td|}|d d\}
}|	d  D ].}||krb|d}| d|d   qb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 ziprconfig -c show-battery-info ziprconfig -c show-perf Z	Enclosurez\s+   /ziprconfig -c query-ses-mode )	Zcollect_cmd_outputr   Zadd_cmd_outputrecompile
splitlinessplitsearchappend)selfZ	show_ioasZdevicesZdevlineZtempZdeviceZshow_configZshow_alt_configZ	altconfig_Z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   r   <module>   s   