distrax.osds.abstract_osd class#

This holds the AbstractOSD Class, which is expected to be used as a template for all created OSD classes.

class distrax.osds.abstract_osd.AbstractOSD(*args, **kwargs)[source]#

An interface for OSD Classes.

Outlines the methods required for OSD classes, for an OSD class to be functional it must implement create_osds and remove_osds in the method stated here.

create_osds(devices)[source]#

Create the OSD devices.

Parameters:

devices (List[str]) – A list of block devices files names, e.g. /dev/nvme0n1p1 or /dev/ram0

Return type:

None

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 created.

Return type:

None