U
    -_gg                     @   s&   d dl mZmZ G dd deeZdS )    )PluginIndependentPluginc                   @   s,   e Zd ZdZdZdZdZdZdZdd Z	d	S )

SeagateSESa  The seagate_ses plugin collect information about all
    connected seagate storage shelves.
    It captures Controller status information, ID, controllers' VPD
    information, Environmental zone, Drive, PHY details, Cooling Module
    and PSU information.
    zSeagate SES statusZseagate_sesiX  )systemZstorageZhardware)Zfwdownloader_megaraidc                    s   |  d}g |d dkr0|d ddd  fddttD }d	 d
ddddddddddddddddg}|D ]8|  fdd|D  |  fdd|D  qxd S )Nzfwdownloader -sesZstatusr   outputz
SES Device   c                    s   g | ]}d  | kr|qS )zVendor ID: SEAGATE ).0i)op_lstr   @/usr/lib/python3/dist-packages/sos/report/plugins/seagate_ses.py
<listcomp>"   s   z$SeagateSES.setup.<locals>.<listcomp>zgetstatus -dZddump_canmgrZddump_cblmgrZddump_drvmgrZ
dumpdrivesZddump_phycountersZddump_pwrmgrZddump_envctrlZenvctrl_fanZenvctrl_zoneZfwstatusZ
getboardidZgetvpdZreport_faultsZverZlogdumpZphydumpzses_reportpage 2c                    s    g | ]}  d  d| qS ) z -CLI r   r	   Zsubcmdcmddevidr   r   r   =   s    c                    s    g | ]}  d  d| qS )r   z -cli r   r   r   r   r   r   A   s    )Zcollect_cmd_outputsplitrangelenZadd_cmd_output)selfresZdevicesZsubcmdsr   )r   r   r   r   setup   sB    


zSeagateSES.setupN)
__name__
__module____qualname____doc__Z
short_descZplugin_nameZplugin_timeoutZprofilesZpackagesr   r   r   r   r   r      s   r   N)Zsos.report.pluginsr   r   r   r   r   r   r   <module>	   s   