summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/libpod/generate.go2
-rw-r--r--pkg/api/server/register_generate.go5
-rw-r--r--pkg/api/server/register_manifest.go12
-rw-r--r--pkg/api/server/register_pods.go3
-rw-r--r--pkg/bindings/containers/types_attach_options.go2
-rw-r--r--pkg/bindings/containers/types_checkpoint_options.go2
-rw-r--r--pkg/bindings/containers/types_commit_options.go2
-rw-r--r--pkg/bindings/containers/types_create_options.go2
-rw-r--r--pkg/bindings/containers/types_diff_options.go2
-rw-r--r--pkg/bindings/containers/types_execinspect_options.go2
-rw-r--r--pkg/bindings/containers/types_execstart_options.go2
-rw-r--r--pkg/bindings/containers/types_execstartandattach_options.go2
-rw-r--r--pkg/bindings/containers/types_exists_options.go2
-rw-r--r--pkg/bindings/containers/types_export_options.go2
-rw-r--r--pkg/bindings/containers/types_healthcheck_options.go2
-rw-r--r--pkg/bindings/containers/types_init_options.go2
-rw-r--r--pkg/bindings/containers/types_inspect_options.go2
-rw-r--r--pkg/bindings/containers/types_kill_options.go2
-rw-r--r--pkg/bindings/containers/types_list_options.go2
-rw-r--r--pkg/bindings/containers/types_log_options.go2
-rw-r--r--pkg/bindings/containers/types_mount_options.go2
-rw-r--r--pkg/bindings/containers/types_mountedcontainerpaths_options.go2
-rw-r--r--pkg/bindings/containers/types_pause_options.go2
-rw-r--r--pkg/bindings/containers/types_prune_options.go2
-rw-r--r--pkg/bindings/containers/types_remove_options.go2
-rw-r--r--pkg/bindings/containers/types_rename_options.go2
-rw-r--r--pkg/bindings/containers/types_resizeexectty_options.go2
-rw-r--r--pkg/bindings/containers/types_resizetty_options.go2
-rw-r--r--pkg/bindings/containers/types_restart_options.go2
-rw-r--r--pkg/bindings/containers/types_restore_options.go2
-rw-r--r--pkg/bindings/containers/types_shouldrestart_options.go2
-rw-r--r--pkg/bindings/containers/types_start_options.go2
-rw-r--r--pkg/bindings/containers/types_stats_options.go2
-rw-r--r--pkg/bindings/containers/types_stop_options.go2
-rw-r--r--pkg/bindings/containers/types_top_options.go2
-rw-r--r--pkg/bindings/containers/types_unmount_options.go2
-rw-r--r--pkg/bindings/containers/types_unpause_options.go2
-rw-r--r--pkg/bindings/containers/types_wait_options.go2
-rw-r--r--pkg/bindings/generate/types.go2
-rw-r--r--pkg/bindings/generate/types_kube_options.go2
-rw-r--r--pkg/bindings/generate/types_systemd_options.go18
-rw-r--r--pkg/bindings/generator/generator.go2
-rw-r--r--pkg/bindings/images/types_diff_options.go2
-rw-r--r--pkg/bindings/images/types_exists_options.go2
-rw-r--r--pkg/bindings/images/types_export_options.go2
-rw-r--r--pkg/bindings/images/types_get_options.go2
-rw-r--r--pkg/bindings/images/types_history_options.go2
-rw-r--r--pkg/bindings/images/types_import_options.go2
-rw-r--r--pkg/bindings/images/types_list_options.go2
-rw-r--r--pkg/bindings/images/types_load_options.go2
-rw-r--r--pkg/bindings/images/types_prune_options.go2
-rw-r--r--pkg/bindings/images/types_pull_options.go2
-rw-r--r--pkg/bindings/images/types_push_options.go2
-rw-r--r--pkg/bindings/images/types_remove_options.go2
-rw-r--r--pkg/bindings/images/types_search_options.go2
-rw-r--r--pkg/bindings/images/types_tag_options.go2
-rw-r--r--pkg/bindings/images/types_tree_options.go2
-rw-r--r--pkg/bindings/images/types_untag_options.go2
-rw-r--r--pkg/bindings/internal/util/util.go (renamed from pkg/bindings/util/util.go)0
-rw-r--r--pkg/bindings/manifests/types_add_options.go2
-rw-r--r--pkg/bindings/manifests/types_create_options.go2
-rw-r--r--pkg/bindings/manifests/types_exists_options.go2
-rw-r--r--pkg/bindings/manifests/types_inspect_options.go2
-rw-r--r--pkg/bindings/manifests/types_remove_options.go2
-rw-r--r--pkg/bindings/network/types_connect_options.go2
-rw-r--r--pkg/bindings/network/types_create_options.go2
-rw-r--r--pkg/bindings/network/types_disconnect_options.go2
-rw-r--r--pkg/bindings/network/types_exists_options.go2
-rw-r--r--pkg/bindings/network/types_inspect_options.go2
-rw-r--r--pkg/bindings/network/types_list_options.go2
-rw-r--r--pkg/bindings/network/types_prune_options.go2
-rw-r--r--pkg/bindings/network/types_remove_options.go2
-rw-r--r--pkg/bindings/play/types_kube_options.go2
-rw-r--r--pkg/bindings/pods/types_create_options.go2
-rw-r--r--pkg/bindings/pods/types_exists_options.go2
-rw-r--r--pkg/bindings/pods/types_inspect_options.go2
-rw-r--r--pkg/bindings/pods/types_kill_options.go2
-rw-r--r--pkg/bindings/pods/types_list_options.go2
-rw-r--r--pkg/bindings/pods/types_pause_options.go2
-rw-r--r--pkg/bindings/pods/types_prune_options.go2
-rw-r--r--pkg/bindings/pods/types_remove_options.go2
-rw-r--r--pkg/bindings/pods/types_restart_options.go2
-rw-r--r--pkg/bindings/pods/types_start_options.go2
-rw-r--r--pkg/bindings/pods/types_stats_options.go2
-rw-r--r--pkg/bindings/pods/types_stop_options.go2
-rw-r--r--pkg/bindings/pods/types_top_options.go2
-rw-r--r--pkg/bindings/pods/types_unpause_options.go2
-rw-r--r--pkg/bindings/secrets/types_create_options.go2
-rw-r--r--pkg/bindings/secrets/types_inspect_options.go2
-rw-r--r--pkg/bindings/secrets/types_list_options.go2
-rw-r--r--pkg/bindings/secrets/types_remove_options.go2
-rw-r--r--pkg/bindings/system/types_disk_options.go2
-rw-r--r--pkg/bindings/system/types_events_options.go2
-rw-r--r--pkg/bindings/system/types_info_options.go2
-rw-r--r--pkg/bindings/system/types_prune_options.go2
-rw-r--r--pkg/bindings/system/types_version_options.go2
-rw-r--r--pkg/bindings/volumes/types_create_options.go2
-rw-r--r--pkg/bindings/volumes/types_exists_options.go2
-rw-r--r--pkg/bindings/volumes/types_inspect_options.go2
-rw-r--r--pkg/bindings/volumes/types_list_options.go2
-rw-r--r--pkg/bindings/volumes/types_prune_options.go2
-rw-r--r--pkg/bindings/volumes/types_remove_options.go2
-rw-r--r--pkg/cgroups/cgroups.go24
-rw-r--r--pkg/domain/entities/generate.go2
-rw-r--r--pkg/domain/infra/tunnel/generate.go2
-rw-r--r--pkg/systemd/generate/common.go2
-rw-r--r--pkg/systemd/generate/containers.go10
-rw-r--r--pkg/systemd/generate/containers_test.go59
-rw-r--r--pkg/systemd/generate/pods.go8
-rw-r--r--pkg/systemd/generate/pods_test.go47
110 files changed, 255 insertions, 131 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
diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go
index 6893f5e39..c2da5156b 100644
--- a/pkg/api/server/register_manifest.go
+++ b/pkg/api/server/register_manifest.go
@@ -30,7 +30,8 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// description: add all contents if given list
// responses:
// 200:
- // $ref: "#/definitions/IDResponse"
+ // schema:
+ // $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
@@ -96,7 +97,8 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// $ref: "#/definitions/ManifestAddOpts"
// responses:
// 200:
- // $ref: "#/definitions/IDResponse"
+ // schema:
+ // $ref: "#/definitions/IDResponse"
// 404:
// $ref: "#/responses/NoSuchManifest"
// 409:
@@ -122,7 +124,8 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// description: image digest to be removed
// responses:
// 200:
- // $ref: "#/definitions/IDResponse"
+ // schema:
+ // $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
@@ -153,7 +156,8 @@ func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// type: boolean
// responses:
// 200:
- // $ref: "#/definitions/IDResponse"
+ // schema:
+ // $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go
index e211b0941..949bf80e2 100644
--- a/pkg/api/server/register_pods.go
+++ b/pkg/api/server/register_pods.go
@@ -40,7 +40,8 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
// $ref: "#/definitions/PodSpecGenerator"
// responses:
// 200:
- // $ref: "#/definitions/IdResponse"
+ // schema:
+ // $ref: "#/definitions/IdResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 409:
diff --git a/pkg/bindings/containers/types_attach_options.go b/pkg/bindings/containers/types_attach_options.go
index 3ab848bbb..cb8f9ea65 100644
--- a/pkg/bindings/containers/types_attach_options.go
+++ b/pkg/bindings/containers/types_attach_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_checkpoint_options.go b/pkg/bindings/containers/types_checkpoint_options.go
index b0921460a..a2a9a913e 100644
--- a/pkg/bindings/containers/types_checkpoint_options.go
+++ b/pkg/bindings/containers/types_checkpoint_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_commit_options.go b/pkg/bindings/containers/types_commit_options.go
index f00b1a619..dfb7b2ced 100644
--- a/pkg/bindings/containers/types_commit_options.go
+++ b/pkg/bindings/containers/types_commit_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_create_options.go b/pkg/bindings/containers/types_create_options.go
index 9fcd16fc1..dd8c82c15 100644
--- a/pkg/bindings/containers/types_create_options.go
+++ b/pkg/bindings/containers/types_create_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_diff_options.go b/pkg/bindings/containers/types_diff_options.go
index ee4ed009c..ed356335d 100644
--- a/pkg/bindings/containers/types_diff_options.go
+++ b/pkg/bindings/containers/types_diff_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_execinspect_options.go b/pkg/bindings/containers/types_execinspect_options.go
index aa2ce3976..b14ce9edb 100644
--- a/pkg/bindings/containers/types_execinspect_options.go
+++ b/pkg/bindings/containers/types_execinspect_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_execstart_options.go b/pkg/bindings/containers/types_execstart_options.go
index e67bb1f02..052270c49 100644
--- a/pkg/bindings/containers/types_execstart_options.go
+++ b/pkg/bindings/containers/types_execstart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_execstartandattach_options.go b/pkg/bindings/containers/types_execstartandattach_options.go
index cac23beb1..feda9cc83 100644
--- a/pkg/bindings/containers/types_execstartandattach_options.go
+++ b/pkg/bindings/containers/types_execstartandattach_options.go
@@ -5,7 +5,7 @@ import (
"io"
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_exists_options.go b/pkg/bindings/containers/types_exists_options.go
index efb81679e..a3eefcebf 100644
--- a/pkg/bindings/containers/types_exists_options.go
+++ b/pkg/bindings/containers/types_exists_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_export_options.go b/pkg/bindings/containers/types_export_options.go
index a47bf93fa..d15904bc1 100644
--- a/pkg/bindings/containers/types_export_options.go
+++ b/pkg/bindings/containers/types_export_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_healthcheck_options.go b/pkg/bindings/containers/types_healthcheck_options.go
index 1bf251f0b..edad13fee 100644
--- a/pkg/bindings/containers/types_healthcheck_options.go
+++ b/pkg/bindings/containers/types_healthcheck_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_init_options.go b/pkg/bindings/containers/types_init_options.go
index 6c2e544b9..602608133 100644
--- a/pkg/bindings/containers/types_init_options.go
+++ b/pkg/bindings/containers/types_init_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_inspect_options.go b/pkg/bindings/containers/types_inspect_options.go
index 30d1e42f1..d1f64ea9a 100644
--- a/pkg/bindings/containers/types_inspect_options.go
+++ b/pkg/bindings/containers/types_inspect_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_kill_options.go b/pkg/bindings/containers/types_kill_options.go
index 3bcabb71c..60cb4ae2c 100644
--- a/pkg/bindings/containers/types_kill_options.go
+++ b/pkg/bindings/containers/types_kill_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_list_options.go b/pkg/bindings/containers/types_list_options.go
index 934cbd748..c96b7d880 100644
--- a/pkg/bindings/containers/types_list_options.go
+++ b/pkg/bindings/containers/types_list_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_log_options.go b/pkg/bindings/containers/types_log_options.go
index 8acefa2aa..63f323089 100644
--- a/pkg/bindings/containers/types_log_options.go
+++ b/pkg/bindings/containers/types_log_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_mount_options.go b/pkg/bindings/containers/types_mount_options.go
index 1151e108d..a1d8aef62 100644
--- a/pkg/bindings/containers/types_mount_options.go
+++ b/pkg/bindings/containers/types_mount_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_mountedcontainerpaths_options.go b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
index 4f836f0b9..c4562f43a 100644
--- a/pkg/bindings/containers/types_mountedcontainerpaths_options.go
+++ b/pkg/bindings/containers/types_mountedcontainerpaths_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_pause_options.go b/pkg/bindings/containers/types_pause_options.go
index bcbc17723..fa2ad4995 100644
--- a/pkg/bindings/containers/types_pause_options.go
+++ b/pkg/bindings/containers/types_pause_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_prune_options.go b/pkg/bindings/containers/types_prune_options.go
index af8a0fc27..adba0a4ef 100644
--- a/pkg/bindings/containers/types_prune_options.go
+++ b/pkg/bindings/containers/types_prune_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_remove_options.go b/pkg/bindings/containers/types_remove_options.go
index 90b932bf3..cd4b76ac2 100644
--- a/pkg/bindings/containers/types_remove_options.go
+++ b/pkg/bindings/containers/types_remove_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_rename_options.go b/pkg/bindings/containers/types_rename_options.go
index bc307abcc..96d9aaab5 100644
--- a/pkg/bindings/containers/types_rename_options.go
+++ b/pkg/bindings/containers/types_rename_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_resizeexectty_options.go b/pkg/bindings/containers/types_resizeexectty_options.go
index 6dc4b60a7..d74459822 100644
--- a/pkg/bindings/containers/types_resizeexectty_options.go
+++ b/pkg/bindings/containers/types_resizeexectty_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_resizetty_options.go b/pkg/bindings/containers/types_resizetty_options.go
index c4a6b80fd..68527b330 100644
--- a/pkg/bindings/containers/types_resizetty_options.go
+++ b/pkg/bindings/containers/types_resizetty_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_restart_options.go b/pkg/bindings/containers/types_restart_options.go
index 993dbae3e..18a47fcb6 100644
--- a/pkg/bindings/containers/types_restart_options.go
+++ b/pkg/bindings/containers/types_restart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_restore_options.go b/pkg/bindings/containers/types_restore_options.go
index 3afe71845..ea6c810a2 100644
--- a/pkg/bindings/containers/types_restore_options.go
+++ b/pkg/bindings/containers/types_restore_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_shouldrestart_options.go b/pkg/bindings/containers/types_shouldrestart_options.go
index 32ede7bac..28986d4f8 100644
--- a/pkg/bindings/containers/types_shouldrestart_options.go
+++ b/pkg/bindings/containers/types_shouldrestart_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_start_options.go b/pkg/bindings/containers/types_start_options.go
index e247fc4d5..f8ba29623 100644
--- a/pkg/bindings/containers/types_start_options.go
+++ b/pkg/bindings/containers/types_start_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_stats_options.go b/pkg/bindings/containers/types_stats_options.go
index 0524d1815..8f6a03301 100644
--- a/pkg/bindings/containers/types_stats_options.go
+++ b/pkg/bindings/containers/types_stats_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_stop_options.go b/pkg/bindings/containers/types_stop_options.go
index c0009b0e7..d952f9c29 100644
--- a/pkg/bindings/containers/types_stop_options.go
+++ b/pkg/bindings/containers/types_stop_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_top_options.go b/pkg/bindings/containers/types_top_options.go
index cf774ac3d..a80f2111a 100644
--- a/pkg/bindings/containers/types_top_options.go
+++ b/pkg/bindings/containers/types_top_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_unmount_options.go b/pkg/bindings/containers/types_unmount_options.go
index 4aae72061..6f624081b 100644
--- a/pkg/bindings/containers/types_unmount_options.go
+++ b/pkg/bindings/containers/types_unmount_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_unpause_options.go b/pkg/bindings/containers/types_unpause_options.go
index 85ad7fb01..d6694d4da 100644
--- a/pkg/bindings/containers/types_unpause_options.go
+++ b/pkg/bindings/containers/types_unpause_options.go
@@ -3,7 +3,7 @@ package containers
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/containers/types_wait_options.go b/pkg/bindings/containers/types_wait_options.go
index fb29f0ea7..ea724b619 100644
--- a/pkg/bindings/containers/types_wait_options.go
+++ b/pkg/bindings/containers/types_wait_options.go
@@ -4,7 +4,7 @@ import (
"net/url"
"github.com/containers/podman/v3/libpod/define"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/generate/types.go b/pkg/bindings/generate/types.go
index 4e9d7a0ff..3c9ea87d4 100644
--- a/pkg/bindings/generate/types.go
+++ b/pkg/bindings/generate/types.go
@@ -14,6 +14,8 @@ type SystemdOptions struct {
UseName *bool
// New - create a new container instead of starting a new one.
New *bool
+ // NoHeader - Removes autogenerated by Podman and timestamp if set to true
+ NoHeader *bool
// RestartPolicy - systemd restart policy.
RestartPolicy *string
// StopTimeout - time when stopping the container.
diff --git a/pkg/bindings/generate/types_kube_options.go b/pkg/bindings/generate/types_kube_options.go
index 106eed17f..785e55dd4 100644
--- a/pkg/bindings/generate/types_kube_options.go
+++ b/pkg/bindings/generate/types_kube_options.go
@@ -3,7 +3,7 @@ package generate
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index 368484e51..1cee2e16a 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -3,7 +3,7 @@ package generate
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
@@ -52,6 +52,22 @@ func (o *SystemdOptions) GetNew() bool {
return *o.New
}
+// WithNoHeader
+func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions {
+ v := &value
+ o.NoHeader = v
+ return o
+}
+
+// GetNoHeader
+func (o *SystemdOptions) GetNoHeader() bool {
+ var noHeader bool
+ if o.NoHeader == nil {
+ return noHeader
+ }
+ return *o.NoHeader
+}
+
// WithRestartPolicy
func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions {
v := &value
diff --git a/pkg/bindings/generator/generator.go b/pkg/bindings/generator/generator.go
index fbca567d0..90f0bfaf5 100644
--- a/pkg/bindings/generator/generator.go
+++ b/pkg/bindings/generator/generator.go
@@ -81,7 +81,7 @@ func main() {
panic(err)
}
// always add reflect
- imports := []string{"\"reflect\"", "\"github.com/containers/podman/v3/pkg/bindings/util\""}
+ imports := []string{"\"reflect\"", "\"github.com/containers/podman/v3/pkg/bindings/internal/util\""}
for _, imp := range f.Imports {
imports = append(imports, imp.Path.Value)
}
diff --git a/pkg/bindings/images/types_diff_options.go b/pkg/bindings/images/types_diff_options.go
index 5d7c18cc8..f15a9a696 100644
--- a/pkg/bindings/images/types_diff_options.go
+++ b/pkg/bindings/images/types_diff_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_exists_options.go b/pkg/bindings/images/types_exists_options.go
index 88efb03c8..2326c398b 100644
--- a/pkg/bindings/images/types_exists_options.go
+++ b/pkg/bindings/images/types_exists_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go
index b87c99d12..0c5a3390c 100644
--- a/pkg/bindings/images/types_export_options.go
+++ b/pkg/bindings/images/types_export_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_get_options.go b/pkg/bindings/images/types_get_options.go
index 4d892aa29..33da7b0be 100644
--- a/pkg/bindings/images/types_get_options.go
+++ b/pkg/bindings/images/types_get_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_history_options.go b/pkg/bindings/images/types_history_options.go
index 424fbfd37..191375390 100644
--- a/pkg/bindings/images/types_history_options.go
+++ b/pkg/bindings/images/types_history_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_import_options.go b/pkg/bindings/images/types_import_options.go
index 5eb30adfc..333e841e6 100644
--- a/pkg/bindings/images/types_import_options.go
+++ b/pkg/bindings/images/types_import_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_list_options.go b/pkg/bindings/images/types_list_options.go
index d3d5b2046..e86157f59 100644
--- a/pkg/bindings/images/types_list_options.go
+++ b/pkg/bindings/images/types_list_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_load_options.go b/pkg/bindings/images/types_load_options.go
index 75b5566d6..7b2e504d9 100644
--- a/pkg/bindings/images/types_load_options.go
+++ b/pkg/bindings/images/types_load_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_prune_options.go b/pkg/bindings/images/types_prune_options.go
index 06378b56d..6bd0c0f6f 100644
--- a/pkg/bindings/images/types_prune_options.go
+++ b/pkg/bindings/images/types_prune_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go
index 3ea23fc02..0611c4447 100644
--- a/pkg/bindings/images/types_pull_options.go
+++ b/pkg/bindings/images/types_pull_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go
index 3cb3ec937..2593c2fe0 100644
--- a/pkg/bindings/images/types_push_options.go
+++ b/pkg/bindings/images/types_push_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go
index 81a717bf8..d591aae88 100644
--- a/pkg/bindings/images/types_remove_options.go
+++ b/pkg/bindings/images/types_remove_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_search_options.go b/pkg/bindings/images/types_search_options.go
index a0e95a0b1..a437a0934 100644
--- a/pkg/bindings/images/types_search_options.go
+++ b/pkg/bindings/images/types_search_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_tag_options.go b/pkg/bindings/images/types_tag_options.go
index 1a0e05640..25cb8f68b 100644
--- a/pkg/bindings/images/types_tag_options.go
+++ b/pkg/bindings/images/types_tag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_tree_options.go b/pkg/bindings/images/types_tree_options.go
index b03d2282a..43178113d 100644
--- a/pkg/bindings/images/types_tree_options.go
+++ b/pkg/bindings/images/types_tree_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_untag_options.go b/pkg/bindings/images/types_untag_options.go
index a8004b21e..520cf7a49 100644
--- a/pkg/bindings/images/types_untag_options.go
+++ b/pkg/bindings/images/types_untag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/util/util.go b/pkg/bindings/internal/util/util.go
index c1961308e..c1961308e 100644
--- a/pkg/bindings/util/util.go
+++ b/pkg/bindings/internal/util/util.go
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index 167c42639..09105c590 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go
index e3b549968..5f022c672 100644
--- a/pkg/bindings/manifests/types_create_options.go
+++ b/pkg/bindings/manifests/types_create_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/manifests/types_exists_options.go b/pkg/bindings/manifests/types_exists_options.go
index 301652d99..6f33c2cd5 100644
--- a/pkg/bindings/manifests/types_exists_options.go
+++ b/pkg/bindings/manifests/types_exists_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/manifests/types_inspect_options.go b/pkg/bindings/manifests/types_inspect_options.go
index 104fd8469..7dfa11cb4 100644
--- a/pkg/bindings/manifests/types_inspect_options.go
+++ b/pkg/bindings/manifests/types_inspect_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/manifests/types_remove_options.go b/pkg/bindings/manifests/types_remove_options.go
index 57a5f82ce..7a507cf1a 100644
--- a/pkg/bindings/manifests/types_remove_options.go
+++ b/pkg/bindings/manifests/types_remove_options.go
@@ -3,7 +3,7 @@ package manifests
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_connect_options.go b/pkg/bindings/network/types_connect_options.go
index f51c31be0..c0e7a6f50 100644
--- a/pkg/bindings/network/types_connect_options.go
+++ b/pkg/bindings/network/types_connect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go
index 66e155b7a..5746a5b1f 100644
--- a/pkg/bindings/network/types_create_options.go
+++ b/pkg/bindings/network/types_create_options.go
@@ -4,7 +4,7 @@ import (
"net"
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_disconnect_options.go b/pkg/bindings/network/types_disconnect_options.go
index 37e9f4c72..a73675d4f 100644
--- a/pkg/bindings/network/types_disconnect_options.go
+++ b/pkg/bindings/network/types_disconnect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_exists_options.go b/pkg/bindings/network/types_exists_options.go
index 4861343b6..4f33cdfbb 100644
--- a/pkg/bindings/network/types_exists_options.go
+++ b/pkg/bindings/network/types_exists_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_inspect_options.go b/pkg/bindings/network/types_inspect_options.go
index 6022ae111..9f7497ed5 100644
--- a/pkg/bindings/network/types_inspect_options.go
+++ b/pkg/bindings/network/types_inspect_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_list_options.go b/pkg/bindings/network/types_list_options.go
index c922dcf8e..fcbe23bd6 100644
--- a/pkg/bindings/network/types_list_options.go
+++ b/pkg/bindings/network/types_list_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_prune_options.go b/pkg/bindings/network/types_prune_options.go
index ae26dbece..84e1a8b32 100644
--- a/pkg/bindings/network/types_prune_options.go
+++ b/pkg/bindings/network/types_prune_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/network/types_remove_options.go b/pkg/bindings/network/types_remove_options.go
index 7e3265924..f715c94c9 100644
--- a/pkg/bindings/network/types_remove_options.go
+++ b/pkg/bindings/network/types_remove_options.go
@@ -3,7 +3,7 @@ package network
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/play/types_kube_options.go b/pkg/bindings/play/types_kube_options.go
index d290ceb34..78396a090 100644
--- a/pkg/bindings/play/types_kube_options.go
+++ b/pkg/bindings/play/types_kube_options.go
@@ -3,7 +3,7 @@ package play
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_create_options.go b/pkg/bindings/pods/types_create_options.go
index a29c24794..891ef2e84 100644
--- a/pkg/bindings/pods/types_create_options.go
+++ b/pkg/bindings/pods/types_create_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_exists_options.go b/pkg/bindings/pods/types_exists_options.go
index e235fad37..02423e7ed 100644
--- a/pkg/bindings/pods/types_exists_options.go
+++ b/pkg/bindings/pods/types_exists_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_inspect_options.go b/pkg/bindings/pods/types_inspect_options.go
index a78337015..20ec3a726 100644
--- a/pkg/bindings/pods/types_inspect_options.go
+++ b/pkg/bindings/pods/types_inspect_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_kill_options.go b/pkg/bindings/pods/types_kill_options.go
index 7a9714bfd..fabd45c67 100644
--- a/pkg/bindings/pods/types_kill_options.go
+++ b/pkg/bindings/pods/types_kill_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_list_options.go b/pkg/bindings/pods/types_list_options.go
index cb9bbc5a6..7221c7ff8 100644
--- a/pkg/bindings/pods/types_list_options.go
+++ b/pkg/bindings/pods/types_list_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_pause_options.go b/pkg/bindings/pods/types_pause_options.go
index 91a12b76b..0bbc9c293 100644
--- a/pkg/bindings/pods/types_pause_options.go
+++ b/pkg/bindings/pods/types_pause_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_prune_options.go b/pkg/bindings/pods/types_prune_options.go
index 6740a22ba..0e788f471 100644
--- a/pkg/bindings/pods/types_prune_options.go
+++ b/pkg/bindings/pods/types_prune_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_remove_options.go b/pkg/bindings/pods/types_remove_options.go
index bf1096955..3d3c7ad2a 100644
--- a/pkg/bindings/pods/types_remove_options.go
+++ b/pkg/bindings/pods/types_remove_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_restart_options.go b/pkg/bindings/pods/types_restart_options.go
index ace0a0cbd..9278b7b46 100644
--- a/pkg/bindings/pods/types_restart_options.go
+++ b/pkg/bindings/pods/types_restart_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_start_options.go b/pkg/bindings/pods/types_start_options.go
index 37bc93ffc..d0cb50969 100644
--- a/pkg/bindings/pods/types_start_options.go
+++ b/pkg/bindings/pods/types_start_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_stats_options.go b/pkg/bindings/pods/types_stats_options.go
index 257dab50c..2fb3529ad 100644
--- a/pkg/bindings/pods/types_stats_options.go
+++ b/pkg/bindings/pods/types_stats_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_stop_options.go b/pkg/bindings/pods/types_stop_options.go
index f43317275..443c9120f 100644
--- a/pkg/bindings/pods/types_stop_options.go
+++ b/pkg/bindings/pods/types_stop_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_top_options.go b/pkg/bindings/pods/types_top_options.go
index 6526d9879..ab6501704 100644
--- a/pkg/bindings/pods/types_top_options.go
+++ b/pkg/bindings/pods/types_top_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/pods/types_unpause_options.go b/pkg/bindings/pods/types_unpause_options.go
index 67e7d45d6..f9ea972e6 100644
--- a/pkg/bindings/pods/types_unpause_options.go
+++ b/pkg/bindings/pods/types_unpause_options.go
@@ -3,7 +3,7 @@ package pods
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/secrets/types_create_options.go b/pkg/bindings/secrets/types_create_options.go
index af4516c35..ea5bd3039 100644
--- a/pkg/bindings/secrets/types_create_options.go
+++ b/pkg/bindings/secrets/types_create_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/secrets/types_inspect_options.go b/pkg/bindings/secrets/types_inspect_options.go
index 75831841d..48c2737d0 100644
--- a/pkg/bindings/secrets/types_inspect_options.go
+++ b/pkg/bindings/secrets/types_inspect_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/secrets/types_list_options.go b/pkg/bindings/secrets/types_list_options.go
index 14dcd761c..568e021a8 100644
--- a/pkg/bindings/secrets/types_list_options.go
+++ b/pkg/bindings/secrets/types_list_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/secrets/types_remove_options.go b/pkg/bindings/secrets/types_remove_options.go
index 3da8e8485..dd5ac530a 100644
--- a/pkg/bindings/secrets/types_remove_options.go
+++ b/pkg/bindings/secrets/types_remove_options.go
@@ -3,7 +3,7 @@ package secrets
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/system/types_disk_options.go b/pkg/bindings/system/types_disk_options.go
index 3a7474502..d55139b68 100644
--- a/pkg/bindings/system/types_disk_options.go
+++ b/pkg/bindings/system/types_disk_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/system/types_events_options.go b/pkg/bindings/system/types_events_options.go
index b430c99fd..8b4cff42c 100644
--- a/pkg/bindings/system/types_events_options.go
+++ b/pkg/bindings/system/types_events_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/system/types_info_options.go b/pkg/bindings/system/types_info_options.go
index 5fa8fd37d..2bbb95a2e 100644
--- a/pkg/bindings/system/types_info_options.go
+++ b/pkg/bindings/system/types_info_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/system/types_prune_options.go b/pkg/bindings/system/types_prune_options.go
index 47093a910..f4daa830a 100644
--- a/pkg/bindings/system/types_prune_options.go
+++ b/pkg/bindings/system/types_prune_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/system/types_version_options.go b/pkg/bindings/system/types_version_options.go
index 3bfb85c3b..5e01da583 100644
--- a/pkg/bindings/system/types_version_options.go
+++ b/pkg/bindings/system/types_version_options.go
@@ -3,7 +3,7 @@ package system
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_create_options.go b/pkg/bindings/volumes/types_create_options.go
index 5ff1615ec..0e8274d25 100644
--- a/pkg/bindings/volumes/types_create_options.go
+++ b/pkg/bindings/volumes/types_create_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_exists_options.go b/pkg/bindings/volumes/types_exists_options.go
index 396975cb8..b58b93f38 100644
--- a/pkg/bindings/volumes/types_exists_options.go
+++ b/pkg/bindings/volumes/types_exists_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_inspect_options.go b/pkg/bindings/volumes/types_inspect_options.go
index 9bc3969b0..81bed1363 100644
--- a/pkg/bindings/volumes/types_inspect_options.go
+++ b/pkg/bindings/volumes/types_inspect_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_list_options.go b/pkg/bindings/volumes/types_list_options.go
index ddaf8dd91..9b2c6a3ad 100644
--- a/pkg/bindings/volumes/types_list_options.go
+++ b/pkg/bindings/volumes/types_list_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_prune_options.go b/pkg/bindings/volumes/types_prune_options.go
index 474714fa5..5d52752f2 100644
--- a/pkg/bindings/volumes/types_prune_options.go
+++ b/pkg/bindings/volumes/types_prune_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/volumes/types_remove_options.go b/pkg/bindings/volumes/types_remove_options.go
index 09651e424..5e3fde58a 100644
--- a/pkg/bindings/volumes/types_remove_options.go
+++ b/pkg/bindings/volumes/types_remove_options.go
@@ -3,7 +3,7 @@ package volumes
import (
"net/url"
- "github.com/containers/podman/v3/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go
index f563c51a8..608e1647a 100644
--- a/pkg/cgroups/cgroups.go
+++ b/pkg/cgroups/cgroups.go
@@ -331,18 +331,24 @@ func Load(path string) (*CgroupControl, error) {
control.additionalControllers = controllers
}
if !cgroup2 {
+ oneExists := false
+ // check that the cgroup exists at least under one controller
for name := range handlers {
p := control.getCgroupv1Path(name)
- if _, err := os.Stat(p); err != nil {
- if os.IsNotExist(err) {
- if rootless.IsRootless() {
- return nil, ErrCgroupV1Rootless
- }
- // compatible with the error code
- // used by containerd/cgroups
- return nil, ErrCgroupDeleted
- }
+ if _, err := os.Stat(p); err == nil {
+ oneExists = true
+ break
+ }
+ }
+
+ // if there is no controller at all, raise an error
+ if !oneExists {
+ if rootless.IsRootless() {
+ return nil, ErrCgroupV1Rootless
}
+ // compatible with the error code
+ // used by containerd/cgroups
+ return nil, ErrCgroupDeleted
}
}
return control, nil
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go
index 4a0d7537e..3ec713edf 100644
--- a/pkg/domain/entities/generate.go
+++ b/pkg/domain/entities/generate.go
@@ -18,6 +18,8 @@ type GenerateSystemdOptions struct {
PodPrefix string
// Separator - systemd unit name separator between name/id and prefix
Separator string
+ // NoHeader - skip header generation
+ NoHeader bool
}
// GenerateSystemdReport
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 2484574a7..0e768b30b 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -8,7 +8,7 @@ import (
)
func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, opts entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) {
- options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New)
+ options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New).WithNoHeader(opts.NoHeader)
options.WithPodPrefix(opts.PodPrefix).WithRestartPolicy(opts.RestartPolicy).WithSeparator(opts.Separator)
if to := opts.StopTimeout; to != nil {
options.WithStopTimeout(*opts.StopTimeout)
diff --git a/pkg/systemd/generate/common.go b/pkg/systemd/generate/common.go
index e9902319c..bbd1a5f92 100644
--- a/pkg/systemd/generate/common.go
+++ b/pkg/systemd/generate/common.go
@@ -31,10 +31,12 @@ func validateRestartPolicy(restart string) error {
}
const headerTemplate = `# {{{{.ServiceName}}}}.service
+{{{{- if (eq .GenerateNoHeader false) }}}}
# autogenerated by Podman {{{{.PodmanVersion}}}}
{{{{- if .TimeStamp}}}}
# {{{{.TimeStamp}}}}
{{{{- end}}}}
+{{{{- end}}}}
[Unit]
Description=Podman {{{{.ServiceName}}}}.service
diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go
index 4fb437d08..92c6d8865 100644
--- a/pkg/systemd/generate/containers.go
+++ b/pkg/systemd/generate/containers.go
@@ -65,7 +65,8 @@ type containerInfo struct {
ExecStop string
// ExecStopPost of the unit.
ExecStopPost string
-
+ // Removes autogenerated by Podman and timestamp if set to true
+ GenerateNoHeader bool
// If not nil, the container is part of the pod. We can use the
// podInfo to extract the relevant data.
Pod *podInfo
@@ -292,10 +293,15 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
if info.PodmanVersion == "" {
info.PodmanVersion = version.Version.String()
}
+
+ if options.NoHeader {
+ info.GenerateNoHeader = true
+ info.GenerateTimestamp = false
+ }
+
if info.GenerateTimestamp {
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
}
-
// Sort the slices to assure a deterministic output.
sort.Strings(info.BoundToServices)
diff --git a/pkg/systemd/generate/containers_test.go b/pkg/systemd/generate/containers_test.go
index c007c6eb4..747c54699 100644
--- a/pkg/systemd/generate/containers_test.go
+++ b/pkg/systemd/generate/containers_test.go
@@ -37,9 +37,11 @@ func TestValidateRestartPolicyContainer(t *testing.T) {
}
func TestCreateContainerSystemdUnit(t *testing.T) {
- goodID := `# container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401.service
-# autogenerated by Podman CI
-
+ serviceInfo := `# container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401.service
+`
+ headerInfo := `# autogenerated by Podman CI
+`
+ goodIDContent := `
[Unit]
Description=Podman container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401.service
Documentation=man:podman-generate-systemd(1)
@@ -59,6 +61,8 @@ Type=forking
[Install]
WantedBy=multi-user.target default.target
`
+ goodID := serviceInfo + headerInfo + goodIDContent
+ goodIDNoHeaderInfo := serviceInfo + goodIDContent
goodName := `# container-foobar.service
# autogenerated by Podman CI
@@ -377,11 +381,12 @@ Type=forking
WantedBy=multi-user.target default.target
`
tests := []struct {
- name string
- info containerInfo
- want string
- new bool
- wantErr bool
+ name string
+ info containerInfo
+ want string
+ new bool
+ noHeader bool
+ wantErr bool
}{
{"good with id",
@@ -398,6 +403,23 @@ WantedBy=multi-user.target default.target
goodID,
false,
false,
+ false,
+ },
+ {"good with noHeader",
+ containerInfo{
+ Executable: "/usr/bin/podman",
+ ServiceName: "container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401",
+ ContainerNameOrID: "639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401",
+ RestartPolicy: "always",
+ PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
+ StopTimeout: 22,
+ PodmanVersion: "CI",
+ EnvVariable: EnvVariable,
+ },
+ goodIDNoHeaderInfo,
+ false,
+ true,
+ false,
},
{"good with name",
containerInfo{
@@ -413,6 +435,7 @@ WantedBy=multi-user.target default.target
goodName,
false,
false,
+ false,
},
{"good with name and bound to",
containerInfo{
@@ -429,6 +452,7 @@ WantedBy=multi-user.target default.target
goodNameBoundTo,
false,
false,
+ false,
},
{"bad restart policy",
containerInfo{
@@ -442,6 +466,7 @@ WantedBy=multi-user.target default.target
},
"",
false,
+ false,
true,
},
{"good with name and generic",
@@ -459,6 +484,7 @@ WantedBy=multi-user.target default.target
goodWithNameAndGeneric,
true,
false,
+ false,
},
{"good with explicit short detach param",
containerInfo{
@@ -475,6 +501,7 @@ WantedBy=multi-user.target default.target
goodWithExplicitShortDetachParam,
true,
false,
+ false,
},
{"good with explicit short detach param and podInfo",
containerInfo{
@@ -494,6 +521,7 @@ WantedBy=multi-user.target default.target
goodNameNewWithPodFile,
true,
false,
+ false,
},
{"good with explicit full detach param",
containerInfo{
@@ -510,6 +538,7 @@ WantedBy=multi-user.target default.target
goodNameNewDetach,
true,
false,
+ false,
},
{"good with id and no param",
containerInfo{
@@ -526,6 +555,7 @@ WantedBy=multi-user.target default.target
goodIDNew,
true,
false,
+ false,
},
{"good with explicit detach=true param",
containerInfo{
@@ -542,6 +572,7 @@ WantedBy=multi-user.target default.target
genGoodNewDetach("--detach=true"),
true,
false,
+ false,
},
{"good with explicit detach=false param",
containerInfo{
@@ -558,6 +589,7 @@ WantedBy=multi-user.target default.target
genGoodNewDetach("-d"),
true,
false,
+ false,
},
{"good with explicit detach=false param",
containerInfo{
@@ -574,6 +606,7 @@ WantedBy=multi-user.target default.target
goodNameNewDetachFalseWithCmd,
true,
false,
+ false,
},
{"good with multiple detach=false params",
containerInfo{
@@ -590,6 +623,7 @@ WantedBy=multi-user.target default.target
goodNameNewDetachFalseWithCmd,
true,
false,
+ false,
},
{"good with multiple shorthand params detach first",
containerInfo{
@@ -606,6 +640,7 @@ WantedBy=multi-user.target default.target
genGoodNewDetach("-dti"),
true,
false,
+ false,
},
{"good with multiple shorthand params detach last",
containerInfo{
@@ -622,6 +657,7 @@ WantedBy=multi-user.target default.target
genGoodNewDetach("-tid"),
true,
false,
+ false,
},
{"good with root flags",
containerInfo{
@@ -638,6 +674,7 @@ WantedBy=multi-user.target default.target
goodNewRootFlags,
true,
false,
+ false,
},
{"good with container create",
containerInfo{
@@ -654,6 +691,7 @@ WantedBy=multi-user.target default.target
goodContainerCreate,
true,
false,
+ false,
},
{"good with journald log tag (see #9034)",
containerInfo{
@@ -670,6 +708,7 @@ WantedBy=multi-user.target default.target
goodNewWithJournaldTag,
true,
false,
+ false,
},
{"good with special chars",
containerInfo{
@@ -686,13 +725,15 @@ WantedBy=multi-user.target default.target
goodNewWithSpecialChars,
true,
false,
+ false,
},
}
for _, tt := range tests {
test := tt
t.Run(tt.name, func(t *testing.T) {
opts := entities.GenerateSystemdOptions{
- New: test.new,
+ New: test.new,
+ NoHeader: test.noHeader,
}
got, err := executeContainerTemplate(&test.info, opts)
if (err != nil) != test.wantErr {
diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go
index 343b3c902..8c0401278 100644
--- a/pkg/systemd/generate/pods.go
+++ b/pkg/systemd/generate/pods.go
@@ -70,6 +70,8 @@ type podInfo struct {
ExecStop string
// ExecStopPost of the unit.
ExecStopPost string
+ // Removes autogenerated by Podman and timestamp if set to true
+ GenerateNoHeader bool
}
const podTemplate = headerTemplate + `Requires={{{{- range $index, $value := .RequiredServices -}}}}{{{{if $index}}}} {{{{end}}}}{{{{ $value }}}}.service{{{{end}}}}
@@ -319,6 +321,12 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
if info.PodmanVersion == "" {
info.PodmanVersion = version.Version.String()
}
+
+ if options.NoHeader {
+ info.GenerateNoHeader = true
+ info.GenerateTimestamp = false
+ }
+
if info.GenerateTimestamp {
info.TimeStamp = fmt.Sprintf("%v", time.Now().Format(time.UnixDate))
}
diff --git a/pkg/systemd/generate/pods_test.go b/pkg/systemd/generate/pods_test.go
index 068df38d9..50c8d4556 100644
--- a/pkg/systemd/generate/pods_test.go
+++ b/pkg/systemd/generate/pods_test.go
@@ -37,9 +37,11 @@ func TestValidateRestartPolicyPod(t *testing.T) {
}
func TestCreatePodSystemdUnit(t *testing.T) {
- podGood := `# pod-123abc.service
-# autogenerated by Podman CI
-
+ serviceInfo := `# pod-123abc.service
+`
+ headerInfo := `# autogenerated by Podman CI
+`
+ podContent := `
[Unit]
Description=Podman pod-123abc.service
Documentation=man:podman-generate-systemd(1)
@@ -61,6 +63,8 @@ Type=forking
[Install]
WantedBy=multi-user.target default.target
`
+ podGood := serviceInfo + headerInfo + podContent
+ podGoodNoHeaderInfo := serviceInfo + podContent
podGoodNamedNew := `# pod-123abc.service
# autogenerated by Podman CI
@@ -171,11 +175,12 @@ WantedBy=multi-user.target default.target
`
tests := []struct {
- name string
- info podInfo
- want string
- new bool
- wantErr bool
+ name string
+ info podInfo
+ want string
+ new bool
+ noHeader bool
+ wantErr bool
}{
{"pod",
podInfo{
@@ -192,6 +197,24 @@ WantedBy=multi-user.target default.target
podGood,
false,
false,
+ false,
+ },
+ {"pod noHeader",
+ podInfo{
+ Executable: "/usr/bin/podman",
+ ServiceName: "pod-123abc",
+ InfraNameOrID: "jadda-jadda-infra",
+ RestartPolicy: "always",
+ PIDFile: "/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid",
+ StopTimeout: 42,
+ PodmanVersion: "CI",
+ RequiredServices: []string{"container-1", "container-2"},
+ CreateCommand: []string{"podman", "pod", "create", "--name", "foo", "bar=arg with space"},
+ },
+ podGoodNoHeaderInfo,
+ false,
+ true,
+ false,
},
{"pod with root args",
podInfo{
@@ -208,6 +231,7 @@ WantedBy=multi-user.target default.target
podGood,
false,
false,
+ false,
},
{"pod --new",
podInfo{
@@ -224,6 +248,7 @@ WantedBy=multi-user.target default.target
podGoodNamedNew,
true,
false,
+ false,
},
{"pod --new with root args",
podInfo{
@@ -240,6 +265,7 @@ WantedBy=multi-user.target default.target
podGoodNamedNewWithRootArgs,
true,
false,
+ false,
},
{"pod --new with --replace=false",
podInfo{
@@ -256,6 +282,7 @@ WantedBy=multi-user.target default.target
podGoodNamedNewWithReplaceFalse,
true,
false,
+ false,
},
{"pod --new with double curly braces",
podInfo{
@@ -272,6 +299,7 @@ WantedBy=multi-user.target default.target
podNewLabelWithCurlyBraces,
true,
false,
+ false,
},
}
@@ -279,7 +307,8 @@ WantedBy=multi-user.target default.target
test := tt
t.Run(tt.name, func(t *testing.T) {
opts := entities.GenerateSystemdOptions{
- New: test.new,
+ New: test.new,
+ NoHeader: test.noHeader,
}
got, err := executePodTemplate(&test.info, opts)
if (err != nil) != test.wantErr {