From 995a6a8ac414594b70545c5871e5f34e21a2cf07 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Mon, 25 Sep 2023 01:11:52 -0400 Subject: [PATCH] Add podman socket info to machine inspect HyperV and appleHV machine inspect commands were missing podman socket info. This also fixes machine inspect tests on hyperV Signed-off-by: Ashley Cui --- pkg/machine/applehv/machine.go | 8 +++++++- pkg/machine/hyperv/machine.go | 13 ++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pkg/machine/applehv/machine.go b/pkg/machine/applehv/machine.go index d91c602fb0..0d2ba2adb7 100644 --- a/pkg/machine/applehv/machine.go +++ b/pkg/machine/applehv/machine.go @@ -298,10 +298,16 @@ func (m *MacMachine) Inspect() (*machine.InspectInfo, error) { if err != nil { return nil, err } + + podmanSocket, err := m.forwardSocketPath() + if err != nil { + return nil, err + } + ii := machine.InspectInfo{ ConfigPath: m.ConfigPath, ConnectionInfo: machine.ConnectionConfig{ - PodmanSocket: nil, + PodmanSocket: podmanSocket, PodmanPipe: nil, }, Created: m.Created, diff --git a/pkg/machine/hyperv/machine.go b/pkg/machine/hyperv/machine.go index 93298a9094..b6f091cdfc 100644 --- a/pkg/machine/hyperv/machine.go +++ b/pkg/machine/hyperv/machine.go @@ -290,10 +290,17 @@ func (m *HyperVMachine) Inspect() (*machine.InspectInfo, error) { return nil, err } + podmanSocket, err := m.forwardSocketPath() + if err != nil { + return nil, err + } + return &machine.InspectInfo{ - ConfigPath: m.ConfigPath, - ConnectionInfo: machine.ConnectionConfig{}, - Created: m.Created, + ConfigPath: m.ConfigPath, + ConnectionInfo: machine.ConnectionConfig{ + PodmanSocket: podmanSocket, + }, + Created: m.Created, Image: machine.ImageConfig{ IgnitionFile: m.IgnitionFile, ImageStream: "",