Repository: mesos Updated Branches: refs/heads/master e485df2fc -> cdcaa4823
Renamed master's "/call" endpoint to "/api/v1/scheduler". Review: https://reviews.apache.org/r/37241 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cdcaa482 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cdcaa482 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cdcaa482 Branch: refs/heads/master Commit: cdcaa4823a34b8daccf229db7fef77f3732259f4 Parents: 10cf391 Author: Vinod Kone <[email protected]> Authored: Fri Aug 7 14:35:05 2015 -0700 Committer: Vinod Kone <[email protected]> Committed: Tue Aug 11 13:49:24 2015 -0700 ---------------------------------------------------------------------- src/master/http.cpp | 6 +++--- src/master/master.cpp | 6 +++--- src/master/master.hpp | 6 +++--- src/tests/http_api_tests.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/cdcaa482/src/master/http.cpp ---------------------------------------------------------------------- diff --git a/src/master/http.cpp b/src/master/http.cpp index 1702b07..c2bc69f 100644 --- a/src/master/http.cpp +++ b/src/master/http.cpp @@ -313,16 +313,16 @@ void Master::Http::log(const Request& request) // TODO(ijiminez): Add some information or pointers to help // users understand the HTTP Event/Call API. -const string Master::Http::CALL_HELP = HELP( +const string Master::Http::SCHEDULER_HELP = HELP( TLDR( "Endpoint for schedulers to make Calls against the master."), USAGE( - "/master/call"), + "/api/v1/scheduler"), DESCRIPTION( "Returns 202 Accepted iff the request is accepted.")); -Future<Response> Master::Http::call(const Request& request) const +Future<Response> Master::Http::scheduler(const Request& request) const { scheduler::Call call; http://git-wip-us.apache.org/repos/asf/mesos/blob/cdcaa482/src/master/master.cpp ---------------------------------------------------------------------- diff --git a/src/master/master.cpp b/src/master/master.cpp index 163f4d6..398203d 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -757,10 +757,10 @@ void Master::initialize() // Setup HTTP routes. Http http = Http(this); - route("/call", - Http::CALL_HELP, + route("/api/v1/scheduler", + Http::SCHEDULER_HELP, [http](const process::http::Request& request) { - return http.call(request); + return http.scheduler(request); }); route("/health", Http::HEALTH_HELP, http://git-wip-us.apache.org/repos/asf/mesos/blob/cdcaa482/src/master/master.hpp ---------------------------------------------------------------------- diff --git a/src/master/master.hpp b/src/master/master.hpp index 6bd05b1..ef24bf8 100644 --- a/src/master/master.hpp +++ b/src/master/master.hpp @@ -788,8 +788,8 @@ private: // desired request handler to get consistent request logging. static void log(const process::http::Request& request); - // /master/call - process::Future<process::http::Response> call( + // /api/v1/scheduler + process::Future<process::http::Response> scheduler( const process::http::Request& request) const; // /master/health @@ -828,7 +828,7 @@ private: process::Future<process::http::Response> tasks( const process::http::Request& request) const; - const static std::string CALL_HELP; + const static std::string SCHEDULER_HELP; const static std::string HEALTH_HELP; const static std::string OBSERVE_HELP; const static std::string REDIRECT_HELP; http://git-wip-us.apache.org/repos/asf/mesos/blob/cdcaa482/src/tests/http_api_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/http_api_tests.cpp b/src/tests/http_api_tests.cpp index 586d112..23214df 100644 --- a/src/tests/http_api_tests.cpp +++ b/src/tests/http_api_tests.cpp @@ -55,7 +55,7 @@ TEST_F(HttpApiTest, NoContentType) // the BadRequest is only due to the missing header. Future<Response> response = process::http::post( master.get(), - "call", + "api/v1/scheduler", None(), None());
