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 <acui@redhat.com>
This commit is contained in:
Ashley Cui
2023-09-25 01:11:52 -04:00
parent 80952db0ba
commit 995a6a8ac4
2 changed files with 17 additions and 4 deletions

View File

@ -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,

View File

@ -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: "",