HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/hpssm.cpython-39.pyc
a

^��c�
�@s2ddlmZmZmZddlZGdd�dee�ZdS)�)�Plugin�IndependentPlugin�	PluginOptNc@s@eZdZdZdZdZdZdZedddd	�gZ	d
d�Z
dd
�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)�systemZstorageZhardware)Zilorest�ssacliZssaducli�debugFzcapture debug data)�defaultZdesccs�d�dg}gd��|��fdd�|D��t�d���d}|�|�}g}|dd	krp�fd
d�|d��D�}�d�|���fd
d�|D��|��}|jd|dd�|�d�r�|�|�dS)Nrzctrl all show status)zarray all show detailzld all showzld all show detailzpd all showzpd all show detailzshow detailcsg|]}d�|f�qS)z%s %s�)�.0Zsubcmd)�cmdr
�</usr/lib/python3.9/site-packages/sos/report/plugins/hpssm.py�
<listcomp>-�zHpssm.setup.<locals>.<listcomp>z,^HP.*Smart Array (.*) in Slot ([0123456789])z ctrl all show config detail�statusrcs$g|]}��|�}|r|�d��qS)�)�search�group)r�line�m)�patternr
r
r5s��outputz ctrl slot=cs$g|]}�D]}d�||f�qqS)z%s%s %sr
)rZslotZslot_subcmd)�slot_subcmds�ssacli_ctrl_slot_cmdr
r
r:s��z"ssaducli -v -adu -f %s/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
)rrrrr
�setups8��



���
�
zHpssm.setupcCs|jd||dd�dS)Nz5ilorest serverlogs --selectlog=AHS --directorypath=%szilorest.log)Zrunatr)r)r r!r
r
r
rMs�zHpssm.do_debugN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesrZoption_listr"rr
r
r
r
r
s�.r)Zsos.report.pluginsrrrrrr
r
r
r
�<module>	s