You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by dm...@apache.org on 2015/02/23 19:28:59 UTC

[1/2] mesos git commit: stout: Renamed net::ip to net::IP::fromLinkDevice

Repository: mesos
Updated Branches:
  refs/heads/master 135bc70e8 -> 1ab5db332


stout: Renamed net::ip to net::IP::fromLinkDevice

Review: https://reviews.apache.org/r/31247


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f734d42a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f734d42a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f734d42a

Branch: refs/heads/master
Commit: f734d42a95f0a2ec3116fa6c85745686b60527ba
Parents: 135bc70
Author: Evelina Dumitrescu <ev...@gmail.com>
Authored: Mon Feb 23 09:56:58 2015 -0800
Committer: Dominic Hamon <dm...@twitter.com>
Committed: Mon Feb 23 09:58:08 2015 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp | 2 +-
 3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f734d42a/3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp
index 3c00536..3293086 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp
@@ -201,7 +201,7 @@ inline std::ostream& operator << (std::ostream& stream, const IP& ip)
 // TODO(jieyu): It is uncommon, but likely that a link device has
 // multiple IPv4 addresses. In that case, consider returning the
 // primary IP address instead of the first one.
-inline Result<IP> ip(const std::string& name)
+inline Result<IP> fromLinkDevice(const std::string& name)
 {
 #if !defined(__linux__) && !defined(__APPLE__)
   return Error("Not implemented");

http://git-wip-us.apache.org/repos/asf/mesos/blob/f734d42a/3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp b/3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp
index 0db899e..fb98317 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp
+++ b/3rdparty/libprocess/3rdparty/stout/tests/ip_tests.cpp
@@ -19,13 +19,13 @@ using std::string;
 using std::vector;
 
 
-TEST(NetTest, ip)
+TEST(NetTest, LinkDevice)
 {
   Try<set<string> > links = net::links();
   ASSERT_SOME(links);
 
   foreach(const string& link, links.get()) {
-    Result<net::IP> ip = net::ip(link);
+    Result<net::IP> ip = net::fromLinkDevice(link);
     EXPECT_FALSE(ip.isError());
 
     if (ip.isSome()) {
@@ -50,7 +50,7 @@ TEST(NetTest, ip)
     }
   }
 
-  Result<net::IP> ip = net::ip("non-exist");
+  Result<net::IP> ip = net::fromLinkDevice("non-exist");
   EXPECT_ERROR(ip);
 }
 


[2/2] mesos git commit: mesos: Renamed net::ip to net::IP::fromLinkDevice.

Posted by dm...@apache.org.
mesos: Renamed net::ip to net::IP::fromLinkDevice.

Review: https://reviews.apache.org/r/31307


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1ab5db33
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1ab5db33
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1ab5db33

Branch: refs/heads/master
Commit: 1ab5db33270357fd69817bad9e12b38282eb27b8
Parents: f734d42
Author: Evelina Dumitrescu <ev...@gmail.com>
Authored: Mon Feb 23 09:58:19 2015 -0800
Committer: Dominic Hamon <dm...@twitter.com>
Committed: Mon Feb 23 09:59:24 2015 -0800

----------------------------------------------------------------------
 src/slave/containerizer/isolators/network/port_mapping.cpp | 2 +-
 src/tests/port_mapping_tests.cpp                           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1ab5db33/src/slave/containerizer/isolators/network/port_mapping.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/network/port_mapping.cpp b/src/slave/containerizer/isolators/network/port_mapping.cpp
index ae1a7c6..5227987 100644
--- a/src/slave/containerizer/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/isolators/network/port_mapping.cpp
@@ -1052,7 +1052,7 @@ Try<Isolator*> PortMappingIsolatorProcess::create(const Flags& flags)
   }
 
   // Get the host IP, MAC and default gateway.
-  Result<net::IP> hostIP = net::ip(eth0.get());
+  Result<net::IP> hostIP = net::fromLinkDevice(eth0.get());
   if (!hostIP.isSome()) {
     return Error(
         "Failed to get the public IP of " + eth0.get() + ": " +

http://git-wip-us.apache.org/repos/asf/mesos/blob/1ab5db33/src/tests/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/port_mapping_tests.cpp b/src/tests/port_mapping_tests.cpp
index 9b1b5f1..62cc9a7 100644
--- a/src/tests/port_mapping_tests.cpp
+++ b/src/tests/port_mapping_tests.cpp
@@ -197,7 +197,7 @@ protected:
     cleanup(eth0, lo);
 
     // Get host IP address.
-    Result<net::IP> _hostIP = net::ip(eth0);
+    Result<net::IP> _hostIP = net::fromLinkDevice(eth0);
 
     CHECK_SOME(_hostIP)
       << "Failed to retrieve the host public IP from " << eth0 << ": "