summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-22 13:44:43 -0500
committerGitHub <noreply@github.com>2021-02-22 13:44:43 -0500
commita6e7d19c463a55a7d3bf6e47faec1906f3f32380 (patch)
tree3d3ef05a6bd448177c737cf0d6ba92ededd84934 /pkg/api
parentf8ff1727eca1ca726f00f5509fae5d9ca024f516 (diff)
parentd2f3098c6f9068edfe4012387cef2e6d140ef20a (diff)
downloadpodman-a6e7d19c463a55a7d3bf6e47faec1906f3f32380.tar.gz
podman-a6e7d19c463a55a7d3bf6e47faec1906f3f32380.tar.bz2
podman-a6e7d19c463a55a7d3bf6e47faec1906f3f32380.zip
Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generation
No header info for systemd generation
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/libpod/generate.go2
-rw-r--r--pkg/api/server/register_generate.go5
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go
index 2e139a0a9..0e6e9100a 100644
--- a/pkg/api/handlers/libpod/generate.go
+++ b/pkg/api/handlers/libpod/generate.go
@@ -18,6 +18,7 @@ func GenerateSystemd(w http.ResponseWriter, r *http.Request) {
query := struct {
Name bool `schema:"useName"`
New bool `schema:"new"`
+ NoHeader bool `schema:"noHeader"`
RestartPolicy string `schema:"restartPolicy"`
StopTimeout uint `schema:"stopTimeout"`
ContainerPrefix string `schema:"containerPrefix"`
@@ -41,6 +42,7 @@ func GenerateSystemd(w http.ResponseWriter, r *http.Request) {
options := entities.GenerateSystemdOptions{
Name: query.Name,
New: query.New,
+ NoHeader: query.NoHeader,
RestartPolicy: query.RestartPolicy,
StopTimeout: &query.StopTimeout,
ContainerPrefix: query.ContainerPrefix,
diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go
index ccb29fed0..abbad1485 100644
--- a/pkg/api/server/register_generate.go
+++ b/pkg/api/server/register_generate.go
@@ -32,6 +32,11 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// default: false
// description: Create a new container instead of starting an existing one.
// - in: query
+ // name: noHeader
+ // type: boolean
+ // default: false
+ // description: Do not generate the header including the Podman version and the timestamp.
+ // - in: query
// name: time
// type: integer
// default: 10