You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2018/10/12 00:51:22 UTC
[mesos] 05/06: Removed an unnecessary argument from master::Call
validation.
This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit fbf49d234682e13fc6e9529425be49dca86029f0
Author: Benjamin Mahler <bm...@apache.org>
AuthorDate: Thu Feb 1 18:48:15 2018 -0800
Removed an unnecessary argument from master::Call validation.
The principal is not needed by the validation function.
Review: https://reviews.apache.org/r/65780
---
src/master/http.cpp | 2 +-
src/master/validation.cpp | 4 +---
src/master/validation.hpp | 4 +---
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 666097f..75ab6ea 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -250,7 +250,7 @@ Future<Response> Master::Http::api(
mesos::master::Call call = devolve(v1Call);
- Option<Error> error = validation::master::call::validate(call, principal);
+ Option<Error> error = validation::master::call::validate(call);
if (error.isSome()) {
return BadRequest("Failed to validate master::Call: " + error->message);
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index 2950234..5dd6086 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -60,9 +60,7 @@ namespace validation {
namespace master {
namespace call {
-Option<Error> validate(
- const mesos::master::Call& call,
- const Option<Principal>& principal)
+Option<Error> validate(const mesos::master::Call& call)
{
if (!call.IsInitialized()) {
return Error("Not initialized: " + call.InitializationErrorString());
diff --git a/src/master/validation.hpp b/src/master/validation.hpp
index 81a74b9..f010864 100644
--- a/src/master/validation.hpp
+++ b/src/master/validation.hpp
@@ -51,9 +51,7 @@ namespace call {
// Validates that a master:Call is well-formed.
// TODO(bmahler): Add unit tests.
-Option<Error> validate(
- const mesos::master::Call& call,
- const Option<process::http::authentication::Principal>& principal = None());
+Option<Error> validate(const mesos::master::Call& call);
} // namespace call {