summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorBoaz Shuster <boaz.shuster.github@gmail.com>2021-04-20 16:17:16 +0300
committerBoaz Shuster <boaz.shuster.github@gmail.com>2021-05-06 14:35:15 +0300
commitefdc7d84652bbdbf398c88d0287b0740f040a588 (patch)
tree25bc0f45eabf10fa80ff08ba49b73e2e04c6c395 /libpod/define
parent0b05ba808d5e2fc75ce10b23405bd5c05da2c331 (diff)
downloadpodman-efdc7d84652bbdbf398c88d0287b0740f040a588.tar.gz
podman-efdc7d84652bbdbf398c88d0287b0740f040a588.tar.bz2
podman-efdc7d84652bbdbf398c88d0287b0740f040a588.zip
Add restart-policy to container filters & --filter to podman start
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Diffstat (limited to 'libpod/define')
-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,
+}