HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/sos/report/plugins/__pycache__/etcd.cpython-38.pyc
U

i��di�@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�dd	d
ddg}|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
�9/usr/lib/python3/dist-packages/sos/report/plugins/etcd.py�
<listcomp>Bszetcd.setup.<locals>.<listcomp>)�
containersZget_container_by_nameZ
add_file_tagsZadd_forbidden_pathZadd_cmd_outputZ
add_copy_spec)�selfZetcd_conZconZsubcmdsr
r
r
�setup%s2

����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