23 #ifndef TESTRDKPLUGIN_H
24 #define TESTRDKPLUGIN_H
26 #include <RdkPluginBase.h>
28 #include <sys/types.h>
29 #include <netinet/in.h>
46 TestRdkPlugin(std::shared_ptr<rt_dobby_schema>& containerConfig,
47 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
48 const std::string &rootfsPath);
51 inline std::string
name()
const override
69 #ifdef USE_STARTCONTAINER_HOOK
70 bool startContainer()
override;
83 const std::string mName;
84 std::shared_ptr<rt_dobby_schema> mContainerConfig;
85 const std::string mRootfsPath;
86 const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
Basic object that provides the default overrides for a plugin.
Definition: RdkPluginBase.h:34
Simple Dobby RDK Plugin.
Definition: TestRdkPlugin.h:44
bool preCreation() override
Dobby Hook - run in host namespace before container creation process.
Definition: TestRdkPlugin.cpp:91
bool postInstallation() override
Dobby Hook - run in host namespace once when container bundle is downloaded.
Definition: TestRdkPlugin.cpp:74
bool postStart() override
OCI Hook - Run in host namespace once container has started.
Definition: TestRdkPlugin.cpp:161
unsigned hookHints() const override
Set the bit flags for which hooks we're going to use.
Definition: TestRdkPlugin.cpp:54
bool postStop() override
OCI Hook - Run in host namespace. Confusing name - is run when a container is DELETED.
Definition: TestRdkPlugin.cpp:195
bool postHalt() override
Dobby Hook - Run in host namespace when container terminates.
Definition: TestRdkPlugin.cpp:178
std::string name() const override
Should return the name of the plugin.
Definition: TestRdkPlugin.h:51
TestRdkPlugin(std::shared_ptr< rt_dobby_schema > &containerConfig, const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::string &rootfsPath)
Constructor - called when plugin is loaded by PluginLauncher.
Definition: TestRdkPlugin.cpp:36
std::vector< std::string > getDependencies() const override
Should return the names of the plugins this plugin depends on.
Definition: TestRdkPlugin.cpp:219
bool createContainer() override
OCI Hook - Run in container namespace. Paths resolve to host namespace.
Definition: TestRdkPlugin.cpp:125
bool createRuntime() override
OCI Hook - Run in host namespace.
Definition: TestRdkPlugin.cpp:108