openapi: 3.0.0 info: title: Telco Cloud Automation Cluster API. description: Telco Cloud Automation Cluster API. termsOfService: https://www.vmware.com/help/legal.html contact: name: VMware license: name: Copyright (c) 2020-2021 VMware, Inc. All rights reserved. version: "1.0" servers: - url: https://{server}/hybridity/api/ variables: server: description: server host name default: localhost tags: - name: Cluster description: Telco Cloud Automation Cluster API paths: /infra/k8s/clusters: get: tags: - Cluster description: Api to get clusters for Telco Cloud Automation operationId: getClusters responses: "200": description: Returns clusters content: application/json: schema: type: array items: $ref: '#/components/schemas/cluster' post: tags: - Infra summary: Api to deploy Kubernetes Cluster for Telco Cloud Automation description: Api to deploy Kubernetes Cluster for Telco Cloud Automation operationId: deployCluster requestBody: description: create cluster content: application/json: schema: $ref: '#/components/schemas/clusterRequest' required: true responses: "200": description: Successfully deployed cluster. content: application/json: schema: $ref: '#/components/schemas/inline_response_200' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/errorResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/errorResponse' /infra/k8s/clusters/{clusterId}: get: tags: - Cluster description: Get K8 cluster operationId: getK8Cluster parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string responses: "200": description: returns cluster with given id content: application/json: schema: $ref: '#/components/schemas/cluster' put: tags: - Infra summary: Api to edit a cluster for Telco Cloud Automation description: Api to edit a cluster for Telco Cloud Automation operationId: editCluster parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string requestBody: description: "null" content: application/json: schema: $ref: '#/components/schemas/cluster' required: true responses: "200": description: Successfully updated cluster. content: application/json: schema: $ref: '#/components/schemas/inline_response_200' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/errorResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/errorResponse' delete: tags: - Cluster description: Delete K8 cluster operationId: undeployInfra parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string responses: "200": description: Delete K8 cluster content: application/json: schema: $ref: '#/components/schemas/inline_response_200_1' /infra/k8s/clusters/{clusterId}/tasks: get: tags: - Cluster description: Get cluster tasks operationId: getClusterTasks parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string responses: "200": description: Get cluster tasks content: application/json: schema: $ref: '#/components/schemas/inline_response_200_2' /infra/k8s/clusters/query: post: tags: - Cluster summary: Api to query Kubernetes Cluster for Telco Cloud Automation description: Api to query Kubernetes Cluster for Telco Cloud Automation operationId: infraClusterQuery requestBody: description: query cluster content: application/json: schema: $ref: '#/components/schemas/body' required: true responses: "200": description: Query cluster response. content: application/json: schema: $ref: '#/components/schemas/cluster' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/errorResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/errorResponse' /infra/k8s/cluster/{clusterId}/nodepool/{nodePoolId}: get: tags: - Infra description: Get K8 cluster node pool operationId: getK8ClusterNodePool parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string - name: nodePoolId in: path required: true style: simple explode: false schema: type: string responses: "200": description: returns cluster with given id content: application/json: schema: $ref: '#/components/schemas/nodePool' put: tags: - Infra summary: Api to edit a node pool description: Api to edit a nodepool operationId: editNodePool parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string - name: nodePoolId in: path required: true style: simple explode: false schema: type: string requestBody: description: edit cluster node pool content: application/json: schema: $ref: '#/components/schemas/nodePool' required: true responses: "200": description: Successfully updated cluster node pool. content: application/json: schema: $ref: '#/components/schemas/nodePool' delete: tags: - Infra description: Delete K8 cluster node pool operationId: deleteNodePool parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string - name: nodePoolId in: path required: true style: simple explode: false schema: type: string responses: "200": description: Delete K8 cluster nodepool content: application/json: schema: $ref: '#/components/schemas/inline_response_200_1' /infra/k8s/cluster/{clusterId}/configurations: get: tags: - Infra description: Get K8 cluster configurations operationId: getClusterConfig parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string responses: "200": description: returns cluster configurations content: application/json: schema: $ref: '#/components/schemas/clusterConfigurations' put: tags: - Infra summary: Api to edit cluster config description: Api to edit cluster config operationId: editClusterConfig parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string requestBody: description: edit cluster node pool content: application/json: schema: $ref: '#/components/schemas/clusterConfigurations' required: true responses: "200": description: Successfully edited cluster config. content: application/json: schema: $ref: '#/components/schemas/inline_response_200' /infra/k8s/cluster/{clusterId}/nodepool: post: tags: - Infra description: Create K8 cluster Node Pools operationId: createClusterNodePool parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string requestBody: description: create cluster node pool content: application/json: schema: $ref: '#/components/schemas/nodePool' required: true responses: "200": description: Successfully created cluster node pool. content: application/json: schema: $ref: '#/components/schemas/nodePool' /infra/k8s/cluster/{clusterId}/nodepools: get: tags: - Infra description: Api to get node pools for Telco Cloud Automation operationId: getClustersNodePools parameters: - name: clusterId in: path required: true style: simple explode: false schema: type: string responses: "200": description: Returns nodepools content: application/json: schema: $ref: '#/components/schemas/nodePoolList' /infra/k8s/clusters/{id}/changePassword: put: tags: - Infra summary: Api to edit Cluster password description: Api to edit Cluster password operationId: changeClusterPassword parameters: - name: id in: path required: true style: simple explode: false schema: type: string requestBody: description: Edit Cluster Password content: application/json: schema: $ref: '#/components/schemas/body_1' required: true responses: "200": description: Successfully triggered update of cluster password content: application/json: schema: $ref: '#/components/schemas/inline_response_200' "500": description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/errorResponse' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/errorResponse' components: schemas: clusterRequest: required: - clusterTemplateId - clusterType - hcxCloudUrl - lbTemplate - masterNodes - name - placementParams - vmTemplate type: object properties: clusterPassword: type: string clusterTemplateId: type: string clusterType: type: string enum: - MANAGEMENT - WORKLOAD description: type: string clusterConfig: $ref: '#/components/schemas/clusterRequest_clusterConfig' hcxCloudUrl: type: string lbTemplate: type: string managementClusterId: type: string masterNodes: type: array items: $ref: '#/components/schemas/clusterRequest_masterNodes' name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?' type: string placementParams: type: array items: $ref: '#/components/schemas/clusterRequest_placementParams' vmTemplate: type: string workerNodes: type: array items: $ref: '#/components/schemas/clusterRequest_workerNodes' cluster: type: object properties: id: type: string clusterName: type: string clusterType: type: string vsphereClusterName: type: string managementClusterId: type: string hcxUUID: type: string status: type: string clusterTemplate: $ref: '#/components/schemas/cluster_clusterTemplate' clusterConfig: $ref: ./components/schemas/clusterConfig.yaml clusterId: type: string clusterUrl: type: string kubeConfig: type: string masterNodes: maxItems: 1 minItems: 1 type: array items: $ref: '#/components/schemas/cluster_masterNodes' workerNodes: type: array items: $ref: '#/components/schemas/cluster_workerNodes' vimId: type: string error: type: string clusterConfigurations: type: object properties: cni: type: array items: $ref: '#/components/schemas/clusterConfigurations_cni' csi: type: array items: $ref: '#/components/schemas/clusterConfigurations_csi' kubernetesVersion: type: string tools: type: array items: $ref: '#/components/schemas/clusterConfigurations_tools' systemSettings: type: array items: $ref: '#/components/schemas/clusterRequest_clusterConfig_systemSettings' clusterTask: type: object properties: entityDetails: $ref: '#/components/schemas/clusterTask_entityDetails' type: type: string status: type: string progress: type: integer message: type: string startTime: type: integer request: $ref: ./components/schemas/clusterRequest.yaml steps: type: array items: type: object taskId: type: string nodePool: required: - cpu - labels - memory - name - networks - placementParams - replica - storage type: object properties: cloneMode: type: string enum: - fullClone - linkedClone cpu: minimum: 1 type: integer id: type: string labels: minItems: 1 type: array items: type: string memory: minimum: 2048 type: integer name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9])' type: string networks: minItems: 1 type: array items: $ref: '#/components/schemas/cluster_networks_1' placementParams: type: array items: $ref: '#/components/schemas/clusterRequest_placementParams' replica: minimum: 1 type: integer storage: minimum: 20 type: integer config: $ref: '#/components/schemas/cluster_config' status: type: string nodes: type: array items: $ref: '#/components/schemas/nodePool_nodes' nodePoolList: type: object properties: items: type: array items: $ref: ./components/schemas/nodePool.yaml errorResponse: type: object properties: errors: type: array items: $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml inline_response_200: type: object properties: id: type: string inline_response_200_1: type: object properties: taskId: type: string inline_response_200_2: type: object properties: items: type: array items: $ref: '#/components/schemas/clusterTask' infrak8sclustersquery_filter: type: object properties: clusterType: type: string status: type: string body: type: object properties: filter: $ref: '#/components/schemas/infrak8sclustersquery_filter' body_1: required: - clusterPassword type: object properties: clusterPassword: type: string clusterRequest_clusterConfig_properties: required: - mountPath - serverIP type: object properties: serverIP: type: string mountPath: type: string clusterRequest_clusterConfig_csi: required: - name - properties type: object properties: name: type: string enum: - nfs_client properties: $ref: '#/components/schemas/clusterRequest_clusterConfig_properties' clusterRequest_clusterConfig_properties_1: type: object properties: extensionId: type: string password: type: string type: type: string enum: - extension - repo url: type: string username: type: string clusterRequest_clusterConfig_tools: required: - name - properties type: object properties: name: type: string enum: - harbor properties: $ref: '#/components/schemas/clusterRequest_clusterConfig_properties_1' clusterRequest_clusterConfig_properties_2: type: object properties: host: type: string port: minimum: 0 type: integer protocol: type: string enum: - udp - tcp clusterRequest_clusterConfig_systemSettings: required: - name - properties type: object properties: name: type: string enum: - syslog properties: $ref: '#/components/schemas/clusterRequest_clusterConfig_properties_2' clusterRequest_clusterConfig: type: object properties: csi: type: array items: $ref: '#/components/schemas/clusterRequest_clusterConfig_csi' tools: type: array items: $ref: '#/components/schemas/clusterRequest_clusterConfig_tools' systemSettings: type: array items: $ref: '#/components/schemas/clusterRequest_clusterConfig_systemSettings' clusterRequest_networks: required: - label - networkName type: object properties: label: type: string networkName: type: string nameservers: type: array items: type: string clusterRequest_placementParams: required: - name - type type: object properties: name: type: string type: type: string clusterRequest_masterNodes: required: - name type: object properties: name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9])' type: string networks: minItems: 1 type: array items: $ref: '#/components/schemas/clusterRequest_networks' placementParams: type: array items: $ref: '#/components/schemas/clusterRequest_placementParams' clusterRequest_workerNodes: required: - name type: object properties: name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9])' type: string networks: type: array items: $ref: '#/components/schemas/clusterRequest_networks' placementParams: type: array items: $ref: '#/components/schemas/clusterRequest_placementParams' cluster_clusterTemplate: type: object properties: name: type: string version: type: string id: type: string cluster_networks: required: - label - networkName type: object properties: label: type: string networkName: type: string cluster_masterNodes: required: - labels - name - replica type: object properties: cpu: minimum: 1 type: integer memory: minimum: 2048 type: integer name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9])' type: string networks: minItems: 1 type: array items: $ref: '#/components/schemas/cluster_networks' storage: minimum: 20 type: integer replica: minimum: 1 type: integer labels: minItems: 1 type: array items: type: string cloneMode: type: string enum: - fullClone - linkedClone cluster_networks_1: required: - networkName type: object properties: label: type: string networkName: type: string cluster_config_cpuManagerPolicy_properties_kubeReserved: type: object properties: cpu: minimum: 1 type: integer memoryInGiB: minimum: 1 type: integer cluster_config_cpuManagerPolicy_properties: type: object properties: kubeReserved: $ref: '#/components/schemas/cluster_config_cpuManagerPolicy_properties_kubeReserved' systemReserved: $ref: '#/components/schemas/cluster_config_cpuManagerPolicy_properties_kubeReserved' cluster_config_cpuManagerPolicy: type: object properties: type: type: string enum: - kubernetes policy: type: string enum: - static - default properties: $ref: '#/components/schemas/cluster_config_cpuManagerPolicy_properties' cluster_config: type: object properties: cpuManagerPolicy: $ref: '#/components/schemas/cluster_config_cpuManagerPolicy' cluster_workerNodes: required: - labels - name - replica type: object properties: cpu: minimum: 1 type: integer memory: minimum: 2048 type: integer name: pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9])' type: string networks: minItems: 1 type: array items: $ref: '#/components/schemas/cluster_networks_1' storage: minimum: 20 type: integer replica: minimum: 1 type: integer labels: minItems: 1 type: array items: type: string cloneMode: type: string enum: - fullClone - linkedClone config: $ref: '#/components/schemas/cluster_config' clusterConfigurations_cni: required: - name type: object properties: name: type: string enum: - calico - multus - whereabouts properties: type: object clusterConfigurations_csi: required: - name type: object properties: name: type: string enum: - vsphere-csi - nfs_client properties: type: object clusterConfigurations_tools: required: - name type: object properties: name: type: string enum: - helm - harbor - nodeconfig-operator version: type: string properties: type: object clusterTask_entityDetails: type: object properties: id: type: string type: type: string name: type: string nodePool_nodes: type: object properties: ip: type: string vmName: type: string responses: InternalServerError: description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/errorResponse' BadRequest: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/errorResponse' securitySchemes: x-hm-authorization: type: apiKey description: Obtained from /hybridity/api/session name: x-hm-authorization in: header