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);
161 const Impl& get_impl()
const;
163 virtual Disk* clone()
const override;
static std::vector< const Disk * > get_all(const Devicegraph *devicegraph)
Get all Disks.
Transport get_transport() const
Get the transport of the disk.
static const Disk * find_by_name(const Devicegraph *devicegraph, const std::string &name)
Find a Disk by its name.
Definition: Partitionable.h:40
A physical disk device.
Definition: Disk.h:73
static Disk * create(Devicegraph *devicegraph, const std::string &name, const Region ®ion)
Create a device of type Disk.
A start/length pair with a block size.
Definition: Region.h:74
bool is_pmem() const
Return whether the disk is an PMEM device.
std::string get_transport_name(Transport transport)
Convert the Transport transport to a string.
static Disk * find_by_name(Devicegraph *devicegraph, const std::string &name)
Find a Disk by its name.
Disk * to_disk(Device *device)
Converts pointer to Device to pointer to Disk.
bool is_dax() const
Return whether the disk supports Direct Access (DAX).
The storage namespace.
Definition: Actiongraph.h:39
std::string get_zone_model_name(ZoneModel zone_model)
Convert the ZoneModel zone_model to a string.
bool is_disk(const Device *device)
Checks whether device points to a Disk.
static Disk * create(Devicegraph *devicegraph, const std::string &name, unsigned long long size)
Create a device of type Disk.
bool is_nvme() const
Return whether the disk is an NVMe device.
The main container of the libstorage-ng.
Definition: Devicegraph.h:170
ZoneModel get_zone_model() const
Get the zone model of the disk.
Transport
Data Transport Layer.
Definition: Disk.h:37
bool is_rotational() const
Return whether the disk is of rotational or non-rotational type.
ZoneModel
Zone model as read from /sys.
Definition: Disk.h:56
An abstract base class for storage devices.
Definition: Device.h:82
static Disk * create(Devicegraph *devicegraph, const std::string &name)
Create a device of type Disk.
static std::vector< Disk * > get_all(Devicegraph *devicegraph)
Get all Disks.