fix issue with deploying server TLS certificates 23/111923/3
authorKotagiri, Ramprasad (rp5662) <rp5662@att.com>
Mon, 31 Aug 2020 20:33:58 +0000 (16:33 -0400)
committerKotagiri, Ramprasad (rp5662) <rp5662@att.com>
Mon, 31 Aug 2020 21:04:31 +0000 (17:04 -0400)
Issue-ID: DCAEGEN2-2298

Change-Id: I45cb6684902f7eedfb84a390717bdfb3dd51f746
Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
ccsdk-app-common/.checkstyle
ccsdk-app-common/pom.xml
ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImpl.java
ccsdk-app-common/src/test/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImplTest.java
ccsdk-app-os/create_table.sql
ccsdk-app-os/docker-dashboard-installation.sh
ccsdk-app-overlay/.checkstyle
pom.xml

index 327b388..46eb53c 100644 (file)
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
-  <local-check-config name="maven-checkstyle-plugin onap-license" location="jar:file:/Users/dt5972/.m2/repository/org/onap/oparent/checkstyle/1.2.3/checkstyle-1.2.3.jar!/onap-checkstyle/check-license.xml" type="remote" description="maven-checkstyle-plugin configuration onap-license">
+  <local-check-config name="maven-checkstyle-plugin onap-license" location="jar:file:/C:/Users/rp5662/.m2/repository/org/onap/oparent/checkstyle/2.0.0/checkstyle-2.0.0.jar!/onap-checkstyle/check-license.xml" type="remote" description="maven-checkstyle-plugin configuration onap-license">
+    <property name="checkstyle.header.file" value="C:\Users\rp5662\Documents\workspace-java11\.metadata\.plugins\org.eclipse.core.resources\.projects\ccsdk-app-common\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-onap-license.txt"/>
     <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
-    <property name="checkstyle.header.file" value="/Users/dt5972/eclipse/onap/.metadata/.plugins/org.eclipse.core.resources/.projects/ccsdk-app-common/com.basistech.m2e.code.quality.checkstyleConfigurator/checkstyle-header-onap-license.txt"/>
   </local-check-config>
-  <local-check-config name="maven-checkstyle-plugin onap-java-style" location="jar:file:/Users/dt5972/.m2/repository/org/onap/oparent/checkstyle/1.2.3/checkstyle-1.2.3.jar!/onap-checkstyle/onap-java-style.xml" type="remote" description="maven-checkstyle-plugin configuration onap-java-style">
+  <local-check-config name="maven-checkstyle-plugin onap-java-style" location="jar:file:/C:/Users/rp5662/.m2/repository/org/onap/oparent/checkstyle/2.0.0/checkstyle-2.0.0.jar!/onap-checkstyle/onap-java-style.xml" type="remote" description="maven-checkstyle-plugin configuration onap-java-style">
+    <property name="checkstyle.header.file" value="C:\Users\rp5662\Documents\workspace-java11\.metadata\.plugins\org.eclipse.core.resources\.projects\ccsdk-app-common\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-onap-java-style.txt"/>
     <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
-    <property name="checkstyle.header.file" value="/Users/dt5972/eclipse/onap/.metadata/.plugins/org.eclipse.core.resources/.projects/ccsdk-app-common/com.basistech.m2e.code.quality.checkstyleConfigurator/checkstyle-header-onap-java-style.txt"/>
   </local-check-config>
   <fileset name="java-sources-onap-license" enabled="true" check-config-name="maven-checkstyle-plugin onap-license" local="true">
-    <file-match-pattern match-pattern="^src/test/java/.*\/.*\.java" include-pattern="true"/>
-    <file-match-pattern match-pattern="^src/main/java/.*\/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/main/java/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/test/java/.*\.java" include-pattern="true"/>
   </fileset>
   <fileset name="java-sources-onap-java-style" enabled="true" check-config-name="maven-checkstyle-plugin onap-java-style" local="true">
-    <file-match-pattern match-pattern="^src/test/java/.*\/.*\.java" include-pattern="true"/>
-    <file-match-pattern match-pattern="^src/main/java/.*\/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/main/java/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/test/java/.*\.java" include-pattern="true"/>
     <file-match-pattern match-pattern="^src/main/resources.*\.properties" include-pattern="true"/>
     <file-match-pattern match-pattern="^src/test/resources.*\.properties" include-pattern="true"/>
   </fileset>
