diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-05 06:42:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 06:42:36 -0400 |
commit | f1323a941c7b5709197def5d10ad79ed24bbbc35 (patch) | |
tree | 3d0e1b98c20b4d5191f86b57d8197bf6daadf4f5 /pkg/domain/infra/abi/generate.go | |
parent | 6862cc667761fe3cb8dd45a3491cdca977d493cf (diff) | |
parent | ebfea2f4f89328ec3f74a8deedb3e727ce89ea59 (diff) | |
download | podman-f1323a941c7b5709197def5d10ad79ed24bbbc35.tar.gz podman-f1323a941c7b5709197def5d10ad79ed24bbbc35.tar.bz2 podman-f1323a941c7b5709197def5d10ad79ed24bbbc35.zip |
Merge pull request #7329 from Luap99/generate-systemd-remote
APIv2 add generate systemd endpoint
Diffstat (limited to 'pkg/domain/infra/abi/generate.go')
-rw-r--r-- | pkg/domain/infra/abi/generate.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index 0b73ddd7e..79bf2291e 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -19,11 +19,11 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, ctr, ctrErr := ic.Libpod.LookupContainer(nameOrID) if ctrErr == nil { // Generate the unit for the container. - s, err := generate.ContainerUnit(ctr, options) + name, content, err := generate.ContainerUnit(ctr, options) if err != nil { return nil, err } - return &entities.GenerateSystemdReport{Output: s}, nil + return &entities.GenerateSystemdReport{Units: map[string]string{name: content}}, nil } // If it's not a container, we either have a pod or garbage. @@ -34,11 +34,11 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, } // Generate the units for the pod and all its containers. - s, err := generate.PodUnits(pod, options) + units, err := generate.PodUnits(pod, options) if err != nil { return nil, err } - return &entities.GenerateSystemdReport{Output: s}, nil + return &entities.GenerateSystemdReport{Units: units}, nil } func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrID string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) { |