Documentation updates 78/11178/1
authorPatrikBuhr <patrik.buhr@est.tech>
Thu, 15 Jun 2023 10:05:39 +0000 (12:05 +0200)
committerJohn Keeney <john.keeney@est.tech>
Thu, 15 Jun 2023 13:40:15 +0000 (13:40 +0000)
Renamed
 datafilecollector/src/test/java/org/oran/datafile/MockDatafile.java -> datafilecollector/src/test/java/org/oran/datafile/Integration.java

Code formatting using:
 mvn formatter:format spotless:apply process-sources

Issue-ID: CCSDK-3894
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Change-Id: I3342d64c113fc40c66744699033fecbbdaaaedde
(cherry picked from commit fbccee5729fb23f3424046c1d122d29f0fec545a)

datafilecollector/README.md
datafilecollector/src/main/java/org/oran/datafile/oauth2/OAuthBearerTokenJwt.java
datafilecollector/src/test/java/org/oran/datafile/Integration.java [moved from datafilecollector/src/test/java/org/oran/datafile/MockDatafile.java with 99% similarity]
influxlogger/README.md
influxlogger/src/test/java/org/oran/pmlog/Integration.java
pm-file-converter/README.md
pmproducer/README.md
pmproducer/src/main/java/org/oran/pmproducer/oauth2/OAuthBearerTokenJwt.java
pmproducer/src/test/java/org/oran/pmproducer/IntegrationWithIcs.java
pmproducer/src/test/java/org/oran/pmproducer/IntegrationWithKafka.java

index 785a46d..49e73bb 100644 (file)
@@ -30,6 +30,13 @@ Running with dev-mode of DFC
 - **Stop DFC**: http://<container_address>:8100/**stopDatafile** or https://<container_address>:8433/**stopDatafile**
 
 
+The latest documentation can be found here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/datafilecollector/index.html
+
+
+The comonent is part of the RAM PM use case, which is described here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/overview.html#overview
+
 
 ## License
 
index 74a1157..24e7608 100644 (file)
@@ -51,7 +51,7 @@ public class OAuthBearerTokenJwt implements OAuthBearerToken {
 
         }
         String payloadStr = new String(decoder.decode(chunks[1]));
-        JwtTokenBody token = gson.fromJson(payloadStr, JwtTokenBody.class);  
+        JwtTokenBody token = gson.fromJson(payloadStr, JwtTokenBody.class);
         return new OAuthBearerTokenJwt(token, tokenRaw);
     }
 
@@ -85,7 +85,7 @@ import reactor.core.publisher.Mono;
         "app.auth-token-file=src/test/resources/jwtToken.b64", //
         "app.kafka.use-oath-token=false"})
 @SuppressWarnings("squid:S3577") // Not containing any tests since it is a mock.
