26#include "LoopMountDetails.h"
27#include "DynamicMountDetails.h"
28#include "MountOwnerDetails.h"
30#include <RdkPluginBase.h>
33#include <netinet/in.h>
47 Storage(std::shared_ptr<rt_dobby_schema>& containerConfig,
48 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
49 const std::string &rootfsPath);
52 inline std::string
name()
const override
74 bool startContainer()
override;
100 const std::string mName;
101 std::shared_ptr<rt_dobby_schema> mContainerConfig;
102 const std::string mRootfsPath;
103 const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
104#ifndef USE_OPEN_TREE_FOR_DYNAMIC_MOUNTS
105 std::string mMountPointInsideContainer;
106 std::string mTempMountPointOutsideContainer;
108 uint32_t
getMappedId(uint32_t
id, rt_defs_id_mapping **mapping,
size_t mapping_len)
const;
Basic object that provides the default overrides for a plugin.
Definition RdkPluginBase.h:34
Dobby RDK Storage Plugin.
Definition Storage.h:45
bool postStop() override
OCI Hook - Run in host namespace. Confusing name - is run when a container is DELETED.
Definition Storage.cpp:269
std::string name() const override
Should return the name of the plugin.
Definition Storage.h:52
unsigned hookHints() const override
Set the bit flags for which hooks we're going to use.
Definition Storage.cpp:63
std::vector< std::unique_ptr< LoopMountDetails > > getLoopMountDetails() const
Create loop mount details vector from all loopback mounts in config.
Definition Storage.cpp:353
bool postStart() override
OCI Hook - Run in container namespace.
Definition Storage.cpp:245
bool createContainer() override
OCI Hook - Run in container namespace. Paths resolve to host namespace.
Definition Storage.cpp:174
void setupOwnerIds(uid_t &uid, gid_t &gid) const
Gets userId and groupId.
Definition Storage.cpp:656
std::vector< MountOwnerProperties > getMountOwners() const
Reads container config to obtain source path on host, userId, groupId and recursive options....
Definition Storage.cpp:608
bool preCreation() override
OCI Hook - Run in host namespace.
Definition Storage.cpp:81
std::vector< LoopMountProperties > getLoopMounts() const
Reads container config and creates all loop mounts in LoopMountProperties type objects.
Definition Storage.cpp:394
std::vector< std::string > getDependencies() const override
Should return the names of the plugins this plugin depends on.
Definition Storage.cpp:331
bool createRuntime() override
OCI Hook - Run in host namespace.
Definition Storage.cpp:126
std::vector< std::unique_ptr< DynamicMountDetails > > getDynamicMountDetails() const
Create dynamic mount details vector from all dynamic mounts in config.
Definition Storage.cpp:487
uint32_t getMappedId(uint32_t id, rt_defs_id_mapping **mapping, size_t mapping_len) const
Gets userId or groupId based on mappings.
Definition Storage.cpp:695
std::vector< std::unique_ptr< MountOwnerDetails > > getMountOwnerDetails() const
Create mount owner details vector from all mount owners in config.
Definition Storage.cpp:566
std::vector< DynamicMountProperties > getDynamicMounts() const
Reads container config and creates all dynamic mounts in DynamicMountProperties type objects.
Definition Storage.cpp:522