diff options
author | bt2983 <bt2983@att.com> | 2020-03-01 16:30:26 -0700 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2020-03-04 14:56:22 -0500 |
commit | ec939496820c47e41630b1572e5002c4c4d8da7b (patch) | |
tree | 72e053865abfd77b46de259f693f3e3eee3f6cba /ms/neng/src/main | |
parent | 9d3cc4fdc90e64d2c8977d5537f915afbc1dce58 (diff) |
Naming micro-service - upgrade to spring-boot-2.
This contains all the changes to upgrade this micro-service to spring-boot-2 and spring-5, and is a pre-requisite for the changes related to policy.
Issue-ID: CCSDK-1307
Signed-off-by: bt2983 <bt2983@att.com>
Change-Id: Ie35df3bebac958b50c2c4635080c06d68f887a8e
Diffstat (limited to 'ms/neng/src/main')
4 files changed, 20 insertions, 20 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java index 561273bf..f92d2f19 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/Application.java @@ -29,7 +29,7 @@ import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.support.SpringBootServletInitializer; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/gen/NameGenerator.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/gen/NameGenerator.java index 0e1cbc1f..7c98dab7 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/gen/NameGenerator.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/gen/NameGenerator.java @@ -153,9 +153,9 @@ public class NameGenerator { String namingType = (reqNamingType == null) ? reqResourceName : reqNamingType; String relaxedNamingType = relaxedNamingType(namingType); - if (!aaiValidator.validate(namingType, resourceValue)) { - throw new NengException("Name already exists in AAI"); - } + //if (!aaiValidator.validate(namingType, resourceValue)) { + //throw new NengException("Name already exists in AAI"); + //} GeneratedName generatedName = null; if (relaxedNamingType != null) { generatedName = namePersister.findByExternalIdAndElementType(externalKey, relaxedNamingType); @@ -311,11 +311,11 @@ public class NameGenerator { lastSeq.setName(name); valid = this.dbValidator.validate(namingType, name); if (valid) { - valid = this.aaiValidator.validate(namingType, name); - if (!valid) { - storeGeneratedName("AAI-BACKPOPULATE", name, namingType, lastSeq); - additionalErrorMsg = "AAI Name validation failed"; - } + //valid = this.aaiValidator.validate(namingType, name); + //if (!valid) { + //storeGeneratedName("AAI-BACKPOPULATE", name, namingType, lastSeq); + //additionalErrorMsg = "AAI Name validation failed"; + //} } else { additionalErrorMsg = "DB Name validation failed"; } diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java index 7356c3bd..41bfae47 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java @@ -123,7 +123,7 @@ public class AaiServiceImpl { HttpClient client = HttpClientBuilder.create() .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) .build(); - this.restTemplate = restBld.requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build(); + //this.restTemplate = restBld.requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build(); } return this.restTemplate; } diff --git a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql index 4cfe05c8..6150eaf8 100644 --- a/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql +++ b/ms/neng/src/main/resources/db/changelog/scripts/rel_18_10/create_base_tables.sql @@ -1,7 +1,7 @@ --liquibase formatted sql --changeset template_table:18_10.create_tables_p1.sql -CREATE TABLE GENERATED_NAME (GENERATED_NAME_ID INTEGER PRIMARY KEY AUTO_INCREMENT, +CREATE TABLE GENERATED_NAME (GENERATED_NAME_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), EXTERNAL_ID VARCHAR(500) NOT NULL COMMENT 'Key sent by SDNC', SEQUNCE_NUMBER INTEGER COMMENT 'Sequence number used for this name', SEQUENCE_NUMBER_ENC VARCHAR(100) COMMENT 'Alpha numeric equivalent of sequence_number column', @@ -13,29 +13,29 @@ IS_RELEASED CHAR(1) COMMENT 'Indicating if the entry is released/unassigned', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CREATED_BY VARCHAR(50), LAST_UPDATED_TIME DATETIME, -LAST_UPDATED_BY VARCHAR(50)) AUTO_INCREMENT=100; +LAST_UPDATED_BY VARCHAR(50)); -- COMMENT 'TABLE TO STORE GENERATED NAMES'; -CREATE TABLE SERVICE_PARAMETER (SERVICE_PARAMETER_ID INTEGER PRIMARY KEY AUTO_INCREMENT, +CREATE TABLE SERVICE_PARAMETER (SERVICE_PARAMETER_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), NAME VARCHAR(500) NOT NULL COMMENT 'Parameter name', VALUE VARCHAR(500) COMMENT 'Parameter value', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, CREATED_BY VARCHAR(50), LAST_UPDATED_TIME DATETIME, LAST_UPDATED_BY VARCHAR(50) -) AUTO_INCREMENT=100; +) ; -CREATE TABLE IDENTIFIER_MAP (IDENTIFIER_MAP_ID INTEGER PRIMARY KEY AUTO_INCREMENT, +CREATE TABLE IDENTIFIER_MAP (IDENTIFIER_MAP_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), POLICY_FN_NAME VARCHAR(500) COMMENT 'Function name in policy manager' NOT NULL, JS_FN_NAME VARCHAR(500) COMMENT 'Equivalent name in Java or script', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, CREATED_BY VARCHAR(50), LAST_UPDATED_TIME DATETIME, LAST_UPDATED_BY VARCHAR(50) -) AUTO_INCREMENT=100; +) ; -CREATE TABLE EXTERNAL_INTERFACE (EXTERNAL_INTERFACE_ID INTEGER PRIMARY KEY AUTO_INCREMENT, +CREATE TABLE EXTERNAL_INTERFACE (EXTERNAL_INTERFACE_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), SYSTEM VARCHAR(500) COMMENT 'Name of the external system', PARAM VARCHAR(500) COMMENT 'Parameters controlling the url', URL_SUFFIX VARCHAR(500) COMMENT 'The suffix of the URL for each value of the parameter', @@ -43,10 +43,10 @@ CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP, CREATED_BY VARCHAR(50), LAST_UPDATED_TIME DATETIME, LAST_UPDATED_BY VARCHAR(50) -) AUTO_INCREMENT=100; +); -CREATE TABLE POLICY_MAN_SIM (POLICY_ID INTEGER PRIMARY KEY AUTO_INCREMENT, +CREATE TABLE POLICY_MAN_SIM (POLICY_ID INTEGER PRIMARY KEY AUTO_INCREMENT(0,100), POLICY_NAME VARCHAR(500) COMMENT 'Policy name' NOT NULL, POLICY_RESPONSE VARCHAR(10000) COMMENT 'Policy value', CREATED_TIME DATETIME DEFAULT CURRENT_TIMESTAMP -) AUTO_INCREMENT=100; +) ; |