HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/etcd.cpython-39.opt-1.pyc
a

^��ci�@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�RedHatPluginc@s4eZdZdZdZdZdZdZdZdZ	dZ
dd�Zd	S)
�etcda�The etcd plugin collects information from the etcd key-value store. It
    is primarily used by Kubernetes/OpenShift clusters and is often run inside
    a container within the cluster.

    Collections will default to executing within an `etcdctl` container, if one
    is present, and only execute on the host if such a container is not
    currently running. The `etcdctl` name preference is adopted from OpenShift
    Container Platform deployments.

    This plugin is written for etcd v3 and later.
    zetcd plugin)r)�	container�system�servicesZcluster)�/etc/etcd/etcd.conf)ZetcdctlrcCs~d}|jD]}|�|�r
|}q"q
|�ddi�|�ddg�|jd|d�|jd|d�gd�}|jd	d
�|D�|d�dS)NrZ	etcd_confz/etc/etcd/caz/etc/etcd/*.keyzls -lR /var/lib/etcd/)rz	/etc/etcd)�versionzmember listz
alarm listzendpoint statuszendpoint healthcSsg|]}d|���qS)zetcdctl �)�.0�subr
r
�;/usr/lib/python3.9/site-packages/sos/report/plugins/etcd.py�
<listcomp>B�zetcd.setup.<locals>.<listcomp>)�
containersZget_container_by_nameZ
add_file_tagsZadd_forbidden_pathZadd_cmd_outputZ
add_copy_spec)�selfZetcd_conZconZsubcmdsr
r
r
�setup%s&

���z
etcd.setupN)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZpackagesZprofiles�filesrrrr
r
r
r
rsrN)Zsos.report.pluginsrrrr
r
r
r
�<module>s