U
    -_g	                     @   s6   d dl mZmZmZ d dlmZ G dd deeZdS )    )PluginRedHatPlugin	PluginOptis_executablec                   @   sJ   e Zd ZdZdZdZeddeddgZdd	 Z	d
d Z
dd Zdd ZdS )NaviclizEMC Naviclinavicli)ZstorageZhardwareipaddrs z-space-delimited list of CLARiiON IP addresses)defaultZval_typeZdescc                 C   s   t dS )Nr   r   self r   </usr/lib/python3/dist-packages/sos/report/plugins/navicli.pycheck_enabled   s    zNavicli.check_enabledc                 C   s   |  dddddg dS )zH EMC Navisphere Host Agent NAVICLI specific information - files
        z/etc/Navisphere/agent.configz/etc/Navisphere/Navimon.cfgz/etc/Navisphere/Quietmode.cfgz/etc/Navisphere/messages/[a-z]*z/etc/Navisphere/log/[a-z]*N)Zadd_copy_specr   r   r   r   get_navicli_config   s    zNavicli.get_navicli_configc                 C   s   |  d| dd| dd| dd| dd| dd| dd| dd| d	d| d
d| dd| dd| dd| dg dS )z^ EMC Navisphere Host Agent NAVICLI specific
        information - CLARiiON - commands
        navicli -h z getallz getsptime -spaz getsptime -spbz getlogz getdiskz	 getcachez getlunz1 getlun -rg -type -default -owner -crus -capacityz lunmapinfoz getcrusz port -list -allz storagegroup -listz spportspeed -getN)Zadd_cmd_output)r   Z
sp_addressr   r   r   get_navicli_sp_info)   s    












zNavicli.get_navicli_sp_infoc                 C   sH   |    t| d D ](}| d| dd dkr| | qd S )Nr	   r   z
 getsptimeZstatusr   )r   setZ
get_optionsplitZexec_cmdr   )r   Zaddrr   r   r   setup>   s    zNavicli.setupN)__name__
__module____qualname__Z
short_descZplugin_nameZprofilesr   strZoption_listr   r   r   r   r   r   r   r   r      s   r   N)Zsos.report.pluginsr   r   r   Zsos.utilitiesr   r   r   r   r   r   <module>   s   