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