--- drop table sdnctl.MODEL_TYPE;\r
--- drop table sdnctl.RESOURCE_DICTIONARY;\r
--- drop table sdnctl.CONFIG_MODEL_CONTENT;\r
--- drop table sdnctl.CONFIG_MODEL;\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL (\r
- config_model_id INT(11) NOT NULL AUTO_INCREMENT,\r
- service_uuid VARCHAR(50) NULL DEFAULT NULL,\r
- distribution_id VARCHAR(50) NULL DEFAULT NULL,\r
- service_name VARCHAR(255) NULL DEFAULT NULL,\r
- service_description VARCHAR(255) NULL DEFAULT NULL,\r
- resource_uuid VARCHAR(255) NULL DEFAULT NULL,\r
- resource_instance_name VARCHAR(255) NULL DEFAULT NULL,\r
- resource_name varchar(255) null default null,\r
- resource_version varchar(50) null default null,\r
- resource_type varchar(50) null default null,\r
- artifact_uuid varchar(50) null default null,\r
- artifact_type varchar(50) not null,\r
- artifact_version varchar(25) not null,\r
- artifact_description longtext null default null,\r
- internal_version int(11) null default null,\r
- creation_date datetime not null default current_timestamp,\r
- artifact_name varchar(100) not null,\r
- published varchar(1) not null,\r
- updated_by varchar(100) not null,\r
- tags longtext null default null,\r
- primary key PK_CONFIG_MODEL (config_model_id),\r
- UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL_CONTENT\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL_CONTENT (\r
- config_model_content_id INT(11) NOT NULL AUTO_INCREMENT, \r
- config_model_id INT NOT NULL,\r
- name VARCHAR(100) NOT NULL,\r
- content_type VARCHAR(50) NOT NULL,\r
- description LONGTEXT NULL DEFAULT NULL,\r
- updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- content LONGTEXT NULL DEFAULT NULL,\r
- PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),\r
- UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),\r
- FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES sdnctl.CONFIG_MODEL(config_model_id) ON DELETE CASCADE\r
-) ENGINE=InnoDB;\r
-\r
--- -----------------------------------------------------\r
--- table MODEL_TYPE\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.MODEL_TYPE (\r
- model_name VARCHAR(100) NOT NULL,\r
- derived_from VARCHAR(100) NOT NULL,\r
- definition_type VARCHAR(100) NOT NULL,\r
- definition LONGTEXT NOT NULL,\r
- version VARCHAR(10) NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NULL DEFAULT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- PRIMARY KEY PK_MODEL_TYPE (model_name),\r
- INDEX IX_MODEL_TYPE (model_name)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table RESOURCE_DICTIONARY\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.RESOURCE_DICTIONARY (\r
- name VARCHAR(100) NOT NULL,\r
- data_type VARCHAR(100) NOT NULL,\r
- entry_schema VARCHAR(100) NULL DEFAULT NULL,\r
- definition LONGTEXT NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NOT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- primary key PK_RESOURCE_DICTIONARY (name),\r
- INDEX IX_RESOURCE_DICTIONARY (name)\r
+-- 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
--- -----------------------------------------------------\r
--- table CONFIG_MODEL\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL (\r
- config_model_id INT(11) NOT NULL AUTO_INCREMENT,\r
- service_uuid VARCHAR(50) NULL DEFAULT NULL,\r
- distribution_id VARCHAR(50) NULL DEFAULT NULL,\r
- service_name VARCHAR(255) NULL DEFAULT NULL,\r
- service_description VARCHAR(255) NULL DEFAULT NULL,\r
- resource_uuid VARCHAR(255) NULL DEFAULT NULL,\r
- resource_instance_name VARCHAR(255) NULL DEFAULT NULL,\r
- resource_name varchar(255) null default null,\r
- resource_version varchar(50) null default null,\r
- resource_type varchar(50) null default null,\r
- artifact_uuid varchar(50) null default null,\r
- artifact_type varchar(50) not null,\r
- artifact_version varchar(25) not null,\r
- artifact_description longtext null default null,\r
- internal_version int(11) null default null,\r
- creation_date datetime not null default current_timestamp,\r
- artifact_name varchar(100) not null,\r
- published varchar(1) not null,\r
- updated_by varchar(100) not null,\r
- tags longtext null default null,\r
- primary key PK_CONFIG_MODEL (config_model_id),\r
- UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL_CONTENT\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL_CONTENT (\r
- config_model_content_id INT(11) NOT NULL AUTO_INCREMENT, \r
- config_model_id INT NOT NULL,\r
- name VARCHAR(100) NOT NULL,\r
- content_type VARCHAR(50) NOT NULL,\r
- description LONGTEXT NULL DEFAULT NULL,\r
- updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- content LONGTEXT NULL DEFAULT NULL,\r
- PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),\r
- UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),\r
- FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES configurator.CONFIG_MODEL(config_model_id) ON DELETE CASCADE\r
-) ENGINE=InnoDB;\r
-\r
--- -----------------------------------------------------\r
--- table MODEL_TYPE\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.MODEL_TYPE (\r
- model_name VARCHAR(100) NOT NULL,\r
- derived_from VARCHAR(100) NOT NULL,\r
- definition_type VARCHAR(100) NOT NULL,\r
- definition LONGTEXT NOT NULL,\r
- version VARCHAR(10) NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NULL DEFAULT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- PRIMARY KEY PK_MODEL_TYPE (model_name),\r
- INDEX IX_MODEL_TYPE (model_name)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table RESOURCE_DICTIONARY\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.RESOURCE_DICTIONARY (\r
- name VARCHAR(100) NOT NULL,\r
- data_type VARCHAR(100) NOT NULL,\r
- entry_schema VARCHAR(100) NULL DEFAULT NULL,\r
- definition LONGTEXT NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NOT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- primary key PK_RESOURCE_DICTIONARY (name),\r
- INDEX IX_RESOURCE_DICTIONARY (name)\r
-) ENGINE=InnoDB;\r
+-- -----------------------------------------------------
+-- 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;
<groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
<name>Blueprints Processor Designer API</name>
<description>Blueprints Processor Designer API</description>
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>service</artifactId>
- </dependency>
- </dependencies>
</project>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
- <!--dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>blueprint-validation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>blueprint-scripts</artifactId>
- </dependency-->
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
<groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId>
</dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
<!-- For Message libraries -->
<dependency>
<artifactId>blueprint-core</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>blueprint-scripts</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>service</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- Database -->
<dependency>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>parent</artifactId>
- <version>0.6.1-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <artifactId>application</artifactId>
- <name>Controller Blueprints Application</name>
- <properties>
- <swagger.directory>${basedir}/target/src/main/resources/swagger-ui</swagger.directory>
- <java.version>1.8</java.version>
- <name.space>org.onap.ccsdk.cds</name.space> <!-- <name.space>${namespace}</name.space> -->
- <serviceArtifactName>controllerblueprints</serviceArtifactName>
- <!-- Sonar -->
- <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
- <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
- <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
- <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
- <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
- <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
- <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
- <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
- <sonar.language>java</sonar.language>
- <ilib.version>2.0.7</ilib.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>service</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jetbrains.kotlin</groupId>
- <artifactId>kotlin-test-junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.projectreactor</groupId>
- <artifactId>reactor-test</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <resources>
- <resource>
- <!--config and resource files -->
- <directory>${basedir}/etc</directory>
- <targetPath>${basedir}/target/etc</targetPath>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <!--config and resource files -->
- <directory>${basedir}/src/main/resources</directory>
- <targetPath>${basedir}/target/src/main/resources</targetPath>
- <filtering>true</filtering>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy-dockerfile</id>
- <goals>
- <goal>copy-resources</goal>
- </goals><!-- here the phase you need -->
- <phase>validate</phase>
- <configuration>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/docker</directory>
- <includes>
- <include>*</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.5.201505241946</version>
- <executions>
- <!-- Prepares the property pointing to the JaCoCo runtime agent which
- is passed as VM argument when Maven the Surefire plugin is executed. -->
- <execution>
- <id>pre-unit-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <destFile>${sonar.jacoco.reportPath}</destFile>
- <propertyName>surefireArgLine</propertyName>
- </configuration>
- </execution>
- <!-- Ensures that the code coverage report for unit tests is created
- after unit tests have been run. -->
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <dataFile>${sonar.jacoco.reportPath}</dataFile>
- <!-- Sets the output directory for the code coverage report. -->
- <outputDirectory>${jacoco.path}</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>ant-test</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <!-- <skip>${skip.compile}</skip>-->
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.github.kongchen</groupId>
- <artifactId>swagger-maven-plugin</artifactId>
- <version>3.1.7</version>
- <configuration>
- <apiSources>
- <apiSource>
- <springmvc>true</springmvc>
- <locations>org.onap.ccsdk.cds.controllerblueprints.service.rs
- </locations>
- <schemes>
- <scheme>http</scheme>
- <scheme>https</scheme>
- </schemes>
- <basePath>/api/v1</basePath>
- <info>
- <title>Controller Blueprints</title>
- <version>${project.version}</version>
- <description>
- Controller blueprints API for VNF Self Service.
- </description>
- <termsOfService>
- Terms of service
- </termsOfService>
- <contact>
- <email>brindasanth@gmail.com</email>
- <name>Brinda Santh</name>
- <url>http://onap.com</url>
- </contact>
- <license>
- <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
- <name>Apache 2.0</name>
- </license>
- </info>
- <swaggerDirectory>${swagger.directory}</swaggerDirectory>
- </apiSource>
- </apiSources>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-
-</project>
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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
+++ /dev/null
-/*
- * 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;
- }
-
-}
+++ /dev/null
-/*
- * 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);
- }
-}
+++ /dev/null
-/*
- * 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
+++ /dev/null
-#
-# 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
+++ /dev/null
-#
-# 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
+++ /dev/null
-<!--
- ~ 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.
- -->
-
-<configuration>
-
- <property name="localPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{100} - %msg%n" />
-
- <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" />
-
- <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|[%caller{3}]| %msg%n" />
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>${defaultPattern}</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
- <logger name="org.springframework.security.web.authentication" level="warn"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.cds" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
+++ /dev/null
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.onap.ccsdk.cds.controllerblueprints;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.boot.test.context.SpringBootTest;\r
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;\r
-import org.springframework.boot.test.web.client.TestRestTemplate;\r
-import org.springframework.http.HttpHeaders;\r
-import org.springframework.http.MediaType;\r
-import org.springframework.http.client.support.BasicAuthorizationInterceptor;\r
-import org.springframework.test.context.junit4.SpringRunner;\r
-\r
-@RunWith(SpringRunner.class)\r
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)\r
-public class ControllerBlueprintsApplicationTest {\r
- @Autowired\r
- private TestRestTemplate restTemplate;\r
-\r
- @Before\r
- public void setUp(){\r
- BasicAuthorizationInterceptor bai = new BasicAuthorizationInterceptor("ccsdkapps", "ccsdkapps");\r
- this.restTemplate.getRestTemplate().getInterceptors().add(bai);\r
- }\r
-\r
- @Test\r
- public void testConfigModel() {\r
- HttpHeaders headers = new HttpHeaders();\r
- headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);\r
-// ResponseEntity<BlueprintModel> entity = this.restTemplate\r
-// .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class);\r
-// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);\r
-// Assert.assertNotNull("failed to get response Config model",entity.getBody());\r
- }\r
-\r
- @Test\r
- public void testConfigModelFailure() {\r
- HttpHeaders headers = new HttpHeaders();\r
- headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);\r
-// ResponseEntity<BlueprintModel> entity = this.restTemplate\r
-// .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),BlueprintModel.class);\r
-// assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);\r
-// Assert.assertNotNull("failed to get response Config model",entity.getBody());\r
- }\r
-}\r
+++ /dev/null
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.onap.ccsdk.cds.controllerblueprints;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;\r
-\r
-/**\r
- * VersionSplitTest\r
- *\r
- * @author Brinda Santh\r
- */\r
-public class VersionSplitTest {\r
- private static Logger log = LoggerFactory.getLogger(VersionSplitTest.class);
-\r
- @Test\r
- public void testVersionSplit() {\r
- String version = "1.03.04";\r
- String[] tokens = StringUtils.split(version, '.');\r
- Assert.assertNotNull("failed to tokenize", tokens);\r
- Assert.assertEquals("failed to three token ", 3, tokens.length);\r
- }\r
-\r
- @Test\r
- public void encodeTest() {\r
- String name = "ccsdkapps";\r
- BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();\r
- String encodedValue = bCryptPasswordEncoder.encode(name);\r
- Assert.assertTrue("Failed to match", bCryptPasswordEncoder.matches(name, encodedValue));\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-#\r
-# Copyright © 2017-2018 AT&T Intellectual Property.\r
-# Modifications Copyright © 2018 IBM.\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-spring.main.banner-mode=off\r
-\r
-appName=ControllerBluePrints\r
-ms_name=org.onap.ccsdk.cds.controllerblueprints\r
-appVersion=1.0.0\r
-\r
-# Basic Authentication\r
-basic-auth.user-name=ccsdkapps\r
-basic-auth.hashed-pwd={bcrypt}$2a$10$MJxhNiOAffxbyrV9.rrOUewP9Q/ASg5Nit2cmP.yBaXGsVXo8BW3y\r
-\r
-#To Remove Null in JSON API Response\r
-spring.jackson.default-property-inclusion=non_null\r
-\r
-#Swagger Configuration\r
-swagger.contact.name=Brinda Santh Muthuramalingam\r
-swagger.contact.url=www.onap.com\r
-swagger.contact.email=brindasanth@onap.com\r
-\r
-# Load Resource Source Mappings\r
-resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability\r
-\r
-# Controller Blueprints Core Configuration\r
-blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy\r
-blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive\r
-blueprintsprocessor.blueprintEnrichmentPath=./target/blueprints/enrichment\r
-# Controller Blueprint Load Configurations\r
-blueprintsprocessor.loadInitialData=false\r
-blueprintsprocessor.loadBluePrint=false\r
-blueprintsprocessor.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint\r
-blueprintsprocessor.loadModelType=false\r
-blueprintsprocessor.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type\r
-blueprintsprocessor.loadResourceDictionary=false\r
-blueprintsprocessor.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary\r
-\r
-# CBA file extension\r
-blueprintsprocessor.loadCbaExtension=zip\r
-\r
-# CBA examples for tests cases\r
-blueprintsprocessor.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint\r
-\r
-# Web server config\r
-server.port=8080\r
+++ /dev/null
-<!--
- ~ 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.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~ 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>parent</artifactId>
- <version>0.6.1-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <artifactId>distribution</artifactId>
- <packaging>pom</packaging>
- <name>Controller Blueprints Distribution</name>
- <properties>
- <assembly.id>maven</assembly.id>
- <name.space>org.onap.ccsdk.cds</name.space> <!-- <name.space>${namespace}</name.space> -->
- <serviceArtifactName>controllerblueprints</serviceArtifactName>
- <image.name>onap/ccsdk-controllerblueprints</image.name>
- <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
- <docker.push.phase>deploy</docker.push.phase>
- <docker.verbose>true</docker.verbose>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>application</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <executions>
- <execution>
- <id>copy-dockerfile</id>
- <goals>
- <goal>copy-resources</goal>
- </goals><!-- here the phase you need -->
- <phase>validate</phase>
- <configuration>
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/docker</directory>
- <includes>
- <include>*</include>
- </includes>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>ant-test</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!--build the final artifact for docker deployment -->
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
- <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
- <descriptors>
- <descriptor>src/main/docker/distribution.xml</descriptor>
- </descriptors>
- <tarLongFileMode>posix</tarLongFileMode>
- </configuration>
- <executions>
- <execution>
- <id>${assembly.id}</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>${basedir}/../../../TagVersion.groovy</source>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.26.1</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <tags>
- <tag>${project.docker.latestminortag.version}</tag>
- <tag>${project.docker.latestfulltag.version}</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
- </tags>
- </build>
- </image>
- </images>
- <verbose>true</verbose>
- </configuration>
- <executions>
- <execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- <execution>
- <id>push-images</id>
- <phase>${docker.push.phase}</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>
-</project>
+++ /dev/null
-version: '3.3'\r
-\r
-services:\r
- db:\r
- image: mariadb:latest\r
- container_name: ccsdk-mariadb\r
- ports:\r
- - "3306:3306"\r
- volumes:\r
- - ~/vm_mysql:/var/lib/mysql\r
- restart: always\r
- environment:\r
- MYSQL_ROOT_PASSWORD: sdnctl\r
- MYSQL_DATABASE: sdnctl\r
- MYSQL_USER: sdnctl\r
- MYSQL_PASSWORD: sdnctl\r
- controller-blueprints:\r
- depends_on:\r
- - db\r
- image: onap/ccsdk-controllerblueprints:latest\r
- container_name: cb-rest\r
- ports:\r
- - "8080:8080"\r
- restart: always\r
- environment:\r
- APPLICATIONNAME: ControllerBluePrints\r
- BUNDLEVERSION: 1.0.0\r
- APP_CONFIG_HOME: /opt/app/onap/config\r
- STICKYSELECTORKEY:\r
- ENVCONTEXT: dev
\ No newline at end of file
+++ /dev/null
-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
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~ 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.
- -->
-
-<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
- <!-- create a tar.gz file containing the projects dependencies -->
- <id>${assembly.id}</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <dependencySets>
- <dependencySet>
- <outputDirectory>/opt/app/onap/lib</outputDirectory>
- </dependencySet>
- </dependencySets>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}/../application/src/main/resources</directory>
- <includes>
- <include>application.properties</include>
- <include>logback.xml</include>
- </includes>
- <outputDirectory>/opt/app/onap/config</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../../../components/model-catalog</directory>
- <outputDirectory>/opt/app/onap/model-catalog</outputDirectory>
- <useDefaultExcludes>true</useDefaultExcludes>
- <excludes>
- <exclude>${project.basedir}/../../../components/model-catalog/proto-definition</exclude>
- </excludes>
- </fileSet>
- </fileSets>
-</assembly>
+++ /dev/null
-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
+++ /dev/null
-#!/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
<module>blueprint-core</module>
<module>resource-dict</module>
<module>blueprint-validation</module>
- <module>service</module>
</modules>
<dependencies>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ Modifications Copyright © 2018 IBM.
- ~
- ~ Modifications Copyright © 2019 IBM, 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>modules</artifactId>
- <version>0.6.1-SNAPSHOT</version>
- </parent>
- <artifactId>service</artifactId>
- <name>Controller Blueprints Service</name>
-
- <properties>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jetbrains.kotlinx</groupId>
- <artifactId>kotlinx-coroutines-reactor</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>blueprint-validation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- </dependency>
- <dependency>
- <groupId>com.hubspot.jinjava</groupId>
- <artifactId>jinjava</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.mariadb.jdbc</groupId>
- <artifactId>mariadb-java-client</artifactId>
- </dependency>
- </dependencies>
-</project>
+++ /dev/null
-/*
- * 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<String, Path> getPaths() {
- Map<String, Path> 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<Parameter> 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<String, Response> 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<String, Model> getDefinition() {
- Map<String, Model> 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<Property> 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;
- }
-
-
-}
+++ /dev/null
-/*
- * 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 <T> propertyBeanType(prefix: String, type: Class<T>): T {
- return bluePrintDesignerPropertyBinder.bind(prefix, Bindable.of(type)).get()
- }
-}
\ No newline at end of file
+++ /dev/null
-{\r
- "version": "1.0.0",\r
- "metadata": {\r
- "template_author": "xxxx@onap.com",\r
- "template_name": "default_netconf",\r
- "template_version": "1.0.0",\r
- "service-type": "XXXXXXXXXXX",\r
- "vnf-type": "XXXXXXXXX"\r
- },\r
- "topology_template": {\r
- "inputs": {\r
- "request-id": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "template-name": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "template-version": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "action-name": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "service-instance-id": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "resource-type": {\r
- "required": true,\r
- "type": "string"\r
- }\r
- },\r
- "node_templates": {\r
- "base-config-template": {\r
- "type": "artifact-config-template",\r
- "properties": {\r
- "action-names": [\r
- "resource-assignment-action"\r
- ]\r
- },\r
- "capabilities": {\r
- "content": {\r
- "properties": {\r
- "content": ""\r
- }\r
- },\r
- "mapping": {\r
- "properties": {\r
- "mapping": []\r
- }\r
- }\r
- }\r
- },\r
- "licence-template": {\r
- "type": "artifact-config-template",\r
- "properties": {\r
- "action-names": [\r
- "activate-netconf-action"\r
- ]\r
- },\r
- "capabilities": {\r
- "content": {\r
- "properties": {\r
- "content": ""\r
- }\r
- },\r
- "mapping": {\r
- "properties": {\r
- "mapping": []\r
- }\r
- }\r
- }\r
- },\r
- "runningconfig-template": {\r
- "type": "artifact-config-template",\r
- "properties": {\r
- "action-names": [\r
- "activate-netconf-action"\r
- ]\r
- },\r
- "capabilities": {\r
- "content": {\r
- "properties": {\r
- "content": "<get-config><source><running/></source></get-config>"\r
- }\r
- },\r
- "mapping": {\r
- "properties": {\r
- "mapping": []\r
- }\r
- }\r
- }\r
- },\r
- "resource-assignment-action": {\r
- "type": "dg-resource-assignment",\r
- "interfaces": {\r
- "CONFIG": {\r
- "operations": {\r
- "ResourceAssignment": {\r
- \r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "dg-node": {\r
- \r
- }\r
- },\r
- "requirements": {\r
- "component-dependency": {\r
- "capability": "component-node",\r
- "node": "get-resource-assignment",\r
- "relationship": "tosca.relationships.DependsOn"\r
- }\r
- }\r
- },\r
- "activate-netconf-action": {\r
- "type": "dg-activate-netconf",\r
- "interfaces": {\r
- "CONFIG": {\r
- "operations": {\r
- "ActivateNetconf": {\r
- \r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "dg-node": {\r
- \r
- }\r
- },\r
- "requirements": {\r
- "component-dependency": {\r
- "capability": "component-node",\r
- "node": "transaction-netconf-baseconfig",\r
- "relationship": "tosca.relationships.DependsOn"\r
- }\r
- }\r
- },\r
- "resource-assignment": {\r
- "type": "component-resource-assignment",\r
- "interfaces": {\r
- "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "resource-type": "vnf-type",\r
- "template-names": [\r
- "base-config-template",\r
- "licence-template"\r
- ],\r
- "request-id": { "get_input" : "request-id" },\r
- "resource-id": { "get_input" : "vnf-id" }\r
- },\r
- "outputs": {\r
- "resource-assignment-params": "",\r
- "status": ""\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "component-node": {\r
- \r
- }\r
- }\r
- },\r
- "edit-netconf-config": {\r
- "type": "component-netconf-edit",\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfEditConfigNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rpc-message": false,\r
- "wait": 0,\r
- "unlock": false,\r
- "config-target": "RUNNING",\r
- "commit": true,\r
- "edit-default-operation": "repalce",\r
- "lock": false,\r
- "post-restart-wait": false,\r
- "pre-restart-wait": false\r
- },\r
- "outputs": {\r
- "rpc-response-message": "",\r
- "status": ""\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "component-node": {\r
- \r
- }\r
- }\r
- },\r
- "transaction-netconf-baseconfig": {\r
- "type": "component-transaction-netconf",\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-NetconfTransactionNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rollback": false,\r
- "transaction-templates": [\r
- "runningconfig-template"\r
- ],\r
- "assignment-action-name": "resource-assignment-action",\r
- "transaction-components": [\r
- "get-netconf-config"\r
- ],\r
- "resource-type": "vnf-type",\r
- "initialise-sftp": false,\r
- "request-id": {"get_input" : "request-id"},\r
- "initialise-ssh": false,\r
- "resource-id": { "get_input" : "vnf-id" },\r
- "action-name": {"get_input" : "action-name"}\r
- },\r
- "outputs": {\r
- "rpc-response-message": "",\r
- "status": ""\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "component-node": {\r
- \r
- }\r
- },\r
- "requirements": {\r
- "netconf-connection": {\r
- "capability": "netconf",\r
- "node": "vdbe-netconf-device",\r
- "relationship": "tosca.relationships.ConnectsTo"\r
- }\r
- }\r
- },\r
- "get-netconf-config": {\r
- "type": "component-netconf-get",\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfGetConfigNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rpc-message": true,\r
- "wait": 1,\r
- "message-time-out": 10\r
- },\r
- "outputs": {\r
- "rpc-response-message": "",\r
- "status": ""\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "component-node": {\r
- \r
- }\r
- }\r
- }\r
- }\r
- },\r
- "node_types": {\r
- "vnf-netconf-device": {\r
- "description": "This is VNF Device with Netconf and SSH Capability",\r
- "version": "1.0.0",\r
- "capabilities": {\r
- "netconf": {\r
- "type": "tosca.capabilities.Netconf",\r
- "properties": {\r
- "password": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "user-id": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "host-ip-address": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "port-number": {\r
- "required": true,\r
- "type": "integer",\r
- "default": 830\r
- },\r
- "message-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 3000\r
- },\r
- "connection-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 30\r
- }\r
- }\r
- },\r
- "ssh": {\r
- "type": "tosca.capabilities.Ssh",\r
- "properties": {\r
- "password": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "user-id": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "host-ip-address": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "port-number": {\r
- "required": true,\r
- "type": "integer",\r
- "default": 22\r
- },\r
- "message-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 180\r
- },\r
- "connection-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 30\r
- }\r
- }\r
- },\r
- "sftp": {\r
- "type": "tosca.capabilities.Sftp",\r
- "properties": {\r
- "password": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "user-id": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "host-ip-address": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "port-number": {\r
- "required": true,\r
- "type": "integer",\r
- "default": 22\r
- },\r
- "message-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 180\r
- },\r
- "connection-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 30\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Vnf"\r
- },\r
- "dg-resource-assignment": {\r
- "description": "This is Resource Assignment Directed Graph",\r
- "version": "1.0.0",\r
- "properties": {\r
- "mode": {\r
- "required": false,\r
- "type": "string",\r
- "default": "sync"\r
- },\r
- "version": {\r
- "required": false,\r
- "type": "string",\r
- "default": "LATEST"\r
- },\r
- "is-start-flow": {\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- }\r
- },\r
- "capabilities": {\r
- "dg-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "requirements": {\r
- "component-dependency": {\r
- "capability": "component-node",\r
- "node": "component-resource-assignment",\r
- "relationship": "tosca.relationships.DependsOn"\r
- }\r
- },\r
- "interfaces": {\r
- "CONFIG": {\r
- "operations": {\r
- "ResourceAssignment": {\r
- "inputs": {\r
- "params": {\r
- "required": false,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "datatype-property"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Workflow"\r
- },\r
- "dg-activate-netconf": {\r
- "description": "This is Download Netconf Directed Graph",\r
- "version": "1.0.0",\r
- "properties": {\r
- "mode": {\r
- "required": false,\r
- "type": "string",\r
- "default": "sync"\r
- },\r
- "version": {\r
- "required": false,\r
- "type": "string",\r
- "default": "LATEST"\r
- },\r
- "is-start-flow": {\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- }\r
- },\r
- "capabilities": {\r
- "dg-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "requirements": {\r
- "component-dependency": {\r
- "capability": "component-node",\r
- "node": "component-transaction-netconf",\r
- "relationship": "tosca.relationships.DependsOn"\r
- }\r
- },\r
- "interfaces": {\r
- "CONFIG": {\r
- "operations": {\r
- "ActivateNetconf": {\r
- "inputs": {\r
- "params": {\r
- "required": false,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "datatype-property"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Workflow"\r
- },\r
- "artifact-config-template": {\r
- "description": "This is Configuration Velocity Template",\r
- "version": "1.0.0",\r
- "properties": {\r
- "action-names": {\r
- "required": true,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "string"\r
- }\r
- }\r
- },\r
- "capabilities": {\r
- "content": {\r
- "type": "tosca.capabilities.Content",\r
- "properties": {\r
- "content": {\r
- "required": true,\r
- "type": "string"\r
- }\r
- }\r
- },\r
- "mapping": {\r
- "type": "tosca.capabilities.Mapping",\r
- "properties": {\r
- "mapping": {\r
- "required": false,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "datatype-resource-assignment"\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Artifact"\r
- },\r
- "component-resource-assignment": {\r
- "description": "This is Resource Assignment Component API",\r
- "version": "1.0.0",\r
- "capabilities": {\r
- "component-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "interfaces": {\r
- "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "handler-name": {\r
- "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.",\r
- "required": true,\r
- "type": "string"\r
- },\r
- "resource-type": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "template-names": {\r
- "description": "Name of the Artifact Node Templates, to get the template Content.",\r
- "required": true,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "string"\r
- }\r
- },\r
- "request-id": {\r
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",\r
- "required": true,\r
- "type": "string"\r
- },\r
- "resource-id": {\r
- "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",\r
- "required": true,\r
- "type": "string"\r
- },\r
- "action-name": {\r
- "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",\r
- "required": false,\r
- "type": "string"\r
- }\r
- },\r
- "outputs": {\r
- "resource-assignment-params": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "status": {\r
- "required": true,\r
- "type": "string"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Component"\r
- },\r
- "component-netconf-get": {\r
- "description": "This is Netconf Get Running Configuration Component API",\r
- "version": "1.0.0",\r
- "capabilities": {\r
- "component-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfGetConfigNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rpc-message": {\r
- "description": "It should be true, If the message is Neconf RPC message, It should be false If it is plain Config message.",\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- },\r
- "wait": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 0\r
- },\r
- "message-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 30\r
- }\r
- },\r
- "outputs": {\r
- "config-message": {\r
- "type": "string"\r
- },\r
- "status": {\r
- "description": "Status of the Component Execution ( success or failure )",\r
- "required": true,\r
- "type": "string"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Component"\r
- },\r
- "component-netconf-edit": {\r
- "description": "This is Netconf Edit Configuration Component API",\r
- "version": "1.0.0",\r
- "capabilities": {\r
- "component-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfEditConfigNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rpc-message": {\r
- "description": "If the message is Neconf RPC message,It should be true or false.",\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- },\r
- "wait": {\r
- "description": "Delay time in sec before performing edit-config action.",\r
- "required": false,\r
- "type": "integer",\r
- "default": 0\r
- },\r
- "unlock": {\r
- "description": "If unLock command has to send before Edit Configuration.",\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- },\r
- "config-target": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "commit": {\r
- "description": "Issue commit command to the device after performing edit-config action.",\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- },\r
- "edit-default-operation": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "lock": {\r
- "description": "Issue lock command to the device before performing edit-config action.",\r
- "required": false,\r
- "type": "boolean",\r
- "default": false\r
- },\r
- "post-restart-wait": {\r
- "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 ",\r
- "required": false,\r
- "type": "integer",\r
- "default": 0\r
- },\r
- "pre-restart-wait": {\r
- "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 ",\r
- "required": false,\r
- "type": "integer",\r
- "default": 0\r
- },\r
- "message-time-out": {\r
- "required": false,\r
- "type": "integer",\r
- "default": 30\r
- }\r
- },\r
- "outputs": {\r
- "rpc-response-message": {\r
- "type": "string"\r
- },\r
- "status": {\r
- "description": "Status of the Component Execution ( success or failure )",\r
- "required": true,\r
- "type": "string"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Component"\r
- },\r
- "component-transaction-netconf": {\r
- "description": "This is Netconf Transaction Configuration Component API",\r
- "version": "1.0.0",\r
- "capabilities": {\r
- "component-node": {\r
- "type": "tosca.capabilities.Node"\r
- }\r
- },\r
- "requirements": {\r
- "netconf-connection": {\r
- "capability": "netconf",\r
- "node": "vnf-netconf-device",\r
- "relationship": "tosca.relationships.ConnectsTo"\r
- }\r
- },\r
- "interfaces": {\r
- "org-openecomp-sdnc-netconf-adaptor-service-NetconfTransactionNode": {\r
- "operations": {\r
- "process": {\r
- "inputs": {\r
- "rollback": {\r
- "required": false,\r
- "type": "boolean"\r
- },\r
- "transaction-templates": {\r
- "description": "Templates used by the Transaction Components during processing",\r
- "required": true,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "string"\r
- }\r
- },\r
- "assignment-action-name": {\r
- "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",\r
- "required": true,\r
- "type": "string"\r
- },\r
- "transaction-components": {\r
- "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",\r
- "required": true,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "string"\r
- }\r
- },\r
- "resource-type": {\r
- "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",\r
- "required": false,\r
- "type": "string"\r
- },\r
- "initialise-sftp": {\r
- "required": false,\r
- "type": "boolean"\r
- },\r
- "request-id": {\r
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",\r
- "required": true,\r
- "type": "string"\r
- },\r
- "initialise-ssh": {\r
- "required": false,\r
- "type": "boolean"\r
- },\r
- "resource-id": {\r
- "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",\r
- "required": false,\r
- "type": "string"\r
- },\r
- "action-name": {\r
- "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",\r
- "required": false,\r
- "type": "string"\r
- }\r
- },\r
- "outputs": {\r
- "rpc-response-message": {\r
- "type": "string"\r
- },\r
- "status": {\r
- "description": "Status of the Component Execution ( success or failure )",\r
- "required": true,\r
- "type": "string"\r
- }\r
- }\r
- }\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.nodes.Component"\r
- }\r
- },\r
- "data_types": {\r
- "datatype-resource-assignment": {\r
- "version": "1.0.0",\r
- "description": "This is Resource Assignment Data Type",\r
- "properties": {\r
- "property": {\r
- "required": true,\r
- "type": "datatype-property"\r
- },\r
- "input-param": {\r
- "required": true,\r
- "type": "boolean"\r
- },\r
- "dictionary-name": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "dictionary-source": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "dependencies": {\r
- "required": true,\r
- "type": "list",\r
- "entry_schema": {\r
- "type": "string"\r
- }\r
- }\r
- },\r
- "derived_from": "tosca.datatypes.Root"\r
- },\r
- "datatype-property": {\r
- "version": "1.0.0",\r
- "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",\r
- "properties": {\r
- "type": {\r
- "required": true,\r
- "type": "string"\r
- },\r
- "description": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "required": {\r
- "required": false,\r
- "type": "boolean"\r
- },\r
- "default": {\r
- "required": false,\r
- "type": "string"\r
- },\r
- "entry_schema": {\r
- "required": false,\r
- "type": "string"\r
- }\r
- },\r
- "derived_from": "tosca.datatypes.Root"\r
- }\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
--- drop table sdnctl.MODEL_TYPE;\r
--- drop table sdnctl.RESOURCE_DICTIONARY;\r
--- drop table sdnctl.CONFIG_MODEL_CONTENT;\r
--- drop table sdnctl.CONFIG_MODEL;\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL (\r
- config_model_id VARCHAR(100) NOT NULL,\r
- service_uuid VARCHAR(50) NULL DEFAULT NULL,\r
- distribution_id VARCHAR(50) NULL DEFAULT NULL,\r
- service_name VARCHAR(255) NULL DEFAULT NULL,\r
- service_description VARCHAR(255) NULL DEFAULT NULL,\r
- resource_uuid VARCHAR(255) NULL DEFAULT NULL,\r
- resource_instance_name VARCHAR(255) NULL DEFAULT NULL,\r
- resource_name varchar(255) null default null,\r
- resource_version varchar(50) null default null,\r
- resource_type varchar(50) null default null,\r
- artifact_uuid varchar(50) null default null,\r
- artifact_type varchar(50) not null,\r
- artifact_version varchar(25) not null,\r
- artifact_description longtext null default null,\r
- internal_version int(11) null default null,\r
- creation_date datetime not null default current_timestamp,\r
- artifact_name varchar(100) not null,\r
- published varchar(1) not null,\r
- updated_by varchar(100) not null,\r
- tags longtext null default null,\r
- primary key PK_CONFIG_MODEL (config_model_id),\r
- UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL_CONTENT\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.CONFIG_MODEL_CONTENT (\r
- config_model_content_id VARCHAR(100) NOT NULL,\r
- config_model_id INT NOT NULL,\r
- name VARCHAR(100) NOT NULL,\r
- content_type VARCHAR(50) NOT NULL,\r
- description LONGTEXT NULL DEFAULT NULL,\r
- updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- content LONGTEXT NULL DEFAULT NULL,\r
- PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),\r
- UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),\r
- FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES sdnctl.CONFIG_MODEL(config_model_id) ON DELETE CASCADE\r
-) ENGINE=InnoDB;\r
-\r
--- -----------------------------------------------------\r
--- table MODEL_TYPE\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.MODEL_TYPE (\r
- model_name VARCHAR(100) NOT NULL,\r
- derived_from VARCHAR(100) NOT NULL,\r
- definition_type VARCHAR(100) NOT NULL,\r
- definition LONGTEXT NOT NULL,\r
- version VARCHAR(10) NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NULL DEFAULT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- PRIMARY KEY PK_MODEL_TYPE (model_name),\r
- INDEX IX_MODEL_TYPE (model_name)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table RESOURCE_DICTIONARY\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS sdnctl.RESOURCE_DICTIONARY (\r
- name VARCHAR(100) NOT NULL,\r
- data_type VARCHAR(100) NOT NULL,\r
- entry_schema VARCHAR(100) NULL DEFAULT NULL,\r
- definition LONGTEXT NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NOT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- primary key PK_RESOURCE_DICTIONARY (name),\r
- INDEX IX_RESOURCE_DICTIONARY (name)\r
-) ENGINE=InnoDB;
\ No newline at end of file
+++ /dev/null
--- -----------------------------------------------------\r
--- table CONFIG_MODEL\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL (\r
- config_model_id VARCHAR(100) NOT NULL,\r
- service_uuid VARCHAR(50) NULL DEFAULT NULL,\r
- distribution_id VARCHAR(50) NULL DEFAULT NULL,\r
- service_name VARCHAR(255) NULL DEFAULT NULL,\r
- service_description VARCHAR(255) NULL DEFAULT NULL,\r
- resource_uuid VARCHAR(255) NULL DEFAULT NULL,\r
- resource_instance_name VARCHAR(255) NULL DEFAULT NULL,\r
- resource_name varchar(255) null default null,\r
- resource_version varchar(50) null default null,\r
- resource_type varchar(50) null default null,\r
- artifact_uuid varchar(50) null default null,\r
- artifact_type varchar(50) not null,\r
- artifact_version varchar(25) not null,\r
- artifact_description longtext null default null,\r
- internal_version int(11) null default null,\r
- creation_date datetime not null default current_timestamp,\r
- artifact_name varchar(100) not null,\r
- published varchar(1) not null,\r
- updated_by varchar(100) not null,\r
- tags longtext null default null,\r
- primary key PK_CONFIG_MODEL (config_model_id),\r
- UNIQUE KEY UK_CONFIG_MODEL (artifact_name , artifact_version)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table CONFIG_MODEL_CONTENT\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.CONFIG_MODEL_CONTENT (\r
- config_model_content_id VARCHAR(100) NOT NULL,\r
- config_model_id INT NOT NULL,\r
- name VARCHAR(100) NOT NULL,\r
- content_type VARCHAR(50) NOT NULL,\r
- description LONGTEXT NULL DEFAULT NULL,\r
- updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- content LONGTEXT NULL DEFAULT NULL,\r
- PRIMARY KEY PK_CONFIG_MODEL_CONTENT (config_model_content_id),\r
- UNIQUE KEY UK_CONFIG_MODEL_CONTENT (config_model_id, name, content_type),\r
- FOREIGN KEY FK_CONFIG_MODEL_CONTENT (config_model_id) REFERENCES configurator.CONFIG_MODEL(config_model_id) ON DELETE CASCADE\r
-) ENGINE=InnoDB;\r
-\r
--- -----------------------------------------------------\r
--- table MODEL_TYPE\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.MODEL_TYPE (\r
- model_name VARCHAR(100) NOT NULL,\r
- derived_from VARCHAR(100) NOT NULL,\r
- definition_type VARCHAR(100) NOT NULL,\r
- definition LONGTEXT NOT NULL,\r
- version VARCHAR(10) NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NULL DEFAULT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- PRIMARY KEY PK_MODEL_TYPE (model_name),\r
- INDEX IX_MODEL_TYPE (model_name)\r
-) ENGINE=InnoDB;\r
-\r
-\r
--- -----------------------------------------------------\r
--- table RESOURCE_DICTIONARY\r
--- -----------------------------------------------------\r
-CREATE TABLE IF NOT EXISTS configurator.RESOURCE_DICTIONARY (\r
- name VARCHAR(100) NOT NULL,\r
- data_type VARCHAR(100) NOT NULL,\r
- entry_schema VARCHAR(100) NULL DEFAULT NULL,\r
- definition LONGTEXT NOT NULL,\r
- description LONGTEXT NOT NULL,\r
- tags LONGTEXT NOT NULL, \r
- creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\r
- updated_by VARCHAR(100) NOT NULL,\r
- primary key PK_RESOURCE_DICTIONARY (name),\r
- INDEX IX_RESOURCE_DICTIONARY (name)\r
-) ENGINE=InnoDB;\r
+++ /dev/null
-/*
- * 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;
- }
-
-}
+++ /dev/null
-/*
- * 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
+++ /dev/null
-#
-# 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
+++ /dev/null
-<!--
- ~ Copyright © 2018 IBM.
- ~ Modifications 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.
- -->
-
-<configuration>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.springframework.web" level="warn"/>
- <logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints.core" level="warn"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
<artifactId>blueprint-validation</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>service</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
- <artifactId>application</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- Testing Dependencies -->
<dependency>
<modules>
<module>parent</module>
<module>modules</module>
- <module>application</module>
- <module>distribution</module>
</modules>
</project>