Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Public Member Functions | Private Attributes | List of all members
TestRdkPlugin Class Reference

Simple Dobby RDK Plugin. More...

#include <TestRdkPlugin.h>

Inheritance diagram for TestRdkPlugin:
Inheritance graph
[legend]
Collaboration diagram for TestRdkPlugin:
Collaboration graph
[legend]

Public Member Functions

 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. More...
 
std::string name () const override
 Should return the name of the plugin. More...
 
unsigned hookHints () const override
 Set the bit flags for which hooks we're going to use. More...
 
bool postInstallation () override
 Dobby Hook - run in host namespace once when container bundle is downloaded.
 
bool preCreation () override
 Dobby Hook - run in host namespace before container creation process.
 
bool createRuntime () override
 OCI Hook - Run in host namespace.
 
bool createContainer () override
 OCI Hook - Run in container namespace. Paths resolve to host namespace.
 
bool postStart () override
 OCI Hook - Run in host namespace once container has started.
 
bool postHalt () override
 Dobby Hook - Run in host namespace when container terminates.
 
bool postStop () override
 OCI Hook - Run in host namespace. Confusing name - is run when a container is DELETED.
 
std::vector< std::string > getDependencies () const override
 Should return the names of the plugins this plugin depends on. More...
 

Private Attributes

const std::string mName
 
std::shared_ptr< rt_dobby_schema > mContainerConfig
 
const std::string mRootfsPath
 
const std::shared_ptr< DobbyRdkPluginUtilsmUtils
 

Additional Inherited Members

- Public Types inherited from IDobbyRdkPlugin
enum  HintFlags : unsigned {
  PostInstallationFlag = (1 << 0) , PreCreationFlag = (1 << 1) , CreateRuntimeFlag = (1 << 2) , CreateContainerFlag = (1 << 3) ,
  PostStartFlag = (1 << 5) , PostHaltFlag = (1 << 6) , PostStopFlag = (1 << 7) , Unknown = 0
}
 Bit flags that should be returned by hookHints. More...
 

Detailed Description

Simple Dobby RDK Plugin.

Implements all hook points to print a simple statement showing the hook has been called successfully.

Can be used as a reference implementation for future plugins

Constructor & Destructor Documentation

◆ TestRdkPlugin()

TestRdkPlugin::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.

Do not change the parameters for this constructor - must match C methods created by REGISTER_RDK_PLUGIN macro

Note plugin name is not case sensitive

Member Function Documentation

◆ getDependencies()

std::vector< std::string > TestRdkPlugin::getDependencies ( ) const
overridevirtual

Should return the names of the plugins this plugin depends on.

This can be used to determine the order in which the plugins should be processed when running hooks.

Returns
Names of the plugins this plugin depends on.

Reimplemented from RdkPluginBase.

◆ hookHints()

unsigned TestRdkPlugin::hookHints ( ) const
overridevirtual

Set the bit flags for which hooks we're going to use.

This plugin uses all the hooks so set all the flags

Implements IDobbyRdkPlugin.

◆ name()

std::string TestRdkPlugin::name ( ) const
inlineoverridevirtual

Should return the name of the plugin.

Returns
string with the name of the hook.

Implements IDobbyRdkPlugin.


The documentation for this class was generated from the following files: