24 #ifndef STORAGE_POOL_H 25 #define STORAGE_POOL_H 31 #include <boost/noncopyable.hpp> 33 #include "storage/Utils/Exception.h" 82 class Pool :
private boost::noncopyable
92 const std::map<std::string, std::string>&
get_userdata()
const;
97 void set_userdata(
const std::map<std::string, std::string>& userdata);
155 unsigned long long size)
const;
161 Impl& get_impl() {
return *impl; }
162 const Impl& get_impl()
const {
return *impl; }
166 const std::unique_ptr<Impl> impl;
unsigned long long max_partition_size(Devicegraph *devicegraph, unsigned int number) const
Find the maximum partition size the pool can provide for the given number of partitions.
const std::map< std::string, std::string > & get_userdata() const
Return the userdata of the pool.
void remove_device(const Device *device)
Remove a device from the pool.
size_t size(const Devicegraph *devicegraph) const
Get the number of devices of the pool available in the devicegraph.
void set_userdata(const std::map< std::string, std::string > &userdata)
Set the userdata of the pool.
The main container of the libstorage-ng.
Definition: Devicegraph.h:169
void add_device(const Device *device)
Add a device to the pool.
An abstract base class for storage devices.
Definition: Device.h:81
bool exists_device(const Device *device) const
Check whether the device exists in the pool.
Base class for storage exceptions.
Definition: Exception.h:113
std::vector< Partition * > create_partitions(Devicegraph *devicegraph, unsigned int number, unsigned long long size) const
Create a number of partitions of size in the pool.
std::vector< const Device * > get_devices(const Devicegraph *devicegraph) const
Get the devices of the pool available in the devicegraph.
The storage namespace.
Definition: Actiongraph.h:38
Exception to report that the pool is out of space to fulfill the request.
Definition: Pool.h:47
A pool represents a collection of devices.
Definition: Pool.h:82