Merge "Removed MsoLogger from 'MSOCommonBPMN'"
authorSteve Smokowski <ss835w@att.com>
Wed, 27 Feb 2019 18:12:17 +0000 (18:12 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 27 Feb 2019 18:12:17 +0000 (18:12 +0000)
12 files changed:
adapters/mso-catalog-db-adapter/pom.xml
adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml
adapters/mso-catalog-db-adapter/src/main/resources/application.yaml
adapters/mso-openstack-adapters/pom.xml
adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
adapters/mso-openstack-adapters/src/main/resources/application.yaml
adapters/mso-openstack-adapters/src/test/resources/application-test.yaml
bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java
cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientResponse.java

index dbfc5b7..390c775 100644 (file)
                         </exclusion>
                </exclusions>
                </dependency>
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-jdbc</artifactId>                       
-               </dependency>
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
index 078e22b..d7c13ea 100644 (file)
@@ -13,15 +13,7 @@ mso:
         endpoint: http://localhost:8090
   db:
     auth: Basic YnBlbDptc28tZGItMTUwNyE=
-
 spring:
-  datasource:
-    jdbc-url: jdbc:mariadb://localhost:3306/catalogdb
-    username: catalog
-    password: catalog123
-    driver-class-name: org.mariadb.jdbc.Driver
-    initialization-mode: never
-
   security:
     usercredentials:
     -  
@@ -40,8 +32,4 @@ spring:
 server:
     port: 8090
 
-flyway:
-  baseline-on-migrate: false
-  jdbc-url: jdbc:mariadb://localhost:3306/catalogdb
-  user: catalog
-  password: catalog123
+
index 0977bf9..aa9317c 100644 (file)
@@ -16,7 +16,7 @@ mso:
     
 spring:
   datasource:
-    jdbcUrl: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+    url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
     username: ${DB_USERNAME}
     password: ${DB_PASSWORD}
     driver-class-name: org.mariadb.jdbc.Driver
index 12aee67..f2ee073 100644 (file)
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-data-jpa</artifactId>
-                       <exclusions>
-                               <exclusion>
-                                       <groupId>org.apache.tomcat</groupId>
-                                       <artifactId>tomcat-jdbc</artifactId>
-                               </exclusion>
-                       </exclusions>
-               </dependency>
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-jdbc</artifactId>                       
                </dependency>
                <dependency>
                        <groupId>org.apache.cxf</groupId>
             <artifactId>swagger-ui</artifactId>
             <version>3.5.0</version>
         </dependency>
-
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
index 771aa80..936bde1 100644 (file)
@@ -49,7 +49,16 @@ ssl-enable: false
 tomcat:
   max-threads: 50
 mso:
+  msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+  auth: 6B466C603A260F3655DBF91E53CE54667041C01406D10E8CAF9CC24D8FA5388D06F90BFE4C852052B436
   logPath: logs
+  workflow:
+    endpoint: http://bpmn-infra:8081/sobpmnengine
+    topics:
+      retryMultiplier: 1000
+  config:
+    cadi:
+      aafId: test
   catalog:
     db:
       spring:
@@ -61,26 +70,8 @@ mso:
     core-pool-size: 50
     max-pool-size: 50
     queue-capacity: 500
-# H2
-spring:
-  datasource:
-    url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
-    username: sa
-    password: sa
-    driver-class-name: org.h2.Driver
-    intialize: true
-  h2:
-    console:
-      enabled: true
-      path: /h2
 
-  jpa:
-      show-sql: true
-      hibernate:
-        dialect: org.hibernate.dialect.MySQL5Dialect
-        ddl-auto: validate
-        naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
-        enable_lazy_load_no_trans: true
+spring:
   security:
     usercredentials:
     -  
index a68372f..4e8d389 100644 (file)
@@ -18,7 +18,7 @@ mso:
       retryMultiplier: 60000
 spring:
   datasource:
-    jdbcUrl: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+    url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
     username: ${DB_USERNAME}
     password: ${DB_PASSWORD}
     driver-class-name: org.mariadb.jdbc.Driver
index 051884d..398885c 100644 (file)
@@ -77,7 +77,7 @@ mso:
     queue-capacity: 500
 spring:
   datasource:
-    jdbcUrl: jdbc:mariadb://localhost:3307/catalogdb
+    url: jdbc:mariadb://localhost:3307/catalogdb
     username: root
     password: password
     driver-class-name: org.mariadb.jdbc.Driver    
index ccea948..d7effb0 100644 (file)
@@ -14,8 +14,6 @@ camunda:
     job-execution:
       max-pool-size: 30
       core-pool-size: 3
-entitymanager:
-  packagesToScan: com
 pnf:
   dmaap:
     host: message-router
@@ -34,7 +32,10 @@ mso:
     core-pool-size: 50
     max-pool-size: 50
     queue-capacity: 500
-  adapters:
+  adapters:   
+    requestDb:
+      endpoint: http://request-db-adapter:8083
+      auth: Basic bTA0NzY4QG5vbi1wcm9kLm1zby5lY29tcC5hdHQuY29tOkF0dG0wNDc2OExpZmUhQA==
     completemsoprocess:
       endpoint: http://localhost:30253/CompleteMsoProcess
     db:
@@ -224,20 +225,8 @@ appc:
     secret: lgjXraD1HutKxv8jEN6tVouu
     service: ueb
     poolMembers: localhost:3904
-server:
-  port: 8080
-  tomcat:
-    max-threads: 50
-spring:
-  h2:
-    console:
-      enabled: true
-      path: /h2  
-  datasource:
-    url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
-    username: sa
-    password: sa
-    driverClassName: org.h2.Driver
+
+spring:  
   security:
     usercredentials:
     -  
@@ -264,23 +253,5 @@ spring:
       username: mso_admin
       password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
       role: ACTUATOR
-request:
-  datasource:
-    url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
-    username: sa
-    password: sa
-    driver-class-name: org.h2.Driver
-    intialize: true 
-    
-# Hibernate
-hibernate:
-  dialect: org.hibernate.dialect.MySQL5Dialect
-  show_sql: true
-  hbm2ddl:
-    auto: create
-
-#Actuator
-management: 
-  context-path: /manage
 
 
index 18b94e7..a91cb9d 100644 (file)
@@ -8,7 +8,7 @@ mso:
 spring: 
   datasource:
      driver-class-name: org.mariadb.jdbc.Driver 
-     jdbcUrl: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
+     url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
      username: ${DB_ADMIN_USERNAME}
      password: ${DB_ADMIN_PASSWORD}
   http:
index 21ad485..56a92cb 100644 (file)
@@ -157,7 +157,7 @@ sniro:
     headers.latestVersion: 2
 spring:
   datasource:
-    jdbcUrl: jdbc:mariadb://localhost:3307/camundabpmn
+    url: jdbc:mariadb://localhost:3307/camundabpmn
     username: root
     password: password
     driver-class-name: org.mariadb.jdbc.Driver
index 2595ddc..247afb3 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * 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
@@ -53,7 +55,6 @@ import org.onap.so.cloudify.base.client.CloudifyConnectException;
 import org.onap.so.cloudify.base.client.CloudifyRequest;
 import org.onap.so.cloudify.base.client.CloudifyResponse;
 import org.onap.so.cloudify.base.client.CloudifyResponseException;
-import org.onap.so.logger.MsoLogger;
 
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.fasterxml.jackson.annotation.JsonRootName;
@@ -61,13 +62,15 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class HttpClientConnector implements CloudifyClientConnector {
 
        private static ObjectMapper DEFAULT_MAPPER;
        private static ObjectMapper WRAPPED_MAPPER;
        
-    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, HttpClientConnector.class);
+    private static Logger logger = LoggerFactory.getLogger(HttpClientConnector.class);
 
        static {
                DEFAULT_MAPPER = new ObjectMapper();
@@ -141,7 +144,8 @@ public class HttpClientConnector implements CloudifyClientConnector {
                                        String entityJson = mapper.writeValueAsString (request.entity().getEntity());
                                        entity = new StringEntity(entityJson, ContentType.create(request.entity().getContentType()));
                                        
-                                       LOGGER.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\""));
+                                       logger.debug ("Request JSON Body: {}", entityJson.replaceAll("\"password\":\"[^\"]*\"",
+                                               "\"password\":\"***\""));
        
                                } catch (JsonProcessingException e) {
                                        throw new HttpClientException ("Json processing error on request entity", e);
@@ -198,7 +202,7 @@ public class HttpClientConnector implements CloudifyClientConnector {
                try {
                        httpResponse = httpClient.execute(httpRequest);
 
-                       LOGGER.debug ("Response status: " + httpResponse.getStatusLine().getStatusCode());
+                       logger.debug ("Response status: {}", httpResponse.getStatusLine().getStatusCode());
                        
                        httpClientResponse = new HttpClientResponse (httpResponse);
 
@@ -223,7 +227,7 @@ public class HttpClientConnector implements CloudifyClientConnector {
                }
                catch (Exception e) {
                        // Catchall for anything else, must throw as a RuntimeException
-                       LOGGER.error("Client exception", e);
+                       logger.error("Client exception", e);
                        throw new RuntimeException("Unexpected client exception", e);
                }
                finally {
@@ -232,7 +236,7 @@ public class HttpClientConnector implements CloudifyClientConnector {
                                try {
                                        httpResponse.close();
                                } catch (IOException e) {
-                                       LOGGER.debug("Unable to close HTTP Response: " + e);
+                                       logger.debug("Unable to close HTTP Response: " + e);
                                }
                }
                
index 0c1743f..b9e7851 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * 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
@@ -25,7 +27,8 @@ import org.apache.http.HttpResponse;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 import org.onap.so.cloudify.base.client.CloudifyResponse;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -36,7 +39,7 @@ import java.util.Map;
 
 public class HttpClientResponse implements CloudifyResponse {
 
-    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, HttpClientResponse.class);
+    private static Logger logger = LoggerFactory.getLogger(HttpClientResponse.class);
        
     private HttpResponse response = null;
     private String entityBody = null;
@@ -47,9 +50,9 @@ public class HttpClientResponse implements CloudifyResponse {
         
         // Read the body so InputStream can be closed
         if (response.getEntity() == null) {
-               // No body
-               LOGGER.debug ("No Response Body");
-               return;
+            // No body
+            logger.debug("No Response Body");
+            return;
         }
         
                ByteArrayOutputStream responseBody = new ByteArrayOutputStream();
@@ -59,7 +62,7 @@ public class HttpClientResponse implements CloudifyResponse {
                        throw new HttpClientException ("Error Reading Response Body", e);
                }
                entityBody = responseBody.toString();
-               LOGGER.debug (entityBody);
+        logger.debug(entityBody);
     }
 
     
@@ -94,7 +97,7 @@ public class HttpClientResponse implements CloudifyResponse {
 
     @Override
     public Map<String, String> headers() {
-        Map<String, String> headers = new HashMap<String, String>();
+        Map<String, String> headers = new HashMap<>();
 
         Header responseHeaders[] = response.getAllHeaders();
         for (Header h : responseHeaders) {