You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2017/01/03 19:39:05 UTC
[6/7] mesos git commit: Reused json helper for `SlaveInfo`.
Reused json helper for `SlaveInfo`.
This change reuses the helper used for modelling `SlaveInfo` in
the `/slaves` endpoint.
Review: https://reviews.apache.org/r/54732/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8d821d1d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8d821d1d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8d821d1d
Branch: refs/heads/master
Commit: 8d821d1d0446d9725be32504c6cc20c4a9ab867e
Parents: c499ca7
Author: Zhitao Li <zh...@gmail.com>
Authored: Tue Jan 3 10:28:41 2017 -0800
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Jan 3 11:38:21 2017 -0800
----------------------------------------------------------------------
src/master/http.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/8d821d1d/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 4e0abc6..75dcd61 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -349,9 +349,9 @@ static void json(JSON::ObjectWriter* writer, const Summary<Slave>& summary)
{
const Slave& slave = summary;
- writer->field("id", slave.id.value());
+ json(writer, slave.info);
+
writer->field("pid", string(slave.pid));
- writer->field("hostname", slave.info.hostname());
writer->field("registered_time", slave.registeredTime.secs());
if (slave.reregisteredTime.isSome()) {
@@ -365,7 +365,6 @@ static void json(JSON::ObjectWriter* writer, const Summary<Slave>& summary)
writer->field("reserved_resources", totalResources.reservations());
writer->field("unreserved_resources", totalResources.unreserved());
- writer->field("attributes", Attributes(slave.info.attributes()));
writer->field("active", slave.active);
writer->field("version", slave.version);
}