관리-도구
편집 파일: hpssm.cpython-39.opt-1.pyc
a -�_g� � @ s2 d dl Z d dlmZmZmZ G dd� dee�ZdS )� N)�Plugin�IndependentPlugin� PluginOptc @ s@ e Zd ZdZdZdZdZdZedddd �gZ d d� 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)�systemZstorageZhardware)Zilorest�ssacliZssaducli�debugFzcapture debug data)�defaultZdescc s� d� dg}g d��| � � fdd�|D �� t�d��� d }| �|�}g }|d d krp�fd d�|d �� D �}� d �| � ��fd d�|D �� | �� }| j d|� d�dd� | �d�r�| �|� d S )Nr zctrl all show status)zarray all show detailzld all showzld all show detailzpd all showzpd all show detailzshow detailc s g | ]}� � d |� ��qS �� � )�.0Zsubcmd)�cmdr �</usr/lib/python3.9/site-packages/sos/report/plugins/hpssm.py� <listcomp>- � zHpssm.setup.<locals>.<listcomp>z#^HP[E] (.*) in Slot ([0123456789]+)z ctrl all show config detail�statusr c s$ g | ]}� � |�}|r|�d ��qS )� )�search�group)r �line�m)�patternr r r 5 s ��outputz ctrl slot=c s( g | ] }� D ]}�� |� d |� ��qqS r r )r ZslotZslot_subcmd)�slot_subcmds�ssacli_ctrl_slot_cmdr r r : s �zssaducli -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 )r r r r r �setup s8 �� ��� � zHpssm.setupc C s | j d|� �|dd� dS )z Collect debug logs z3ilorest serverlogs --selectlog=AHS --directorypath=zilorest.log)Zrunatr N)r )r"