summaryrefslogtreecommitdiff
path: root/libpod/adapter/pods.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-22 21:12:49 +0100
committerGitHub <noreply@github.com>2019-02-22 21:12:49 +0100
commitc757cb23ca15634077a8b9fa33aba7abd1c8249b (patch)
treecf98450129274946d9a79d321755d76d115ee3ba /libpod/adapter/pods.go
parent8039ccf4d560acbc308066cf8996bc4e6167a4a9 (diff)
parentbc6b4aa39c9156f31a5d370b19e91f42e0f14181 (diff)
downloadpodman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.tar.gz
podman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.tar.bz2
podman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.zip
Merge pull request #2402 from baude/remotepodinspect
podman-remote pod inspect|exists
Diffstat (limited to 'libpod/adapter/pods.go')
-rw-r--r--libpod/adapter/pods.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/libpod/adapter/pods.go b/libpod/adapter/pods.go
index 59642c42e..9841c20c0 100644
--- a/libpod/adapter/pods.go
+++ b/libpod/adapter/pods.go
@@ -36,3 +36,19 @@ func (r *LocalRuntime) RemovePods(ctx context.Context, cli *cliconfig.PodRmValue
}
return podids, errs
}
+
+// GetLatestPod gets the latest pod and wraps it in an adapter pod
+func (r *LocalRuntime) GetLatestPod() (*Pod, error) {
+ pod := Pod{}
+ p, err := r.Runtime.GetLatestPod()
+ pod.Pod = p
+ return &pod, err
+}
+
+// LookupPod gets a pod by name or id and wraps it in an adapter pod
+func (r *LocalRuntime) LookupPod(nameOrID string) (*Pod, error) {
+ pod := Pod{}
+ p, err := r.Runtime.LookupPod(nameOrID)
+ pod.Pod = p
+ return &pod, err
+}