Takes a JSON formatted OCI bundle configuration file in the constructor, parses it and extracts the relevant fields.
More...
|
| DobbyBundleConfig (const std::shared_ptr< IDobbyUtils > &utils, const std::shared_ptr< const IDobbySettings > &settings, const ContainerId &id, const std::string &bundlePath) |
| Constructor that parses an OCI bundle's config file to be used by Dobby. Plugins under 'rdkPlugins' and 'legacyPlugins' are parsed if found (OCI bundle*). More...
|
|
bool | isValid () const override |
| Getters used for plugins.
|
|
uid_t | userId () const override |
|
gid_t | groupId () const override |
|
IDobbyIPCUtils::BusType | systemDbus () const override |
|
IDobbyIPCUtils::BusType | sessionDbus () const override |
|
IDobbyIPCUtils::BusType | debugDbus () const override |
|
bool | consoleDisabled () const override |
|
ssize_t | consoleLimit () const override |
|
const std::string & | consolePath () const override |
|
bool | restartOnCrash () const override |
|
const std::string & | rootfsPath () const override |
|
std::shared_ptr< rt_dobby_schema > | config () const override |
|
const std::map< std::string, Json::Value > & | rdkPlugins () const override |
|
bool | addMount (const std::string &source, const std::string &target, const std::string &fsType, unsigned long mountFlags, const std::list< std::string > &mountOptions) |
| Public api to allow for adding additional mounts. More...
|
|
bool | addEnvironmentVar (const std::string &envVar) |
| Public api to allow for adding additional env variables. More...
|
|
bool | changeProcessArgs (const std::string &command) |
|
bool | addWesterosMount (const std::string &socketPath) |
|
bool | writeConfigJson (const std::string &filePath) const |
| Writes bundle config string to a file. More...
|
|
const std::string | configJson () const |
| Get OCI bundle config json as string. More...
|
|
void | printCommand () const |
|
bool | enableSTrace (const std::string &logsDir) |
| Enables strace for the container. More...
|
|
void | setApparmorProfile (const std::string &profileName) |
| Set apparmor profile in config. More...
|
|
void | setPidsLimit (int limit) |
| Set cgroup pids limit. More...
|
|
|
enum class | NetworkType { None
, Nat
, Open
} |
| Network type used for Network plugin.
|
|
typedef struct DobbyConfig::_LoopMount | LoopMount |
| Loopmount struct used for Storage plugin.
|
|
bool | writeConfigJsonImpl (const std::string &filePath) const |
|
bool | updateBundleConfig (const ContainerId &id, std::shared_ptr< rt_dobby_schema > cfg, const std::string &bundlePath) |
| Convert the input config.json into an OCI compliant bundle config that adds support for DobbyPluginLauncher to work with rdkPlugins. More...
|
|
bool | setHostnameToContainerId (const ContainerId &id, std::shared_ptr< rt_dobby_schema > cfg, const std::string &bundlePath) |
| Sets the container hostname to the container ID. More...
|
|
bool | convertToCompliant (const ContainerId &id, std::shared_ptr< rt_dobby_schema > cfg, const std::string &bundlePath) |
| Convert the input config.json into an OCI compliant bundle config that adds support for DobbyPluginLauncher to work with rdkPlugins. More...
|
|
bool | isApparmorProfileLoaded (const char *profile) const |
| Check if apparmor profile is loaded. More...
|
|
static std::list< DevNode > | scanDevNodes (const std::list< std::string > &devNodes) |
| Takes a list of glob patterns corresponding to dev node paths and returns a list of structs with their details. More...
|
|
std::mutex | mLock |
|
Takes a JSON formatted OCI bundle configuration file in the constructor, parses it and extracts the relevant fields.
It's main purpose is to read an extended OCI bundle config with plugins so it can be converted into an OCI compliant bundle.