You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/03/31 16:05:23 UTC

mesos git commit: Used operator<< for `CheckStatusInfo` instead of manual printing.

Repository: mesos
Updated Branches:
  refs/heads/master 07d973936 -> 1ab190a07


Used operator<< for `CheckStatusInfo` instead of manual printing.

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


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

Branch: refs/heads/master
Commit: 1ab190a07e011ea816db99c5022a185e48c0ced3
Parents: 07d9739
Author: Alexander Rukletsov <al...@apache.org>
Authored: Fri Mar 31 17:44:40 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Mar 31 17:46:25 2017 +0200

----------------------------------------------------------------------
 src/cli/execute.cpp | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1ab190a0/src/cli/execute.cpp
----------------------------------------------------------------------
diff --git a/src/cli/execute.cpp b/src/cli/execute.cpp
index 5842c47..11a2569 100644
--- a/src/cli/execute.cpp
+++ b/src/cli/execute.cpp
@@ -682,32 +682,8 @@ protected:
     if (status.has_healthy()) {
       cout << "  healthy?: " << status.healthy() << endl;
     }
-
     if (status.has_check_status()) {
-      switch (status.check_status().type()) {
-        case CheckInfo::COMMAND: {
-          CHECK(status.check_status().has_command());
-          cout << "  check's last exit code: "
-               << (status.check_status().command().has_exit_code()
-                     ? stringify(status.check_status().command().exit_code())
-                     : "not available") << endl;
-          break;
-        }
-
-        case CheckInfo::HTTP: {
-          CHECK(status.check_status().has_http());
-          cout << "  check's last HTTP status code: "
-               << (status.check_status().http().has_status_code()
-                     ? stringify(status.check_status().http().status_code())
-                     : "not available") << endl;
-          break;
-        }
-
-        case CheckInfo::UNKNOWN: {
-          cout << "'" << CheckInfo::Type_Name(status.check_status().type())
-               << "' is not a valid check type" << endl;
-        }
-      }
+      cout << "  check status: " << status.check_status() << endl;
     }
 
     if (status.has_uuid()) {