U
    -Ø_g   ã                   @   s2   d dl m Z  d dlmZmZ G dd„ deeƒZdS )é    )Úglob)ÚPluginÚRedHatPluginc                   @   s0   e Zd ZdZdZdZdZdZdd„ Zdd	„ Z	d
S )ÚCmanz,cman based Red Hat Cluster High AvailabilityÚcman)Zcluster)Zlucir   Z
clusterlib)z/etc/cluster/cluster.confc                 C   s>   |   ddddddddd	g	¡ |  d
dddddddddg
¡ d S )Nz/etc/cluster.confz/etc/clusterz/etc/sysconfig/clusterz/etc/sysconfig/cmanz/var/log/clusterz/etc/fence_virt.confz/var/lib/luci/data/luci.dbz/var/lib/luci/etcz/var/log/lucizcman_tool serviceszcman_tool nodeszcman_tool statuszccs_tool lsnodez
mkqdisk -Lzgroup_tool dumpzfence_tool dumpzfence_tool ls -nZclustatz&rg_test test /etc/cluster/cluster.conf)Zadd_copy_specZadd_cmd_output)Úself© r   ú9/usr/lib/python3/dist-packages/sos/report/plugins/cman.pyÚsetup   s.    ÷öz
Cman.setupc                 C   s.   t dƒD ]}|  |dd¡ q|  ddd¡ d S )Nz/etc/cluster/cluster.conf*z.(\s*\<fencedevice\s*.*\s*passwd\s*=\s*)\S+(\")z\1"***"z/var/lib/luci/etc/.*\.iniz(.*secret\s*=\s*)\S+z\1******)r   Zdo_file_subZdo_path_regex_sub)r   Zcluster_confr   r   r	   Úpostproc3   s    ýýzCman.postprocN)
Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_nameZprofilesZpackagesÚfilesr
   r   r   r   r   r	   r      s   r   N)r   Zsos.report.pluginsr   r   r   r   r   r   r	   Ú<module>	   s   