Skip to content

Commit 84ec03c

Browse files
committed
ECOPROJECT-4214 | feat: persist cluster requirements inputs with upsert and add GET endpoint for PDF reuse
Signed-off-by: Ronen Avraham <ravraham@redhat.com>
1 parent 53f7dcb commit 84ec03c

19 files changed

Lines changed: 1408 additions & 273 deletions

api/v1alpha1/openapi.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,63 @@ paths:
662662
application/json:
663663
schema:
664664
$ref: "#/components/schemas/Error"
665+
/api/v1/assessments/{id}/cluster-requirements/stored-input:
666+
get:
667+
tags:
668+
- assessment
669+
description: Get stored cluster requirements input for an assessment cluster
670+
operationId: getAssessmentClusterRequirementsStoredInput
671+
parameters:
672+
- name: id
673+
in: path
674+
description: ID of the assessment
675+
required: true
676+
schema:
677+
type: string
678+
format: uuid
679+
- name: clusterId
680+
in: query
681+
description: ID of the VMware cluster
682+
required: true
683+
schema:
684+
type: string
685+
responses:
686+
"200":
687+
description: Stored cluster requirements input found
688+
content:
689+
application/json:
690+
schema:
691+
$ref: "#/components/schemas/ClusterRequirementsStoredInput"
692+
"400":
693+
description: Bad Request
694+
content:
695+
application/json:
696+
schema:
697+
$ref: "#/components/schemas/Error"
698+
"401":
699+
description: Unauthorized
700+
content:
701+
application/json:
702+
schema:
703+
$ref: "#/components/schemas/Error"
704+
"403":
705+
description: Forbidden
706+
content:
707+
application/json:
708+
schema:
709+
$ref: "#/components/schemas/Error"
710+
"404":
711+
description: Assessment or cluster requirements input not found
712+
content:
713+
application/json:
714+
schema:
715+
$ref: "#/components/schemas/Error"
716+
"500":
717+
description: Internal error
718+
content:
719+
application/json:
720+
schema:
721+
$ref: "#/components/schemas/Error"
665722
/api/v1/assessments/{id}/migration-estimation:
666723
post:
667724
tags:
@@ -2451,6 +2508,49 @@ components:
24512508
- workerNodeCPU
24522509
- workerNodeMemory
24532510

2511+
ClusterRequirementsStoredInput:
2512+
type: object
2513+
description: Stored cluster requirements payload for a cluster
2514+
properties:
2515+
clusterId:
2516+
type: string
2517+
description: ID of the cluster
2518+
cpuOverCommitRatio:
2519+
type: string
2520+
enum: ["1:1", "1:2", "1:4", "1:6"]
2521+
description: CPU over-commit ratio (e.g., "1:4")
2522+
memoryOverCommitRatio:
2523+
type: string
2524+
enum: ["1:1", "1:2", "1:4"]
2525+
description: Memory over-commit ratio (e.g., "1:2")
2526+
workerNodeCPU:
2527+
type: integer
2528+
description: CPU cores per worker node
2529+
workerNodeMemory:
2530+
type: integer
2531+
description: Memory (GB) per worker node
2532+
workerNodeThreads:
2533+
type: integer
2534+
description: Number of CPU threads per worker node
2535+
controlPlaneSchedulable:
2536+
type: boolean
2537+
description: Allow workload scheduling on control plane nodes
2538+
controlPlaneCPU:
2539+
type: integer
2540+
description: CPU cores per control plane node
2541+
controlPlaneMemory:
2542+
type: integer
2543+
description: Memory in GB per control plane node
2544+
controlPlaneNodeCount:
2545+
type: integer
2546+
enum: [1, 3]
2547+
description: Number of control plane nodes
2548+
hostedControlPlane:
2549+
type: boolean
2550+
description: If true, control plane is hosted externally
2551+
required:
2552+
- clusterId
2553+
24542554
ClusterRequirementsResponse:
24552555
type: object
24562556
description: Cluster requirements calculation results

api/v1alpha1/spec.gen.go

Lines changed: 143 additions & 141 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha1/types.gen.go

Lines changed: 74 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)