Sindbad~EG File Manager
3
�f$ � @ s2 d dl Z d dlmZmZmZ G dd� dee�ZdS )� N)�Plugin�IndependentPlugin�SoSPredicatec @ s$ e Zd ZdZdZdZd Zdd� ZdS )
� IprConfigz8IBM Power RAID storage adapter configuration informationZ iprconfig�iprutils�ppc64.*c
C s� | j dt| dgd�d�}|d dks(d S | jddd d
dddd
ddg
� g }|d r�tjd�}x:|d j� D ]*}|jd�}|j|d �rj|j|d � qjW x6|D ].}| jd| � | jd| � | jd| � q�W | j d�}|d dks�d S |d s�d S d}| j |�} | d dk�s| d �r"d S x||d j� D ]l}d|k�r0tjd|�}|d jd�\}
}x<| d j� D ],}||k�rj|jd�}| jd|d � �qjW �q0W 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_ioasZdevicesZdev�lineZtempZdeviceZshow_configZshow_alt_configZ altconfig�_ZscsiZalt_line� r �/usr/lib/python3.6/iprconfig.py�setup sZ
zIprConfig.setupN)r )r )�__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
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists