> On April 2, 2016, 6:32 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.hpp, lines 93-95
> > <https://reviews.apache.org/r/45546/diff/2/?file=1322022#file1322022line93>
> >
> > This is very confusing. We have both 'network' and 'networkInfo' in
> > 'NetworkInfo'!
> >
> > How about this: we introduce an optional 'ContainerInfo' in 'Info':
> >
> > ```
> > struct Info
> > {
> > Option<ContainerInfo> containerInfo;
> > }
> > ```
So you mean we will have two fields in `struct Info`? Then what fields will
`ContainerInfo` have?
struct Info
{
hashmap<std::string, NetworkInfo> networkInfos;
Option<ContainerInfo> containerInfo;
}
How about just rename `struct NetworkInfo` to `struct ContainerNetwork` and
rename its field `network` to `cniNetworkInfo` like below?
struct ContainerNetwork
{
std::string networkName;
std::string ifName;
mesos::NetworkInfo networkInfo;
Option<cni::spec::NetworkInfo> cniNetworkInfo
};
struct Info
{
Info (const hashmap<std::string, ContainerNetwork>& _containerNetworks)
: containerNetworks (_containerNetworks) {}
hashmap<std::string, ContainerNetwork> containerNetworks;
};
- Qian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45546/#review126659
-----------------------------------------------------------
On April 1, 2016, 10:17 p.m., Qian Zhang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45546/
> -----------------------------------------------------------
>
> (Updated April 1, 2016, 10:17 p.m.)
>
>
> Review request for mesos, Avinash sridharan, Gilbert Song, and Jie Yu.
>
>
> Bugs: MESOS-4764
> https://issues.apache.org/jira/browse/MESOS-4764
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Implemented status() method of "network/cni" isolator.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
> 3a07540909ed771d1bd3b22888e04d5fb451710d
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
> 486c382365d5293cd9d53b8b239f70a543c46792
>
> Diff: https://reviews.apache.org/r/45546/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Qian Zhang
>
>