23 #ifndef STORAGE_POOL_H
24 #define STORAGE_POOL_H
29 #include <boost/noncopyable.hpp>
31 #include "storage/Utils/Exception.h"
80 class Pool :
private boost::noncopyable
138 unsigned long long size)
const;
144 Impl& get_impl() {
return *impl; }
145 const Impl& get_impl()
const {
return *impl; }
149 const std::unique_ptr<Impl> impl;
The storage namespace.
Definition: Actiongraph.h:39
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.
void remove_device(const Device *device)
Remove a device from the pool.
Exception to report that the pool is out of space to fulfill the request.
Definition: Pool.h:46
The main container of the libstorage-ng.
Definition: Devicegraph.h:170
std::vector< const Device * > get_devices(const Devicegraph *devicegraph) const
Get the devices of the pool available in the devicegraph.
An abstract base class for storage devices.
Definition: Device.h:82
A pool represents a collection of devices.
Definition: Pool.h:81
size_t size(const Devicegraph *devicegraph) const
Get the number of devices of the pool available in the devicegraph.
Base class for storage exceptions.
Definition: Exception.h:114
void add_device(const Device *device)
Add a device to the pool.
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.