You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Paul Brett <pa...@twopensource.com> on 2015/03/31 01:29:11 UTC

Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

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

Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs
-----

  src/tests/port_mapping_tests.cpp 8192deac8d9b7ea1896bb62a8b5961ef90326fa4 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78283
-----------------------------------------------------------



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment126807>

    Please rename this to "hostIPNetwork". We don't need the leading underscore anymore.



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment126809>

    Looks like this is not needed anymore.



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment126811>

    I would rather keep the type `IP` for `hostIP`.
    ```
    hostIP = hostIPNetwork.get().address();
    ```



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment126814>

    s/string/net::IP/
    
    Since we don't have a default constructor of IP, you probabaly want to initilize it to INADDR_ANY.



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment126815>

    This fits in one line. Please do a sweep to fix similar issues.


- Jie Yu


On March 30, 2015, 11:29 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated March 30, 2015, 11:29 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp 8192deac8d9b7ea1896bb62a8b5961ef90326fa4 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78293
-----------------------------------------------------------


Patch looks great!

Reviews applied: [32654]

All tests passed.

- Mesos ReviewBot


On March 30, 2015, 11:29 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated March 30, 2015, 11:29 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp 8192deac8d9b7ea1896bb62a8b5961ef90326fa4 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.

> On April 1, 2015, 8:48 p.m., Jie Yu wrote:
> > The diff does seem to be correct.

Needs one more rev.


- Paul


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


On April 1, 2015, 9:30 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 9:30 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78585
-----------------------------------------------------------


The diff does seem to be correct.

- Jie Yu


On April 1, 2015, 8:42 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 8:42 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78619
-----------------------------------------------------------


Bad patch!

Reviews applied: [32654]

Failed command: ./support/apply-review.sh -n -r 32654

Error:
 2015-04-01 22:54:27 URL:https://reviews.apache.org/r/32654/diff/raw/ [679/679] -> "32654.patch" [1]
error: patch failed: src/tests/port_mapping_tests.cpp:782
error: src/tests/port_mapping_tests.cpp: patch does not apply
Failed to apply patch

- Mesos ReviewBot


On April 1, 2015, 9:30 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 9:30 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78639
-----------------------------------------------------------


Patch looks great!

Reviews applied: [32654]

All tests passed.

- Mesos ReviewBot


On April 1, 2015, 11:07 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 11:07 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78674
-----------------------------------------------------------

Ship it!



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment127609>

    We usually put constructor/destructors after static methods.
    
    ```
    public:
      static void SetUpTestCase()
      {
        ...
      }
      
      PortMappingIsolatorTest() : hostIP(net::IP(INADDR_ANY)) {}
    ```



src/tests/port_mapping_tests.cpp
<https://reviews.apache.org/r/32654/#comment127613>

    hostIPNetwork.get().address() returns an net::IP, why do you need an extra copy constructor?
    
    ```
    hostIP = hostIPNetwork.get().address();
    ```


- Jie Yu


On April 1, 2015, 11:07 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 11:07 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78825
-----------------------------------------------------------


Patch looks great!

Reviews applied: [32654]

All tests passed.

- Mesos ReviewBot


On April 3, 2015, 7:19 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 3, 2015, 7:19 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp 58709b5a0ac58f13985dcc4b71250ec41487ff18 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 3, 2015, 7:19 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp 58709b5a0ac58f13985dcc4b71250ec41487ff18 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78816
-----------------------------------------------------------


Bad patch!

Reviews applied: [32654]

Failed command: ./support/apply-review.sh -n -r 32654

Error:
 2015-04-03 18:45:36 URL:https://reviews.apache.org/r/32654/diff/raw/ [1134/1134] -> "32654.patch" [1]
error: patch failed: src/tests/port_mapping_tests.cpp:148
error: src/tests/port_mapping_tests.cpp: patch does not apply
Failed to apply patch

- Mesos ReviewBot


On April 3, 2015, 6:29 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 3, 2015, 6:29 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 3, 2015, 6:29 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/#review78719
-----------------------------------------------------------


Patch looks great!

Reviews applied: [32654]

All tests passed.

- Mesos ReviewBot


On April 2, 2015, 7:06 p.m., Paul Brett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32654/
> -----------------------------------------------------------
> 
> (Updated April 2, 2015, 7:06 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.
> 
> 
> Bugs: mesos-2332
>     https://issues.apache.org/jira/browse/mesos-2332
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Clean up HostIPNetwork since every use performs the same extract & stringify operation
> 
> 
> Diffs
> -----
> 
>   src/tests/port_mapping_tests.cpp f4124c3 
> 
> Diff: https://reviews.apache.org/r/32654/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Paul Brett
> 
>


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 2, 2015, 7:06 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 1, 2015, 11:07 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Changes
-------

Wrangling with post-review & reviewboard to get good patches


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 1, 2015, 9:30 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 1, 2015, 8:42 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated April 1, 2015, 12:39 a.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3e880e043729579a829e1057727741d131 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett


Re: Review Request 32654: Clean up HostIPNetwork since every use performs the same extract & stringify operation

Posted by Paul Brett <pa...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32654/
-----------------------------------------------------------

(Updated March 31, 2015, 11:52 p.m.)


Review request for mesos, Chi Zhang, Ian Downes, and Cong Wang.


Changes
-------

Fix patch header


Bugs: mesos-2332
    https://issues.apache.org/jira/browse/mesos-2332


Repository: mesos


Description
-------

Clean up HostIPNetwork since every use performs the same extract & stringify operation


Diffs (updated)
-----

  src/tests/port_mapping_tests.cpp f4124c3 

Diff: https://reviews.apache.org/r/32654/diff/


Testing
-------

make check


Thanks,

Paul Brett