Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/etcd.cpython-36.opt-1.pyc

3

�fi�@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|d�|jd|d�dd	d
ddg}|jd
d�|D�|d�dS)Nz/etc/etcd/etcd.confZ	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.6/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%s(

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

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists