summaryrefslogtreecommitdiff
path: root/pkg/domain/entities/generate.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-04-27 14:23:23 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-04-29 07:22:18 +0200
commitb2414b580e236e011d60028e645ab41096035ee3 (patch)
tree7e639a4c40d728c3be4e65e2870f785ced13665e /pkg/domain/entities/generate.go
parentbf4efc1953467907ae7d75d5f3ef3cd41505ee24 (diff)
downloadpodman-b2414b580e236e011d60028e645ab41096035ee3.tar.gz
podman-b2414b580e236e011d60028e645ab41096035ee3.tar.bz2
podman-b2414b580e236e011d60028e645ab41096035ee3.zip
generate systemd
Implement `podman generate systemd` for Podman v2 and enable associated tests. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/entities/generate.go')
-rw-r--r--pkg/domain/entities/generate.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go
new file mode 100644
index 000000000..6d65b52f8
--- /dev/null
+++ b/pkg/domain/entities/generate.go
@@ -0,0 +1,22 @@
+package entities
+
+// GenerateSystemdOptions control the generation of systemd unit files.
+type GenerateSystemdOptions struct {
+ // Files - generate files instead of printing to stdout.
+ Files bool
+ // Name - use container/pod name instead of its ID.
+ Name bool
+ // New - create a new container instead of starting a new one.
+ New bool
+ // RestartPolicy - systemd restart policy.
+ RestartPolicy string
+ // StopTimeout - time when stopping the container.
+ StopTimeout *uint
+}
+
+// GenerateSystemdReport
+type GenerateSystemdReport struct {
+ // Output of the generate process. Either the generated files or their
+ // entire content.
+ Output string
+}