24 #ifndef STORAGE_STORAGE_H 25 #define STORAGE_STORAGE_H 32 #include <boost/noncopyable.hpp> 34 #include "storage/Filesystems/Mountable.h" 35 #include "storage/CommitOptions.h" 36 #include "storage/Utils/Callbacks.h" 99 virtual bool multipath(
bool looks_like_real_multipath)
const = 0;
106 virtual std::pair<bool, std::string>
luks(
const std::string& uuid,
int attempt)
const = 0;
141 virtual void error(
const std::string& message)
const = 0;
172 const Arch& get_arch()
const;
194 bool equal_devicegraph(
const std::string& lhs,
const std::string& rhs)
const;
196 bool exist_devicegraph(
const std::string& name)
const;
197 std::vector<std::string> get_devicegraph_names()
const;
276 const std::string& get_rootprefix()
const;
277 void set_rootprefix(
const std::string& rootprefix);
360 Impl& get_impl() {
return *impl; }
361 const Impl& get_impl()
const {
return *impl; }
365 const std::unique_ptr<Impl> impl;
Provides information whether deactivate() was able to deactivate subsystems.
Definition: Storage.h:116
Definition: Environment.h:52
void probe(const ProbeCallbacks *probe_callbacks=nullptr)
Probe the system and replace the probed, system and staging devicegraphs.
MountByType get_default_mount_by() const
Query the default mount-by method.
Devicegraph * copy_devicegraph(const std::string &source_name, const std::string &dest_name)
void restore_devicegraph(const std::string &name)
const Devicegraph * get_probed() const
Return the probed devicegraph.
Storage(const Environment &environment)
Construct Storage object.
void check(const CheckCallbacks *check_callbacks=nullptr) const
Checks all devicegraphs.
void commit(const CommitOptions &commit_options, const CommitCallbacks *commit_callbacks=nullptr)
The actiongraph must be valid.
virtual std::pair< bool, std::string > luks(const std::string &uuid, int attempt) const =0
Decide whether the LUKS with uuid should be activated.
std::string prepend_rootprefix(const std::string &mount_point) const
Prepends the root prefix to a mount point if necessary.
DeactivateStatus deactivate() const
Deactivate devices like multipath, DM and MD RAID, LVM and LUKS.
const Actiongraph * calculate_actiongraph()
The actiongraph is only valid until either the probed or staging devicegraph is modified.
The master container of the libstorage.
Definition: Devicegraph.h:153
Devicegraph * get_devicegraph(const std::string &name)
Return a devicegraph by name.
Definition: Storage.h:146
Definition: Actiongraph.h:55
virtual bool multipath(bool looks_like_real_multipath) const =0
Decide whether multipath should be activated.
void set_default_mount_by(MountByType default_mount_by)
Set the default mount-by method.
Devicegraph * get_staging()
Return the staging devicegraph.
void activate(const ActivateCallbacks *activate_callbacks) const
Activate devices like multipath, DM and MD RAID, LVM and LUKS.
Devicegraph * get_system()
Return the system devicegraph.
The main entry point to libstorage.
Definition: Storage.h:156
Devicegraph * create_devicegraph(const std::string &name)
Definition: Storage.h:126
The storage namespace.
Definition: Actiongraph.h:37
void remove_devicegraph(const std::string &name)
Definition: Storage.h:135
Other storage subsystems are activated automatically, e.g.
Definition: Storage.h:88
MountByType
The key by which the mount program identifies a mountable.
Definition: Mountable.h:54