From 83808703f4c1379c331f71d670b5610e2ca395b0 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Fri, 7 Sep 2018 19:20:59 +0000 Subject: Controller Blueprints Microservice Remove Resource Dictionary resource_type, resource_path, sample_values and valid_values parameters. Change-Id: I7ec899e30aaef64130f35eb754a79f9dfc54f71f Issue-ID: CCSDK-488 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../load/resource_dictionary/db-source.json | 2 - .../load/resource_dictionary/default-source.json | 2 - .../load/resource_dictionary/input-source.json | 2 - .../load/resource_dictionary/mdsal-source.json | 2 - .../resource/dict/ResourceDefinition.kt | 6 --- .../load/resource_dictionary/db-source.json | 24 ++++++++++ .../load/resource_dictionary/input-source.json | 17 ++++++++ .../load/resource_dictionary/v4-ip-type.json | 17 ++++++++ .../src/main/resources/sql/schema-local.sql | 4 -- .../application/src/main/resources/sql/schema.sql | 4 -- .../load/resource_dictionary/db-source.json | 26 ----------- .../load/resource_dictionary/input-source.json | 19 -------- .../load/resource_dictionary/v4-ip-type.json | 19 -------- .../service/DataBaseInitService.java | 34 +++++++-------- .../service/ResourceDictionaryService.java | 4 -- .../service/domain/ResourceDictionary.java | 51 ---------------------- .../validator/ResourceDictionaryValidator.java | 4 -- .../src/main/resources/sql/schema-local.sql | 4 -- .../service/src/main/resources/sql/schema.sql | 4 -- .../ResourceDictionaryReactRepositoryTest.java | 4 +- .../service/rs/ResourceDictionaryRestTest.java | 3 -- .../src/test/resources/application.properties | 43 +----------------- .../resourcedictionary/default_definition.json | 2 - 23 files changed, 76 insertions(+), 221 deletions(-) create mode 100644 ms/controllerblueprints/application/load/resource_dictionary/db-source.json create mode 100644 ms/controllerblueprints/application/load/resource_dictionary/input-source.json create mode 100644 ms/controllerblueprints/application/load/resource_dictionary/v4-ip-type.json delete mode 100644 ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json delete mode 100644 ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json delete mode 100644 ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json diff --git a/components/resource-dict/load/resource_dictionary/db-source.json b/components/resource-dict/load/resource_dictionary/db-source.json index 92b16a21..b96dc63f 100644 --- a/components/resource-dict/load/resource_dictionary/db-source.json +++ b/components/resource-dict/load/resource_dictionary/db-source.json @@ -4,8 +4,6 @@ "description": "name of the ", "type": "string" }, - "resource-type": "ONAP", - "resource-path": "vnf/bundle-id", "updated-by": "brindasanth@onap.com", "tags": "bundle-id, brindasanth@onap.com", "sources": { diff --git a/components/resource-dict/load/resource_dictionary/default-source.json b/components/resource-dict/load/resource_dictionary/default-source.json index 1c47f37b..64bfa0cc 100644 --- a/components/resource-dict/load/resource_dictionary/default-source.json +++ b/components/resource-dict/load/resource_dictionary/default-source.json @@ -6,8 +6,6 @@ "type": "string" }, "updated-by": "brindasanth@onap.com", - "resource-type": "ONAP", - "resource-path": "vnf/v4-ip-type", "sources": { "default": { "type": "source-default", diff --git a/components/resource-dict/load/resource_dictionary/input-source.json b/components/resource-dict/load/resource_dictionary/input-source.json index 676d92f8..152a5eef 100644 --- a/components/resource-dict/load/resource_dictionary/input-source.json +++ b/components/resource-dict/load/resource_dictionary/input-source.json @@ -4,8 +4,6 @@ "description": "name of the ", "type": "string" }, - "resource-path": "action-name", - "resource-type": "ONAP", "updated-by": "brindasanth@onap.com", "tags": null, "sources": { diff --git a/components/resource-dict/load/resource_dictionary/mdsal-source.json b/components/resource-dict/load/resource_dictionary/mdsal-source.json index b49146a0..b38986a4 100644 --- a/components/resource-dict/load/resource_dictionary/mdsal-source.json +++ b/components/resource-dict/load/resource_dictionary/mdsal-source.json @@ -6,8 +6,6 @@ "type": "string" }, "updated-by": "brindasanth@onap.com", - "resource-type": "ATT", - "resource-path": "vnf/oam-local-ipv4-address", "sources": { "mdsal": { "type": "source-rest", diff --git a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt index 0808073f..ff260871 100644 --- a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt +++ b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt @@ -36,12 +36,6 @@ open class ResourceDefinition { @JsonProperty(value = "updated-by") lateinit var updatedBy: String - @JsonProperty(value = "resource-type", required = true) - lateinit var resourceType: String - - @JsonProperty(value = "resource-path", required = true) - lateinit var resourcePath: String - @JsonProperty(value = "sources", required = true) lateinit var sources: MutableMap } diff --git a/ms/controllerblueprints/application/load/resource_dictionary/db-source.json b/ms/controllerblueprints/application/load/resource_dictionary/db-source.json new file mode 100644 index 00000000..a0c78af0 --- /dev/null +++ b/ms/controllerblueprints/application/load/resource_dictionary/db-source.json @@ -0,0 +1,24 @@ +{ + "name": "db-source", + "property" :{ + "description": "name of the ", + "type": "string" + }, + "updated-by": "brindasanth@onap.com", + "tags": "db-source, brindasanth@onap.com", + "sources": { + "db": { + "type": "source-db", + "properties": { + "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "db-country": "country", + "db-state": "state" + } + } + } + } +} \ No newline at end of file diff --git a/ms/controllerblueprints/application/load/resource_dictionary/input-source.json b/ms/controllerblueprints/application/load/resource_dictionary/input-source.json new file mode 100644 index 00000000..acfad16b --- /dev/null +++ b/ms/controllerblueprints/application/load/resource_dictionary/input-source.json @@ -0,0 +1,17 @@ +{ + "name": "input-source", + "property" :{ + "description": "name of the ", + "type": "string" + }, + "updated-by": "brindasanth@onap.com", + "tags": "action-name, brindasanth", + "sources": { + "input": { + "type": "source-input", + "properties": { + "key": "action-name" + } + } + } +} \ No newline at end of file diff --git a/ms/controllerblueprints/application/load/resource_dictionary/v4-ip-type.json b/ms/controllerblueprints/application/load/resource_dictionary/v4-ip-type.json new file mode 100644 index 00000000..1b4432d5 --- /dev/null +++ b/ms/controllerblueprints/application/load/resource_dictionary/v4-ip-type.json @@ -0,0 +1,17 @@ +{ + "name": "v4-ip-type", + "property": { + "description": "name of the ", + "type": "string" + }, + "updated-by": "brindasanth@onap.com", + "tags": "v4-ip-type, source-input, brindasanth", + "sources": { + "input": { + "type": "source-input", + "properties": { + "key": "v4-ip-type" + } + } + } +} \ No newline at end of file diff --git a/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql b/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql index 1ba9c365..47e0cce7 100644 --- a/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql +++ b/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql @@ -71,12 +71,8 @@ CREATE TABLE IF NOT EXISTS sdnctl.MODEL_TYPE ( -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS sdnctl.RESOURCE_DICTIONARY ( name VARCHAR(100) NOT NULL, - resource_path VARCHAR(500) NOT NULL, - resource_type VARCHAR(100) NOT NULL, data_type VARCHAR(100) NOT NULL, entry_schema VARCHAR(100) NULL DEFAULT NULL, - valid_values LONGTEXT NULL DEFAULT NULL, - sample_value LONGTEXT NULL DEFAULT NULL, definition LONGTEXT NOT NULL, description LONGTEXT NOT NULL, tags LONGTEXT NOT NULL, diff --git a/ms/controllerblueprints/application/src/main/resources/sql/schema.sql b/ms/controllerblueprints/application/src/main/resources/sql/schema.sql index b884cf34..9c38bec0 100644 --- a/ms/controllerblueprints/application/src/main/resources/sql/schema.sql +++ b/ms/controllerblueprints/application/src/main/resources/sql/schema.sql @@ -66,12 +66,8 @@ CREATE TABLE IF NOT EXISTS configurator.MODEL_TYPE ( -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS configurator.RESOURCE_DICTIONARY ( name VARCHAR(100) NOT NULL, - resource_path VARCHAR(500) NOT NULL, - resource_type VARCHAR(100) NOT NULL, data_type VARCHAR(100) NOT NULL, entry_schema VARCHAR(100) NULL DEFAULT NULL, - valid_values LONGTEXT NULL DEFAULT NULL, - sample_value LONGTEXT NULL DEFAULT NULL, definition LONGTEXT NOT NULL, description LONGTEXT NOT NULL, tags LONGTEXT NOT NULL, diff --git a/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json deleted file mode 100644 index ba86b3c7..00000000 --- a/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "db-source", - "property" :{ - "description": "name of the ", - "type": "string" - }, - "resource-type": "ONAP", - "resource-path": "vnf/bundle-id", - "updated-by": "brindasanth@onap.com", - "tags": "db-source, brindasanth@onap.com", - "sources": { - "db": { - "type": "source-db", - "properties": { - "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", - "input-key-mapping": { - "profile_name": "profile_name" - }, - "output-key-mapping": { - "db-country": "country", - "db-state": "state" - } - } - } - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json deleted file mode 100644 index 7cd58d61..00000000 --- a/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "input-source", - "property" :{ - "description": "name of the ", - "type": "string" - }, - "resource-path": "action-name", - "resource-type": "ONAP", - "updated-by": "brindasanth@onap.com", - "tags": "action-name, brindasanth", - "sources": { - "input": { - "type": "source-input", - "properties": { - "key": "action-name" - } - } - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json deleted file mode 100644 index e7e06000..00000000 --- a/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "v4-ip-type", - "property": { - "description": "name of the ", - "type": "string" - }, - "resource-path": "vnf/v4-ip-type", - "resource-type": "ONAP", - "updated-by": "brindasanth@onap.com", - "tags": "v4-ip-type, source-input, brindasanth", - "sources": { - "input": { - "type": "source-input", - "properties": { - "key": "v4-ip-type" - } - } - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java index c6d80cfb..cfcf93d2 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java @@ -157,30 +157,28 @@ public class DataBaseInitService { fileName = file.getFilename(); log.trace("Loading : {}", fileName); String definitionContent = getResourceContent(file); - ResourceDefinition dictionaryDefinition = + ResourceDefinition resourceDefinition = JacksonUtils.readValue(definitionContent, ResourceDefinition.class); - if (dictionaryDefinition != null) { - Preconditions.checkNotNull(dictionaryDefinition.getProperty(), "Failed to get Property Definition"); + if (resourceDefinition != null) { + Preconditions.checkNotNull(resourceDefinition.getProperty(), "Failed to get Property Definition"); ResourceDictionary resourceDictionary = new ResourceDictionary(); - resourceDictionary.setResourcePath(dictionaryDefinition.getResourcePath()); - resourceDictionary.setName(dictionaryDefinition.getName()); - resourceDictionary.setDefinition(dictionaryDefinition); - - resourceDictionary.setResourceType(dictionaryDefinition.getResourceType()); - resourceDictionary.setDescription(dictionaryDefinition.getProperty().getDescription()); - resourceDictionary.setDataType(dictionaryDefinition.getProperty().getType()); - if(dictionaryDefinition.getProperty().getEntrySchema() != null){ - resourceDictionary.setEntrySchema(dictionaryDefinition.getProperty().getEntrySchema().getType()); + resourceDictionary.setName(resourceDefinition.getName()); + resourceDictionary.setDefinition(resourceDefinition); + + Preconditions.checkNotNull(resourceDefinition.getProperty(), "Property field is missing"); + resourceDictionary.setDescription(resourceDefinition.getProperty().getDescription()); + resourceDictionary.setDataType(resourceDefinition.getProperty().getType()); + if(resourceDefinition.getProperty().getEntrySchema() != null){ + resourceDictionary.setEntrySchema(resourceDefinition.getProperty().getEntrySchema().getType()); } - resourceDictionary.setUpdatedBy(dictionaryDefinition.getUpdatedBy()); - if (StringUtils.isBlank(dictionaryDefinition.getTags())) { + resourceDictionary.setUpdatedBy(resourceDefinition.getUpdatedBy()); + if (StringUtils.isBlank(resourceDefinition.getTags())) { resourceDictionary.setTags( - dictionaryDefinition.getName() + ", " + dictionaryDefinition.getUpdatedBy() - + ", " + dictionaryDefinition.getResourceType() + ", " - + dictionaryDefinition.getUpdatedBy()); + resourceDefinition.getName() + ", " + resourceDefinition.getUpdatedBy() + + ", " + resourceDefinition.getUpdatedBy()); } else { - resourceDictionary.setTags(dictionaryDefinition.getTags()); + resourceDictionary.setTags(resourceDefinition.getTags()); } resourceDictionaryService.saveResourceDictionary(resourceDictionary); diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java index 70e43d69..62aa0e29 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ResourceDictionaryService.java @@ -112,8 +112,6 @@ public class ResourceDictionaryService { // Validate the Resource Definitions resourceDictionaryValidationService.validate(resourceDefinition); - resourceDictionary.setResourceType(resourceDefinition.getResourceType()); - resourceDictionary.setResourcePath(resourceDefinition.getResourcePath()); resourceDictionary.setTags(resourceDefinition.getTags()); resourceDefinition.setUpdatedBy(resourceDictionary.getUpdatedBy()); // Set the Property Definitions @@ -134,8 +132,6 @@ public class ResourceDictionaryService { dbResourceDictionary.setName(resourceDictionary.getName()); dbResourceDictionary.setDefinition(resourceDictionary.getDefinition()); dbResourceDictionary.setDescription(resourceDictionary.getDescription()); - dbResourceDictionary.setResourceType(resourceDictionary.getResourceType()); - dbResourceDictionary.setResourcePath(resourceDictionary.getResourcePath()); dbResourceDictionary.setTags(resourceDictionary.getTags()); dbResourceDictionary.setUpdatedBy(resourceDictionary.getUpdatedBy()); dbResourceDictionary.setDataType(resourceDictionary.getDataType()); diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ResourceDictionary.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ResourceDictionary.java index 7af9972a..42c8e83b 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ResourceDictionary.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/domain/ResourceDictionary.java @@ -43,14 +43,6 @@ public class ResourceDictionary implements Serializable { @ApiModelProperty(required=true) private String name; - @Column(name = "resource_path", nullable = false) - @ApiModelProperty(required=true) - private String resourcePath; - - @Column(name = "resource_type", nullable = false) - @ApiModelProperty(required=true) - private String resourceType; - @Column(name = "data_type", nullable = false) @ApiModelProperty(required=true) private String dataType; @@ -58,14 +50,6 @@ public class ResourceDictionary implements Serializable { @Column(name = "entry_schema") private String entrySchema; - @Lob - @Column(name = "valid_values") - private String validValues; - - @Lob - @Column(name = "sample_value") - private String sampleValue; - @Lob @Convert(converter = JpaResourceDefinitionConverter.class) @Column(name = "definition", nullable = false) @@ -95,11 +79,8 @@ public class ResourceDictionary implements Serializable { @Override public String toString() { String buffer = "[" + ", name = " + name + - ", resourcePath = " + resourcePath + - ", resourceType = " + resourceType + ", dataType = " + dataType + ", entrySchema = " + entrySchema + - ", validValues = " + validValues + ", definition =" + definition + ", description = " + description + ", updatedBy = " + updatedBy + @@ -109,14 +90,6 @@ public class ResourceDictionary implements Serializable { return buffer; } - public String getResourcePath() { - return resourcePath; - } - - public void setResourcePath(String resourcePath) { - this.resourcePath = resourcePath; - } - public String getName() { return name; } @@ -125,14 +98,6 @@ public class ResourceDictionary implements Serializable { this.name = name; } - public String getResourceType() { - return resourceType; - } - - public void setResourceType(String resourceType) { - this.resourceType = resourceType; - } - public String getDataType() { return dataType; } @@ -149,22 +114,6 @@ public class ResourceDictionary implements Serializable { this.entrySchema = entrySchema; } - public String getValidValues() { - return validValues; - } - - public void setValidValues(String validValues) { - this.validValues = validValues; - } - - public String getSampleValue() { - return sampleValue; - } - - public void setSampleValue(String sampleValue) { - this.sampleValue = sampleValue; - } - public ResourceDefinition getDefinition() { return definition; } diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java index 1c2a7337..57330d90 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ResourceDictionaryValidator.java @@ -45,10 +45,6 @@ public class ResourceDictionaryValidator { Preconditions.checkArgument( StringUtils.isNotBlank(resourceDictionary.getName()), "DataDictionary Alias Name Information is missing."); - Preconditions.checkArgument( StringUtils.isNotBlank(resourceDictionary.getResourcePath()), - "DataDictionary Resource Name Information is missing."); - Preconditions.checkArgument( StringUtils.isNotBlank(resourceDictionary.getResourceType()), - "DataDictionary Resource Type Information is missing."); Preconditions.checkNotNull( resourceDictionary.getDefinition(), "DataDictionary Definition Information is missing."); Preconditions.checkArgument( StringUtils.isNotBlank(resourceDictionary.getDescription()), diff --git a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql b/ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql index 1ba9c365..47e0cce7 100644 --- a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql +++ b/ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql @@ -71,12 +71,8 @@ CREATE TABLE IF NOT EXISTS sdnctl.MODEL_TYPE ( -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS sdnctl.RESOURCE_DICTIONARY ( name VARCHAR(100) NOT NULL, - resource_path VARCHAR(500) NOT NULL, - resource_type VARCHAR(100) NOT NULL, data_type VARCHAR(100) NOT NULL, entry_schema VARCHAR(100) NULL DEFAULT NULL, - valid_values LONGTEXT NULL DEFAULT NULL, - sample_value LONGTEXT NULL DEFAULT NULL, definition LONGTEXT NOT NULL, description LONGTEXT NOT NULL, tags LONGTEXT NOT NULL, diff --git a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql b/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql index b884cf34..9c38bec0 100644 --- a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql +++ b/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql @@ -66,12 +66,8 @@ CREATE TABLE IF NOT EXISTS configurator.MODEL_TYPE ( -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS configurator.RESOURCE_DICTIONARY ( name VARCHAR(100) NOT NULL, - resource_path VARCHAR(500) NOT NULL, - resource_type VARCHAR(100) NOT NULL, data_type VARCHAR(100) NOT NULL, entry_schema VARCHAR(100) NULL DEFAULT NULL, - valid_values LONGTEXT NULL DEFAULT NULL, - sample_value LONGTEXT NULL DEFAULT NULL, definition LONGTEXT NOT NULL, description LONGTEXT NOT NULL, tags LONGTEXT NOT NULL, diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java index 1e740ec3..7034b7e2 100644 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java +++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java @@ -51,7 +51,7 @@ public class ResourceDictionaryReactRepositoryTest { @Before public void init() { - ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("load/resource_dictionary/db-source" + + ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("./../../application/load/resource_dictionary/db-source" + ".json", ResourceDefinition.class); ResourceDictionary resourceDictionary = transformResourceDictionary(resourceDefinition); @@ -84,8 +84,6 @@ public class ResourceDictionaryReactRepositoryTest { resourceDictionary.setName(resourceDefinition.getName()); resourceDictionary.setDataType(resourceDefinition.getProperty().getType()); resourceDictionary.setDescription(resourceDefinition.getProperty().getDescription()); - resourceDictionary.setResourcePath(resourceDefinition.getResourcePath()); - resourceDictionary.setResourceType(resourceDefinition.getResourceType()); resourceDictionary.setTags(resourceDefinition.getTags()); resourceDictionary.setUpdatedBy(resourceDefinition.getUpdatedBy()); resourceDictionary.setDefinition(resourceDefinition); diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java index 82346954..5955ae19 100644 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java +++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java @@ -58,11 +58,8 @@ public class ResourceDictionaryRestTest { Charset.defaultCharset()); ResourceDictionary dataDictionary = new ResourceDictionary(); - dataDictionary.setResourcePath("test/vnf/ipaddress"); dataDictionary.setName("test-name"); dataDictionary.setDefinition(JacksonUtils.readValue(definition, ResourceDefinition.class)); - dataDictionary.setValidValues("127.0.0.1"); - dataDictionary.setResourceType("ONAP"); dataDictionary.setDataType("string"); dataDictionary.setDescription("Sample Resource Mapping"); dataDictionary.setTags("test, ipaddress"); diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties index b17663e9..429588b3 100644 --- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties +++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties @@ -15,47 +15,6 @@ # limitations under the License. # -info.build.artifact=@project.artifactId@ -info.build.name=@project.name@ -info.build.description=@project.description@ -info.build.version=@project.version@ -info.build.groupId=@project.groupId@ -logging.level.root=info - -server.contextPath=/ -server.servlet-path=/ -spring.jersey.application-path=/api/controller-blueprints/v1 -server.routingPath=/api - - -mots.application.acronym=MOTS_ID -platform.identifier=AJSC7_JERSEY -#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - -#logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp} responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex - - -#The max number of active threads in this pool -server.tomcat.max-threads=200 -#The minimum number of threads always kept alive -server.tomcat.min-Spare-Threads=25 -#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads -server.tomcat.max-idle-time=60000 - -#for changing the tomcat port... -#server.port=8081 - - - -#Servlet context parameters -server.context_parameters.p-name=value #context parameter with p-name as key and value as value. - -# make this true for AAF authentication and place cadi.properties into etc folder -aaf.enabled=true - -# set to true to enable version proxy -#ivp.enabled=false - spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS = false @@ -68,5 +27,5 @@ blueprints.load.initial-data=true load.dataTypePath=./../../application/load/model_type/data_type load.nodeTypePath=./../../application/load/model_type/node_type load.artifactTypePath=./../../application/load/model_type/artifact_type -load.resourceDictionaryPath=load/resource_dictionary +load.resourceDictionaryPath=./../../application/load/resource_dictionary load.blueprintsPath=./../../application/load/blueprints \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/default_definition.json b/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/default_definition.json index 198823bb..334fb24e 100644 --- a/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/default_definition.json +++ b/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/default_definition.json @@ -8,8 +8,6 @@ } }, "updated-by": "Brinda Santh (bs2796)", - "resource-type": "ONAP", - "resource-path": "/v4-aggregat-list", "tags": "ipaddress", "sources": { "input": { -- cgit 1.2.3-korg