basePath: /ladybug definitions: app.CSP: enum: - aws - gcp - azure - alibaba - tencent - openstack - ibm - ncpvpc - ncp - cloudit - nhncloud type: string x-enum-varnames: - CSP_AWS - CSP_GCP - CSP_AZURE - CSP_ALIBABA - CSP_TENCENT - CSP_OPENSTACK - CSP_IBM - CSP_NCPVPC - CSP_NCP - CSP_CLOUDIT - CSP_NHNCLOUD app.ClusterConfigKubernetesReq: properties: etcd: allOf: - $ref: '#/definitions/app.Etcd' enum: - local - external example: local loadbalancer: allOf: - $ref: '#/definitions/app.Loadbalancer' enum: - haproxy - nlb example: haproxy networkCni: allOf: - $ref: '#/definitions/app.NetworkCni' enum: - canal - kilo - flannel - calico example: kilo podCidr: example: 10.244.0.0/16 type: string serviceCidr: example: 10.96.0.0/12 type: string serviceDnsDomain: example: cluster.local type: string storageclass: properties: nfs: $ref: '#/definitions/app.ClusterStorageClassNfsReq' type: object version: example: 1.23.13 type: string type: object app.ClusterConfigReq: properties: installMonAgent: example: "no" type: string kubernetes: $ref: '#/definitions/app.ClusterConfigKubernetesReq' type: object app.ClusterReq: properties: config: $ref: '#/definitions/app.ClusterConfigReq' controlPlane: items: $ref: '#/definitions/app.NodeSetReq' type: array description: type: string label: type: string name: example: cluster-01 type: string serviceType: allOf: - $ref: '#/definitions/app.ServiceType' default: multi enum: - multi - single worker: items: $ref: '#/definitions/app.NodeSetReq' type: array type: object app.ClusterStorageClassNfsReq: properties: path: example: /nfs/data type: string server: example: 163.154.154.89 type: string type: object app.Etcd: enum: - local - external type: string x-enum-varnames: - ETCD_LOCAL - ETCD_EXTERNAL app.Kind: enum: - Status - Cluster - ClusterList - Node - NodeList type: string x-enum-varnames: - KIND_STATUS - KIND_CLUSTER - KIND_CLUSTER_LIST - KIND_NODE - KIND_NODE_LIST app.Loadbalancer: enum: - haproxy - nlb type: string x-enum-varnames: - LB_HAPROXY - LB_NLB app.NetworkCni: enum: - kilo - canal - flannel - calico type: string x-enum-varnames: - NETWORKCNI_KILO - NETWORKCNI_CANAL - NETWORKCNI_FLANNEL - NETWORKCNI_CALICO app.NodeReq: properties: controlPlane: items: $ref: '#/definitions/app.NodeSetReq' type: array worker: items: $ref: '#/definitions/app.NodeSetReq' type: array type: object app.NodeSetReq: properties: connection: example: config-aws-ap-northeast-2 type: string count: example: 3 type: integer role: type: string rootDisk: properties: size: example: default type: string type: example: default type: string type: object spec: example: t2.medium type: string type: object app.ROLE: enum: - control-plane - worker type: string x-enum-varnames: - CONTROL_PLANE - WORKER app.ServiceType: enum: - multi - single type: string x-enum-varnames: - ST_MULTI - ST_SINGLE app.Status: properties: code: type: integer kind: $ref: '#/definitions/app.Kind' message: example: Any message type: string type: object model.Cluster: properties: clusterConfig: type: string cpGroup: type: string cpLeader: type: string createdTime: example: "2022-01-02T12:00:00Z" type: string description: type: string etcd: allOf: - $ref: '#/definitions/app.Etcd' default: local enum: - local - external example: local installMonAgent: default: "yes" example: "no" type: string k8sVersion: type: string kind: $ref: '#/definitions/app.Kind' label: type: string loadbalancer: allOf: - $ref: '#/definitions/app.Loadbalancer' default: haproxy enum: - haproxy - nlb example: haproxy mcis: type: string name: type: string namespace: type: string networkCni: allOf: - $ref: '#/definitions/app.NetworkCni' enum: - canal - kilo nodes: items: $ref: '#/definitions/model.Node' type: array serviceType: allOf: - $ref: '#/definitions/app.ServiceType' default: multi enum: - multi - single status: $ref: '#/definitions/model.ClusterStatus' type: object model.ClusterList: properties: items: items: $ref: '#/definitions/model.Cluster' type: array kind: $ref: '#/definitions/app.Kind' type: object model.ClusterStatus: properties: message: type: string phase: enum: - Pending - Provisioning - Provisioned - Failed type: string reason: type: string type: object model.Node: properties: createdTime: example: "2022-01-02T12:00:00Z" type: string credential: type: string csp: allOf: - $ref: '#/definitions/app.CSP' enum: - aws - gcp - azure - alibaba - tencent - openstack - ibm - cloudit - ncp - ncpvpc - nhncloud cspLabel: type: string kind: $ref: '#/definitions/app.Kind' name: type: string privateIp: type: string publicIp: type: string regionLabel: type: string role: allOf: - $ref: '#/definitions/app.ROLE' enum: - control-plane - worker spec: type: string zoneLabel: type: string type: object model.NodeList: properties: items: items: $ref: '#/definitions/model.Node' type: array kind: $ref: '#/definitions/app.Kind' type: object service.SpecList: properties: connectionName: type: string items: items: $ref: '#/definitions/service.Vmspecs' type: array kind: type: string type: object service.Vmspecs: properties: cpu: properties: clock: description: output - GHz type: string count: description: output type: string type: object memory: description: output type: string name: description: output type: string type: object host: localhost:1470 info: contact: email: contact-to-cloud-barista@googlegroups.com name: API Support url: http://cloud-barista.github.io description: CB-Ladybug REST API license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: CB-Ladybug REST API version: latest paths: /healthy: get: consumes: - application/json description: for health check operationId: Healthy produces: - application/json responses: "200": description: ok schema: type: string summary: Health Check tags: - Default /mcir/connections/{connection}/specs: get: consumes: - application/json description: List Specs operationId: List Spec parameters: - description: Connection Name in: path name: connection required: true type: string - description: string enums enum: - "Y" - "N" in: query name: control-plane required: true type: string - description: if Control-Plane, >= 2 in: query minimum: 1 name: cpu-min type: integer - description: ' <= 99999' in: query maximum: 99999 minimum: 1 name: cpu-max type: integer - description: ' if Control-Plane, >= 2' in: query minimum: 1 name: memory-min type: integer - description: ' <= 99999' in: query maximum: 99999 minimum: 1 name: memory-max type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/service.SpecList' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' summary: List Specs tags: - Mcir /ns/{namespace}/clusters: get: consumes: - application/json description: List all Clusters operationId: ListCluster parameters: - description: Namespace ID in: path name: namespace required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.ClusterList' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' summary: List all Clusters tags: - Cluster post: consumes: - application/json description: Create Cluster operationId: CreateCluster parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Request Body to create cluster in: body name: ClusterReq required: true schema: $ref: '#/definitions/app.ClusterReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.Cluster' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "500": description: Internal Server Error schema: $ref: '#/definitions/app.Status' summary: Create Cluster tags: - Cluster /ns/{namespace}/clusters/{cluster}: delete: consumes: - application/json description: Delete Cluster operationId: DeleteCluster parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/app.Status' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "500": description: Internal Server Error schema: $ref: '#/definitions/app.Status' summary: Delete Cluster tags: - Cluster get: consumes: - application/json description: Get Cluster operationId: GetCluster parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.Cluster' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "404": description: Not Found schema: $ref: '#/definitions/app.Status' summary: Get Cluster tags: - Cluster /ns/{namespace}/clusters/{cluster}/nodes: get: consumes: - application/json description: List all Nodes in specified Cluster operationId: ListNode parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.NodeList' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' summary: List all Nodes in specified Cluster tags: - Node post: consumes: - application/json description: Add Node in specified Cluster operationId: AddNode parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string - description: Request Body to add node in: body name: nodeReq required: true schema: $ref: '#/definitions/app.NodeReq' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.Node' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "500": description: Internal Server Error schema: $ref: '#/definitions/app.Status' summary: Add Node in specified Cluster tags: - Node /ns/{namespace}/clusters/{cluster}/nodes/{node}: delete: consumes: - application/json description: Remove Node in specified Cluster operationId: RemoveNode parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string - description: Node Name in: path name: node required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/app.Status' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "500": description: Internal Server Error schema: $ref: '#/definitions/app.Status' summary: Remove Node in specified Cluster tags: - Node get: consumes: - application/json description: Get Node in specified Cluster operationId: GetNode parameters: - description: Namespace ID in: path name: namespace required: true type: string - description: Cluster Name in: path name: cluster required: true type: string - description: Node Name in: path name: node required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/model.Node' "400": description: Bad Request schema: $ref: '#/definitions/app.Status' "404": description: Not Found schema: $ref: '#/definitions/app.Status' summary: Get Node in specified Cluster tags: - Node securityDefinitions: BasicAuth: type: basic swagger: "2.0"