28#include "storage/Devices/Partitionable.h"
38 UNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE, PCIE, TCP, RDMA, LOOP
57 NONE, HOST_AWARE, HOST_MANAGED
94 unsigned long long size);
172 const Impl& get_impl()
const;
174 virtual Disk* clone()
const override;
An abstract base class for storage devices.
Definition Device.h:82
The main container of the libstorage-ng.
Definition Devicegraph.h:170
A physical disk device.
Definition Disk.h:73
void set_image_filename(const std::string &image_filename)
Set the filename for the underlying image.
static Disk * find_by_name(Devicegraph *devicegraph, const std::string &name)
Find a Disk by its name.
const std::string & get_image_filename() const
Get the filename for the underlying image.
static std::vector< Disk * > get_all(Devicegraph *devicegraph)
Get all Disks.
static Disk * create(Devicegraph *devicegraph, const std::string &name, const Region ®ion)
Create a device of type Disk.
static Disk * create(Devicegraph *devicegraph, const std::string &name, unsigned long long size)
Create a device of type Disk.
static Disk * create(Devicegraph *devicegraph, const std::string &name)
Create a device of type Disk.
bool is_nvme() const
Return whether the disk is an NVMe device.
bool is_rotational() const
Return whether the disk is of rotational or non-rotational type.
ZoneModel get_zone_model() const
Get the zone model of the disk.
static const Disk * find_by_name(const Devicegraph *devicegraph, const std::string &name)
Find a Disk by its name.
static std::vector< const Disk * > get_all(const Devicegraph *devicegraph)
Get all Disks.
bool is_dax() const
Return whether the disk supports Direct Access (DAX).
bool is_pmem() const
Return whether the disk is an PMEM device.
Transport get_transport() const
Get the transport of the disk.
Definition Partitionable.h:40
A start/length pair with a block size.
Definition Region.h:85
The storage namespace.
Definition Actiongraph.h:40
bool is_disk(const Device *device)
Checks whether device points to a Disk.
Transport
Data Transport Layer.
Definition Disk.h:37
std::string get_transport_name(Transport transport)
Convert the Transport transport to a string.
ZoneModel
Zone model as read from /sys.
Definition Disk.h:56
Disk * to_disk(Device *device)
Converts pointer to Device to pointer to Disk.
std::string get_zone_model_name(ZoneModel zone_model)
Convert the ZoneModel zone_model to a string.