Merge "CodeCoverage improvement for dcaegen2-platform-mod-genprocessor"
authorVijay Venkatesh Kumar <vv770d@att.com>
Tue, 7 Jun 2022 20:04:28 +0000 (20:04 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 7 Jun 2022 20:04:28 +0000 (20:04 +0000)
17 files changed:
adapter/acumos/pom.xml
adapter/acumos/tox.ini
mod/runtimeapi/Changelog.md
mod/runtimeapi/pom.xml
mod/runtimeapi/runtime-core/pom.xml
mod/runtimeapi/runtime-web/pom.xml
mod2/helm-generator/Changelog.md
mod2/helm-generator/README.md
mod2/helm-generator/helmchartgenerator-cli/pom.xml
mod2/helm-generator/helmchartgenerator-cli/src/test/input/blueprint/base/values.yaml
mod2/helm-generator/helmchartgenerator-core/pom.xml
mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ComponentSpecParser.java
mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/values.yaml
mod2/helm-generator/helmchartgenerator-core/src/test/java/org/onap/dcaegen2/platform/helmchartgenerator/ComponentSpecParserTest.java
mod2/helm-generator/pom.xml
mod2/helm-generator/version.properties
releases/1.0.4-helm-generator.yaml [new file with mode: 0644]

index c160103..4b8dec8 100644 (file)
@@ -3,7 +3,7 @@
 ============LICENSE_START=======================================================
 org.onap.dcae
 ================================================================================
-Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
+Copyright (c) 2019-2020,2022 AT&T Intellectual Property. All rights reserved.
 Copyright (c) 2021 highstreet technologies GmbH. All rights reserved.
 =============================================================================
 Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,19 +20,20 @@ limitations under the License.
 ============LICENSE_END=========================================================
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-       <!-- This file is used only for Sonar scans -->
-       <modelVersion>4.0.0</modelVersion>
-       <groupId>org.onap.dcaegen2.platform.adapter</groupId>
-       <artifactId>dcaegen2-platform-adapter-acumos</artifactId>
-       <version>1.0.7</version>
-       <properties>
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <sonar.sources>.</sonar.sources>
-               <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
-               <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths>
-               <sonar.language>py</sonar.language>
-               <sonar.pluginname>python</sonar.pluginname>
-               <sonar.inclusions>**/*.py</sonar.inclusions>
-               <sonar.exclusions>**/tests/**,**/setup.py</sonar.exclusions>
-       </properties>
+  <!-- This file is used only for Sonar scans -->
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.onap.dcaegen2.platform.adapter</groupId>
+  <artifactId>dcaegen2-platform-adapter-acumos</artifactId>
+  <version>1.0.7</version>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <sonar.sources>.</sonar.sources>
+    <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
+    <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths>
+    <sonar.language>py</sonar.language>
+    <sonar.pluginname>python</sonar.pluginname>
+    <sonar.inclusions>**/*.py</sonar.inclusions>
+    <sonar.exclusions>**/tests/**,**/setup.py</sonar.exclusions>
+    <containerName>org.onap.dcaegen2.platform.adapter.acumos</containerName>
+  </properties>
 </project>
index ea7a24e..c92b18a 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.dcae
 # =============================================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019,2022 AT&T Intellectual Property. All rights reserved.
 # Copyright (c) 2021 highstreet technologies GmbH. All rights reserved.
 # =============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,7 +31,7 @@ deps=
 setenv =
     PYTHONPATH={toxinidir}
 commands=
-    nodeenv -p
+    nodeenv --node=17.2.0 -p
     npm install --global protobuf-jsonschema
     pytest --verbose --junitxml xunit-results.xml --cov aoconversion  --cov-report xml --cov-report html --cov-report term
 
index 23168b8..9f31f72 100644 (file)
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/) 
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [1.3.3] - 2022-06-03
+- [DCAEGEN2-3087] Switch helmgen-core version to 1.0.4 (includes fix for log path)
+
 ## [1.3.2] - 2022-01-04
 - [DCAEGEN2-3028] Change version format to MMddHHmm (removed YY)
 - [DCAEGEN2-3008] Update helmgen-core from snapshot to released version
index 7188527..56a0626 100644 (file)
@@ -2,8 +2,7 @@
 <!--
 ============LICENSE_START=======================================================
 Copyright (c) 2019-2022 AT&T Intellectual Property. All rights reserved.
