summaryrefslogtreecommitdiff
path: root/libpod/state.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-10 12:59:06 -0400
committerGitHub <noreply@github.com>2020-08-10 12:59:06 -0400
commit68fd9aa2cf67a749258ccdc6fa8fd89c2557ebfc (patch)
treec3b6d5d3f767326407e80f54324acb45daa0fa45 /libpod/state.go
parent5ba21849a517659203a5879553f5dfb20963b7b5 (diff)
parent569854d6348e1cd74e8d654c88720e5517898f1a (diff)
downloadpodman-68fd9aa2cf67a749258ccdc6fa8fd89c2557ebfc.tar.gz
podman-68fd9aa2cf67a749258ccdc6fa8fd89c2557ebfc.tar.bz2
podman-68fd9aa2cf67a749258ccdc6fa8fd89c2557ebfc.zip
Merge pull request #7223 from mheon/fix_7214
Unconditionally retrieve pod names via API
Diffstat (limited to 'libpod/state.go')
-rw-r--r--libpod/state.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go
index 6206a2994..44632b02f 100644
--- a/libpod/state.go
+++ b/libpod/state.go
@@ -43,6 +43,12 @@ type State interface {
// containers and pods in all namespaces will be returned.
SetNamespace(ns string) error
+ // Resolve an ID into a Name. Since Podman names and IDs are globally
+ // unique between Pods and Containers, the ID may belong to either a pod
+ // or container. Despite this, we will always return ErrNoSuchCtr if the
+ // ID does not exist.
+ GetName(id string) (string, error)
+
// Return a container from the database from its full ID.
// If the container is not in the set namespace, an error will be
// returned.