File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/iprconfig.cpython-38.pyc
U
i��dC � @ s2 d dl Z d dlmZmZmZ G dd� dee�ZdS )� N)�Plugin�IndependentPlugin�SoSPredicatec @ s$ e Zd ZdZdZdZdZdd� ZdS )� IprConfigz8IBM Power RAID storage adapter configuration informationZ iprconfig)Ziprutils)zppc64.*c
C s� | j dt| dgd�d�}|d dks(d S | �ddd d
dddd
ddg
� g }|d r�t�d�}|d �� D ]*}|�d�}|�|d �rh|�|d � qh|D ].}| �d| � | �d| � | �d| � q�| � d�}|d dks�d S |d s�d S d}| � |�} | d dk�sd S | d �sd S |d �� D ]h}d|k�r(t�d|�}|d �d�\}
}| d �� D ],}||k�r`|�d�}| �d|d � �q`�q(d S )Nziprconfig -c show-ioasZsg)Zkmods)ZpredZstatusr ziprconfig -c show-configziprconfig -c show-alt-configziprconfig -c show-arraysziprconfig -c show-jbod-disksziprconfig -c show-hot-sparesziprconfig -c show-af-disksziprconfig -c show-all-af-disksziprconfig -c show-slotsziprconfig -c dump�output� ziprconfig -c show-details %sz!iprconfig -c show-battery-info %sziprconfig -c show-perf %sZ Enclosurez\s+� �/ziprconfig -c query-ses-mode %s) Zcollect_cmd_outputr Zadd_cmd_output�re�compile�
splitlines�split�search�append)
�selfZ show_ioasZdevices�p�lineZtempZdeviceZshow_configZshow_alt_configZ altconfigZpciZscsiZalt_line� r �>/usr/lib/python3/dist-packages/sos/report/plugins/iprconfig.py�setup sd ��
�zIprConfig.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZpackagesZ
architecturesr r r r r r s
r )r
Zsos.report.pluginsr r r r r r r r �<module> s