17 #ifndef __NETWORK_CNI_PLUGIN_PORTMAPPER_HPP__ 18 #define __NETWORK_CNI_PLUGIN_PORTMAPPER_HPP__ 72 const std::string& cniConfig);
102 const std::string& _cniCommand,
103 const std::string& _cniContainerId,
105 const std::string& _cniIfName,
107 const std::string& _cniPath,
108 const mesos::NetworkInfo& _networkInfo,
109 const std::string& _delegatePlugin,
111 const std::string& _chain,
112 const std::vector<std::string>& _excludeDevices)
113 : cniCommand(_cniCommand),
114 cniContainerId(_cniContainerId),
116 cniIfName(_cniIfName),
119 networkInfo(_networkInfo),
120 delegatePlugin(_delegatePlugin),
121 delegateConfig(_delegateConfig),
123 excludeDevices(_excludeDevices){};
128 std::string getIptablesRuleTag();
130 std::string getIptablesRule(
132 const mesos::NetworkInfo::PortMapping& portMapping);
136 const mesos::NetworkInfo::PortMapping& portMapping);
143 const std::string cniCommand;
144 const std::string cniContainerId;
146 const std::string cniIfName;
148 const std::string cniPath;
150 const mesos::NetworkInfo networkInfo;
152 const std::string delegatePlugin;
161 const std::string chain;
165 const std::vector<std::string> excludeDevices;
173 #endif // __NETWORK_CNI_PLUGIN_PORTMAPPER_HPP__
static Try< process::Owned< PortMapper >, spec::PluginError > create(const std::string &cniConfig)
virtual ~PortMapper()
Definition: port_mapper.hpp:83
static constexpr int ERROR_PORTMAP_FAILURE
Definition: port_mapper.hpp:47
static constexpr int ERROR_DELEGATE_FAILURE
Definition: port_mapper.hpp:46
static constexpr int ERROR_BAD_ARGS
Definition: port_mapper.hpp:45
Try< Option< std::string >, spec::PluginError > execute()
Definition: attributes.hpp:24
static constexpr int ERROR_UNSUPPORTED_COMMAND
Definition: port_mapper.hpp:48
virtual Result< spec::NetworkInfo > delegate(const std::string &command)
Definition: port_mapper.hpp:39
static constexpr int ERROR_READ_FAILURE
Definition: port_mapper.hpp:44