Skip to content

Commit

Permalink
Updating API to address the comments of PR280
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Vicens <[email protected]>
  • Loading branch information
felipevicens committed Jul 9, 2024
1 parent b291c76 commit d6fbf60
Showing 1 changed file with 61 additions and 43 deletions.
104 changes: 61 additions & 43 deletions code/API_definitions/Edge-Application-Management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -897,13 +897,19 @@ components:
and the value of the Edge Cloud Provider
object. This value is used to identify an Edge Cloud zone
between Edge Clouds from different Edge Cloud Providers.
required:
- edgeCloudZoneId
- edgeCloudZoneName
- edgeCloudProvider
properties:
edgeCloudZoneId:
$ref: '#/components/schemas/EdgeCloudZoneId'
edgeCloudZoneName:
$ref: '#/components/schemas/EdgeCloudZoneName'
edgeCloudZoneStatus:
$ref: '#/components/schemas/EdgeCloudZoneStatus'
edgeCloudZoneFlavors:
$ref: '#/components/schemas/EdgeCloudZoneFlavors'
edgeCloudProvider:
$ref: '#/components/schemas/EdgeCloudProvider'
edgeCloudRegion:
Expand All @@ -925,6 +931,14 @@ components:
- unknown
default: unknown

EdgeCloudZoneFlavors:
description: List of unique Name IDs of Infrastructure Flavors
type: array
items:
type: string
description: Flavor ID
example: A1.2C2M.GPU8G

ErrorInfo:
type: object
description: Information about the error
Expand Down Expand Up @@ -968,7 +982,7 @@ components:
and storage capacity. (i.e - A1.2C4M.GPU8G, A1.2C4M.GPU16G, A1.4C8M,..)
example: A1.2C2M.GPU8G

NodePools:
NodePool:
description: |
Set of worker nodes in a Kubernetes cluster.
type: object
Expand Down Expand Up @@ -1006,18 +1020,6 @@ components:
default: false
description: Enable ingress for Kubernetes cluster.

VmAddons:
description: |
Addons for the Virtual Machine.
type: object
properties:
dockerCompose:
type: boolean
example: true
default: false
description: |
Enable docker-compose in the virtual machine to deploy applications.
K8sNetworking:
description: |
Kubernetes networking definition
Expand Down Expand Up @@ -1095,7 +1097,7 @@ components:
millivcpu, or millivcpu (i.e 500m) format.
example: "500m"

Kubernetes:
KubernetesResources:
description: Definition of Kubernetes Cluster Infrastructure.
type: object
required:
Expand All @@ -1112,18 +1114,20 @@ components:
type: string
description: Minimum Kubernetes Version.
example: "1.29"
controlNodes:
type: integer
description: Number of nodes for Kubernetes control plane.
enum:
- 1
- 3
controlPlaneHa:
type: boolean
description: |
True: Enable High avaliability of Kubernetes
control plane (3 nodes)
False: Disable High avaliability of Kubernetes
control plane (1 node)
default: false
nodePools:
type: array
description: |
Description of worker node set in a Kubernetes cluster.
items:
$ref: '#/components/schemas/NodePools'
$ref: '#/components/schemas/NodePool'
additionalStorage:
type: string
description: |
Expand All @@ -1135,9 +1139,8 @@ components:
addons:
$ref: '#/components/schemas/K8sAddons'


VirtualMachine:
description: Virtual Machine Infrastructure Definition
VmResources:
description: Definition of Virtual Machine Infrastructure
type: object
required:
- flavor
Expand All @@ -1146,18 +1149,33 @@ components:
infraKind:
description: Type of infrastructure for the application.
type: string
example: VirtualMachine
example: virtualMachine
enum:
- VirtualMachine
- virtualMachine
flavor:
$ref: '#/components/schemas/Flavor'
additionalStorages:
$ref: '#/components/schemas/AdditionalStorage'
addons:
$ref: '#/components/schemas/VmAddons'

DockerComposeResources:
description: Definition of Docker Compose Infrastructure
type: object
required:
- flavor
- infraKind
properties:
infraKind:
description: Type of infrastructure for the application.
type: string
example: dockerCompose
enum:
- dockerCompose
flavor:
$ref: '#/components/schemas/Flavor'
additionalStorages:
$ref: '#/components/schemas/AdditionalStorage'

Container:
ContainerResources:
description: Container Infrastructure Definition
type: object
required:
Expand All @@ -1169,9 +1187,9 @@ components:
infraKind:
description: Type of infrastructure for the application.
type: string
example: containers
example: container
enum:
- containers
- container
numCPU:
$ref: '#/components/schemas/Vcpu'
memory:
Expand Down Expand Up @@ -1254,18 +1272,18 @@ components:
description: |
Fundamental hardware requirements to be provisioned by the
Application Provider.
type: array
items:
oneOf:
- $ref: "#/components/schemas/Kubernetes"
- $ref: "#/components/schemas/VirtualMachine"
- $ref: "#/components/schemas/Container"
discriminator:
propertyName: infraKind
mapping:
kubernetes: "#/components/schemas/Kubernetes"
virtualMachine: "#/components/schemas/VirtualMachine"
container: "#/components/schemas/Container"
oneOf:
- $ref: "#/components/schemas/KubernetesResources"
- $ref: "#/components/schemas/VmResources"
- $ref: "#/components/schemas/ContainerResources"
- $ref: "#/components/schemas/DockerComposeResources"
discriminator:
propertyName: infraKind
mapping:
kubernetes: "#/components/schemas/KubernetesResources"
virtualMachine: "#/components/schemas/VmResources"
container: "#/components/schemas/ContainerResources"
dockerCompose: "#/components/schemas/DockerComposeResources"

SubmittedApp:
description: Information about the submitted app
Expand Down

0 comments on commit d6fbf60

Please sign in to comment.