o
    O6ufÁ  ã                   @   s*   d dl mZmZmZ G dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginÚ	PluginOptc                   @   sD   e Zd ZdZdZdZdZedddd�gZd	Z	d
Z
dd„ Zdd„ ZdS )ÚDellRACz,Dell Remote Access Controller AdministrationÚdellrac)ÚsystemÚstorageÚhardware)zsrvadmin-idracadm7ÚdebugFzcapture support assist data)ÚdefaultÚdescz /opt/dell/srvadmin/bin/idracadm7Ú	idracadm7c                 C   sJ   dD ]}| j | j› d|› �| j› d|› �d� q|  d¡r#|  ¡  d S d S )N)Ú	getniccfgÚ
getsysinfoú Ú_)Úsuggest_filenamer
   )Úadd_cmd_outputÚracadmÚprefixÚ
get_optionÚdo_debug)ÚselfÚsubcmd© r   ú</usr/lib/python3/dist-packages/sos/report/plugins/dellrac.pyÚsetup   s   þ
ÿzDellRAC.setupc                 C   s^   z|   ¡ }W n ty   | j dd�}Y nw d}| j| j› d|› d�|| j› d|› �d� dS )	zÛ
        Ensure the sos_commands/dellrac directory does exist in either case
        as we will need to run the command at that dir, and also ensure
        logpath is properly populated in either case as well.
        F)Úmakezsupportassist collect -fr   z support.zipr   )Úrunatr   N)Úget_cmd_output_pathÚFileExistsErrorr   r   r   )r   Úlogpathr   r   r   r   r   $   s   ÿ
þzDellRAC.do_debugN)Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesÚpackagesr   Úoption_listr   r   r   r   r   r   r   r   r      s    ÿ	r   N)Úsos.report.pluginsr   r   r   r   r   r   r   r   Ú<module>   s   