mirror of
https://github.com/containers/podman.git
synced 2025-06-22 09:58:10 +08:00
--no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
This commit is contained in:
@ -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,
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user