o
    i©¹d/  ã                   @   s2   d dl mZmZ d dlmZ G dd„ deeƒZdS )é    )ÚPluginÚRedHatPlugin)Úglobc                   @   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)Úcluster)Úlucir   Ú
clusterlib)z/etc/cluster/cluster.confc                 C   s    |   g d¢¡ |  g d¢¡ d S )N)	z/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/luci)
zcman_tool serviceszcman_tool nodeszcman_tool statuszccs_tool lsnodez
mkqdisk -Lzgroup_tool dumpzfence_tool dumpzfence_tool ls -nÚclustatz&rg_test test /etc/cluster/cluster.conf)Úadd_copy_specÚ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   Údo_file_subÚdo_path_regex_sub)r   Úcluster_confr   r   r   Úpostproc3   s   ýýzCman.postprocN)
Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesÚpackagesÚfilesr   r   r   r   r   r   r      s    r   N)Úsos.report.pluginsr   r   r   r   r   r   r   r   Ú<module>   s   