Source code for insights.components.ceph

Component identifies Ceph Monitor

The ``Is*`` component in this module is valid if the
:py:class:`` combiner indicates
the host is a Ceph monitor.  Otherwise, it raises a
:py:class:`insights.core.dr.SkipComponent` to prevent dependent components from

from insights.core.dr import SkipComponent
from insights.core.plugins import component
from import Ps

[docs]@component(Ps) class IsCephMonitor(object): """ This component uses ``Ps`` combiner to determine if the host is a Ceph monitor or not. If not Ceph monitor, it raises ``SkipComponent``. Raises: SkipComponent: When it's not a Ceph monitor. """ def __init__(self, ps): if not'ceph-mon'): raise SkipComponent("Not Ceph Monitor")