diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-04-27 15:48:04 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-05-04 12:11:32 -0400 |
commit | 5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8 (patch) | |
tree | c1700e0bbdfd923e6a76406bc6078df80f1d74b8 /libpod/runtime.go | |
parent | b1e9ea38e5a680afb9294cb8a451311991d94765 (diff) | |
download | podman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.tar.gz podman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.tar.bz2 podman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.zip |
Report correct RemoteURI
Rather than assuming a filesystem path, the API service URI is recorded
in the libpod runtime configuration and then reported as requested.
Note: All schemes other than "unix" are hard-coded to report URI exists.
Fixes #12023
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index d5daa2f8a..f4cd9cf00 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -1158,7 +1158,7 @@ func (r *Runtime) getVolumePlugin(name string) (*plugin.VolumePlugin, error) { return plugin.GetVolumePlugin(name, pluginPath) } -// GetSecretsStoreageDir returns the directory that the secrets manager should take +// GetSecretsStorageDir returns the directory that the secrets manager should take func (r *Runtime) GetSecretsStorageDir() string { return filepath.Join(r.store.GraphRoot(), "secrets") } @@ -1206,7 +1206,17 @@ func (r *Runtime) Network() nettypes.ContainerNetwork { return r.network } -// Network returns the network interface which is used by the runtime +// GetDefaultNetworkName returns the network interface which is used by the runtime func (r *Runtime) GetDefaultNetworkName() string { return r.config.Network.DefaultNetwork } + +// RemoteURI returns the API server URI +func (r *Runtime) RemoteURI() string { + return r.config.Engine.RemoteURI +} + +// SetRemoteURI records the API server URI +func (r *Runtime) SetRemoteURI(uri string) { + r.config.Engine.RemoteURI = uri +} |