Add the rhsm.facts stage.

We initially provide a Facts file that stores the `ApiType`. This is the
API that was used to request the compose.
This commit is contained in:
Simon de Vlieger 2022-08-25 12:09:21 +02:00 committed by Tomáš Hozza
parent dba76a1204
commit c5f335bceb
9 changed files with 111 additions and 16 deletions

View file

@ -269,6 +269,10 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
}
imageOptions := distro.ImageOptions{Size: imageType.Size(0)}
imageOptions.Facts = &distro.FactsImageOptions{
ApiType: "cloudapi-v2",
}
if request.Customizations != nil && request.Customizations.Subscription != nil {
imageOptions.Subscription = &distro.SubscriptionImageOptions{
Organization: request.Customizations.Subscription.Organization,