mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
expose podman.sock in machine inspect
For consumers of the podman.sock who want a predictable way to find the podman sock, we now include it under 'ConnectionConfig' in podman machine inspect. Fixes: #14231 Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -1471,16 +1471,22 @@ func (v *MachineVM) Inspect() (*machine.InspectInfo, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
connInfo := new(machine.ConnectionConfig)
|
||||
podmanSocket, err := v.forwardSocketPath()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
connInfo.PodmanSocket = podmanSocket
|
||||
return &machine.InspectInfo{
|
||||
ConfigPath: v.ConfigPath,
|
||||
Created: v.Created,
|
||||
Image: v.ImageConfig,
|
||||
LastUp: v.LastUp,
|
||||
Name: v.Name,
|
||||
Resources: v.ResourceConfig,
|
||||
SSHConfig: v.SSHConfig,
|
||||
State: state,
|
||||
ConfigPath: v.ConfigPath,
|
||||
ConnectionInfo: *connInfo,
|
||||
Created: v.Created,
|
||||
Image: v.ImageConfig,
|
||||
LastUp: v.LastUp,
|
||||
Name: v.Name,
|
||||
Resources: v.ResourceConfig,
|
||||
SSHConfig: v.SSHConfig,
|
||||
State: state,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user