3 ܓi@s&ddlmZmZGdddeeZdS))Plugin RedHatPluginc@s4eZdZdZdZdZd ZdZdZdZ dZ d d Z 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 pluginetcd containersystemservicescluster/etc/etcd/etcd.confetcdctlcCsd}x|jD]}|j|r |}Pq W|jddi|jddg|jd|dd|jd|d d d d 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)rversionz member listz alarm listzendpoint statuszendpoint healthcSsg|]}d|qS)zetcdctl ).0subrr/usr/lib/python3.6/etcd.py CszEtcd.setup..) containersZget_container_by_nameZ add_file_tagsZadd_forbidden_pathZadd_dir_listingZ add_copy_specZadd_cmd_output)selfZetcd_conZconZsubcmdsrrrsetup%s*    z Etcd.setupN)r)rrrr )r )r r)r) __name__ __module__ __qualname____doc__Z short_descZ plugin_nameZpackagesZprofilesfilesrrrrrrrrs rN)Zsos.report.pluginsrrrrrrr s