-================================================================================
-Modifications Copyright (c) 2020 Nokia
+Copyright (c) 2020 Nokia
 ================================================================================
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
@@ -19,114 +18,114 @@ limitations under the License.
 ============LICENSE_END=========================================================
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <packaging>pom</packaging>
-       <modules>
-               <module>runtime-core</module>
-               <module>runtime-web</module>
-       </modules>
-       <parent>
-               <groupId>org.onap.oparent</groupId>
-               <artifactId>oparent</artifactId>
-               <version>2.0.0</version>
-       </parent>
-       <groupId>org.onap.dcaegen2.platform.mod</groupId>
-       <artifactId>runtimeapi</artifactId>
-       <version>1.3.2</version>
-       <name>dcaegen2-platform-mod-runtimeapi</name>
-       <description>MOD Runtime API</description>
-       <properties>
-               <maven.deploy.skip>true</maven.deploy.skip>
-               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
-               <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
-               </sonar.coverage.jacoco.xmlReportPaths>
-               <enforcer.skip>true</enforcer.skip>
-       </properties>
-       <profiles>
-               <profile>
-                       <id>java11</id>
-                       <properties>
-                               <maven.compiler.source>11</maven.compiler.source>
-                               <maven.compiler.target>11</maven.compiler.target>
-                               <maven.compiler.release>11</maven.compiler.release>
-                       </properties>
-                       <activation>
-                       <property>
-                               <name>m2e.version</name>
-                       </property>
-                       <activeByDefault>true</activeByDefault>
-               </activation>
-               </profile>
-               <profile>
-                       <id>java8</id>
-                       <properties>
-                               <maven.compiler.source>1.8</maven.compiler.source>
-                               <maven.compiler.target>1.8</maven.compiler.target>
-                       </properties>
-               </profile>
-       </profiles>
-       <dependencies>
-               <dependency>
-                       <groupId>commons-io</groupId>
-                       <artifactId>commons-io</artifactId>
-                       <version>2.8.0</version>
-               </dependency>
-       </dependencies>
-       <build>
-               <plugins>
-                       <!-- support sonar in multi-module project -->
-                       <plugin>
-                               <groupId>org.sonarsource.scanner.maven</groupId>
-                               <artifactId>sonar-maven-plugin</artifactId>
-                               <version>3.6.0.1398</version>
-                       </plugin>
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>pom</packaging>
+    <modules>
+        <module>runtime-core</module>
+        <module>runtime-web</module>
+    </modules>
+    <parent>
+        <groupId>org.onap.oparent</groupId>
+        <artifactId>oparent</artifactId>
+        <version>2.0.0</version>
+    </parent>
+    <groupId>org.onap.dcaegen2.platform.mod</groupId>
+    <artifactId>runtimeapi</artifactId>
+    <version>1.3.3</version>
+    <name>dcaegen2-platform-mod-runtimeapi</name>
+    <description>MOD Runtime API</description>
+    <properties>
+        <maven.deploy.skip>true</maven.deploy.skip>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
+        <enforcer.skip>true</enforcer.skip>
+    </properties>
+    <profiles>
+        <profile>
+            <id>java11</id>
+            <properties>
+                <maven.compiler.source>11</maven.compiler.source>
+                <maven.compiler.target>11</maven.compiler.target>
+                <maven.compiler.release>11</maven.compiler.release>
+            </properties>
+            <activation>
+            <property>
+                <name>m2e.version</name>
+            </property>
+            <activeByDefault>true</activeByDefault>
+        </activation>
+        </profile>
+        <profile>
+            <id>java8</id>
+            <properties>
+                <maven.compiler.source>1.8</maven.compiler.source>
+                <maven.compiler.target>1.8</maven.compiler.target>
+            </properties>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <!-- support sonar in multi-module project -->
+            <plugin>
+                <groupId>org.sonarsource.scanner.maven</groupId>
+                <artifactId>sonar-maven-plugin</artifactId>
+                <version>3.6.0.1398</version>
+            </plugin>
 
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-enforcer-plugin</artifactId>
-                               <version>1.4.1</version>
-                               <executions>
-                                       <execution>
-                                               <id>enforce-no-snapshots</id>
-                                               <goals>
-                                                       <goal>enforce</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <rules>
-                                                               <requireReleaseDeps>
-                                                                       <message>No Snapshots Allowed!</message>
-                                                               </requireReleaseDeps>
-                                                       </rules>
-                                                       <fail>false</fail>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>1.4.1</version>
+                <executions>
+                    <execution>
+                        <id>enforce-no-snapshots</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireReleaseDeps>
+                                    <message>No Snapshots Allowed!</message>
+                                </requireReleaseDeps>
+                            </rules>
+                            <fail>false</fail>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
 
