From 6e737c59a9983ef635bc401897dabee1761204cf Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Mon, 13 Nov 2023 16:26:41 +0100 Subject: [PATCH] src: add rhel-93 --- api/schema/imageBuilder.yaml | 80 ++++++++++++++++++++++++++ src/Components/ImagesTable/Release.tsx | 1 + src/constants.js | 2 +- src/store/imageBuilderApi.ts | 2 + src/test/fixtures/architectures.ts | 2 +- src/test/fixtures/composes.ts | 8 +-- 6 files changed, 89 insertions(+), 6 deletions(-) diff --git a/api/schema/imageBuilder.yaml b/api/schema/imageBuilder.yaml index 10a4a5e2..e150dafe 100644 --- a/api/schema/imageBuilder.yaml +++ b/api/schema/imageBuilder.yaml @@ -383,6 +383,37 @@ paths: application/json: schema: $ref: '#/components/schemas/Customizations' + /experimental/blueprint: + post: + summary: create blueprint + description: "create blueprint" + operationId: createBlueprint + requestBody: + required: true + description: details of blueprint + content: + application/json: + schema: + $ref: "#/components/schemas/CreateBlueprintRequest" + responses: + '201': + description: blueprint was saved + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBlueprintResponse' + '400': + description: blueprint is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPErrorList' + '403': + description: user is not allowed to create blueprints + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPErrorList' components: schemas: @@ -581,6 +612,43 @@ components: Array of exactly one image request. Having more image requests in one compose is currently not supported. customizations: $ref: '#/components/schemas/Customizations' + CreateBlueprintRequest: + type: object + additionalProperties: false + required: + - name + - description + - distribution + - image_requests + - customizations + properties: + name: + type: string + example: "My Blueprint" + maxLength: 100 + description: + type: string + example: "My blueprint description" + maxLength: 250 + distribution: + $ref: '#/components/schemas/Distributions' + image_requests: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/ImageRequest' + uniqueItems: true + description: | + Array of image requests. Having more image requests in a single blueprint is currently not supported. + customizations: + $ref: '#/components/schemas/Customizations' + CreateBlueprintResponse: + required: + - id + properties: + id: + type: string + format: uuid Distributions: type: string description: | @@ -601,6 +669,7 @@ components: - rhel-90 - rhel-91 - rhel-92 + - rhel-93 - centos-8 - centos-9 - fedora-37 @@ -845,6 +914,17 @@ components: $ref: '#/components/schemas/User' description: "list of users that a customer can add, also specifying their respective groups and SSH keys" + partitioning_mode: + type: string + enum: + - raw + - lvm + - auto-lvm + description: | + Select how the disk image will be partitioned. 'auto-lvm' will use raw unless + there are one or more mountpoints in which case it will use LVM. 'lvm' always + uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions + even when there are one or more mountpoints. User: type: object required: diff --git a/src/Components/ImagesTable/Release.tsx b/src/Components/ImagesTable/Release.tsx index 1c0b7514..767c99b6 100644 --- a/src/Components/ImagesTable/Release.tsx +++ b/src/Components/ImagesTable/Release.tsx @@ -20,6 +20,7 @@ const Release = ({ release }: ReleaseProps) => { 'rhel-90': 'RHEL 9.0', 'rhel-91': 'RHEL 9.1', 'rhel-92': 'RHEL 9.2', + 'rhel-93': 'RHEL 9.3', 'centos-8': 'CentOS Stream 8', 'centos-9': 'CentOS Stream 9', 'fedora-35': 'Fedora 35', diff --git a/src/constants.js b/src/constants.js index 2aa118cb..c0463a13 100644 --- a/src/constants.js +++ b/src/constants.js @@ -4,7 +4,7 @@ export const EDGE_API = '/api/edge/v1'; export const CONTENT_SOURCES_API = '/api/content-sources/v1'; export const PROVISIONING_API = '/api/provisioning/v1'; export const RHEL_8 = 'rhel-88'; -export const RHEL_9 = 'rhel-92'; +export const RHEL_9 = 'rhel-93'; export const CENTOS_8 = 'centos-8'; export const CENTOS_9 = 'centos-9'; export const X86_64 = 'x86_64'; diff --git a/src/store/imageBuilderApi.ts b/src/store/imageBuilderApi.ts index 3bd11027..62de83cd 100644 --- a/src/store/imageBuilderApi.ts +++ b/src/store/imageBuilderApi.ts @@ -201,6 +201,7 @@ export type Distributions = | "rhel-90" | "rhel-91" | "rhel-92" + | "rhel-93" | "centos-8" | "centos-9" | "fedora-37" @@ -309,6 +310,7 @@ export type Customizations = { openscap?: OpenScap; filesystem?: Filesystem[]; users?: User[]; + partitioning_mode?: "raw" | "lvm" | "auto-lvm"; }; export type ComposeRequest = { distribution: Distributions; diff --git a/src/test/fixtures/architectures.ts b/src/test/fixtures/architectures.ts index d0a4af59..f1b27afe 100644 --- a/src/test/fixtures/architectures.ts +++ b/src/test/fixtures/architectures.ts @@ -4,7 +4,7 @@ export const mockArchitecturesByDistro = ( distro: Distributions ): Architectures => { const mockDistros: { [key: string]: Architectures } = { - 'rhel-92': [ + 'rhel-93': [ { arch: 'x86_64', image_types: [ diff --git a/src/test/fixtures/composes.ts b/src/test/fixtures/composes.ts index ec0dd432..231abd79 100644 --- a/src/test/fixtures/composes.ts +++ b/src/test/fixtures/composes.ts @@ -356,7 +356,7 @@ export const mockComposes: ComposesResponseItem[] = [ created_at: '2023-10-17T00:01:02Z', image_name: 'oci-image', request: { - distribution: 'rhel-92', + distribution: 'rhel-93', image_name: 'oci-image', customizations: {}, image_requests: [ @@ -376,7 +376,7 @@ export const mockComposes: ComposesResponseItem[] = [ created_at: currentDateInString, image_name: 'expiring-oci-image', request: { - distribution: 'rhel-92', + distribution: 'rhel-93', image_name: 'oci-image', customizations: {}, image_requests: [ @@ -884,7 +884,7 @@ export const mockStatus = (composeId: string): ComposeStatus => { }, }, request: { - distribution: 'rhel-92', + distribution: 'rhel-93', image_name: 'oci-image', customizations: {}, image_requests: [ @@ -911,7 +911,7 @@ export const mockStatus = (composeId: string): ComposeStatus => { }, }, request: { - distribution: 'rhel-92', + distribution: 'rhel-93', image_name: 'oci-image', customizations: {}, image_requests: [