22 #include "softwarecontainer-common.h" 23 #include "cgroupsgateway.h" 27 CgroupsGateway::CgroupsGateway(std::shared_ptr<ContainerAbstractInterface> container)
28 : Gateway(ID, container)
36 m_parser.parseCGroupsGatewayConfiguration(element);
38 log_error() <<
"Could not parse CGroups configuration element";
45 bool CgroupsGateway::activateGateway()
48 auto cgroupSettings = m_parser.getSettings();
49 for (
auto& setting: cgroupSettings) {
50 success = getContainer()->setCgroupItem(setting.first, setting.second);
52 log_error() <<
"Error activating Cgroups Gateway, could not set cgroup item " 53 << setting.first <<
": " << setting.second;
61 bool CgroupsGateway::teardownGateway()
bool readConfigElement(const json_t *element) override
Gateway specific parsing of config elements.
Developers guide to adding a config item: