distrax.devices.brd_device
class#
This holds the BRDDevice Class, which allows for the creation and removal of the BRD Device
- class distrax.devices.brd_device.BRDDevice[source]#
BRDDevice class this allows for the creation and removal of the RAM block device.
It is important to note that this device uses system memory and the block devices will be found at /dev/ram{number}
Examples
>>> device = BRDDevice()
- static create_device(size, number=1)[source]#
Create BRD Block Device.
- Parameters:
- Raises:
NotEnoughMemoryError() – If the amount of memory requested is higher than the memory available
DeviceCreationError() – If the creation device fails this either to existing device or another reason.
- Return type:
- Returns:
Creates n blocks devices of the size stated.
Examples
>>> device.create_device(1, 10) # Creates 10 1Gib block devices using system memory