summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-06 14:50:26 -0400
committerGitHub <noreply@github.com>2021-05-06 14:50:26 -0400
commit034470e5be8cfeef8ce0e0d2f47587a660682219 (patch)
tree74af195993a2fd2136c980b8035629fe4863051d /libpod
parent44184167e495a64f1a565a2bc2cccb6b5bc56eaa (diff)
parentefdc7d84652bbdbf398c88d0287b0740f040a588 (diff)
downloadpodman-034470e5be8cfeef8ce0e0d2f47587a660682219.tar.gz
podman-034470e5be8cfeef8ce0e0d2f47587a660682219.tar.bz2
podman-034470e5be8cfeef8ce0e0d2f47587a660682219.zip
Merge pull request #9689 from boaz0/boaz-1
add restart-policy to container filters & --filter to podman start
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/container.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/define/container.go b/libpod/define/container.go
index 5a2ff026f..f3125afa9 100644
--- a/libpod/define/container.go
+++ b/libpod/define/container.go
@@ -17,3 +17,12 @@ const (
// handling of system restart, which Podman does not yet support.
RestartPolicyUnlessStopped = "unless-stopped"
)
+
+// RestartPolicyMap maps between restart-policy valid values to restart policy types
+var RestartPolicyMap = map[string]string{
+ "none": RestartPolicyNone,
+ RestartPolicyNo: RestartPolicyNo,
+ RestartPolicyAlways: RestartPolicyAlways,
+ RestartPolicyOnFailure: RestartPolicyOnFailure,
+ RestartPolicyUnlessStopped: RestartPolicyUnlessStopped,
+}