From bda55b726707228b3583a47a6b8c034b473ae735 Mon Sep 17 00:00:00 2001 From: Mike Sul Date: Mon, 24 Jul 2023 12:54:42 +0200 Subject: [PATCH] devices: show: Print LmP version if available Signed-off-by: Mike --- client/foundries.go | 1 + subcommands/devices/show.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/client/foundries.go b/client/foundries.go index 6b871e32..039d93c8 100644 --- a/client/foundries.go +++ b/client/foundries.go @@ -147,6 +147,7 @@ type Device struct { Group *DeviceGroup `json:"group"` // Returned in Get API LastSeen string `json:"last-seen"` OstreeHash string `json:"ostree-hash"` + LmpVer string `json:"lmp-ver,omitempty"` DockerApps []string `json:"docker-apps,omitempty"` Tag string `json:"tag,omitempty"` Network *NetInfo `json:"network-info,omitempty"` diff --git a/subcommands/devices/show.go b/subcommands/devices/show.go index 0d268868..11531082 100644 --- a/subcommands/devices/show.go +++ b/subcommands/devices/show.go @@ -49,6 +49,9 @@ func doShow(cmd *cobra.Command, args []string) { fmt.Printf("Up to date:\t%v\n", device.UpToDate) fmt.Printf("Target:\t\t%s / sha256(%s)\n", device.TargetName, device.OstreeHash) fmt.Printf("Ostree Hash:\t%s\n", device.OstreeHash) + if len(device.LmpVer) > 0 { + fmt.Printf("LmP Version:\t%s\n", device.LmpVer) + } fmt.Printf("Created At:\t%s\n", device.ChangeMeta.CreatedAt) if len(device.ChangeMeta.CreatedBy) > 0 { fmt.Printf("Created By:\t%s\n", device.ChangeMeta.CreatedBy)