17 #ifndef __NETWORK_CNI_ISOLATOR_HPP__ 18 #define __NETWORK_CNI_ISOLATOR_HPP__ 39 class NetworkCniIsolatorSetup;
59 const std::vector<mesos::slave::ContainerState>& states,
63 const ContainerID& containerId,
64 const mesos::slave::ContainerConfig& containerConfig)
override;
67 const ContainerID& containerId,
71 const ContainerID& containerId)
override;
74 const ContainerID& containerId)
override;
77 const ContainerID& containerId)
override;
80 struct ContainerNetwork
83 std::string networkName;
101 bool _joinsParentsNetwork =
false)
102 : containerNetworks (_containerNetworks),
105 joinsParentsNetwork(_joinsParentsNetwork) {}
120 const bool joinsParentsNetwork;
130 const std::string& configDir,
131 const std::string& pluginDir);
141 networkConfigs(_networkConfigs),
142 cniDNSMap(_cniDNSMap),
143 defaultCniDNS(_defaultCniDNS),
147 const ContainerID& containerId,
155 const ContainerID& containerId,
159 const ContainerID& containerId,
160 const std::string& networkName,
161 const std::string& netNsHandle);
164 const ContainerID& containerId,
165 const std::string& networkName,
166 const std::string& plugin,
173 const ContainerID& containerId,
174 const std::string& networkName);
177 const ContainerID& containerId,
178 const std::string& networkName,
179 const std::string& plugin,
186 const ContainerID& containerId,
204 const std::string& network,
205 const std::string&
path);
268 #endif // __NETWORK_CNI_ISOLATOR_HPP__
std::string generate(const std::string &prefix="")
Returns 'prefix(N)' where N represents the number of instances where the same prefix (wrt...
void execute(const std::string &script)
ProcessBase(const std::string &id="")
NetworkCniIsolatorSetup()
Definition: cni.hpp:255
bool bind_host_files
Definition: cni.hpp:251
bool supportsNesting() override
~NetworkCniIsolatorProcess() override
Definition: cni.hpp:54
bool bind_readonly
Definition: cni.hpp:252
DWORD pid_t
Definition: windows.hpp:181
Option< std::string > etc_resolv_conf
Definition: cni.hpp:250
Definition: subcommand.hpp:41
static Try< mesos::slave::Isolator * > create(const Flags &flags)
Definition: isolator.hpp:82
Try< std::string > hostname()
Definition: net.hpp:154
process::Future< Option< mesos::slave::ContainerLaunchInfo > > prepare(const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig) override
process::Future< Nothing > isolate(const ContainerID &containerId, pid_t pid) override
Option< std::string > etc_hosts_path
Definition: cni.hpp:248
Option< std::string > rootfs
Definition: cni.hpp:247
process::Future< Nothing > cleanup(const ContainerID &containerId) override
Definition: attributes.hpp:24
flags::FlagsBase * getFlags() override
Definition: cni.hpp:261
process::Future< ContainerStatus > status(const ContainerID &containerId) override
process::Future< ResourceStatistics > usage(const ContainerID &containerId) override
Option< std::string > hostname
Definition: cni.hpp:246
Option< pid_t > pid
Definition: cni.hpp:245
Flags flags
Definition: cni.hpp:257
process::Future< Nothing > recover(const std::vector< mesos::slave::ContainerState > &states, const hashset< ContainerID > &orphans) override
Option< std::string > etc_hostname_path
Definition: cni.hpp:249
static const char * NAME
Definition: cni.hpp:239