-class MockDatafile {
+class Integration {
 
     private static final int LAST_EPOCH_MICROSEC = 151983;
     private static final String SOURCE_NAME = "5GRAN_DU";
@@ -104,7 +104,7 @@ class MockDatafile {
     private static final String CHANGE_IDENTIFIER = "PM_MEAS_FILES";
     private static final String CHANGE_TYPE = "FileReady";
 
-    private static final Logger logger = LoggerFactory.getLogger(MockDatafile.class);
+    private static final Logger logger = LoggerFactory.getLogger(Integration.class);
     private static Gson gson = new GsonBuilder() //
         .disableHtmlEscaping() //
         .create(); //
@@ -125,7 +125,7 @@ class MockDatafile {
     private static class KafkaReceiver {
         public final String topic;
         private DataFromTopic receivedKafkaOutput;
-        private final Logger logger = LoggerFactory.getLogger(MockDatafile.class);
+        private final Logger logger = LoggerFactory.getLogger(Integration.class);
 
         int count = 0;
 
index 30404ce..57a8315 100644 (file)
@@ -1 +1,22 @@
-TODO
\ No newline at end of file
+# O-RAN-SC Non-RealTime RIC Influx Logger
+
+
+This product receives PM data and stores it in an influx datbase. 
+
+The component is a springboot service and is configured as any springboot service through the file `config/application.yaml`. The component log can be retrieved and logging can be controled by means of REST call. See the API documentation (api/api.yaml).
+
+The latest documentation can be found here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/influxlogger/index.html
+
+
+The comonent is part of the RAM PM use case, which is described here: 
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/overview.html#overview
+
+## License
+
+Copyright (C) 2023 Nordix Foundation. 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.
+For more information about license please see the [LICENSE](LICENSE.txt) file for details.
index 1fad28d..ea932b6 100644 (file)
@@ -167,6 +167,13 @@ class Integration {
     final String PM_REPORT_FILE_BIG = "./src/test/resources/A20000626.2315+0200-2330+0200_HTTPS-6-73.json";
     final String PM_REPORT_FILE = "./src/test/resources/pm_report.json";
 
+    /**
+     * Generate a PM report
+     * 
+     * @param sequenceValue used for generating counter values
+     * @param noOfObjects used for generating counter values
+     * @return
+     */
     String pmReport(int sequenceValue, int noOfObjects) {
         try {
             String str = Files.readString(Path.of(PM_REPORT_FILE), Charset.defaultCharset());
@@ -193,6 +200,9 @@ class Integration {
 
     }
 
+    // Store PM data for 24 hours in influx. The the data contains genenerated
+    // counter values
+    // that varies over time.
     @Test
     void testStoreReportsInflux() throws Exception {
         final int NO_OF_OBJECTS = 24 * 4;
index 93c19d8..988131b 100644 (file)
@@ -1,6 +1,13 @@
 
 ## PM Data Producer
 
+The latest documentation can be found here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/pm-file-converter/index.html
+
+
+The comonent is part of the RAM PM use case, which is described here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/overview.html#overview
+
 ### Manual build, tag and push to image repo
 
 Build for docker or local kubernetes\
@@ -55,4 +62,4 @@ 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.
\ No newline at end of file
+limitations under the License.
index 8f40e79..5575601 100644 (file)
@@ -24,6 +24,13 @@ The file `config/application_configuration.json` contains the configuration of j
 }
 ```
 
+The latest documentation can be found here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/pmproducer/index.html
+
+
+The comonent is part of the RAM PM use case, which is described here:
+https://docs.o-ran-sc.org/projects/o-ran-sc-nonrtric-plt-ranpm/en/latest/overview.html#overview
+
 
 ## License
 
index 1c8c937..1160657 100644 (file)
@@ -55,7 +55,7 @@ public class OAuthBearerTokenJwt implements OAuthBearerToken {
 
         }
         String payloadStr = new String(decoder.decode(chunks[1]));
-        JwtTokenBody token = gson.fromJson(payloadStr, JwtTokenBody.class);    
+        JwtTokenBody token = gson.fromJson(payloadStr, JwtTokenBody.class);
         return new OAuthBearerTokenJwt(token, tokenRaw);
     }
 
index de79b60..f6a8d5d 100644 (file)
@@ -57,6 +57,10 @@ import org.springframework.test.context.TestPropertySource;
         "app.configuration-filepath=./src/test/resources/test_application_configuration.json", //
         "app.ics-base-url=https://localhost:8434" //
 })
+/**
+ * Tests that the interwork with ICS works.
+ * ICS must be running.
+ */
 class IntegrationWithIcs {
 
     private static final String JOB_ID = "JOB_ID";
index 170f555..04b501b 100644 (file)
@@ -90,6 +90,10 @@ import reactor.kafka.sender.SenderRecord;
         "app.s3.bucket=pmproducertest", //
         "app.auth-token-file=src/test/resources/jwtToken.b64", //
         "app.kafka.use-oath-token=false"}) //
+/**
+ * Tests interwork with Kafka and Minio
+ * Requires that Kafka and ICS is started.
+ */
 class IntegrationWithKafka {
 
     final static String PM_TYPE_ID = "PmDataOverKafka";
@@ -615,7 +619,7 @@ class IntegrationWithKafka {
 
     @Test
     void testHistoricalData() throws Exception {
-        // test
+        // test that it works to get already fetched data
         final String JOB_ID = "testHistoricalData";
 
         DataStore fileStore = dataStore();