Feature: 11055 Support of several node groups in clusters created by OSM 46/15246/1 master v18.0 v18.0.0 v18.0.1
authoryshah <shahithya.y@tataelxsi.co.in>
Wed, 18 Jun 2025 04:44:25 +0000 (04:44 +0000)
committeryshah <shahithya.y@tataelxsi.co.in>
Wed, 18 Jun 2025 04:44:25 +0000 (04:44 +0000)
Change-Id: If205183c614c01e7d90bad9b8ebd162e67cdfdff
Signed-off-by: yshah <shahithya.y@tataelxsi.co.in>
osm-openapi.yaml

index ae4d000..673e84e 100644 (file)
@@ -4907,56 +4907,6 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
-  '/k8scluster/v1/clusters/{cluster_id}/update':
-    parameters:
-      - name: cluster_id
-        in: path
-        required: true
-        description: cluster_id
-        schema:
-          type: string
-    post:
-      tags:
-        - "K8s Cluster"
-      summary: Update a Cluster
-      description: This API is used to Update k8s_version, node_count and node_size of a Cluster
-      operationId: updateCluster
-      requestBody:
-        $ref: '#/components/requestBodies/UpdateClusterRequest'
-      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':
-          $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/app_profiles':
     post:
       tags:
@@ -6113,6 +6063,322 @@ paths:
           $ref: '#/components/responses/UnexpectedError'
         default:
           $ref: '#/components/responses/UnexpectedError'
+  '/k8scluster/v1/clusters/{cluster_id}/nodegroup':
+    parameters:
+      - name: cluster_id
+        in: path
+        required: true
+        description: cluster_id
+        schema:
+          type: string
+    get:
+      tags:
+        - "K8s Cluster"
+      summary: Getting NodeGroups in cluster
+      description: This API is used to get nodegroups in specified cluster
+      operationId: getNodeGroup
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ArrayOfNodeGroupInfo'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/ArrayOfNodeGroupInfo'
+        '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'
+    post:
+      tags:
+        - "K8s Cluster"
+      summary: Creating NodeGroups in cluster
+      description: This API is used to create NodeGroup in cluster
+      operationId: createNodeGroup
+      requestBody:
+        $ref: '#/components/requestBodies/CreateNodeGroupRequest'
+      responses:
+        '201':
+          description: Created
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ObjectId'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/ObjectId'
+        '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}/nodegroup/{nodegroup_id}':
+    parameters:
+      - name: cluster_id
+        in: path
+        required: true
+        description: cluster_id
+        schema:
+          type: string
+      - name: nodegroup_id
+        in: path
+        required: true
+        description: nodegroup_id
+        schema:
+          type: string
+    get:
+      tags:
+        - "K8s Cluster"
+      summary: Reading NodeGroups in cluster
+      description: This API is used to reading specific NodeGroups in cluster
+      operationId: readNodeGroups
+      responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/NodeGroupInfo'
+            application/yaml:
+              schema:
+                $ref: '#/components/schemas/NodeGroupInfo'
+        '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'
+    patch:
+      tags:
+        - "K8s Cluster"
+      summary: Patching NodeGroups in cluster
+      description: This API is used to edit name and description of the NodeGroup
+      operationId: patchNodeGroup
+      requestBody:
+        $ref: '#/components/requestBodies/ClusterEditRequest'
+      responses:
+        '202':
+          description: Accepted
+        '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'
+    delete:
+      tags:
+        - "K8s Cluster"
+      summary: Deleting a NodeGroup
+      description: This API is used to delete  a specified nodegroup in specified cluster.
+      operationId: deleteNodeGroup
+      responses:
+        '202':
+          description: Accepted
+        '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}/nodegroup/{nodegroup_id}/scale':
+    parameters:
+      - name: cluster_id
+        in: path
+        required: true
+        description: cluster_id
+        schema:
+          type: string
+      - name: nodegroup_id
+        in: path
+        required: true
+        description: nodegroup_id
+        schema:
+          type: string
+    post:
+      tags:
+        - "K8s Cluster"
+      summary: Scaling NodeGroup
+      description: This API is used to scale the nodes of a specified nodegroup
+      operationId: nodeGroupScaling
+      requestBody:
+        $ref: '#/components/requestBodies/ScaleNode'
+      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':
+          $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}/ksus':
+    parameters:
+      - name: cluster_id
+        in: path
+        required: true
+        description: cluster_id
+        schema:
+          type: string
+    get:
+      tags:
+        - "K8s Cluster"
+      summary:  Listing ksus in cluster
+      description: This API is used to list ksus in specified cluster
+      operationId: listKsus
+      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':
+          $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'
 #END k8s Cluster
 
 # BEGIN OKA packages
@@ -12009,22 +12275,16 @@ components:
           type: string
         resource_group:
           type: string
-        infra_controller_profiles:
+        private_subnet:
           type: array
           items:
-            type: integer
-        infra_config_profiles:
-          type: array
-          items:
-            type: integer
-        resource_profiles:
-          type: array
-          items:
-            type: integer
-        app_profiles:
+            type: string
+        public_subnet:
           type: array
           items:
-            type: integer
+            type: string
+        iam_role:
+          type: string
     RegisterClusterInfo:
       type: object
       properties:
@@ -12049,15 +12309,6 @@ components:
           type: string
         description:
           type: string
-    UpdateClusterRequest:
-      type: object
-      properties:
-        k8s_version:
-          type: string
-        node_count:
-          type: integer
-        node_size:
-          type: string
     ScaleNodeInfo:
       type: object
       properties:
@@ -12102,6 +12353,75 @@ components:
       properties:
         k8s_version:
           type: string
+    NodeGroupInfo:
+      type: object
+      properties:
+        _id:
+          type: integer
+        cluster_id:
+          type: integer
+        name:
+          type: string
+        description:
+          type: string
+        node_count:
+          type: integer
+        node_size:
+          type: string
+        private_subnet:
+          type: array
+          items:
+            type: string
+        public_subnet:
+          type: array
+          items:
+            type: string
+        iam_role:
+          type: string
+        git_name:
+          type: string
+        state:
+          type: string
+        operatingState:
+          type: string
+        resourceState:
+          type: string
+        current_operation:
+          type: integer
+        operationHistory:
+          $ref: '#/components/schemas/operationHistory'
+    ArrayOfNodeGroupInfo:
+      type: array
+      items:
+        $ref: '#/components/schemas/NodeGroupInfo'
+    CreateNodeGroupRequest:
+      type: object
+      properties:
+        name:
+          type: string
+        description:
+          type: string
+        node_count:
+          type: integer
+        node_size:
+          type: string
+        private_subnet:
+          type: array
+          items:
+            type: string
+        public_subnet:
+          type: array
+          items:
+            type: string
+        iam_role:
+          type: string
+      required:
+        - name
+        - node_count
+        - node_size
+        - private_subnet
+        - public_subnet
+      additionalProperties: false
     AttachDetachProfile:
       type: object
       properties:
@@ -12654,14 +12974,6 @@ components:
         application/yaml:
           schema:
             $ref: '#/components/schemas/ClusterEditRequest'
-    UpdateClusterRequest:
-      content:
-        application/json:
-          schema:
-            $ref: '#/components/schemas/UpdateClusterRequest'
-        application/yaml:
-          schema:
-            $ref: '#/components/schemas/UpdateClusterRequest'
     ScaleNode:
       content:
           application/json:
@@ -12678,6 +12990,14 @@ components:
           application/yaml:
             schema:
               $ref: '#/components/schemas/UpgradeClusterInfo'
+    CreateNodeGroupRequest:
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/CreateNodeGroupRequest'
+        application/yaml:
+          schema:
+            $ref: '#/components/schemas/CreateNodeGroupRequest'
     CreateProfileInfo:
       content:
           application/json: