cloudapi: Add /depsolve/blueprint route

This will allow depsolving blueprints and returning package metadata for
the dependencies.

Related: RHEL-60125
This commit is contained in:
Brian C. Lane 2024-09-13 14:48:13 -07:00 committed by Brian C. Lane
parent 4f3c93ef1e
commit e06e62ca03
2 changed files with 307 additions and 186 deletions

View file

@ -397,6 +397,50 @@ paths:
schema:
$ref: '#/components/schemas/Error'
/depsolve/blueprint:
post:
operationId: postDepsolveBlueprint
summary: Depsolve one or more blueprints
security:
- Bearer: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepsolveRequest'
responses:
'200':
description: Depsolved package list
content:
application/json:
schema:
$ref: '#/components/schemas/DepsolveResponse'
'400':
description: Invalid depsolve request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Auth token is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized to perform operation
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Unexpected error occurred
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/errors/{id}:
get:
operationId: getError
@ -829,6 +873,10 @@ components:
type: string
signature:
type: string
checksum:
type: string
description: 'Optional package checksum using ALGO:HASH form'
example: 'sha256:525788de3dd44497c27d4172568366b20380a6b6707f0a1970473e4d97046a4f'
ComposeRequest:
additionalProperties: false
@ -2208,6 +2256,37 @@ components:
- $ref: '#/components/schemas/ObjectReference'
- $ref: '#/components/schemas/UploadStatus'
DepsolveRequest:
additionalProperties: false
required:
- blueprint
- distribution
- architecture
properties:
repositories:
type: array
items:
$ref: '#/components/schemas/Repository'
distribution:
type: string
example: 'rhel-8'
architecture:
type: string
example: 'x86_64'
blueprint:
$ref: '#/components/schemas/Blueprint'
DepsolveResponse:
type: object
required:
- packages
properties:
packages:
type: array
items:
$ref: '#/components/schemas/PackageMetadata'
description: 'Package list including NEVRA'
parameters:
page:
name: page