distrax.osds.ceph_osd class#

This holds the CephOSD Class, with the associated methods for creating and removing OSDs from the system.

class distrax.osds.ceph_osd.CephOSD(folder='ceph', system_timeout=60, ceph_timeout=5)[source]#

Class for the creation and removal of Ceph OSDs.

To read more about the Ceph OSD please see: https://docs.ceph.com/en/latest/glossary/#term-Ceph-OSD

Examples

>>> osd = CephOSD()
>>> osd = CephOSD(folder="distrax")
create_osds(devices)[source]#

Create the OSDs devices.

Parameters:

devices (List[str]) – The device names to turn into OSDs.

Return type:

None

Examples

>>> osd.create_osds(["/dev/ram0", "/dev/ram1"])
is_osd_ready(num_up_and_in)[source]#

Check if the OSDs are ready.

Parameters:

num_up_and_in (int) – The number of OSDS expected to be up and running

Return type:

bool

Returns:

True when the number of up and in match stated requirment.

Examples

>>> osd.osd_ready()
    True
remove_osds()[source]#

Remove the OSDs devices from the system.

Return type:

None

Examples

>>> osd.remove_osds()