Merge pull request #3793 from hashicorp/node-id
Adds the NodeID field back to the /v1/agent/self Config block.
This commit is contained in:
commit
36a34bd899
|
@ -57,12 +57,14 @@ func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (int
|
||||||
config := struct {
|
config := struct {
|
||||||
Datacenter string
|
Datacenter string
|
||||||
NodeName string
|
NodeName string
|
||||||
|
NodeID string
|
||||||
Revision string
|
Revision string
|
||||||
Server bool
|
Server bool
|
||||||
Version string
|
Version string
|
||||||
}{
|
}{
|
||||||
Datacenter: s.agent.config.Datacenter,
|
Datacenter: s.agent.config.Datacenter,
|
||||||
NodeName: s.agent.config.NodeName,
|
NodeName: s.agent.config.NodeName,
|
||||||
|
NodeID: string(s.agent.config.NodeID),
|
||||||
Revision: s.agent.config.Revision,
|
Revision: s.agent.config.Revision,
|
||||||
Server: s.agent.config.ServerMode,
|
Server: s.agent.config.ServerMode,
|
||||||
Version: s.agent.config.Version,
|
Version: s.agent.config.Version,
|
||||||
|
|
|
@ -117,6 +117,7 @@ $ curl \
|
||||||
"Config": {
|
"Config": {
|
||||||
"Datacenter": "dc1",
|
"Datacenter": "dc1",
|
||||||
"NodeName": "foobar",
|
"NodeName": "foobar",
|
||||||
|
"NodeID": "9d754d17-d864-b1d3-e758-f3fe25a9874f",
|
||||||
"Server": true,
|
"Server": true,
|
||||||
"Revision": "deadbeef",
|
"Revision": "deadbeef",
|
||||||
"Version": "1.0.0"
|
"Version": "1.0.0"
|
||||||
|
|
Loading…
Reference in New Issue