Documentation of RAN PM
Added PM Data Converter skeleton.
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-868
Change-Id: Iaab65af511e7d9f8ecdff6b0514463ea7e901293
diff --git a/kafka-pm-producer/docs/Architecture.png b/kafka-pm-producer/docs/Architecture.png
new file mode 100644
index 0000000..95e64f6
--- /dev/null
+++ b/kafka-pm-producer/docs/Architecture.png
Binary files differ
diff --git a/kafka-pm-producer/docs/Pictures.pptx b/kafka-pm-producer/docs/Pictures.pptx
new file mode 100644
index 0000000..439312c
--- /dev/null
+++ b/kafka-pm-producer/docs/Pictures.pptx
Binary files differ
diff --git a/kafka-pm-producer/docs/_static/logo.png b/kafka-pm-producer/docs/_static/logo.png
new file mode 100644
index 0000000..c3b6ce5
--- /dev/null
+++ b/kafka-pm-producer/docs/_static/logo.png
Binary files differ
diff --git a/kafka-pm-producer/docs/conf.py b/kafka-pm-producer/docs/conf.py
new file mode 100644
index 0000000..bc39c07
--- /dev/null
+++ b/kafka-pm-producer/docs/conf.py
@@ -0,0 +1,36 @@
+# ============LICENSE_START===============================================
+# Copyright (C) 2021-2023 Nordix Foundation. 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.*',
+]
+
+extensions = ['sphinx.ext.intersphinx',]
+
+
+#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/kafka-pm-producer/docs/conf.yaml b/kafka-pm-producer/docs/conf.yaml
new file mode 100644
index 0000000..9f420ed
--- /dev/null
+++ b/kafka-pm-producer/docs/conf.yaml
@@ -0,0 +1,3 @@
+---
+project_cfg: oran
+project: nonrtric-plt-pmdataconverter
diff --git a/kafka-pm-producer/docs/favicon.ico b/kafka-pm-producer/docs/favicon.ico
new file mode 100644
index 0000000..00b0fd0
--- /dev/null
+++ b/kafka-pm-producer/docs/favicon.ico
Binary files differ
diff --git a/kafka-pm-producer/docs/index.rst b/kafka-pm-producer/docs/index.rst
new file mode 100644
index 0000000..ac5b863
--- /dev/null
+++ b/kafka-pm-producer/docs/index.rst
@@ -0,0 +1,13 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+Non-RT RIC PM Data Converter
+============================
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ ./overview.rst
+
diff --git a/kafka-pm-producer/docs/overview.rst b/kafka-pm-producer/docs/overview.rst
new file mode 100644
index 0000000..b2469ef
--- /dev/null
+++ b/kafka-pm-producer/docs/overview.rst
@@ -0,0 +1,129 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+
+PM Data Converter
+~~~~~~~~~~~~~~~~~
+
+
+********
+Overview
+********
+
+The task of the PM Data Converter is to convert PM Measurement report files,
+(XML formatted according to 3GPP TS 32.432 and 3GPP TS 32.435) into Json.
+
+The component receives objects from kafka that indicates that new PM Report files
+are collected from the RAN. The event is sent by the Data File Collector.
+
+The XML file is read from the storage, converted to Json, gzipped and stored.
+
+A Json object indicating that a new Json PM Mesurement report is available is sent on
+a Kafka topic to be picked up by other components for further processing,
+
+.. image:: ./Architecture.png
+ :width: 500pt
+
+
+
+This product is a part of :doc:`NONRTRIC <nonrtric:index>`.
+
+
+
+*********************
+Output PM Measurement
+*********************
+
+The Json format of the PM mesaurememt follows the same structure as the input XML format (defined by 3GPP).
+
+Here follows an example:
+
+.. code-block:: javascript
+
+ {
+ "event":{
+ "commonEventHeader":{
+ "domain":"perf3gpp",
+ "eventId":"9efa1210-f285-455f-9c6a-3a659b1f1882",
+ "eventName":"perf3gpp_gnb-Ericsson_pmMeasResult",
+ "sourceName":"O-DU-1122",
+ "reportingEntityName":"",
+ "startEpochMicrosec":951912000000,
+ "lastEpochMicrosec":951912900000,
+ "timeZoneOffset":"+00:00"
+ },
+ "perf3gppFields":{
+ "perf3gppFieldsVersion":"1.0",
+ "measDataCollection":{
+ "granularityPeriod":900,
+ "measuredEntityUserName":"RNC Telecomville",
+ "measuredEntityDn":"SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1",
+ "measuredEntitySoftwareVersion":"",
+ "measInfoList":[
+ {
+ "measInfoId":{
+ "sMeasInfoId":"PM=1,PmGroup=NRCellDU_GNBDU"
+ },
+ "measTypes":{
+ "sMeasTypesList":[
+ "succImmediateAssignProcs"
+ ]
+ },
+ "measValuesList":[
+ {
+ "measObjInstId":"RncFunction=RF-1,UtranCell=Gbg-997",
+ "suspectFlag":"false",
+ "measResults":[
+ {
+ "p":1,
+ "sValue":"1113"
+ }
+ ]
+ },
+ {
+ "measObjInstId":"RncFunction=RF-1,UtranCell=Gbg-998",
+ "suspectFlag":"false",
+ "measResults":[
+ {
+ "p":1,
+ "sValue":"234"
+ }
+ ]
+ },
+ {
+ "measObjInstId":"RncFunction=RF-1,UtranCell=Gbg-999",
+ "suspectFlag":"true",
+ "measResults":[
+ {
+ "p":1,
+ "sValue":"789"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+
+
+**************************
+Output File Ready Message
+**************************
+
+Here follows an example of the sent object indicating that a new Json file is available.
+It only contains the name of the stored file. The name of the bucket and the minio endpoint
+must be known by the event receiver.
+
+.. code-block:: javascript
+
+ {
+ "filename": "xyz.json.gzip"
+ }
+
+
+
+
diff --git a/kafka-pm-producer/docs/requirements-docs.txt b/kafka-pm-producer/docs/requirements-docs.txt
new file mode 100644
index 0000000..f266a10
--- /dev/null
+++ b/kafka-pm-producer/docs/requirements-docs.txt
@@ -0,0 +1,12 @@
+tox
+Sphinx
+doc8
+docutils < 0.17
+setuptools
+six
+sphinx_rtd_theme
+sphinxcontrib-needs
+sphinxcontrib-swaggerdoc
+sphinx_bootstrap_theme
+sphinxcontrib-redoc
+lfdocs-conf
\ No newline at end of file
diff --git a/kafka-pm-producer/tox.ini b/kafka-pm-producer/tox.ini
new file mode 100644
index 0000000..52803ed
--- /dev/null
+++ b/kafka-pm-producer/tox.ini
@@ -0,0 +1,37 @@
+# ==================================================================================
+# Copyright (c) 2023 Nordix
+#
+# 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.
+# ==================================================================================
+
+# documentation only
+[tox]
+minversion = 4.0
+envlist =
+ docs,
+ docs-linkcheck,
+skipsdist = true
+
+[testenv:docs]
+basepython = python3
+deps = -r{toxinidir}/docs/requirements-docs.txt
+
+commands =
+ sphinx-build -W -b html -n -d {envtmpdir}/docs/doctrees ./docs/ {toxinidir}/docs/_build/html
+ echo "Generated docs available in {toxinidir}/docs/_build/html"
+allowlist_externals = echo
+
+[testenv:docs-linkcheck]
+basepython = python3
+deps = -r{toxinidir}/docs/requirements-docs.txt
+commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck