summaryrefslogtreecommitdiff
path: root/libpod/adapter/pods.go
diff options
context:
space:
mode:
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
+}