20 #include "filegateway.h" 24 FileGateway::FileGateway(std::shared_ptr<ContainerAbstractInterface> container) :
25 Gateway(ID, container),
35 if (!parser.parseConfigElement(element, setting)) {
39 if (!m_store.addSetting(setting)) {
46 bool FileGateway::activateGateway()
48 const std::vector<FileGatewayParser::FileSetting> settings = m_store.getSettings();
50 if (!bindMount(setting)) {
59 std::shared_ptr<ContainerAbstractInterface> con = getContainer();
61 if (!con->bindMountInContainer(setting.pathInHost,
62 setting.pathInContainer,
64 log_error() <<
"Could not bind mount " << setting.pathInHost <<
" into container";
71 bool FileGateway::teardownGateway()
bool readConfigElement(const json_t *element) override
Gateway specific parsing of config elements.
Developers guide to adding a config item: