diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-09 05:11:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-09 05:11:18 -0400 |
commit | e81f8008a346807ad68bea95bad585b53dc7b985 (patch) | |
tree | 1848df4cfafbc5edae42bb77ec38bc8eb4016764 /pkg/specgen/generate | |
parent | 5c7ac1ba7812a99e59251cf49f7fb2a9c2429e11 (diff) | |
parent | 26f48139cea99c24222367a576f56dcd7329943d (diff) | |
download | podman-e81f8008a346807ad68bea95bad585b53dc7b985.tar.gz podman-e81f8008a346807ad68bea95bad585b53dc7b985.tar.bz2 podman-e81f8008a346807ad68bea95bad585b53dc7b985.zip |
Merge pull request #6147 from mheon/fix_inspect_annotations
Add remaining annotations for `podman inspect`
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r-- | pkg/specgen/generate/oci.go | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index a2bb66a44..11b18e2d0 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -321,12 +321,6 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt configSpec.Annotations = make(map[string]string) } - // TODO cidfile is not in specgen; when wiring up cli, we will need to move this out of here - // leaving as a reminder - //if config.CidFile != "" { - // configSpec.Annotations[libpod.InspectAnnotationCIDFile] = config.CidFile - //} - if s.Remove { configSpec.Annotations[define.InspectAnnotationAutoremove] = define.InspectResponseTrue } else { @@ -343,13 +337,11 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt configSpec.Annotations[define.InspectAnnotationPrivileged] = define.InspectResponseFalse } - // TODO Init might not make it into the specgen and therefore is not available here. We should deal - // with this when we wire up the CLI; leaving as a reminder - //if s.Init { - // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseTrue - //} else { - // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseFalse - //} + if s.Init { + configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseTrue + } else { + configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseFalse + } return configSpec, nil } |