o idi@s&ddlmZmZGdddeeZdS))Plugin RedHatPluginc@s4eZdZdZdZdZdZdZdZdZ dZ ddZ d S) etcdaThe 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. z etcd plugin)r) containersystemservicescluster)/etc/etcd/etcd.conf)etcdctlrcCs~d}|jD] }||r|}nq|ddi|ddg|jd|d|jd|dgd}|jd d |D|ddS) Nr etcd_confz /etc/etcd/caz/etc/etcd/*.keyzls -lR /var/lib/etcd/)rz /etc/etcd)versionz member listz alarm listzendpoint statuszendpoint healthcSsg|]}d|qS)zetcdctl ).0subr r 9/usr/lib/python3/dist-packages/sos/report/plugins/etcd.py Bszetcd.setup..) containersget_container_by_name add_file_tagsadd_forbidden_pathadd_cmd_output add_copy_spec)selfetcd_conconsubcmdsr r rsetup%s(    z etcd.setupN) __name__ __module__ __qualname____doc__ short_desc plugin_namepackagesprofilesfilesrrrr r r rrs  rN)sos.report.pluginsrrrr r r rs