libstorage-ng
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
storage::Disk Class Reference

A physical disk device. More...

#include <Disk.h>

Inheritance diagram for storage::Disk:
Inheritance graph
[legend]
Collaboration diagram for storage::Disk:
Collaboration graph
[legend]

Public Member Functions

bool get_rotational () const
 
Transport get_transport () const
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
virtual Diskclone () const override
 
- Public Member Functions inherited from storage::Partitionable
const Topologyget_topology () const
 
void set_topology (const Topology &topology)
 
unsigned int get_range () const
 
void set_range (unsigned int range)
 
PtType get_default_partition_table_type () const
 Get the default partition table type for the partitionable.
 
std::vector< PtTypeget_possible_partition_table_types () const
 Get possible partition table types for the disk. More...
 
PartitionTablecreate_partition_table (PtType pt_type)
 
bool has_partition_table () const
 
PartitionTableget_partition_table ()
 
const PartitionTableget_partition_table () const
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
- Public Member Functions inherited from storage::BlkDevice
const std::string & get_name () const
 
void set_name (const std::string &name)
 
const Regionget_region () const
 
void set_region (const Region &region)
 
unsigned long long get_size () const
 
void set_size (unsigned long long size)
 
std::string get_size_string () const
 
const std::string & get_sysfs_name () const
 
const std::string & get_sysfs_path () const
 
const std::vector< std::string > & get_udev_paths () const
 
const std::vector< std::string > & get_udev_ids () const
 
const std::string & get_dm_table_name () const
 Return device-mapper table name (dm-table-name for short). More...
 
void set_dm_table_name (const std::string &dm_table_name)
 
ResizeInfo detect_resize_info () const override
 
Filesystemcreate_filesystem (FsType fs_type)
 
bool has_filesystem () const
 
Filesystemget_filesystem ()
 
const Filesystemget_filesystem () const
 
Encryptioncreate_encryption (const std::string &dm_name)
 TODO parameter for encryption type? do all encryptions need a dm_name?
 
bool has_encryption () const
 
Encryptionget_encryption ()
 
const Encryptionget_encryption () const
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
- Public Member Functions inherited from storage::Device
sid_t get_sid () const
 
bool operator== (const Device &rhs) const
 
bool operator!= (const Device &rhs) const
 
bool exists_in_devicegraph (const Devicegraph *devicegraph) const
 Checks if the device exists in the devicegraph.
 
bool exists_in_probed () const
 Checks if the device exists in the probed devicegraph.
 
bool exists_in_staging () const
 Checks if the device exists in the staging devicegraph.
 
std::string get_displayname () const
 
bool has_children () const
 
size_t num_children () const
 
bool has_parents () const
 
size_t num_parents () const
 
std::vector< Device * > get_children ()
 
std::vector< const Device * > get_children () const
 
std::vector< Device * > get_parents ()
 
std::vector< const Device * > get_parents () const
 
std::vector< Device * > get_siblings (bool itself)
 
std::vector< const Device * > get_siblings (bool itself) const
 
std::vector< Device * > get_descendants (bool itself)
 
std::vector< const Device * > get_descendants (bool itself) const
 
std::vector< Device * > get_ancestors (bool itself)
 
std::vector< const Device * > get_ancestors (bool itself) const
 
std::vector< Device * > get_leaves (bool itself)
 
std::vector< const Device * > get_leaves (bool itself) const
 
std::vector< Device * > get_roots (bool itself)
 
std::vector< const Device * > get_roots (bool itself) const
 
std::vector< Holder * > get_in_holders ()
 
std::vector< const Holder * > get_in_holders () const
 
std::vector< Holder * > get_out_holders ()
 
std::vector< const Holder * > get_out_holders () const
 
void remove_descendants ()
 
const std::map< std::string, std::string > & get_userdata () const
 
void set_userdata (const std::map< std::string, std::string > &userdata)
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
void save (xmlNode *node) const
 

Static Public Member Functions

static Diskcreate (Devicegraph *devicegraph, const std::string &name)
 
static Diskcreate (Devicegraph *devicegraph, const std::string &name, const Region &region)
 
static Diskcreate (Devicegraph *devicegraph, const std::string &name, unsigned long long size)
 
static Diskload (Devicegraph *devicegraph, const xmlNode *node)
 
static std::vector< Disk * > get_all (Devicegraph *devicegraph)
 Sorted by name.
 
static std::vector< const Disk * > get_all (const Devicegraph *devicegraph)
 Sorted by name. More...
 
static Diskfind_by_name (Devicegraph *devicegraph, const std::string &name)
 
static const Diskfind_by_name (const Devicegraph *devicegraph, const std::string &name)
 
- Static Public Member Functions inherited from storage::Partitionable
static std::vector< Partitionable * > get_all (Devicegraph *devicegraph)
 
static std::vector< const Partitionable * > get_all (const Devicegraph *devicegraph)
 
- Static Public Member Functions inherited from storage::BlkDevice
static std::vector< BlkDevice * > get_all (Devicegraph *devicegraph)
 
static std::vector< const BlkDevice * > get_all (const Devicegraph *devicegraph)
 
static BlkDevicefind_by_name (Devicegraph *devicegraph, const std::string &name)
 
static const BlkDevicefind_by_name (const Devicegraph *devicegraph, const std::string &name)
 

Protected Member Functions

 Disk (Impl *impl)
 
- Protected Member Functions inherited from storage::Partitionable
 Partitionable (Impl *impl)
 
- Protected Member Functions inherited from storage::BlkDevice
 BlkDevice (Impl *impl)
 
- Protected Member Functions inherited from storage::Device
 Device (Impl *impl)
 
void create (Devicegraph *devicegraph)
 
void load (Devicegraph *devicegraph)
 

Detailed Description

A physical disk device.

Member Function Documentation

§ get_all()

static std::vector<const Disk*> storage::Disk::get_all ( const Devicegraph devicegraph)
static

Sorted by name.


The documentation for this class was generated from the following file: