24 #ifndef STORAGE_DEVICEGRAPH_H 25 #define STORAGE_DEVICEGRAPH_H 29 #include <boost/noncopyable.hpp> 31 #include "storage/Devices/Device.h" 32 #include "storage/Graphviz.h" 144 const Storage* get_storage()
const;
146 void load(
const std::string& filename);
147 void save(
const std::string& filename)
const;
151 size_t num_devices()
const;
152 size_t num_holders()
const;
157 bool device_exists(
sid_t sid)
const;
162 std::vector<Disk*> get_all_disks();
163 std::vector<const Disk*> get_all_disks()
const;
165 std::vector<Md*> get_all_mds();
166 std::vector<const Md*> get_all_mds()
const;
168 std::vector<LvmVg*> get_all_lvm_vgs();
169 std::vector<const LvmVg*> get_all_lvm_vgs()
const;
171 std::vector<Filesystem*> get_all_filesystems();
172 std::vector<const Filesystem*> get_all_filesystems()
const;
181 void remove_device(
sid_t sid);
182 void remove_device(
Device* a);
184 void remove_devices(std::vector<Device*> devices);
189 void remove_holder(
Holder* holder);
196 uint64_t used_features()
const;
201 void write_graphviz(
const std::string& filename,
GraphvizFlags graphviz_flags =
202 GraphvizFlags::NONE)
const;
210 Impl& get_impl() {
return *impl; }
211 const Impl& get_impl()
const {
return *impl; }
215 const std::unique_ptr<Impl> impl;
GraphvizFlags
Bitfield to control graphviz output.
Definition: Graphviz.h:37
Definition: Devicegraph.h:52
Definition: Devicegraph.h:76
Definition: Devicegraph.h:82
const std::string & msg() const
Return the message string provided to the constructor.
Definition: Exception.h:150
Definition: Devicegraph.h:58
The master container of the libstorage.
Definition: Devicegraph.h:133
Definition: Devicegraph.h:70
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:73
Definition: Devicegraph.h:88
The main entry point to libstorage.
Definition: Storage.h:99
Base class for storage exceptions.
Definition: Exception.h:113
The storage namespace.
Definition: Actiongraph.h:36
unsigned int sid_t
An integer storage ID.
Definition: Device.h:64
Definition: Devicegraph.h:64
Definition: Devicegraph.h:94
Definition: Devicegraph.h:46
friend std::ostream & operator<<(std::ostream &str, const Exception &obj)
Exception stream output.