summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-02-16 06:44:45 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2022-02-22 15:08:58 -0500
commit6f7a803d06e1fe5e760fcd87959f3290b7c460d2 (patch)
treec632ab7fbd856cde677657030567e936d5440e70 /pkg/domain/infra/abi
parentd3903a85910979d8212028cf814574047015db58 (diff)
downloadpodman-6f7a803d06e1fe5e760fcd87959f3290b7c460d2.tar.gz
podman-6f7a803d06e1fe5e760fcd87959f3290b7c460d2.tar.bz2
podman-6f7a803d06e1fe5e760fcd87959f3290b7c460d2.zip
Cleanup display of trust with transports
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/trust.go20
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{}