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




src/docker/docker.cpp (lines 553 - 572)
<https://reviews.apache.org/r/42516/#comment188708>

    I prefer the following format:
    
    case ContainerInfo::DockerInfo::USER: {
      // User defined networks require docker version >= 1.9.0.
      Try<Nothing> validateVersion =
        this->validateVersion(Version(1, 9, 0));
        
      if (validateVersion.isError()) {
        return Failure("User defined networks require Docker "
                       "version 1.9.0 or higher");
      }
    
      if (containerInfo.network_infos_size() == 0) {
        return Failure("No network info found in container info");
      }
    
      const NetworkInfo& networkInfo = containerInfo.network_infos(0);
      if(!networkInfo.has_name()){
        return Failure("No network name found in network info");
      }
      network = networkInfo.name();
      break;
    }
    
    The main changes are:
    1) Add a period to the end of the comments in L554, also keep 2 spaces.
    2) Add a blank space after L556.
    2) Put `break` into the `{}` block.
    3) Updated indent in L559.


- Guangya Liu


On 三月 29, 2016, 7:31 a.m., Ezra Silvera wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42516/
> -----------------------------------------------------------
> 
> (Updated 三月 29, 2016, 7:31 a.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-4369
>     https://issues.apache.org/jira/browse/MESOS-4369
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Signed-off-by: Ezra Silvera <e...@il.ibm.com>
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto cb68e2c13409620fa4836c12d877488f4333ace7 
>   include/mesos/v1/mesos.proto af1dc9e11a26b52cfc348324b8dd796c1f72323f 
>   src/docker/docker.cpp 4d35513cdd9c044d37d876a6db7dd9321ceaca53 
> 
> Diff: https://reviews.apache.org/r/42516/diff/
> 
> 
> Testing
> -------
> 
> Using Swarm running on Mesos create a network with "docker  network create 
> --driver=bridge myNetwork"   and then create a container on that network:  
> "docker run --net=myNetwork...."
> 
> 
> Thanks,
> 
> Ezra Silvera
> 
>

Reply via email to