Update documentation after move to ONAP
Change-Id: I056a80485904a0f1e4d9608d03e0ca3cc184344e
Issue-ID: NONRTRIC-173
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
diff --git a/docs/api-docs.rst b/docs/api-docs.rst
index 9416940..ed0cc79 100644
--- a/docs/api-docs.rst
+++ b/docs/api-docs.rst
@@ -4,6 +4,12 @@
.. _api_docs:
+.. |swagger-icon| image:: ./images/swagger.png
+ :width: 40px
+
+.. |yaml-icon| image:: ./images/yaml_logo.png
+ :width: 40px
+
========
API-Docs
@@ -11,39 +17,31 @@
This is the API-docs of Non-RT RIC.
-.. contents::
- :depth: 3
- :local:
-
The Non-RT RIC consists of three parts, described in the sections below:
* The Policy Agent
- * The SDNC A1 Controller
+ * The Enrichment Coordinator Service
* The rAPP Catalogue
Policy Agent
============
-The Policy Agent provides common functionality useful for R-Apps, for instance:
- * A repository of available Near-RT RICs, their policy types and policy instances.
- * An A1 connection to the Near-RT RICs.
+For information about the The Policy Agent that is implemented in ONAP, see `readthedocs`_ and `wiki`_.
-See :ref:`policy-agent-api` for how to use the API.
+.. _readthedocs: https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html
+.. _wiki: https://wiki.onap.org/pages/viewpage.action?pageId=84644984
-See the README.md file in the nonrtric/policy-agent repo for info about how to use it.
+Enrichment Coordinator Service
+==============================
-API Functions
--------------
-See the following document for the Policy Agent API: nonrtric/onap/oran/docs/offeredapis/swagger/pms-api.yaml
+See `ECS API <./ecs-api.html>`_ for how to use the API.
-SDNC A1 Controller
-==================
+.. csv-table::
+ :header: "API name", "|swagger-icon|"
+ :widths: 10,5
-An ONAP SDNC Controller for the A1 interface.
+ "ECS API", ":download:`link <./offeredapis/swagger/ecs-api.json>`"
-See :ref:`sdnc-a1-controller-api` for how to use the API.
-
-See the README.md file in the nonrtric/sdnc-a1-controller repo for info about how to use it.
rAPP Catalogue
==============
@@ -52,12 +50,6 @@
See `RAC API <./rac-api.html>`_ for how to use the API.
-.. |swagger-icon| image:: ./images/swagger.png
- :width: 40px
-
-.. |yaml-icon| image:: ./images/yaml_logo.png
- :width: 40px
-
.. csv-table::
:header: "API name", "|swagger-icon|", "|yaml-icon|"
diff --git a/docs/conf.py b/docs/conf.py
index a6ae7f9..09eeb37 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -8,7 +8,8 @@
'http://localhost.*',
'http://127.0.0.1.*',
'https://gerrit.o-ran-sc.org.*',
- './rac-api.html' #Generated file that doesn't exist at link check.
+ './rac-api.html', #Generated file that doesn't exist at link check.
+ './ecs-api.html' #Generated file that doesn't exist at link check.
]
extensions = ['sphinxcontrib.redoc', 'sphinx.ext.intersphinx',]
@@ -19,6 +20,12 @@
'page': 'rac-api',
'spec': '../r-app-catalogue/api/rac-api.json',
'embed': True,
+ },
+ {
+ 'name': 'ECS API',
+ 'page': 'ecs-api',
+ 'spec': './offeredapis/swagger/ecs-api.json',
+ 'embed': True,
}
]
diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst
index 9aac33c..576cf2d 100644
--- a/docs/developer-guide.rst
+++ b/docs/developer-guide.rst
@@ -7,123 +7,21 @@
This document provides a quickstart for developers of the Non-RT RIC.
-SDNC A1 Controller
-==================
-
-Prerequisites
--------------
-
-1. Java development kit (JDK), version 8
-2. Maven dependency-management tool, version 3.6 or later
-3. Python, version 2
-4. Docker, version 19.03.1 or latest
-5. Docker Compose, version 1.24.1 or latest
-
-Build and run
--------------
-Go to the northbound directory and run this command ::
- mvn clean install
-
-This will build the project and create artifcats in maven repo
-
-Go to oam/installation directory and run this command ::
- mvn clean install -P docker
-
-This will create the docker images required for A1 controller.
-
-After this step check for the docker images created by the maven build with this command ::
- docker images | grep a1-controller
-
-Go to oam/installation/src/main/yaml and run this command ::
- docker-compose up -d a1-controller
-
-This will create the docker containers with the A1 controller image, you can check the status of the docker container using ::
- docker-compose logs -f a1-controller
-
-The SDNC url to access the Northbound API,
- http://localhost:8282/apidoc/explorer/index.html
-
-Credentials: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
-
-Configuration of certs
-----------------------
-The SDNC-A1 controller uses the default keystore and truststore that are built into the container.
-
-The paths and passwords for these stores are located in a properties file:
- nonrtric/sdnc-a1-controller/oam/installation/src/main/properties/https-props.properties
-
-The default truststore includes the a1simulator cert as a trusted cert which is located here:
- https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=tree;f=near-rt-ric-simulator/certificate;h=172c1e5aacd52d760e4416288dc5648a5817ce65;hb=HEAD
-
-The default keystore, truststore, and https-props.properties files can be overridden by mounting new files using the "volumes" field of docker-compose. Uncommment the following lines in docker-compose to do this, and provide paths to the new files:
-
-::
-
-#volumes:
-# - <path_to_keystore>:/etc/ssl/certs/java/keystore.jks:ro
-# - <path_to_truststore>:/etc/ssl/certs/java/truststore.jks:ro
-# - <path_to_https-props>:/opt/onap/sdnc/data/properties/https-props.properties:ro
-
-The target paths in the container should not be modified.
-
-For example, assuming that the keystore, truststore, and https-props.properties files are located in the same directory as docker-compose:
-
-`volumes:`
- `- ./new_keystore.jks:/etc/ssl/certs/java/keystore.jks:ro`
-
- `- ./new_truststore.jks:/etc/ssl/certs/java/truststore.jks:ro`
-
- `- ./new_https-props.properties:/opt/onap/sdnc/data/properties/https-props.properties:ro`
-
Policy Agent
-============
+------------
-The O-RAN Non-RT RIC Policy Agent provides a REST API for management of policices. It provides support for:
+The Policy Management is implemented in ONAP. For documentation see `readthedocs`_ and `wiki`_.
- * Supervision of clients (R-APPs) to eliminate stray policies in case of failure
- * Consistency monitoring of the SMO view of policies and the actual situation in the RICs
- * Consistency monitoring of RIC capabilities (policy types)
- * Policy configuration. This includes:
+.. _readthedocs: https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html
+.. _wiki: https://wiki.onap.org/pages/viewpage.action?pageId=84644984
- * One REST API towards all RICs in the network
- * Query functions that can find all policies in a RIC, all policies owned by a service (R-APP), all policies of a type etc.
- * Maps O1 resources (ManagedElement) as defined in O1 to the controlling RIC.
+rAPP Catalogue
+--------------
-| The Policy Agent can be accessed over the REST API or through the DMaaP Interface. The REST API is documented in the
-| *nonrtric/onap/oran/docs/offeredapis/swagger/pms-api.yaml* file. Please refer to the README file of Policy Agent to know more about the API's.
-
-Configuration of certs
-----------------------
-The Policy Agent uses the default keystore and truststore that are built into the container. The paths and passwords for these stores are located in a yaml file:
- nonrtric/policy-agent/config/application.yaml
-
-The default truststore includes a1simulator cert as a trusted cert which is located here:
- https://gerrit.o-ran-sc.org/r/gitweb?p=sim/a1-interface.git;a=tree;f=near-rt-ric-simulator/certificate;h=172c1e5aacd52d760e4416288dc5648a5817ce65;hb=HEAD
-
-The default truststore also includes a1controller cert as a trusted cert which is located here (keystore.jks file):
- https://gerrit.o-ran-sc.org/r/gitweb?p=nonrtric.git;a=tree;f=sdnc-a1-controller/oam/installation/sdnc-a1/src/main/resources;h=17fdf6cecc7a866c5ce10a35672b742a9f0c4acf;hb=HEAD
-
-There is also Policy Agent's own cert in the default truststore for mocking purposes and unit-testing (ApplicationTest.java).
-
-The default keystore, truststore, and application.yaml files can be overridden by mounting new files using the "volumes" field of docker-compose or docker run command.
-
-Assuming that the keystore, truststore, and application.yaml files are located in the same directory as docker-compose, the volumes field should have these entries:
-
-`volumes:`
- `- ./new_keystore.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro`
-
- `- ./new_truststore.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro`
-
- `- ./new_application.yaml:/opt/app/policy-agent/config/application.yaml:ro`
-
-The target paths in the container should not be modified.
-
-Example docker run command for mounting new files (assuming they are located in the current directory):
-
-`docker run -p 8081:8081 -p 8433:8433 --name=policy-agent-container --network=nonrtric-docker-net --volume "$PWD/new_keystore.jks:/opt/app/policy-agent/etc/cert/keystore.jks" --volume "$PWD/new_truststore.jks:/opt/app/policy-agent/etc/cert/truststore.jks" --volume "$PWD/new_application.yaml:/opt/app/policy-agent/config/application.yaml" o-ran-sc/nonrtric-policy-agent:2.1.0-SNAPSHOT`
+See the README.md file in the r-app-catalogue folder for how to run the component.
End-to-end call
-===============
+---------------
In order to make a complete end-to-end call, follow the instructions given in this `guide`_.
diff --git a/docs/images/NonRtRicComponents.png b/docs/images/NonRtRicComponents.png
deleted file mode 100644
index 335859b..0000000
--- a/docs/images/NonRtRicComponents.png
+++ /dev/null
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index 21469e7..a32323d 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -9,12 +9,9 @@
:maxdepth: 2
:caption: Contents:
- ./api-docs.rst
- ./policy-agent-api.rst
- ./sdnc-a1-controller-api.rst
- ./developer-guide.rst
- ./installation-guide.rst
./overview.rst
+ ./developer-guide.rst
+ ./api-docs.rst
./use-cases.rst
./release-notes.rst
diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst
deleted file mode 100644
index 1bcc3c4..0000000
--- a/docs/installation-guide.rst
+++ /dev/null
@@ -1,71 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2020 Nordix
-
-Installation Guide
-==================
-
-.. contents::
- :depth: 3
- :local:
-
-Abstract
---------
-
-This document describes how to install the Non-RT RIC SDNC A1 Controller, its dependencies and required system resources.
-
-This work is in progress. Please visit :ref:`api_docs` for more information about the SDNC A1 Controller and the Policy Agent.
-
-.. _api-docs page: ./api-docs.html
-
-Installation
-------------
-
-Download the SDNC repo:
-
- git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
-
-The SDNC A1 Controller could be found in this repo.
-
-Build SDNC project:
-
- Enter into the sdnc-a1-controller project, northbound and oam project will located there.
-
- cd sdnc-a1-controller
-
- Build northbound project with command:
-
- mvn clean install -Dmaven.test.skip=true
-
- Build oam project with command:
-
- mvn clean install -Dmaven.test.skip=true -P docker
-
- Enter into this directory:
-
- cd nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml
-
- and run the command:
-
- MTU=1500 docker-compose up a1-controller
-
-Version history
----------------
-
-+--------------------+--------------------+--------------------+--------------------+
-| **Date** | **Ver.** | **Author** | **Comment** |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-| 2019-11-12 | 0.1.0 | Maxime Bonneau | First draft |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-| 2020-03-24 | 0.1.1 | Maxime Bonneau | Second draft |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-| | 1.0 | | |
-| | | | |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-
-
-
diff --git a/docs/offeredapis/swagger/ecs-api.json b/docs/offeredapis/swagger/ecs-api.json
new file mode 100644
index 0000000..740be9b
--- /dev/null
+++ b/docs/offeredapis/swagger/ecs-api.json
@@ -0,0 +1,741 @@
+{
+ "basePath": "/",
+ "paths": {
+ "/producer_simulator/ei_job": {"post": {
+ "summary": "Callback for EI job creation",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobCreatedCallbackUsingPOST",
+ "responses": {
+ "200": {"description": "OK"},
+ "201": {"description": "Created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [{
+ "schema": {"$ref": "#/definitions/producer_ei_job_request"},
+ "in": "body",
+ "name": "request",
+ "description": "request",
+ "required": true
+ }],
+ "tags": ["Producer Callbacks"],
+ "consumes": ["application/json"]
+ }},
+ "/A1-EI/v1/eitypes/{eiTypeId}": {"get": {
+ "summary": "Individual EI type",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiTypeObject"},
+ "description": "EI type"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiTypeId",
+ "description": "eiTypeId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/consumer_simulator/eijobs/{eiJobId}/status": {"post": {
+ "summary": "Callback for EI job status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobStatusCallbackUsingPOST",
+ "responses": {
+ "200": {"description": "OK"},
+ "201": {"description": "Created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/EiJobStatusObject"},
+ "in": "body",
+ "name": "status",
+ "description": "status",
+ "required": true
+ }
+ ],
+ "tags": ["Consumer Callbacks"],
+ "consumes": ["application/json"]
+ }},
+ "/ei-producer/v1/eitypes": {"get": {
+ "summary": "EI type identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeIdentifiersUsingGET_1",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI type identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/A1-EI/v1/eitypes": {"get": {
+ "summary": "EI type identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeIdentifiersUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI type identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/ei-producer/v1/eiproducers/{eiProducerId}/status": {"get": {
+ "summary": "EI producer status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_status"},
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/producer_simulator/ei_job/{eiJobId}": {"delete": {
+ "summary": "Callback for EI job deletion",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "jobDeletedCallbackUsingDELETE",
+ "responses": {
+ "200": {"description": "OK"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "No Content"},
+ "403": {"description": "Forbidden"}
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Producer Callbacks"]
+ }},
+ "/ei-producer/v1/eiproducers": {"get": {
+ "summary": "EI producer identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerIdentifiersUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI producer identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/ei-producer/v1/eitypes/{eiTypeId}": {"get": {
+ "summary": "Individual EI type",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiTypeUsingGET_1",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_ei_type_info"},
+ "description": "EI type"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiTypeId",
+ "description": "eiTypeId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/status": {"get": {
+ "summary": "Returns status and statistics of this service",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/status_info"},
+ "description": "Service is living"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Service status"]
+ }},
+ "/A1-EI/v1/eijobs/{eiJobId}": {
+ "get": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getIndividualEiJobUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiJobObject"},
+ "description": "EI job"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ },
+ "delete": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "deleteIndividualEiJobUsingDELETE",
+ "responses": {
+ "200": {"description": "Not used"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "Job deleted"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ },
+ "put": {
+ "summary": "Individual EI job",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "putIndividualEiJobUsingPUT",
+ "responses": {
+ "200": {"description": "Job updated"},
+ "201": {"description": "Job created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/EiJobObject"},
+ "in": "body",
+ "name": "eiJobObject",
+ "description": "eiJobObject",
+ "required": true
+ }
+ ],
+ "tags": ["A1-EI (enrichment information)"],
+ "consumes": ["application/json"]
+ }
+ },
+ "/ei-producer/v1/eiproducers/{eiProducerId}": {
+ "get": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiProducerUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/producer_registration_info"},
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ },
+ "delete": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "deleteEiProducerUsingDELETE",
+ "responses": {
+ "200": {"description": "Not used"},
+ "401": {"description": "Unauthorized"},
+ "204": {"description": "Producer deleted"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ },
+ "put": {
+ "summary": "Individual EI producer",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "putEiProducerUsingPUT",
+ "responses": {
+ "200": {"description": "Producer updated"},
+ "201": {"description": "Producer created"},
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "parameters": [
+ {
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ },
+ {
+ "schema": {"$ref": "#/definitions/producer_registration_info"},
+ "in": "body",
+ "name": "registrationInfo",
+ "description": "registrationInfo",
+ "required": true
+ }
+ ],
+ "tags": ["Enrichment Data Producer API"],
+ "consumes": ["application/json"]
+ }
+ },
+ "/producer_simulator/health_check": {"get": {
+ "summary": "Producer supervision",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "producerSupervisionUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"type": "string"},
+ "description": "OK"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {"description": "Not Found"}
+ },
+ "tags": ["Producer Callbacks"]
+ }},
+ "/ei-producer/v1/eiproducers/{eiProducerId}/eijobs": {"get": {
+ "summary": "EI job definitions",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "description": "EI job definitions for one EI producer",
+ "operationId": "getEiProducerJobsUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"$ref": "#/definitions/producer_ei_job_request"}
+ },
+ "description": "EI jobs"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information producer is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiProducerId",
+ "description": "eiProducerId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["Enrichment Data Producer API"]
+ }},
+ "/A1-EI/v1/eijobs": {"get": {
+ "summary": "EI job identifiers",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "description": "query for EI job identifiers",
+ "operationId": "getEiJobIdsUsingGET",
+ "responses": {
+ "200": {
+ "schema": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "description": "EI job identifiers"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information type is not found"
+ }
+ },
+ "parameters": [
+ {
+ "in": "query",
+ "allowEmptyValue": false,
+ "name": "eiTypeId",
+ "description": "selects EI jobs of matching EI type",
+ "type": "string",
+ "required": false
+ },
+ {
+ "in": "query",
+ "allowEmptyValue": false,
+ "name": "owner",
+ "description": "selects EI jobs for one EI job owner",
+ "type": "string",
+ "required": false
+ }
+ ],
+ "tags": ["A1-EI (enrichment information)"]
+ }},
+ "/A1-EI/v1/eijobs/{eiJobId}/status": {"get": {
+ "summary": "EI job status",
+ "deprecated": false,
+ "produces": ["application/json"],
+ "operationId": "getEiJobStatusUsingGET",
+ "responses": {
+ "200": {
+ "schema": {"$ref": "#/definitions/EiJobStatusObject"},
+ "description": "EI job status"
+ },
+ "401": {"description": "Unauthorized"},
+ "403": {"description": "Forbidden"},
+ "404": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Enrichment Information job is not found"
+ }
+ },
+ "parameters": [{
+ "in": "path",
+ "name": "eiJobId",
+ "description": "eiJobId",
+ "type": "string",
+ "required": true
+ }],
+ "tags": ["A1-EI (enrichment information)"]
+ }}
+ },
+ "host": "localhost:38411",
+ "definitions": {
+ "producer_ei_job_request": {
+ "description": "The body of the EI producer callbacks for EI job creation and deletion",
+ "type": "object",
+ "title": "producer_ei_job_request",
+ "required": ["ei_job_identity"],
+ "properties": {
+ "ei_job_identity": {
+ "description": "Idenitity of the EI job",
+ "type": "string"
+ },
+ "ei_job_data": {
+ "description": "Json for the job data",
+ "type": "object"
+ },
+ "target_uri": {
+ "description": "URI for the target of the EI",
+ "type": "string"
+ },
+ "ei_type_identity": {
+ "description": "Type idenitity for the job",
+ "type": "string"
+ }
+ }
+ },
+ "EiTypeObject": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "EiTypeObject"
+ },
+ "producer_ei_type_registration_info": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "producer_ei_type_registration_info",
+ "required": ["ei_type_identity"],
+ "properties": {
+ "ei_type_identity": {
+ "description": "EI type identity",
+ "type": "string"
+ },
+ "ei_job_data_schema": {
+ "description": "Json schema for the job data",
+ "type": "object"
+ }
+ }
+ },
+ "status_info": {
+ "type": "object",
+ "title": "status_info",
+ "properties": {
+ "no_of_producers": {
+ "format": "int32",
+ "description": "Number of EI producers",
+ "type": "integer"
+ },
+ "no_of_jobs": {
+ "format": "int32",
+ "description": "Number of EI jobs",
+ "type": "integer"
+ },
+ "no_of_types": {
+ "format": "int32",
+ "description": "Number of EI types",
+ "type": "integer"
+ },
+ "status": {
+ "description": "status text",
+ "type": "string"
+ }
+ }
+ },
+ "Mono«ResponseEntity«object»»": {
+ "type": "object",
+ "title": "Mono«ResponseEntity«object»»"
+ },
+ "producer_ei_type_info": {
+ "description": "Information for an EI type",
+ "type": "object",
+ "title": "producer_ei_type_info",
+ "properties": {
+ "ei_producer_ids": {
+ "description": "Registered producers",
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "ei_job_data_schema": {
+ "description": "Json schema for the job data",
+ "type": "object"
+ }
+ }
+ },
+ "producer_registration_info": {
+ "description": "Information for an EI producer",
+ "type": "object",
+ "title": "producer_registration_info",
+ "required": [
+ "ei_job_callback_url",
+ "ei_producer_supervision_callback_url",
+ "supported_ei_types"
+ ],
+ "properties": {
+ "supported_ei_types": {
+ "description": "Supported EI types",
+ "type": "array",
+ "items": {"$ref": "#/definitions/producer_ei_type_registration_info"}
+ },
+ "ei_producer_supervision_callback_url": {
+ "description": "callback for producer supervision",
+ "type": "string"
+ },
+ "ei_job_callback_url": {
+ "description": "callback for EI job",
+ "type": "string"
+ }
+ }
+ },
+ "producer_status": {
+ "description": "Status for an EI Producer",
+ "type": "object",
+ "title": "producer_status",
+ "required": ["operational_state"],
+ "properties": {"operational_state": {
+ "description": "Operational state, values:\nENABLED: TBD\nDISABLED: TBD.",
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ }}
+ },
+ "ProblemDetails": {
+ "description": "A problem detail to carry details in a HTTP response according to RFC 7807",
+ "type": "object",
+ "title": "ProblemDetails",
+ "properties": {
+ "detail": {
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
+ "type": "string",
+ "example": "EI job type not found"
+ },
+ "status": {
+ "format": "int32",
+ "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
+ "type": "integer",
+ "example": 404
+ }
+ }
+ },
+ "Void": {
+ "description": "Void/empty",
+ "type": "object",
+ "title": "Void"
+ },
+ "EiJobStatusObject": {
+ "description": "Status for an EI job",
+ "type": "object",
+ "title": "EiJobStatusObject",
+ "required": ["eiJobStatus"],
+ "properties": {"eiJobStatus": {
+ "description": "values:\nENABLED: the A1-EI producer is able to deliver EI result for the EI job\nDISABLED: the A1-EI producer is unable to deliver EI result for the EI job",
+ "type": "string",
+ "enum": [
+ "ENABLED",
+ "DISABLED"
+ ]
+ }}
+ },
+ "EiJobObject": {
+ "description": "Information for an Enrichment Information Job",
+ "type": "object",
+ "title": "EiJobObject",
+ "required": [
+ "eiTypeId",
+ "jobDefinition",
+ "jobOwner",
+ "jobResultUri"
+ ],
+ "properties": {
+ "eiTypeId": {
+ "description": "EI type Idenitifier of the EI job",
+ "type": "string"
+ },
+ "jobResultUri": {
+ "description": "The target URI of the EI data",
+ "type": "string"
+ },
+ "jobOwner": {
+ "description": "Identity of the owner of the job",
+ "type": "string"
+ },
+ "jobStatusNotificationUri": {
+ "description": "The target of EI job status notifications",
+ "type": "string"
+ },
+ "jobDefinition": {
+ "description": "EI type specific job data",
+ "type": "object"
+ }
+ }
+ }
+ },
+ "swagger": "2.0",
+ "info": {
+ "description": "This page lists all the rest apis for the service.",
+ "title": "Enrichment Data service",
+ "version": "1.0"
+ },
+ "tags": [
+ {
+ "name": "A1-EI (enrichment information)",
+ "description": "Consumer Controller"
+ },
+ {
+ "name": "Consumer Callbacks",
+ "description": "Consumer Simulator Controller"
+ },
+ {
+ "name": "Enrichment Data Producer API",
+ "description": "Producer Controller"
+ },
+ {
+ "name": "Producer Callbacks",
+ "description": "Producer Simulator Controller"
+ },
+ {
+ "name": "Service status",
+ "description": "Status Controller"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/overview.rst b/docs/overview.rst
index 2c51dba..7f4d582 100644
--- a/docs/overview.rst
+++ b/docs/overview.rst
@@ -3,7 +3,7 @@
.. Copyright (C) 2020 Nordix
Requirements for the Non-RT RIC project
-==========================================
+=======================================
Find detailed description of what Non-RT RIC is on this `page`_.
@@ -30,59 +30,3 @@
#. A1 interface shall support communication of enrichment information from Non-RT RIC to Near-RT RIC.
#. A1 interface shall support feedback from Near-RT RIC for monitoring AI/ML model performance.
#. A1 interface shall support the policy/intents feedback from Near-RT RIC to Non-RT RIC.
-
-A1 policy procedure
--------------------
-
-As for A-release, the methods are as follows:
-
-+---------------------+--------------------------+--------------------------+
-| A1 policy procedure | Single policy method | Multiple policies method |
-+---------------------+--------------------------+--------------------------+
-| Create policy | PUT | |
-+---------------------+--------------------------+--------------------------+
-| Query policy | GET | GET (sequence of \*) |
-+---------------------+--------------------------+--------------------------+
-| Update policy | PUT | |
-+---------------------+--------------------------+--------------------------+
-| Delete policy | DELETE | |
-+---------------------+--------------------------+--------------------------+
-| Notify policy | POST | POST |
-+---------------------+--------------------------+--------------------------+
-
-Policy Agent Overview
-=======================
-
-The Policy Agent maintains a transient repository of the following items to support R-Apps:
-
- * All Near-RT RICs in the network. This information is configured using the ONAP CDS database (which is using the Cloudify Consul database).
- * All Policy types for all Near-RT RICs
- * All configured Policy instances in the network
-
-It provides an NBI for the R-Apps (and for the Control Panel) for policy management. This is a REST API.
-As an option, policy management can also be done via asynchronous messages through ONAP/Dmaap.
-The NBI provides support for an R-APP to locate the correct Near-RT RIC based on identifiers as defined in O1.
-
-The agent monitors all Near-RT RICs and recovers from data inconsistencies, which may happen when (for instance) an Near-RT RIC restarts.
-
-The R-Apps can be monitored so that their Policies can be automatically removed when an R-App is stopped/removed.
-
-On its southbound side the agent can connect to a number of different A1 providers:
-
- * Directly to the Non-RT RIC:
-
- - OSC API, which is influenced by the A1 standard
- - The Non-RT RIC simulator, which supports the A1 standard with a number of not yet CRs included.
- * To an ONAP style controller.
-
-Amber release Policy Agent architecture
------------------------------------------
-
-.. image:: ./images/NonRtRicComponents.png
- :scale: 50 %
-
-Non-RT RIC components:
-
- #. Policy Agent
- #. SDNC A1 Controller
-
diff --git a/docs/policy-agent-api.rst b/docs/policy-agent-api.rst
deleted file mode 100644
index 4b6b870..0000000
--- a/docs/policy-agent-api.rst
+++ /dev/null
@@ -1,1323 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2020 Nordix
-
-.. |nbsp| unicode:: 0xA0
- :trim:
-
-.. |nbh| unicode:: 0x2011
- :trim:
-
-.. _policy-agent-api:
-
-################################
-A1 Policy Management Service API
-################################
-
-
-*******************************************
-A1 Policy Management Service - Introduction
-*******************************************
-
-The A1 Policy Management Service ("Policy Agent") is an SMO/NONRTRIC service above the NONRTRIC A1 Adapter/Controller
-that provides:
-
-* Unified REST & DMAAP APIs for managing A1 Policies in all Near |nbh| RT |nbsp| RICs
-* Synchronized view of registered "services" (e.g. R-APP, GUI, etc)
-* Synchronized view of policy instances for each "service"
-* Synchronized view of policy instances in all Near |nbh| RT |nbsp| RICs
-* Synchronized view of policy types in all Near |nbh| RT |nbsp| RICs
-* Policy Query API (e.g. per Near |nbh| RT |nbsp| RIC, per "service", per policy type)
-* An initial interface for unified Near |nbh| RT |nbsp| RIC ID to Near |nbh| RT |nbsp| RIC address mapping.
- (Note: may also later act as adapter to A&AI, CMDBs etc. to "find" Near |nbh| RT |nbsp| RICs - TBC)
-* An Initial "O1 ManagedElement" mapping database & interface to find appropriate Near |nbh| RT |nbsp| RIC for RAN elements.
- (Note: may also later act as adapter to A&AI, RuntimeDB, other CMDBs etc. - TBC)
-* Monitors all Near |nbh| RT |nbsp| RICs and recovers from inconsistencies (Note: e.g. Near |nbh| RT |nbsp| RIC restarts)
-* Support for different Southbound connectors on a per Near |nbh| RT |nbsp| RIC basis. (Note: e.g. different A1
- versions, different Near |nbh| RT |nbsp| RIC versions, different A1 adapters, different or proprietary A1
- controllers/EMSs)
-
-***************************************
-A1 Policy Management Service - REST NBI
-***************************************
-
-This is the north bound API of the A1 Policy Management Service ("Policy Agent"). This API allows *services* to interact
-with the Policy Agent using REST.
-
-By registering with the Policy Agent, the Policy Agent takes responsibility for synchronizing the policies created by
-the service in the Near |nbh| RT |nbsp| RICs. This means that if a Near |nbh| RT |nbsp| RIC restarts, the Policy Agent
-will try to recreate all the policies residing in the Near |nbh| RT |nbsp| RIC once it is started again. If this is not
-possible, it will remove all policies belonging to the Near |nbh| RT |nbsp| RIC.
-
-The Policy Agent also keeps an updated view of the policy types available, and which Near |nbh| RT |nbsp| RICs that
-support which types. Also, the Policy Agent can tell if a Managed Element is managed by a certain
-Near |nbh| RT |nbsp| RIC.
-
-The Policy Agent NBI has five distinct parts, described in the sections below:
-
-* Service Management
-* Policy Types
-* Policy Management
-* Near-RT RIC Repository
-* Health Check
-
-******************
-Service Management
-******************
-
-A service can register itself in the Policy Agent.
-
-By providing a callback URL the service can get notifications from the Policy Agent.
-
-A service can also register a "*Keep Alive Interval*", in seconds. By doing this the service promises to call the
-Policy Agent's "*Keep Alive*" method, or else create or delete policies, more often than the "*Keep Alive Interval*"
-measured in seconds. If the service, for some reason, is not able to do this, the Policy Agent will consider that the
-service has died or vanished and will then delete all its policies, both in the internal repository and in the
-Near |nbh| RT |nbsp| RICs where they were earlier created. **Note!** |nbsp| If the service does not provide a value for
-"*Keep Alive Interval*", then the service maintains full responsibility to delete all of its policies when they are no
-longer needed.
-
-/service
-~~~~~~~~
-
-PUT
-+++
-
-Register a service.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/service
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object (ServiceRegistrationInfo): ::
-
- {
- "callbackUrl": "string", (An empty string means the service will never get any callbacks.)
- "keepAliveIntervalSeconds": 0, (0 means the service will always be considered alive.)
- "serviceName": "string" (Required, must be unique.)
- }
-
-**Responses:**
-
-200:
-
-Service updated.
-
-201:
-
-Service created.
-
-400:
-
-The ServiceRegistrationInfo is not accepted.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d '{
- "callbackUrl": "URL",
- "keepAliveIntervalSeconds": 0,
- "serviceName": "existing"
- }'
-
-**Result**:
-
-201: ::
-
- OK
-
-**Call**: ::
-
- curl -X PUT "http://localhost:8081/service" -H "Content-Type: application/json" -d "{}"
-
-**Result**:
-
-400: ::
-
- Missing mandatory parameter 'serviceName'
-
-/services
-~~~~~~~~~
-
-GET
-+++
-
-Query service information.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/services?name=<service-name>
-
-**Parameters:**
-
-name: (*Optional*)
-
-The name of the service.
-
-**Responses:**
-
-200:
-
-Array of JSON objects (ServiceStatus). ::
-
- {
- "callbackUrl": "string", (Callback URL)
- "keepAliveIntervalSeconds": 0, (Policy keep alive interval)
- "serviceName": "string", (Identity of the service)
- "timeSinceLastActivitySeconds": 0 (Time since last invocation by the service)
- }
-
-404:
-
-Service is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/services?name=existing"
-
-**Result**:
-
-200: ::
-
- [
- {
- "serviceName":"existing",
- "keepAliveIntervalSeconds":0,
- "timeSinceLastActivitySeconds":7224,
- "callbackUrl":"URL"
- }
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/services?name=nonexistent"
-
-Result:
-
-404: ::
-
- Service not found
-
-DELETE
-++++++
-
-Delete a service.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/services?name=<service-name>
-
-**Parameters:**
-
-name: (*Required*)
-
-The name of the service.
-
-**Responses:**
-
-204:
- OK
-
-404:
- Service not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X DELETE "http://localhost:8081/services?name=existing"
-
-**Result**:
-
-204: ::
-
- OK
-
-**Call**: ::
-
- curl -X DELETE "http://localhost:8081/services?name=nonexistent"
-
-Result:
-
-404: ::
-
- Could not find service: nonexistent
-
-/services/keepalive
-~~~~~~~~~~~~~~~~~~~
-
-PUT
-+++
-
-Heart beat from a service.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/services/keepalive?name=<service-name>
-
-**Parameters:**
-
-name: (*Required*)
-
-The name of the service.
-
-**Responses:**
-
-200:
-
-OK
-
-404:
-
-Service is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X PUT "http://localhost:8081/services/keepalive?name=existing"
-
-**Result**:
-
-200: ::
-
- OK
-
-**Call**: ::
-
- curl -X PUT "http://localhost:8081/services/keepalive?name=nonexistent"
-
-**Result**:
-
-404: ::
-
- Could not find service: nonexistent
-
-.. _policy-management:
-
-************
-Policy Types
-************
-
-Policies are based on types. The set of available policy types is determined by the set of policy types supported by
-Near |nbh| RT |nbsp| RICs. At startup, the Policy Agent queries all Near |nbh| RT |nbsp| RICs for their supported types
-and stores them in its internal repository. It then checks this at regular intervals to keep the repository of types up
-to date. Policy types cannot be created, updated or deleted using this interface since this must be done via the
-Near |nbh| RT |nbsp| RICs.
-
-A policy type defines a name and a JSON schema that constrains the content of a policy of that type.
-
-/policy_types
-~~~~~~~~~~~~~
-
-GET
-+++
-
-Query policy type names.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy_types?ric=<name-of-ric>
-
-**Parameters:**
-
-ric: (*Optional*)
-
-The name of the Near |nbh| RT |nbsp| RIC to get types for.
-
-**Responses:**
-
-200:
-
- Array of policy type names.
-
-404:
-
- Near |nbh| RT |nbsp| RIC is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_types"
-
-**Result**:
-
-200: ::
-
- [
- "STD_PolicyModelUnconstrained_0.2.0",
- "Example_QoETarget_1.0.0",
- "ERIC_QoSNudging_0.2.0"
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_types?ric=nonexistent"
-
-**Result**:
-
-404: ::
-
- org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent
-
-/policy_schema
-~~~~~~~~~~~~~~
-
-GET
-+++
-
-Returns one policy type schema definition.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy_schema?id=<name-of-type>
-
-**Parameters:**
-
-id: (*Required*)
-
-The ID of the policy type to get the definition for.
-
-**Responses:**
-
-200:
-
-Policy schema as JSON schema.
-
-404:
-
-Policy type is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_schema?id=STD_PolicyModelUnconstrained_0.2.0"
-
-**Result**:
-
-200: ::
-
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "STD_PolicyModelUnconstrained_0.2.0",
- "description": "Standard model of a policy with unconstrained scope id combinations",
- "type": "object",
- "properties": {
- "scope": {
- "type": "object",
- "properties": {
- "ueId": {"type": "string"},
- "groupId": {"type": "string"}
- },
- "minProperties": 1,
- "additionalProperties": false
- },
- "qosObjectives": {
- "type": "object",
- "properties": {
- "gfbr": {"type": "number"},
- "mfbr": {"type": "number"}
- },
- "additionalProperties": false
- },
- "resources": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "cellIdList": {
- "type": "array",
- "minItems": 1,
- "uniqueItems": true,
- "items": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["cellIdList"]
- }
- }
- },
- "minProperties": 1,
- "additionalProperties": false,
- "required": ["scope"]
- }
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_schema?id=nonexistent"
-
-**Result**:
-
-404: ::
-
- org.oransc.policyagent.exceptions.ServiceException: Could not find type: nonexistent
-
-/policy_schemas
-~~~~~~~~~~~~~~~
-
-GET
-+++
-
-Returns policy type schema definitions.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy_schemas?ric=<name-of-ric>
-
-**Parameters:**
-
-ric: (*Optional*)
-
-The name of the Near |nbh| RT |nbsp| RIC to get the definitions for.
-
-**Responses:**
-
-200:
-
-An array of policy schemas as JSON schemas.
-
-404:
-
-Near |nbh| RT |nbsp| RIC is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_schemas"
-
-**Result**:
-
-200: ::
-
- [
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "STD_PolicyModelUnconstrained_0.2.0",
- "description": "Standard model of a policy with unconstrained scope id combinations",
- "type": "object",
- "properties": {
- "scope": {
- "type": "object",
- .
- .
- .
- }
- "additionalProperties": false,
- "required": ["scope"]
- },
- .
- .
- .
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "Example_QoETarget_1.0.0",
- "description": "Example QoE Target policy type",
- "type": "object",
- "properties": {
- "scope": {
- "type": "object",
- .
- .
- .
- }
- "additionalProperties": false,
- "required": ["scope"]
- }
- }
- }
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_schemas?ric=nonexistent"
-
-**Result**:
-
-404: ::
-
- org.oransc.policyagent.exceptions.ServiceException: Could not find ric: nonexistent
-
-*****************
-Policy Management
-*****************
-
-Policies can be queried, created, updated, and deleted. A policy is always created in a specific
-Near |nbh| RT |nbsp| RIC.
-
-A policy is defined by its policy type schema.
-
-When a policy is created, the Policy Agent stores information about it in its internal repository. At regular intervals,
-it then checks with all Near |nbh| RT |nbsp| RICs that this repository is synchronized. If, for some reason, there is an
-inconsistency, the Policy Agent will start a synchronization job and try to inconsistency, the Policy Agent will start a
-synchronization job and try to reset the Near |nbh| RT |nbsp| RIC to its last-known-good status. If this fails, the
-Policy Agent will clear all policies for the specific Near |nbh| RT |nbsp| RIC in the internal repository and set its
-state to *UNKNOWN*. This means that no interaction with the Near |nbh| RT |nbsp| RIC is possible until the Policy Agent
-has been able to contact it again and re-synchronize its state in the repository.
-
-Once a service has created a policy, it is the service's responsibility to maintain its life cycle. When a Near |nbh| RT
-|nbsp| RIC has been restarted, the Policy Agent will try to recreate policies in the Near |nbh| RT |nbsp| RIC according
-to the policies maintained in its local repository.
-This means that the service must delete any policies it has created.
-A policy may be created as a "transient policy", whereby if this policy "disappears" at any stage it will not be
-re-synchronized to the Near |nbh| RT |nbsp| RIC.
-For example, this is useful if the policy should not survive a restart of the Near |nbh| RT |nbsp| RIC.
-A non-transient policy will continue to be maintained in the Near |nbh| RT |nbsp| RIC until it is explicitly deleted
-(or the service that created it fails to update its Keep Alive status).
-
-There are some exceptions where policy instances are not re-synchronized after a Near |nbh| RT |nbsp| RIC restart or
-when some inconsistency is identified:
-
-- The service has registered a "*Keep Alive Interval*", but the service then fails to update its Keep Alive status.
-- The Policy Agent completely fails to synchronize with a Near |nbh| RT |nbsp| RIC, as described above.
-- Policies that are marked as transient policies.
-
-/policies
-~~~~~~~~~
-
-GET
-+++
-
-Query policies.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policies?ric=<name-of-ric>&service=<name-of-service>&type=<name-of-type>
-
-**Parameters:**
-
-ric: (*Optional*)
-
-The name of the Near |nbh| RT |nbsp| RIC to get policies for.
-
-service: (*Optional*)
-
-The name of the service to get policies for.
-
-type: (*Optional*)
-
-The name of the policy type to get policies for.
-
-**Responses:**
-
-200:
-
-Array of JSON objects (PolicyInfo). ::
-
- {
- "id": "string", (Identity of the policy)
- "json": "object", (The configuration of the policy)
- "lastModified": "string", (Timestamp, last modification time)
- "ric": "string", (Identity of the target Near |nbh| RT |nbsp| RIC)
- "service": "string", (The name of the service owning the policy)
- "type": "string" (Name of the policy type)
- }
-
-404:
- Near |nbh| RT |nbsp| RIC or policy type not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policies?ric=existing"
-
-**Result**:
-
-200: ::
-
- [
- {
- "id": "Policy 1",
- "json": {
- "scope": {
- "ueId": "UE 1",
- "groupId": "Group 1"
- },
- "qosObjectives": {
- "gfbr": 1,
- "mfbr": 2
- },
- "cellId": "Cell 1"
- },
- "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT",
- "ric": "existing",
- "service": "Service 1",
- "type": "STD_PolicyModelUnconstrained_0.2.0"
- },
- {
- "id": "Policy 2",
- "json": {
- .
- .
- .
- },
- "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT",
- "ric": "existing",
- "service": "Service 2",
- "type": "Example_QoETarget_1.0.0"
- }
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policies?type=nonexistent"
-
-**Result**:
-
-404: ::
-
- Policy type not found
-
-/policy
-~~~~~~~
-
-GET
-+++
-
-Returns a policy configuration.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy?id=<policy-id>
-
-**Parameters:**
-
-id: (*Required*)
-
-The ID of the policy instance.
-
-**Responses:**
-
-200:
-
-JSON object containing policy information. ::
-
- {
- "id": "string", (ID of policy)
- "json": "object", (JSON with policy data speified by the type)
- "ownerServiceName": "string", (Name of the service that created the policy)
- "ric": "string", (Name of the Near |nbh| RT |nbsp| RIC where the policy resides)
- "type": "string", (Name of the policy type of the policy)
- "lastModified" (Timestamp, last modification time)
- }
-
-404:
-
-Policy is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy?id=Policy 1"
-
-**Result**:
-
-200: ::
-
- {
- "id": "Policy 1",
- "json": {
- "scope": {
- "ueId": "UE1 ",
- "cellId": "Cell 1"
- },
- "qosObjectives": {
- "gfbr": 319.5,
- "mfbr": 782.75,
- "priorityLevel": 268.5,
- "pdb": 44.0
- },
- "qoeObjectives": {
- "qoeScore": 329.0,
- "initialBuffering": 27.75,
- "reBuffFreq": 539.0,
- "stallRatio": 343.0
- },
- "resources": []
- },
- "ownerServiceName": "Service 1",
- "ric": "ric1",
- "type": "STD_PolicyModelUnconstrained_0.2.0",
- "lastModified": "Wed, 01 Apr 2020 07:45:45 GMT"
- }
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy?id=nonexistent"
-
-**Result**:
-
-404: ::
-
- Policy is not found
-
-PUT
-+++
-
-Create/Update a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a
-"*Keep Alive Interval*" registered.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy?id=<policy-id>&ric=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-type>
-
-**Parameters:**
-
-id: (*Required*)
-
-The ID of the policy instance.
-
-ric: (*Required*)
-
-The name of the Near |nbh| RT |nbsp| RIC where the policy will be created.
-
-service: (*Required*)
-
-The name of the service creating the policy.
-
-transient: (*Optional*)
-
-If the policy is transient or not (boolean defaulted to false).
-A policy is transient if it will be forgotten when the service needs to reconnect to the Near |nbh| RT |nbsp| RIC.
-
-type: (*Optional*)
-
-The name of the policy type.
-
-**Body:** (*Required*)
-
-A JSON object containing the data specified by the type.
-
-**Responses:**
-
-200:
-
-Policy updated.
-
-201:
-
-Policy created.
-
-404:
-
-Near |nbh| RT |nbsp| RIC or policy type is not found.
-
-423:
-
-Near |nbh| RT |nbsp| RIC is not operational.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X PUT "http://localhost:8081/policy?id=Policy%201&ric=ric1&service=Service%201&type=STD_PolicyModelUnconstrained_0.2.0"
- -H "Content-Type: application/json"
- -d '{
- "scope": {
- "ueId": "UE 1",
- "cellId": "Cell 1"
- },
- "qosObjectives": {
- "gfbr": 319.5,
- "mfbr": 782.75,
- "priorityLevel": 268.5,
- "pdb": 44.0
- },
- "qoeObjectives": {
- "qoeScore": 329.0,
- "initialBuffering": 27.75,
- "reBuffFreq": 539.0,
- "stallRatio": 343.0
- },
- "resources": []
- }'
-
-**Result**:
-
-200
-
-DELETE
-++++++
-
-Deletes a policy. **Note!** Calls to this method will also trigger "*Keep Alive*" for a service which has a
-"*Keep Alive Interval*" registered.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy?id=<policy-id>
-
-**Parameters:**
-
-id: (*Required*)
-
-The ID of the policy instance.
-
-**Responses:**
-
-204:
-
-Policy deleted.
-
-404:
-
-Policy is not found.
-
-423:
-
-Near |nbh| RT |nbsp| RIC is not operational.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X DELETE "http://localhost:8081/policy?id=Policy 1"
-
-**Result**:
-
-204
-
-/policy_ids
-~~~~~~~~~~~
-
-GET
-+++
-
-Query policy type IDs.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy_ids?ric=<name-of-ric>&service=<name-of-service>&type=<name-of-policy-type>
-
-**Parameters:**
-
-ric: (*Optional*)
-
-The name of the Near |nbh| RT |nbsp| RIC to get policies for.
-
-service: (*Optional*)
-
-The name of the service to get policies for.
-
-type: (*Optional*)
-
-The name of the policy type to get policies for.
-
-**Responses:**
-
-200:
-
-Array of policy type names.
-
-404:
-
-RIC or policy type not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_ids"
-
-**Result**:
-
-200: ::
-
- [
- "Policy 1",
- "Policy 2",
- "Policy 3"
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/policy_ids?ric=nonexistent"
-
-**Result**:
-
-404: ::
-
- Ric not found
-
-/policy_status
-~~~~~~~~~~~~~~
-
-GET
-+++
-
-Returns the status of a policy.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/policy_status?id=<policy-id>
-
-**Parameters:**
-
-id: (*Required*)
-
-The ID of the policy.
-
-**Responses:**
-
-200:
-
-JSON object with policy status.
-
-404:
-
-Policy not found.
-
-**********************
-Near-RT RIC Repository
-**********************
-
-The Policy Agent keeps an updated view of the Near |nbh| RT |nbsp| RICs that are available in the system. A service can
-find out which Near |nbh| RT |nbsp| RIC that manages a specific element in the network or which
-Near |nbh| RT |nbsp| RICs that support a specific policy type.
-
-/ric
-~~~~
-
-GET
-+++
-
-Returns the name of a Near |nbh| RT |nbsp| RIC managing a specific Mananged Element.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/ric?managedElementId=<id-of-managed-element>
-
-**Parameters:**
-
-managedElementId: (*Required*)
-
-The ID of the Managed Element.
-
-**Responses:**
-
-200:
-
-Name of the Near |nbh| RT |nbsp| RIC managing the Managed Element.
-
-404:
-
-No Near |nbh| RT |nbsp| RIC manages the given Managed Element.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/ric?managedElementId=Node 1"
-
-**Result**:
-
-200: ::
-
- Ric 1
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/ric?managedElementId=notmanaged"
-
-**Result**:
-
-404
-
-/rics
-~~~~~
-
-GET
-+++
-
-Query Near |nbh| RT |nbsp| RIC information.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/rics?policyType=<name-of-policy-type>
-
-**Parameters:**
-
-policyType: (*Optional*)
-
-The name of the policy type.
-
-**Responses:**
-
-200:
-
-Array of JSON objects containing Near |nbh| RT |nbsp| RIC information. ::
-
- [
- {
- "managedElementIds": [
- "string"
- ],
- "policyTypes": [
- "string"
- ],
- "ricName": "string",
- "state": "string"
- }
- ]
-
-404:
-
-Policy type is not found.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/rics?policyType=STD_PolicyModelUnconstrained_0.2.0"
-
-**Result**:
-
-200: ::
-
- [
- {
- "managedElementIds": [
- "ME 1",
- "ME 2"
- ],
- "policyTypes": [
- "STD_PolicyModelUnconstrained_0.2.0",
- "Example_QoETarget_1.0.0",
- "ERIC_QoSNudging_0.2.0"
- ],
- "ricName": "Ric 1",
- "state": "AVAILABLE"
- },
- .
- .
- .
- {
- "managedElementIds": [
- "ME 3"
- ],
- "policyTypes": [
- "STD_PolicyModelUnconstrained_0.2.0"
- ],
- "ricName": "Ric X",
- "state": "UNAVAILABLE"
- }
- ]
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/rics?policyType=nonexistent"
-
-**Result**:
-
-404: ::
-
- Policy type not found
-
-************
-Health Check
-************
-
-The status of the Policy Agent.
-
-/status
-~~~~~~~
-
-GET
-+++
-
-Returns the status of the Policy Agent.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/status
-
-**Parameters:**
-
-None.
-
-**Responses:**
-
-200:
-
-Service is living.
-
-Examples
-""""""""
-
-**Call**: ::
-
- curl -X GET "http://localhost:8081/status"
-
-**Result**:
-
-200
-
-****************
-A1 through DMaaP
-****************
-
-The Policy Agent also provides the possibility to use DMaap to handle policies according to the A1 specification. The
-Policy Agent polls the DMaaP Message Router regularly and processes any messages targeted to it. The response is then
-published back to the DMaaP Message Router with the result of the call.
-
-Send Message
-~~~~~~~~~~~~
-
-The message to send is a JSON like the one below. The "*url*" is one of the URLs described under
-:ref:`policy-management`. The "*target*" must always be "*policy-agent*" for the message to be processed by the Policy
-Agent. The "*operation*" can be one of the following: "*GET | PUT | POST | DELETE*". ::
-
- {
- "type": "string",
- "correlationId": "string",
- "target": "string",
- "timestamp": "timestamp",
- "apiVersion": "string",
- "originatorId": "string",
- "requestId": "string",
- "operation": "string",
- "url": "string"
- }
-
-Example
-+++++++
-
-To get all policy types for a specific Near |nbh| RT |nbsp| RIC the following message should be sent to DMaaP Message
-Router: ::
-
- {
- "type":"request",
- "correlationId":"c09ac7d1-de62-0016-2000-e63701125557-201",
- "target":"policy-agent",
- "timestamp":"2019-05-14T11:44:51.36Z",
- "apiVersion":"1.0",
- "originatorId":"849e6c6b420",
- "requestId":"23343221",
- "operation":"GET",
- "url":"/policy_schemas?ric=ric_ric-simulator_1"
- }
-
-Receive Message
-~~~~~~~~~~~~~~~
-
-The message the Policy Agent sends back to the DMaaP Message Router is a JSON like the one below. The "*requestId*"
-"*correlationId*", and "*originatorId*" are the same as in the message sent to DMaaP MR. ::
-
- {
- "requestId": "string",
- "correlationId": "string",
- "originatorId": "string",
- "type": "string",
- "message": "string",
- "type": "string",
- "timestamp": "string",
- "status": "string"
- }
-
-Example
-+++++++
-
-The response containing all policy types for a specific Near |nbh| RT |nbsp| RIC sent to the DMaaP Message Router from
-the Policy Agent: ::
-
- {
- \"requestId\":\"23343221\",
- \"correlationId\":\"c09ac7d1-de62-0016-2000-e63701125557-201\",
- \"originatorId\":\"849e6c6b420\",
- \"type\":\"response\",
- \"message\":\"[
- {
- \\\"$schema\\\":\\\"http://json-schema.org/draft-07/schema#\\\",
- \\\"description\\\":\\\"QoS policy type\\\",
- \\\"title\\\":\\\"STD_QoSNudging_0.2.0\\\",
- \\\"type\\\":\\\"object\\\",
- \\\"properties\\\":{\\\"scope\\\":{\\\"additionalProperties\\\":true,
- \\\"type\\\":\\\"object\\\",
- \\\"properties\\\":{\\\"qosId\\\":{\\\"type\\\":\\\"string\\\"},
- \\\"ueId\\\":{\\\"type\\\":\\\"string\\\"}},
- \\\"required\\\":[\\\"ueId\\\",
- \\\"qosId\\\"]},
- \\\"statement\\\":{\\\"additionalProperties\\\":false,
- \\\"type\\\":\\\"object\\\",
- \\\"properties\\\":{\\\"priorityLevel\\\":{\\\"type\\\":\\\"number\\\"}},
- \\\"required\\\":[\\\"priorityLevel\\\"]}}
- }
- ]\",
- \"timestamp\":\"2019-05-14T11:44:51.36Z\",
- \"status\":\"200 OK\"
- }
\ No newline at end of file
diff --git a/docs/sdnc-a1-controller-api.rst b/docs/sdnc-a1-controller-api.rst
deleted file mode 100644
index 5e0e908..0000000
--- a/docs/sdnc-a1-controller-api.rst
+++ /dev/null
@@ -1,531 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2020 Nordix
-
-.. |nbsp| unicode:: 0xA0
- :trim:
-
-.. |nbh| unicode:: 0x2011
- :trim:
-
-.. _sdnc-a1-controller-api:
-
-
-######################
-SDNC A1 Controller API
-######################
-
-The A1 of a Near |nbh| RT |nbsp| RIC can be used through the SDNC A1 Controller.
-
-The OSC A1 Controller supports using multiple versions of A1 API southbound. By passing the full URL for each southbound
-A1 operation the problem of version-specific URL formats is avoided.
-
-Since different versions of A1 operations may use different data formats for data payloads for similar REST requests and
-responses the data formatting requirements are flexible, so version-specific encoding/decoding is handled by the service
-that requests the A1 operation.
-
-Get Policy Type
-~~~~~~~~~~~~~~~
-
-POST
-++++
-
-Gets a policy type.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/restconf/operations/A1-ADAPTER-API:getA1PolicyType
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object. ::
-
- {
- "input": {
- "near-rt-ric-url": "<url-to-near-rt-ric-to-get-type>"
- }
- }
-
-**Responses:**
-
-200:
-
-A JSON object where the body tag contains the JSON object of the policy type. ::
-
- {
- "output": {
- "http-status": "integer",
- "body": "{
- <policy-type>
- }"
- }
- }
-
-Examples
-""""""""
-
-Get a policy type from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. The STD 1.1.3 version does not
-support types, so this function is not available for that version.
-
-**Call**: ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11"
- }
- }'
-
-**Result**:
-
-200: ::
-
- {
- "output": {
- "http-status": 200,
- "body": "{
- \"$schema\": \"http://json-schema.org/draft-07/schema#\",
- \"title\": \"Example_QoETarget_1.0.0\",
- \"description\": \"Example QoE Target policy type\",
- \"type\": \"object\",
- \"properties\": {
- \"scope\": {
- \"type\": \"object\",
- \"properties\": {
- \"ueId\": {
- \"type\": \"string\"
- },
- \"sliceId\": {
- \"type\": \"string\"
- },
- \"qosId\": {
- \"type\": \"string\"
- },
- \"cellId\": {
- \"type\": \"string\"
- }
- },
- \"additionalProperties\": false,
- \"required\": [
- \"ueId\",
- \"sliceId\"
- ]
- },
- \"statement\": {
- \"type\": \"object\",
- \"properties\": {
- \"qoeScore\": {
- \"type\": \"number\"
- },
- \"initialBuffering\": {
- \"type\": \"number\"
- },
- \"reBuffFreq\": {
- \"type\": \"number\"
- },
- \"stallRatio\": {
- \"type\": \"number\"
- }
- },
- \"minProperties\": 1,
- \"additionalProperties\": false
- }
- }
- }"
- }
- }
-
-Put Policy
-~~~~~~~~~~
-
-POST
-++++
-
-Creates or updates a policy instance.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/restconf/operations/A1-ADAPTER-API:putA1Policy
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object where the body tag contains the JSON object of the policy. ::
-
- {
- "input": {
- "near-rt-ric-url": "<url-to-near-rt-ric-to-put-policy>",
- "body": "<policy-as-json-string>"
- }
- }
-
-**Responses:**
-
-200:
-
-A JSON object with the response. ::
-
- {
- "output": {
- "http-status": "integer"
- }
- }
-
-Examples
-""""""""
-
-**Call**:
-
-Create a policy in a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000",
- "body": "{
- "blocking_rate":20,
- "enforce":true,
- "trigger_threshold":10,
- "window_length":10
- }"
- }
- }'
-
-Create a policy in a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
-
- curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy
- -H Content-Type:application/json -d '{
- "input": {
- "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000",
- "body": "{
- "scope": {
- "ueId": "ue5000",
- "qosId": "qos5000"
- },
- "qosObjective": {
- "priorityLevel": 5000
- }
- }"
- }
- }'
-
-**Result**:
-
-The result is the same irrespective of which API that is used.
-
-200: ::
-
- {
- "output": {
- "http-status": 200
- }
- }
-
-Get Policy
-~~~~~~~~~~
-
-POST
-++++
-
-Gets a policy instance.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/restconf/operations/A1-ADAPTER-API:getA1Policy
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object. ::
-
- {
- "input": {
- "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy>"
- }
- }
-
-**Responses:**
-
-200:
- A JSON object where the body tag contains the JSON object of the policy. ::
-
- {
- "output": {
- "http-status": "integer",
- "body": "{
- <result>
- }"
- }
- }
-
-Examples
-""""""""
-
-**Call**:
-
-Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
-
- curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
- -H Content-Type:application/json -d '{
- "input": {
- "near-rt-ric-url":"http://ricsim_g1_1:8085/a1-p/policytypes/11/policies"
- }
- }'
-
-Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
-
- curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
- -H Content-Type:application/json -d '{
- "input": {
- "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies"
- }
- }'
-
-**Result**:
-
-The result is the same irrespective of which API that is used.
-
-200: ::
-
- {
- "output": {
- "http-status":200,
- "body":"[
- \"5000\",
- .
- .
- .
- \"6000\"
- ]"
- }
- }
-
-**Call**:
-
-Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
- }
- }'
-
-Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
-
- curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
- -H Content-Type:application/json -d '{
- "input": {
- "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
- }
- }'
-
-**Result**:
-
-The result is the same irrespective of which API that is used.
-
-200: ::
-
- {
- "output": {
- "http-status": 200,
- "body": "{
- \"blocking_rate\": 20,
- \"enforce\": true,
- \"trigger_threshold\": 10,
- \"window_length\": 10
- }"
- }
- }
-
-Delete Policy
-~~~~~~~~~~~~~
-
-POST
-++++
-
-Deletes a policy instance.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/restconf/operations/A1-ADAPTER-API:deleteA1Policy
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object. ::
-
- {
- "input": {
- "near-rt-ric-url": "<url-to-near-rt-ric-to-delete-policy>"
- }
- }
-
-**Responses:**
-
-200:
-
-A JSON object with the response. ::
-
- {
- "output": {
- "http-status": "integer"
- }
- }
-
-Examples
-""""""""
-
-**Call**:
-
-Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
- }
- }'
-
-Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
- }
- }'
-
-**Result**:
-
-The result is the same irrespective of which API that is used.
-
-200: ::
-
- {
- "output": {
- "http-status": 202
- }
- }
-
-Get Policy Status
-~~~~~~~~~~~~~~~~~
-
-POST
-++++
-
-Get the status of a policy instance.
-
-Definition
-""""""""""
-
-**URL path:**
-
-/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus
-
-**Parameters:**
-
-None.
-
-**Body:** (*Required*)
-
-A JSON object. ::
-
- {
- "input": {
- "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy-status>"
- }
- }
-
-**Responses:**
-
-200:
-
-A JSON object where the body tag contains the JSON object with the policy status according to the API version used. ::
-
- {
- "output": {
- "http-status": "integer",
- "body": "{
- <policy-status-object>
- }"
- }
- }
-
-Examples
-""""""""
-
-**Call**:
-
-Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000/status"
- }
- }'
-
-**Result**:
-
-200: ::
-
- {
- "output": {
- "http-status": 200,
- "body": "{
- \"instance_status\": \"IN EFFECT\",
- \"has_been_deleted\": \"true\",
- \"created_at\": \"Wed, 01 Apr 2020 07:45:45 GMT\"
- }"
- }
- }
-
-**Call**:
-
-Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
-
- curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
- -H "Content-Type: application/json" -d '{
- "input": {
- "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000/status"
- }
- }'
-
-**Result**:
-
-200: ::
-
- {
- "output": {
- "http-status": 200,
- "body": "{
- \"enforceStatus\": \"UNDEFINED\"
- }"
- }
- }