Documentation of Data file collector 59/10959/5
authorPatrikBuhr <patrik.buhr@est.tech>
Thu, 20 Apr 2023 04:42:23 +0000 (06:42 +0200)
committerPatrikBuhr <patrik.buhr@est.tech>
Fri, 21 Apr 2023 11:22:57 +0000 (13:22 +0200)
Documentation of Influx Logger

Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Issue-ID: NONRTRIC-864
Change-Id: I0acb0f72fb12638c1bed9095056d8db4a74a8dc3

39 files changed:
datafilecollector/config/README
datafilecollector/config/application.yaml
datafilecollector/docs/Architecture.png [new file with mode: 0644]
datafilecollector/docs/Pictures.pptx [new file with mode: 0644]
datafilecollector/docs/_static/logo.png [new file with mode: 0644]
datafilecollector/docs/api-docs.rst [new file with mode: 0644]
datafilecollector/docs/conf.py [new file with mode: 0644]
datafilecollector/docs/conf.yaml [new file with mode: 0644]
datafilecollector/docs/developer-guide.rst [new file with mode: 0644]
datafilecollector/docs/favicon.ico [new file with mode: 0644]
datafilecollector/docs/images/swagger.png [new file with mode: 0644]
datafilecollector/docs/images/yaml_logo.png [new file with mode: 0644]
datafilecollector/docs/index.rst [new file with mode: 0644]
datafilecollector/docs/overview.rst [new file with mode: 0644]
datafilecollector/docs/requirements-docs.txt [new file with mode: 0644]
datafilecollector/tox.ini [new file with mode: 0644]
influxlogger/docs/Architecture.png [new file with mode: 0644]
influxlogger/docs/Pictures.pptx [new file with mode: 0644]
influxlogger/docs/Schema.png [new file with mode: 0644]
influxlogger/docs/Subscription.png [new file with mode: 0644]
influxlogger/docs/_static/logo.png [new file with mode: 0644]
influxlogger/docs/api-docs.rst [new file with mode: 0644]
influxlogger/docs/conf.py [new file with mode: 0644]
influxlogger/docs/conf.yaml [new file with mode: 0644]
influxlogger/docs/developer-guide.rst [new file with mode: 0644]
influxlogger/docs/favicon.ico [new file with mode: 0644]
influxlogger/docs/images/swagger.png [new file with mode: 0644]
influxlogger/docs/images/yaml_logo.png [new file with mode: 0644]
influxlogger/docs/index.rst [new file with mode: 0644]
influxlogger/docs/overview.rst [new file with mode: 0644]
influxlogger/docs/requirements-docs.txt [new file with mode: 0644]
influxlogger/src/test/resources/pm_report.json
influxlogger/src/test/resources/pm_report_filtered.json
influxlogger/tox.ini [new file with mode: 0644]
pmproducer/docs/conf.py
pmproducer/docs/overview.rst
pmproducer/src/test/resources/jwtToken2.b64 [new file with mode: 0644]
pmproducer/src/test/resources/pm_report.json
pmproducer/tox.ini

index b26be1a..fc015ae 100644 (file)
@@ -28,7 +28,7 @@ keytool -list -v -keystore truststore.jks -storepass policy_agent
 
 ## License
 
-Copyright (C) 2021-2023 Nordix Foundation All rights reserved.
+Copyright (C) 2022-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
index 1b85bb9..5352f1b 100644 (file)
@@ -29,11 +29,12 @@ app:
   collected-files-path: "/tmp/oran_datafile/"
   # Numer of worker threads. Increased number may increase throughput, but will require more executing resources.
   number-of-worker-treads: 200
-  # KAFKA boostrap servers.
-  # several redundant boostrap servers can be specified, separated by a comma ','.
+   # If specified, and authorization token will be loaded from file and inserted in each HTTP header when using HTTP/HTTPS.
    # If the file name is empty, no authorization token is used
   auth-token-file:
   kafka:
+    # KAFKA boostrap servers.
+    # several redundant boostrap servers can be specified, separated by a comma ','.
     bootstrap-servers: localhost:9092
     # output topic
     collected-file-topic: collected-file
@@ -58,11 +59,17 @@ app:
      trust-store-password-file: /opt/app/datafile/config/truststore.pass
      trust-store: /opt/app/datafile/config/truststore.jks
   s3:
-    endpointOverride:
-    accessKeyId:
-    secretAccessKey:
-    bucket:
-    locksBucket:
+    # S3 endpoint
+    endpointOverride: http://localhost:9000
+    # S3 access key ID
+    accessKeyId: miniostorage
+    # S3 password
+    secretAccessKey: secret
+    # The bucket to store collected files
+    bucket: ropfiles
+    # The bucket where DFC keeps lockfiles. This is to avoid that the same file is transfered more than once if
+    # several load sharing DFC instances are running.
+    locksBucket: dfclocks
 springdoc:
   show-actuator: true
-  swagger-ui.disable-swagger-default-url: true
\ No newline at end of file
+  swagger-ui.disable-swagger-default-url: true
diff --git a/datafilecollector/docs/Architecture.png b/datafilecollector/docs/Architecture.png
new file mode 100644 (file)
index 0000000..4a1b8da
Binary files /dev/null and b/datafilecollector/docs/Architecture.png differ
diff --git a/datafilecollector/docs/Pictures.pptx b/datafilecollector/docs/Pictures.pptx
new file mode 100644 (file)
index 0000000..2debfc9
Binary files /dev/null and b/datafilecollector/docs/Pictures.pptx differ
diff --git a/datafilecollector/docs/_static/logo.png b/datafilecollector/docs/_static/logo.png
new file mode 100644 (file)
index 0000000..c3b6ce5
Binary files /dev/null and b/datafilecollector/docs/_static/logo.png differ
diff --git a/datafilecollector/docs/api-docs.rst b/datafilecollector/docs/api-docs.rst
new file mode 100644 (file)
index 0000000..fe3663e
--- /dev/null
@@ -0,0 +1,24 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 Nordix
+
+.. _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 APIs to access the Non-RT RIC Datafile Collector.
+
+Datafile collector
+==================
+
+No public APIs
+
diff --git a/datafilecollector/docs/conf.py b/datafilecollector/docs/conf.py
new file mode 100644 (file)
index 0000000..240d10c
--- /dev/null
@@ -0,0 +1,39 @@
+#  ============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'
+
+language = 'en'
+
+linkcheck_ignore = [
+    'http://localhost.*',
+    'http://127.0.0.1.*',
+    'https://gerrit.o-ran-sc.org.*',
+    './pm-producer-api.html', #Generated file that doesn't exist at link check.
+]
+
+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/datafilecollector/docs/conf.yaml b/datafilecollector/docs/conf.yaml
new file mode 100644 (file)
index 0000000..8f24fdb
--- /dev/null
@@ -0,0 +1,3 @@
+---
+project_cfg: oran
+project: nonrtric-plt-pmproducer
diff --git a/datafilecollector/docs/developer-guide.rst b/datafilecollector/docs/developer-guide.rst
new file mode 100644 (file)
index 0000000..38fa9dc
--- /dev/null
@@ -0,0 +1,29 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+Developer Guide
+===============
+
+This document provides a quickstart for developers of the Non-RT RIC Data File Collector.
+
+Additional developer guides are available on the `O-RAN SC NONRTRIC Developer wiki <https://wiki.o-ran-sc.org/display/RICNR/Release+E>`_.
+
+Data File Collector
+-------------------
+
+The DFC is configured via the application.yaml file.
+
+Example: ":download:`link <../config/application.yaml>`"
+
+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/Deploy+NONRTRIC+in+Kubernetes>`_.
+
+For more information see `Integration and Testing documentation on the O-RAN-SC wiki <https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/index.html>`_.
+
diff --git a/datafilecollector/docs/favicon.ico b/datafilecollector/docs/favicon.ico
new file mode 100644 (file)
index 0000000..00b0fd0
Binary files /dev/null and b/datafilecollector/docs/favicon.ico differ
diff --git a/datafilecollector/docs/images/swagger.png b/datafilecollector/docs/images/swagger.png
new file mode 100644 (file)
index 0000000..f5a9e0c
Binary files /dev/null and b/datafilecollector/docs/images/swagger.png differ
diff --git a/datafilecollector/docs/images/yaml_logo.png b/datafilecollector/docs/images/yaml_logo.png
new file mode 100644 (file)
index 0000000..0492eb4
Binary files /dev/null and b/datafilecollector/docs/images/yaml_logo.png differ
diff --git a/datafilecollector/docs/index.rst b/datafilecollector/docs/index.rst
new file mode 100644 (file)
index 0000000..a0ef6fc
--- /dev/null
@@ -0,0 +1,14 @@
+.. 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 Producer
+======================
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   ./overview.rst
+   ./developer-guide.rst
+   ./api-docs.rst
diff --git a/datafilecollector/docs/overview.rst b/datafilecollector/docs/overview.rst
new file mode 100644 (file)
index 0000000..6cf45a3
--- /dev/null
@@ -0,0 +1,117 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+
+Data File Collector
+~~~~~~~~~~~~~~~~~~~
+
+************
+Introduction
+************
+
+The task of the Data File Collector is to collect files from traffical nodes in the RAN.
+The main use case is:
+
+* The DFC received a File Ready VES event from a Kafka topic. This contains a list of all available files.
+
+* The DFC fetches files that are not already fectched from the traffical node. This is done using one of the supported file transfer protocols.
+
+* Each file is stored in an S3 Object Store bucket or in the file system (in a persistent volume).
+
+* For each stored file, a file publish message is sent to a Kafka topic for further processing.
+
+Supported file transfer protocols are:
+
+* SFTP
+
+* FTPES
+
+* HTTP
+
+* HTTPS
+
+
+The service is implemented in Java Spring Boot.
+
+.. image:: ./Architecture.png
+   :width: 1000pt
+
+This product is a part of :doc:`NONRTRIC <nonrtric:index>`.
+
+**************************
+Input File Ready VES Event
+**************************
+
+Here follows an example of the expected input object:
+
+.. code-block:: javascript
+
+  {
+   "event":{
+      "commonEventHeader":{
+         "sequence":0,
+         "eventName":"Noti_RnNode-Ericsson_FileReady",
+         "sourceName":"5GRAN_DU",
+         "lastEpochMicrosec":151983,
+         "startEpochMicrosec":15198378,
+         "timeZoneOffset":"UTC+05:00",
+         "changeIdentifier":"PM_MEAS_FILES"
+      },
+      "notificationFields":{
+         "notificationFieldsVersion":"notificationFieldsVersion",
+         "changeType":"FileReady",
+         "changeIdentifier":"PM_MEAS_FILES",
+         "arrayOfNamedHashMap":[
+            {
+               "name":"A20220418.1900-1915_seliitdus00487.xml",
+               "hashMap":{
+                  "fileFormatType":"org.3GPP.32.435#measCollec",
+                  "location":"https://launchpad.net/ubuntu/+source/perf-tools-unstable/1.0+git7ffb3fd-1ubuntu1/+build/13630748/+files/perf-tools-unstable_1.0+git7ffb3fd-1ubuntu1_all.deb",
+                  "fileFormatVersion":"V10",
+                  "compression":"gzip"
+               }
+            }
+         ]
+      }
+   }
+ }
+
+
+***************************
+Output File Publish Message
+***************************
+
+
+Below follows an example of an output File Publish Message. .
+
+.. code-block:: javascript
+
+   {
+     "productName":"RnNode",
+     "vendorName":"Ericsson",
+     "lastEpochMicrosec":151983,
+     "sourceName":"5GRAN_DU",
+     "startEpochMicrosec":15198378,
+     "timeZoneOffset":"UTC+05:00",
+     "compression":"gzip",
+     "fileFormatType":"org.3GPP.32.435#measCollec",
+     "fileFormatVersion":"V10",
+     "name":"5GRAN_DU/A20220418.1900-1915_seliitdus00487.xml",
+     "changeIdentifier":"PM_MEAS_FILES",
+     "objectStoreBucket":"ropfiles"
+  }
+
+
+*************
+Configuration
+*************
+
+The DFC is configured via its application.yaml
+
+
+An example application.yaml configuration file: ":download:`link <../config/application.yaml>`"
+
+
+
+
diff --git a/datafilecollector/docs/requirements-docs.txt b/datafilecollector/docs/requirements-docs.txt
new file mode 100644 (file)
index 0000000..692a79f
--- /dev/null
@@ -0,0 +1,12 @@
+tox
+Sphinx
+doc8
+docutils
+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/datafilecollector/tox.ini b/datafilecollector/tox.ini
new file mode 100644 (file)
index 0000000..d47de5e
--- /dev/null
@@ -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 = 2.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"
+whitelist_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
diff --git a/influxlogger/docs/Architecture.png b/influxlogger/docs/Architecture.png
new file mode 100644 (file)
index 0000000..fdf20bc
Binary files /dev/null and b/influxlogger/docs/Architecture.png differ
diff --git a/influxlogger/docs/Pictures.pptx b/influxlogger/docs/Pictures.pptx
new file mode 100644 (file)
index 0000000..6dfe41c
Binary files /dev/null and b/influxlogger/docs/Pictures.pptx differ
diff --git a/influxlogger/docs/Schema.png b/influxlogger/docs/Schema.png
new file mode 100644 (file)
index 0000000..251389a
Binary files /dev/null and b/influxlogger/docs/Schema.png differ
diff --git a/influxlogger/docs/Subscription.png b/influxlogger/docs/Subscription.png
new file mode 100644 (file)
index 0000000..609ec39
Binary files /dev/null and b/influxlogger/docs/Subscription.png differ
diff --git a/influxlogger/docs/_static/logo.png b/influxlogger/docs/_static/logo.png
new file mode 100644 (file)
index 0000000..c3b6ce5
Binary files /dev/null and b/influxlogger/docs/_static/logo.png differ
diff --git a/influxlogger/docs/api-docs.rst b/influxlogger/docs/api-docs.rst
new file mode 100644 (file)
index 0000000..f1720aa
--- /dev/null
@@ -0,0 +1,36 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2023 Nordix
+
+.. _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 APIs to access the Non-RIC Influx Logger.
+
+Influx Logger
+=============
+
+
+The API is also described in Swagger-JSON and YAML:
+
+.. csv-table::
+   :header: "API name", "|swagger-icon|", "|yaml-icon|"
+   :widths: 10,5, 5
+
+   "Influx Logger API", ":download:`link <../api/pmlog-api.json>`", ":download:`link <../api/pmlog-api.yaml>`"
+
+See `Influx Logger API <./pmlog-api.html>`_ for full details of the API.
+
+
+
+
diff --git a/influxlogger/docs/conf.py b/influxlogger/docs/conf.py
new file mode 100644 (file)
index 0000000..b09d04c
--- /dev/null
@@ -0,0 +1,52 @@
+#  ============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'
+
+language = 'en'
+
+linkcheck_ignore = [
+    'http://localhost.*',
+    'http://127.0.0.1.*',
+    'https://gerrit.o-ran-sc.org.*',
+    './pmlog-api.html', #Generated file that doesn't exist at link check.
+]
+
+extensions = ['sphinx.ext.intersphinx','sphinxcontrib.redoc']
+
+redoc = [
+            {
+                'name': 'Influx Logger API',
+                'page': 'pmlog-api',
+                'spec': '../api/pmlog-api.json',
+                '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/influxlogger/docs/conf.yaml b/influxlogger/docs/conf.yaml
new file mode 100644 (file)
index 0000000..8f24fdb
--- /dev/null
@@ -0,0 +1,3 @@
+---
+project_cfg: oran
+project: nonrtric-plt-pmproducer
diff --git a/influxlogger/docs/developer-guide.rst b/influxlogger/docs/developer-guide.rst
new file mode 100644 (file)
index 0000000..f9cdc63
--- /dev/null
@@ -0,0 +1,29 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+Developer Guide
+===============
+
+This document provides a quickstart for developers of the Non-RT RIC Influx Logger.
+
+Additional developer guides are available on the `O-RAN SC NONRTRIC Developer wiki <https://wiki.o-ran-sc.org/display/RICNR/Release+E>`_.
+
+Influx Logger
+-------------
+
+The component is configured via the application.yaml file.
+
+Example: ":download:`link <../config/application.yaml>`"
+
+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/Deploy+NONRTRIC+in+Kubernetes>`_.
+
+For more information see `Integration and Testing documentation on the O-RAN-SC wiki <https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/index.html>`_.
+
diff --git a/influxlogger/docs/favicon.ico b/influxlogger/docs/favicon.ico
new file mode 100644 (file)
index 0000000..00b0fd0
Binary files /dev/null and b/influxlogger/docs/favicon.ico differ
diff --git a/influxlogger/docs/images/swagger.png b/influxlogger/docs/images/swagger.png
new file mode 100644 (file)
index 0000000..f5a9e0c
Binary files /dev/null and b/influxlogger/docs/images/swagger.png differ
diff --git a/influxlogger/docs/images/yaml_logo.png b/influxlogger/docs/images/yaml_logo.png
new file mode 100644 (file)
index 0000000..0492eb4
Binary files /dev/null and b/influxlogger/docs/images/yaml_logo.png differ
diff --git a/influxlogger/docs/index.rst b/influxlogger/docs/index.rst
new file mode 100644 (file)
index 0000000..a0ef6fc
--- /dev/null
@@ -0,0 +1,14 @@
+.. 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 Producer
+======================
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   ./overview.rst
+   ./developer-guide.rst
+   ./api-docs.rst
diff --git a/influxlogger/docs/overview.rst b/influxlogger/docs/overview.rst
new file mode 100644 (file)
index 0000000..3e975ec
--- /dev/null
@@ -0,0 +1,144 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2023 Nordix
+
+
+Influx Logger
+~~~~~~~~~~~~~
+
+************
+Introduction
+************
+
+The task of the Influx Logger is to receive PM Measurement reports from a Kafka topic and to
+store the mesurement in an Influx time serier database.
+
+
+.. image:: ./Architecture.png
+   :width: 1000pt
+
+This product is a part of :doc:`NONRTRIC <nonrtric:index>`.
+
+***************
+Database Schema
+***************
+
+The PM Measurements are stored in the influx database. Each measured resource is mapped to a measurement in Influx.
+The name of the measurement is the Full Distinguished Name of the resource.
+Each measurement type (counter) is mapped to a field. The name of the field is the same as the name of the measurement type.
+
+In addition there is field which stores the GranularityPeriod in seconds of each report.
+The GP is for how long time the counters have been aggregated.
+
+The time is the end time of the report. The start time is then the logged time minus the granularity period.
+
+Here follows an example of one Influx table which contains aggregated values for a measured resource.
+
+.. image:: ./Schema.png
+   :width: 1000pt
+
+
+*****************************************
+Setting up the PM mesurement subscription
+*****************************************
+
+The influx logger will create its data subscription automatically. This is done by reading a file that
+defines the data to log and which Kafka topic to use (1). The contents of this file is used to create
+the information job for subscribing of PM measurement (2). ICS will make sure that all PM Measurement producers
+are ordered to start producing data (3).
+
+.. image:: ./Subscription.png
+   :width: 1000pt
+
+An example jobDefinition.json file: ":download:`link <../config/jobDefinition.json>`"
+
+********************
+Input PM Measurement
+********************
+
+The PM measuremenet information received from the Kafka topic is produced by the pmproducer.
+Here follows an example of the expected input object:
+
+.. 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"
+                              }
+                           ]
+                        }
+                     ]
+                  }
+               ]
+            }
+         }
+      }
+   }
+
+
+*************
+Configuration
+*************
+
+The DFC is configured via its application.yaml
+
+
+An example application.yaml configuration file: ":download:`link <../config/application.yaml>`"
+
+
+
+
diff --git a/influxlogger/docs/requirements-docs.txt b/influxlogger/docs/requirements-docs.txt
new file mode 100644 (file)
index 0000000..692a79f
--- /dev/null
@@ -0,0 +1,12 @@
+tox
+Sphinx
+doc8
+docutils
+setuptools
+six
+sphinx_rtd_theme
+sphinxcontrib-needs
+sphinxcontrib-swaggerdoc
+sphinx_bootstrap_theme
+sphinxcontrib-redoc
+lfdocs-conf
\ No newline at end of file
index 585c972..801af3b 100644 (file)
@@ -19,7 +19,7 @@
             "measInfoList": [
                {
                   "measInfoId": {
-                     "sMeasInfoId": ""
+                     "sMeasInfoId": "PM=1,PmGroup=NRCellDU_GNBDU"
                   },
                   "measTypes": {
                      "sMeasTypesList": [
index b308ff4..4100c8e 100644 (file)
@@ -20,7 +20,7 @@
             "measInfoList": [
                {
                   "measInfoId": {
-                     "sMeasInfoId": ""
+                     "sMeasInfoId": "PM=1,PmGroup=NRCellDU_GNBDU"
                   },
                   "measTypes": {
                      "sMeasTypesList": [
diff --git a/influxlogger/tox.ini b/influxlogger/tox.ini
new file mode 100644 (file)
index 0000000..d47de5e
--- /dev/null
@@ -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 = 2.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"
+whitelist_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
index ca7bb8f..a8dac9b 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2021-2022 Nordix Foundation. All rights reserved.
+#  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.
@@ -37,6 +37,7 @@ redoc = [
                 'name': 'PM Producer API',
                 'page': 'pm-producer-api',
                 'spec': '../api/api.json',
+                'embed': True,
             }
         ]
 
index 524f3e4..d0b893c 100644 (file)
@@ -67,12 +67,9 @@ Here follows an example of a resulting delivered PM report.
                "measInfoList":[
                   {
                      "measInfoId":{
-                        "sMeasInfoId":""
+                        "sMeasInfoId":"PM=1,PmGroup=NRCellDU_GNBDU"
                      },
                      "measTypes":{
-                        "map":{
-                           "succImmediateAssignProcs":1
-                        },
                         "sMeasTypesList":[
                            "succImmediateAssignProcs"
                         ]
diff --git a/pmproducer/src/test/resources/jwtToken2.b64 b/pmproducer/src/test/resources/jwtToken2.b64
new file mode 100644 (file)
index 0000000..61bea6b
--- /dev/null
@@ -0,0 +1 @@
+eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJtNVhGSVI1ZHNWcERrZGVidGg3MFRtQXBfNXhma0hPZHJFMTdmVWlpdkVVIn0.eyJleHAiOjE2Nzk0OTY5ODYsImlhdCI6MTY3OTQ5NjY4NiwianRpIjoiYzM2NTBmOGEtZTgzZS00NWI4LWFkNDMtZjQ3YTRiMWQzMGEyIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLm5vbnJ0cmljOjgwODAvcmVhbG1zL25vbnJ0cmljLXJlYWxtIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6IjU4NzRkNzM5LTA3ODYtNDg4MC05NTgwLTQ2NWEyNTk2NzJhYiIsInR5cCI6IkJlYXJlciIsImF6cCI6InBtLXByb2R1Y2VyLWpzb24ya2Fma2EiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbm9ucnRyaWMtcmVhbG0iLCJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwiY2xpZW50SG9zdCI6IjEyNy4wLjAuNiIsImNsaWVudElkIjoicG0tcHJvZHVjZXItanNvbjJrYWZrYSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LXBtLXByb2R1Y2VyLWpzb24ya2Fma2EiLCJjbGllbnRBZGRyZXNzIjoiMTI3LjAuMC42In0.PZUHIOkeD-bB_dlh1zHdJX467JsI9DiEGJE6tC-0B9iyupfv6-6-7CfVjTM3ItywYzYbp4TB3kU4UI_AneMPTaBa_naNGiy1_taj0J14K87TjAq09Tqyvd1rvR6TlDs55LiO_AlMPFOM7nnx_O3Ab_7gvPWlxa4pNqnP9DlLavcHxwEnsVQ9bVqZxtb2sXoiHdBPYjqmSE4sdV137F00kswlneVqEJtgm_b3TkZIK98MVk2wiQNrpzRXLNJPlFQaQQBp5rnzA6MoLd0H57bf-0wXKcCTYTAdoHl3UpiWKiD7vDIGsHwgKPakwlXM6KL-6Nj5x-JrC40ePe8GfWCKaA
index 402ffea..64269a3 100644 (file)
@@ -19,7 +19,7 @@
             "measInfoList": [
                {
                   "measInfoId": {
-                     "sMeasInfoId": ""
+                     "sMeasInfoId": "PM=1,PmGroup=NRCellDU_GNBDU"
                   },
                   "measTypes": {
                      "sMeasTypesList": [
                },
                {
                   "measInfoId": {
-                     "sMeasInfoId": ""
+                     "sMeasInfoId": "PM=1,PmGroup=NRCellDU_GNBDU"
                   },
                   "measTypes": {
                      "sMeasTypesList": [
index 2705e16..d47de5e 100644 (file)
@@ -1,5 +1,5 @@
 # ==================================================================================
-#       Copyright (c) 2020 Nordix
+#       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.