U
    -_g                     @   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 AdministrationZdellrac)systemZstorageZhardware)zsrvadmin-idracadm7debugFzcapture support assist data)defaultZdescz /opt/dell/srvadmin/bin/idracadm7Z	idracadm7c                 C   sF   dD ]*}| j | j d| | j d| d q| drB|   d S )N)Z	getniccfgZ
getsysinfo _)suggest_filenamer   )add_cmd_outputracadmprefixZ
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k
r,   | j dd}Y nX 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)Zmakezsupportassist collect -fr	   z support.zipr
   )Zrunatr   N)Zget_cmd_output_pathFileExistsErrorr   r   r   )r   Zlogpathr   r   r   r   r   $   s     zDellRAC.do_debugN)__name__
__module____qualname__Z
short_descZplugin_nameZprofilesZpackagesr   Zoption_listr   r   r   r   r   r   r   r   r      s   	r   N)Zsos.report.pluginsr   r   r   r   r   r   r   r   <module>	   s   