diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-23 00:46:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 00:46:51 -0500 |
commit | ccb96a2791fe9ae58a697bf1715600ecec8b246b (patch) | |
tree | 92add99773bfc2f3d68c550e09a46a177d7789b2 /pkg/domain | |
parent | bc0e084f2d909eeeacbe17938cb1ef8dbc90f7a2 (diff) | |
parent | 6f7a803d06e1fe5e760fcd87959f3290b7c460d2 (diff) | |
download | podman-ccb96a2791fe9ae58a697bf1715600ecec8b246b.tar.gz podman-ccb96a2791fe9ae58a697bf1715600ecec8b246b.tar.bz2 podman-ccb96a2791fe9ae58a697bf1715600ecec8b246b.zip |
Merge pull request #13247 from rhatdan/trust
Cleanup display of trust with transports
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/infra/abi/trust.go | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go index 3777c1d3b..df4081349 100644 --- a/pkg/domain/infra/abi/trust.go +++ b/pkg/domain/infra/abi/trust.go @@ -122,18 +122,24 @@ func getPolicyShowOutput(policyContentStruct trust.PolicyContent, systemRegistri if len(policyContentStruct.Default) > 0 { defaultPolicyStruct := trust.Policy{ - Name: "* (default)", - RepoName: "default", - Type: trustTypeDescription(policyContentStruct.Default[0].Type), + Transport: "all", + Name: "* (default)", + RepoName: "default", + Type: trustTypeDescription(policyContentStruct.Default[0].Type), } output = append(output, &defaultPolicyStruct) } - for _, transval := range policyContentStruct.Transports { + for transport, transval := range policyContentStruct.Transports { + if transport == "docker" { + transport = "repository" + } + for repo, repoval := range transval { tempTrustShowOutput := trust.Policy{ - Name: repo, - RepoName: repo, - Type: repoval[0].Type, + Name: repo, + RepoName: repo, + Transport: transport, + Type: trustTypeDescription(repoval[0].Type), } // TODO - keyarr is not used and I don't know its intent; commenting out for now for someone to fix later //keyarr := []string{} |