-               </plugins>
-       </build>
-       <dependencyManagement>
-               <dependencies>
-                       <dependency>
-                               <groupId>org.springframework.boot</groupId>
-                               <artifactId>spring-boot-starter-parent</artifactId>
-                               <version>2.1.7.RELEASE</version>
-                               <type>pom</type>
-                               <scope>import</scope>
-                               <exclusions>
-                                       <exclusion>
-                                               <groupId>org.springframework.plugin</groupId>
-                                               <artifactId>spring-plugin-core</artifactId>
-                                       </exclusion>
-                               </exclusions>
-                       </dependency>
-                       <dependency>
-                               <groupId>org.springframework.plugin</groupId>
-                               <artifactId>spring-plugin-core</artifactId>
-                               <version>2.0.0.RELEASE</version>
-                       </dependency>
-               </dependencies>
-       </dependencyManagement>
+        </plugins>
+    </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-parent</artifactId>
+                <version>2.1.7.RELEASE</version>
+                <type>pom</type>
+                <scope>import</scope>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.springframework.plugin</groupId>
+                        <artifactId>spring-plugin-core</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.plugin</groupId>
+                <artifactId>spring-plugin-core</artifactId>
+                <version>2.0.0.RELEASE</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
 </project>
index 5970bfd..3ca24e7 100644 (file)
@@ -24,13 +24,13 @@ limitations under the License.
     <parent>
         <artifactId>runtimeapi</artifactId>
         <groupId>org.onap.dcaegen2.platform.mod</groupId>
-        <version>1.3.2</version>
+        <version>1.3.3</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>runtime-core</artifactId>
-    <version>1.3.2</version>
-
+    <version>1.3.3</version>
+    <properties><onap-gerrit-review>-changelog-missing</onap-gerrit-review></properties>
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -50,7 +50,7 @@ limitations under the License.
         <dependency>
             <groupId>org.onap.dcaegen2.platform</groupId>
             <artifactId>helmchartgenerator-core</artifactId>
-            <version>1.0.3</version>
+            <version>1.0.4</version>
         </dependency>
         <dependency>
             <groupId>org.yaml</groupId>
index af89495..01ea8fd 100644 (file)
@@ -23,18 +23,19 @@ limitations under the License.
     <parent>
         <groupId>org.onap.dcaegen2.platform.mod</groupId>
         <artifactId>runtimeapi</artifactId>
-        <version>1.3.2</version>
+        <version>1.3.3</version>
     </parent>
     <artifactId>runtime-web</artifactId>
-    <version>1.3.2-SNAPSHOT</version>
+    <version>1.3.3-SNAPSHOT</version>
     <packaging>jar</packaging>
+    <properties><onap-gerrit-review>-changelog-missing</onap-gerrit-review></properties>
     <name>runtime-web</name>
     <description>MOD Runtime Web Module</description>
     <dependencies>
         <dependency>
             <groupId>org.onap.dcaegen2.platform.mod</groupId>
             <artifactId>runtime-core</artifactId>
-            <version>1.3.2</version>
+            <version>1.3.3</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
index 2dabb70..81c1d59 100644 (file)
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [1.0.4]- 2022-05-24
+*  [DCAEGEN2-3087] Helm-gen fix for logpath default
+
 ## [1.0.3]- 2022-02-23
 *  [DCAEGEN2-3052] Vulnerability fixes for okhttp & commons-io modules
 
index d797410..5d8f003 100644 (file)
@@ -1,5 +1,5 @@
 ## Instructions for running helm chart generator
-version: 1.0.2-SNAPSHOT
+version: 1.0.4-SNAPSHOT
 
 1. Must have helm installed.
 
@@ -25,6 +25,4 @@ version: 1.0.2-SNAPSHOT
 
     Test files currently included in project:
         - Spec file: `helm-chart-generator\src\test\input\specs\ves.json`
-        - Charts Directory: `helm-chart-generator\src\test\input\blueprint` 
-        
-        gi  
\ No newline at end of file
+        - Charts Directory: `helm-chart-generator\src\test\input\blueprint`
index 3229e94..3b85801 100644 (file)
   <parent>
     <groupId>org.onap.dcaegen2.platform</groupId>
     <artifactId>helmchartgenerator</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4-SNAPSHOT</version>
   </parent>
   <artifactId>helmchartgenerator-cli</artifactId>
-  <version>1.0.3-SNAPSHOT</version>
+  <version>1.0.4-SNAPSHOT</version>
   <name>helmchartgenerator-cli</name>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -34,7 +34,7 @@
     <dependency>
       <groupId>org.onap.dcaegen2.platform</groupId>
       <artifactId>helmchartgenerator-core</artifactId>
