First version of documentation for rApp Manager 33/12133/9
authoraravind.est <aravindhan.a@est.tech>
Mon, 27 Nov 2023 15:17:22 +0000 (15:17 +0000)
committeraravind.est <aravindhan.a@est.tech>
Thu, 30 Nov 2023 12:47:34 +0000 (12:47 +0000)
rApp Manager documentation added.
This doesn't include participant related documentation.

Issue-ID: NONRTRIC-957
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: Ib9f0db9dbc1ebb493e290fd32a2b958952ca69f4

16 files changed:
.readthedocs.yaml [new file with mode: 0755]
docs/_static/logo.png [new file with mode: 0755]
docs/api-docs.rst [new file with mode: 0755]
docs/conf.py [new file with mode: 0755]
docs/conf.yaml [new file with mode: 0755]
docs/developer-guide.rst [new file with mode: 0755]
docs/favicon.ico [new file with mode: 0755]
docs/images/rApp-package-2.png
docs/images/swagger.png [new file with mode: 0755]
docs/images/yaml_logo.png [new file with mode: 0755]
docs/index.rst [new file with mode: 0755]
docs/installation-guide.rst [new file with mode: 0755]
docs/overview.rst [new file with mode: 0755]
docs/release-notes.rst [new file with mode: 0755]
docs/requirements-docs.txt
openapi/rappmanager/rappmanager-spec.json [new file with mode: 0755]

diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100755 (executable)
index 0000000..cd2f8dc
--- /dev/null
@@ -0,0 +1,33 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+---
+version: 2
+
+formats:
+  - htmlzip
+
+build:
+  image: latest
+
+python:
+  version: 3.7
+  install:
+    - requirements: docs/requirements-docs.txt
+
+sphinx:
+  configuration: docs/conf.py
diff --git a/docs/_static/logo.png b/docs/_static/logo.png
new file mode 100755 (executable)
index 0000000..c3b6ce5
Binary files /dev/null and b/docs/_static/logo.png differ
diff --git a/docs/api-docs.rst b/docs/api-docs.rst
new file mode 100755 (executable)
index 0000000..4ba20ec
--- /dev/null
@@ -0,0 +1,31 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+.. _api_docs:
+
+.. |swagger-icon| image:: ./images/swagger.png
+                  :width: 40px
+
+.. |yaml-icon| image:: ./images/yaml_logo.png
+                  :width: 40px
+
+
+========
+API-Docs
+========
+
+Here we describe the API to access the Non-RT RIC rApp Manager.
+
+rApp Manager
+============
+
+See `rApp Manager API <./rappmanager-api.html>`_ for full details of the API.
+
+The API is also described in Swagger-JSON and YAML:
+
+.. csv-table::
+   :header: "API name", "|swagger-icon|", "|yaml-icon|"
+   :widths: 15,5,5
+
+   "rApp Manager API", ":download:`link <../openapi/rappmanager/rappmanager-spec.json>`", ":download:`link <../openapi/rappmanager/rappmanager-spec.yaml>`"
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100755 (executable)
index 0000000..b7d7c49
--- /dev/null
@@ -0,0 +1,46 @@
+#  ============LICENSE_START======================================================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+#  ===============================================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END========================================================================
+
+from docs_conf.conf import *
+
+#branch configuration
+
+branch = 'latest'
+
+linkcheck_ignore = [
+    'http://localhost.*',
+    'http://127.0.0.1.*',
+    'https://gerrit.o-ran-sc.org.*',
+    './rappmanager-api.html', #Generated file that doesn't exist at link check.
+]
+
+extensions = ['sphinxcontrib.redoc', 'sphinx.ext.intersphinx',]
+
+redoc = [
+            {
+                'name': 'rApp Manager API',
+                'page': 'rappmanager-api',
+                'spec': '../openapi/rappmanager/rappmanager-spec.yaml',
+                'embed': True,
+            }
+        ]
+
+redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js'
+
+#intershpinx mapping with other projects
+intersphinx_mapping = {}
+
+intersphinx_mapping['nonrtric'] = ('https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric/en/%s' % branch, None)
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100755 (executable)
index 0000000..ad3629b
--- /dev/null
@@ -0,0 +1,3 @@
+---
+project_cfg: oran
+project: nonrtric-plt-rappmanager
\ No newline at end of file
diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst
new file mode 100755 (executable)
index 0000000..e1dea3c
--- /dev/null
@@ -0,0 +1,61 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+Developer Guide
+===============
+
+This document provides a quickstart for developers of the Non-RT RIC rApp Manager.
+
+Additional developer guides are available on the `O-RAN SC NONRTRIC Developer wiki <https://wiki.o-ran-sc.org/display/RICNR/Release+I>`_.
+
+The rApp Manager is a Java 17 web application built using the Spring Framework. Using Spring Boot
+dependencies, it runs as a standalone application.
+
+Its main functionality is to lifecycle manage rApps.
+
+Start standalone
+++++++++++++++++
+
+The project uses Maven. To start the rApp Manager as a freestanding application, run the following
+command in the *rappmanager/rapp-manager-application* directory:
+
+    +-----------------------------+
+    | mvn spring-boot:run         |
+    +-----------------------------+
+
+There are a few service endpoints that needs to be available to run. These are referred to from the application.yaml file.
+The following properties have to be modified:
+
+* rappmanager.acm.baseurl=http://policy-clamp-runtime-acm.default:6969/onap/policy/clamp/acm/v2/
+* rappmanager.sme.baseurl=http://capifcore:8090
+* rappmanager.dme.baseurl=http://informationservice:9082
+
+
+Start in Docker
++++++++++++++++
+
+To build and deploy the rApp Manager, go to the *rappmanager/rapp-manager-application* folder and run the
+following command:
+
+    +-----------------------------+
+    | mvn clean install           |
+    +-----------------------------+
+
+Then start the container by running the following command:
+
+    +-------------------------------------+
+    | docker run nonrtric-plt-rappmanager |
+    +-------------------------------------+
+
+Kubernetes deployment
++++++++++++++++++++++
+
+Non-RT RIC can be also deployed in a Kubernetes cluster, `it/dep repository <https://gerrit.o-ran-sc.org/r/admin/repos/it/dep>`_.
+hosts deployment and integration artifacts. Instructions and helm charts to deploy the Non-RT-RIC functions in the
+OSC NONRTRIC integrated test environment can be found in the *./nonrtric* directory.
+
+For more information on installation of NonRT-RIC in Kubernetes, see `Deploy NONRTRIC in Kubernetes <https://wiki.o-ran-sc.org/display/RICNR/Release+I+-+Run+in+Kubernetes>`_.
+
+For more information see `Integration and Testing documentation in the O-RAN-SC <https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/index.html>`_.
+
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100755 (executable)
index 0000000..00b0fd0
Binary files /dev/null and b/docs/favicon.ico differ
index 24e9fb1..eac38d2 100755 (executable)
Binary files a/docs/images/rApp-package-2.png and b/docs/images/rApp-package-2.png differ
diff --git a/docs/images/swagger.png b/docs/images/swagger.png
new file mode 100755 (executable)
index 0000000..f5a9e0c
Binary files /dev/null and b/docs/images/swagger.png differ
diff --git a/docs/images/yaml_logo.png b/docs/images/yaml_logo.png
new file mode 100755 (executable)
index 0000000..0492eb4
Binary files /dev/null and b/docs/images/yaml_logo.png differ
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100755 (executable)
index 0000000..d17798e
--- /dev/null
@@ -0,0 +1,16 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+Non-RT RIC rApp Manager
+=======================
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   ./overview.rst
+   ./developer-guide.rst
+   ./api-docs.rst
+   ./installation-guide.rst
+   ./release-notes.rst
diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst
new file mode 100755 (executable)
index 0000000..0e629da
--- /dev/null
@@ -0,0 +1,89 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+Installation Guide
+==================
+
+Abstract
+--------
+
+This document describes how to install the Non-RT RIC components, their dependencies and required system resources.
+
+Software Installation and Deployment
+------------------------------------
+
+Install with Helm
++++++++++++++++++
+
+Helm charts and an example recipe are provided in the `it/dep repo <https://gerrit.o-ran-sc.org/r/admin/repos/it/dep>`_,
+under "nonrtric". By modifying the variables named "installXXX" in the beginning of the example recipe file, which
+components that will be installed can be controlled. Then the components can be installed and started by running the
+following command:
+
+      .. code-block:: bash
+
+        bin/deploy-nonrtric -f nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
+
+Install with dependent components
++++++++++++++++++++++++++++++++++
+
+The scripts for the deployments of rApp Manager and its dependent components are available in *rappmanager/scripts/install* directory.
+
+ACM components should be configured with couple of other components for the participants to work.
+
+In case some of the installation is already setup or not set by the installation scripts, the below environment variables can be used to set the configurations ACM through installation scripts.
+
++--------------------+--------------------------------------------+----------------------------------------------+
+| **Variable Name**  | **Description**                            | **Default Value**                            |
++--------------------+--------------------------------------------+----------------------------------------------+
+| CHART_REPO_HOST    | Address of the chart repository.           | \http://IP_ADDRESS:8879/charts               |
+|                    |                                            |                                              |
+|                    | It will be used by Kubernetes participant. | IP_ADDRESS: IP of the host in which          |
+|                    |                                            | the installation scripts are running.        |
++--------------------+--------------------------------------------+----------------------------------------------+
+| A1PMS_HOST         | Address of the A1PMS.                      | \http://policymanagementservice.nonrtric:9080|
+|                    |                                            |                                              |
+|                    | It will be accessed from A1PMS participant.|                                              |
++--------------------+--------------------------------------------+----------------------------------------------+
+
+All components can be installed using the command below,
+
+      .. code-block:: bash
+
+        ./install-all.sh
+
+Individual components can be installed using the commands below,
+
+To install the tools required for other installer scripts.
+
+      .. code-block:: bash
+
+        ./install-base.sh
+
+To install the ACM, and it's related components.
+
+      .. code-block:: bash
+
+        ./install-acm.sh
+
+To install the Kserve, and it's related components.
+
+      .. code-block:: bash
+
+        ./install-kserve.sh
+
+To installs the NONRTRIC components.
+
+      .. code-block:: bash
+
+        ./install-nonrtric.sh
+
+
+Uninstallation
+++++++++++++++
+To uninstall all the components
+
+      .. code-block:: bash
+
+        ./uninstall-all.sh
diff --git a/docs/overview.rst b/docs/overview.rst
new file mode 100755 (executable)
index 0000000..9a274c3
--- /dev/null
@@ -0,0 +1,107 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+rApp Manager
+~~~~~~~~~~~~
+
+The rApp Manager is a lifecycle management service for rApps. It gets the rApp as an ASD formatted package and lifecycle manages it based on it instance configuration. It uses ONAP ACM for lifecycle management operations and it integrates with other components for managing the rApp.
+
+The ASD package contains the details required to create and integrate the required services/components.
+The ASD package contains only one rApp and one rApp can have any number of rApp instances.
+
+This product is a part of :doc:`NONRTRIC <nonrtric:index>`.
+
+************
+Architecture
+************
+
+.. image:: ./images/architecture.png
+   :width: 500pt
+
+
+**********
+Data Model
+**********
+
+.. image:: ./images/rApp-entity-relationship.png
+   :width: 500pt
+
+************
+Integrations
+************
+
+The rApp Manager is integrated with the following components to support lifecycle managing the rApp.
+
+ACM
+---
+Automation Composition Management (ACM) is a framework that supports Life Cycle Management of Automation Compositions. It supports deployment, monitoring, update and removal of Automation Compositions en-bloc, allowing users to manage their features, services, and capabilities as single logical units.
+More details about ACM can be found in `ACM <https://docs.onap.org/projects/onap-policy-parent/en/latest/clamp/acm/acm-architecture.html#introduction>`_.
+
+ACM-R has the ability to support an unlimited number of participants and all the participants can be configured through the configuration in the rApp package.
+
+List of participants used by rApp manager sample rApp.
+
+* A1PMS Participant - It interacts with A1PMS of NONRTRIC. It is capable of lifecycle managing A1PMS service.
+* Kserve Participant - It interacts with Kserve. It is capable of lifecycle managing Kserve inference service.
+* Kubernetes Participant - It interacts with Helm/Kubernetes. It is capable of lifecycle managing Helm charts. It expects the helm charts to be available in the mentioned repository as it doesn't handle the helm chart creation in the chart repository.
+* DME Participant -  It interacts with DME(ICS) of NONRTRIC. It is capable of lifecycle managing DME entities.
+
+ACM composition and instance details can be provided as part of the rApp package and the package structure can be found in `Sample rApp package structure`_.
+
+DME
+---
+The DME(Information Coordination Service (ICS)) is a generic service that maintains data subscriptions. Its main purpose is to decouple data consumers and data producers in a multi-vendor environment. A data consumer does not need to know anything about the producers of the data.
+More details about DME can be found in `ICS <https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-informationcoordinatorservice/en/latest/overview.html>`_.
+
+It is integrated with rApp manager to enable the rApp to produce/consume specific type of data(Information Type in DME terms).
+
+Information type, and Data producer/consumer information can be provided as part of rApp package and the package structure can be found in `Sample rApp package structure`_.
+
+SME
+---
+The CAPIF stands for Common API framework and it was developed by 3GPP to enable a unified Northbound API framework across 3GPP network functions, and to ensure that there is a single and harmonized approach for API development.
+More details about SME can be found in `SME <https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-sme/en/latest/overview.html>`_.
+
+It is integrated with rApp manager to enable the rApp to expose/access/discover endpoints.
+
+Service exposure/access related configurations can be provided as part of rApp package and the package structure can be found in `Sample rApp package structure`_.
+
+*****************************
+Sample rApp package structure
+*****************************
+The sample rApp package structure shown below and the location of relevant files for each integration is provided.
+
+.. list-table::
+
+    * - * ACM (Files/Acm)
+            * Definition - Files/Acm/Definition (Only one file)
+            * Instances - Files/Acm/instances
+        * DME (Files/Dme)
+            * Consumer Information Types - Files/Dme/consumerinfotypes
+            * Producer information Types -  Files/Dme/producerinfotypes
+            * Information Consumers - Files/Dme/infoconsumers
+            * Information Producers - Files/Dme/infoproducers
+        * SME (Files/Sme)
+            * Providers Functions - Files/Sme/providers
+            * Service Api -  Files/Sme/serviceapis
+            * Invokers - Files/Sme/invokers
+      - .. figure:: ./images/rApp-package-1.png
+           :width: 200pt
+        .. figure:: ./images/rApp-package-2.png
+           :width: 150pt
+
+**************
+Implementation
+**************
+
+Implemented as a Java Spring Boot application.
+
+*************
+Configuration
+*************
+
+The component is configured by the usual Spring Boot application.yaml file.
+
+An example application.yaml configuration file: ':download:`link <../rapp-manager-application/src/main/resources/application.yaml>`'
+
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
new file mode 100755 (executable)
index 0000000..5843aff
--- /dev/null
@@ -0,0 +1,44 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+
+=============
+Release-Notes
+=============
+
+
+This document provides the release notes for the release of the Non-RT RIC rApp Manager.
+
+
+Version history rApp Manager
+============================
+
++------------+----------+------------------+--------------------+
+| **Date**   | **Ver.** | **Author**       | **Comment**        |
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+|            |          |                  |                    |
++------------+----------+------------------+--------------------+
+
+
+Release Data
+============
+
+I Release
+---------
++-----------------------------+---------------------------------------------------+
+| **Project**                 | Non-RT RIC                                        |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Repo/commit-ID**          |                                                   |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Release designation**     |                                                   |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Release date**            |                                                   |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
+| **Purpose of the delivery** |                                                   |
+|                             |                                                   |
++-----------------------------+---------------------------------------------------+
\ No newline at end of file
index ba40ece..f90f2a0 100755 (executable)
@@ -1,2 +1,13 @@
 tox
