cloudapi: Add /distributions to return distro:arch:image-type

This adds support for listing all of the supported distributions,
their arches, the image types, and their repository details.

This returns 3 nested json objects. The keys for the first layer are the
distribution names. The 2nd layer's keys are the architectures supported
by that distribution, and the 3rd layer's keys are the image types
supported by that distribution:architecture pair. The value of the 3rd
layer is the repository information.

Resolves: RHEL-60133
This commit is contained in:
Brian C. Lane 2024-09-25 17:07:25 -07:00 committed by Brian C. Lane
parent 4b9f1a4956
commit 44ac65b70c
4 changed files with 355 additions and 197 deletions

2
go.mod
View file

@ -47,6 +47,7 @@ require (
github.com/osbuild/images v0.112.0
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d
github.com/osbuild/pulp-client v0.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.20.2
github.com/segmentio/ksuid v1.0.4
github.com/sirupsen/logrus v1.9.3
@ -201,7 +202,6 @@ require (
github.com/opencontainers/selinux v1.11.1 // indirect
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/proglottis/gpgme v0.1.3 // indirect