image-builder icon indicating copy to clipboard operation
image-builder copied to clipboard

API v1 can be simplified for s3 images

Open ondrejbudai opened this issue 3 years ago • 0 comments

Currently, if I want to create a guest-image, I must specify also the upload request:

{
  "distribution": "rhel-90",
  "image_requests": [
    {
      "architecture": "x86_64",
      "image_type": "guest-image",
      "upload_request": {
        "type": "aws.s3",
        "options": {}
      }
    }
  ]
}

The upload request is redundant though, the upload request type can be inferred from the image type (we always upload guest images into s3) and the options are always... empty.

Ideally, I would like to request the image with only:

{
  "distribution": "rhel-90",
  "image_requests": [
    {
      "architecture": "x86_64",
      "image_type": "guest-image"
    }
  ]
}

Much less typing, same result.

ondrejbudai avatar May 27 '22 09:05 ondrejbudai