+Sphinx
+doc8
+docutils < 0.17
+setuptools
+six
+sphinx_rtd_theme
+sphinxcontrib-needs
+sphinxcontrib-swaggerdoc
+sphinx_bootstrap_theme
+sphinxcontrib-redoc
+lfdocs-conf
 urllib3~=1.26.15
\ No newline at end of file
diff --git a/openapi/rappmanager/rappmanager-spec.json b/openapi/rappmanager/rappmanager-spec.json
new file mode 100755 (executable)
index 0000000..e6a8070
--- /dev/null
@@ -0,0 +1,663 @@
+{
+  "openapi": "3.0.1",
+  "info": {
+    "title": "rApp Manager",
+    "description": "The rApp Manager is a lifecycle management service for rApps. It gets the rApp as ASD formatted package and lifecycle manages it based on it instance configuration.",
+    "license": {
+      "name": "Copyright (C) 2023 OpenInfra Foundation Europe. Licensed under the Apache License.",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0"
+    },
+    "version": "1.0"
+  },
+  "servers": [
+    {
+      "url": "/"
+    }
+  ],
+  "tags": [
+    {
+      "name": "rApp",
+      "description": "API for rApps"
+    },
+    {
+      "name": "rApp Instance",
+      "description": "API for rApp Instances"
+    }
+  ],
+  "paths": {
+    "/rapps/{rapp_id}": {
+      "get": {
+        "tags": [
+          "rApp"
+        ],
+        "summary": "Get specific rApp details",
+        "operationId": "getRapp",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "$ref": "#/components/schemas/Rapp"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "rApp"
+        ],
+        "summary": "Prime/Deprime rApp",
+        "operationId": "primeRapp",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/RappPrimeOrder"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "OK"
+          },
+          "400": {
+            "description": "Bad Request"
+          },
+          "404": {
+            "description": "Not found"
+          },
+          "502": {
+            "description": "Bad Gateway"
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "rApp"
+        ],
+        "summary": "Create rApp",
+        "operationId": "createRapp",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "multipart/form-data": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "file": {
+                    "type": "string",
+                    "format": "binary"
+                  }
+                }
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "202": {
+            "description": "Accepted"
+          },
+          "400": {
+            "description": "Bad Request"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "rApp"
+        ],
+        "summary": "Delete rApp",
+        "operationId": "deleteRapp",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK"
+          },
+          "400": {
+            "description": "Bad Request"
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      }
+    },
+    "/rapps/{rapp_id}/instance/{rapp_instance_id}": {
+      "get": {
+        "tags": [
+          "rApp Instance"
+        ],
+        "summary": "Get specific rApp instance details",
+        "operationId": "getRappInstance",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "rapp_instance_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string",
+              "format": "uuid"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "$ref": "#/components/schemas/RappInstance"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "rApp Instance"
+        ],
+        "summary": "Deploy/Undeploy rApp instance",
+        "operationId": "deployRappInstance",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "rapp_instance_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string",
+              "format": "uuid"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/RappInstanceDeployOrder"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "OK"
+          },
+          "400": {
+            "description": "Bad Request"
+          },
+          "404": {
+            "description": "Not found"
+          },
+          "502": {
+            "description": "Bad Gateway"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "rApp Instance"
+        ],
+        "summary": "Delete rApp instance",
+        "operationId": "deleteRappInstance",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "rapp_instance_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string",
+              "format": "uuid"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK"
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      }
+    },
+    "/rapps/{rapp_id}/instance": {
+      "get": {
+        "tags": [
+          "rApp Instance"
+        ],
+        "summary": "Get all instances of rApp",
+        "operationId": "getAllRappInstances",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "type": "object",
+                  "additionalProperties": {
+                    "$ref": "#/components/schemas/RappInstance"
+                  }
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      },
+      "post": {
+        "tags": [
+          "rApp Instance"
+        ],
+        "summary": "Create rApp instance",
+        "operationId": "createRappInstance",
+        "parameters": [
+          {
+            "name": "rapp_id",
+            "in": "path",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/RappInstance"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "$ref": "#/components/schemas/RappInstance"
+                }
+              }
+            }
+          },
+          "404": {
+            "description": "Not found"
+          }
+        }
+      }
+    },
+    "/rapps": {
+      "get": {
+        "tags": [
+          "rApp"
+        ],
+        "summary": "Get All rApps",
+        "operationId": "getRapps",
+        "responses": {
+          "200": {
+            "description": "OK",
+            "content": {
+              "*/*": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Rapp"
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  },
+  "components": {
+    "schemas": {
+      "RappPrimeOrder": {
+        "type": "object",
+        "properties": {
+          "primeOrder": {
+            "type": "string",
+            "enum": [
+              "PRIME",
+              "DEPRIME"
+            ]
+          }
+        }
+      },
+      "RappInstanceDeployOrder": {
+        "type": "object",
+        "properties": {
+          "deployOrder": {
+            "type": "string",
+            "enum": [
+              "DEPLOY",
+              "UNDEPLOY"
+            ]
+          }
+        }
+      },
+      "ACMResources": {
+        "type": "object",
+        "properties": {
+          "compositionDefinitions": {
+            "type": "string"
+          },
+          "compositionInstances": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          }
+        }
+      },
+      "DMEResources": {
+        "type": "object",
+        "properties": {
+          "producerInfoTypes": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "consumerInfoTypes": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "infoProducers": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "infoConsumers": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          }
+        }
+      },
+      "Rapp": {
+        "type": "object",
+        "properties": {
+          "rappId": {
+            "type": "string",
+            "format": "uuid"
+          },
+          "name": {
+            "type": "string"
+          },
+          "state": {
+            "type": "string",
+            "enum": [
+              "COMMISSIONED",
+              "PRIMING",
+              "PRIMED",
+              "DEPRIMING"
+            ]
+          },
+          "reason": {
+            "type": "string"
+          },
+          "packageLocation": {
+            "type": "string"
+          },
+          "packageName": {
+            "type": "string"
+          },
+          "rappResources": {
+            "$ref": "#/components/schemas/RappResources"
+          },
+          "rappInstances": {
+            "type": "object",
+            "additionalProperties": {
+              "$ref": "#/components/schemas/RappInstance"
+            }
+          },
+          "compositionId": {
+            "type": "string",
+            "format": "uuid"
+          }
+        }
+      },
+      "RappACMInstance": {
+        "type": "object",
+        "properties": {
+          "instance": {
+            "type": "string"
+          },
+          "acmInstanceId": {
+            "type": "string",
+            "format": "uuid"
+          }
+        }
+      },
+      "RappDMEInstance": {
+        "type": "object",
+        "properties": {
+          "infoTypesProducer": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "infoProducer": {
+            "type": "string"
+          },
+          "infoTypeConsumer": {
+            "type": "string"
+          },
+          "infoConsumer": {
+            "type": "string"
+          }
+        }
+      },
+      "RappInstance": {
+        "type": "object",
+        "properties": {
+          "rappInstanceId": {
+            "type": "string",
+            "format": "uuid"
+          },
+          "state": {
+            "type": "string",
+            "enum": [
+              "DEPLOYED",
+              "DEPLOYING",
+              "UNDEPLOYED",
+              "UNDEPLOYING"
+            ]
+          },
+          "reason": {
+            "type": "string"
+          },
+          "acm": {
+            "$ref": "#/components/schemas/RappACMInstance"
+          },
+          "sme": {
+            "$ref": "#/components/schemas/RappSMEInstance"
+          },
+          "dme": {
+            "$ref": "#/components/schemas/RappDMEInstance"
+          }
+        }
+      },
+      "RappResources": {
+        "type": "object",
+        "properties": {
+          "acm": {
+            "$ref": "#/components/schemas/ACMResources"
+          },
+          "sme": {
+            "$ref": "#/components/schemas/SMEResources"
+          },
+          "dme": {
+            "$ref": "#/components/schemas/DMEResources"
+          }
+        }
+      },
+      "RappSMEInstance": {
+        "type": "object",
+        "properties": {
+          "providerFunction": {
+            "type": "string"
+          },
+          "providerFunctionIds": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "serviceApis": {
+            "type": "string"
+          },
+          "serviceApiIds": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "invokers": {
+            "type": "string"
+          },
+          "invokerIds": {
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "aefId": {
+            "type": "string"
+          },
+          "apfId": {
+            "type": "string"
+          }
+        }
+      },
+      "SMEResources": {
+        "type": "object",
+        "properties": {
+          "providerFunctions": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "serviceApis": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          },
+          "invokers": {
+            "uniqueItems": true,
+            "type": "array",
+            "items": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  }
+}