HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/hpssm.cpython-36.opt-1.pyc
3

-�_g�
�@s2ddlZddlmZmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPlugin�	PluginOptc@s@eZdZdZdZdZdZdZed
ddd
�gZ	dd�Z
dd�ZdS)�HpssmaG
    This plugin will capture details for each controller from Smart Storage
    Array Administrator, an Array diagnostic report from Smart Storage
    Administrator Diagnostics Utility and, when the plugins debug option is
    enabled will gather the Active Health System log via the RESTful Interface
    Tool (iLOREST).
    zHP Smart Storage ManagementZhpssm�system�storage�hardware�ilorest�ssacli�ssaducli�debugFzcapture debug data)�defaultZdesccs�d�dg}ddddddg�|j�fd	d
�|D��tjd���d}|j|�}g}|d
dkrx�fdd
�|dj�D�}�d�|j��fdd
�|D��|j�}|jd|�d�dd�|jd�r�|j|�dS)Nr
zctrl all show statuszarray all show detailzld all showzld all show detailzpd all showzpd all show detailzshow detailcsg|]}��d|���qS)� �)�.0Zsubcmd)�cmdr�/usr/lib/python3.6/hpssm.py�
<listcomp>-szHpssm.setup.<locals>.<listcomp>z#^HP[E] (.*) in Slot ([0123456789]+)z ctrl all show config detailZstatusrcs,g|]$}�j|�gD]}|r|jd��qqS)�)�search�group)r�line�m)�patternrrr5s�outputz ctrl slot=cs(g|] }�D]}��|�d|���qqS)rr)rZslotZslot_subcmd)�slot_subcmds�ssacli_ctrl_slot_cmdrrr:szssaducli -v -adu -f z/adu-log.zipzssaducli_-v_-adu.log)�suggest_filenamer)�add_cmd_output�re�compileZcollect_cmd_output�
splitlinesZget_cmd_output_pathZ
get_option�do_debug)�selfZsubcmdsZconfig_detail_cmdZ
config_detailZ
ctrl_slots�logpathr)rrrrr�setups6





zHpssm.setupcCs|jd|��|dd�dS)z Collect debug logs z3ilorest serverlogs --selectlog=AHS --directorypath=zilorest.log)ZrunatrN)r)r#r$rrrr"IszHpssm.do_debugN)rrr)r	r
r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesrZoption_listr%r"rrrrr
s*r)rZsos.report.pluginsrrrrrrrr�<module>	s