Skip to content

Commit d46fc9c

Browse files
committed
STACKITRCO-186 - add agent to server list PR 1213
Signed-off-by: Adrian Nackov <adrian.nackov@mail.schwarz>
1 parent 591031a commit d46fc9c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/cmd/server/list/list.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func outputResult(p *print.Printer, outputFormat string, servers []iaas.Server)
165165
return nil
166166
default:
167167
table := tables.NewTable()
168-
table.SetHeader("ID", "Name", "Status", "Machine Type", "Availability Zones", "Nic IPv4", "Public IPs")
168+
table.SetHeader("ID", "Name", "Status", "Machine Type", "Availability Zones", "Nic IPv4", "Public IPs", "Agent")
169169

170170
for i := range servers {
171171
server := servers[i]
@@ -186,6 +186,11 @@ func outputResult(p *print.Printer, outputFormat string, servers []iaas.Server)
186186
}
187187
}
188188

189+
agent := ""
190+
if server.Agent != nil {
191+
agent = utils.PtrString(server.Agent.Provisioned)
192+
}
193+
189194
table.AddRow(
190195
utils.PtrString(server.Id),
191196
utils.PtrString(server.Name),
@@ -194,6 +199,7 @@ func outputResult(p *print.Printer, outputFormat string, servers []iaas.Server)
194199
utils.PtrString(server.AvailabilityZone),
195200
nicIPv4,
196201
publicIPs,
202+
agent,
197203
)
198204
}
199205

0 commit comments

Comments
 (0)