summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/application')
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application-dev.properties25
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application.properties25
-rw-r--r--[-rwxr-xr-x]ms/blueprintsprocessor/application/src/main/resources/sql/data.sql (renamed from ms/blueprintsprocessor/application/opt/app/onap/config/application.properties)0
-rw-r--r--ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql83
-rw-r--r--ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql78
-rw-r--r--ms/blueprintsprocessor/application/src/test/resources/application.properties25
6 files changed, 193 insertions, 43 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index 9b248aa0f..019c5aabc 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -29,21 +29,21 @@ server.port=8081
resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=blueprints/deploy
-controllerblueprints.blueprintArchivePath=blueprints/archive
-controllerblueprints.blueprintWorkingPath=blueprints/work
+blueprintsprocessor.blueprintDeployPath=blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=blueprints/archive
+blueprintsprocessor.blueprintWorkingPath=blueprints/work
# Controller Blueprint Load Configurations
# blueprints.load.initial-data may be overridden by ENV variables
-controllerblueprints.loadInitialData=true
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint
-controllerblueprints.loadModelType=true
-controllerblueprints.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=true
-controllerblueprints.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
+blueprintsprocessor.loadInitialData=true
+blueprintsprocessor.loadBluePrint=false
+blueprintsprocessor.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint
+blueprintsprocessor.loadModelType=true
+blueprintsprocessor.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type
+blueprintsprocessor.loadResourceDictionary=true
+blueprintsprocessor.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
# CBA file extension
-controllerblueprints.loadCbaExtension=zip
+blueprintsprocessor.loadCbaExtension=zip
### END -Controller Blueprints Properties
@@ -63,9 +63,6 @@ blueprintsprocessor.grpcPort=9111
### blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
### blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
### blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working
-blueprintsprocessor.blueprintDeployPath=blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=blueprints/archive
-blueprintsprocessor.blueprintWorkingPath=blueprints/work
# Primary Database Configuration
blueprintsprocessor.db.url=jdbc:mysql://localhost:3306/sdnctl
blueprintsprocessor.db.username=sdnctl
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
index 136df9a5a..4a4f79459 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties
@@ -19,19 +19,19 @@
resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-controllerblueprints.blueprintArchivePath=/opt/app/onap/blueprints/archive
-controllerblueprints.blueprintWorkingPath=/opt/app/onap/blueprints/working
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
+blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working
# Controller Blueprint Load Configurations
# blueprints.load.initial-data may be overridden by ENV variables
-controllerblueprints.loadInitialData=false
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
-controllerblueprints.loadModelType=false
-controllerblueprints.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=false
-controllerblueprints.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary
+blueprintsprocessor.loadInitialData=false
+blueprintsprocessor.loadBluePrint=false
+blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
+blueprintsprocessor.loadModelType=false
+blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type
+blueprintsprocessor.loadResourceDictionary=false
+blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary
# CBA file extension
controllerblueprints.loadCbaExtension=zip
@@ -42,11 +42,6 @@ blueprintsprocessor.grpcEnable=false
blueprintsprocessor.httpPort=8080
blueprintsprocessor.grpcPort=9111
-# Blueprint Processor File Execution and Handling Properties
-blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
-blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working
-
# Primary Database Configuration
blueprintsprocessor.db.url=jdbc:mysql://db:3306/sdnctl
blueprintsprocessor.db.username=sdnctl
diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties b/ms/blueprintsprocessor/application/src/main/resources/sql/data.sql
index e69de29bb..e69de29bb 100755..100644
--- a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/sql/data.sql
diff --git a/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql
new file mode 100644
index 000000000..ad048b017
--- /dev/null
+++ b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql
@@ -0,0 +1,83 @@
+-- drop table sdnctl.MODEL_TYPE;
+-- drop table sdnctl.RESOURCE_DICTIONARY;
+-- drop table sdnctl.CONFIG_MODEL_CONTENT;
+-- drop table sdnctl.CONFIG_MODEL;
+
+-- -----------------------------------------------------
+-- table CONFIG_MODEL
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL (
+ config_model_id INT(11) NOT NULL AUTO_INCREMENT,
+ service_uuid VARCHAR(50) NULL DEFAULT NULL,
+ distribution_id VARCHAR(50) NULL DEFAULT NULL,
+ service_name VARCHAR(255) NULL DEFAULT NULL,
+ service_description VARCHAR(255) NULL DEFAULT NULL,
+ resource_uuid VARCHAR(255) NULL DEFAULT NULL,
+ resource_instance_name VARCHAR(255) NULL DEFAULT NULL,
+ resource_name varchar(255) null default null,
+ resource_version varchar(50) null default null,
+ resource_type varchar(50) null default null,
+ artifact_uuid varchar(50) null default null,
+ artifact_type varchar(50) not null,
+ artifact_version varchar(25) not null,
+ artifact_description longtext null default null,
+ internal_version int(11) null default null,
+ creation_date datetime not null default current_timestamp,
+ artifact_name varchar(100) not null,
+ published varchar(1) not null,
+ updated_by varchar(100) not null,
+ tags longtext null default null,
+ primary key PK_CONFIG_MODEL (config_model_id),
+ UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)
+) ENGINE=InnoDB;
+
+
+-- -----------------------------------------------------
+-- table CONFIG_MODEL_CONTENT
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL_CONTENT (
+ config_model_content_id INT(11) NOT NULL AUTO_INCREMENT,
+ config_model_id INT NOT NULL,
+ name VARCHAR(100) NOT NULL,
+ content_type VARCHAR(50) NOT NULL,
+ description LONGTEXT NULL DEFAULT NULL,
+ updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ content LONGTEXT NULL DEFAULT NULL,
+ PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),
+ UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),
+ FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES sdnctl.CONFIG_MODEL(config_model_id) ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+-- -----------------------------------------------------
+-- table MODEL_TYPE
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS sdnctl.MODEL_TYPE (
+ model_name VARCHAR(100) NOT NULL,
+ derived_from VARCHAR(100) NOT NULL,
+ definition_type VARCHAR(100) NOT NULL,
+ definition LONGTEXT NOT NULL,
+ version VARCHAR(10) NOT NULL,
+ description LONGTEXT NOT NULL,
+ tags LONGTEXT NULL DEFAULT NULL,
+ creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_by VARCHAR(100) NOT NULL,
+ PRIMARY KEY PK_MODEL_TYPE (model_name),
+ INDEX IX_MODEL_TYPE (model_name)
+) ENGINE=InnoDB;
+
+
+-- -----------------------------------------------------
+-- table RESOURCE_DICTIONARY
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS sdnctl.RESOURCE_DICTIONARY (
+ name VARCHAR(100) NOT NULL,
+ data_type VARCHAR(100) NOT NULL,
+ entry_schema VARCHAR(100) NULL DEFAULT NULL,
+ definition LONGTEXT NOT NULL,
+ description LONGTEXT NOT NULL,
+ tags LONGTEXT NOT NULL,
+ creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_by VARCHAR(100) NOT NULL,
+ primary key PK_RESOURCE_DICTIONARY (name),
+ INDEX IX_RESOURCE_DICTIONARY (name)
+) ENGINE=InnoDB; \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql
new file mode 100644
index 000000000..58564dce5
--- /dev/null
+++ b/ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql
@@ -0,0 +1,78 @@
+-- -----------------------------------------------------
+-- table CONFIG_MODEL
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL (
+ config_model_id INT(11) NOT NULL AUTO_INCREMENT,
+ service_uuid VARCHAR(50) NULL DEFAULT NULL,
+ distribution_id VARCHAR(50) NULL DEFAULT NULL,
+ service_name VARCHAR(255) NULL DEFAULT NULL,
+ service_description VARCHAR(255) NULL DEFAULT NULL,
+ resource_uuid VARCHAR(255) NULL DEFAULT NULL,
+ resource_instance_name VARCHAR(255) NULL DEFAULT NULL,
+ resource_name varchar(255) null default null,
+ resource_version varchar(50) null default null,
+ resource_type varchar(50) null default null,
+ artifact_uuid varchar(50) null default null,
+ artifact_type varchar(50) not null,
+ artifact_version varchar(25) not null,
+ artifact_description longtext null default null,
+ internal_version int(11) null default null,
+ creation_date datetime not null default current_timestamp,
+ artifact_name varchar(100) not null,
+ published varchar(1) not null,
+ updated_by varchar(100) not null,
+ tags longtext null default null,
+ primary key PK_CONFIG_MODEL (config_model_id),
+ UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)
+) ENGINE=InnoDB;
+
+
+-- -----------------------------------------------------
+-- table CONFIG_MODEL_CONTENT
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL_CONTENT (
+ config_model_content_id INT(11) NOT NULL AUTO_INCREMENT,
+ config_model_id INT NOT NULL,
+ name VARCHAR(100) NOT NULL,
+ content_type VARCHAR(50) NOT NULL,
+ description LONGTEXT NULL DEFAULT NULL,
+ updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ content LONGTEXT NULL DEFAULT NULL,
+ PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),
+ UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),
+ FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES configurator.CONFIG_MODEL(config_model_id) ON DELETE CASCADE
+) ENGINE=InnoDB;
+
+-- -----------------------------------------------------
+-- table MODEL_TYPE
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS configurator.MODEL_TYPE (
+ model_name VARCHAR(100) NOT NULL,
+ derived_from VARCHAR(100) NOT NULL,
+ definition_type VARCHAR(100) NOT NULL,
+ definition LONGTEXT NOT NULL,
+ version VARCHAR(10) NOT NULL,
+ description LONGTEXT NOT NULL,
+ tags LONGTEXT NULL DEFAULT NULL,
+ creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_by VARCHAR(100) NOT NULL,
+ PRIMARY KEY PK_MODEL_TYPE (model_name),
+ INDEX IX_MODEL_TYPE (model_name)
+) ENGINE=InnoDB;
+
+
+-- -----------------------------------------------------
+-- table RESOURCE_DICTIONARY
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS configurator.RESOURCE_DICTIONARY (
+ name VARCHAR(100) NOT NULL,
+ data_type VARCHAR(100) NOT NULL,
+ entry_schema VARCHAR(100) NULL DEFAULT NULL,
+ definition LONGTEXT NOT NULL,
+ description LONGTEXT NOT NULL,
+ tags LONGTEXT NOT NULL,
+ creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_by VARCHAR(100) NOT NULL,
+ primary key PK_RESOURCE_DICTIONARY (name),
+ INDEX IX_RESOURCE_DICTIONARY (name)
+) ENGINE=InnoDB;
diff --git a/ms/blueprintsprocessor/application/src/test/resources/application.properties b/ms/blueprintsprocessor/application/src/test/resources/application.properties
index 9a8bc1222..766498fdc 100644
--- a/ms/blueprintsprocessor/application/src/test/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/test/resources/application.properties
@@ -22,19 +22,19 @@ server.port=8080
resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-controllerblueprints.blueprintArchivePath=/opt/app/onap/blueprints/archive
-controllerblueprints.blueprintWorkingPath=/opt/app/onap/blueprints/working
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
+blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working
# Controller Blueprint Load Configurations
# blueprints.load.initial-data may be overridden by ENV variables
-controllerblueprints.loadInitialData=false
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
-controllerblueprints.loadModelType=false
-controllerblueprints.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=false
-controllerblueprints.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary
+blueprintsprocessor.loadInitialData=false
+blueprintsprocessor.loadBluePrint=false
+blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
+blueprintsprocessor.loadModelType=false
+blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type
+blueprintsprocessor.loadResourceDictionary=false
+blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary/starter-dictionary
# CBA file extension
controllerblueprints.loadCbaExtension=zip
@@ -44,10 +44,7 @@ controllerblueprints.loadCbaExtension=zip
blueprintsprocessor.grpcEnable=false
blueprintsprocessor.httpPort=8080
blueprintsprocessor.grpcPort=9111
-# Blueprint Processor File Execution and Handling Properties
-blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
-blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
-blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/work
+
# Primary Database Configuration
blueprintsprocessor.db.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
blueprintsprocessor.db.username=sa