You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/03/06 20:40:38 UTC

[02/14] mesos git commit: Updated libprocess handlers to use the 'Principal' type.

Updated libprocess handlers to use the 'Principal' type.

This patch updates the HTTP endpoint handlers in libprocess
to make use of the `Principal` type instead of an
`Option<string>& principal`.

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


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

Branch: refs/heads/master
Commit: 66193c882356c03f2cb8342b4cab98644dfa46a2
Parents: 81cbc39
Author: Greg Mann <gr...@mesosphere.io>
Authored: Mon Mar 6 12:39:00 2017 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Mar 6 12:39:00 2017 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/logging.hpp         | 2 +-
 3rdparty/libprocess/include/process/metrics/metrics.hpp | 2 +-
 3rdparty/libprocess/include/process/profiler.hpp        | 4 ++--
 3rdparty/libprocess/src/logging.cpp                     | 2 +-
 3rdparty/libprocess/src/metrics/metrics.cpp             | 2 +-
 3rdparty/libprocess/src/profiler.cpp                    | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/include/process/logging.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/logging.hpp b/3rdparty/libprocess/include/process/logging.hpp
index b5c2515..f999767 100644
--- a/3rdparty/libprocess/include/process/logging.hpp
+++ b/3rdparty/libprocess/include/process/logging.hpp
@@ -58,7 +58,7 @@ protected:
 private:
   Future<http::Response> toggle(
       const http::Request& request,
-      const Option<std::string>& /* principal */);
+      const Option<http::authentication::Principal>&);
 
   void set(int v)
   {

http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/include/process/metrics/metrics.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/metrics/metrics.hpp b/3rdparty/libprocess/include/process/metrics/metrics.hpp
index d9c64b7..9c32a88 100644
--- a/3rdparty/libprocess/include/process/metrics/metrics.hpp
+++ b/3rdparty/libprocess/include/process/metrics/metrics.hpp
@@ -63,7 +63,7 @@ private:
 
   Future<http::Response> _snapshot(
       const http::Request& request,
-      const Option<std::string>& /* principal */);
+      const Option<http::authentication::Principal>&);
 
   static std::list<Future<double>> _snapshotTimeout(
       const std::list<Future<double>>& futures);

http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/include/process/profiler.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/profiler.hpp b/3rdparty/libprocess/include/process/profiler.hpp
index d19d647..2991dd2 100644
--- a/3rdparty/libprocess/include/process/profiler.hpp
+++ b/3rdparty/libprocess/include/process/profiler.hpp
@@ -67,14 +67,14 @@ private:
   // Starts the profiler. There are no request parameters.
   Future<http::Response> start(
       const http::Request& request,
-      const Option<std::string>& /* principal */);
+      const Option<http::authentication::Principal>&);
 
   // Stops the profiler. There are no request parameters.
   // This returns the profile output, it will also remain present
   // in the working directory.
   Future<http::Response> stop(
       const http::Request& request,
-      const Option<std::string>& /* principal */);
+      const Option<http::authentication::Principal>&);
 
   // The authentication realm that the profiler's HTTP endpoints will be
   // installed into.

http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/src/logging.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/logging.cpp b/3rdparty/libprocess/src/logging.cpp
index cf7b43d..cfaf179 100644
--- a/3rdparty/libprocess/src/logging.cpp
+++ b/3rdparty/libprocess/src/logging.cpp
@@ -27,7 +27,7 @@ namespace process {
 
 Future<http::Response> Logging::toggle(
     const http::Request& request,
-    const Option<std::string>& /* principal */)
+    const Option<http::authentication::Principal>&)
 {
   Option<std::string> level = request.url.query.get("level");
   Option<std::string> duration = request.url.query.get("duration");

http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/src/metrics/metrics.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/metrics/metrics.cpp b/3rdparty/libprocess/src/metrics/metrics.cpp
index 29c8c1d..7184aa4 100644
--- a/3rdparty/libprocess/src/metrics/metrics.cpp
+++ b/3rdparty/libprocess/src/metrics/metrics.cpp
@@ -175,7 +175,7 @@ Future<hashmap<string, double>> MetricsProcess::snapshot(
 
 Future<http::Response> MetricsProcess::_snapshot(
     const http::Request& request,
-    const Option<string>& /* principal */)
+    const Option<http::authentication::Principal>&)
 {
   // Parse the 'timeout' parameter.
   Option<Duration> timeout;

http://git-wip-us.apache.org/repos/asf/mesos/blob/66193c88/3rdparty/libprocess/src/profiler.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/profiler.cpp b/3rdparty/libprocess/src/profiler.cpp
index 2b3b6d5..a29e8d1 100644
--- a/3rdparty/libprocess/src/profiler.cpp
+++ b/3rdparty/libprocess/src/profiler.cpp
@@ -60,7 +60,7 @@ const std::string Profiler::STOP_HELP()
 
 Future<http::Response> Profiler::start(
     const http::Request& request,
-    const Option<std::string>& /* principal */)
+    const Option<http::authentication::Principal>&)
 {
 #ifdef ENABLE_GPERFTOOLS
   const Option<std::string>
@@ -105,7 +105,7 @@ Future<http::Response> Profiler::start(
 
 Future<http::Response> Profiler::stop(
     const http::Request& request,
-    const Option<std::string>& /* principal */)
+    const Option<http::authentication::Principal>&)
 {
 #ifdef ENABLE_GPERFTOOLS
   if (!started) {