summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-04-27 15:48:04 -0400
committeropenshift-cherrypick-robot <>2022-05-04 18:59:05 +0000
commit6ea122f6e07f8b49f7a07884556ea697827a5052 (patch)
treed98a1aa1ff8396ad207631cadd150c1e5033965b /libpod/runtime.go
parentc4357f0f7b7a032908abfab358616d82163eaf9e (diff)
downloadpodman-6ea122f6e07f8b49f7a07884556ea697827a5052.tar.gz
podman-6ea122f6e07f8b49f7a07884556ea697827a5052.tar.bz2
podman-6ea122f6e07f8b49f7a07884556ea697827a5052.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.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 6c2323d88..78ff8ce94 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -1144,7 +1144,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")
}
@@ -1192,7 +1192,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
+}