Add driver health information to node list stub

This commit is contained in:
Chelsea Holland Komlo 2018-05-09 11:21:54 -04:00
parent 1dc39a1d4c
commit d51611040f
3 changed files with 59 additions and 0 deletions

View File

@ -553,6 +553,7 @@ type NodeListStub struct {
SchedulingEligibility string
Status string
StatusDescription string
Drivers map[string]*DriverInfo
CreateIndex uint64
ModifyIndex uint64
}

View File

@ -1523,6 +1523,7 @@ func (n *Node) Stub() *NodeListStub {
SchedulingEligibility: n.SchedulingEligibility,
Status: n.Status,
StatusDescription: n.StatusDescription,
Drivers: n.Drivers,
CreateIndex: n.CreateIndex,
ModifyIndex: n.ModifyIndex,
}
@ -1541,6 +1542,7 @@ type NodeListStub struct {
SchedulingEligibility string
Status string
StatusDescription string
Drivers map[string]*DriverInfo
CreateIndex uint64
ModifyIndex uint64
}

View File

@ -52,6 +52,62 @@ $ curl \
"CreateIndex": 6,
"Datacenter": "dc1",
"Drain": false,
"Drivers": {
"java": {
"Attributes": {
"driver.java.runtime": "OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1~deb9u1-b12)",
"driver.java.vm": "OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)",
"driver.java.version": "openjdk version \"1.8.0_162"
},
"Detected": true,
"HealthDescription": "",
"Healthy": true,
"UpdateTime": "2018-04-11T23:33:48.781948669Z"
},
"qemu": {
"Attributes": null,
"Detected": false,
"HealthDescription": "",
"Healthy": false,
"UpdateTime": "2018-04-11T23:33:48.7819898Z"
},
"rkt": {
"Attributes": {
"driver.rkt.appc.version": "0.8.11",
"driver.rkt.volumes.enabled": "1",
"driver.rkt.version": "1.29.0"
},
"Detected": true,
"HealthDescription": "Driver rkt is detected: true",
"Healthy": true,
"UpdateTime": "2018-04-11T23:34:48.81079772Z"
},
"docker": {
"Attributes": {
"driver.docker.bridge_ip": "172.17.0.1",
"driver.docker.version": "18.03.0-ce",
"driver.docker.volumes.enabled": "1"
},
"Detected": true,
"HealthDescription": "Driver is available and responsive",
"Healthy": true,
"UpdateTime": "2018-04-11T23:34:48.713720323Z"
},
"exec": {
"Attributes": {},
"Detected": true,
"HealthDescription": "Driver exec is detected: true",
"Healthy": true,
"UpdateTime": "2018-04-11T23:34:48.711026521Z"
},
"raw_exec": {
"Attributes": {},
"Detected": true,
"HealthDescription": "",
"Healthy": true,
"UpdateTime": "2018-04-11T23:33:48.710448534Z"
}
},
"ID": "f7476465-4d6e-c0de-26d0-e383c49be941",
"ModifyIndex": 2526,
"Name": "nomad-4",