From 69455a268648881f4b5a0c4547d769c2e6ecc2c1 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Tue, 4 Sep 2018 11:21:02 -0400 Subject: added generic fabric support to SO Fix Autoincrement of ID field in table Fix accidental removal of method Update usage of requestdb client removed unused imports in common tasks and test Fix broken branch, have unit tests pass references the Epic branch Fix broken branch from compiling committing classpath for vfc adapter cause its not going away added in the fail case for when there are no profiles removed second set of adapters in application test yml removed double adapters in request db application test added jpa repo dependency to the so bpmn folder pom add creation timestamp column to the table added in null checks for Config returned from policy switched to string in requestprocess with jenerate switched to string in requestprocess with jenerate updated aai version in common pom to 605 from 591 renamed the db scripts for flyway sync to register added endpoint to application test yml for failing test ... Change-Id: I800f837ea75d7cdff740dc3a387e4d7654cfd085 Issue-ID: SO-972 Signed-off-by: Benjamin, Max (mb388a) --- .../requestsdb/MsoRequestsDbAdapterImpl.java | 2 +- .../requestsdb/application/WebMvcConfig.java | 22 +++++++++++++++++++++- .../src/main/resources/application-local.yaml | 4 ++++ .../V4.2__Add_Request_Processing_Data.sql | 18 ++++++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql (limited to 'adapters/mso-requests-db-adapter/src/main') diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java index 92a9df1071..33b1028cbb 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java @@ -300,4 +300,4 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { resStatus.setStatusDescription(statusDescription); resourceOperationStatusRepository.save(resStatus); } -} \ No newline at end of file +} diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java index 69cf6ccb3d..e932bb2cca 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/WebMvcConfig.java @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 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. + * 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========================================================= + */ + package org.onap.so.adapters.requestsdb.application; @@ -19,4 +39,4 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter { return new MappedInterceptor(new String[]{"/**"}, loggingInterceptor); } -} \ No newline at end of file +} diff --git a/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml b/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml index ade3daada3..414c552619 100644 --- a/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml +++ b/adapters/mso-requests-db-adapter/src/main/resources/application-local.yaml @@ -12,6 +12,10 @@ mso: endpoint: http://localhost:8081 logPath: logs site-name: localSite + adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 spring: datasource: url: jdbc:mariadb://localhost:3306/requestdb diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql new file mode 100644 index 0000000000..394a3e5b12 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.2__Add_Request_Processing_Data.sql @@ -0,0 +1,18 @@ +use requestdb; + +CREATE TABLE IF NOT EXISTS request_processing_data ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `SO_REQUEST_ID` VARCHAR(50) NOT NULL, + `GROUPING_ID` VARCHAR(100) NULL, + `NAME` VARCHAR(200) NOT NULL, + `VALUE` LONGTEXT, + `TAG` VARCHAR(200) NOT NULL, + `CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ID`), + UNIQUE INDEX `UK_request_processing_data` ( + `SO_REQUEST_ID` ASC, + `GROUPING_ID` ASC, + `TAG` ASC, + `NAME` ASC + ) +) ENGINE = InnoDB DEFAULT CHARSET = latin1; -- cgit 1.2.3-korg