From 9509aa6c4b126f2c4aebfa7f84a4cc7179fff1f0 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 10 Jan 2018 15:17:33 -0800 Subject: [PATCH] Adds the NodeID field back to the /v1/agent/self Config block. Fixes #3778 --- agent/agent_endpoint.go | 2 ++ website/source/api/agent.html.md | 1 + 2 files changed, 3 insertions(+) diff --git a/agent/agent_endpoint.go b/agent/agent_endpoint.go index 39b38294dd..c99e3ef14a 100644 --- a/agent/agent_endpoint.go +++ b/agent/agent_endpoint.go @@ -57,12 +57,14 @@ func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (int config := struct { Datacenter string NodeName string + NodeID string Revision string Server bool Version string }{ Datacenter: s.agent.config.Datacenter, NodeName: s.agent.config.NodeName, + NodeID: string(s.agent.config.NodeID), Revision: s.agent.config.Revision, Server: s.agent.config.ServerMode, Version: s.agent.config.Version, diff --git a/website/source/api/agent.html.md b/website/source/api/agent.html.md index 4e46f854d0..0ea8af64e2 100644 --- a/website/source/api/agent.html.md +++ b/website/source/api/agent.html.md @@ -117,6 +117,7 @@ $ curl \ "Config": { "Datacenter": "dc1", "NodeName": "foobar", + "NodeID": "9d754d17-d864-b1d3-e758-f3fe25a9874f", "Server": true, "Revision": "deadbeef", "Version": "1.0.0"