U
    -_g#	                     @   s2   d dl Z d dlmZmZmZ G dd deeZdS )    N)PluginRedHatPlugin	PluginOptc                   @   sZ   e Zd ZdZdZdZdZdZedde	dd	ed
de	de d	edde	dd	gZ
dd ZdS )Skydivez.Skydive network topology and protocol analyzerZskydive)Znetwork)z/usr/bin/skydive/etc/skydive/skydive.ymlz' (password visible in process listings)username zskydive username)defaultZval_typeZdescpasswordzskydive passwordanalyzerzskydive analyzer addressc                 C   s   |  d |  d | dp4tddp4tdd}| dpVtddpVtd	d}| d
pltdd}t|||gs| jd |tjd< |tjd< |tjd< d}| | d S )Nr   z/var/log/skydive.logr   ZSKYDIVE_USERNAMEr   ZOS_USERNAMEr
   ZSKYDIVE_PASSWORDZOS_PASSWORDr   ZSKYDIVE_ANALYZERzlocalhost:8082ziSome or all of the skydive params are not set properly. Skydive status command may  not work as expected.zskydive client status)	Zadd_copy_specZ
get_optionosgetenvallZsoslogZwarningenvironZadd_cmd_output)selfr   r
   r   Z
status_cmd r   </usr/lib/python3/dist-packages/sos/report/plugins/skydive.pysetup%   s,    












zSkydive.setupN)__name__
__module____qualname__Z
short_descZplugin_nameZprofilesfilesZpassword_warn_textr   strZoption_listr   r   r   r   r   r      s    	r   )r   Zsos.report.pluginsr   r   r   r   r   r   r   r   <module>   s   