> 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;
> >     }
> >     ```
> 
> Qian Zhang wrote:
>     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;
>       };
> 
> Jie Yu wrote:
>     yeah, that's much better!
> 
> Qian Zhang wrote:
>     Great, I'd like to do the renaming in a separate patch since it is not 
> related to this one (`status()`). So Jie, please review this one, and I will 
> post a separate renaming patch soon.

The renaming patch: https://reviews.apache.org/r/45616/


- Qian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45546/#review126659
-----------------------------------------------------------


On April 2, 2016, 11:18 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45546/
> -----------------------------------------------------------
> 
> (Updated April 2, 2016, 11:18 a.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 
> 9fe394a7e837293cb6c9dab7097ddeeb2e38290c 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 991139fac2b2583a35981a5c85f971510515cfab 
> 
> Diff: https://reviews.apache.org/r/45546/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>

Reply via email to