31#include <boost/noncopyable.hpp>
33#include "storage/Utils/Exception.h"
82 class Pool :
private boost::noncopyable
97 void set_userdata(
const std::map<std::string, std::string>& userdata);
161 unsigned long long size)
const;
167 Impl& get_impl() {
return *impl; }
168 const Impl& get_impl()
const {
return *impl; }
172 const std::unique_ptr<Impl> impl;
An abstract base class for storage devices.
Definition Device.h:82
The main container of the libstorage-ng.
Definition Devicegraph.h:170
Exception(LogLevel log_level=LogLevel::ERROR)
Default constructor.
A partition of a Partitionable, e.g.
Definition Partition.h:281
std::vector< const Device * > get_devices(const Devicegraph *devicegraph) const
Get the devices of the pool available in the devicegraph.
void add_device(const Device *device)
Add a device to the pool.
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.
size_t size(const Devicegraph *devicegraph) const
Get the number of devices of the pool available in the devicegraph.
bool exists_device(const Device *device) const
Check whether the device exists in the pool.
const std::map< std::string, std::string > & get_userdata() const
Return the userdata of the pool.
bool empty(const Devicegraph *devicegraph) const
Check whether the pool has any devices in the devicegraph.
void set_userdata(const std::map< std::string, std::string > &userdata)
Set the userdata of the pool.
void remove_device(const Device *device)
Remove a device from 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.
The storage namespace.
Definition Actiongraph.h:40