diff options
author | Brent Baude <bbaude@redhat.com> | 2022-06-01 10:45:30 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2022-06-01 10:48:17 -0500 |
commit | 8291b51ceb50ca3230aeeeb27930111a27a31290 (patch) | |
tree | f27973659eaa9eeea0c2c0dd66cb4f3179fddbd4 /pkg/machine/qemu/machine.go | |
parent | 2039445763f418720b08983b40949480e8754f9a (diff) | |
download | podman-8291b51ceb50ca3230aeeeb27930111a27a31290.tar.gz podman-8291b51ceb50ca3230aeeeb27930111a27a31290.tar.bz2 podman-8291b51ceb50ca3230aeeeb27930111a27a31290.zip |
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>
Diffstat (limited to 'pkg/machine/qemu/machine.go')
-rw-r--r-- | pkg/machine/qemu/machine.go | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index e3fb3b970..f9119af94 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -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 } |