From a456e7e4b70b56fe4fb0c0e82645d12402ce2f78 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Fri, 30 Aug 2019 15:32:13 -0400 Subject: [PATCH] Remove controllerbluprints distribution. Change-Id: I8c7269f97f2b32a0fe8689baaeddfe1e82e0d075 Issue-ID: CCSDK-1663 Signed-off-by: Brinda Santh --- .../application/src/main/resources/sql/data.sql | 0 .../src/main/resources/sql/schema-local.sql | 164 ++-- .../application/src/main/resources/sql/schema.sql | 156 ++-- .../modules/inbounds/configs-api/pom.xml | 5 - .../modules/inbounds/designer-api/pom.xml | 6 - ms/blueprintsprocessor/modules/inbounds/pom.xml | 6 + .../modules/inbounds/resource-api/pom.xml | 13 - .../modules/inbounds/selfservice-api/pom.xml | 5 - ms/blueprintsprocessor/parent/pom.xml | 10 - ms/controllerblueprints/application/pom.xml | 266 ------- .../controllerblueprints/ApplicationConstants.java | 28 - .../ControllerBlueprintsApplication.java | 42 - .../cds/controllerblueprints/DatabaseConfig.java | 61 -- .../ccsdk/cds/controllerblueprints/WebConfig.java | 50 -- .../ApplicationSecurityConfigurerAdapter.java | 62 -- .../src/main/resources/application-dev.properties | 70 -- .../src/main/resources/application.properties | 75 -- .../application/src/main/resources/logback.xml | 44 -- .../ControllerBlueprintsApplicationTest.java | 62 -- .../controllerblueprints/VersionSplitTest.java | 49 -- .../src/test/resources/application.properties | 58 -- .../src/test/resources/logback-test.xml | 35 - ms/controllerblueprints/distribution/pom.xml | 184 ----- .../distribution/src/main/dc/docker-compose.yaml | 30 - .../distribution/src/main/docker/Dockerfile | 18 - .../distribution/src/main/docker/distribution.xml | 51 -- .../distribution/src/main/docker/run.source | 13 - .../distribution/src/main/docker/startService.sh | 8 - ms/controllerblueprints/modules/pom.xml | 1 - ms/controllerblueprints/modules/service/pom.xml | 81 -- .../service/common/SwaggerGenerator.java | 182 ----- .../service/BluePrintDesignerCoreConfiguration.kt | 61 -- .../service_template/default_netconf.json | 862 --------------------- .../service/src/main/resources/sql/data.sql | 0 .../src/main/resources/sql/schema-local.sql | 83 -- .../service/src/main/resources/sql/schema.sql | 78 -- .../cds/controllerblueprints/DatabaseConfig.java | 61 -- .../cds/controllerblueprints/TestApplication.java | 34 - .../src/test/resources/application.properties | 41 - .../service/src/test/resources/logback-test.xml | 39 - ms/controllerblueprints/parent/pom.xml | 10 - ms/controllerblueprints/pom.xml | 2 - 42 files changed, 166 insertions(+), 2940 deletions(-) rename ms/{controllerblueprints => blueprintsprocessor}/application/src/main/resources/sql/data.sql (100%) rename ms/{controllerblueprints => blueprintsprocessor}/application/src/main/resources/sql/schema-local.sql (97%) rename ms/{controllerblueprints => blueprintsprocessor}/application/src/main/resources/sql/schema.sql (97%) delete mode 100644 ms/controllerblueprints/application/pom.xml delete mode 100644 ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ApplicationConstants.java delete mode 100644 ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ControllerBlueprintsApplication.java delete mode 100644 ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java delete mode 100644 ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/WebConfig.java delete mode 100644 ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/security/ApplicationSecurityConfigurerAdapter.java delete mode 100755 ms/controllerblueprints/application/src/main/resources/application-dev.properties delete mode 100755 ms/controllerblueprints/application/src/main/resources/application.properties delete mode 100644 ms/controllerblueprints/application/src/main/resources/logback.xml delete mode 100644 ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java delete mode 100644 ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java delete mode 100755 ms/controllerblueprints/application/src/test/resources/application.properties delete mode 100644 ms/controllerblueprints/application/src/test/resources/logback-test.xml delete mode 100755 ms/controllerblueprints/distribution/pom.xml delete mode 100755 ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml delete mode 100755 ms/controllerblueprints/distribution/src/main/docker/Dockerfile delete mode 100755 ms/controllerblueprints/distribution/src/main/docker/distribution.xml delete mode 100755 ms/controllerblueprints/distribution/src/main/docker/run.source delete mode 100755 ms/controllerblueprints/distribution/src/main/docker/startService.sh delete mode 100644 ms/controllerblueprints/modules/service/pom.xml delete mode 100644 ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java delete mode 100644 ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt delete mode 100644 ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json delete mode 100644 ms/controllerblueprints/modules/service/src/main/resources/sql/data.sql delete mode 100644 ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql delete mode 100644 ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql delete mode 100644 ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java delete mode 100644 ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/TestApplication.java delete mode 100755 ms/controllerblueprints/modules/service/src/test/resources/application.properties delete mode 100644 ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml diff --git a/ms/controllerblueprints/application/src/main/resources/sql/data.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/data.sql similarity index 100% rename from ms/controllerblueprints/application/src/main/resources/sql/data.sql rename to ms/blueprintsprocessor/application/src/main/resources/sql/data.sql diff --git a/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql similarity index 97% rename from ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql rename to ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql index 47e0cce7a..ad048b017 100644 --- a/ms/controllerblueprints/application/src/main/resources/sql/schema-local.sql +++ b/ms/blueprintsprocessor/application/src/main/resources/sql/schema-local.sql @@ -1,83 +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) +-- 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/controllerblueprints/application/src/main/resources/sql/schema.sql b/ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql similarity index 97% rename from ms/controllerblueprints/application/src/main/resources/sql/schema.sql rename to ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql index 9c38bec0b..58564dce5 100644 --- a/ms/controllerblueprints/application/src/main/resources/sql/schema.sql +++ b/ms/blueprintsprocessor/application/src/main/resources/sql/schema.sql @@ -1,78 +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; +-- ----------------------------------------------------- +-- 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/modules/inbounds/configs-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml index 6d2596024..f34a1ec4b 100644 --- a/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml @@ -43,10 +43,5 @@ org.onap.ccsdk.cds.controllerblueprints blueprint-core - - com.h2database - h2 - test - diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/designer-api/pom.xml index 7c1576e95..8f6d32ee2 100644 --- a/ms/blueprintsprocessor/modules/inbounds/designer-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/pom.xml @@ -26,10 +26,4 @@ Blueprints Processor Designer API Blueprints Processor Designer API - - - org.onap.ccsdk.cds.controllerblueprints - service - - diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index a892f205f..8afecab3c 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -85,5 +85,11 @@ reactor-test test + + + com.h2database + h2 + test + diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index e343a6f3b..cf8c61ac7 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -36,18 +36,5 @@ org.onap.ccsdk.cds.controllerblueprints blueprint-core - - - com.h2database - h2 - test - diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index cfa2d6fea..2c241cc4f 100755 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -55,11 +55,6 @@ io.grpc grpc-testing - - com.h2database - h2 - test - diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index a86ce6fc4..e79c497be 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -458,21 +458,11 @@ blueprint-core ${project.version} - - org.onap.ccsdk.cds.controllerblueprints - blueprint-scripts - ${project.version} - org.onap.ccsdk.cds.controllerblueprints blueprint-validation ${project.version} - - org.onap.ccsdk.cds.controllerblueprints - service - ${project.version} - diff --git a/ms/controllerblueprints/application/pom.xml b/ms/controllerblueprints/application/pom.xml deleted file mode 100644 index 566ed38d3..000000000 --- a/ms/controllerblueprints/application/pom.xml +++ /dev/null @@ -1,266 +0,0 @@ - - - - 4.0.0 - - org.onap.ccsdk.cds.controllerblueprints - parent - 0.6.1-SNAPSHOT - ../parent - - application - Controller Blueprints Application - - ${basedir}/target/src/main/resources/swagger-ui - 1.8 - org.onap.ccsdk.cds - controllerblueprints - - jacoco - reuseReports - ${basedir}/target/surefire-reports - ${basedir}/target/failsafe-reports - ${basedir}/target/jacoco_report - ${basedir}/target/jacoco_itReport - ${basedir}/target/jacoco-ut.exec - ${basedir}/target/jacoco-it.exec - java - 2.0.7 - - - - - org.onap.ccsdk.cds.controllerblueprints - service - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.powermock - powermock-api-mockito2 - test - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.security - spring-security-test - test - - - org.jetbrains.kotlin - kotlin-test-junit - test - - - io.projectreactor - reactor-test - test - - - - - - - ${basedir}/etc - ${basedir}/target/etc - true - - **/* - - - - - ${basedir}/src/main/resources - ${basedir}/target/src/main/resources - true - - **/* - - - - src/main/resources - - **/* - - true - - - - - maven-resources-plugin - 2.6 - - - copy-dockerfile - - copy-resources - - validate - - ${basedir}/target/docker-stage - - - src/main/docker - - * - - true - - - - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.5.201505241946 - - - - pre-unit-test - - prepare-agent - - - - ${sonar.jacoco.reportPath} - surefireArgLine - - - - - post-unit-test - test - - report - - - - ${sonar.jacoco.reportPath} - - ${jacoco.path} - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ant-test - package - - - - - - - run - - - - - - maven-compiler-plugin - 3.1 - - - 1.8 - 1.8 - - - - com.github.kongchen - swagger-maven-plugin - 3.1.7 - - - - true - org.onap.ccsdk.cds.controllerblueprints.service.rs - - - http - https - - /api/v1 - - Controller Blueprints - ${project.version} - - Controller blueprints API for VNF Self Service. - - - Terms of service - - - brindasanth@gmail.com - Brinda Santh - http://onap.com - - - http://www.apache.org/licenses/LICENSE-2.0.html - Apache 2.0 - - - ${swagger.directory} - - - - - - compile - - generate - - - - - - - - - diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ApplicationConstants.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ApplicationConstants.java deleted file mode 100644 index 9a9fafffc..000000000 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ApplicationConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -/** - * ApplicationConstants.java Purpose: Provide ControllerBlueprintsApplication Constant Information - * - * @author Brinda Santh - * @version 1.0 - */ -@SuppressWarnings("unused") -public final class ApplicationConstants { - -} diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ControllerBlueprintsApplication.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ControllerBlueprintsApplication.java deleted file mode 100644 index df979c6b3..000000000 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/ControllerBlueprintsApplication.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.web.reactive.config.EnableWebFlux; - -/** - * @author Brinda Santh - */ -@SpringBootApplication -@EnableWebFlux -@ComponentScan(basePackages = {"org.onap.ccsdk.cds.controllerblueprints"}) -@EnableAutoConfiguration -public class ControllerBlueprintsApplication { - private static Logger log = LoggerFactory.getLogger(ControllerBlueprintsApplication.class); - - public static void main(String[] args) { - log.info("****** Starting Controlled Blueprints Application ******"); - SpringApplication.run(ControllerBlueprintsApplication.class, args); - } - -} \ No newline at end of file diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java deleted file mode 100644 index 8ec4bd4a3..000000000 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.jpa.repository.config.EnableJpaAuditing; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import javax.sql.DataSource; - -/** - * DatabaseConfig.java Purpose: Provide Configuration Generator DatabaseConfig Information - * - * @author Brinda Santh - * @version 1.0 - */ -@Configuration -@EntityScan("org.onap.ccsdk.cds.controllerblueprints.service.domain") -@EnableTransactionManagement -@EnableJpaRepositories("org.onap.ccsdk.cds.controllerblueprints.service.repository") -@EnableJpaAuditing -public class DatabaseConfig { - /** - * This is a entityManagerFactory method - * - * @param dataSource - * @return LocalContainerEntityManagerFactoryBean - */ - - @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { - HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); - vendorAdapter.setGenerateDdl(true); - vendorAdapter.setShowSql(false); - LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); - factory.setJpaVendorAdapter(vendorAdapter); - factory.setPackagesToScan("org.onap.ccsdk.cds.controllerblueprints.service.domain"); - factory.setDataSource(dataSource); - return factory; - } - -} diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/WebConfig.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/WebConfig.java deleted file mode 100644 index e4799bc84..000000000 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/WebConfig.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.springframework.context.annotation.Configuration; -import org.springframework.web.reactive.config.CorsRegistry; -import org.springframework.web.reactive.config.ResourceHandlerRegistry; -import org.springframework.web.reactive.config.WebFluxConfigurationSupport; - -/** - * WebConfig - * - * @author Brinda Santh 8/13/2018 - */ -@Configuration -@SuppressWarnings("unused") -public class WebConfig extends WebFluxConfigurationSupport { - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("swagger-ui.html") - .addResourceLocations("classpath:/META-INF/resources/"); - - registry.addResourceHandler("/webjars/**") - .addResourceLocations("classpath:/META-INF/resources/webjars/"); - - } - - @Override - public void addCorsMappings(CorsRegistry corsRegistry) { - corsRegistry.addMapping("/**") - .allowedOrigins("*") - .allowedMethods("*") - .allowedHeaders("DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range") - .maxAge(3600); - } -} diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/security/ApplicationSecurityConfigurerAdapter.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/security/ApplicationSecurityConfigurerAdapter.java deleted file mode 100644 index d992dd945..000000000 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/security/ApplicationSecurityConfigurerAdapter.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints.security; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; -import org.springframework.security.config.web.server.ServerHttpSecurity; -import org.springframework.security.core.userdetails.MapReactiveUserDetailsService; -import org.springframework.security.core.userdetails.User; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.web.server.SecurityWebFilterChain; - -@SuppressWarnings("unused") -@EnableWebFluxSecurity -public class ApplicationSecurityConfigurerAdapter { - - @Value("${basic-auth.user-name}") - private String userName; - - @Value("${basic-auth.hashed-pwd}") - private String userHashedPassword; - - private static Logger log = LoggerFactory.getLogger(ApplicationSecurityConfigurerAdapter.class); - - @Bean - public SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception { - - http.csrf().disable(); - http.authorizeExchange() - .pathMatchers("/webjars/**", "/actuator/**").permitAll() - .anyExchange().authenticated() - .and().httpBasic(); - - return http.build(); - } - - @Bean - public MapReactiveUserDetailsService userDetailsService() { - User.UserBuilder userBuilder = User.builder(); - UserDetails defaultUser = userBuilder - .username(userName) - .password(userHashedPassword).roles("USER").build(); - return new MapReactiveUserDetailsService(defaultUser); - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/application/src/main/resources/application-dev.properties b/ms/controllerblueprints/application/src/main/resources/application-dev.properties deleted file mode 100755 index 1d5d04b55..000000000 --- a/ms/controllerblueprints/application/src/main/resources/application-dev.properties +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright © 2017-2018 AT&T Intellectual Property. -# -# 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. -# -appName=ControllerBluePrints -ms_name=org.onap.ccsdk.cds.controllerblueprints -appVersion=1.0.0 - -# Basic Authentication -basic-auth.user-name=ccsdkapps -basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y - -#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 - -logging.level.org.springframework.web=INFO -logging.level.org.hibernate.SQL=warn -logging.level.org.hibernate.type.descriptor.sql=debug - -#To Remove Null in JSON API Response -spring.jackson.default-property-inclusion=non_null - -#Swagger Configuration -swagger.contact.name=Brinda Santh Muthuramalingam -swagger.contact.url=www.onap.com -swagger.contact.email=brindasanth@onap.com - -spring.jpa.properties.hibernate.show_sql=true -spring.jpa.properties.hibernate.use_sql_comments=true -spring.jpa.properties.hibernate.format_sql=true - -# spring.datasource.url, spring.datasource.username,spring.datasource.password may be overridden by ENV variables -spring.datasource.url=jdbc:mysql://localhost:3306/sdnctl -spring.datasource.username=sdnctl -spring.datasource.password=sdnctl -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver -spring.jpa.show-sql=true -spring.jpa.hibernate.ddl-auto=none -spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -# Load Resource Source Mappings -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 -blueprintsprocessor.blueprintDeployPath=blueprints/deploy -blueprintsprocessor.blueprintArchivePath=blueprints/archive -blueprintsprocessor.blueprintWorkingPath=blueprints/work -# Controller Blueprint Load Configurations -blueprintsprocessor.loadInitialData=true -blueprintsprocessor.loadBluePrint=false -blueprintsprocessor.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/test-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 -blueprintsprocessor.loadCbaExtension=zip - -# Web server config -server.port=8082 diff --git a/ms/controllerblueprints/application/src/main/resources/application.properties b/ms/controllerblueprints/application/src/main/resources/application.properties deleted file mode 100755 index 55770db2d..000000000 --- a/ms/controllerblueprints/application/src/main/resources/application.properties +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright © 2017-2018 AT&T Intellectual Property. -# Modifications Copyright © 2018 IBM. -# Modifications Copyright © 2019 Bell Canada. -# -# 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. -# -appName=ControllerBluePrints -ms_name=org.onap.ccsdk.cds.controllerblueprints -appVersion=1.0.0 - -# Basic Authentication -basic-auth.user-name=ccsdkapps -basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y - -#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 - -logging.level.org.springframework.web=INFO -logging.level.org.hibernate.SQL=warn -logging.level.org.hibernate.type.descriptor.sql=debug - -#To Remove Null in JSON API Response -spring.jackson.default-property-inclusion=non_null - -#Swagger Configuration -swagger.contact.name=CCSDK team -swagger.contact.url=www.onap.org -swagger.contact.email=onap-discuss@lists.onap.org - -spring.jpa.properties.hibernate.show_sql=true -spring.jpa.properties.hibernate.use_sql_comments=true -spring.jpa.properties.hibernate.format_sql=true - -# spring.datasource.url, spring.datasource.username,spring.datasource.password may be overridden by ENV variables -spring.datasource.url=jdbc:mysql://db:3306/sdnctl -spring.datasource.username=sdnctl -spring.datasource.password=sdnctl -spring.datasource.driver-class-name=org.mariadb.jdbc.Driver -spring.jpa.show-sql=true -spring.jpa.hibernate.ddl-auto=none -spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect - -# Load Resource Source Mappings -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 -blueprintsprocessor.blueprintDeployPath=/etc/blueprints/deploy -blueprintsprocessor.blueprintArchivePath=/etc/blueprints/archive -blueprintsprocessor.blueprintWorkingPath=/etc/blueprints/work -# Controller Blueprint Load Configurations -# blueprints.load.initial-data may be overridden by ENV variables -blueprintsprocessor.loadInitialData=true -blueprintsprocessor.loadBluePrint=true -blueprintsprocessor.loadBluePrintPaths=/opt/app/onap//model-catalog/blueprint-model/service-blueprint -blueprintsprocessor.loadModelType=true -blueprintsprocessor.loadModeTypePaths=/opt/app/onap//model-catalog/definition-type/starter-type -blueprintsprocessor.loadResourceDictionary=true -blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap//model-catalog/resource-dictionary/starter-dictionary - -# CBA file extension -blueprintsprocessor.loadCbaExtension=zip - -# Web server config -server.port=8080 diff --git a/ms/controllerblueprints/application/src/main/resources/logback.xml b/ms/controllerblueprints/application/src/main/resources/logback.xml deleted file mode 100644 index 2af5a92cc..000000000 --- a/ms/controllerblueprints/application/src/main/resources/logback.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - ${defaultPattern} - - - - - - - - - - - - - - - diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java deleted file mode 100644 index 0b9df88b8..000000000 --- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBlueprintsApplicationTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.client.support.BasicAuthorizationInterceptor; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) -public class ControllerBlueprintsApplicationTest { - @Autowired - private TestRestTemplate restTemplate; - - @Before - public void setUp(){ - BasicAuthorizationInterceptor bai = new BasicAuthorizationInterceptor("ccsdkapps", "ccsdkapps"); - this.restTemplate.getRestTemplate().getInterceptors().add(bai); - } - - @Test - public void testConfigModel() { - HttpHeaders headers = new HttpHeaders(); - headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); -// ResponseEntity entity = this.restTemplate -// .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class); -// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); -// Assert.assertNotNull("failed to get response Config model",entity.getBody()); - } - - @Test - public void testConfigModelFailure() { - HttpHeaders headers = new HttpHeaders(); - headers.set("Accept", MediaType.APPLICATION_JSON_VALUE); -// ResponseEntity entity = this.restTemplate -// .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class); -// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); -// Assert.assertNotNull("failed to get response Config model",entity.getBody()); - } -} diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java deleted file mode 100644 index 9688b26b1..000000000 --- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/VersionSplitTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.apache.commons.lang3.StringUtils; -import org.junit.Assert; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; - -/** - * VersionSplitTest - * - * @author Brinda Santh - */ -public class VersionSplitTest { - private static Logger log = LoggerFactory.getLogger(VersionSplitTest.class); - - @Test - public void testVersionSplit() { - String version = "1.03.04"; - String[] tokens = StringUtils.split(version, '.'); - Assert.assertNotNull("failed to tokenize", tokens); - Assert.assertEquals("failed to three token ", 3, tokens.length); - } - - @Test - public void encodeTest() { - String name = "ccsdkapps"; - BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder(); - String encodedValue = bCryptPasswordEncoder.encode(name); - Assert.assertTrue("Failed to match", bCryptPasswordEncoder.matches(name, encodedValue)); - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/application/src/test/resources/application.properties b/ms/controllerblueprints/application/src/test/resources/application.properties deleted file mode 100755 index a3445d904..000000000 --- a/ms/controllerblueprints/application/src/test/resources/application.properties +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright © 2017-2018 AT&T Intellectual Property. -# Modifications Copyright © 2018 IBM. -# -# 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. -# -spring.main.banner-mode=off - -appName=ControllerBluePrints -ms_name=org.onap.ccsdk.cds.controllerblueprints -appVersion=1.0.0 - -# Basic Authentication -basic-auth.user-name=ccsdkapps -basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y - -#To Remove Null in JSON API Response -spring.jackson.default-property-inclusion=non_null - -#Swagger Configuration -swagger.contact.name=Brinda Santh Muthuramalingam -swagger.contact.url=www.onap.com -swagger.contact.email=brindasanth@onap.com - -# Load Resource Source Mappings -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 -blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy -blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive -blueprintsprocessor.blueprintEnrichmentPath=./target/blueprints/enrichment -# Controller Blueprint Load Configurations -blueprintsprocessor.loadInitialData=false -blueprintsprocessor.loadBluePrint=false -blueprintsprocessor.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint -blueprintsprocessor.loadModelType=false -blueprintsprocessor.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type -blueprintsprocessor.loadResourceDictionary=false -blueprintsprocessor.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary - -# CBA file extension -blueprintsprocessor.loadCbaExtension=zip - -# CBA examples for tests cases -blueprintsprocessor.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint - -# Web server config -server.port=8080 diff --git a/ms/controllerblueprints/application/src/test/resources/logback-test.xml b/ms/controllerblueprints/application/src/test/resources/logback-test.xml deleted file mode 100644 index 2252939e7..000000000 --- a/ms/controllerblueprints/application/src/test/resources/logback-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n - - - - - - - - - - - - - diff --git a/ms/controllerblueprints/distribution/pom.xml b/ms/controllerblueprints/distribution/pom.xml deleted file mode 100755 index f0473aab2..000000000 --- a/ms/controllerblueprints/distribution/pom.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - 4.0.0 - - org.onap.ccsdk.cds.controllerblueprints - parent - 0.6.1-SNAPSHOT - ../parent - - distribution - pom - Controller Blueprints Distribution - - maven - org.onap.ccsdk.cds - controllerblueprints - onap/ccsdk-controllerblueprints - ${https_proxy} - deploy - true - ${project.version} - ${maven.build.timestamp} - - - - - org.onap.ccsdk.cds.controllerblueprints - application - - - - - - maven-resources-plugin - 2.6 - - - copy-dockerfile - - copy-resources - - validate - - ${basedir}/target/docker-stage - - - src/main/docker - - * - - true - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ant-test - package - - - - - - - run - - - - - - - maven-assembly-plugin - 3.1.0 - - - ${basedir}/target/docker-stage - - src/main/docker/distribution.xml - - posix - - - - ${assembly.id} - package - - single - - - - - - org.codehaus.groovy.maven - gmaven-plugin - 1.0 - - - validate - - execute - - - ${basedir}/../../../TagVersion.groovy - - - - - - - - - - - docker - - - - io.fabric8 - docker-maven-plugin - 0.26.1 - false - - - - ${image.name} - - try - ${basedir}/target/docker-stage - - ${project.docker.latestminortag.version} - ${project.docker.latestfulltag.version} - ${project.docker.latesttagtimestamp.version} - - - - - true - - - - generate-images - package - - build - - - - push-images - ${docker.push.phase} - - build - push - - - - - - - - - - diff --git a/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml deleted file mode 100755 index 450a35415..000000000 --- a/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3.3' - -services: - db: - image: mariadb:latest - container_name: ccsdk-mariadb - ports: - - "3306:3306" - volumes: - - ~/vm_mysql:/var/lib/mysql - restart: always - environment: - MYSQL_ROOT_PASSWORD: sdnctl - MYSQL_DATABASE: sdnctl - MYSQL_USER: sdnctl - MYSQL_PASSWORD: sdnctl - controller-blueprints: - depends_on: - - db - image: onap/ccsdk-controllerblueprints:latest - container_name: cb-rest - ports: - - "8080:8080" - restart: always - environment: - APPLICATIONNAME: ControllerBluePrints - BUNDLEVERSION: 1.0.0 - APP_CONFIG_HOME: /opt/app/onap/config - STICKYSELECTORKEY: - ENVCONTEXT: dev \ No newline at end of file diff --git a/ms/controllerblueprints/distribution/src/main/docker/Dockerfile b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile deleted file mode 100755 index d3e10b76d..000000000 --- a/ms/controllerblueprints/distribution/src/main/docker/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM anapsix/alpine-java:8_jdk - -ENV HTTP_PROXY ${HTTP_PROXY} -ENV HTTPS_PROXY ${HTTPS_PROXY} - -# add entrypoint -COPY run.source /etc/run.source -COPY startService.sh /startService.sh -RUN chmod 777 /startService.sh && dos2unix /startService.sh - -# add application -COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz -RUN tar -xzf /source.tar.gz -C /tmp \ - && cp -rf /tmp/@project.build.finalName@/opt / \ - && rm -rf /source.tar.gz \ - && rm -rf /tmp/@project.build.finalName@ - -ENTRYPOINT /startService.sh \ No newline at end of file diff --git a/ms/controllerblueprints/distribution/src/main/docker/distribution.xml b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml deleted file mode 100755 index 74dc4400c..000000000 --- a/ms/controllerblueprints/distribution/src/main/docker/distribution.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - ${assembly.id} - - tar.gz - - - - /opt/app/onap/lib - - - - - ${project.basedir}/../application/src/main/resources - - application.properties - logback.xml - - /opt/app/onap/config - true - - - ${project.basedir}/../../../components/model-catalog - /opt/app/onap/model-catalog - true - - ${project.basedir}/../../../components/model-catalog/proto-definition - - - - diff --git a/ms/controllerblueprints/distribution/src/main/docker/run.source b/ms/controllerblueprints/distribution/src/main/docker/run.source deleted file mode 100755 index cc2c72983..000000000 --- a/ms/controllerblueprints/distribution/src/main/docker/run.source +++ /dev/null @@ -1,13 +0,0 @@ -java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \ --DappName=${APPLICATIONNAME} -DappVersion=${BUNDLEVERSION} \ --DrouteOffer=${ROUTEOFFER} \ --DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \ --DSecurityFilePath=/etc \ --DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \ --Dms_name=org.onap.ccsdk.cds.controllerblueprints \ --Dlogging.config=${APP_CONFIG_HOME}/logback.xml \ --Djava.security.egd=file:/dev/./urandom \ --DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \ --Dspring.config.location=${APP_CONFIG_HOME}/ \ --Dblueprints.load.initial-data=${INIT_DATA_LOAD} \ -org.onap.ccsdk.cds.controllerblueprints.ControllerBlueprintsApplication diff --git a/ms/controllerblueprints/distribution/src/main/docker/startService.sh b/ms/controllerblueprints/distribution/src/main/docker/startService.sh deleted file mode 100755 index 7077c2246..000000000 --- a/ms/controllerblueprints/distribution/src/main/docker/startService.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -nodeName=ControllerBlueprints_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1) - -echo "APP Config HOME : ${APP_CONFIG_HOME}" -export APP_HOME=/opt/app/onap - -source /etc/run.source diff --git a/ms/controllerblueprints/modules/pom.xml b/ms/controllerblueprints/modules/pom.xml index 07121226f..4bc962f04 100644 --- a/ms/controllerblueprints/modules/pom.xml +++ b/ms/controllerblueprints/modules/pom.xml @@ -31,7 +31,6 @@ blueprint-core resource-dict blueprint-validation - service diff --git a/ms/controllerblueprints/modules/service/pom.xml b/ms/controllerblueprints/modules/service/pom.xml deleted file mode 100644 index 0d822514a..000000000 --- a/ms/controllerblueprints/modules/service/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - 4.0.0 - - org.onap.ccsdk.cds.controllerblueprints - modules - 0.6.1-SNAPSHOT - - service - Controller Blueprints Service - - - - - - - org.jetbrains.kotlinx - kotlinx-coroutines-reactor - - - org.onap.ccsdk.cds.controllerblueprints - blueprint-validation - - - org.apache.velocity - velocity - - - com.hubspot.jinjava - jinjava - - - org.springframework.boot - spring-boot-starter-webflux - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-logging - - - - - com.h2database - h2 - runtime - - - org.mariadb.jdbc - mariadb-java-client - - - diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java deleted file mode 100644 index 38216a616..000000000 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints.service.common; - -import io.swagger.models.*; -import io.swagger.models.parameters.BodyParameter; -import io.swagger.models.parameters.Parameter; -import io.swagger.models.properties.*; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang3.BooleanUtils; -import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants; -import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes; -import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition; -import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate; - -import java.util.*; - -/** - * SwaggerGenerator.java Purpose: Provide Service to generate service template input schema definition and Sample Json - * generation. - * - * @author Brinda Santh - * @version 1.0 - */ -@Deprecated -public class SwaggerGenerator { - - private ServiceTemplate serviceTemplate; - public static final String INPUTS="inputs"; - - /** - * This is a SwaggerGenerator constructor - */ - public SwaggerGenerator(ServiceTemplate serviceTemplate) { - this.serviceTemplate = serviceTemplate; - } - - /** - * This is a generateSwagger - * - * @return String - */ - public String generateSwagger() { - - Swagger swagger = new Swagger().info(getInfo()); - - swagger.setPaths(getPaths()); - swagger.setDefinitions(getDefinition()); - - - return swagger.toString(); - } - - private Info getInfo() { - Info info = new Info(); - Contact contact = new Contact(); - contact.setName(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_AUTHOR)); - info.setContact(contact); - info.setTitle(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_NAME)); - info.setDescription(serviceTemplate.getDescription()); - info.setVersion(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_VERSION)); - return info; - } - - private Map getPaths() { - Map paths = new HashMap<>(); - Path path = new Path(); - Operation post = new Operation(); - post.setOperationId("configure"); - post.setConsumes(Arrays.asList("application/json", "application/xml")); - post.setProduces(Arrays.asList("application/json", "application/xml")); - List parameters = new ArrayList<>(); - Parameter in = new BodyParameter().schema(new RefModel("#/definitions/inputs")); - in.setRequired(true); - in.setName(INPUTS); - parameters.add(in); - post.setParameters(parameters); - - Map responses = new HashMap<>(); - Response response = new Response().description("Success"); - responses.put("200", response); - - Response failureResponse = new Response().description("Failure"); - responses.put("400", failureResponse); - post.setResponses(responses); - - path.setPost(post); - paths.put("/operations/config-selfservice-api:configure", path); - return paths; - } - - private Map getDefinition() { - Map models = new HashMap<>(); - - ModelImpl inputmodel = new ModelImpl(); - inputmodel.setTitle(INPUTS); - serviceTemplate.getTopologyTemplate().getInputs().forEach((propertyName, property) -> { - Property defProperty = getPropery(propertyName, property); - inputmodel.property(propertyName, defProperty); - }); - models.put(INPUTS, inputmodel); - - if (MapUtils.isNotEmpty(serviceTemplate.getDataTypes())) { - serviceTemplate.getDataTypes().forEach((name, dataType) -> { - ModelImpl model = new ModelImpl(); - model.setDescription(dataType.getDescription()); - if (dataType != null && MapUtils.isNotEmpty(dataType.getProperties())) { - - dataType.getProperties().forEach((propertyName, property) -> { - Property defProperty = getPropery(propertyName, property); - model.addProperty(propertyName, defProperty); - }); - } - models.put(name, model); - }); - } - return models; - - } - - private Property getPropery(String name, PropertyDefinition propertyDefinition) { - Property defProperty = null; - - if (BluePrintTypes.validPrimitiveTypes().contains(propertyDefinition.getType())) { - if (BluePrintConstants.DATA_TYPE_BOOLEAN.equals(propertyDefinition.getType())) { - defProperty = new BooleanProperty(); - } else if (BluePrintConstants.DATA_TYPE_INTEGER.equals(propertyDefinition.getType())) { - StringProperty stringProperty = new StringProperty(); - stringProperty.setType("integer"); - defProperty = stringProperty; - } else if (BluePrintConstants.DATA_TYPE_FLOAT.equals(propertyDefinition.getType())) { - StringProperty stringProperty = new StringProperty(); - stringProperty.setFormat("float"); - defProperty = stringProperty; - } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP.equals(propertyDefinition.getType())) { - DateTimeProperty dateTimeProperty = new DateTimeProperty(); - dateTimeProperty.setFormat("date-time"); - defProperty = dateTimeProperty; - } else { - defProperty = new StringProperty(); - } - } else if (BluePrintTypes.validCollectionTypes().contains(propertyDefinition.getType())) { - Optional innerType = Optional.empty(); - if (propertyDefinition.getEntrySchema() != null) { - String entrySchema = propertyDefinition.getEntrySchema().getType(); - if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema)) { - innerType = Optional.of(new RefProperty("#/definitions/" + entrySchema)); - } - } - ArrayProperty arrayProperty = new ArrayProperty(); - arrayProperty.setItems(innerType.orElseGet(StringProperty::new)); - defProperty = arrayProperty; - } else { - defProperty = new RefProperty("#/definitions/" + propertyDefinition.getType()); - } - defProperty.setName(name); - if (propertyDefinition.getDefaultValue() != null) { - defProperty.setDefault(String.valueOf(propertyDefinition.getDefaultValue())); - } - - defProperty.setRequired(BooleanUtils.isTrue(propertyDefinition.getRequired())); - defProperty.setDescription(propertyDefinition.getDescription()); - return defProperty; - } - - -} diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt deleted file mode 100644 index c69a94430..000000000 --- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2019 IBM. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints.service - -import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.context.properties.bind.Bindable -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.boot.context.properties.source.ConfigurationPropertySources -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.core.env.Environment -import org.springframework.stereotype.Service - -@Configuration -open class BluePrintDesignerCoreConfiguration(private val bluePrintProperties: BluePrintDesignerProperties) { - - companion object { - const val PREFIX_BLUEPRINT_LOAD_CONFIGURATION = "blueprintsprocessor" - } - - @Bean - open fun bluePrintDesignerLoadConfiguration(): BluePrintLoadConfiguration { - return bluePrintProperties - .propertyBeanType(PREFIX_BLUEPRINT_LOAD_CONFIGURATION, BluePrintLoadConfiguration::class.java) - } -} - -@Configuration -open class BlueprintDesignerPropertyConfiguration { - @Autowired - lateinit var environment: Environment - - @Bean - open fun bluePrintDesignerPropertyBinder(): Binder { - val configurationPropertySource = ConfigurationPropertySources.get(environment) - return Binder(configurationPropertySource) - } -} - -@Service -open class BluePrintDesignerProperties(private var bluePrintDesignerPropertyBinder: Binder) { - fun propertyBeanType(prefix: String, type: Class): T { - return bluePrintDesignerPropertyBinder.bind(prefix, Bindable.of(type)).get() - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json b/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json deleted file mode 100644 index c482b9b30..000000000 --- a/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json +++ /dev/null @@ -1,862 +0,0 @@ -{ - "version": "1.0.0", - "metadata": { - "template_author": "xxxx@onap.com", - "template_name": "default_netconf", - "template_version": "1.0.0", - "service-type": "XXXXXXXXXXX", - "vnf-type": "XXXXXXXXX" - }, - "topology_template": { - "inputs": { - "request-id": { - "required": true, - "type": "string" - }, - "template-name": { - "required": true, - "type": "string" - }, - "template-version": { - "required": true, - "type": "string" - }, - "action-name": { - "required": true, - "type": "string" - }, - "service-instance-id": { - "required": true, - "type": "string" - }, - "resource-type": { - "required": true, - "type": "string" - } - }, - "node_templates": { - "base-config-template": { - "type": "artifact-config-template", - "properties": { - "action-names": [ - "resource-assignment-action" - ] - }, - "capabilities": { - "content": { - "properties": { - "content": "" - } - }, - "mapping": { - "properties": { - "mapping": [] - } - } - } - }, - "licence-template": { - "type": "artifact-config-template", - "properties": { - "action-names": [ - "activate-netconf-action" - ] - }, - "capabilities": { - "content": { - "properties": { - "content": "" - } - }, - "mapping": { - "properties": { - "mapping": [] - } - } - } - }, - "runningconfig-template": { - "type": "artifact-config-template", - "properties": { - "action-names": [ - "activate-netconf-action" - ] - }, - "capabilities": { - "content": { - "properties": { - "content": "" - } - }, - "mapping": { - "properties": { - "mapping": [] - } - } - } - }, - "resource-assignment-action": { - "type": "dg-resource-assignment", - "interfaces": { - "CONFIG": { - "operations": { - "ResourceAssignment": { - - } - } - } - }, - "capabilities": { - "dg-node": { - - } - }, - "requirements": { - "component-dependency": { - "capability": "component-node", - "node": "get-resource-assignment", - "relationship": "tosca.relationships.DependsOn" - } - } - }, - "activate-netconf-action": { - "type": "dg-activate-netconf", - "interfaces": { - "CONFIG": { - "operations": { - "ActivateNetconf": { - - } - } - } - }, - "capabilities": { - "dg-node": { - - } - }, - "requirements": { - "component-dependency": { - "capability": "component-node", - "node": "transaction-netconf-baseconfig", - "relationship": "tosca.relationships.DependsOn" - } - } - }, - "resource-assignment": { - "type": "component-resource-assignment", - "interfaces": { - "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": { - "operations": { - "process": { - "inputs": { - "resource-type": "vnf-type", - "template-names": [ - "base-config-template", - "licence-template" - ], - "request-id": { "get_input" : "request-id" }, - "resource-id": { "get_input" : "vnf-id" } - }, - "outputs": { - "resource-assignment-params": "", - "status": "" - } - } - } - } - }, - "capabilities": { - "component-node": { - - } - } - }, - "edit-netconf-config": { - "type": "component-netconf-edit", - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfEditConfigNode": { - "operations": { - "process": { - "inputs": { - "rpc-message": false, - "wait": 0, - "unlock": false, - "config-target": "RUNNING", - "commit": true, - "edit-default-operation": "repalce", - "lock": false, - "post-restart-wait": false, - "pre-restart-wait": false - }, - "outputs": { - "rpc-response-message": "", - "status": "" - } - } - } - } - }, - "capabilities": { - "component-node": { - - } - } - }, - "transaction-netconf-baseconfig": { - "type": "component-transaction-netconf", - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-NetconfTransactionNode": { - "operations": { - "process": { - "inputs": { - "rollback": false, - "transaction-templates": [ - "runningconfig-template" - ], - "assignment-action-name": "resource-assignment-action", - "transaction-components": [ - "get-netconf-config" - ], - "resource-type": "vnf-type", - "initialise-sftp": false, - "request-id": {"get_input" : "request-id"}, - "initialise-ssh": false, - "resource-id": { "get_input" : "vnf-id" }, - "action-name": {"get_input" : "action-name"} - }, - "outputs": { - "rpc-response-message": "", - "status": "" - } - } - } - } - }, - "capabilities": { - "component-node": { - - } - }, - "requirements": { - "netconf-connection": { - "capability": "netconf", - "node": "vdbe-netconf-device", - "relationship": "tosca.relationships.ConnectsTo" - } - } - }, - "get-netconf-config": { - "type": "component-netconf-get", - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfGetConfigNode": { - "operations": { - "process": { - "inputs": { - "rpc-message": true, - "wait": 1, - "message-time-out": 10 - }, - "outputs": { - "rpc-response-message": "", - "status": "" - } - } - } - } - }, - "capabilities": { - "component-node": { - - } - } - } - } - }, - "node_types": { - "vnf-netconf-device": { - "description": "This is VNF Device with Netconf and SSH Capability", - "version": "1.0.0", - "capabilities": { - "netconf": { - "type": "tosca.capabilities.Netconf", - "properties": { - "password": { - "required": false, - "type": "string" - }, - "user-id": { - "required": true, - "type": "string" - }, - "host-ip-address": { - "required": true, - "type": "string" - }, - "port-number": { - "required": true, - "type": "integer", - "default": 830 - }, - "message-time-out": { - "required": false, - "type": "integer", - "default": 3000 - }, - "connection-time-out": { - "required": false, - "type": "integer", - "default": 30 - } - } - }, - "ssh": { - "type": "tosca.capabilities.Ssh", - "properties": { - "password": { - "required": false, - "type": "string" - }, - "user-id": { - "required": true, - "type": "string" - }, - "host-ip-address": { - "required": true, - "type": "string" - }, - "port-number": { - "required": true, - "type": "integer", - "default": 22 - }, - "message-time-out": { - "required": false, - "type": "integer", - "default": 180 - }, - "connection-time-out": { - "required": false, - "type": "integer", - "default": 30 - } - } - }, - "sftp": { - "type": "tosca.capabilities.Sftp", - "properties": { - "password": { - "required": false, - "type": "string" - }, - "user-id": { - "required": true, - "type": "string" - }, - "host-ip-address": { - "required": true, - "type": "string" - }, - "port-number": { - "required": true, - "type": "integer", - "default": 22 - }, - "message-time-out": { - "required": false, - "type": "integer", - "default": 180 - }, - "connection-time-out": { - "required": false, - "type": "integer", - "default": 30 - } - } - } - }, - "derived_from": "tosca.nodes.Vnf" - }, - "dg-resource-assignment": { - "description": "This is Resource Assignment Directed Graph", - "version": "1.0.0", - "properties": { - "mode": { - "required": false, - "type": "string", - "default": "sync" - }, - "version": { - "required": false, - "type": "string", - "default": "LATEST" - }, - "is-start-flow": { - "required": false, - "type": "boolean", - "default": false - } - }, - "capabilities": { - "dg-node": { - "type": "tosca.capabilities.Node" - } - }, - "requirements": { - "component-dependency": { - "capability": "component-node", - "node": "component-resource-assignment", - "relationship": "tosca.relationships.DependsOn" - } - }, - "interfaces": { - "CONFIG": { - "operations": { - "ResourceAssignment": { - "inputs": { - "params": { - "required": false, - "type": "list", - "entry_schema": { - "type": "datatype-property" - } - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Workflow" - }, - "dg-activate-netconf": { - "description": "This is Download Netconf Directed Graph", - "version": "1.0.0", - "properties": { - "mode": { - "required": false, - "type": "string", - "default": "sync" - }, - "version": { - "required": false, - "type": "string", - "default": "LATEST" - }, - "is-start-flow": { - "required": false, - "type": "boolean", - "default": false - } - }, - "capabilities": { - "dg-node": { - "type": "tosca.capabilities.Node" - } - }, - "requirements": { - "component-dependency": { - "capability": "component-node", - "node": "component-transaction-netconf", - "relationship": "tosca.relationships.DependsOn" - } - }, - "interfaces": { - "CONFIG": { - "operations": { - "ActivateNetconf": { - "inputs": { - "params": { - "required": false, - "type": "list", - "entry_schema": { - "type": "datatype-property" - } - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Workflow" - }, - "artifact-config-template": { - "description": "This is Configuration Velocity Template", - "version": "1.0.0", - "properties": { - "action-names": { - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - } - }, - "capabilities": { - "content": { - "type": "tosca.capabilities.Content", - "properties": { - "content": { - "required": true, - "type": "string" - } - } - }, - "mapping": { - "type": "tosca.capabilities.Mapping", - "properties": { - "mapping": { - "required": false, - "type": "list", - "entry_schema": { - "type": "datatype-resource-assignment" - } - } - } - } - }, - "derived_from": "tosca.nodes.Artifact" - }, - "component-resource-assignment": { - "description": "This is Resource Assignment Component API", - "version": "1.0.0", - "capabilities": { - "component-node": { - "type": "tosca.capabilities.Node" - } - }, - "interfaces": { - "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": { - "operations": { - "process": { - "inputs": { - "handler-name": { - "description": "Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.", - "required": true, - "type": "string" - }, - "resource-type": { - "required": false, - "type": "string" - }, - "template-names": { - "description": "Name of the Artifact Node Templates, to get the template Content.", - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - }, - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", - "required": true, - "type": "string" - }, - "resource-id": { - "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present", - "required": true, - "type": "string" - }, - "action-name": { - "description": "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, - "type": "string" - } - }, - "outputs": { - "resource-assignment-params": { - "required": true, - "type": "string" - }, - "status": { - "required": true, - "type": "string" - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Component" - }, - "component-netconf-get": { - "description": "This is Netconf Get Running Configuration Component API", - "version": "1.0.0", - "capabilities": { - "component-node": { - "type": "tosca.capabilities.Node" - } - }, - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfGetConfigNode": { - "operations": { - "process": { - "inputs": { - "rpc-message": { - "description": "It should be true, If the message is Neconf RPC message, It should be false If it is plain Config message.", - "required": false, - "type": "boolean", - "default": false - }, - "wait": { - "required": false, - "type": "integer", - "default": 0 - }, - "message-time-out": { - "required": false, - "type": "integer", - "default": 30 - } - }, - "outputs": { - "config-message": { - "type": "string" - }, - "status": { - "description": "Status of the Component Execution ( success or failure )", - "required": true, - "type": "string" - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Component" - }, - "component-netconf-edit": { - "description": "This is Netconf Edit Configuration Component API", - "version": "1.0.0", - "capabilities": { - "component-node": { - "type": "tosca.capabilities.Node" - } - }, - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfEditConfigNode": { - "operations": { - "process": { - "inputs": { - "rpc-message": { - "description": "If the message is Neconf RPC message,It should be true or false.", - "required": false, - "type": "boolean", - "default": false - }, - "wait": { - "description": "Delay time in sec before performing edit-config action.", - "required": false, - "type": "integer", - "default": 0 - }, - "unlock": { - "description": "If unLock command has to send before Edit Configuration.", - "required": false, - "type": "boolean", - "default": false - }, - "config-target": { - "required": false, - "type": "string" - }, - "commit": { - "description": "Issue commit command to the device after performing edit-config action.", - "required": false, - "type": "boolean", - "default": false - }, - "edit-default-operation": { - "required": false, - "type": "string" - }, - "lock": { - "description": "Issue lock command to the device before performing edit-config action.", - "required": false, - "type": "boolean", - "default": false - }, - "post-restart-wait": { - "description": "If Restart command should be issued before the Edit Operation, Provide the time to wait after restart. 0 meanno restart required or wait time in sec ex : 3000 for 5 ", - "required": false, - "type": "integer", - "default": 0 - }, - "pre-restart-wait": { - "description": "If Restart command should be issued after the Edit Operation, Provide the time to wait after restart. 0 meanno restart required or wait time in sec ex : 3000 for 5 ", - "required": false, - "type": "integer", - "default": 0 - }, - "message-time-out": { - "required": false, - "type": "integer", - "default": 30 - } - }, - "outputs": { - "rpc-response-message": { - "type": "string" - }, - "status": { - "description": "Status of the Component Execution ( success or failure )", - "required": true, - "type": "string" - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Component" - }, - "component-transaction-netconf": { - "description": "This is Netconf Transaction Configuration Component API", - "version": "1.0.0", - "capabilities": { - "component-node": { - "type": "tosca.capabilities.Node" - } - }, - "requirements": { - "netconf-connection": { - "capability": "netconf", - "node": "vnf-netconf-device", - "relationship": "tosca.relationships.ConnectsTo" - } - }, - "interfaces": { - "org-openecomp-sdnc-netconf-adaptor-service-NetconfTransactionNode": { - "operations": { - "process": { - "inputs": { - "rollback": { - "required": false, - "type": "boolean" - }, - "transaction-templates": { - "description": "Templates used by the Transaction Components during processing", - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - }, - "assignment-action-name": { - "description": "Assignment Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": true, - "type": "string" - }, - "transaction-components": { - "description": "Components used to used for the atomic transaction, Default Handlers are org.openecomp.sdnc.netconf.adaptor.service.SimpleNetconfEditConfigNode and org.openecomp.sdnc.netconf.adaptor.service.SimpleNetconfGetConfigNode", - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - }, - "resource-type": { - "description": "Resource Type to get from Database, Either (message & mask-info ) or( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, - "type": "string" - }, - "initialise-sftp": { - "required": false, - "type": "boolean" - }, - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", - "required": true, - "type": "string" - }, - "initialise-ssh": { - "required": false, - "type": "boolean" - }, - "resource-id": { - "description": "Resource Id to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, - "type": "string" - }, - "action-name": { - "description": "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority", - "required": false, - "type": "string" - } - }, - "outputs": { - "rpc-response-message": { - "type": "string" - }, - "status": { - "description": "Status of the Component Execution ( success or failure )", - "required": true, - "type": "string" - } - } - } - } - } - }, - "derived_from": "tosca.nodes.Component" - } - }, - "data_types": { - "datatype-resource-assignment": { - "version": "1.0.0", - "description": "This is Resource Assignment Data Type", - "properties": { - "property": { - "required": true, - "type": "datatype-property" - }, - "input-param": { - "required": true, - "type": "boolean" - }, - "dictionary-name": { - "required": false, - "type": "string" - }, - "dictionary-source": { - "required": false, - "type": "string" - }, - "dependencies": { - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - } - }, - "derived_from": "tosca.datatypes.Root" - }, - "datatype-property": { - "version": "1.0.0", - "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs", - "properties": { - "type": { - "required": true, - "type": "string" - }, - "description": { - "required": false, - "type": "string" - }, - "required": { - "required": false, - "type": "boolean" - }, - "default": { - "required": false, - "type": "string" - }, - "entry_schema": { - "required": false, - "type": "string" - } - }, - "derived_from": "tosca.datatypes.Root" - } - } -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/src/main/resources/sql/data.sql b/ms/controllerblueprints/modules/service/src/main/resources/sql/data.sql deleted file mode 100644 index e69de29bb..000000000 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 deleted file mode 100644 index ad5fdd054..000000000 --- a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema-local.sql +++ /dev/null @@ -1,83 +0,0 @@ --- 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 VARCHAR(100) NOT NULL, - 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 VARCHAR(100) NOT NULL, - 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/controllerblueprints/modules/service/src/main/resources/sql/schema.sql b/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql deleted file mode 100644 index 015b03b31..000000000 --- a/ms/controllerblueprints/modules/service/src/main/resources/sql/schema.sql +++ /dev/null @@ -1,78 +0,0 @@ --- ----------------------------------------------------- --- table CONFIG_MODEL --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL ( - config_model_id VARCHAR(100) NOT NULL, - 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 VARCHAR(100) NOT NULL, - 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/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java deleted file mode 100644 index 658d3072f..000000000 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/DatabaseConfig.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.jpa.repository.config.EnableJpaAuditing; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import javax.sql.DataSource; - -/** - * DatabaseConfig.java Purpose: Provide Configuration Generator DatabaseConfig Information - * - * @author Brinda Santh - * @version 1.0 - */ -@Configuration -@EntityScan("org.onap.ccsdk.cds.controllerblueprints.service.domain") -@EnableTransactionManagement -@EnableJpaRepositories("org.onap.ccsdk.cds.controllerblueprints.service.repository") -@EnableJpaAuditing -public class DatabaseConfig { - /** - * This is a entityManagerFactory method - * - * @param dataSource - * @return LocalContainerEntityManagerFactoryBean - */ - - @Bean - public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { - HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); - vendorAdapter.setGenerateDdl(true); - vendorAdapter.setShowSql(false); - LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); - factory.setJpaVendorAdapter(vendorAdapter); - factory.setPackagesToScan("org.onap.ccsdk.cds.controllerblueprints.service.domain"); - factory.setDataSource(dataSource); - return factory; - } - -} diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/TestApplication.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/TestApplication.java deleted file mode 100644 index d5ea7bc5d..000000000 --- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/cds/controllerblueprints/TestApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * 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. - */ - -package org.onap.ccsdk.cds.controllerblueprints; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; - - -@SpringBootApplication -@ComponentScan(basePackages = {"org.onap.ccsdk.cds.controllerblueprints"}) -@EnableAutoConfiguration -public class TestApplication { - - public static void main(String[] args) { - SpringApplication.run(TestApplication.class, args); - } - -} \ No newline at end of file diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties deleted file mode 100755 index ac83276e6..000000000 --- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright © 2017-2018 AT&T Intellectual Property. -# Modifications Copyright © 2018 IBM. -# -# 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. -# -spring.main.banner-mode=off -spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false -logging.level.org.springframework.web=INFO -logging.level.org.hibernate.SQL=warn -logging.level.org.hibernate.type.descriptor.sql=debug -# Load Resource Source Mappings -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 -blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy -blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive -blueprintsprocessor.blueprintWorkingPath=./target/blueprints/work -# Controller Blueprint Load Configurations -blueprintsprocessor.loadInitialData=false -blueprintsprocessor.loadBluePrint=false -blueprintsprocessor.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint -blueprintsprocessor.loadModelType=false -blueprintsprocessor.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type -blueprintsprocessor.loadResourceDictionary=false -blueprintsprocessor.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary - -# CBA file extension -blueprintsprocessor.loadCbaExtension=zip - -# CBA examples for tests cases -blueprintsprocessor.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint diff --git a/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml b/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml deleted file mode 100644 index feb4514d6..000000000 --- a/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - %d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n - - - - - - - - - - - - - - - diff --git a/ms/controllerblueprints/parent/pom.xml b/ms/controllerblueprints/parent/pom.xml index ea0f4adb9..3021c4032 100644 --- a/ms/controllerblueprints/parent/pom.xml +++ b/ms/controllerblueprints/parent/pom.xml @@ -225,16 +225,6 @@ blueprint-validation ${project.version} - - org.onap.ccsdk.cds.controllerblueprints - service - ${project.version} - - - org.onap.ccsdk.cds.controllerblueprints - application - ${project.version} - diff --git a/ms/controllerblueprints/pom.xml b/ms/controllerblueprints/pom.xml index 17d97f6ec..909dfa4fe 100644 --- a/ms/controllerblueprints/pom.xml +++ b/ms/controllerblueprints/pom.xml @@ -40,7 +40,5 @@ parent modules - application - distribution -- 2.16.6