index e9595d3..3266c22 100644 (file)
@@ -29,6 +29,9 @@
                <skipTests>false</skipTests>
                <jacocoVersion>0.7.6.201602180812</jacocoVersion>
                <jackson.version>2.9.8</jackson.version>
+               <sonar.coverage.jacoco.xmlReportPaths> 
+                       ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml 
+       </sonar.coverage.jacoco.xmlReportPaths>
        </properties>
 
        <repositories>
index ab9dd59..6b7af79 100644 (file)
@@ -1103,8 +1103,9 @@ public class CloudifyRestClientImpl extends RestClientBase implements CloudifyCl
     public CloudifyPluginList getPlugins() throws Exception {
         String url = buildUrl(new String[] {baseUrl, PLUGINS}, null);
         logger.debug(EELFLoggerDelegate.debugLogger, "getPlugins: url {}", url);
+        HttpEntity<String> entity = getTenantHeader("default_tenant");
         ResponseEntity<CloudifyPluginList> response = restTemplate.exchange(url, HttpMethod.GET,
-            null, new ParameterizedTypeReference<CloudifyPluginList>() {});
+            entity, new ParameterizedTypeReference<CloudifyPluginList>() {});
         CloudifyPluginList result = response.getBody();
         return result;
     }
index a6f5038..c117f23 100644 (file)
@@ -772,7 +772,7 @@ public class CloudifyRestClientImplTest extends MockitoTestSuite {
         ResponseEntity<CloudifyPluginList> response =
             new ResponseEntity<CloudifyPluginList>(cfyPluginList, HttpStatus.OK);
 
-        when(mockRest.exchange(anyString(), eq(HttpMethod.GET), isNull(),
+        when(mockRest.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class),
             eq(new ParameterizedTypeReference<CloudifyPluginList>() {}))).thenReturn(response);
 
         CloudifyPluginList actuals = subject.getPlugins();
index 837c813..d8d3356 100644 (file)
@@ -1011,7 +1011,7 @@ Insert into dashboard_pg_db_common.fn_role_function (ROLE_ID,FUNCTION_CD) values
 Insert into dashboard_pg_db_common.fn_user 
        (USER_ID,ORG_ID,MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) 
        values 
-       (1,null,null,'Super',null,'User','908-901-2494',null,null,'email@om.ops.com',null,null,null,'su1234',null,'su','fusion',to_date('21-AUG-14','%d-%M-%Y'),'Y',null,to_date('15-DEC-05','%d-%M-%Y'),1,to_date('21-AUG-14','%d-%M-%Y'),'N',null,null,null,'NJ',null,'US',null,null,null,null,null,10,null,null,null,null,null,null)
+       (1,null,null,'Super',null,'User','908-901-2494',null,null,'email@om.ops.com',null,null,null,'su1234',null,'su1234','fusion',to_date('21-AUG-14','%d-%M-%Y'),'Y',null,to_date('15-DEC-05','%d-%M-%Y'),1,to_date('21-AUG-14','%d-%M-%Y'),'N',null,null,null,'NJ',null,'US',null,null,null,null,null,10,null,null,null,null,null,null)
        ;
 
 -- fn_app
index 1a1a3f9..39f949a 100644 (file)
@@ -63,7 +63,7 @@ then
     protocol=\"org.apache.coyote.http11.Http11NioProtocol\"
     port=\"8443\" maxThreads=\"200\"
     scheme=\"https\" secure=\"true\" SSLEnabled=\"true\"
-    keystoreFile=\"/opt/app/osaaf/cert.jks\" keystorePass=\"`cat /opt/app/osaaf/jks.pass`\"
+    keystoreFile=\"/opt/app/osaaf/cert.jks\" keystorePass=\"`sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' -e 's/"/\&quot;/g' -e "s/'/\&apos;/g" < /opt/app/osaaf/jks.pass`\"
     clientAuth=\"false\" sslProtocol=\"TLS\"/>" >> enablehttps.txt
     sed '/Service name=\"Catalina\">/r enablehttps.txt' $CATALINA_HOME/conf/server.xml > $CATALINA_HOME/conf/server-https.xml
     mv $CATALINA_HOME/conf/server-https.xml $CATALINA_HOME/conf/server.xml
index f7cae1b..f9346ee 100644 (file)
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
-  <local-check-config name="maven-checkstyle-plugin onap-license" location="jar:file:/Users/dt5972/.m2/repository/org/onap/oparent/checkstyle/1.2.3/checkstyle-1.2.3.jar!/onap-checkstyle/check-license.xml" type="remote" description="maven-checkstyle-plugin configuration onap-license">
+  <local-check-config name="maven-checkstyle-plugin onap-license" location="jar:file:/C:/Users/rp5662/.m2/repository/org/onap/oparent/checkstyle/2.0.0/checkstyle-2.0.0.jar!/onap-checkstyle/check-license.xml" type="remote" description="maven-checkstyle-plugin configuration onap-license">
+    <property name="checkstyle.header.file" value="C:\Users\rp5662\Documents\workspace-java11\.metadata\.plugins\org.eclipse.core.resources\.projects\ccsdk-app-overlay\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-onap-license.txt"/>
     <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
-    <property name="checkstyle.header.file" value="/Users/dt5972/eclipse/onap/.metadata/.plugins/org.eclipse.core.resources/.projects/ccsdk-app-overlay/com.basistech.m2e.code.quality.checkstyleConfigurator/checkstyle-header-onap-license.txt"/>
   </local-check-config>
-  <local-check-config name="maven-checkstyle-plugin onap-java-style" location="jar:file:/Users/dt5972/.m2/repository/org/onap/oparent/checkstyle/1.2.3/checkstyle-1.2.3.jar!/onap-checkstyle/onap-java-style.xml" type="remote" description="maven-checkstyle-plugin configuration onap-java-style">
+  <local-check-config name="maven-checkstyle-plugin onap-java-style" location="jar:file:/C:/Users/rp5662/.m2/repository/org/onap/oparent/checkstyle/2.0.0/checkstyle-2.0.0.jar!/onap-checkstyle/onap-java-style.xml" type="remote" description="maven-checkstyle-plugin configuration onap-java-style">
+    <property name="checkstyle.header.file" value="C:\Users\rp5662\Documents\workspace-java11\.metadata\.plugins\org.eclipse.core.resources\.projects\ccsdk-app-overlay\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-onap-java-style.txt"/>
     <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
-    <property name="checkstyle.header.file" value="/Users/dt5972/eclipse/onap/.metadata/.plugins/org.eclipse.core.resources/.projects/ccsdk-app-overlay/com.basistech.m2e.code.quality.checkstyleConfigurator/checkstyle-header-onap-java-style.txt"/>
   </local-check-config>
   <fileset name="java-sources-onap-license" enabled="true" check-config-name="maven-checkstyle-plugin onap-license" local="true">
-    <file-match-pattern match-pattern="^src/test/java.*\/.*\.java" include-pattern="true"/>
-    <file-match-pattern match-pattern="^src/main/java.*\/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/main/java.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/test/java.*\.java" include-pattern="true"/>
   </fileset>
   <fileset name="java-sources-onap-java-style" enabled="true" check-config-name="maven-checkstyle-plugin onap-java-style" local="true">
-    <file-match-pattern match-pattern="^src/test/java.*\/.*\.java" include-pattern="true"/>
-    <file-match-pattern match-pattern="^src/main/java.*\/.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/main/java.*\.java" include-pattern="true"/>
+    <file-match-pattern match-pattern="^src/test/java.*\.java" include-pattern="true"/>
     <file-match-pattern match-pattern="^src/main/resources.*\.properties" include-pattern="true"/>
     <file-match-pattern match-pattern="^src/test/resources.*\.properties" include-pattern="true"/>
   </fileset>
diff --git a/pom.xml b/pom.xml
index 180e0dc..1d23436 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,9 @@
         <sonar.exclusions>**/external/**</sonar.exclusions>
         <maven.compiler.source>11</maven.compiler.source>
         <maven.compiler.target>11</maven.compiler.target>
+        <sonar.coverage.jacoco.xmlReportPaths> 
+                       ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml 
+       </sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
     <modules>