HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/etcd.cpython-36.opt-1.pyc
3

-�_g��@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�RedHatPluginc@s4eZdZdZdZdZd
ZdZdZdZ	dZ
d
d�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�etcd�	container�system�services�cluster�/etc/etcd/etcd.conf�etcdctlcCs�d}x|jD]}|j|�r|}PqW|jddi�|jddg�|jd|dd�|jd|d	�d
ddd
dg}|jdd�|D�|d	�dS)Nz/etc/etcd/etcd.confZ	etcd_confz/etc/etcd/caz/etc/etcd/*.keyz/var/lib/etcd/T)r�	recursivez	/etc/etcd)r�versionzmember listz
alarm listzendpoint statuszendpoint healthcSsg|]}d|���qS)zetcdctl �)�.0�subrr�/usr/lib/python3.6/etcd.py�
<listcomp>CszEtcd.setup.<locals>.<listcomp>)�
containersZget_container_by_nameZ
add_file_tagsZadd_forbidden_pathZadd_dir_listingZ
add_copy_specZadd_cmd_output)�selfZetcd_conZconZsubcmdsrrr�setup%s*

z
Etcd.setupN)r)rrrr	)r
)rr)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZpackagesZprofiles�filesrrrrrrrrsrN)Zsos.report.pluginsrrrrrrr�<module>s