New API call for get_creds and responses for cluster management
Change-Id: Ibf787008c0781264be65df6c19b49bfa532d0317
Signed-off-by: shahithya <shahithya.y@tataelxsi.co.in>
diff --git a/osm-openapi.yaml b/osm-openapi.yaml
index a8ad2be..742bbd3 100644
--- a/osm-openapi.yaml
+++ b/osm-openapi.yaml
@@ -4425,6 +4425,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfClusterInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfClusterInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4456,7 +4463,7 @@
description: This API is used to create cluster
operationId: createk8sCluster
requestBody:
- $ref: '#/components/requestBodies/CreateCluster'
+ $ref: '#/components/requestBodies/CreateClusterInfo'
responses:
'201':
description: Created
@@ -4508,6 +4515,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ClusterInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ClusterInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4582,6 +4596,67 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '405':
+ $ref: '#/components/responses/MethodNotAllowed'
+ '406':
+ $ref: '#/components/responses/NotAcceptable'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '422':
+ $ref: '#/components/responses/UnprocessableEntity'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ '503':
+ $ref: '#/components/responses/ServiceUnavailable'
+ '5XX':
+ $ref: '#/components/responses/UnexpectedError'
+ default:
+ $ref: '#/components/responses/UnexpectedError'
+ '/k8scluster/v1/clusters/{cluster_id}/get_creds_file/{operation_id}':
+ parameters:
+ - name: cluster_id
+ in: path
+ required: true
+ description: cluster_id
+ schema:
+ type: string
+ - name: operation_id
+ in: path
+ required: true
+ description: operation_id
+ schema:
+ type: string
+ get:
+ tags:
+ - "K8s Cluster"
+ summary: Get Credentials of the cluster in file format
+ description: This API is used to obtain a kube_config file of a specified cluster.
+ operationId: getCredsfile
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ClusterCreds'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ClusterCreds'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4625,6 +4700,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4668,6 +4750,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4700,7 +4789,7 @@
description: This API is used to create App-profiles
operationId: createAppProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/CreateProfileInfo'
responses:
'201':
description: Created
@@ -4744,6 +4833,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4785,6 +4881,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4816,10 +4919,17 @@
description: This API is used to patch specific App-profile
operationId: patchAppProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/PatchProfileInfo'
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4929,6 +5039,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -4961,7 +5078,7 @@
description: This API is used to create Infra controllerprofiles
operationId: createInfraControllerProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/CreateProfileInfo'
responses:
'201':
description: Created
@@ -5005,6 +5122,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5046,6 +5170,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5077,10 +5208,17 @@
description: This API is used to patch specific Infra controller profile
operationId: patchInfraControllerProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/PatchProfileInfo'
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5190,6 +5328,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5222,7 +5367,7 @@
description: This API is used to create Infra config profiles
operationId: createInfraConfigProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/CreateProfileInfo'
responses:
'201':
description: Created
@@ -5266,6 +5411,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5307,6 +5459,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5338,10 +5497,17 @@
description: This API is used to patch specific Infra config profile
operationId: patchInfraConfigProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/PatchProfileInfo'
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5451,6 +5617,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5483,7 +5656,7 @@
description: This API is used to create resource profiles
operationId: createResourceProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/CreateProfileInfo'
responses:
'201':
description: Created
@@ -5527,6 +5700,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5568,6 +5748,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5599,10 +5786,17 @@
description: This API is used to patch specific resource profile
operationId: patchResourceProfile
requestBody:
- $ref: '#/components/requestBodies/ProfileInfo'
+ $ref: '#/components/requestBodies/PatchProfileInfo'
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5712,6 +5906,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfProfileInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5749,6 +5950,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfOkaPackage'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfOkaPackage'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5835,6 +6043,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OkaPackageList'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OkaPackageList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5873,6 +6088,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5943,6 +6165,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfKsuList'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ArrayOfKsuList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -5974,7 +6203,7 @@
description: This API is used to Add KSU
operationId: addKSU
requestBody:
- $ref: '#/components/requestBodies/MultipleKsu'
+ $ref: '#/components/requestBodies/ArrayOfKsu'
responses:
'201':
description: Created
@@ -6026,6 +6255,13 @@
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KsuList'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/KsuList'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -6061,6 +6297,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -6126,10 +6369,17 @@
description: This API is used to Update multiple KSU
operationId: updateMultipleKSU
requestBody:
- $ref: '#/components/requestBodies/MultipleKsu'
+ $ref: '#/components/requestBodies/ArrayOfKsu'
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -6166,6 +6416,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -6212,10 +6469,10 @@
content:
application/json:
schema:
- $ref: '#/components/schemas/ObjectId'
+ $ref: '#/components/schemas/OpId'
application/yaml:
schema:
- $ref: '#/components/schemas/ObjectId'
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -6259,6 +6516,13 @@
responses:
'202':
description: Accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpId'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/OpId'
'400':
$ref: '#/components/responses/BadRequest'
'401':
@@ -11458,6 +11722,96 @@
enum:
- GRACEFUL
- FORCEFUL
+ operationHistory:
+ type: array
+ items:
+ type: object
+ properties:
+ operationType:
+ type: string
+ gitOperationInfo:
+ type: string
+ op_id:
+ type: integer
+ result:
+ type: string
+ workflowState:
+ type: string
+ resourceState:
+ type: string
+ operationState:
+ type: string
+ creationDate:
+ type: string
+ endDate:
+ type: string
+ operationParams:
+ type: object
+ ArrayOfClusterInfo:
+ type: array
+ items:
+ $ref: '#/components/schemas/ClusterInfo'
+ ClusterInfo:
+ type: object
+ properties:
+ _id:
+ type: integer
+ name:
+ type: string
+ vim_account:
+ type: string
+ location:
+ type: string
+ k8s_version:
+ type: string
+ node_size:
+ type: string
+ node_count:
+ type: integer
+ description:
+ type: string
+ region_name:
+ type: string
+ resource_group:
+ type: string
+ infra_controller_profiles:
+ type: array
+ items:
+ type: integer
+ infra_config_profiles:
+ type: array
+ items:
+ type: integer
+ resource_profiles:
+ type: array
+ items:
+ type: integer
+ app_profiles:
+ type: array
+ items:
+ type: integer
+ credentials:
+ type: object
+ git_name:
+ type: string
+ age_privkey:
+ type: string
+ age_pubkey:
+ type: string
+ operationHistory:
+ $ref: '#/components/schemas/operationHistory'
+ current_operation:
+ type: integer
+ state:
+ type: string
+ operatingState:
+ type: string
+ resourceState:
+ type: string
+ created:
+ type: boolean
+ bootstrap:
+ type: boolean
CreateClusterInfo:
type: object
properties:
@@ -11472,7 +11826,7 @@
node_size:
type: string
node_count:
- type: string
+ type: integer
description:
type: string
region_name:
@@ -11482,31 +11836,61 @@
infra_controller_profiles:
type: array
items:
- type: string
+ type: integer
infra_config_profiles:
type: array
items:
- type: string
+ type: integer
resource_profiles:
type: array
items:
- type: string
+ type: integer
app_profiles:
type: array
items:
- type: string
+ type: integer
+ ClusterCreds:
+ type: string
+ format: yaml|json
ScaleNodeInfo:
type: object
properties:
node_count:
type: integer
- ProfileInfo:
+ CreateProfileInfo:
type: object
properties:
name:
type: string
description:
type: string
+ ArrayOfProfileInfo:
+ type: array
+ items:
+ $ref: '#/components/schemas/ProfileInfo'
+ ProfileInfo:
+ type: object
+ properties:
+ _id:
+ type: integer
+ name:
+ type: string
+ description:
+ type: string
+ default:
+ type: string
+ git_name:
+ type: string
+ state:
+ type: string
+ operatingState:
+ type: string
+ resourceState:
+ type: string
+ current_operation:
+ type: integer
+ operationHistory:
+ $ref: '#/components/schemas/operationHistory'
UpgradeClusterInfo:
type: object
properties:
@@ -11529,6 +11913,31 @@
properties:
_id:
type: string
+ OkaPackageList:
+ type: object
+ properties:
+ _id:
+ type: integer
+ name:
+ type: string
+ description:
+ type: string
+ git_name:
+ type: string
+ state:
+ type: string
+ operatingState:
+ type: string
+ resourceState:
+ type: string
+ current_operation:
+ type: integer
+ operationHistory:
+ $ref: '#/components/schemas/operationHistory'
+ ArrayOfOkaPackage:
+ type: array
+ items:
+ $ref: '#/components/schemas/OkaPackageList'
OkaPackage:
type: object
properties:
@@ -11539,36 +11948,6 @@
package:
type: string
format: binary
- MultipleKsu:
- type: object
- properties:
- ksus:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- profile:
- type: object
- properties:
- _id:
- type: string
- profile_type:
- type: string
- oka:
- type: array
- items:
- type: object
- properties:
- _id:
- type: string
- sw_catalog_path:
- type: string
- transformation:
- type: object
- description:
- type: string
Ksu:
type: object
properties:
@@ -11594,6 +11973,56 @@
type: string
transformation:
type: object
+ ArrayOfKsu:
+ type: object
+ properties:
+ ksus:
+ type: array
+ items:
+ $ref: '#/components/schemas/Ksu'
+ KsuList:
+ type: object
+ properties:
+ _id:
+ type: integer
+ name:
+ type: string
+ description:
+ type: string
+ profile:
+ type: object
+ properties:
+ id:
+ type: string
+ profile_type:
+ type: string
+ oka:
+ type: array
+ items:
+ type: object
+ properties:
+ _id:
+ type: string
+ sw_catalog_path:
+ type: string
+ transformation:
+ type: object
+ git_name:
+ type: string
+ state:
+ type: string
+ operatingState:
+ type: string
+ resourceState:
+ type: string
+ current_operation:
+ type: integer
+ operationHistory:
+ $ref: '#/components/schemas/operationHistory'
+ ArrayOfKsuList:
+ type: array
+ items:
+ $ref: '#/components/schemas/KsuList'
DeleteMultipleKsu:
type: object
properties:
@@ -11995,7 +12424,7 @@
application/yaml:
schema:
$ref: '#/components/schemas/CancelNSLCMOpOccRequest'
- CreateCluster:
+ CreateClusterInfo:
content:
application/json:
schema:
@@ -12019,14 +12448,22 @@
application/yaml:
schema:
$ref: '#/components/schemas/UpgradeClusterInfo'
- ProfileInfo:
+ CreateProfileInfo:
content:
application/json:
schema:
- $ref: '#/components/schemas/ProfileInfo'
+ $ref: '#/components/schemas/CreateProfileInfo'
application/yaml:
schema:
- $ref: '#/components/schemas/ProfileInfo'
+ $ref: '#/components/schemas/CreateProfileInfo'
+ PatchProfileInfo:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateProfileInfo'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/CreateProfileInfo'
AttachDetachProfile:
content:
application/json:
@@ -12035,14 +12472,14 @@
application/yaml:
schema:
$ref: '#/components/schemas/AttachDetachProfile'
- MultipleKsu:
+ ArrayOfKsu:
content:
application/json:
schema:
- $ref: '#/components/schemas/MultipleKsu'
+ $ref: '#/components/schemas/ArrayOfKsu'
application/yaml:
schema:
- $ref: '#/components/schemas/MultipleKsu'
+ $ref: '#/components/schemas/ArrayOfKsu'
Ksu:
content:
application/json: