| Current Path : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
| Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/iprconfig.cpython-38.pyc |
U
-�_g � @ 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 ]4}| �d|� �� | �d|� �� | �d|� �� q�| � d�}|d dks�d S |d s�d S d}| � |�} | d dk�s| d �sd S |d �� D ]j}d|k�r*t�d|�}|d �d�\}
}| d �� D ].}||k�rb|�d�}| �d|d � �� �qb�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 ziprconfig -c show-battery-info ziprconfig -c show-perf Z Enclosurez\s+� �/ziprconfig -c query-ses-mode ) Zcollect_cmd_outputr Zadd_cmd_output�re�compile�
splitlines�split�search�append)
�selfZ show_ioasZdevicesZdev�lineZtempZdeviceZshow_configZshow_alt_configZ altconfig�_ZscsiZalt_line� r �>/usr/lib/python3/dist-packages/sos/report/plugins/iprconfig.py�setup s\ ��
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