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

A bcache cache set. More...

#include <BcacheCset.h>

Inheritance diagram for storage::BcacheCset:
[legend]
Collaboration diagram for storage::BcacheCset:
[legend]

Public Member Functions

const std::string & get_uuid () const
 Return the UUID of the BcacheCset.
 
void set_uuid (const std::string &uuid)
 Set the UUID of the BcacheCset. More...
 
std::vector< const BlkDevice * > get_blk_devices () const
 Returns the BlkDevices used by this BcacheCset.
 
std::vector< const Bcache * > get_bcaches () const
 Returns the Bcaches using this BcacheCset.
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
virtual BcacheCsetclone () const override
 
- Public Member Functions inherited from storage::Device
sid_t get_sid () const
 Return the storage id (sid) of the device. More...
 
bool operator== (const Device &rhs) const
 
bool operator!= (const Device &rhs) const
 
Devicecopy_to_devicegraph (Devicegraph *devicegraph) const
 Copies the device to the devicegraph. More...
 
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.
 
bool exists_in_system () const
 Checks if the device exists in the system devicegraph.
 
std::string get_displayname () const
 
ResizeInfo detect_resize_info () const
 Detect the resize info of the device. More...
 
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_children (View view)
 Get all children of the device.
 
std::vector< const Device * > get_children (View view) const
 Get all children of the device. More...
 
std::vector< Device * > get_parents ()
 
std::vector< const Device * > get_parents () const
 
std::vector< Device * > get_parents (View view)
 Get all parents of the device.
 
std::vector< const Device * > get_parents (View view) const
 Get all parents of the device. More...
 
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_descendants (bool itself, View view)
 
std::vector< const Device * > get_descendants (bool itself, View view) 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 () ST_DEPRECATED
 
void remove_descendants (View view)
 Remove all descendants of the device. More...
 
const std::map< std::string, std::string > & get_userdata () const
 Return the userdata of the device.
 
void set_userdata (const std::map< std::string, std::string > &userdata)
 Set the userdata of the device.
 
std::string get_name_sort_key () const
 Get a sort-key based on the device name. More...
 
Devicegraphget_devicegraph ()
 
const Devicegraphget_devicegraph () const
 
Impl & get_impl ()
 
const Impl & get_impl () const
 
void save (xmlNode *node) const ST_DEPRECATED
 

Static Public Member Functions

static BcacheCsetcreate (Devicegraph *devicegraph)
 Create a device of type BcacheCset. More...
 
static BcacheCsetload (Devicegraph *devicegraph, const xmlNode *node)
 
static std::vector< BcacheCset * > get_all (Devicegraph *devicegraph)
 Get all BcacheCsets.
 
static std::vector< const BcacheCset * > get_all (const Devicegraph *devicegraph)
 Get all BcacheCsets. More...
 
static BcacheCsetfind_by_uuid (Devicegraph *devicegraph, const std::string &uuid)
 Find a BcacheCset by its UUID. More...
 
static const BcacheCsetfind_by_uuid (const Devicegraph *devicegraph, const std::string &uuid)
 Find a BcacheCset by its UUID. More...
 
static bool compare_by_uuid (const BcacheCset *lhs, const BcacheCset *rhs)
 Compare (less than) two BcacheCsets by UUID. More...
 
- Static Public Member Functions inherited from storage::Device
static std::vector< Device * > get_all (Devicegraph *devicegraph)
 Get all Devices.
 
static std::vector< const Device * > get_all (const Devicegraph *devicegraph)
 Get all Devices. More...
 
static bool compare_by_sid (const Device *lhs, const Device *rhs)
 Compare (less than) two Devices by sid. More...
 
static bool compare_by_name (const Device *lhs, const Device *rhs)
 Compare (less than) two Devices by name. More...
 

Protected Member Functions

 BcacheCset (Impl *impl)
 
- Protected Member Functions inherited from storage::Device
 Device (Impl *impl)
 
void create (Devicegraph *devicegraph)
 Create a device in the devicegraph. More...
 
void load (Devicegraph *devicegraph)
 

Detailed Description

A bcache cache set.

Member Function Documentation

◆ compare_by_uuid()

static bool storage::BcacheCset::compare_by_uuid ( const BcacheCset lhs,
const BcacheCset rhs 
)
static

Compare (less than) two BcacheCsets by UUID.

See also
get_uuid()

◆ create()

static BcacheCset* storage::BcacheCset::create ( Devicegraph devicegraph)
static

Create a device of type BcacheCset.

Usually this function is not called directly. Instead BlkDevice::create_bcache_cset() is called.

◆ find_by_uuid() [1/2]

static BcacheCset* storage::BcacheCset::find_by_uuid ( Devicegraph devicegraph,
const std::string &  uuid 
)
static

Find a BcacheCset by its UUID.

Exceptions
DeviceNotFound,DeviceHasWrongType

◆ find_by_uuid() [2/2]

static const BcacheCset* storage::BcacheCset::find_by_uuid ( const Devicegraph devicegraph,
const std::string &  uuid 
)
static

Find a BcacheCset by its UUID.

Exceptions
DeviceNotFound,DeviceHasWrongType

◆ get_all()

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

Get all BcacheCsets.

◆ set_uuid()

void storage::BcacheCset::set_uuid ( const std::string &  uuid)

Set the UUID of the BcacheCset.

The UUID on disk cannot be change. This function is only for testsuites.


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