-      <version>1.0.3-SNAPSHOT</version>
+      <version>1.0.4-SNAPSHOT</version>
     </dependency>
   </dependencies>
   <build>
index ea82bbe..cd4c1bf 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2021-2022 AT&T Intellectual Property. 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.
@@ -50,7 +50,8 @@ postgres:
 
 # log directory where logging sidecar should look for log files
 # if absent, no sidecar will be deployed
-#logDirectory: TBD  #/opt/app/VESCollector/logs #DONE
+#log:
+#  path: TBD  #/opt/app/VESCollector/logs #DONE
 
 # directory where TLS certs should be stored
 # if absent, no certs will be retrieved and stored
index 1b9dc35..1b5dcb2 100644 (file)
     <parent>
         <groupId>org.onap.dcaegen2.platform</groupId>
         <artifactId>helmchartgenerator</artifactId>
-        <version>1.0.3-SNAPSHOT</version>
+        <version>1.0.4-SNAPSHOT</version>
     </parent>
     <artifactId>helmchartgenerator-core</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4-SNAPSHOT</version>
     <name>helmchartgenerator-core</name>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
index 82d70c8..91fedf5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * # ============LICENSE_START=======================================================
- * # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
+ * # Copyright (c) 2021-2022 AT&T Intellectual Property. 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.
@@ -96,7 +96,9 @@ public class ComponentSpecParser {
             utils.putIfNotNull(outerValues, "tlsServer", cs.getAuxilary().getTlsInfo().getUseTls());
         }
         if(cs.getAuxilary() != null && cs.getAuxilary().getLogInfo() != null) {
-            utils.putIfNotNull(outerValues,"logDirectory", cs.getAuxilary().getLogInfo().get("log_directory"));
+            Map<String, Object> logPath = new LinkedHashMap<>();
+            logPath.put("path", cs.getAuxilary().getLogInfo().get("log_directory"));
+            outerValues.put("log", logPath);
         }
         if(imageUriExistsForFirstArtifact(cs)){
             utils.putIfNotNull(outerValues,"image", cs.getArtifacts()[0].getUri());
index ea82bbe..cd4c1bf 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2021-2022 AT&T Intellectual Property. 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.
@@ -50,7 +50,8 @@ postgres:
 
 # log directory where logging sidecar should look for log files
 # if absent, no sidecar will be deployed
-#logDirectory: TBD  #/opt/app/VESCollector/logs #DONE
+#log:
+#  path: TBD  #/opt/app/VESCollector/logs #DONE
 
 # directory where TLS certs should be stored
 # if absent, no certs will be retrieved and stored
index 8b26d25..e7d8cf2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * # ============LICENSE_START=======================================================
- * # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
+ * # Copyright (c) 2021-2022 AT&T Intellectual Property. 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.
@@ -78,7 +78,8 @@ class ComponentSpecParserTest {
     private void assertOuterKeyValues(ChartInfo chartInfo) {
         Map<String, Object> outerKv = chartInfo.getValues();
         assertThat(outerKv.get("image")).isEqualTo("nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest");
-        assertThat(outerKv.get("logDirectory")).isEqualTo("/opt/app/VESCollector/logs/");
+        Map<String, Object> logPath = (Map<String, Object>) chartInfo.getValues().get("log");
+        assertThat(logPath.get("path")).isEqualTo("/opt/app/VESCollector/logs/");
         assertThat(outerKv.get("certDirectory")).isEqualTo("/opt/app/dcae-certificate/");
         assertTrue((Boolean) outerKv.get("tlsServer"));
         assertTrue((Boolean) outerKv.get("useCmpv2Certificates"));
index 1b6d211..2c7060b 100644 (file)
@@ -33,7 +33,7 @@
 
     <groupId>org.onap.dcaegen2.platform</groupId>
     <artifactId>helmchartgenerator</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4-SNAPSHOT</version>
     <name>helm-chart-generator</name>
     <description>Helm chart generator</description>
     <properties>
index ab6cbfe..8bd09ad 100644 (file)
@@ -1,6 +1,6 @@
 major=1
 minor=0
-patch=3
+patch=4
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT
diff --git a/releases/1.0.4-helm-generator.yaml b/releases/1.0.4-helm-generator.yaml
new file mode 100644 (file)
index 0000000..a2c1428
--- /dev/null
@@ -0,0 +1,5 @@
+distribution_type: 'maven'
+version: '1.0.4'
+project: 'dcaegen2/platform'
+log_dir: 'dcaegen2-platform-mod2-helm-generator-maven-stage-master/206'
+git_tag: '1.0.4-helmgenerator'