distrax.devices.abstract_device class#

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

class distrax.devices.abstract_device.AbstractDevice(*args, **kwargs)[source]#

An interface for Device Classes.

A Device is a Block Device that will store the Object Storage Device.

create_device(size, number=1)[source]#

Create the block storage device.

Parameters:
  • size (int) – The size of the blocks’ device in GibiBytes i.e. 1 would be 1GiB

  • number (int) – Number of block devices to create, i.e. 4 will create 4 devices of the size stated

Return type:

None

static get_paths(number)[source]#

Get the paths of the devices created.

Parameters:

number (int) – number of devices created

Return type:

List[str]

Returns:

List of Device Paths, i.e. /dev/ram0,/dev/ram1

remove_device()[source]#

Remove the block devices created.

Return type:

None