summaryrefslogtreecommitdiff
path: root/libpod/pod_api.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-05-28 10:54:17 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-11 11:01:13 +0200
commit636881ece56f77df4c6a25dc5faa68a740607e3f (patch)
tree0e401a22728ff48071f954135373d519f0c93c14 /libpod/pod_api.go
parent7b85d5c6d272da17bcdb9fb266859c3e5ec8fd09 (diff)
downloadpodman-636881ece56f77df4c6a25dc5faa68a740607e3f.tar.gz
podman-636881ece56f77df4c6a25dc5faa68a740607e3f.tar.bz2
podman-636881ece56f77df4c6a25dc5faa68a740607e3f.zip
pod config: add a `CreateCommand` field
Add a `CreateCommand` field to the pod config which includes the entire `os.Args` at pod-creation. Similar to the already existing field in a container config, we need this information to properly generate generic systemd unit files for pods. It's a prerequisite to support the `--new` flag for pods. Also add the `CreateCommand` to the pod-inspect data, which can come in handy for debugging, general inspection and certainly for the tests that are added along with the other changes. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/pod_api.go')
-rw-r--r--libpod/pod_api.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index e2c4b515d..c8605eb69 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -489,6 +489,7 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) {
Name: p.Name(),
Namespace: p.Namespace(),
Created: p.CreatedTime(),
+ CreateCommand: p.config.CreateCommand,
State: podState,
Hostname: p.config.Hostname,
Labels: p.Labels(),