diff options
author | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 14:47:08 +0100 |
---|---|---|
committer | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 14:48:33 +0100 |
commit | d2f3098c6f9068edfe4012387cef2e6d140ef20a (patch) | |
tree | 61e731bf1909984463adc2f845ac2ddcd7671328 /pkg/api | |
parent | 4aaaa6c1df3a1c90a930b97552bcc970d7d99dd4 (diff) | |
download | podman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.tar.gz podman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.tar.bz2 podman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.zip |
--no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/libpod/generate.go | 2 | ||||
-rw-r--r-- | pkg/api/server/register_generate.go | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go index b3b8c1f16..fc22d0120 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 bce5484ab..bbab0ad5f 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 |