Sindbad~EG File Manager
3
�fb � @ s( d dl Z d dlmZ G dd� de�ZdS )� N)�Clusterc @ s4 e Zd ZdZdZdgZddiZd
ZdgZd
d� Z dS )�cepha!
This cluster profile is for Ceph Storage clusters, and is primarily
built around Red Hat Ceph Storage 5. Nodes are enumerated via `cephadm`; if
your Ceph deployment uses cephadm but is not RHCS 5, this profile may work
as intended, but it is not currently guaranteed to do so. If you are using
such an environment and this profile does not work for you, please file a
bug report detailing what is failing.
By default, all nodes in the cluster will be returned for collection. This
may not be desirable, so users are encouraged to use the `labels` option
to specify a colon-delimited set of ceph node labels to restrict the list
of nodes to.
For example, using `-c ceph.labels=osd:mgr` will return only nodes labeled
with *either* `osd` or `mgr`.
zCeph Storage ClusterZceph_commonzlog-size�2 �cephadm�labels� �3Colon delimited list of labels to select nodes withc s� g | _ | jddd�}|d dks:| jd|d � �� | j S tj|d j� d �}d d
� | jd�jd�D �}xJ|D ]B� |r�t� fd
d�|D �� r�| j � � d�� qp| j j
� d � qpW | j S )Nz0cephadm shell -- ceph orch host ls --format jsonT)Z need_rootZstatusr z'Could not enumerate nodes via cephadm: �output� c S s g | ]}|r|�qS � r )�.0Zlabr r �/usr/lib/python3.6/ceph.py�
<listcomp>: s z"ceph.get_nodes.<locals>.<listcomp>r �:c 3 s | ]}|� d kV qdS )r Nr )r Z_l)�noder r
� <genexpr><