# Node.js
+**/node
+
# Logs
logs
*.log
# DynamoDB Local files
.dynamodb/
+
+# Added for Intellij IDEA IDE
+**/*.ipr
+**/*.iws
+**/debug-logs/*
+**/.idea/*
+**/*.iml
+**/*.project
+**/.springBeans
+
+# Target dirs in all projects
+**/target-ide/*
+**/target/*
+**/logs/*
+**/tokens/*
+
+# Public site
+*/**/package-lock.json
+cds-ui/server/public
+
+# Python generated class
+**/*py.class
+
+MacOS
+**/.DS_Store
+
+# To Remove Kotlin Script Generated Jars
+**/*cba-kts.jar
*
*/
-package org.onap.ccsdk.distribution
+package org.onap.ccsdk.cds
def versionArray;
--- /dev/null
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software 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.
+============LICENSE_END============================================ -->
+
+<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</groupId>
+ <artifactId>ui</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>application</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>cds-ui-application</name>
+
+ <properties>
+ <image.name>onap/ccsdk-cds-ui</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+ <docker.verbose>true</docker.verbose>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>../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.28.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>..</dockerFileDir>
+ <tags>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
============LICENSE_END============================================ -->
<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</groupId>
- <artifactId>controller-design-studio</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
-
+ 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</groupId>
- <artifactId>controller-design-studio-client</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>cds-ui</name>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <npm.executable>npm</npm.executable>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
- </properties>
-
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
- <version>1.3</version>
- <configuration>
- <nodeVersion>v8.12.0</nodeVersion>
- <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
- <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
- <installDirectory>./</installDirectory>
- </configuration>
- <executions>
- <execution>
- <id>install node and npm</id>
- <goals>
- <goal>install-node-and-npm</goal>
- </goals>
- <phase>generate-resources</phase>
- </execution>
-
- <execution>
- <id>npm install</id>
- <goals>
- <goal>npm</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>install</arguments>
- </configuration>
- </execution>
-
- <execution>
- <id>npm build</id>
- <goals>
- <goal>npm</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>run build</arguments>
- </configuration>
- </execution>
-
- </executions>
- </plugin>
- </plugins>
- </build>
+ <artifactId>ui</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>ui-client</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>cds-ui-client</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <npm.executable>npm</npm.executable>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+ </properties>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+ <version>1.3</version>
+ <configuration>
+ <nodeVersion>v8.12.0</nodeVersion>
+ <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+ <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
+ <installDirectory>./</installDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <phase>generate-resources</phase>
+
+ <configuration>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm build</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <phase>generate-resources</phase>
+
+ <configuration>
+ <arguments>run build</arguments>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
<div class="container">
<div class="fileViewContainer">
+ <!-- <div style="width:inherit; height: inherit; position: fixed;z-index: 1; background-color: rgb(0,0,0);background-color: rgba(0,0,0,0.4);"></div> -->
+ <div style="display: flex;">
+ <div>
+ <i class="fa fa-folder" aria-hidden="true" style="color:#3f51b5; font-size: 20px;margin: 3px; cursor: pointer;" (click)="enableNameInputEl('createFolder')"></i>
+ <i class="fa fa-file" aria-hidden="true" style="color:#3f51b5; font-size: 18px; margin: 3px; cursor: pointer;" (click)="enableNameInputEl('createFile')"></i>
+ <i class="fa fa-trash" aria-hidden="true" style="color:#3f51b5; font-size: 20px; margin: 3px; cursor: pointer;" (click)="deleteFolderOrFile('deleteFile')"></i>
+ </div>
+ <div>
+ <input *ngIf="isNameTextboxEnablled" type="text" (focusout)="createFolderOrFile($event)"/>
+ </div>
+ </div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" style="background-color: #ebebeb">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)="selectFileToView(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
<button mat-icon-button disabled></button>
<button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
</mat-tree-node>
- <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
+ <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
<button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
- <button mat-icon-button>{{node.name}}</button>
+ <button mat-icon-button (click)="selectFolder(node)">{{node.name}}</button>
</mat-tree-node>
</mat-tree>
</div>
}
.background-highlight {
- background-color: whitesmoke !important;
+ background-color: #3f51b5 !important;
+ color: white !important;
}
\ No newline at end of file
mode: string;
private zipFile: JSZip = new JSZip();
activeNode: any;
+ selectedFolder: string;
+ activationBlueprint: string;
+ isNameTextboxEnablled : boolean = false;
+ fileAction : string;
+ filetoDelete : string;
private transformer = (node: Node, level: number) => {
return {
updateBlueprint() {
console.log(this.blueprint);
this.filesData.forEach(fileNode => {
- if (fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
+ if (this.selectedFile && fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
fileNode.data = this.text;
- } else if (fileNode.name.includes(this.selectedFile.trim())) {
+ } else if (this.selectedFile && fileNode.name.includes(this.selectedFile.trim())) {
fileNode.data = this.text;
}
});
- if (this.selectedFile == this.blueprintName.trim()) {
+ if (this.selectedFile && this.selectedFile == this.blueprintName.trim()) {
this.blueprint = JSON.parse(this.text);
} else {
this.blueprint = this.blueprintdata;
selectFileToView(file) {
this.selectedFile = file.name;
+ this.filetoDelete = file.name;
this.filesData.forEach((fileNode) => {
if (fileNode.name.includes(file.name)) {
this.text = fileNode.data;
this.mode = 'json';
}
}
+
+ selectFolder(node) {
+ this.selectedFolder = node.name;
+ this.filetoDelete = node.name;
+ console.log(node);
+ // this.createFolderOrFile(node.name, 'folder');
+ }
+
+ createFolderOrFile(name) {
+ let newFilesData: [any] = this.filesData;
+ let newFileNode = {
+ name: '',
+ data: ''
+ }
+ let newFileNode1 = {
+ name: '',
+ data: ''
+ }
+ for(let i=0; i< this.filesData.length; i++) {
+ if (this.filesData[i].name.includes(this.selectedFolder)) {
+ if(this.fileAction == 'createFolder') {
+ newFileNode.name = this.filesData[i].name + name.srcElement.value + '/';
+ newFileNode.data = '';
+
+ newFileNode1.name = this.filesData[i].name + name.srcElement.value + '/README.md'
+ newFileNode1.data = name.srcElement.value + ' Folder';
+ } else {
+ newFileNode.name = this.filesData[i].name + name.srcElement.value;
+ newFileNode.data = '';
+ }
+ break;
+ }
+ }
+
+ this.filesData.splice(this.findIndexForNewNode()+1, 0, newFileNode);
+ this.filesData.splice(this.findIndexForNewNode()+1, 0, newFileNode1);
+ this.arrangeTreeData(this.filesData);
+ }
+
+ findIndexForNewNode() {
+ let indexForNewNode;
+ for(let i=0; i< this.filesData.length; i++) {
+ if (this.filesData[i].name.includes(this.selectedFolder)) {
+ indexForNewNode = i;
+ }
+ }
+ return indexForNewNode;
+ }
+
+ arrangeTreeData(paths) {
+ const tree = [];
+
+ paths.forEach((path) => {
+
+ const pathParts = path.name.split('/');
+ // pathParts.shift();
+ let currentLevel = tree;
+
+ pathParts.forEach((part) => {
+ const existingPath = currentLevel.filter(level => level.name === part);
+
+ if (existingPath.length > 0) {
+ currentLevel = existingPath[0].children;
+ } else {
+ const newPart = {
+ name: part,
+ children: [],
+ data: path.data,
+ path : path.name
+ };
+ if(part.trim() == this.blueprintName.trim()) {
+ this.activationBlueprint = path.data;
+ newPart.data = JSON.parse(this.activationBlueprint.toString());
+ console.log('newpart', newPart);
+ }
+ if(newPart.name !== '') {
+ currentLevel.push(newPart);
+ currentLevel = newPart.children;
+ }
+ }
+ });
+ });
+ this.dataSource.data = tree;
+ this.filesTree = tree;
+ this.isNameTextboxEnablled = false;
+ this.updateBlueprint();
+ }
+
+ enableNameInputEl(action) {
+ this.fileAction = action;
+ if (action == 'createFolder' || action == 'createFile') {
+ this.isNameTextboxEnablled = true;
+ }
+ }
+
+ deleteFolderOrFile(action) {
+ for(let i=0;i< this.filesData.length ; i++) {
+ if(this.filesData[i].name.includes(this.filetoDelete.trim())) {
+ this.filesData.splice(i, 1);
+ i = i-1;
+ }
+ }
+ this.arrangeTreeData(this.filesData);
+ }
}
--- /dev/null
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software 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.
+============LICENSE_END============================================ -->
+
+<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.parent</groupId>
+ <artifactId>spring-boot-starter-parent</artifactId>
+ <version>1.2.1-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>ui</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>cds-ui-parent</name>
+ <description>Creates Controller Design Studio UI Docker container</description>
+
+ <properties>
+ <image.name>onap/ccsdk-cds-ui</image.name>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+ <docker.verbose>true</docker.verbose>
+ </properties>
+
+ <modules>
+ <module>client</module>
+ <module>server</module>
+ <module>application</module>
+ </modules>
+
+</project>
\ No newline at end of file
============LICENSE_END============================================ -->
<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">
+ 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</groupId>
- <artifactId>controller-design-studio</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../..</relativePath>
+ <artifactId>ui</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
-
- <groupId>org.onap.ccsdk.cds.server</groupId>
- <artifactId>controller-design-studio-server</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+
+ <artifactId>ui-server</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>cds-ui-server</name>
<onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
</properties>
-
-
<build>
<plugins>
<plugin>
<!--
============LICENSE_START==========================================
===================================================================
-Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
===================================================================
Unless otherwise specified, all software contained herein is licensed
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.
-============LICENSE_END============================================ -->
+============LICENSE_END============================================
+-->
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>CdsUi</title>
+ <base href="/">
+
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
+</head>
+<body>
+ <app-root></app-root>
+<script type="text/javascript" src="runtime.js"></script><script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="styles.js"></script><script type="text/javascript" src="scripts.js"></script><script type="text/javascript" src="vendor.js"></script><script type="text/javascript" src="main.js"></script></body>
+</html>
* limitations under the License.
*/
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
open class ScriptResourceAssignmentProcessor : ResourceAssignmentProcessor() {
* limitations under the License.
*/
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
open class SampleKotlinComponent : BlueprintFunctionNode<String, String> {
from common import ResolutionHelper
from java.lang import Exception as JavaException
from netconfclient import NetconfClient
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \
NetconfComponentFunction
* limitations under the License.
*/
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
open class ScriptResourceAssignmentProcessor : ResourceAssignmentProcessor() {
* limitations under the License.
*/
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
open class SampleKotlinComponent : BlueprintFunctionNode<String, String> {
from netconfclient import NetconfClient
from java.lang import Exception
from abstract_blueprint_function import AbstractPythonComponentFunction
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import NetconfRpcService
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import NetconfRpcService
# ============LICENSE_END=========================================================
from time import sleep
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor import \
RestconfComponentFunction
from java.lang import Exception as JavaException
from common import ResolutionHelper
from java.lang import Exception as JavaException
from netconfclient import NetconfClient
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \
NetconfComponentFunction
from common import ResolutionHelper
from java.lang import Exception as JavaException
from netconfclient import NetconfClient
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \
NetconfComponentFunction
"type": "string"\r
},\r
"mask-info": {\r
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.apps.controllerblueprints.core.data.custom.MaskInfo ",\r
+ "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.cds.controllerblueprints.core.data.custom.MaskInfo ",\r
"required": false,\r
"type": "string"\r
},\r
<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.apps</groupId>
- <artifactId>ccsdk-apps</artifactId>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../../../</relativePath>
</parent>
- <groupId>org.onap.ccsdk.apps.components</groupId>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
<artifactId>proto-definition</artifactId>
<packaging>jar</packaging>
syntax = "proto3";
option java_multiple_files = true;
-package org.onap.ccsdk.apps.controllerblueprints.common.api;
+package org.onap.ccsdk.cds.controllerblueprints.common.api;
message CommonHeader {
string timestamp = 1;
syntax = "proto3";
import "BluePrintCommon.proto";
option java_multiple_files = true;
-package org.onap.ccsdk.apps.controllerblueprints.management.api;
+package org.onap.ccsdk.cds.controllerblueprints.management.api;
message BluePrintManagementInput {
- org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
string blueprintName = 2;
string blueprintVersion = 3;
FileChunk fileChunk = 4;
}
message BluePrintManagementOutput {
- org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
- org.onap.ccsdk.apps.controllerblueprints.common.api.Status status = 3;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.Status status = 3;
}
message FileChunk {
import "google/protobuf/struct.proto";
import "BluePrintCommon.proto";
option java_multiple_files = true;
-package org.onap.ccsdk.apps.controllerblueprints.processing.api;
+package org.onap.ccsdk.cds.controllerblueprints.processing.api;
message ExecutionServiceInput {
- org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
- org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
google.protobuf.Struct payload = 3;
}
message ExecutionServiceOutput {
- org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
- org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
- org.onap.ccsdk.apps.controllerblueprints.common.api.Status status = 3;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
+ org.onap.ccsdk.cds.controllerblueprints.common.api.Status status = 3;
google.protobuf.Struct payload = 4;
}
<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.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<artifactId>components</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
- <groupId>org.onap.ccsdk.apps.components</groupId>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
<artifactId>parent</artifactId>
<name>Components Parent</name>
<packaging>pom</packaging>
-->
<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/maven-v4_0_0.xsd">
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>ccsdk-apps</artifactId>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
-from org.onap.ccsdk.apps.blueprintsprocessor.services.execution import AbstractComponentFunction
+from org.onap.ccsdk.cds.blueprintsprocessor.services.execution import AbstractComponentFunction
class AbstractPythonComponentFunction(AbstractComponentFunction):
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor import \
ResourceAssignmentProcessor
-from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils import \
+from org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils import \
ResourceAssignmentUtils
-from org.onap.ccsdk.apps.controllerblueprints.core import \
+from org.onap.ccsdk.cds.controllerblueprints.core import \
BluePrintProcessorException
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
<!-- North Bound -->
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>resource-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>python-executor</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>netconf-executor</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>restconf-executor</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>selfservice-api</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor;
+package org.onap.ccsdk.cds.blueprintsprocessor;
import io.grpc.Server;
import io.grpc.ServerBuilder;
-import org.onap.ccsdk.apps.blueprintsprocessor.security.BasicAuthServerInterceptor;
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.BluePrintManagementGRPCHandler;
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.BluePrintProcessingGRPCHandler;
+import org.onap.ccsdk.cds.blueprintsprocessor.security.BasicAuthServerInterceptor;
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.BluePrintManagementGRPCHandler;
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.BluePrintProcessingGRPCHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor;
+package org.onap.ccsdk.cds.blueprintsprocessor;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
-/*\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.apps.blueprintsprocessor;\r
-\r
-import org.springframework.boot.SpringApplication;\r
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r
-import org.springframework.boot.autoconfigure.SpringBootApplication;\r
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;\r
-import org.springframework.context.annotation.ComponentScan;\r
-\r
-/**\r
- * BlueprintProcessorApplication\r
- *\r
- * @author Brinda Santh 8/14/2018\r
- */\r
-@SpringBootApplication\r
-@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})\r
-@ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints",\r
- "org.onap.ccsdk.apps.blueprintsprocessor"})\r
-public class BlueprintProcessorApplication {\r
-\r
- public static void main(String[] args) {\r
- SpringApplication.run(BlueprintProcessorApplication.class, args);\r
- }\r
-}\r
+/*
+ * 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.blueprintsprocessor;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+/**
+ * BlueprintProcessorApplication
+ *
+ * @author Brinda Santh 8/14/2018
+ */
+@SpringBootApplication
+@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
+@ComponentScan(basePackages = {"org.onap.ccsdk.cds.controllerblueprints",
+ "org.onap.ccsdk.cds.blueprintsprocessor"})
+public class BlueprintProcessorApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(BlueprintProcessorApplication.class, args);
+ }
+}
-/*\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
-\r
-package org.onap.ccsdk.apps.blueprintsprocessor;\r
-\r
-\r
-import org.springframework.context.annotation.Bean;\r
-import springfox.documentation.builders.PathSelectors;\r
-import springfox.documentation.builders.RequestHandlerSelectors;\r
-import springfox.documentation.service.ApiInfo;\r
-import springfox.documentation.service.Contact;\r
-import springfox.documentation.spi.DocumentationType;\r
-import springfox.documentation.spring.web.plugins.Docket;\r
-\r
-import java.util.Collections;\r
-\r
-/**\r
- * SwaggerConfig\r
- *\r
- * @author Brinda Santh 8/13/2018\r
- */\r
-//@Configuration\r
-//@EnableSwagger2\r
-@SuppressWarnings("unused")\r
-@Deprecated\r
-public class SwaggerConfig {\r
-\r
- @Bean\r
- public Docket api() {\r
- return new Docket(DocumentationType.SWAGGER_2)\r
- .select()\r
- .apis(RequestHandlerSelectors.any())\r
- .paths(PathSelectors.any())\r
- .build()\r
- .apiInfo(apiInfo());\r
- }\r
-\r
- private ApiInfo apiInfo() {\r
- return new ApiInfo(\r
- "Blueprints Processor API",\r
- "Controller blueprints processor API for VNF Selfservice.",\r
- "1.0.0",\r
- "Terms of service",\r
- new Contact("Brinda Santh", "www.onap.com", "bs2796@onap.com"),\r
- "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());\r
- }\r
-\r
-\r
-}\r
+/*
+ * 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.blueprintsprocessor;
+
+
+import org.springframework.context.annotation.Bean;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+
+import java.util.Collections;
+
+/**
+ * SwaggerConfig
+ *
+ * @author Brinda Santh 8/13/2018
+ */
+//@Configuration
+//@EnableSwagger2
+@SuppressWarnings("unused")
+@Deprecated
+public class SwaggerConfig {
+
+ @Bean
+ public Docket api() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .select()
+ .apis(RequestHandlerSelectors.any())
+ .paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfo(
+ "Blueprints Processor API",
+ "Controller blueprints processor API for VNF Selfservice.",
+ "1.0.0",
+ "Terms of service",
+ new Contact("Brinda Santh", "www.onap.com", "bs2796@onap.com"),
+ "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
+ }
+
+
+}
-/*\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
-\r
-package org.onap.ccsdk.apps.blueprintsprocessor;\r
-\r
-import org.onap.ccsdk.apps.blueprintsprocessor.security.AuthenticationManager;\r
-import org.onap.ccsdk.apps.blueprintsprocessor.security.SecurityContextRepository;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.security.config.web.server.ServerHttpSecurity;\r
-import org.springframework.security.web.server.SecurityWebFilterChain;\r
-import org.springframework.web.reactive.config.CorsRegistry;\r
-import org.springframework.web.reactive.config.ResourceHandlerRegistry;\r
-import org.springframework.web.reactive.config.WebFluxConfigurationSupport;\r
-\r
-/**\r
- * WebConfig\r
- *\r
- * @author Brinda Santh 8/13/2018\r
- */\r
-@Configuration\r
-public class WebConfig extends WebFluxConfigurationSupport {\r
-\r
- @Autowired\r
- private AuthenticationManager authenticationManager;\r
-\r
- @Autowired\r
- private SecurityContextRepository securityContextRepository;\r
-\r
- @Override\r
- public void addResourceHandlers(ResourceHandlerRegistry registry) {\r
- registry.addResourceHandler("swagger-ui.html")\r
- .addResourceLocations("classpath:/META-INF/resources/");\r
-\r
- registry.addResourceHandler("/webjars/**")\r
- .addResourceLocations("classpath:/META-INF/resources/webjars/");\r
- }\r
-\r
- @Override\r
- public void addCorsMappings(CorsRegistry corsRegistry) {\r
- corsRegistry.addMapping("/**")\r
- .allowedOrigins("*")\r
- .allowedMethods("*")\r
- .allowedHeaders("*")\r
- .maxAge(3600);\r
- }\r
-\r
-\r
- @Bean\r
- public SecurityWebFilterChain securitygWebFilterChain(ServerHttpSecurity http) {\r
- return http.csrf().disable()\r
- .formLogin().disable()\r
- .httpBasic().disable()\r
- .authenticationManager(authenticationManager)\r
- .securityContextRepository(securityContextRepository)\r
- .authorizeExchange()\r
- .pathMatchers(HttpMethod.OPTIONS).permitAll()\r
- .anyExchange().authenticated()\r
- .and().build();\r
-\r
- }\r
-}\r
+/*
+ * 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.blueprintsprocessor;
+
+import org.onap.ccsdk.cds.blueprintsprocessor.security.AuthenticationManager;
+import org.onap.ccsdk.cds.blueprintsprocessor.security.SecurityContextRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.config.web.server.ServerHttpSecurity;
+import org.springframework.security.web.server.SecurityWebFilterChain;
+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
+public class WebConfig extends WebFluxConfigurationSupport {
+
+ @Autowired
+ private AuthenticationManager authenticationManager;
+
+ @Autowired
+ private SecurityContextRepository securityContextRepository;
+
+ @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("*")
+ .maxAge(3600);
+ }
+
+
+ @Bean
+ public SecurityWebFilterChain securitygWebFilterChain(ServerHttpSecurity http) {
+ return http.csrf().disable()
+ .formLogin().disable()
+ .httpBasic().disable()
+ .authenticationManager(authenticationManager)
+ .securityContextRepository(securityContextRepository)
+ .authorizeExchange()
+ .pathMatchers(HttpMethod.OPTIONS).permitAll()
+ .anyExchange().authenticated()
+ .and().build();
+
+ }
+}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.security;
+package org.onap.ccsdk.cds.blueprintsprocessor.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.security;
+package org.onap.ccsdk.cds.blueprintsprocessor.security;
import com.google.common.base.Strings;
import io.grpc.Metadata;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.security;
+package org.onap.ccsdk.cds.blueprintsprocessor.security;
import java.util.Collections;
import org.springframework.beans.factory.annotation.Value;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.security;
+package org.onap.ccsdk.cds.blueprintsprocessor.security;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
<logger name="org.springframework" level="info"/>\r
<logger name="org.springframework.web" level="info"/>\r
<logger name="org.hibernate" level="error"/>\r
- <logger name="org.onap.ccsdk.apps" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
-/*\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.apps.blueprintsprocessor;\r
-\r
-\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.boot.test.context.SpringBootTest;\r
-import org.springframework.context.ApplicationContext;\r
-import org.springframework.test.context.ContextConfiguration;\r
-import org.springframework.test.context.junit4.SpringRunner;\r
-\r
-/**\r
- * BlueprintProcessorApplicationTest\r
- *\r
- * @author Brinda Santh\r
- * DATE : 8/14/2018\r
- */\r
-\r
-@RunWith(SpringRunner.class)\r
-@ContextConfiguration(classes = {BlueprintProcessorApplication.class, BluePrintLoadConfiguration.class})\r
-@SpringBootTest(classes = BlueprintProcessorApplication.class,\r
- webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)\r
-public class BlueprintProcessorApplicationTest {\r
-\r
- @Autowired\r
- private ApplicationContext context;\r
-\r
- @Before\r
- public void setUp() {\r
-\r
- }\r
-\r
- @Test\r
- public void testSample() {\r
- Assert.assertNotNull("Failed to create Application Context ", context);\r
- }\r
-\r
-}\r
+/*
+ * 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.blueprintsprocessor;
+
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.ApplicationContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * BlueprintProcessorApplicationTest
+ *
+ * @author Brinda Santh
+ * DATE : 8/14/2018
+ */
+
+@RunWith(SpringRunner.class)
+@ContextConfiguration(classes = {BlueprintProcessorApplication.class, BluePrintLoadConfiguration.class})
+@SpringBootTest(classes = BlueprintProcessorApplication.class,
+ webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class BlueprintProcessorApplicationTest {
+
+ @Autowired
+ private ApplicationContext context;
+
+ @Before
+ public void setUp() {
+
+ }
+
+ @Test
+ public void testSample() {
+ Assert.assertNotNull("Failed to create Application Context ", context);
+ }
+
+}
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<name>Blueprints Processor Distribution</name>
<properties>
<assembly.id>maven</assembly.id>
- <name.space>org.onap.ccsdk.apps</name.space>
+ <name.space>org.onap.ccsdk.cds</name.space>
<serviceArtifactName>blueprintsprocessor</serviceArtifactName>
<image.name>onap/ccsdk-blueprintsprocessor</image.name>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>application</artifactId>
</dependency>
</dependencies>
-DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \
-DSecurityFilePath=/etc \
-DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \
--Dms_name=org.onap.ccsdk.apps.blueprintsprocessor \
+-Dms_name=org.onap.ccsdk.cds.blueprintsprocessor \
-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}/ \
-org.onap.ccsdk.apps.blueprintsprocessor.BlueprintProcessorApplication
+org.onap.ccsdk.cds.blueprintsprocessor.BlueprintProcessorApplication
<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">
<parent>
<artifactId>functions</artifactId>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor
import org.springframework.context.annotation.Configuration
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.api
interface CliExecutorService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.service
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.service
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.api.CliExecutorService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.api.CliExecutorService
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.service
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.service
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.api.CliExecutorService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.api.CliExecutorService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
<logger name="org.springframework.test" level="warn"/>
<logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
<root level="warn">
<appender-ref ref="STDOUT"/>
-->
<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">
<parent>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>functions</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>netconf-executor</artifactId>
<name>Blueprints Processor Function - Netconf Executor</name>
<description>Blueprints Processor Function - Netconf Executor</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>resource-resolution</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.apps.controllerblueprints.core.getAsString
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
+import org.onap.ccsdk.cds.controllerblueprints.core.getAsString
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
abstract class NetconfComponentFunction : AbstractScriptComponentFunction() {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfRpcServiceImpl
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core.NetconfRpcServiceImpl
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl
data class NetconfDevice(val deviceInfo: DeviceInfo) {
val netconfRpcService = NetconfRpcServiceImpl(deviceInfo)
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
class NetconfException : Exception {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
class DeviceResponse {
var status: String? = null
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.ModifyAction
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfDatastore
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.ModifyAction
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfDatastore
interface NetconfRpcService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
import java.util.concurrent.CompletableFuture
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api
interface NetconfSessionListener {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfReceivedEvent
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfSessionListener
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfReceivedEvent
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSessionListener
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils
import org.slf4j.LoggerFactory
import java.io.BufferedReader
import java.io.IOException
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core
-
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceResponse
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfException
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core
+
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceResponse
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
import org.slf4j.LoggerFactory
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicInteger
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core
import com.google.common.collect.ImmutableList
import com.google.common.collect.ImmutableSet
import org.apache.sshd.client.session.ClientSessionImpl
import org.apache.sshd.common.FactoryManager
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfException
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfReceivedEvent
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfSessionListener
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfReceivedEvent
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSession
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSessionListener
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus
import org.slf4j.LoggerFactory
import java.io.IOException
import java.util.*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils
enum class NetconfDatastore(val datastore: String) {
RUNNING("running"),
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfException
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException
import org.slf4j.LoggerFactory
import org.xml.sax.InputSource
import java.io.StringReader
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@RunWith(SpringRunner::class)
@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@DirtiesContext
@TestPropertySource(properties =
["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf,./../../../../components/scripts/python/ccsdk_blueprints",
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import org.apache.sshd.client.channel.ChannelSubsystem
import org.apache.sshd.client.session.ClientSessionImpl
import org.junit.Assert
import org.junit.Before
import org.junit.Test
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfRpcServiceImpl
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.mocks.NetconfDeviceSimulator
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core.NetconfRpcServiceImpl
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.mocks.NetconfDeviceSimulator
import java.util.concurrent.atomic.AtomicReference
import kotlin.script.experimental.api.asSuccess
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core
import org.junit.After
import org.junit.Assert
import org.junit.Test
import org.junit.Assert.*
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.mocks.NetconfDeviceSimulator
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.mocks.NetconfDeviceSimulator
class NetconfRpcServiceImplTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.mocks
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.mocks
import org.apache.sshd.common.NamedFactory
import org.apache.sshd.server.auth.UserAuth
import org.apache.sshd.server.auth.UserAuthNoneFactory
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfSubsystemFactory
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfSubsystemFactory
import java.util.*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils
import java.io.IOException
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils
import org.junit.Assert
import org.junit.Assert.assertTrue
import org.junit.Test
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.api.NetconfException
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException
import kotlin.test.fail
class RpcMessageUtilsTest {
<logger name="org.springframework.test" level="warn"/>\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
-->
<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">
<parent>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>execution-service</artifactId>
</dependency>
<!-- Test Dependencies -->
<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">
<parent>
<artifactId>functions</artifactId>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>python-executor</artifactId>
<name>Blueprints Processor Function - Python Executor</name>
<description>Blueprints Processor Function - Python Executor</description>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import com.fasterxml.jackson.databind.node.ArrayNode
import org.apache.commons.io.FilenameUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.data.OperationAssignment
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.PythonExecutorConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationAssignment
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.ApplicationContext
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.mock.MockInstanceConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.mock.MockInstanceConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.PythonExecutorConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.mock
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.mock
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>functions</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>resource-resolution</artifactId>
<packaging>jar</packaging>
<name>Blueprints Processor Function - Resource Resolution</name>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>db-lib</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>python-executor</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import org.jetbrains.kotlin.script.util.DependsOn
import org.jetbrains.kotlin.script.util.Repository
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution\r
-\r
-import com.fasterxml.jackson.databind.JsonNode\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService\r
-\r
-class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext)\r
- : DefaultBluePrintRuntimeService(id, bluePrintContext) {\r
-\r
- private lateinit var resolutionId: String\r
- private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()\r
-\r
- fun createUniqueId(key: String) {\r
- resolutionId = "$id-$key"\r
- }\r
-\r
- fun cleanResourceStore() {\r
- resourceStore.clear()\r
- }\r
-\r
- fun putResolutionStore(key: String, value: JsonNode) {\r
- resourceStore[key] = value\r
- }\r
-\r
- fun getResolutionStore(key: String): JsonNode {\r
- return resourceStore[key]\r
- ?: throw BluePrintProcessorException("failed to get execution property ($key)")\r
- }\r
-\r
- fun checkResolutionStore(key: String): Boolean {\r
- return resourceStore.containsKey(key)\r
- }\r
-\r
- fun getJsonNodeFromResolutionStore(key: String): JsonNode {\r
- return getResolutionStore(key)\r
- }\r
-\r
- fun getStringFromResolutionStore(key: String): String? {\r
- return getResolutionStore(key).asText()\r
- }\r
-\r
- fun getBooleanFromResolutionStore(key: String): Boolean? {\r
- return getResolutionStore(key).asBoolean()\r
- }\r
-\r
- fun getIntFromResolutionStore(key: String): Int? {\r
- return getResolutionStore(key).asInt()\r
- }\r
-\r
- fun getDoubleFromResolutionStore(key: String): Double? {\r
- return getResolutionStore(key).asDouble()\r
- }\r
-\r
- fun putDictionaryStore(key: String, value: JsonNode) {\r
- resourceStore["dictionary-$key"] = value\r
- }\r
-\r
- fun getDictionaryStore(key: String): JsonNode {\r
- return resourceStore["dictionary-$key"]\r
- ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")\r
- }\r
-\r
- fun checkDictionaryStore(key: String): Boolean {\r
- return resourceStore.containsKey("dictionary-$key")\r
- }\r
-\r
- fun getJsonNodeFromDictionaryStore(key: String): JsonNode {\r
- return getResolutionStore("dictionary-$key")\r
- }\r
-\r
- fun getStringFromDictionaryStore(key: String): String? {\r
- return getResolutionStore("dictionary-$key").asText()\r
- }\r
-\r
- fun getBooleanFromDictionaryStore(key: String): Boolean? {\r
- return getResolutionStore("dictionary-$key").asBoolean()\r
- }\r
-\r
- fun getIntFromDictionaryStore(key: String): Int? {\r
- return getResolutionStore("dictionary-$key").asInt()\r
- }\r
-\r
- fun getDoubleFromDictionaryStore(key: String): Double? {\r
- return getResolutionStore("dictionary-$key").asDouble()\r
- }\r
-\r
-}\r
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
+
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+
+class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext)
+ : DefaultBluePrintRuntimeService(id, bluePrintContext) {
+
+ private lateinit var resolutionId: String
+ private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()
+
+ fun createUniqueId(key: String) {
+ resolutionId = "$id-$key"
+ }
+
+ fun cleanResourceStore() {
+ resourceStore.clear()
+ }
+
+ fun putResolutionStore(key: String, value: JsonNode) {
+ resourceStore[key] = value
+ }
+
+ fun getResolutionStore(key: String): JsonNode {
+ return resourceStore[key]
+ ?: throw BluePrintProcessorException("failed to get execution property ($key)")
+ }
+
+ fun checkResolutionStore(key: String): Boolean {
+ return resourceStore.containsKey(key)
+ }
+
+ fun getJsonNodeFromResolutionStore(key: String): JsonNode {
+ return getResolutionStore(key)
+ }
+
+ fun getStringFromResolutionStore(key: String): String? {
+ return getResolutionStore(key).asText()
+ }
+
+ fun getBooleanFromResolutionStore(key: String): Boolean? {
+ return getResolutionStore(key).asBoolean()
+ }
+
+ fun getIntFromResolutionStore(key: String): Int? {
+ return getResolutionStore(key).asInt()
+ }
+
+ fun getDoubleFromResolutionStore(key: String): Double? {
+ return getResolutionStore(key).asDouble()
+ }
+
+ fun putDictionaryStore(key: String, value: JsonNode) {
+ resourceStore["dictionary-$key"] = value
+ }
+
+ fun getDictionaryStore(key: String): JsonNode {
+ return resourceStore["dictionary-$key"]
+ ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")
+ }
+
+ fun checkDictionaryStore(key: String): Boolean {
+ return resourceStore.containsKey("dictionary-$key")
+ }
+
+ fun getJsonNodeFromDictionaryStore(key: String): JsonNode {
+ return getResolutionStore("dictionary-$key")
+ }
+
+ fun getStringFromDictionaryStore(key: String): String? {
+ return getResolutionStore("dictionary-$key").asText()
+ }
+
+ fun getBooleanFromDictionaryStore(key: String): Boolean? {
+ return getResolutionStore("dictionary-$key").asBoolean()
+ }
+
+ fun getIntFromDictionaryStore(key: String): Int? {
+ return getResolutionStore("dictionary-$key").asInt()
+ }
+
+ fun getDoubleFromDictionaryStore(key: String): Double? {
+ return getResolutionStore("dictionary-$key").asDouble()
+ }
+
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
object ResourceResolutionConstants {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
-
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionResultService
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintTemplateService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.BulkResourceSequencingUtils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
+
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionResultService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.BulkResourceSequencingUtils
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
*/
@file:Suppress("unused")
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.annotation.JsonProperty
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.db
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
import org.springframework.data.jpa.repository.JpaRepository
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.db
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
import com.fasterxml.jackson.annotation.JsonFormat
import org.hibernate.annotations.Proxy
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.db
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
-
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
+
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.ApplicationContext
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import com.fasterxml.jackson.databind.node.JsonNodeFactory
import com.fasterxml.jackson.databind.node.MissingNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibGenericService
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.PrimaryDBLibGenericService
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import com.fasterxml.jackson.databind.node.MissingNode
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import com.fasterxml.jackson.databind.node.MissingNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import com.fasterxml.jackson.databind.JsonNode
import org.apache.commons.collections.MapUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintTemplateService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.slf4j.LoggerFactory
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.JsonNodeFactory
import com.fasterxml.jackson.databind.node.MissingNode
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.RestResourceSource
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.checkEqualsOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.nullToEmpty
-import org.onap.ccsdk.apps.controllerblueprints.core.returnNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.RestResourceSource
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.checkEqualsOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
+import org.onap.ccsdk.cds.controllerblueprints.core.returnNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.NullNode
import com.fasterxml.jackson.databind.node.ObjectNode
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.nullToEmpty
-import org.onap.ccsdk.apps.controllerblueprints.core.returnNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
+import org.onap.ccsdk.cds.controllerblueprints.core.returnNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import java.util.*
class ResourceAssignmentUtils {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.utils.PayloadUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
-import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.PayloadUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
BlueprintPropertyConfiguration::class, BluePrintProperties::class,
BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
@TestPropertySource(locations = ["classpath:application-test.properties"])
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@EnableAutoConfiguration
class ResourceResolutionComponentTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.utils.PayloadUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.PayloadUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
BlueprintPropertyConfiguration::class, BluePrintProperties::class,
BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
@TestPropertySource(locations = ["classpath:application-test.properties"])
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@EnableAutoConfiguration
class ResourceResolutionServiceTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.scripts.BluePrintScriptsServiceImpl
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.scripts.BluePrintScriptsServiceImpl
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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">
<parent>
<artifactId>functions</artifactId>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>restconf-executor</artifactId>
<name>Blueprints Processor Function - Restconf Executor</name>
<description>Blueprints Processor Function - Restconf Executor</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>resource-resolution</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor
import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.RestLibConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.apps.controllerblueprints.core.getAsString
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
+import org.onap.ccsdk.cds.controllerblueprints.core.getAsString
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
*/
@file:Suppress("unused")
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor
-
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.RestLibConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor
+
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
abstract class RestconfComponentFunction : AbstractScriptComponentFunction() {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.context.properties.EnableConfigurationProperties
import com.fasterxml.jackson.databind.node.ObjectNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor.RestconfComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.RestconfComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
open class EditConfigure : RestconfComponentFunction() {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
import io.mockk.mockk
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@RunWith(SpringRunner::class)
@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@DirtiesContext
@TestPropertySource(properties =
["server.port=9111",
<logger name="org.springframework.test" level="warn"/>
<logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
<root level="warn">
<appender-ref ref="STDOUT"/>
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>commons</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>db-resources</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>processor-core</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db
+package org.onap.ccsdk.cds.blueprintsprocessor.db
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db
+package org.onap.ccsdk.cds.blueprintsprocessor.db
open class DBDataSourceProperties {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db
+package org.onap.ccsdk.cds.blueprintsprocessor.db
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db
-
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain.BlueprintProcessorModelContent
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.repository.BlueprintProcessorModelRepository
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.common.ApplicationConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintArchiveUtils
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.BlueprintCatalogServiceImpl
+package org.onap.ccsdk.cds.blueprintsprocessor.db
+
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModelContent
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintProcessorModelRepository
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.BlueprintCatalogServiceImpl
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
import java.nio.file.Paths
/**
- * Similar/Duplicate implementation in [org.onap.ccsdk.apps.controllerblueprints.service.load.ControllerBlueprintCatalogServiceImpl]
+ * Similar/Duplicate implementation in [org.onap.ccsdk.cds.controllerblueprints.service.load.ControllerBlueprintCatalogServiceImpl]
*/
@Service
class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: BluePrintValidatorService,
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.db.*
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.db.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibGenericService
-import org.onap.ccsdk.apps.blueprintsprocessor.db.MariaDataSourceProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibGenericService
-import org.onap.ccsdk.apps.blueprintsprocessor.db.MySqlDataSourceProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.apps.blueprintsprocessor.db.AbstractDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.AbstractDBLibGenericService
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.apps.blueprintsprocessor.db.PrimaryDataSourceProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@Configuration
@EnableJpaRepositories(
- basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor.*"],
+ basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.*"],
entityManagerFactoryRef = "primaryEntityManager",
transactionManagerRef = "primaryTransactionManager"
)
open fun primaryEntityManager(): LocalContainerEntityManagerFactoryBean {
val em = LocalContainerEntityManagerFactoryBean()
em.dataSource = primaryDataSource()
- em.setPackagesToScan("org.onap.ccsdk.apps.blueprintsprocessor.*")
+ em.setPackagesToScan("org.onap.ccsdk.cds.blueprintsprocessor.*")
em.jpaVendorAdapter = HibernateJpaVendorAdapter()
val properties = HashMap<String, Any>()
properties["hibernate.hbm2ddl.auto"] = primaryDataSourceProperties.hibernateHbm2ddlAuto
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModelProperty
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModelProperty
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary.repository
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain.BlueprintProcessorModelContent
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.repository.ModelContentRepository
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModelContent
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelContentRepository
interface BlueprintProcessorModelContentRepository : ModelContentRepository<BlueprintProcessorModel, BlueprintProcessorModelContent>
\ No newline at end of file
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary.repository
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository
-import org.onap.ccsdk.apps.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.repository.ModelRepository
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintProcessorModel
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelRepository
interface BlueprintProcessorModelRepository : ModelRepository<BlueprintProcessorModel>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db
+package org.onap.ccsdk.cds.blueprintsprocessor.db
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@RunWith(SpringRunner::class)
@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
class BlueprintProcessorCatalogServiceImplTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.db.primary
+package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.db.BluePrintDBLibConfiguration
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@ContextConfiguration(classes = [BlueprintPropertyConfiguration::class, BluePrintProperties::class,
BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
@TestPropertySource(locations = ["classpath:application-test.properties"])
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@EnableAutoConfiguration
class PrimaryDatabaseConfigurationTest {
<logger name="org.springframework.test" level="warn"/>\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>commons</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>processor-core</artifactId>
</dependency>
</dependencies>
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.att.nsa.mr.client.MRBatchingPublisher
import com.att.nsa.mr.client.MRClientFactory
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.att.nsa.mr.client.MRBatchingPublisher
import com.att.nsa.mr.client.MRPublisher
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY
-import org.onap.ccsdk.apps.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_AAF_AUTH
-import org.onap.ccsdk.apps.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_NO_AUTH
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_AAF_AUTH
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_NO_AUTH
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Configuration
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import java.util.Properties
* ============LICENSE_END=========================================================
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.dmaap
+package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.att.nsa.mr.client.MRBatchingPublisher
import com.att.nsa.mr.client.MRClientFactory.createSimplePublisher
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.dmaap.BluePrintDmaapLibConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.dmaap.BluePrintDmaapLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibPropertyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
<logger name="org.springframework.test" level="warn"/>\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
</modules>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
</dependency>
<!-- Test Dependencies -->
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>commons</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.core
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.core
import org.springframework.boot.context.properties.bind.Bindable
import org.springframework.boot.context.properties.bind.Binder
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core.api.data
+package org.onap.ccsdk.cds.blueprintsprocessor.core.api.data
import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.databind.node.ObjectNode
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core.factory
+package org.onap.ccsdk.cds.blueprintsprocessor.core.factory
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.core.utils
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
class PayloadUtils {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.core
+package org.onap.ccsdk.cds.blueprintsprocessor.core
// TODO
open class BluePrintPropertiesTest
\ No newline at end of file
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>commons</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<description>Blueprints Processor Rest Lib</description>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>processor-core</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest
+package org.onap.ccsdk.cds.blueprintsprocessor.rest
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest
+package org.onap.ccsdk.cds.blueprintsprocessor.rest
open class RestClientProperties {
lateinit var type: String
* SPDX-License-Identifier: Apache-2.0
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.BasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import java.nio.charset.Charset
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.BasicAuthRestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.DME2RestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.PolicyManagerRestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.RestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.RestLibConstants
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.TokenAuthRestClientProperties
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.DME2RestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.PolicyManagerRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
* SPDX-License-Identifier: Apache-2.0
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.apache.commons.io.IOUtils
import org.apache.http.client.methods.*
import org.apache.http.impl.client.CloseableHttpClient
import org.apache.http.impl.client.HttpClients
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.utils.WebClientUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.http.HttpMethod
import java.nio.charset.Charset
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.RestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
class DME2ProxyRestClientService(restClientProperties: RestClientProperties) : BlueprintWebClientService {
override fun defaultHeaders(): Map<String, String> {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.apache.http.conn.ssl.SSLConnectionSocketFactory
import org.apache.http.impl.client.CloseableHttpClient
import org.apache.http.impl.client.HttpClients
import org.apache.http.ssl.SSLContextBuilder
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.utils.WebClientUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import java.io.File
* SPDX-License-Identifier: Apache-2.0
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.TokenAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.utils
import org.apache.http.HttpRequestInterceptor
import org.apache.http.HttpResponseInterceptor
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
* SPDX-License-Identifier: Apache-2.0
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.rest.service
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
<logger name="org.springframework.test" level="warn"/>\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
</modules>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>workflow-service</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>resource-resolution</artifactId>
</dependency>
<dependency>
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>inbounds</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
-/*\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.apps.blueprintsprocessor.resource.api;\r
-\r
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService;\r
-import org.springframework.http.MediaType;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.ResponseBody;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import reactor.core.publisher.Mono;\r
-\r
-/**\r
- * ResourceResolutionController\r
- *\r
- * @author Brinda Santh Date : 8/13/2018\r
- */\r
-\r
-@RestController\r
-@RequestMapping("/api/v1/resource")\r
-public class ResourceResolutionController {\r
-\r
- private ResourceResolutionService resourceResolutionService;\r
-\r
- public ResourceResolutionController(ResourceResolutionService resourceResolutionService) {\r
- this.resourceResolutionService = resourceResolutionService;\r
- }\r
-\r
- @RequestMapping(path = "/ping", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r
- public @ResponseBody\r
- Mono<String> ping() {\r
- return Mono.just("Success");\r
- }\r
-}\r
+/*
+ * 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.blueprintsprocessor.resource.api;
+
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import reactor.core.publisher.Mono;
+
+/**
+ * ResourceResolutionController
+ *
+ * @author Brinda Santh Date : 8/13/2018
+ */
+
+@RestController
+@RequestMapping("/api/v1/resource")
+public class ResourceResolutionController {
+
+ private ResourceResolutionService resourceResolutionService;
+
+ public ResourceResolutionController(ResourceResolutionService resourceResolutionService) {
+ this.resourceResolutionService = resourceResolutionService;
+ }
+
+ @RequestMapping(path = "/ping", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ public @ResponseBody
+ Mono<String> ping() {
+ return Mono.just("Success");
+ }
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.resource.api;
+package org.onap.ccsdk.cds.blueprintsprocessor.resource.api;
// TODO
public class ResourceResolutionControllerTest {
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>inbounds</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.components</groupId>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
<artifactId>proto-definition</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import io.grpc.StatusException
import io.grpc.stub.StreamObserver
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils.currentTimestamp
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.apps.controllerblueprints.common.api.Status
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.apps.controllerblueprints.management.api.BluePrintManagementInput
-import org.onap.ccsdk.apps.controllerblueprints.management.api.BluePrintManagementOutput
-import org.onap.ccsdk.apps.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.currentTimestamp
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
+import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
import org.slf4j.LoggerFactory
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils.toJava
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.toJava
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.slf4j.LoggerFactory
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import io.swagger.annotations.ApiOperation
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ACTION_MODE_ASYNC
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_ASYNC
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.MediaType
import org.springframework.http.codec.multipart.FilePart
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import com.fasterxml.jackson.databind.node.JsonNodeFactory
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ACTION_MODE_ASYNC
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ACTION_MODE_SYNC
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils.saveCBAFile
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils.toProto
-import org.onap.ccsdk.apps.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintFileUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_ASYNC
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_SYNC
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.saveCBAFile
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.toProto
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.slf4j.LoggerFactory
import org.springframework.http.codec.multipart.FilePart
import org.springframework.stereotype.Service
}
suspend fun process(executionServiceInput: ExecutionServiceInput,
- responseObserver: StreamObserver<org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceOutput>) {
+ responseObserver: StreamObserver<org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput>) {
when {
executionServiceInput.actionIdentifiers.mode == ACTION_MODE_ASYNC -> {
GlobalScope.launch(Dispatchers.Default) {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils
import com.fasterxml.jackson.databind.node.ObjectNode
import com.google.common.base.Strings
import com.google.protobuf.Struct
import com.google.protobuf.util.JsonFormat
-import org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.apps.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.apps.controllerblueprints.common.api.Flag
-import org.onap.ccsdk.apps.controllerblueprints.common.api.Status
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceOutput
+import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
+import org.onap.ccsdk.cds.controllerblueprints.common.api.Flag
+import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import java.text.SimpleDateFormat
import java.util.*
// ACTION IDENTIFIER
-fun org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers.toProto(): ActionIdentifiers {
+fun org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers.toProto(): ActionIdentifiers {
val actionIdentifier = ActionIdentifiers.newBuilder()
actionIdentifier.actionName = this.actionName
actionIdentifier.blueprintName = this.blueprintName
return actionIdentifier.build()
}
-fun ActionIdentifiers.toJava(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers {
- val actionIdentifier = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers()
+fun ActionIdentifiers.toJava(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers {
+ val actionIdentifier = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers()
actionIdentifier.actionName = this.actionName
actionIdentifier.blueprintName = this.blueprintName
actionIdentifier.blueprintVersion = this.blueprintVersion
// COMMON HEADER
-fun org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader.toProto(): CommonHeader {
+fun org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader.toProto(): CommonHeader {
val commonHeader = CommonHeader.newBuilder()
commonHeader.originatorId = this.originatorId
commonHeader.requestId = this.requestId
return commonHeader.build()
}
-fun CommonHeader.toJava(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader {
- val commonHeader = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader()
+fun CommonHeader.toJava(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader {
+ val commonHeader = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader()
commonHeader.originatorId = this.originatorId
commonHeader.requestId = this.requestId
commonHeader.subRequestId = this.subRequestId
// FLAG
-fun org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Flags.toProto(): Flag {
+fun org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Flags.toProto(): Flag {
val flag = Flag.newBuilder()
flag.isForce = this.isForce
flag.ttl = this.ttl
return flag.build()
}
-fun Flag.toJava(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Flags {
- val flag = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Flags()
+fun Flag.toJava(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Flags {
+ val flag = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Flags()
flag.isForce = this.isForce
flag.ttl = this.ttl
return flag
// STATUS
-fun org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status.toProto(): Status {
+fun org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status.toProto(): Status {
val status = Status.newBuilder()
status.code = this.code
status.errorMessage = this.errorMessage ?: ""
// EXECUTION INPUT
-fun ExecutionServiceInput.toJava(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput {
- val executionServiceInput = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput()
+fun ExecutionServiceInput.toJava(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput {
+ val executionServiceInput = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput()
executionServiceInput.actionIdentifiers = this.actionIdentifiers.toJava()
executionServiceInput.commonHeader = this.commonHeader.toJava()
executionServiceInput.payload = JacksonUtils.jsonNode(JsonFormat.printer().print(this.payload)) as ObjectNode
// EXECUTION OUPUT
-fun org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput.toProto(): ExecutionServiceOutput {
+fun org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput.toProto(): ExecutionServiceOutput {
val executionServiceOuput = ExecutionServiceOutput.newBuilder()
executionServiceOuput.actionIdentifiers = this.actionIdentifiers.toProto()
executionServiceOuput.commonHeader = this.commonHeader.toProto()
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.springframework.http.codec.multipart.FilePart
import org.springframework.util.StringUtils
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.validation
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.validation
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.validation.BluePrintDesignTimeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.validation.extension.ResourceDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintDesignTimeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import com.google.protobuf.ByteString
import io.grpc.testing.GrpcServerRule
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.apps.controllerblueprints.management.api.BluePrintManagementInput
-import org.onap.ccsdk.apps.controllerblueprints.management.api.BluePrintManagementServiceGrpc
-import org.onap.ccsdk.apps.controllerblueprints.management.api.FileChunk
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@RunWith(SpringRunner::class)
@EnableAutoConfiguration
@DirtiesContext
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
class BluePrintManagementGRPCHandlerTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import com.google.protobuf.util.JsonFormat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.processing.api.ExecutionServiceOutput
+import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
@RunWith(SpringRunner::class)
@DirtiesContext
@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
class BluePrintProcessingGRPCHandlerTest {
private val log = LoggerFactory.getLogger(BluePrintProcessingGRPCHandlerTest::class.java)
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.security.SecurityProperties
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
@RunWith(SpringRunner::class)
@WebFluxTest
@ContextConfiguration(classes = [ExecutionServiceHandler::class, BluePrintCoreConfiguration::class, BluePrintCatalogService::class, SecurityProperties::class])
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor", "org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
class ExecutionServiceHandlerTest {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.mock
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.mock
import io.mockk.mockk
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Flags
-import org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers
-import org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.apps.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.apps.controllerblueprints.common.api.Flag
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Flags
+import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
+import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
+import org.onap.ccsdk.cds.controllerblueprints.common.api.Flag
import org.springframework.test.context.junit4.SpringRunner
import java.text.SimpleDateFormat
Assert.assertEquals(flag.ttl, flag2.ttl)
}
- fun createStatus(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status {
- val status = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status()
+ fun createStatus(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status {
+ val status = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status()
status.code = 400
status.errorMessage = "Concurrent modification exception"
status.eventType = EventType.EVENT_COMPONENT_PROCESSING.name
Assert.assertEquals(commonHeader.timestamp, formatter.format(commonHeader2.timestamp))
}
- fun createCommonHeader(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader {
- val commonHeader = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader()
+ fun createCommonHeader(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader {
+ val commonHeader = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader()
commonHeader.flags = createFlag()
commonHeader.originatorId = "1234"
commonHeader.requestId = "2345"
Assert.assertEquals(actionIdentifiers.mode, actionIdentifiers2.mode)
}
- fun createActionIdentifier(): org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers {
- val ac = org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers()
+ fun createActionIdentifier(): org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers {
+ val ac = org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers()
ac.mode = "mode"
ac.blueprintVersion = "version"
ac.blueprintName = "name"
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.validation
+package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.validation
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api.mock.MockResourceSource
-import org.onap.ccsdk.apps.controllerblueprints.validation.BluePrintValidationConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.mock.MockResourceSource
+import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintValidationConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>services</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>jython-standalone</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-scripts</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>processor-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>db-lib</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>rest-lib</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.components</groupId>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
<artifactId>proto-definition</artifactId>
</dependency>
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2019 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
-\r
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution\r
-\r
-\r
-import com.fasterxml.jackson.databind.JsonNode\r
-import com.fasterxml.jackson.databind.node.JsonNodeFactory\r
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput\r
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput\r
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status\r
-import org.onap.ccsdk.apps.controllerblueprints.common.api.EventType\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException\r
-import org.onap.ccsdk.apps.controllerblueprints.core.asObjectNode\r
-import org.onap.ccsdk.apps.controllerblueprints.core.getAsString\r
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService\r
-import org.slf4j.LoggerFactory\r
-\r
-/**\r
- * AbstractComponentFunction\r
- * @author Brinda Santh\r
- */\r
-abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServiceInput, ExecutionServiceOutput> {\r
- @Transient\r
- private val log = LoggerFactory.getLogger(AbstractComponentFunction::class.java)\r
-\r
- lateinit var executionServiceInput: ExecutionServiceInput\r
- var executionServiceOutput = ExecutionServiceOutput()\r
- lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>\r
- lateinit var processId: String\r
- lateinit var workflowName: String\r
- lateinit var stepName: String\r
- lateinit var interfaceName: String\r
- lateinit var operationName: String\r
- lateinit var nodeTemplateName: String\r
- var operationInputs: MutableMap<String, JsonNode> = hashMapOf()\r
-\r
- override fun getName(): String {\r
- return stepName\r
- }\r
-\r
- override fun prepareRequest(executionRequest: ExecutionServiceInput): ExecutionServiceInput {\r
- checkNotNull(bluePrintRuntimeService) { "failed to prepare blueprint runtime" }\r
-\r
- check(stepName.isNotEmpty()) { "failed to assign step name" }\r
-\r
- this.executionServiceInput = executionRequest\r
-\r
- processId = executionRequest.commonHeader.requestId\r
- check(processId.isNotEmpty()) { "couldn't get process id for step($stepName)" }\r
-\r
- workflowName = executionRequest.actionIdentifiers.actionName\r
- check(workflowName.isNotEmpty()) { "couldn't get action name for step($stepName)" }\r
-\r
- log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")\r
-\r
- val operationInputs = bluePrintRuntimeService.get("$stepName-step-inputs")\r
- ?: JsonNodeFactory.instance.objectNode()\r
-\r
- operationInputs.fields().forEach {\r
- this.operationInputs[it.key] = it.value\r
- }\r
-\r
- nodeTemplateName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)\r
- check(nodeTemplateName.isNotEmpty()) { "couldn't get NodeTemplate name for step($stepName)" }\r
-\r
- interfaceName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_INTERFACE)\r
- check(interfaceName.isNotEmpty()) { "couldn't get Interface name for step($stepName)" }\r
-\r
- operationName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_OPERATION)\r
- check(operationName.isNotEmpty()) { "couldn't get Operation name for step($stepName)" }\r
-\r
- val operationResolvedProperties = bluePrintRuntimeService\r
- .resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName)\r
-\r
- this.operationInputs.putAll(operationResolvedProperties)\r
-\r
- return executionRequest\r
- }\r
-\r
- override fun prepareResponse(): ExecutionServiceOutput {\r
- log.info("Preparing Response...")\r
- executionServiceOutput.commonHeader = executionServiceInput.commonHeader\r
- executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers\r
-\r
- // Resolve the Output Expression\r
- val stepOutputs = bluePrintRuntimeService\r
- .resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName, interfaceName, operationName)\r
-\r
- // FIXME("Not the right place to populate the response payload")\r
- executionServiceOutput.payload = stepOutputs.asObjectNode()\r
-\r
- bluePrintRuntimeService.put("$stepName-step-outputs", executionServiceOutput.payload)\r
-\r
- // FIXME("Not the right place to populate the status")\r
- // Populate Status\r
- val status = Status()\r
- status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name\r
- status.code = 200\r
- status.message = BluePrintConstants.STATUS_SUCCESS\r
- executionServiceOutput.status = status\r
- return this.executionServiceOutput\r
- }\r
-\r
- override fun apply(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {\r
- try {\r
- prepareRequest(executionServiceInput)\r
- process(executionServiceInput)\r
- } catch (runtimeException: RuntimeException) {\r
- recover(runtimeException, executionServiceInput)\r
- }\r
- return prepareResponse()\r
- }\r
-\r
- fun getOperationInput(key: String): JsonNode {\r
- return operationInputs[key]\r
- ?: throw BluePrintProcessorException("couldn't get the operation input($key) value.")\r
- }\r
-\r
- fun setAttribute(key: String, value: JsonNode) {\r
- bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName, key, value)\r
- }\r
-\r
- fun addError(type: String, name: String, error: String) {\r
- bluePrintRuntimeService.getBluePrintError().addError(type, name, error)\r
- }\r
-\r
- fun addError(error: String) {\r
- bluePrintRuntimeService.getBluePrintError().addError(error)\r
- }\r
-\r
+/*
+ * 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.blueprintsprocessor.services.execution
+
+
+import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.node.JsonNodeFactory
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
+import org.onap.ccsdk.cds.controllerblueprints.core.getAsString
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.slf4j.LoggerFactory
+
+/**
+ * AbstractComponentFunction
+ * @author Brinda Santh
+ */
+abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServiceInput, ExecutionServiceOutput> {
+ @Transient
+ private val log = LoggerFactory.getLogger(AbstractComponentFunction::class.java)
+
+ lateinit var executionServiceInput: ExecutionServiceInput
+ var executionServiceOutput = ExecutionServiceOutput()
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var processId: String
+ lateinit var workflowName: String
+ lateinit var stepName: String
+ lateinit var interfaceName: String
+ lateinit var operationName: String
+ lateinit var nodeTemplateName: String
+ var operationInputs: MutableMap<String, JsonNode> = hashMapOf()
+
+ override fun getName(): String {
+ return stepName
+ }
+
+ override fun prepareRequest(executionRequest: ExecutionServiceInput): ExecutionServiceInput {
+ checkNotNull(bluePrintRuntimeService) { "failed to prepare blueprint runtime" }
+
+ check(stepName.isNotEmpty()) { "failed to assign step name" }
+
+ this.executionServiceInput = executionRequest
+
+ processId = executionRequest.commonHeader.requestId
+ check(processId.isNotEmpty()) { "couldn't get process id for step($stepName)" }
+
+ workflowName = executionRequest.actionIdentifiers.actionName
+ check(workflowName.isNotEmpty()) { "couldn't get action name for step($stepName)" }
+
+ log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")
+
+ val operationInputs = bluePrintRuntimeService.get("$stepName-step-inputs")
+ ?: JsonNodeFactory.instance.objectNode()
+
+ operationInputs.fields().forEach {
+ this.operationInputs[it.key] = it.value
+ }
+
+ nodeTemplateName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)
+ check(nodeTemplateName.isNotEmpty()) { "couldn't get NodeTemplate name for step($stepName)" }
+
+ interfaceName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_INTERFACE)
+ check(interfaceName.isNotEmpty()) { "couldn't get Interface name for step($stepName)" }
+
+ operationName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_OPERATION)
+ check(operationName.isNotEmpty()) { "couldn't get Operation name for step($stepName)" }
+
+ val operationResolvedProperties = bluePrintRuntimeService
+ .resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName)
+
+ this.operationInputs.putAll(operationResolvedProperties)
+
+ return executionRequest
+ }
+
+ override fun prepareResponse(): ExecutionServiceOutput {
+ log.info("Preparing Response...")
+ executionServiceOutput.commonHeader = executionServiceInput.commonHeader
+ executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers
+
+ // Resolve the Output Expression
+ val stepOutputs = bluePrintRuntimeService
+ .resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName, interfaceName, operationName)
+
+ // FIXME("Not the right place to populate the response payload")
+ executionServiceOutput.payload = stepOutputs.asObjectNode()
+
+ bluePrintRuntimeService.put("$stepName-step-outputs", executionServiceOutput.payload)
+
+ // FIXME("Not the right place to populate the status")
+ // Populate Status
+ val status = Status()
+ status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
+ status.code = 200
+ status.message = BluePrintConstants.STATUS_SUCCESS
+ executionServiceOutput.status = status
+ return this.executionServiceOutput
+ }
+
+ override fun apply(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
+ try {
+ prepareRequest(executionServiceInput)
+ process(executionServiceInput)
+ } catch (runtimeException: RuntimeException) {
+ recover(runtimeException, executionServiceInput)
+ }
+ return prepareResponse()
+ }
+
+ fun getOperationInput(key: String): JsonNode {
+ return operationInputs[key]
+ ?: throw BluePrintProcessorException("couldn't get the operation input($key) value.")
+ }
+
+ fun setAttribute(key: String, value: JsonNode) {
+ bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName, key, value)
+ }
+
+ fun addError(type: String, name: String, error: String) {
+ bluePrintRuntimeService.getBluePrintError().addError(type, name, error)
+ }
+
+ fun addError(error: String) {
+ bluePrintRuntimeService.getBluePrintError().addError(error)
+ }
+
}
\ No newline at end of file
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
import org.apache.commons.io.FilenameUtils
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.data.OperationAssignment
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import org.python.core.PyObject
import org.python.util.PythonInterpreter
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import org.python.core.PyObject
import org.python.util.PythonInterpreter
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.context.properties.EnableConfigurationProperties
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts
+package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
<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.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
-->
<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">
<parent>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>services</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>execution-service</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
class BlueprintSvcLogicContext : SvcLogicContext() {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.sli.core.sli.*
import org.onap.ccsdk.sli.core.sli.provider.base.*
import org.slf4j.LoggerFactory
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("componentWorkflowExecutionService")
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.utils.SvcGraphUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.utils.SvcGraphUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
import com.fasterxml.jackson.databind.JsonNode
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.executor
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.BlueprintSvcLogicContext
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.NodeTemplateExecutionService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.BlueprintSvcLogicContext
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.NodeTemplateExecutionService
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
import org.onap.ccsdk.sli.core.sli.SvcLogicException
import org.onap.ccsdk.sli.core.sli.SvcLogicNode
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.utils
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.utils
import org.onap.ccsdk.sli.core.sli.SvcLogicGraph
import org.onap.ccsdk.sli.core.sli.SvcLogicParser
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.mock.PrototypeComponentFunction
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.mock.SingletonComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.PrototypeComponentFunction
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.SingletonComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
* limitations under the License.
*/
-package org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.mock
+package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock
-import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Bean
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.blueprintsprocessor" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<artifactId>blueprintsprocessor</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<name>Blueprints Processor Parent</name>
<version>${protobuff.java.utils.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.components</groupId>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
<artifactId>proto-definition</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Blueprint Processor Application Module Dependencies -->
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>processor-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>db-lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>rest-lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>dmaap-lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>execution-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>workflow-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>resource-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>selfservice-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
<artifactId>application</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Functions -->
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>resource-resolution</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>python-executor</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>netconf-executor</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.blueprintsprocessor.functions</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>restconf-executor</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Controller Blueprints Application Dependency -->
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-scripts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>db-resources</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
<version>${project.version}</version>
</dependency>
<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.apps</groupId>
- <artifactId>ccsdk-apps-ms</artifactId>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>ms</artifactId>
<version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>blueprintsprocessor</artifactId>
<packaging>pom</packaging>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.ccsdk.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<artifactId>cds-sdc-listener-application</artifactId>
<name>CDS-SDC Listener Application </name>
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
* proprietary to Bell Canada and are protected by trade secret or copyright law.
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import java.util.Optional;
-import org.onap.ccsdk.apps.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.results.IDistributionClientResult;
import org.onap.sdc.impl.DistributionClientFactory;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import java.util.List;
import org.onap.sdc.api.consumer.IConfiguration;
* proprietary to Bell Canada and are protected by trade secret or copyright law.
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import org.onap.sdc.api.IDistributionClient;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import static org.onap.sdc.utils.DistributionActionResultEnum.SUCCESS;
import java.util.List;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener.exceptions;
+package org.onap.ccsdk.cds.cdssdclistener.exceptions;
public class CdsSdcListenerException extends Exception {
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener.service;
+package org.onap.ccsdk.cds.cdssdclistener.service;
import java.io.File;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener.service;
+package org.onap.ccsdk.cds.cdssdclistener.service;
import java.io.File;
import org.springframework.stereotype.Component;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import mockit.Expectations;
import mockit.Injectable;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.ccsdk.apps.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.results.IDistributionClientResult;
import org.onap.sdc.impl.DistributionClientFactory;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.apps.cdssdclistener;
+package org.onap.ccsdk.cds.cdssdclistener;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
<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">
<parent>
<artifactId>cds-sdc-listener</artifactId>
- <groupId>org.onap.ccsdk.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<version>0.4.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.ccsdk.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<artifactId>cds-sdc-listener-distribution</artifactId>
<name>CDS-SDC Listener Distribution</name>
<?xml version="1.0" encoding="UTF-8"?>
<!--
- ~ Copyright (C) 2019 Bell Canada. All rights reserved.
- ~
- ~ NOTICE: All the intellectual and technical concepts contained herein are
- ~ proprietary to Bell Canada and are protected by trade secret or copyright law.
- ~ Unauthorized copying of this file, via any medium is strictly prohibited.
- -->
-<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">
- <parent>
- <artifactId>ccsdk-apps-ms</artifactId>
- <groupId>org.onap.ccsdk.apps</groupId>
- <version>0.4.2-SNAPSHOT</version>
- </parent>
+ * Copyright (C) 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">
+ <parent>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>ms</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>cds-sdc-listener</artifactId>
- <name>CDS-SDC Listener Root</name>
- <description>A microservice to get the cba file from SDC and store it into database at runtime</description>
- <packaging>pom</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>cds-sdc-listener</artifactId>
+ <name>CDS-SDC Listener Root</name>
+ <description>A microservice to get the cba file from SDC and store it into database at runtime</description>
+ <packaging>pom</packaging>
- <modules>
- <module>application</module>
- <!-- Module is not currently working
- <module>distribution</module>
- -->
- </modules>
+ <modules>
+ <module>application</module>
+ <!-- Module is not currently working
+ <module>distribution</module>
+ -->
+ </modules>
</project>
Application VM Arguments :\r
\r
-DappName=ControllerBluePrints\r
--Dms_name=org.onap.ccsdk.apps.controllerblueprints\r
+-Dms_name=org.onap.ccsdk.cds.controllerblueprints\r
-DappVersion=1.0.0\r
-Dlogging.config=etc/logback.xml\r
-Dspring.config.location=opt/app/onap/config/\r
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<properties>
<swagger.directory>${basedir}/target/src/main/resources/swagger-ui</swagger.directory>
<java.version>1.8</java.version>
- <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
+ <name.space>org.onap.ccsdk.cds</name.space> <!-- <name.space>${namespace}</name.space> -->
<serviceArtifactName>controllerblueprints</serviceArtifactName>
<!-- Sonar -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>service</artifactId>
</dependency>
<dependency>
<apiSources>
<apiSource>
<springmvc>true</springmvc>
- <locations>org.onap.ccsdk.apps.controllerblueprints.service.rs
+ <locations>org.onap.ccsdk.cds.controllerblueprints.service.rs
</locations>
<schemes>
<scheme>http</scheme>
-/*\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.apps.controllerblueprints;\r
-\r
-/**\r
- * ApplicationConstants.java Purpose: Provide ControllerBlueprintsApplication Constant Information\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@SuppressWarnings("unused")\r
-public final class ApplicationConstants {\r
-\r
-}\r
+/*
+ * 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 {
+
+}
-/*\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.apps.controllerblueprints;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import org.springframework.boot.SpringApplication;\r
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r
-import org.springframework.boot.autoconfigure.SpringBootApplication;\r
-import org.springframework.context.annotation.ComponentScan;\r
-import org.springframework.web.reactive.config.EnableWebFlux;\r
-\r
-/**\r
- * @author Brinda Santh\r
- */\r
-@SpringBootApplication\r
-@EnableWebFlux\r
-@ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints"})\r
-@EnableAutoConfiguration\r
-public class ControllerBlueprintsApplication {\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(ControllerBlueprintsApplication.class);\r
-\r
- public static void main(String[] args) {\r
- log.info("****** Starting Controlled Blueprints Application ******");\r
- SpringApplication.run(ControllerBlueprintsApplication.class, args);\r
- }\r
-\r
+/*
+ * 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 com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+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 EELFLogger log = EELFManager.getInstance().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
-/*\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.apps.controllerblueprints;\r
-\r
-import org.springframework.boot.autoconfigure.domain.EntityScan;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.data.jpa.repository.config.EnableJpaAuditing;\r
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;\r
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;\r
-import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;\r
-import org.springframework.transaction.annotation.EnableTransactionManagement;\r
-\r
-import javax.sql.DataSource;\r
-\r
-/**\r
- * DatabaseConfig.java Purpose: Provide Configuration Generator DatabaseConfig Information\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@Configuration\r
-@EntityScan("org.onap.ccsdk.apps.controllerblueprints.service.domain")\r
-@EnableTransactionManagement\r
-@EnableJpaRepositories("org.onap.ccsdk.apps.controllerblueprints.service.repository")\r
-@EnableJpaAuditing\r
-public class DatabaseConfig {\r
- /**\r
- * This is a entityManagerFactory method\r
- *\r
- * @param dataSource\r
- * @return LocalContainerEntityManagerFactoryBean\r
- */\r
-\r
- @Bean\r
- public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {\r
- HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\r
- vendorAdapter.setGenerateDdl(true);\r
- vendorAdapter.setShowSql(false);\r
- LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\r
- factory.setJpaVendorAdapter(vendorAdapter);\r
- factory.setPackagesToScan("org.onap.ccsdk.apps.controllerblueprints.service.domain");\r
- factory.setDataSource(dataSource);\r
- return factory;\r
- }\r
-\r
-}\r
+/*
+ * 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;
+ }
+
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints;
+package org.onap.ccsdk.cds.controllerblueprints;
import com.google.common.collect.Lists;
import org.jetbrains.annotations.NotNull;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpStatus;
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2018 IBM.\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.apps.controllerblueprints;\r
-\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.web.reactive.config.CorsRegistry;\r
-import org.springframework.web.reactive.config.ResourceHandlerRegistry;\r
-import org.springframework.web.reactive.config.WebFluxConfigurationSupport;\r
-\r
-/**\r
- * WebConfig\r
- *\r
- * @author Brinda Santh 8/13/2018\r
- */\r
-@Configuration\r
-@SuppressWarnings("unused")\r
-public class WebConfig extends WebFluxConfigurationSupport {\r
- @Override\r
- public void addResourceHandlers(ResourceHandlerRegistry registry) {\r
- registry.addResourceHandler("swagger-ui.html")\r
- .addResourceLocations("classpath:/META-INF/resources/");\r
-\r
- registry.addResourceHandler("/webjars/**")\r
- .addResourceLocations("classpath:/META-INF/resources/webjars/");\r
-\r
- }\r
-\r
- @Override\r
- public void addCorsMappings(CorsRegistry corsRegistry) {\r
- corsRegistry.addMapping("/**")\r
- .allowedOrigins("*")\r
- .allowedMethods("*")\r
- .allowedHeaders("DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range")\r
- .maxAge(3600);\r
- }\r
-}\r
+/*
+ * 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);
+ }
+}
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.filters;\r
-\r
-import com.google.common.base.Preconditions;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Value;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.http.HttpHeaders;\r
-import org.springframework.http.server.reactive.ServerHttpRequest;\r
-import org.springframework.http.server.reactive.ServerHttpResponse;\r
-import org.springframework.web.server.ServerWebExchange;\r
-import org.springframework.web.server.WebFilter;\r
-import org.springframework.web.server.WebFilterChain;\r
-import reactor.core.publisher.Mono;\r
-\r
-import java.time.ZoneOffset;\r
-import java.time.ZonedDateTime;\r
-import java.time.format.DateTimeFormatter;\r
-import java.util.UUID;\r
-\r
-/**\r
- * ApplicationLoggingFilter\r
- *\r
- * @author Brinda Santh 8/14/2018\r
- */\r
-@Configuration\r
-@SuppressWarnings("unused")\r
-public class ApplicationLoggingFilter implements WebFilter {\r
- private static Logger log = LoggerFactory.getLogger(ApplicationLoggingFilter.class);\r
-\r
- @SuppressWarnings("unused")\r
- @Value("${appVersion}")\r
- private String appVersion;\r
-\r
- @Override\r
- public Mono<Void> filter(ServerWebExchange serverWebExchange, WebFilterChain webFilterChain) {\r
- try {\r
-\r
- ServerHttpRequest request = serverWebExchange.getRequest();\r
- ServerHttpResponse response = serverWebExchange.getResponse();\r
-\r
- String[] tokens = StringUtils.split(appVersion, '.');\r
- Preconditions.checkNotNull(tokens, "failed to split application versions");\r
- Preconditions.checkArgument(tokens.length == 3, "failed to tokenize application versions");\r
- HttpHeaders header = response.getHeaders();\r
-\r
- String requestID = defaultToUUID(request.getHeaders().getFirst("X-ONAP-RequestID"));\r
- String invocationID = defaultToUUID(request.getHeaders().getFirst("X-ONAP-InvocationID"));\r
- String partnerName = defaultToEmpty(request.getHeaders().getFirst("X-ONAP-PartnerName"));\r
- MDC.put("InvokeTimestamp", ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT));\r
- MDC.put("RequestID", requestID);\r
- MDC.put("InvocationID", invocationID);\r
- MDC.put("PartnerName", partnerName);\r
- MDC.put("ClientIPAddress", defaultToEmpty(request.getRemoteAddress().getAddress()));\r
- MDC.put("ServerFQDN", defaultToEmpty(request.getRemoteAddress().getHostString()));\r
-\r
- header.add(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID, requestID);\r
- header.add(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION, tokens[1]);\r
- header.add(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION, tokens[2]);\r
- header.add(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION, appVersion);\r
- } catch (Exception e) {\r
- e.printStackTrace();\r
- }\r
-\r
- return webFilterChain.filter(serverWebExchange);\r
-\r
- }\r
-\r
- private static String defaultToUUID(String in) {\r
- return in == null ? UUID.randomUUID().toString() : in;\r
- }\r
-\r
- private static String defaultToEmpty(Object in) {\r
- return in == null ? "" : in.toString();\r
- }\r
-\r
-\r
+/*
+ * 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.filters;
+
+import com.google.common.base.Preconditions;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.server.reactive.ServerHttpRequest;
+import org.springframework.http.server.reactive.ServerHttpResponse;
+import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.server.WebFilter;
+import org.springframework.web.server.WebFilterChain;
+import reactor.core.publisher.Mono;
+
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.UUID;
+
+/**
+ * ApplicationLoggingFilter
+ *
+ * @author Brinda Santh 8/14/2018
+ */
+@Configuration
+@SuppressWarnings("unused")
+public class ApplicationLoggingFilter implements WebFilter {
+ private static Logger log = LoggerFactory.getLogger(ApplicationLoggingFilter.class);
+
+ @SuppressWarnings("unused")
+ @Value("${appVersion}")
+ private String appVersion;
+
+ @Override
+ public Mono<Void> filter(ServerWebExchange serverWebExchange, WebFilterChain webFilterChain) {
+ try {
+
+ ServerHttpRequest request = serverWebExchange.getRequest();
+ ServerHttpResponse response = serverWebExchange.getResponse();
+
+ String[] tokens = StringUtils.split(appVersion, '.');
+ Preconditions.checkNotNull(tokens, "failed to split application versions");
+ Preconditions.checkArgument(tokens.length == 3, "failed to tokenize application versions");
+ HttpHeaders header = response.getHeaders();
+
+ String requestID = defaultToUUID(request.getHeaders().getFirst("X-ONAP-RequestID"));
+ String invocationID = defaultToUUID(request.getHeaders().getFirst("X-ONAP-InvocationID"));
+ String partnerName = defaultToEmpty(request.getHeaders().getFirst("X-ONAP-PartnerName"));
+ MDC.put("InvokeTimestamp", ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT));
+ MDC.put("RequestID", requestID);
+ MDC.put("InvocationID", invocationID);
+ MDC.put("PartnerName", partnerName);
+ MDC.put("ClientIPAddress", defaultToEmpty(request.getRemoteAddress().getAddress()));
+ MDC.put("ServerFQDN", defaultToEmpty(request.getRemoteAddress().getHostString()));
+
+ header.add(BluePrintConstants.RESPONSE_HEADER_TRANSACTION_ID, requestID);
+ header.add(BluePrintConstants.RESPONSE_HEADER_MINOR_VERSION, tokens[1]);
+ header.add(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION, tokens[2]);
+ header.add(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION, appVersion);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return webFilterChain.filter(serverWebExchange);
+
+ }
+
+ private static String defaultToUUID(String in) {
+ return in == null ? UUID.randomUUID().toString() : in;
+ }
+
+ private static String defaultToEmpty(Object in) {
+ return in == null ? "" : in.toString();
+ }
+
+
}
\ No newline at end of file
-/*\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.apps.controllerblueprints.security;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import org.springframework.beans.factory.annotation.Value;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;\r
-import org.springframework.security.config.web.server.ServerHttpSecurity;\r
-import org.springframework.security.core.userdetails.MapReactiveUserDetailsService;\r
-import org.springframework.security.core.userdetails.User;\r
-import org.springframework.security.core.userdetails.UserDetails;\r
-import org.springframework.security.web.server.SecurityWebFilterChain;\r
-\r
-@SuppressWarnings("unused")\r
-@EnableWebFluxSecurity\r
-public class ApplicationSecurityConfigurerAdapter {\r
-\r
- @Value("${basic-auth.user-name}")\r
- private String userName;\r
-\r
- @Value("${basic-auth.hashed-pwd}")\r
- private String userHashedPassword;\r
-\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(ApplicationSecurityConfigurerAdapter.class);\r
-\r
- @Bean\r
- public SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {\r
-\r
- http.csrf().disable();\r
- http.authorizeExchange()\r
- .pathMatchers("/webjars/**", "/actuator/**").permitAll()\r
- .anyExchange().authenticated()\r
- .and().httpBasic();\r
-\r
- return http.build();\r
- }\r
-\r
- @Bean\r
- public MapReactiveUserDetailsService userDetailsService() {\r
- User.UserBuilder userBuilder = User.builder();\r
- UserDetails defaultUser = userBuilder\r
- .username(userName)\r
- .password(userHashedPassword).roles("USER").build();\r
- return new MapReactiveUserDetailsService(defaultUser);\r
- }\r
+/*
+ * 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 com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+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 EELFLogger log = EELFManager.getInstance().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
# limitations under the License.
#
appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
+ms_name=org.onap.ccsdk.cds.controllerblueprints
appVersion=1.0.0
# Basic Authentication
# limitations under the License.
#
appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
+ms_name=org.onap.ccsdk.cds.controllerblueprints
appVersion=1.0.0
# Basic Authentication
<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.apps" level="info"/>
+ <logger name="org.onap.ccsdk.cds" level="info"/>
<root level="warn">
<appender-ref ref="STDOUT"/>
* limitations under the License.\r
*/\r
\r
-package org.onap.ccsdk.apps.controllerblueprints;\r
+package org.onap.ccsdk.cds.controllerblueprints;\r
\r
import org.junit.Before;\r
import org.junit.Test;\r
* limitations under the License.\r
*/\r
\r
-package org.onap.ccsdk.apps.controllerblueprints;\r
+package org.onap.ccsdk.cds.controllerblueprints;\r
\r
import com.att.eelf.configuration.EELFLogger;\r
import com.att.eelf.configuration.EELFManager;\r
spring.main.banner-mode=off\r
\r
appName=ControllerBluePrints\r
-ms_name=org.onap.ccsdk.apps.controllerblueprints\r
+ms_name=org.onap.ccsdk.cds.controllerblueprints\r
appVersion=1.0.0\r
\r
# Basic Authentication\r
\r
<logger name="org.springframework" level="warn"/>\r
<logger name="org.hibernate" level="info"/>\r
- <logger name="org.onap.ccsdk.apps.controllerblueprints" level="info"/>\r
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>\r
\r
<root level="warn">\r
<appender-ref ref="STDOUT"/>\r
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<name>Controller Blueprints Distribution</name>
<properties>
<assembly.id>maven</assembly.id>
- <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
+ <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>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>application</artifactId>
</dependency>
</dependencies>
-DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \
-DSecurityFilePath=/etc \
-DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \
--Dms_name=org.onap.ccsdk.apps.controllerblueprints \
+-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.apps.controllerblueprints.ControllerBlueprintsApplication
+org.onap.ccsdk.cds.controllerblueprints.ControllerBlueprintsApplication
"type": "string"
},
"mask-info": {
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.apps.controllerblueprints.core.data.custom.MaskInfo ",
+ "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.cds.controllerblueprints.core.data.custom.MaskInfo ",
"required": false,
"type": "string"
},
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
/**
* BluePrintConstants
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
class BluePrintError {
var errors: MutableList<String> = arrayListOf()
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
/**
*
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.helpers.MessageFormatter
import kotlin.reflect.KClass
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import java.io.File
import java.io.InputStream
import java.nio.file.Path
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.common
+package org.onap.ccsdk.cds.controllerblueprints.core.common
object ApplicationConstants {
const val ACTIVE_Y = "Y"
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.config
+package org.onap.ccsdk.cds.controllerblueprints.core.config
open class BluePrintLoadConfiguration {
*/
@file:Suppress("unused")
-package org.onap.ccsdk.apps.controllerblueprints.core.data
+package org.onap.ccsdk.cds.controllerblueprints.core.data
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
*/
@file:Suppress("unused")
-package org.onap.ccsdk.apps.controllerblueprints.core.data
+package org.onap.ccsdk.cds.controllerblueprints.core.data
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.data
+package org.onap.ccsdk.cds.controllerblueprints.core.data
import java.util.HashMap
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
import org.jetbrains.annotations.NotNull
import org.jetbrains.annotations.Nullable
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import java.io.File
import java.nio.file.Path
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
interface BluePrintEnhancer<T> {
fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: T)
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
import java.io.Serializable
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
interface BluePrintScriptsService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
interface BluePrintWorkflowExecutionService<Input, Output> {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import java.util.function.Function
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.interfaces
+package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
interface BluePrintValidator<T> {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
/**
*
*
*/
@file:Suppress("unused")
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.node.TextNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ImportDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.ServiceTemplateUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ImportDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.ServiceTemplateUtils
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
open class BluePrintRepoFileService(modelTypePath: String) : BluePrintRepoService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.fasterxml.jackson.databind.node.NullNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
-import org.onap.ccsdk.apps.controllerblueprints.core.*
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import java.io.File
interface BluePrintRuntimeService<T> {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.fasterxml.jackson.core.io.CharTypes
import com.fasterxml.jackson.databind.JsonNode
import org.apache.commons.lang3.StringUtils
import org.apache.velocity.VelocityContext
import org.apache.velocity.app.Velocity
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import java.io.StringWriter
open class BluePrintTemplateService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.*
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import java.io.Serializable
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JsonParserUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.ResourceResolverUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JsonParserUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.ResourceResolverUtils
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream
import org.apache.commons.io.IOUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.io.BufferedInputStream
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.runBlocking
import org.apache.commons.io.FileUtils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ImportDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ImportDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import java.io.File
import java.io.FileFilter
import java.nio.file.Files
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ToscaMetaData
-import org.onap.ccsdk.apps.controllerblueprints.core.normalizedFile
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintImportService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ToscaMetaData
+import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintImportService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import java.io.File
import java.nio.charset.Charset
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.apache.commons.io.IOUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.normalizedFile
+import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import java.io.File
import java.nio.charset.Charset
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.apache.commons.io.IOUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.*
import java.io.File
import java.nio.charset.Charset
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.fasterxml.jackson.databind.JsonNode
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import java.io.File
import java.net.URL
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.TopologyTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
/**
*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core
+package org.onap.ccsdk.cds.controllerblueprints.core
import org.junit.Test
import kotlin.test.assertEquals
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertNotNull
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ExpressionData
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ExpressionData
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import kotlin.test.assertNotNull
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintRuntimeUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintRuntimeUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.service
+package org.onap.ccsdk.cds.controllerblueprints.core.service
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertNotNull
class BluePrintTemplateServiceTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import kotlinx.coroutines.runBlocking
import org.junit.Test
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ToscaMetaData
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ToscaMetaData
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import kotlin.test.assertEquals
class JsonParserUtilsTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.core.utils
+package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
* limitations under the License.
*/
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
open class SampleBlueprintFunctionNode : BlueprintFunctionNode<String, String>{
<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">
<parent>
<artifactId>modules</artifactId>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
import java.io.File
import java.io.Serializable
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoots
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.util.*
import kotlin.script.experimental.api.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
import java.io.File
import kotlin.script.experimental.annotations.KotlinScript
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.springframework.stereotype.Service
import java.io.File
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.scripts
+package org.onap.ccsdk.cds.controllerblueprints.scripts
import org.apache.commons.io.FileUtils
* limitations under the License.
*/
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.springframework.stereotype.Service
@Service
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
</dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactType
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintArtifactTypeValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("default-artifact-type-validator")
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.AttributeDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.apps.controllerblueprints.core.data.DataType
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintDataTypeValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDataTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("default-data-type-validator")
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants
-import org.onap.ccsdk.apps.controllerblueprints.validation.extension.ResourceDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import org.springframework.stereotype.Service
import java.io.File
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintExpressionService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintExpressionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintNodeTypeValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintServiceTemplateValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.TopologyTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.*
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.*
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation.extension
+package org.onap.ccsdk.cds.controllerblueprints.validation.extension
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceAssignmentValidationServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.service.ResourceAssignmentValidationServiceImpl
import org.springframework.stereotype.Service
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation.extension
+package org.onap.ccsdk.cds.controllerblueprints.validation.extension
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidator
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
import io.mockk.every
import io.mockk.mockk
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintError
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeType
-import org.onap.ccsdk.apps.controllerblueprints.core.data.Step
-import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
-import org.onap.ccsdk.apps.controllerblueprints.validation.extension.ResourceDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
+import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
+import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import kotlin.test.assertEquals
import kotlin.test.assertTrue
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.validation
+package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.*
class MockBluePrintTypeValidatorService : BluePrintTypeValidatorService {
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.db.resources
-
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintArchiveUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintFileUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
+package org.onap.ccsdk.cds.controllerblueprints.db.resources
+
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import java.io.File
import java.nio.file.Path
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.db.resources.repository
+package org.onap.ccsdk.cds.controllerblueprints.db.resources.repository
import org.jetbrains.annotations.NotNull
import java.util.Optional
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.db.resources.repository
+package org.onap.ccsdk.cds.controllerblueprints.db.resources.repository
import org.jetbrains.annotations.NotNull
import org.springframework.data.jpa.repository.JpaRepository
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.db.resources
+package org.onap.ccsdk.cds.controllerblueprints.db.resources
// TODO
class BlueprintCatalogServiceImplTest
\ No newline at end of file
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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>parent</artifactId>
<version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
<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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
</dependency>
<dependency>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict
import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.annotation.JsonProperty
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import java.io.Serializable
import java.util.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict
/**
* ResourceDictionaryConstants
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
/**
* ResourceSourceMappingFactory.
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.service
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.service
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import org.apache.commons.collections.CollectionUtils
import org.apache.commons.lang3.StringUtils
import org.apache.commons.lang3.text.StrBuilder
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.TopologicalSortingUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.TopologicalSortingUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import java.io.Serializable
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils
import com.att.eelf.configuration.EELFLogger
import org.apache.commons.collections.CollectionUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.TopologicalSortingUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.TopologicalSortingUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import com.att.eelf.configuration.EELFManager
import java.util.ArrayList
/**
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.node.NullNode
import org.apache.commons.collections.MapUtils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintFileUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict;
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict;
import org.junit.Assert;
import org.junit.Test;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory;
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory;
import org.junit.Test;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping;
import org.springframework.util.Assert;
public class ResourceSourceMappingFactoryTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.service
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.service
import com.att.eelf.configuration.EELFLogger
import org.junit.Assert
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import com.att.eelf.configuration.EELFManager
import org.junit.Before
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils
/**
* ResourceAssignmentValidationServiceTest.
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils;
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils;
import org.junit.Assert;
import org.junit.Test;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
import java.util.List;
/**
* BulkResourceSequencingUtils.
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils;
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils;
import com.fasterxml.jackson.databind.JsonNode;
import org.junit.Assert;
import org.junit.Test;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils
+package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
object ResourceDictionaryTestUtils {
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.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>modules</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>kotlinx-coroutines-reactor</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>db-resources</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-scripts</artifactId>
</dependency>
<dependency>
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import org.apache.commons.collections.CollectionUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;\r
-import org.springframework.beans.factory.annotation.Value;\r
-import org.springframework.stereotype.Component;\r
-\r
-import javax.annotation.PostConstruct;\r
-import java.util.List;\r
-\r
-@Component\r
-@SuppressWarnings("unused")\r
-public class ApplicationRegistrationService {\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(ApplicationRegistrationService.class);\r
-\r
- @Value("#{'${resourceSourceMappings}'.split(',')}")\r
- private List<String> resourceSourceMappings;\r
-\r
- @PostConstruct\r
- public void register() {\r
- registerDictionarySources();\r
- }\r
-\r
- public void registerDictionarySources() {\r
- log.info("Registering Dictionary Sources : {}", resourceSourceMappings);\r
- if (CollectionUtils.isNotEmpty(resourceSourceMappings)) {\r
- resourceSourceMappings.forEach(resourceSourceMapping -> {\r
- String[] mappingKeyValue = resourceSourceMapping.split("=");\r
- if (mappingKeyValue != null && mappingKeyValue.length == 2) {\r
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping(mappingKeyValue[0].trim(), mappingKeyValue[1].trim());\r
- } else {\r
- log.warn("failed to get resource source mapping {}", resourceSourceMapping);\r
- }\r
- });\r
- }\r
- }\r
-}\r
+/*
+ * 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;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.apache.commons.collections.CollectionUtils;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+
+@Component
+@SuppressWarnings("unused")
+public class ApplicationRegistrationService {
+ private static EELFLogger log = EELFManager.getInstance().getLogger(ApplicationRegistrationService.class);
+
+ @Value("#{'${resourceSourceMappings}'.split(',')}")
+ private List<String> resourceSourceMappings;
+
+ @PostConstruct
+ public void register() {
+ registerDictionarySources();
+ }
+
+ public void registerDictionarySources() {
+ log.info("Registering Dictionary Sources : {}", resourceSourceMappings);
+ if (CollectionUtils.isNotEmpty(resourceSourceMappings)) {
+ resourceSourceMappings.forEach(resourceSourceMapping -> {
+ String[] mappingKeyValue = resourceSourceMapping.split("=");
+ if (mappingKeyValue != null && mappingKeyValue.length == 2) {
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping(mappingKeyValue[0].trim(), mappingKeyValue[1].trim());
+ } else {
+ log.warn("failed to get resource source mapping {}", resourceSourceMapping);
+ }
+ });
+ }
+ }
+}
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import com.google.common.base.Preconditions;\r
-import org.apache.commons.collections.CollectionUtils;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.model.AutoMapResponse;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ResourceDictionaryRepository;\r
-import org.springframework.stereotype.Service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-/**\r
- * AutoResourceMappingService.java Purpose: Provide Automapping of Resource Assignments AutoResourceMappingService\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-\r
-@Service\r
-@SuppressWarnings("unused")\r
-public class AutoResourceMappingService {\r
-\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(AutoResourceMappingService.class);\r
-\r
- private ResourceDictionaryRepository dataDictionaryRepository;\r
-\r
- /**\r
- * This is a AutoResourceMappingService constructor\r
- *\r
- * @param dataDictionaryRepository dataDictionaryRepository\r
- */\r
- public AutoResourceMappingService(ResourceDictionaryRepository dataDictionaryRepository) {\r
- this.dataDictionaryRepository = dataDictionaryRepository;\r
- }\r
-\r
- /**\r
- * This is a autoMap service to map the template keys automatically to Dictionary fields.\r
- *\r
- * @param resourceAssignments resourceAssignments\r
- * @return AutoMapResponse\r
- */\r
- public AutoMapResponse autoMap(List<ResourceAssignment> resourceAssignments) throws BluePrintException {\r
- AutoMapResponse autoMapResponse = new AutoMapResponse();\r
- try {\r
- if (CollectionUtils.isNotEmpty(resourceAssignments)) {\r
-\r
- // Create the Dictionary definitions for the ResourceAssignment Names\r
- Map<String, ResourceDictionary> dictionaryMap = getDictionaryDefinitions(resourceAssignments);\r
-\r
- for (ResourceAssignment resourceAssignment : resourceAssignments) {\r
- if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getName())\r
- && StringUtils.isBlank(resourceAssignment.getDictionaryName())) {\r
-\r
- populateDictionaryMapping(dictionaryMap, resourceAssignment);\r
-\r
- log.info("Mapped Resource : {}", resourceAssignment);\r
-\r
- }\r
- }\r
- }\r
- List<ResourceDictionary> dictionaries = getDictionaryDefinitionsList(resourceAssignments);\r
- List<ResourceAssignment> resourceAssignmentsFinal = getAllAutomapResourceAssignments(resourceAssignments);\r
- autoMapResponse.setDataDictionaries(dictionaries);\r
- autoMapResponse.setResourceAssignments(resourceAssignmentsFinal);\r
- } catch (Exception e) {\r
- log.error(String.format("Failed in auto process %s", e.getMessage()));\r
- throw new BluePrintException(e.getMessage(), e);\r
- }\r
- return autoMapResponse;\r
- }\r
-\r
- private void populateDictionaryMapping(Map<String, ResourceDictionary> dictionaryMap, ResourceAssignment resourceAssignment) {\r
- ResourceDictionary dbDataDictionary = dictionaryMap.get(resourceAssignment.getName());\r
- if (dbDataDictionary != null && dbDataDictionary.getDefinition() != null) {\r
-\r
- ResourceDefinition dictionaryDefinition = dbDataDictionary.getDefinition();\r
-\r
- if (dictionaryDefinition != null && StringUtils.isNotBlank(dictionaryDefinition.getName())\r
- && StringUtils.isBlank(resourceAssignment.getDictionaryName())) {\r
-\r
- resourceAssignment.setDictionaryName(dbDataDictionary.getName());\r
- ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, dictionaryDefinition);\r
- }\r
- }\r
- }\r
-\r
- private Map<String, ResourceDictionary> getDictionaryDefinitions(List<ResourceAssignment> resourceAssignments) {\r
- Map<String, ResourceDictionary> dictionaryMap = new HashMap<>();\r
- List<String> names = new ArrayList<>();\r
- for (ResourceAssignment resourceAssignment : resourceAssignments) {\r
- if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getName())) {\r
- names.add(resourceAssignment.getName());\r
- }\r
- }\r
- if (CollectionUtils.isNotEmpty(names)) {\r
-\r
- List<ResourceDictionary> dictionaries = dataDictionaryRepository.findByNameIn(names);\r
- if (CollectionUtils.isNotEmpty(dictionaries)) {\r
- for (ResourceDictionary dataDictionary : dictionaries) {\r
- if (dataDictionary != null && StringUtils.isNotBlank(dataDictionary.getName())) {\r
- dictionaryMap.put(dataDictionary.getName(), dataDictionary);\r
- }\r
- }\r
- }\r
- }\r
- return dictionaryMap;\r
-\r
- }\r
-\r
- private List<ResourceDictionary> getDictionaryDefinitionsList(List<ResourceAssignment> resourceAssignments) {\r
- List<ResourceDictionary> dictionaries = null;\r
- List<String> names = new ArrayList<>();\r
- for (ResourceAssignment resourceAssignment : resourceAssignments) {\r
- if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getDictionaryName())) {\r
-\r
- if (!names.contains(resourceAssignment.getDictionaryName())) {\r
- names.add(resourceAssignment.getDictionaryName());\r
- }\r
-\r
- if (resourceAssignment.getDependencies() != null && !resourceAssignment.getDependencies().isEmpty()) {\r
- List<String> dependencyNames = resourceAssignment.getDependencies();\r
- for (String dependencyName : dependencyNames) {\r
- if (StringUtils.isNotBlank(dependencyName) && !names.contains(dependencyName)) {\r
- names.add(dependencyName);\r
- }\r
- }\r
- }\r
- }\r
- }\r
- if (CollectionUtils.isNotEmpty(names)) {\r
- dictionaries = dataDictionaryRepository.findByNameIn(names);\r
- }\r
- return dictionaries;\r
-\r
- }\r
-\r
- private List<ResourceAssignment> getAllAutomapResourceAssignments(List<ResourceAssignment> resourceAssignments) {\r
- List<ResourceDictionary> dictionaries = null;\r
- List<String> names = new ArrayList<>();\r
- for (ResourceAssignment resourceAssignment : resourceAssignments) {\r
- if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getDictionaryName())) {\r
- if (resourceAssignment.getDependencies() != null && !resourceAssignment.getDependencies().isEmpty()) {\r
- List<String> dependencieNames = resourceAssignment.getDependencies();\r
- for (String dependencieName : dependencieNames) {\r
- if (StringUtils.isNotBlank(dependencieName) && !names.contains(dependencieName)\r
- && !checkAssignmentsExists(resourceAssignments, dependencieName)) {\r
- names.add(dependencieName);\r
- }\r
- }\r
- }\r
- }\r
- }\r
-\r
- if (!names.isEmpty()) {\r
- dictionaries = dataDictionaryRepository.findByNameIn(names);\r
- }\r
- if (dictionaries != null) {\r
- for (ResourceDictionary resourcedictionary : dictionaries) {\r
- ResourceDefinition dictionaryDefinition = resourcedictionary.getDefinition();\r
- Preconditions.checkNotNull(dictionaryDefinition, "failed to get Resource Definition from dictionary definition");\r
- PropertyDefinition property = new PropertyDefinition();\r
- property.setRequired(true);\r
- ResourceAssignment resourceAssignment = new ResourceAssignment();\r
- resourceAssignment.setName(resourcedictionary.getName());\r
- resourceAssignment.setDictionaryName(resourcedictionary\r
- .getName());\r
- resourceAssignment.setVersion(0);\r
- resourceAssignment.setProperty(property);\r
- ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, dictionaryDefinition);\r
- resourceAssignments.add(resourceAssignment);\r
- }\r
- }\r
- return resourceAssignments;\r
-\r
- }\r
-\r
-\r
- private boolean checkAssignmentsExists(List<ResourceAssignment> resourceAssignmentsWithDepencies, String resourceName) {\r
- return resourceAssignmentsWithDepencies.stream().anyMatch(names -> names.getName().equalsIgnoreCase(resourceName));\r
- }\r
-\r
-}\r
+/*
+ * 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;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.google.common.base.Preconditions;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException;
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary;
+import org.onap.ccsdk.cds.controllerblueprints.service.model.AutoMapResponse;
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ResourceDictionaryRepository;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AutoResourceMappingService.java Purpose: Provide Automapping of Resource Assignments AutoResourceMappingService
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+
+@Service
+@SuppressWarnings("unused")
+public class AutoResourceMappingService {
+
+ private static EELFLogger log = EELFManager.getInstance().getLogger(AutoResourceMappingService.class);
+
+ private ResourceDictionaryRepository dataDictionaryRepository;
+
+ /**
+ * This is a AutoResourceMappingService constructor
+ *
+ * @param dataDictionaryRepository dataDictionaryRepository
+ */
+ public AutoResourceMappingService(ResourceDictionaryRepository dataDictionaryRepository) {
+ this.dataDictionaryRepository = dataDictionaryRepository;
+ }
+
+ /**
+ * This is a autoMap service to map the template keys automatically to Dictionary fields.
+ *
+ * @param resourceAssignments resourceAssignments
+ * @return AutoMapResponse
+ */
+ public AutoMapResponse autoMap(List<ResourceAssignment> resourceAssignments) throws BluePrintException {
+ AutoMapResponse autoMapResponse = new AutoMapResponse();
+ try {
+ if (CollectionUtils.isNotEmpty(resourceAssignments)) {
+
+ // Create the Dictionary definitions for the ResourceAssignment Names
+ Map<String, ResourceDictionary> dictionaryMap = getDictionaryDefinitions(resourceAssignments);
+
+ for (ResourceAssignment resourceAssignment : resourceAssignments) {
+ if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getName())
+ && StringUtils.isBlank(resourceAssignment.getDictionaryName())) {
+
+ populateDictionaryMapping(dictionaryMap, resourceAssignment);
+
+ log.info("Mapped Resource : {}", resourceAssignment);
+
+ }
+ }
+ }
+ List<ResourceDictionary> dictionaries = getDictionaryDefinitionsList(resourceAssignments);
+ List<ResourceAssignment> resourceAssignmentsFinal = getAllAutomapResourceAssignments(resourceAssignments);
+ autoMapResponse.setDataDictionaries(dictionaries);
+ autoMapResponse.setResourceAssignments(resourceAssignmentsFinal);
+ } catch (Exception e) {
+ log.error(String.format("Failed in auto process %s", e.getMessage()));
+ throw new BluePrintException(e.getMessage(), e);
+ }
+ return autoMapResponse;
+ }
+
+ private void populateDictionaryMapping(Map<String, ResourceDictionary> dictionaryMap, ResourceAssignment resourceAssignment) {
+ ResourceDictionary dbDataDictionary = dictionaryMap.get(resourceAssignment.getName());
+ if (dbDataDictionary != null && dbDataDictionary.getDefinition() != null) {
+
+ ResourceDefinition dictionaryDefinition = dbDataDictionary.getDefinition();
+
+ if (dictionaryDefinition != null && StringUtils.isNotBlank(dictionaryDefinition.getName())
+ && StringUtils.isBlank(resourceAssignment.getDictionaryName())) {
+
+ resourceAssignment.setDictionaryName(dbDataDictionary.getName());
+ ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, dictionaryDefinition);
+ }
+ }
+ }
+
+ private Map<String, ResourceDictionary> getDictionaryDefinitions(List<ResourceAssignment> resourceAssignments) {
+ Map<String, ResourceDictionary> dictionaryMap = new HashMap<>();
+ List<String> names = new ArrayList<>();
+ for (ResourceAssignment resourceAssignment : resourceAssignments) {
+ if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getName())) {
+ names.add(resourceAssignment.getName());
+ }
+ }
+ if (CollectionUtils.isNotEmpty(names)) {
+
+ List<ResourceDictionary> dictionaries = dataDictionaryRepository.findByNameIn(names);
+ if (CollectionUtils.isNotEmpty(dictionaries)) {
+ for (ResourceDictionary dataDictionary : dictionaries) {
+ if (dataDictionary != null && StringUtils.isNotBlank(dataDictionary.getName())) {
+ dictionaryMap.put(dataDictionary.getName(), dataDictionary);
+ }
+ }
+ }
+ }
+ return dictionaryMap;
+
+ }
+
+ private List<ResourceDictionary> getDictionaryDefinitionsList(List<ResourceAssignment> resourceAssignments) {
+ List<ResourceDictionary> dictionaries = null;
+ List<String> names = new ArrayList<>();
+ for (ResourceAssignment resourceAssignment : resourceAssignments) {
+ if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getDictionaryName())) {
+
+ if (!names.contains(resourceAssignment.getDictionaryName())) {
+ names.add(resourceAssignment.getDictionaryName());
+ }
+
+ if (resourceAssignment.getDependencies() != null && !resourceAssignment.getDependencies().isEmpty()) {
+ List<String> dependencyNames = resourceAssignment.getDependencies();
+ for (String dependencyName : dependencyNames) {
+ if (StringUtils.isNotBlank(dependencyName) && !names.contains(dependencyName)) {
+ names.add(dependencyName);
+ }
+ }
+ }
+ }
+ }
+ if (CollectionUtils.isNotEmpty(names)) {
+ dictionaries = dataDictionaryRepository.findByNameIn(names);
+ }
+ return dictionaries;
+
+ }
+
+ private List<ResourceAssignment> getAllAutomapResourceAssignments(List<ResourceAssignment> resourceAssignments) {
+ List<ResourceDictionary> dictionaries = null;
+ List<String> names = new ArrayList<>();
+ for (ResourceAssignment resourceAssignment : resourceAssignments) {
+ if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getDictionaryName())) {
+ if (resourceAssignment.getDependencies() != null && !resourceAssignment.getDependencies().isEmpty()) {
+ List<String> dependencieNames = resourceAssignment.getDependencies();
+ for (String dependencieName : dependencieNames) {
+ if (StringUtils.isNotBlank(dependencieName) && !names.contains(dependencieName)
+ && !checkAssignmentsExists(resourceAssignments, dependencieName)) {
+ names.add(dependencieName);
+ }
+ }
+ }
+ }
+ }
+
+ if (!names.isEmpty()) {
+ dictionaries = dataDictionaryRepository.findByNameIn(names);
+ }
+ if (dictionaries != null) {
+ for (ResourceDictionary resourcedictionary : dictionaries) {
+ ResourceDefinition dictionaryDefinition = resourcedictionary.getDefinition();
+ Preconditions.checkNotNull(dictionaryDefinition, "failed to get Resource Definition from dictionary definition");
+ PropertyDefinition property = new PropertyDefinition();
+ property.setRequired(true);
+ ResourceAssignment resourceAssignment = new ResourceAssignment();
+ resourceAssignment.setName(resourcedictionary.getName());
+ resourceAssignment.setDictionaryName(resourcedictionary
+ .getName());
+ resourceAssignment.setVersion(0);
+ resourceAssignment.setProperty(property);
+ ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, dictionaryDefinition);
+ resourceAssignments.add(resourceAssignment);
+ }
+ }
+ return resourceAssignments;
+
+ }
+
+
+ private boolean checkAssignmentsExists(List<ResourceAssignment> resourceAssignmentsWithDepencies, String resourceName) {
+ return resourceAssignmentsWithDepencies.stream().anyMatch(names -> names.getName().equalsIgnoreCase(resourceName));
+ }
+
+}
-/*\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.apps.controllerblueprints.service;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import com.google.common.base.Preconditions;\r
-import org.apache.commons.collections.MapUtils;\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.data.DataType;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.common.SwaggerGenerator;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-/**\r
- * SchemaGeneratorService.java Purpose: Provide Service to generate service template input schema definition and Sample\r
- * Json generation.\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@Deprecated\r
-public class SchemaGeneratorService {\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(SchemaGeneratorService.class);\r
-\r
- private Map<String, DataType> dataTypes;\r
-\r
- /**\r
- * This is a SchemaGeneratorService constructor\r
- */\r
- public SchemaGeneratorService() {\r
- dataTypes = new HashMap<>();\r
- }\r
-\r
- /**\r
- * This is a generateSchema\r
- *\r
- * @param serviceTemplateContent service template content\r
- * @return String\r
- * @throws BluePrintException Blueprint Exception\r
- */\r
- public String generateSchema(String serviceTemplateContent) throws BluePrintException {\r
- if (StringUtils.isNotBlank(serviceTemplateContent)) {\r
- ServiceTemplate serviceTemplate = JacksonUtils.Companion.readValue(serviceTemplateContent,\r
- ServiceTemplate.class);\r
- return generateSchema(serviceTemplate);\r
- } else {\r
- throw new BluePrintException(\r
- "Service Template Content is (" + serviceTemplateContent + ") not Defined.");\r
- }\r
- }\r
-\r
- /**\r
- * This is a generateSchema\r
- *\r
- * @param serviceTemplate service template content\r
- * @return String\r
- * @throws BluePrintException Blueprint Exception\r
- */\r
- public String generateSchema(ServiceTemplate serviceTemplate) throws BluePrintException {\r
- String schemaContent = null;\r
- Preconditions.checkNotNull(serviceTemplate, "Service Template is not defined.");\r
- try {\r
- if (serviceTemplate.getTopologyTemplate() != null\r
- && serviceTemplate.getTopologyTemplate().getInputs() != null) {\r
- SwaggerGenerator swaggerGenerator = new SwaggerGenerator(serviceTemplate);\r
- schemaContent = swaggerGenerator.generateSwagger();\r
- }\r
- } catch (Exception e) {\r
- throw new BluePrintException(e.getMessage(), e);\r
- }\r
-\r
- return schemaContent;\r
- }\r
-\r
- private void manageServiceTemplateActions(ServiceTemplate serviceTemplate, String actionName) {\r
- if (serviceTemplate != null && serviceTemplate.getTopologyTemplate() != null\r
- && StringUtils.isNotBlank(actionName)) {\r
-\r
- if (MapUtils.isNotEmpty(serviceTemplate.getTopologyTemplate().getInputs())) {\r
-\r
- serviceTemplate.getTopologyTemplate().getInputs().entrySet().removeIf(entity -> {\r
- String keyName = entity.getKey();\r
- String replacedAction = actionName.replace("-action", "-request");\r
- log.debug("Key name : " + keyName + ", actionName "\r
- + actionName + ", replacedAction :" + replacedAction);\r
- if (keyName.endsWith("-request") && !keyName.equals(replacedAction)) {\r
- log.info("deleting input property {} ", keyName);\r
- return true;\r
- }\r
- return false;\r
- });\r
- }\r
-\r
- }\r
- }\r
-\r
-}\r
+/*
+ * 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.service;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.google.common.base.Preconditions;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException;
+import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType;
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.service.common.SwaggerGenerator;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * SchemaGeneratorService.java Purpose: Provide Service to generate service template input schema definition and Sample
+ * Json generation.
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@Deprecated
+public class SchemaGeneratorService {
+ private static EELFLogger log = EELFManager.getInstance().getLogger(SchemaGeneratorService.class);
+
+ private Map<String, DataType> dataTypes;
+
+ /**
+ * This is a SchemaGeneratorService constructor
+ */
+ public SchemaGeneratorService() {
+ dataTypes = new HashMap<>();
+ }
+
+ /**
+ * This is a generateSchema
+ *
+ * @param serviceTemplateContent service template content
+ * @return String
+ * @throws BluePrintException Blueprint Exception
+ */
+ public String generateSchema(String serviceTemplateContent) throws BluePrintException {
+ if (StringUtils.isNotBlank(serviceTemplateContent)) {
+ ServiceTemplate serviceTemplate = JacksonUtils.Companion.readValue(serviceTemplateContent,
+ ServiceTemplate.class);
+ return generateSchema(serviceTemplate);
+ } else {
+ throw new BluePrintException(
+ "Service Template Content is (" + serviceTemplateContent + ") not Defined.");
+ }
+ }
+
+ /**
+ * This is a generateSchema
+ *
+ * @param serviceTemplate service template content
+ * @return String
+ * @throws BluePrintException Blueprint Exception
+ */
+ public String generateSchema(ServiceTemplate serviceTemplate) throws BluePrintException {
+ String schemaContent = null;
+ Preconditions.checkNotNull(serviceTemplate, "Service Template is not defined.");
+ try {
+ if (serviceTemplate.getTopologyTemplate() != null
+ && serviceTemplate.getTopologyTemplate().getInputs() != null) {
+ SwaggerGenerator swaggerGenerator = new SwaggerGenerator(serviceTemplate);
+ schemaContent = swaggerGenerator.generateSwagger();
+ }
+ } catch (Exception e) {
+ throw new BluePrintException(e.getMessage(), e);
+ }
+
+ return schemaContent;
+ }
+
+ private void manageServiceTemplateActions(ServiceTemplate serviceTemplate, String actionName) {
+ if (serviceTemplate != null && serviceTemplate.getTopologyTemplate() != null
+ && StringUtils.isNotBlank(actionName)) {
+
+ if (MapUtils.isNotEmpty(serviceTemplate.getTopologyTemplate().getInputs())) {
+
+ serviceTemplate.getTopologyTemplate().getInputs().entrySet().removeIf(entity -> {
+ String keyName = entity.getKey();
+ String replacedAction = actionName.replace("-action", "-request");
+ log.debug("Key name : " + keyName + ", actionName "
+ + actionName + ", replacedAction :" + replacedAction);
+ if (keyName.endsWith("-request") && !keyName.equals(replacedAction)) {
+ log.info("deleting input property {} ", keyName);
+ return true;
+ }
+ return false;
+ });
+ }
+
+ }
+ }
+
+}
-/*\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.apps.controllerblueprints.service.common;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.annotation.JsonInclude.Include;\r
-import com.fasterxml.jackson.annotation.JsonTypeInfo;\r
-import com.fasterxml.jackson.annotation.JsonTypeName;\r
-\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-@JsonInclude(Include.NON_NULL)\r
-@JsonTypeName("errorMessage")\r
-@JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)\r
-public class ErrorMessage implements Serializable {\r
- private String message;\r
- private Integer code;\r
- private String debugMessage;\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- private Date timestamp = new Date();\r
-\r
- public ErrorMessage(String message, Integer code, String debugMessage){\r
- this.message = message;\r
- this.code = code;\r
- this.debugMessage = debugMessage;\r
- }\r
-\r
- public String getMessage() {\r
- return message;\r
- }\r
-\r
- public void setMessage(String message) {\r
- this.message = message;\r
- }\r
-\r
- public Integer getCode() {\r
- return code;\r
- }\r
-\r
- public void setCode(Integer code) {\r
- this.code = code;\r
- }\r
-\r
- public String getDebugMessage() {\r
- return debugMessage;\r
- }\r
-\r
- public void setDebugMessage(String developerMessage) {\r
- this.debugMessage = developerMessage;\r
- }\r
-\r
- public Date getTimestamp() {\r
- return timestamp;\r
- }\r
-\r
- public void setTimestamp(Date timestamp) {\r
- this.timestamp = timestamp;\r
- }\r
+/*
+ * 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.service.common;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@JsonInclude(Include.NON_NULL)
+@JsonTypeName("errorMessage")
+@JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)
+public class ErrorMessage implements Serializable {
+ private String message;
+ private Integer code;
+ private String debugMessage;
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ private Date timestamp = new Date();
+
+ public ErrorMessage(String message, Integer code, String debugMessage){
+ this.message = message;
+ this.code = code;
+ this.debugMessage = debugMessage;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public Integer getCode() {
+ return code;
+ }
+
+ public void setCode(Integer code) {
+ this.code = code;
+ }
+
+ public String getDebugMessage() {
+ return debugMessage;
+ }
+
+ public void setDebugMessage(String developerMessage) {
+ this.debugMessage = developerMessage;
+ }
+
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
}
\ No newline at end of file
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service.common;\r
-\r
-import io.swagger.models.*;\r
-import io.swagger.models.parameters.BodyParameter;\r
-import io.swagger.models.parameters.Parameter;\r
-import io.swagger.models.properties.*;\r
-import org.apache.commons.collections.MapUtils;\r
-import org.apache.commons.lang3.BooleanUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;\r
-\r
-import java.util.*;\r
-\r
-/**\r
- * SwaggerGenerator.java Purpose: Provide Service to generate service template input schema definition and Sample Json\r
- * generation.\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@Deprecated\r
-public class SwaggerGenerator {\r
-\r
- private ServiceTemplate serviceTemplate;\r
- public static final String INPUTS="inputs";\r
-\r
- /**\r
- * This is a SwaggerGenerator constructor\r
- */\r
- public SwaggerGenerator(ServiceTemplate serviceTemplate) {\r
- this.serviceTemplate = serviceTemplate;\r
- }\r
-\r
- /**\r
- * This is a generateSwagger\r
- *\r
- * @return String\r
- */\r
- public String generateSwagger() {\r
- \r
- Swagger swagger = new Swagger().info(getInfo());\r
-\r
- swagger.setPaths(getPaths());\r
- swagger.setDefinitions(getDefinition());\r
-\r
-\r
- return swagger.toString();\r
- }\r
-\r
- private Info getInfo() {\r
- Info info = new Info();\r
- Contact contact = new Contact();\r
- contact.setName(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_AUTHOR));\r
- info.setContact(contact);\r
- info.setTitle(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_NAME));\r
- info.setDescription(serviceTemplate.getDescription());\r
- info.setVersion(serviceTemplate.getMetadata().get(BluePrintConstants.METADATA_TEMPLATE_VERSION));\r
- return info;\r
- }\r
-\r
- private Map<String, Path> getPaths() {\r
- Map<String, Path> paths = new HashMap<>();\r
- Path path = new Path();\r
- Operation post = new Operation();\r
- post.setOperationId("configure");\r
- post.setConsumes(Arrays.asList("application/json", "application/xml"));\r
- post.setProduces(Arrays.asList("application/json", "application/xml"));\r
- List<Parameter> parameters = new ArrayList<>();\r
- Parameter in = new BodyParameter().schema(new RefModel("#/definitions/inputs"));\r
- in.setRequired(true);\r
- in.setName(INPUTS);\r
- parameters.add(in);\r
- post.setParameters(parameters);\r
-\r
- Map<String, Response> responses = new HashMap<>();\r
- Response response = new Response().description("Success");\r
- responses.put("200", response);\r
-\r
- Response failureResponse = new Response().description("Failure");\r
- responses.put("400", failureResponse);\r
- post.setResponses(responses);\r
-\r
- path.setPost(post);\r
- paths.put("/operations/config-selfservice-api:configure", path);\r
- return paths;\r
- }\r
-\r
- private Map<String, Model> getDefinition() {\r
- Map<String, Model> models = new HashMap<>();\r
-\r
- ModelImpl inputmodel = new ModelImpl();\r
- inputmodel.setTitle(INPUTS);\r
- serviceTemplate.getTopologyTemplate().getInputs().forEach((propertyName, property) -> {\r
- Property defProperty = getPropery(propertyName, property);\r
- inputmodel.property(propertyName, defProperty);\r
- });\r
- models.put(INPUTS, inputmodel);\r
-\r
- if (MapUtils.isNotEmpty(serviceTemplate.getDataTypes())) {\r
- serviceTemplate.getDataTypes().forEach((name, dataType) -> {\r
- ModelImpl model = new ModelImpl();\r
- model.setDescription(dataType.getDescription());\r
- if (dataType != null && MapUtils.isNotEmpty(dataType.getProperties())) {\r
-\r
- dataType.getProperties().forEach((propertyName, property) -> {\r
- Property defProperty = getPropery(propertyName, property);\r
- model.addProperty(propertyName, defProperty);\r
- });\r
- }\r
- models.put(name, model);\r
- });\r
- }\r
- return models;\r
-\r
- }\r
-\r
- private Property getPropery(String name, PropertyDefinition propertyDefinition) {\r
- Property defProperty = null;\r
-\r
- if (BluePrintTypes.validPrimitiveTypes().contains(propertyDefinition.getType())) {\r
- if (BluePrintConstants.DATA_TYPE_BOOLEAN.equals(propertyDefinition.getType())) {\r
- defProperty = new BooleanProperty();\r
- } else if (BluePrintConstants.DATA_TYPE_INTEGER.equals(propertyDefinition.getType())) {\r
- StringProperty stringProperty = new StringProperty();\r
- stringProperty.setType("integer");\r
- defProperty = stringProperty;\r
- } else if (BluePrintConstants.DATA_TYPE_FLOAT.equals(propertyDefinition.getType())) {\r
- StringProperty stringProperty = new StringProperty();\r
- stringProperty.setFormat("float");\r
- defProperty = stringProperty;\r
- } else if (BluePrintConstants.DATA_TYPE_TIMESTAMP.equals(propertyDefinition.getType())) {\r
- DateTimeProperty dateTimeProperty = new DateTimeProperty();\r
- dateTimeProperty.setFormat("date-time");\r
- defProperty = dateTimeProperty;\r
- } else {\r
- defProperty = new StringProperty();\r
- }\r
- } else if (BluePrintTypes.validCollectionTypes().contains(propertyDefinition.getType())) {\r
- ArrayProperty arrayProperty = new ArrayProperty();\r
- if (propertyDefinition.getEntrySchema() != null) {\r
- String entrySchema = propertyDefinition.getEntrySchema().getType();\r
- if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema)) {\r
- Property innerType = new RefProperty("#/definitions/" + entrySchema);\r
- arrayProperty.setItems(innerType);\r
- } else {\r
- Property innerType = new StringProperty();\r
- arrayProperty.setItems(innerType);\r
- }\r
- defProperty = arrayProperty;\r
- }\r
-\r
- } else {\r
- defProperty = new RefProperty("#/definitions/" + propertyDefinition.getType());\r
- }\r
- defProperty.setName(name);\r
- if (propertyDefinition.getDefaultValue() != null) {\r
- defProperty.setDefault(String.valueOf(propertyDefinition.getDefaultValue()));\r
- }\r
-\r
- defProperty.setRequired(BooleanUtils.isTrue(propertyDefinition.getRequired()));\r
- defProperty.setDescription(propertyDefinition.getDescription());\r
- return defProperty;\r
- }\r
-\r
-\r
-}\r
+/*
+ * 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())) {
+ ArrayProperty arrayProperty = new ArrayProperty();
+ if (propertyDefinition.getEntrySchema() != null) {
+ String entrySchema = propertyDefinition.getEntrySchema().getType();
+ if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema)) {
+ Property innerType = new RefProperty("#/definitions/" + entrySchema);
+ arrayProperty.setItems(innerType);
+ } else {
+ Property innerType = new StringProperty();
+ arrayProperty.setItems(innerType);
+ }
+ 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;
+ }
+
+
+}
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2019 Bell Canada.\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import io.swagger.annotations.ApiModelProperty;\r
-import org.hibernate.annotations.Proxy;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-/**\r
- * BlueprintModel.java Purpose: Provide Configuration Generator BlueprintModel Entity\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-\r
-@EntityListeners({AuditingEntityListener.class})\r
-@Entity\r
-@Table(name = "CONFIG_MODEL", uniqueConstraints=@UniqueConstraint(columnNames={"artifact_name","artifact_version"}))\r
-@Proxy(lazy=false)\r
-public class BlueprintModel implements Serializable {\r
- private static final long serialVersionUID = 1L;\r
- @Id\r
- @Column(name = "config_model_id")\r
- private String id;\r
-\r
- @Column(name = "service_uuid")\r
- private String serviceUUID;\r
-\r
- @Column(name = "distribution_id")\r
- private String distributionId;\r
-\r
- @Column(name = "service_name")\r
- private String serviceName;\r
-\r
- @Column(name = "service_description")\r
- private String serviceDescription;\r
-\r
- @Column(name = "resource_uuid")\r
- private String resourceUUID;\r
-\r
- @Column(name = "resource_instance_name")\r
- private String resourceInstanceName;\r
-\r
- @Column(name = "resource_name")\r
- private String resourceName;\r
-\r
- @Column(name = "resource_version")\r
- private String resourceVersion;\r
-\r
- @Column(name = "resource_type")\r
- private String resourceType;\r
-\r
- @Column(name = "artifact_uuid")\r
- private String artifactUUId;\r
-\r
- @Column(name = "artifact_type")\r
- private String artifactType;\r
-\r
- @Column(name = "artifact_version", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String artifactVersion;\r
-\r
- @Lob\r
- @Column(name = "artifact_description")\r
- private String artifactDescription;\r
-\r
- @Column(name = "internal_version")\r
- private Integer internalVersion;\r
-\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- @LastModifiedDate\r
- @Temporal(TemporalType.TIMESTAMP)\r
- @Column(name = "creation_date")\r
- private Date createdDate = new Date();\r
-\r
- @Column(name = "artifact_name", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String artifactName;\r
-\r
- @Column(name = "published", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String published;\r
-\r
- @Column(name = "updated_by", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String updatedBy;\r
-\r
- @Lob\r
- @Column(name = "tags", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String tags;\r
-\r
- @OneToOne(mappedBy = "blueprintModel", fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.ALL)\r
- private BlueprintModelContent blueprintModelContent;\r
-\r
- public String getId() {\r
- return id;\r
- }\r
-\r
- public void setId(String id) {\r
- this.id = id;\r
- }\r
-\r
- public String getServiceUUID() {\r
- return serviceUUID;\r
- }\r
-\r
- public void setServiceUUID(String serviceUUID) {\r
- this.serviceUUID = serviceUUID;\r
- }\r
-\r
- public String getDistributionId() {\r
- return distributionId;\r
- }\r
-\r
- public void setDistributionId(String distributionId) {\r
- this.distributionId = distributionId;\r
- }\r
-\r
- public String getServiceName() {\r
- return serviceName;\r
- }\r
-\r
- public void setServiceName(String serviceName) {\r
- this.serviceName = serviceName;\r
- }\r
-\r
- public String getServiceDescription() {\r
- return serviceDescription;\r
- }\r
-\r
- public void setServiceDescription(String serviceDescription) {\r
- this.serviceDescription = serviceDescription;\r
- }\r
-\r
- public String getResourceUUID() {\r
- return resourceUUID;\r
- }\r
-\r
- public void setResourceUUID(String resourceUUID) {\r
- this.resourceUUID = resourceUUID;\r
- }\r
-\r
- public String getResourceInstanceName() {\r
- return resourceInstanceName;\r
- }\r
-\r
- public void setResourceInstanceName(String resourceInstanceName) {\r
- this.resourceInstanceName = resourceInstanceName;\r
- }\r
-\r
- public String getResourceName() {\r
- return resourceName;\r
- }\r
-\r
- public void setResourceName(String resourceName) {\r
- this.resourceName = resourceName;\r
- }\r
-\r
- public String getResourceVersion() {\r
- return resourceVersion;\r
- }\r
-\r
- public void setResourceVersion(String resourceVersion) {\r
- this.resourceVersion = resourceVersion;\r
- }\r
-\r
- public String getResourceType() {\r
- return resourceType;\r
- }\r
-\r
- public void setResourceType(String resourceType) {\r
- this.resourceType = resourceType;\r
- }\r
-\r
- public String getArtifactUUId() {\r
- return artifactUUId;\r
- }\r
-\r
- public void setArtifactUUId(String artifactUUId) {\r
- this.artifactUUId = artifactUUId;\r
- }\r
-\r
- public String getArtifactType() {\r
- return artifactType;\r
- }\r
-\r
- public void setArtifactType(String artifactType) {\r
- this.artifactType = artifactType;\r
- }\r
-\r
- public String getArtifactVersion() {\r
- return artifactVersion;\r
- }\r
-\r
- public void setArtifactVersion(String artifactVersion) {\r
- this.artifactVersion = artifactVersion;\r
- }\r
-\r
- public String getArtifactDescription() {\r
- return artifactDescription;\r
- }\r
-\r
- public void setArtifactDescription(String artifactDescription) {\r
- this.artifactDescription = artifactDescription;\r
- }\r
-\r
- public Integer getInternalVersion() {\r
- return internalVersion;\r
- }\r
-\r
- public void setInternalVersion(Integer internalVersion) {\r
- this.internalVersion = internalVersion;\r
- }\r
-\r
- public Date getCreatedDate() {\r
- return createdDate;\r
- }\r
-\r
- public void setCreatedDate(Date createdDate) {\r
- this.createdDate = createdDate;\r
- }\r
-\r
- public String getArtifactName() {\r
- return artifactName;\r
- }\r
-\r
- public void setArtifactName(String artifactName) {\r
- this.artifactName = artifactName;\r
- }\r
-\r
- public String getPublished() {\r
- return published;\r
- }\r
-\r
- public void setPublished(String published) {\r
- this.published = published;\r
- }\r
-\r
- public String getUpdatedBy() {\r
- return updatedBy;\r
- }\r
-\r
- public void setUpdatedBy(String updatedBy) {\r
- this.updatedBy = updatedBy;\r
- }\r
-\r
- public String getTags() {\r
- return tags;\r
- }\r
-\r
- public void setTags(String tags) {\r
- this.tags = tags;\r
- }\r
-\r
- public BlueprintModelContent getBlueprintModelContent() {\r
- return blueprintModelContent;\r
- }\r
-\r
- public void setBlueprintModelContent(BlueprintModelContent blueprintModelContent) {\r
- this.blueprintModelContent = blueprintModelContent;\r
- }\r
-}\r
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import org.hibernate.annotations.Proxy;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * BlueprintModel.java Purpose: Provide Configuration Generator BlueprintModel Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+
+@EntityListeners({AuditingEntityListener.class})
+@Entity
+@Table(name = "CONFIG_MODEL", uniqueConstraints=@UniqueConstraint(columnNames={"artifact_name","artifact_version"}))
+@Proxy(lazy=false)
+public class BlueprintModel implements Serializable {
+ private static final long serialVersionUID = 1L;
+ @Id
+ @Column(name = "config_model_id")
+ private String id;
+
+ @Column(name = "service_uuid")
+ private String serviceUUID;
+
+ @Column(name = "distribution_id")
+ private String distributionId;
+
+ @Column(name = "service_name")
+ private String serviceName;
+
+ @Column(name = "service_description")
+ private String serviceDescription;
+
+ @Column(name = "resource_uuid")
+ private String resourceUUID;
+
+ @Column(name = "resource_instance_name")
+ private String resourceInstanceName;
+
+ @Column(name = "resource_name")
+ private String resourceName;
+
+ @Column(name = "resource_version")
+ private String resourceVersion;
+
+ @Column(name = "resource_type")
+ private String resourceType;
+
+ @Column(name = "artifact_uuid")
+ private String artifactUUId;
+
+ @Column(name = "artifact_type")
+ private String artifactType;
+
+ @Column(name = "artifact_version", nullable = false)
+ @ApiModelProperty(required=true)
+ private String artifactVersion;
+
+ @Lob
+ @Column(name = "artifact_description")
+ private String artifactDescription;
+
+ @Column(name = "internal_version")
+ private Integer internalVersion;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ @LastModifiedDate
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(name = "creation_date")
+ private Date createdDate = new Date();
+
+ @Column(name = "artifact_name", nullable = false)
+ @ApiModelProperty(required=true)
+ private String artifactName;
+
+ @Column(name = "published", nullable = false)
+ @ApiModelProperty(required=true)
+ private String published;
+
+ @Column(name = "updated_by", nullable = false)
+ @ApiModelProperty(required=true)
+ private String updatedBy;
+
+ @Lob
+ @Column(name = "tags", nullable = false)
+ @ApiModelProperty(required=true)
+ private String tags;
+
+ @OneToOne(mappedBy = "blueprintModel", fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.ALL)
+ private org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent blueprintModelContent;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getServiceUUID() {
+ return serviceUUID;
+ }
+
+ public void setServiceUUID(String serviceUUID) {
+ this.serviceUUID = serviceUUID;
+ }
+
+ public String getDistributionId() {
+ return distributionId;
+ }
+
+ public void setDistributionId(String distributionId) {
+ this.distributionId = distributionId;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getServiceDescription() {
+ return serviceDescription;
+ }
+
+ public void setServiceDescription(String serviceDescription) {
+ this.serviceDescription = serviceDescription;
+ }
+
+ public String getResourceUUID() {
+ return resourceUUID;
+ }
+
+ public void setResourceUUID(String resourceUUID) {
+ this.resourceUUID = resourceUUID;
+ }
+
+ public String getResourceInstanceName() {
+ return resourceInstanceName;
+ }
+
+ public void setResourceInstanceName(String resourceInstanceName) {
+ this.resourceInstanceName = resourceInstanceName;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public String getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ public String getArtifactUUId() {
+ return artifactUUId;
+ }
+
+ public void setArtifactUUId(String artifactUUId) {
+ this.artifactUUId = artifactUUId;
+ }
+
+ public String getArtifactType() {
+ return artifactType;
+ }
+
+ public void setArtifactType(String artifactType) {
+ this.artifactType = artifactType;
+ }
+
+ public String getArtifactVersion() {
+ return artifactVersion;
+ }
+
+ public void setArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ }
+
+ public String getArtifactDescription() {
+ return artifactDescription;
+ }
+
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ public Integer getInternalVersion() {
+ return internalVersion;
+ }
+
+ public void setInternalVersion(Integer internalVersion) {
+ this.internalVersion = internalVersion;
+ }
+
+ public Date getCreatedDate() {
+ return createdDate;
+ }
+
+ public void setCreatedDate(Date createdDate) {
+ this.createdDate = createdDate;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public String getPublished() {
+ return published;
+ }
+
+ public void setPublished(String published) {
+ this.published = published;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent getBlueprintModelContent() {
+ return blueprintModelContent;
+ }
+
+ public void setBlueprintModelContent(
+ org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent blueprintModelContent) {
+ this.blueprintModelContent = blueprintModelContent;
+ }
+}
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2019 Bell Canada.\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import io.swagger.annotations.ApiModelProperty;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-import java.util.Objects;\r
-\r
-/**\r
- * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@EntityListeners({AuditingEntityListener.class})\r
-@Entity\r
-@Table(name = "CONFIG_MODEL_CONTENT")\r
-public class BlueprintModelContent implements Serializable {\r
-\r
- private static final long serialVersionUID = 1L;\r
-\r
- @Id\r
- @Column(name = "config_model_content_id")\r
- private String id;\r
-\r
- @Column(name = "name", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String name;\r
-\r
- @Column(name = "content_type", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String contentType;\r
-\r
- @OneToOne\r
- @JoinColumn(name = "config_model_id")\r
- private BlueprintModel blueprintModel;\r
-\r
- @Lob\r
- @Column(name = "description")\r
- private String description;\r
-\r
- @Lob\r
- @Column(name = "content", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private byte[] content;\r
-\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- @LastModifiedDate\r
- @Temporal(TemporalType.TIMESTAMP)\r
- @Column(name = "updated_date")\r
- private Date creationDate = new Date();\r
-\r
- @Override\r
- public String toString() {\r
- return "[" + "id = " + id +\r
- ", name = " + name +\r
- ", contentType = " + contentType +\r
- "]";\r
- }\r
-\r
- @Override\r
- public boolean equals(Object o) {\r
-\r
- if (o == this) {\r
- return true;\r
- }\r
- if (!(o instanceof BlueprintModelContent)) {\r
- return false;\r
- }\r
- BlueprintModelContent blueprintModelContent = (BlueprintModelContent) o;\r
- return Objects.equals(id, blueprintModelContent.id) && Objects.equals(name, blueprintModelContent.name)\r
- && Objects.equals(contentType, blueprintModelContent.contentType);\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- return Objects.hash(id, name, contentType);\r
- }\r
-\r
- public String getId() {\r
- return id;\r
- }\r
-\r
-\r
- public void setId(String id) {\r
- this.id = id;\r
- }\r
-\r
-\r
- public String getName() {\r
- return name;\r
- }\r
-\r
-\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
-\r
-\r
- public String getContentType() {\r
- return contentType;\r
- }\r
-\r
-\r
- public void setContentType(String contentType) {\r
- this.contentType = contentType;\r
- }\r
-\r
-\r
- public BlueprintModel getBlueprintModel() {\r
- return blueprintModel;\r
- }\r
-\r
-\r
- public void setBlueprintModel(BlueprintModel blueprintModel) {\r
- this.blueprintModel = blueprintModel;\r
- }\r
-\r
-\r
- public String getDescription() {\r
- return description;\r
- }\r
-\r
-\r
- public void setDescription(String description) {\r
- this.description = description;\r
- }\r
-\r
-\r
- public byte[] getContent() {\r
- return content;\r
- }\r
-\r
-\r
- public void setContent(byte[] content) {\r
- this.content = content;\r
- }\r
-\r
-\r
- public Date getCreationDate() {\r
- return creationDate;\r
- }\r
-\r
-\r
- public void setCreationDate(Date creationDate) {\r
- this.creationDate = creationDate;\r
- }\r
-\r
-}\r
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners({AuditingEntityListener.class})
+@Entity
+@Table(name = "CONFIG_MODEL_CONTENT")
+public class BlueprintModelContent implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "config_model_content_id")
+ private String id;
+
+ @Column(name = "name", nullable = false)
+ @ApiModelProperty(required=true)
+ private String name;
+
+ @Column(name = "content_type", nullable = false)
+ @ApiModelProperty(required=true)
+ private String contentType;
+
+ @OneToOne
+ @JoinColumn(name = "config_model_id")
+ private BlueprintModel blueprintModel;
+
+ @Lob
+ @Column(name = "description")
+ private String description;
+
+ @Lob
+ @Column(name = "content", nullable = false)
+ @ApiModelProperty(required=true)
+ private byte[] content;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ @LastModifiedDate
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(name = "updated_date")
+ private Date creationDate = new Date();
+
+ @Override
+ public String toString() {
+ return "[" + "id = " + id +
+ ", name = " + name +
+ ", contentType = " + contentType +
+ "]";
+ }
+
+ @Override
+ public boolean equals(Object o) {
+
+ if (o == this) {
+ return true;
+ }
+ if (!(o instanceof BlueprintModelContent)) {
+ return false;
+ }
+ BlueprintModelContent blueprintModelContent = (BlueprintModelContent) o;
+ return Objects.equals(id, blueprintModelContent.id) && Objects.equals(name, blueprintModelContent.name)
+ && Objects.equals(contentType, blueprintModelContent.contentType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, contentType);
+ }
+
+ public String getId() {
+ return id;
+ }
+
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public String getName() {
+ return name;
+ }
+
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public String getContentType() {
+ return contentType;
+ }
+
+
+ public void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
+
+
+ public BlueprintModel getBlueprintModel() {
+ return blueprintModel;
+ }
+
+
+ public void setBlueprintModel(BlueprintModel blueprintModel) {
+ this.blueprintModel = blueprintModel;
+ }
+
+
+ public String getDescription() {
+ return description;
+ }
+
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+ public byte[] getContent() {
+ return content;
+ }
+
+
+ public void setContent(byte[] content) {
+ this.content = content;
+ }
+
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+}
-/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2019 Bell Canada.\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import com.fasterxml.jackson.annotation.JsonTypeInfo;\r
-import com.fasterxml.jackson.annotation.JsonTypeName;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-@Entity\r
-@Table(name = "CONFIG_MODEL")\r
-@JsonTypeName("blueprintModel")\r
-@JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)\r
-public class BlueprintModelSearch implements Serializable {\r
- private static final long serialVersionUID = 1L;\r
-\r
- @Id\r
- @Column(name = "config_model_id")\r
- private String id;\r
-\r
- @Column(name = "artifact_uuid")\r
- private String artifactUUId;\r
-\r
- @Column(name = "artifact_type")\r
- private String artifactType;\r
-\r
- @Column(name = "artifact_version", nullable = false)\r
- private String artifactVersion;\r
-\r
- @Lob\r
- @Column(name = "artifact_description")\r
- private String artifactDescription;\r
-\r
- @Column(name = "internal_version")\r
- private Integer internalVersion;\r
-\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- @LastModifiedDate\r
- @Temporal(TemporalType.TIMESTAMP)\r
- @Column(name = "creation_date")\r
- private Date createdDate = new Date();\r
-\r
- @Column(name = "artifact_name", nullable = false)\r
- private String artifactName;\r
-\r
- @Column(name = "published", nullable = false)\r
- private String published;\r
-\r
- @Column(name = "updated_by", nullable = false)\r
- private String updatedBy;\r
-\r
- @Lob\r
- @Column(name = "tags", nullable = false)\r
- private String tags;\r
-\r
- public String getId() {\r
- return id;\r
- }\r
-\r
- public void setId(String id) {\r
- this.id = id;\r
- }\r
-\r
- public String getArtifactUUId() {\r
- return artifactUUId;\r
- }\r
-\r
- public void setArtifactUUId(String artifactUUId) {\r
- this.artifactUUId = artifactUUId;\r
- }\r
-\r
- public String getArtifactType() {\r
- return artifactType;\r
- }\r
-\r
- public void setArtifactType(String artifactType) {\r
- this.artifactType = artifactType;\r
- }\r
-\r
- public String getArtifactVersion() {\r
- return artifactVersion;\r
- }\r
-\r
- public void setArtifactVersion(String artifactVersion) {\r
- this.artifactVersion = artifactVersion;\r
- }\r
-\r
- public String getArtifactDescription() {\r
- return artifactDescription;\r
- }\r
-\r
- public void setArtifactDescription(String artifactDescription) {\r
- this.artifactDescription = artifactDescription;\r
- }\r
-\r
- public Integer getInternalVersion() {\r
- return internalVersion;\r
- }\r
-\r
- public void setInternalVersion(Integer internalVersion) {\r
- this.internalVersion = internalVersion;\r
- }\r
-\r
- public Date getCreatedDate() {\r
- return createdDate;\r
- }\r
-\r
- public void setCreatedDate(Date createdDate) {\r
- this.createdDate = createdDate;\r
- }\r
-\r
- public String getArtifactName() {\r
- return artifactName;\r
- }\r
-\r
- public void setArtifactName(String artifactName) {\r
- this.artifactName = artifactName;\r
- }\r
-\r
- public String getPublished() {\r
- return published;\r
- }\r
-\r
- public void setPublished(String published) {\r
- this.published = published;\r
- }\r
-\r
- public String getUpdatedBy() {\r
- return updatedBy;\r
- }\r
-\r
- public void setUpdatedBy(String updatedBy) {\r
- this.updatedBy = updatedBy;\r
- }\r
-\r
- public String getTags() {\r
- return tags;\r
- }\r
-\r
- public void setTags(String tags) {\r
- this.tags = tags;\r
- }\r
-\r
- public static long getSerialversionuid() {\r
- return serialVersionUID;\r
- }\r
-}\r
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import org.springframework.data.annotation.LastModifiedDate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Entity
+@Table(name = "CONFIG_MODEL")
+@JsonTypeName("blueprintModel")
+@JsonTypeInfo(include= JsonTypeInfo.As.WRAPPER_OBJECT, use=JsonTypeInfo.Id.NAME)
+public class BlueprintModelSearch implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "config_model_id")
+ private String id;
+
+ @Column(name = "artifact_uuid")
+ private String artifactUUId;
+
+ @Column(name = "artifact_type")
+ private String artifactType;
+
+ @Column(name = "artifact_version", nullable = false)
+ private String artifactVersion;
+
+ @Lob
+ @Column(name = "artifact_description")
+ private String artifactDescription;
+
+ @Column(name = "internal_version")
+ private Integer internalVersion;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ @LastModifiedDate
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(name = "creation_date")
+ private Date createdDate = new Date();
+
+ @Column(name = "artifact_name", nullable = false)
+ private String artifactName;
+
+ @Column(name = "published", nullable = false)
+ private String published;
+
+ @Column(name = "updated_by", nullable = false)
+ private String updatedBy;
+
+ @Lob
+ @Column(name = "tags", nullable = false)
+ private String tags;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getArtifactUUId() {
+ return artifactUUId;
+ }
+
+ public void setArtifactUUId(String artifactUUId) {
+ this.artifactUUId = artifactUUId;
+ }
+
+ public String getArtifactType() {
+ return artifactType;
+ }
+
+ public void setArtifactType(String artifactType) {
+ this.artifactType = artifactType;
+ }
+
+ public String getArtifactVersion() {
+ return artifactVersion;
+ }
+
+ public void setArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ }
+
+ public String getArtifactDescription() {
+ return artifactDescription;
+ }
+
+ public void setArtifactDescription(String artifactDescription) {
+ this.artifactDescription = artifactDescription;
+ }
+
+ public Integer getInternalVersion() {
+ return internalVersion;
+ }
+
+ public void setInternalVersion(Integer internalVersion) {
+ this.internalVersion = internalVersion;
+ }
+
+ public Date getCreatedDate() {
+ return createdDate;
+ }
+
+ public void setCreatedDate(Date createdDate) {
+ this.createdDate = createdDate;
+ }
+
+ public String getArtifactName() {
+ return artifactName;
+ }
+
+ public void setArtifactName(String artifactName) {
+ this.artifactName = artifactName;
+ }
+
+ public String getPublished() {
+ return published;
+ }
+
+ public void setPublished(String published) {
+ this.published = published;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public static long getSerialversionuid() {
+ return serialVersionUID;
+ }
+}
-/*\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.databind.JsonNode;\r
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;\r
-\r
-import javax.persistence.AttributeConverter;\r
-import javax.persistence.Converter;\r
-/**\r
- * @author Brinda Santh\r
- */\r
-@Converter\r
-public class JpaJsonNodeConverter implements\r
- AttributeConverter<JsonNode, String> {\r
-\r
- @Override\r
- public String convertToDatabaseColumn(JsonNode node) {\r
- return JacksonUtils.Companion.getJson(node, true);\r
- }\r
-\r
- @Override\r
- public JsonNode convertToEntityAttribute(String dbData) {\r
- return JacksonUtils.Companion.jsonNode(dbData);\r
- }\r
+/*
+ * 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.service.domain;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+/**
+ * @author Brinda Santh
+ */
+@Converter
+public class JpaJsonNodeConverter implements
+ AttributeConverter<JsonNode, String> {
+
+ @Override
+ public String convertToDatabaseColumn(JsonNode node) {
+ return JacksonUtils.Companion.getJson(node, true);
+ }
+
+ @Override
+ public JsonNode convertToEntityAttribute(String dbData) {
+ return JacksonUtils.Companion.jsonNode(dbData);
+ }
}
\ No newline at end of file
-/*\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.apps.controllerblueprints.service.domain;\r
-\r
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;\r
-\r
-import javax.persistence.AttributeConverter;\r
-import javax.persistence.Converter;\r
-/**\r
- * @author Brinda Santh\r
- */\r
-@Converter\r
-public class JpaResourceDefinitionConverter implements\r
- AttributeConverter<ResourceDefinition, String> {\r
- @Override\r
- public String convertToDatabaseColumn(ResourceDefinition resourceDefinition) {\r
- return JacksonUtils.Companion.getJson(resourceDefinition);\r
- }\r
-\r
- @Override\r
- public ResourceDefinition convertToEntityAttribute(String content) {\r
- return JacksonUtils.Companion.readValue(content, ResourceDefinition.class);\r
- }\r
-}\r
+/*
+ * 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.service.domain;
+
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+/**
+ * @author Brinda Santh
+ */
+@Converter
+public class JpaResourceDefinitionConverter implements
+ AttributeConverter<ResourceDefinition, String> {
+ @Override
+ public String convertToDatabaseColumn(ResourceDefinition resourceDefinition) {
+ return JacksonUtils.Companion.getJson(resourceDefinition);
+ }
+
+ @Override
+ public ResourceDefinition convertToEntityAttribute(String content) {
+ return JacksonUtils.Companion.readValue(content, ResourceDefinition.class);
+ }
+}
-/*\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import com.fasterxml.jackson.databind.JsonNode;\r
-import io.swagger.annotations.ApiModelProperty;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-\r
-/**\r
- * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@EntityListeners({AuditingEntityListener.class})\r
-@Entity\r
-@Table(name = "MODEL_TYPE")\r
-public class ModelType implements Serializable {\r
- private static final long serialVersionUID = 1L;\r
-\r
- @Id\r
- @Column(name = "model_name", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String modelName;\r
-\r
- @Column(name = "derived_from", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String derivedFrom;\r
-\r
- @Column(name = "definition_type", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String definitionType;\r
-\r
- @Lob\r
- @Convert(converter = JpaJsonNodeConverter.class)\r
- @Column(name = "definition", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private JsonNode definition;\r
-\r
- @Lob\r
- @Column(name = "description", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String description;\r
-\r
- @Column(name = "version", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String version;\r
-\r
- @Lob\r
- @Column(name = "tags", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String tags;\r
-\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- @LastModifiedDate\r
- @Temporal(TemporalType.TIMESTAMP)\r
- @Column(name = "creation_date")\r
- private Date creationDate;\r
-\r
- @Column(name = "updated_by", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String updatedBy;\r
-\r
- @Override\r
- public String toString() {\r
- return "[" + "modelName = " + modelName +\r
- ", derivedFrom = " + derivedFrom +\r
- ", definitionType = " + definitionType +\r
- ", description = " + description +\r
- ", creationDate = " + creationDate +\r
- ", version = " + version +\r
- ", updatedBy = " + updatedBy +\r
- ", tags = " + tags +\r
- "]";\r
- }\r
-\r
- public String getModelName() {\r
- return modelName;\r
- }\r
-\r
- public void setModelName(String modelName) {\r
- this.modelName = modelName;\r
- }\r
-\r
- public String getDerivedFrom() {\r
- return derivedFrom;\r
- }\r
-\r
- public void setDerivedFrom(String derivedFrom) {\r
- this.derivedFrom = derivedFrom;\r
- }\r
-\r
- public String getDefinitionType() {\r
- return definitionType;\r
- }\r
-\r
- public void setDefinitionType(String definitionType) {\r
- this.definitionType = definitionType;\r
- }\r
-\r
- public JsonNode getDefinition() {\r
- return definition;\r
- }\r
-\r
- public void setDefinition(JsonNode definition) {\r
- this.definition = definition;\r
- }\r
-\r
- public String getDescription() {\r
- return description;\r
- }\r
-\r
- public void setDescription(String description) {\r
- this.description = description;\r
- }\r
-\r
- public String getVersion() {\r
- return version;\r
- }\r
-\r
- public void setVersion(String version) {\r
- this.version = version;\r
- }\r
-\r
- public String getTags() {\r
- return tags;\r
- }\r
-\r
- public void setTags(String tags) {\r
- this.tags = tags;\r
- }\r
-\r
- public Date getCreationDate() {\r
- return creationDate;\r
- }\r
-\r
- public void setCreationDate(Date creationDate) {\r
- this.creationDate = creationDate;\r
- }\r
-\r
- public String getUpdatedBy() {\r
- return updatedBy;\r
- }\r
-\r
- public void setUpdatedBy(String updatedBy) {\r
- this.updatedBy = updatedBy;\r
- }\r
-\r
-\r
-}\r
+/*
+ * 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.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.JsonNode;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * AsdcReference.java Purpose: Provide Configuration Generator AsdcReference Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners({AuditingEntityListener.class})
+@Entity
+@Table(name = "MODEL_TYPE")
+public class ModelType implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "model_name", nullable = false)
+ @ApiModelProperty(required=true)
+ private String modelName;
+
+ @Column(name = "derived_from", nullable = false)
+ @ApiModelProperty(required=true)
+ private String derivedFrom;
+
+ @Column(name = "definition_type", nullable = false)
+ @ApiModelProperty(required=true)
+ private String definitionType;
+
+ @Lob
+ @Convert(converter = JpaJsonNodeConverter.class)
+ @Column(name = "definition", nullable = false)
+ @ApiModelProperty(required=true)
+ private JsonNode definition;
+
+ @Lob
+ @Column(name = "description", nullable = false)
+ @ApiModelProperty(required=true)
+ private String description;
+
+ @Column(name = "version", nullable = false)
+ @ApiModelProperty(required=true)
+ private String version;
+
+ @Lob
+ @Column(name = "tags", nullable = false)
+ @ApiModelProperty(required=true)
+ private String tags;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ @LastModifiedDate
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(name = "creation_date")
+ private Date creationDate;
+
+ @Column(name = "updated_by", nullable = false)
+ @ApiModelProperty(required=true)
+ private String updatedBy;
+
+ @Override
+ public String toString() {
+ return "[" + "modelName = " + modelName +
+ ", derivedFrom = " + derivedFrom +
+ ", definitionType = " + definitionType +
+ ", description = " + description +
+ ", creationDate = " + creationDate +
+ ", version = " + version +
+ ", updatedBy = " + updatedBy +
+ ", tags = " + tags +
+ "]";
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getDerivedFrom() {
+ return derivedFrom;
+ }
+
+ public void setDerivedFrom(String derivedFrom) {
+ this.derivedFrom = derivedFrom;
+ }
+
+ public String getDefinitionType() {
+ return definitionType;
+ }
+
+ public void setDefinitionType(String definitionType) {
+ this.definitionType = definitionType;
+ }
+
+ public JsonNode getDefinition() {
+ return definition;
+ }
+
+ public void setDefinition(JsonNode definition) {
+ this.definition = definition;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+
+}
-/*\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.apps.controllerblueprints.service.domain;\r
-\r
-import com.fasterxml.jackson.annotation.JsonFormat;\r
-import io.swagger.annotations.ApiModelProperty;\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;\r
-import org.springframework.data.annotation.LastModifiedDate;\r
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;\r
-\r
-import javax.persistence.*;\r
-import java.io.Serializable;\r
-import java.util.Date;\r
-\r
-/**\r
- * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@EntityListeners({AuditingEntityListener.class})\r
-@Entity\r
-@Table(name = "RESOURCE_DICTIONARY")\r
-public class ResourceDictionary implements Serializable {\r
- private static final long serialVersionUID = 1L;\r
-\r
- @Id\r
- @Column(name = "name", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String name;\r
-\r
- @Column(name = "data_type", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String dataType;\r
-\r
- @Column(name = "entry_schema")\r
- private String entrySchema;\r
-\r
- @Lob\r
- @Convert(converter = JpaResourceDefinitionConverter.class)\r
- @Column(name = "definition", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private ResourceDefinition definition;\r
-\r
- @Lob\r
- @Column(name = "description", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String description;\r
-\r
- @Lob\r
- @Column(name = "tags", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String tags;\r
-\r
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
- @LastModifiedDate\r
- @Temporal(TemporalType.TIMESTAMP)\r
- @Column(name = "creation_date")\r
- private Date creationDate;\r
-\r
- @Column(name = "updated_by", nullable = false)\r
- @ApiModelProperty(required=true)\r
- private String updatedBy;\r
-\r
- @Override\r
- public String toString() {\r
- return "[" + ", name = " + name +\r
- ", dataType = " + dataType +\r
- ", entrySchema = " + entrySchema +\r
- ", definition =" + definition +\r
- ", description = " + description +\r
- ", updatedBy = " + updatedBy +\r
- ", tags = " + tags +\r
- ", creationDate = " + creationDate +\r
- "]";\r
- }\r
-\r
- public String getName() {\r
- return name;\r
- }\r
-\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
-\r
- public String getDataType() {\r
- return dataType;\r
- }\r
-\r
- public void setDataType(String dataType) {\r
- this.dataType = dataType;\r
- }\r
-\r
- public String getEntrySchema() {\r
- return entrySchema;\r
- }\r
-\r
- public void setEntrySchema(String entrySchema) {\r
- this.entrySchema = entrySchema;\r
- }\r
-\r
- public ResourceDefinition getDefinition() {\r
- return definition;\r
- }\r
-\r
- public void setDefinition(ResourceDefinition definition) {\r
- this.definition = definition;\r
- }\r
-\r
- public String getDescription() {\r
- return description;\r
- }\r
-\r
- public void setDescription(String description) {\r
- this.description = description;\r
- }\r
-\r
- public String getTags() {\r
- return tags;\r
- }\r
-\r
- public void setTags(String tags) {\r
- this.tags = tags;\r
- }\r
-\r
- public Date getCreationDate() {\r
- return creationDate;\r
- }\r
-\r
- public void setCreationDate(Date creationDate) {\r
- this.creationDate = creationDate;\r
- }\r
-\r
- public String getUpdatedBy() {\r
- return updatedBy;\r
- }\r
-\r
- public void setUpdatedBy(String updatedBy) {\r
- this.updatedBy = updatedBy;\r
- }\r
-\r
-\r
-\r
-}\r
+/*
+ * 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.service.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * DataDictionary.java Purpose: Provide Configuration Generator DataDictionary Entity
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@EntityListeners({AuditingEntityListener.class})
+@Entity
+@Table(name = "RESOURCE_DICTIONARY")
+public class ResourceDictionary implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "name", nullable = false)
+ @ApiModelProperty(required=true)
+ private String name;
+
+ @Column(name = "data_type", nullable = false)
+ @ApiModelProperty(required=true)
+ private String dataType;
+
+ @Column(name = "entry_schema")
+ private String entrySchema;
+
+ @Lob
+ @Convert(converter = JpaResourceDefinitionConverter.class)
+ @Column(name = "definition", nullable = false)
+ @ApiModelProperty(required=true)
+ private ResourceDefinition definition;
+
+ @Lob
+ @Column(name = "description", nullable = false)
+ @ApiModelProperty(required=true)
+ private String description;
+
+ @Lob
+ @Column(name = "tags", nullable = false)
+ @ApiModelProperty(required=true)
+ private String tags;
+
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ @LastModifiedDate
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(name = "creation_date")
+ private Date creationDate;
+
+ @Column(name = "updated_by", nullable = false)
+ @ApiModelProperty(required=true)
+ private String updatedBy;
+
+ @Override
+ public String toString() {
+ return "[" + ", name = " + name +
+ ", dataType = " + dataType +
+ ", entrySchema = " + entrySchema +
+ ", definition =" + definition +
+ ", description = " + description +
+ ", updatedBy = " + updatedBy +
+ ", tags = " + tags +
+ ", creationDate = " + creationDate +
+ "]";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDataType() {
+ return dataType;
+ }
+
+ public void setDataType(String dataType) {
+ this.dataType = dataType;
+ }
+
+ public String getEntrySchema() {
+ return entrySchema;
+ }
+
+ public void setEntrySchema(String entrySchema) {
+ this.entrySchema = entrySchema;
+ }
+
+ public ResourceDefinition getDefinition() {
+ return definition;
+ }
+
+ public void setDefinition(ResourceDefinition definition) {
+ this.definition = definition;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags;
+ }
+
+ public Date getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(Date creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getUpdatedBy() {
+ return updatedBy;
+ }
+
+ public void setUpdatedBy(String updatedBy) {
+ this.updatedBy = updatedBy;
+ }
+
+
+
+}
-/*\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.apps.controllerblueprints.service.model;\r
-\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * ArtifactRequest.java Purpose: Provide Configuration Generator ArtifactRequest Model\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-public class AutoMapResponse {\r
-\r
- private List<ResourceAssignment> resourceAssignments;\r
- private List<ResourceDictionary> dataDictionaries;\r
-\r
- public List<ResourceAssignment> getResourceAssignments() {\r
- return resourceAssignments;\r
- }\r
-\r
- public void setResourceAssignments(List<ResourceAssignment> resourceAssignments) {\r
- this.resourceAssignments = resourceAssignments;\r
- }\r
-\r
- public List<ResourceDictionary> getDataDictionaries() {\r
- return dataDictionaries;\r
- }\r
-\r
- public void setDataDictionaries(List<ResourceDictionary> dataDictionaries) {\r
- this.dataDictionaries = dataDictionaries;\r
- }\r
-\r
-\r
-\r
-}\r
+/*
+ * 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.service.model;
+
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary;
+
+import java.util.List;
+
+/**
+ * ArtifactRequest.java Purpose: Provide Configuration Generator ArtifactRequest Model
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+public class AutoMapResponse {
+
+ private List<ResourceAssignment> resourceAssignments;
+ private List<ResourceDictionary> dataDictionaries;
+
+ public List<ResourceAssignment> getResourceAssignments() {
+ return resourceAssignments;
+ }
+
+ public void setResourceAssignments(List<ResourceAssignment> resourceAssignments) {
+ this.resourceAssignments = resourceAssignments;
+ }
+
+ public List<ResourceDictionary> getDataDictionaries() {
+ return dataDictionaries;
+ }
+
+ public void setDataDictionaries(List<ResourceDictionary> dataDictionaries) {
+ this.dataDictionaries = dataDictionaries;
+ }
+
+
+
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository;
+package org.onap.ccsdk.cds.controllerblueprints.service.repository;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelSearch;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelSearch;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service.repository;\r
-\r
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;\r
-import org.springframework.data.jpa.repository.JpaRepository;\r
-import org.springframework.stereotype.Repository;\r
-\r
-import java.util.List;\r
-import java.util.Optional;\r
-\r
-/**\r
- * ResourceMappingRepository.java Purpose: Provide Configuration Generator ResourceMappingRepository\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@Repository\r
-public interface ResourceDictionaryRepository extends JpaRepository<ResourceDictionary, String> {\r
-\r
-\r
- /**\r
- * This is a findByName method\r
- * \r
- * @param name name\r
- * @return Optional<ResourceMapping>\r
- */\r
- Optional<ResourceDictionary> findByName(String name);\r
-\r
- /**\r
- * This is a findByNameIn method\r
- * \r
- * @param names names\r
- * @return Optional<ResourceMapping>\r
- */\r
- List<ResourceDictionary> findByNameIn(List<String> names);\r
-\r
- /**\r
- * This is a findByTagsContainingIgnoreCase method\r
- * \r
- * @param tags tags\r
- * @return Optional<ModelType>\r
- */\r
- List<ResourceDictionary> findByTagsContainingIgnoreCase(String tags);\r
-\r
- /**\r
- * This is a deleteByName method\r
- * \r
- * @param name name\r
- */\r
- void deleteByName(String name);\r
-\r
-\r
-}\r
+/*
+ * 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.repository;
+
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * ResourceMappingRepository.java Purpose: Provide Configuration Generator ResourceMappingRepository
+ *
+ * @author Brinda Santh
+ * @version 1.0
+ */
+@Repository
+public interface ResourceDictionaryRepository extends JpaRepository<ResourceDictionary, String> {
+
+
+ /**
+ * This is a findByName method
+ *
+ * @param name name
+ * @return Optional<ResourceMapping>
+ */
+ Optional<ResourceDictionary> findByName(String name);
+
+ /**
+ * This is a findByNameIn method
+ *
+ * @param names names
+ * @return Optional<ResourceMapping>
+ */
+ List<ResourceDictionary> findByNameIn(List<String> names);
+
+ /**
+ * This is a findByTagsContainingIgnoreCase method
+ *
+ * @param tags tags
+ * @return Optional<ModelType>
+ */
+ List<ResourceDictionary> findByTagsContainingIgnoreCase(String tags);
+
+ /**
+ * This is a deleteByName method
+ *
+ * @param name name
+ */
+ void deleteByName(String name);
+
+
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service
+package org.onap.ccsdk.cds.controllerblueprints.service
import com.fasterxml.jackson.databind.JsonNode
import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ModelTypeRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ResourceDictionaryRepository
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ModelTypeRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ResourceDictionaryRepository
import org.springframework.stereotype.Service
interface ResourceDefinitionRepoService : BluePrintRepoService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service
+package org.onap.ccsdk.cds.controllerblueprints.service
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
+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
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelSearch
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.BluePrintModelHandler
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelSearch
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.BluePrintModelHandler
import org.springframework.core.io.Resource
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
import org.springframework.web.bind.annotation.RestControllerAdvice
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.apps.controllerblueprints.service.common.ErrorMessage
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
+import org.onap.ccsdk.cds.controllerblueprints.service.common.ErrorMessage
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.ExceptionHandler
* @author Vinal Patel
* @version 1.0
*/
-@RestControllerAdvice("org.onap.ccsdk.apps.controllerblueprints")
+@RestControllerAdvice("org.onap.ccsdk.cds.controllerblueprints")
open class ControllerBlueprintExeptionHandler {
@ExceptionHandler
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.ModelTypeHandler
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.ModelTypeHandler
import org.springframework.http.MediaType
import org.springframework.web.bind.annotation.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.ResourceDictionaryHandler
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.ResourceDictionaryHandler
import org.springframework.http.MediaType
import org.springframework.web.bind.annotation.*
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
-
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.AttributeDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
+
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
class BluePrintAttributeDefinitionEnhancerImpl(private val bluePrintRepoService: BluePrintRepoService,
private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService)
-/*\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
-\r
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer\r
-\r
-import com.att.eelf.configuration.EELFLogger\r
-import com.att.eelf.configuration.EELFManager\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintEnhancerService\r
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintFileUtils\r
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils\r
-import org.springframework.stereotype.Service\r
-import java.util.*\r
-\r
-@Service\r
-open class BluePrintEnhancerServiceImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,\r
- private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService) : BluePrintEnhancerService {\r
-\r
- private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintEnhancerServiceImpl::class.toString())\r
-\r
- override suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext {\r
-\r
- // Copy the Blueprint Content to Target Location\r
- BluePrintFileUtils.copyBluePrint(basePath, enrichedBasePath)\r
-\r
- // Enhance the Blueprint\r
- return enhance(enrichedBasePath)\r
- }\r
-\r
- @Throws(BluePrintException::class)\r
- override suspend fun enhance(basePath: String): BluePrintContext {\r
-\r
- log.info("Enhancing blueprint($basePath)")\r
- val blueprintRuntimeService = BluePrintMetadataUtils\r
- .getBaseEnhancementBluePrintRuntime(UUID.randomUUID().toString(), basePath)\r
-\r
- try {\r
-\r
- bluePrintTypeEnhancerService.enhanceServiceTemplate(blueprintRuntimeService, "service_template",\r
- blueprintRuntimeService.bluePrintContext().serviceTemplate)\r
-\r
- log.info("##### Enhancing blueprint Resource Definitions")\r
- val resourceDefinitions = resourceDefinitionEnhancerService.enhance(bluePrintTypeEnhancerService,\r
- blueprintRuntimeService)\r
-\r
- // Write the Enhanced Blueprint Definitions\r
- BluePrintFileUtils.writeEnhancedBluePrint(blueprintRuntimeService.bluePrintContext())\r
-\r
- // Write the Enhanced Blueprint Resource Definitions\r
- ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions)\r
-\r
- if (blueprintRuntimeService.getBluePrintError().errors.isNotEmpty()) {\r
- throw BluePrintException(blueprintRuntimeService.getBluePrintError().errors.toString())\r
- }\r
-\r
- } catch (e: Exception) {\r
- throw e\r
- }\r
- return blueprintRuntimeService.bluePrintContext()\r
- }\r
-\r
-}\r
-\r
+/*
+ * 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.enhancer
+
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
+import org.springframework.stereotype.Service
+import java.util.*
+
+@Service
+open class BluePrintEnhancerServiceImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService) : BluePrintEnhancerService {
+
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintEnhancerServiceImpl::class.toString())
+
+ override suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext {
+
+ // Copy the Blueprint Content to Target Location
+ BluePrintFileUtils.copyBluePrint(basePath, enrichedBasePath)
+
+ // Enhance the Blueprint
+ return enhance(enrichedBasePath)
+ }
+
+ @Throws(BluePrintException::class)
+ override suspend fun enhance(basePath: String): BluePrintContext {
+
+ log.info("Enhancing blueprint($basePath)")
+ val blueprintRuntimeService = BluePrintMetadataUtils
+ .getBaseEnhancementBluePrintRuntime(UUID.randomUUID().toString(), basePath)
+
+ try {
+
+ bluePrintTypeEnhancerService.enhanceServiceTemplate(blueprintRuntimeService, "service_template",
+ blueprintRuntimeService.bluePrintContext().serviceTemplate)
+
+ log.info("##### Enhancing blueprint Resource Definitions")
+ val resourceDefinitions = resourceDefinitionEnhancerService.enhance(bluePrintTypeEnhancerService,
+ blueprintRuntimeService)
+
+ // Write the Enhanced Blueprint Definitions
+ BluePrintFileUtils.writeEnhancedBluePrint(blueprintRuntimeService.bluePrintContext())
+
+ // Write the Enhanced Blueprint Resource Definitions
+ ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions)
+
+ if (blueprintRuntimeService.getBluePrintError().errors.isNotEmpty()) {
+ throw BluePrintException(blueprintRuntimeService.getBluePrintError().errors.toString())
+ }
+
+ } catch (e: Exception) {
+ throw e
+ }
+ return blueprintRuntimeService.bluePrintContext()
+ }
+
+}
+
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.InterfaceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeType
-import org.onap.ccsdk.apps.controllerblueprints.core.data.OperationDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.InterfaceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
+import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PolicyType
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PolicyType
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
-
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
+
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.data.TopologyTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.*
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.apps.controllerblueprints.core.data.DataType
-import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.apps.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
-/*\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.apps.controllerblueprints.service.enhancer\r
-\r
-import com.att.eelf.configuration.EELFLogger\r
-import com.att.eelf.configuration.EELFManager\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes\r
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService\r
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDictionaryConstants\r
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory\r
-import org.onap.ccsdk.apps.controllerblueprints.service.ResourceDefinitionRepoService\r
-import org.springframework.beans.factory.config.ConfigurableBeanFactory\r
-import org.springframework.context.annotation.Scope\r
-import org.springframework.stereotype.Service\r
-\r
-/**\r
- * ResourceAssignmentEnhancerService.\r
- *\r
- * @author Brinda Santh\r
- */\r
-interface ResourceAssignmentEnhancerService {\r
-\r
- @Throws(BluePrintException::class)\r
- fun enhanceBluePrint(bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,\r
- bluePrintRuntimeService: BluePrintRuntimeService<*>,\r
- resourceAssignments: List<ResourceAssignment>)\r
-}\r
-\r
-/**\r
- * ResourceAssignmentEnhancerDefaultService.\r
- *\r
- * @author Brinda Santh\r
- */\r
-@Service\r
-@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)\r
-open class ResourceAssignmentEnhancerServiceImpl(private val resourceDefinitionRepoService: ResourceDefinitionRepoService)\r
- : ResourceAssignmentEnhancerService {\r
- private val log: EELFLogger = EELFManager.getInstance().getLogger(ResourceAssignmentEnhancerServiceImpl::class.java)\r
-\r
- /**\r
- * Get the defined source instance from the ResourceAssignment,\r
- * then get the NodeType of the Sources assigned\r
- */\r
- override fun enhanceBluePrint(bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,\r
- bluePrintRuntimeService: BluePrintRuntimeService<*>,\r
- resourceAssignments: List<ResourceAssignment>) {\r
-\r
- val uniqueSourceNodeTypeNames = hashSetOf<String>()\r
-\r
- // Iterate the Resource Assignment and\r
- resourceAssignments.map { resourceAssignment ->\r
- val dictionaryName = resourceAssignment.dictionaryName!!\r
- val dictionarySource = resourceAssignment.dictionarySource!!\r
- log.debug("Enriching assignment name(${resourceAssignment.name}), dictionary name($dictionaryName), source($dictionarySource)")\r
- val sourceNodeTypeName = ResourceSourceMappingFactory.getRegisterSourceMapping(dictionarySource)\r
-\r
- // Add Unique Node Types\r
- uniqueSourceNodeTypeNames.add(sourceNodeTypeName)\r
-\r
- // TODO("Candidate for Optimisation")\r
- if (checkResourceDefinitionNeeded(resourceAssignment)) {\r
-\r
- bluePrintTypeEnhancerService.enhancePropertyDefinition(bluePrintRuntimeService, resourceAssignment.name,\r
- resourceAssignment.property!!);\r
-\r
- // Get the Resource Definition from Repo\r
- val resourceDefinition: ResourceDefinition = getResourceDefinition(dictionaryName)\r
-\r
- val sourceNodeTemplate = resourceDefinition.sources.get(dictionarySource)\r
- ?: throw BluePrintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")\r
-\r
- // Enrich as NodeTemplate\r
- bluePrintTypeEnhancerService.enhanceNodeTemplate(bluePrintRuntimeService, dictionarySource, sourceNodeTemplate)\r
- }\r
- }\r
- // Enrich the ResourceSource NodeTypes\r
- uniqueSourceNodeTypeNames.map { nodeTypeName ->\r
- val nodeType = resourceDefinitionRepoService.getNodeType(nodeTypeName)\r
- bluePrintTypeEnhancerService.enhanceNodeType(bluePrintRuntimeService, nodeTypeName, nodeType)\r
- }\r
-\r
- }\r
-\r
- private fun checkResourceDefinitionNeeded(resourceAssignment: ResourceAssignment): Boolean {\r
- return !((resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_INPUT)\r
- || resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_DEFAULT))\r
- && BluePrintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!))\r
- }\r
-\r
- private fun getResourceDefinition(name: String): ResourceDefinition {\r
- return resourceDefinitionRepoService.getResourceDefinition(name)\r
- }\r
+/*
+ * 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.service.enhancer
+
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
+import org.onap.ccsdk.cds.controllerblueprints.service.ResourceDefinitionRepoService
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.stereotype.Service
+
+/**
+ * ResourceAssignmentEnhancerService.
+ *
+ * @author Brinda Santh
+ */
+interface ResourceAssignmentEnhancerService {
+
+ @Throws(BluePrintException::class)
+ fun enhanceBluePrint(bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ resourceAssignments: List<ResourceAssignment>)
+}
+
+/**
+ * ResourceAssignmentEnhancerDefaultService.
+ *
+ * @author Brinda Santh
+ */
+@Service
+@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+open class ResourceAssignmentEnhancerServiceImpl(private val resourceDefinitionRepoService: ResourceDefinitionRepoService)
+ : ResourceAssignmentEnhancerService {
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(ResourceAssignmentEnhancerServiceImpl::class.java)
+
+ /**
+ * Get the defined source instance from the ResourceAssignment,
+ * then get the NodeType of the Sources assigned
+ */
+ override fun enhanceBluePrint(bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ resourceAssignments: List<ResourceAssignment>) {
+
+ val uniqueSourceNodeTypeNames = hashSetOf<String>()
+
+ // Iterate the Resource Assignment and
+ resourceAssignments.map { resourceAssignment ->
+ val dictionaryName = resourceAssignment.dictionaryName!!
+ val dictionarySource = resourceAssignment.dictionarySource!!
+ log.debug("Enriching assignment name(${resourceAssignment.name}), dictionary name($dictionaryName), source($dictionarySource)")
+ val sourceNodeTypeName = ResourceSourceMappingFactory.getRegisterSourceMapping(dictionarySource)
+
+ // Add Unique Node Types
+ uniqueSourceNodeTypeNames.add(sourceNodeTypeName)
+
+ // TODO("Candidate for Optimisation")
+ if (checkResourceDefinitionNeeded(resourceAssignment)) {
+
+ bluePrintTypeEnhancerService.enhancePropertyDefinition(bluePrintRuntimeService, resourceAssignment.name,
+ resourceAssignment.property!!);
+
+ // Get the Resource Definition from Repo
+ val resourceDefinition: ResourceDefinition = getResourceDefinition(dictionaryName)
+
+ val sourceNodeTemplate = resourceDefinition.sources.get(dictionarySource)
+ ?: throw BluePrintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")
+
+ // Enrich as NodeTemplate
+ bluePrintTypeEnhancerService.enhanceNodeTemplate(bluePrintRuntimeService, dictionarySource, sourceNodeTemplate)
+ }
+ }
+ // Enrich the ResourceSource NodeTypes
+ uniqueSourceNodeTypeNames.map { nodeTypeName ->
+ val nodeType = resourceDefinitionRepoService.getNodeType(nodeTypeName)
+ bluePrintTypeEnhancerService.enhanceNodeType(bluePrintRuntimeService, nodeTypeName, nodeType)
+ }
+
+ }
+
+ private fun checkResourceDefinitionNeeded(resourceAssignment: ResourceAssignment): Boolean {
+ return !((resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_INPUT)
+ || resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_DEFAULT))
+ && BluePrintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!))
+ }
+
+ private fun getResourceDefinition(name: String): ResourceDefinition {
+ return resourceDefinitionRepoService.getResourceDefinition(name)
+ }
}
\ No newline at end of file
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import com.att.eelf.configuration.EELFLogger
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.ResourceDefinitionRepoService
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.ResourceDefinitionRepoService
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.stereotype.Service
interface ResourceDefinitionEnhancerService {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.handler
+package org.onap.ccsdk.cds.controllerblueprints.service.handler
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintFileUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModel
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelSearch
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ControllerBlueprintModelContentRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ControllerBlueprintModelRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ControllerBlueprintModelSearchRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModel
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelSearch
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ControllerBlueprintModelContentRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ControllerBlueprintModelRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ControllerBlueprintModelSearchRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.utils.BluePrintEnhancerUtils
import org.springframework.core.io.ByteArrayResource
import org.springframework.core.io.Resource
import org.springframework.http.HttpHeaders
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.handler
+package org.onap.ccsdk.cds.controllerblueprints.service.handler
import com.att.eelf.configuration.EELFManager
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ModelTypeRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.validator.ModelTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ModelTypeRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.validator.ModelTypeValidator
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.handler
+package org.onap.ccsdk.cds.controllerblueprints.service.handler
import com.google.common.base.Preconditions
import org.apache.commons.collections.CollectionUtils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceSourceMapping
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ResourceDictionaryRepository
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmptyOrThrow
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ResourceDictionaryRepository
import org.springframework.stereotype.Service
@Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.load
+package org.onap.ccsdk.cds.controllerblueprints.service.load
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.apache.commons.lang3.text.StrBuilder
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.springframework.stereotype.Service
import java.io.File
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.load
+package org.onap.ccsdk.cds.controllerblueprints.service.load
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.springframework.boot.context.event.ApplicationReadyEvent
import org.springframework.context.event.EventListener
import org.springframework.stereotype.Service
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.load
+package org.onap.ccsdk.cds.controllerblueprints.service.load
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.common.ApplicationConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.config.BluePrintLoadConfiguration
-import org.onap.ccsdk.apps.controllerblueprints.core.data.ErrorCode
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.BlueprintCatalogServiceImpl
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModel
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelContent
-import org.onap.ccsdk.apps.controllerblueprints.service.repository.ControllerBlueprintModelRepository
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.BlueprintCatalogServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModel
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent
+import org.onap.ccsdk.cds.controllerblueprints.service.repository.ControllerBlueprintModelRepository
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
import java.nio.file.Paths
/**
- * Similar implementation in [org.onap.ccsdk.apps.blueprintsprocessor.db.BlueprintProcessorCatalogServiceImpl]
+ * Similar implementation in [org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintProcessorCatalogServiceImpl]
*/
@Service
class ControllerBlueprintCatalogServiceImpl(bluePrintValidatorService: BluePrintValidatorService,
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.load
+package org.onap.ccsdk.cds.controllerblueprints.service.load
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.*
import org.apache.commons.io.FilenameUtils
import org.apache.commons.lang3.text.StrBuilder
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.ModelTypeHandler
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.ModelTypeHandler
import org.springframework.stereotype.Service
import java.io.File
import java.nio.charset.Charset
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.load
+package org.onap.ccsdk.cds.controllerblueprints.service.load
import com.att.eelf.configuration.EELFManager
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.runBlocking
import org.apache.commons.lang3.StringUtils
import org.apache.commons.lang3.text.StrBuilder
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.ResourceDictionaryHandler
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.ResourceDictionaryHandler
import org.springframework.stereotype.Service
import java.io.File
import java.nio.charset.Charset
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository
+package org.onap.ccsdk.cds.controllerblueprints.service.repository
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository
+package org.onap.ccsdk.cds.controllerblueprints.service.repository
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.repository.ModelContentRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModel
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelContent
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelContentRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModel
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelContent
interface ControllerBlueprintModelContentRepository : ModelContentRepository<BlueprintModel, BlueprintModelContent>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository
+package org.onap.ccsdk.cds.controllerblueprints.service.repository
-import org.onap.ccsdk.apps.controllerblueprints.db.resources.repository.ModelRepository
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModel
+import org.onap.ccsdk.cds.controllerblueprints.db.resources.repository.ModelRepository
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModel
interface ControllerBlueprintModelRepository : ModelRepository<BlueprintModel>
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository
+package org.onap.ccsdk.cds.controllerblueprints.service.repository
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.stereotype.Repository
import javax.transaction.Transactional
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository
+package org.onap.ccsdk.cds.controllerblueprints.service.repository
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary
import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.utils
+package org.onap.ccsdk.cds.controllerblueprints.service.utils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.reactive.awaitSingle
import kotlinx.coroutines.withContext
-import org.onap.ccsdk.apps.controllerblueprints.core.*
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.springframework.core.io.ByteArrayResource
import org.springframework.core.io.Resource
import org.springframework.http.HttpHeaders
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.validator
+package org.onap.ccsdk.cds.controllerblueprints.service.validator
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
-import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
class ModelTypeValidator {
companion object {
-/*\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.apps.controllerblueprints;\r
-\r
-import org.springframework.boot.autoconfigure.domain.EntityScan;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.data.jpa.repository.config.EnableJpaAuditing;\r
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;\r
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;\r
-import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;\r
-import org.springframework.transaction.annotation.EnableTransactionManagement;\r
-\r
-import javax.sql.DataSource;\r
-\r
-/**\r
- * DatabaseConfig.java Purpose: Provide Configuration Generator DatabaseConfig Information\r
- *\r
- * @author Brinda Santh\r
- * @version 1.0\r
- */\r
-@Configuration\r
-@EntityScan("org.onap.ccsdk.apps.controllerblueprints.service.domain")\r
-@EnableTransactionManagement\r
-@EnableJpaRepositories("org.onap.ccsdk.apps.controllerblueprints.service.repository")\r
-@EnableJpaAuditing\r
-public class DatabaseConfig {\r
- /**\r
- * This is a entityManagerFactory method\r
- * \r
- * @param dataSource\r
- * @return LocalContainerEntityManagerFactoryBean\r
- */\r
-\r
- @Bean\r
- public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {\r
- HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\r
- vendorAdapter.setGenerateDdl(true);\r
- vendorAdapter.setShowSql(false);\r
- LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\r
- factory.setJpaVendorAdapter(vendorAdapter);\r
- factory.setPackagesToScan("org.onap.ccsdk.apps.controllerblueprints.service.domain");\r
- factory.setDataSource(dataSource);\r
- return factory;\r
- }\r
-\r
-}\r
+/*
+ * 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;
+ }
+
+}
-/*\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.apps.controllerblueprints;\r
-\r
-import org.springframework.boot.SpringApplication;\r
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r
-import org.springframework.boot.autoconfigure.SpringBootApplication;\r
-import org.springframework.context.annotation.ComponentScan;\r
-\r
-\r
-@SpringBootApplication\r
-@ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints"})\r
-@EnableAutoConfiguration\r
-public class TestApplication {\r
-\r
- public static void main(String[] args) {\r
- SpringApplication.run(TestApplication.class, args);\r
- }\r
-\r
+/*
+ * 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
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service;
+package org.onap.ccsdk.cds.controllerblueprints.service;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
-import org.onap.ccsdk.apps.controllerblueprints.service.handler.ModelTypeHandler;
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType;
+import org.onap.ccsdk.cds.controllerblueprints.service.handler.ModelTypeHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.annotation.Commit;
-/*\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.apps.controllerblueprints.service.common;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-import org.apache.commons.io.FileUtils;\r
-import org.junit.Assert;\r
-import org.junit.FixMethodOrder;\r
-import org.junit.Test;\r
-import org.junit.runners.MethodSorters;\r
-import org.onap.ccsdk.apps.controllerblueprints.service.SchemaGeneratorService;\r
-\r
-import java.io.File;\r
-import java.nio.charset.Charset;\r
-\r
-\r
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)\r
-public class SchemaGeneratorServiceTest {\r
-\r
- private static EELFLogger log = EELFManager.getInstance().getLogger(SchemaGeneratorServiceTest.class);\r
-\r
- @Test\r
- public void test01GenerateSwaggerData() throws Exception {\r
- log.info("******************* test01GenerateSwaggerData ******************************");\r
-\r
- String file = "src/test/resources/enhance/enhanced-template.json";\r
- String serviceTemplateContent = FileUtils.readFileToString(new File(file), Charset.defaultCharset());\r
- SchemaGeneratorService schemaGeneratorService = new SchemaGeneratorService();\r
- String schema = schemaGeneratorService.generateSchema(serviceTemplateContent);\r
- log.trace("Generated Schema " + schema);\r
- Assert.assertNotNull("failed to generate Sample Data", schema);\r
-\r
- }\r
-\r
-}\r
+/*
+ * 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.service.common;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.apache.commons.io.FileUtils;
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runners.MethodSorters;
+import org.onap.ccsdk.cds.controllerblueprints.service.SchemaGeneratorService;
+
+import java.io.File;
+import java.nio.charset.Charset;
+
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class SchemaGeneratorServiceTest {
+
+ private static EELFLogger log = EELFManager.getInstance().getLogger(SchemaGeneratorServiceTest.class);
+
+ @Test
+ public void test01GenerateSwaggerData() throws Exception {
+ log.info("******************* test01GenerateSwaggerData ******************************");
+
+ String file = "src/test/resources/enhance/enhanced-template.json";
+ String serviceTemplateContent = FileUtils.readFileToString(new File(file), Charset.defaultCharset());
+ SchemaGeneratorService schemaGeneratorService = new SchemaGeneratorService();
+ String schema = schemaGeneratorService.generateSchema(serviceTemplateContent);
+ log.trace("Generated Schema " + schema);
+ Assert.assertNotNull("failed to generate Sample Data", schema);
+
+ }
+
+}
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository;
+package org.onap.ccsdk.cds.controllerblueprints.service.repository;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.annotation.Commit;
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.repository;
+package org.onap.ccsdk.cds.controllerblueprints.service.repository;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
-import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication;
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition;
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ResourceDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.annotation.Commit;
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
import com.google.gson.Gson
import org.json.JSONException
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintArchiveUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.BlueprintModelSearch
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelSearch
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ContextConfiguration(classes = [TestApplication::class])
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.controllerblueprints"])
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@EnableAutoConfiguration
class BlueprintModelControllerTest {
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
import com.att.eelf.configuration.EELFManager
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
import org.springframework.test.annotation.Commit
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller
+package org.onap.ccsdk.cds.controllerblueprints.service.controller
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.context.annotation.ComponentScan
@RunWith(SpringRunner::class)
@ContextConfiguration(classes = [TestApplication::class])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ComponentScan(basePackages = ["org.onap.ccsdk.apps.controllerblueprints"])
+@ComponentScan(basePackages = ["org.onap.ccsdk.cds.controllerblueprints"])
class ResourceDictionaryControllerTest {
@Autowired
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.controller.mock
+package org.onap.ccsdk.cds.controllerblueprints.service.controller.mock
import org.apache.commons.io.FilenameUtils
import org.slf4j.LoggerFactory
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
+package org.onap.ccsdk.cds.controllerblueprints.service.enhancer
import kotlinx.coroutines.runBlocking
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.apps.controllerblueprints.TestApplication
-import org.onap.ccsdk.apps.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintEnhancerService
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintValidatorService
-import org.onap.ccsdk.apps.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.apps.controllerblueprints.service.load.ModelTypeLoadService
-import org.onap.ccsdk.apps.controllerblueprints.service.load.ResourceDictionaryLoadService
+import org.onap.ccsdk.cds.controllerblueprints.TestApplication
+import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
+import org.onap.ccsdk.cds.controllerblueprints.service.load.ModelTypeLoadService
+import org.onap.ccsdk.cds.controllerblueprints.service.load.ResourceDictionaryLoadService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.utils
+package org.onap.ccsdk.cds.controllerblueprints.service.utils
import kotlinx.coroutines.runBlocking
import org.junit.After
import org.junit.Before
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.core.*
-import org.onap.ccsdk.apps.controllerblueprints.service.controller.mock.MockFilePart
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.service.controller.mock.MockFilePart
import java.nio.file.Paths
import java.util.*
import kotlin.test.assertTrue
* limitations under the License.
*/
-package org.onap.ccsdk.apps.controllerblueprints.service.validator
+package org.onap.ccsdk.cds.controllerblueprints.service.validator
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
-import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType
+import org.onap.ccsdk.cds.controllerblueprints.service.domain.ModelType
class ModelTypeValidatorTest {
<logger name="org.springframework" level="warn"/>
<logger name="org.springframework.web" level="warn"/>
<logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.apps" level="info"/>
+ <logger name="org.onap.ccsdk.cds" level="info"/>
<root level="warn">
<appender-ref ref="STDOUT"/>
<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.apps</groupId>
+ <groupId>org.onap.ccsdk.cds</groupId>
<artifactId>controllerblueprints</artifactId>
<version>0.4.2-SNAPSHOT</version>
</parent>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>parent</artifactId>
<name>Controller Blueprints Parent</name>
<packaging>pom</packaging>
<!-- Application Components -->
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>resource-dict</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>db-resources</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-validation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>blueprint-scripts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
<artifactId>application</artifactId>
<version>${project.version}</version>
</dependency>
-->
<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/maven-v4_0_0.xsd">
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>ccsdk-apps-ms</artifactId>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>ms</artifactId>
<version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>controllerblueprints</artifactId>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 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</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>ms</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Micro-services Root</name>
+ <description>Micro-services</description>
+
+ <modules>
+ <module>controllerblueprints</module>
+ <module>blueprintsprocessor</module>
+ <module>cds-sdc-listener</module>
+ </modules>
+</project>
<!--
-============LICENSE_START==========================================
-===================================================================
-Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
-===================================================================
+Copyright (C) 2019 Bell Canada
Unless otherwise specified, all software contained herein is licensed
under the Apache License, Version 2.0 (the License);
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.
-============LICENSE_END============================================ -->
+-->
<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>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>1.2.1-SNAPSHOT</version>
- <relativePath/>
- </parent>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>odlparent-lite</artifactId>
+ <version>1.2.1</version>
+ <relativePath/>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.onap.ccsdk.cds</groupId>
- <artifactId>controller-design-studio</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>parent</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
<packaging>pom</packaging>
+ <name>cds-parent</name>
+ <description>CCSDK Controller Design Studio</description>
- <name>controller-design-studio</name>
- <description>Creates Controller Design Studio UI Docker container</description>
+ <modules>
+ <!--<module>cds-ui</module>-->
+ <module>components</module>
+ <module>ms</module>
+ </modules>
- <properties>
- <image.name>onap/ccsdk-cds-ui</image.name>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
- <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
- <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
- <docker.verbose>true</docker.verbose>
- </properties>
-
-<!--
- <modules>
- <module>cds-ui/client</module>
- <module>cds-ui/server</module>
- </modules>
+ <url>https://wiki.onap.org</url>
+ <organization>
+ <name>ONAP</name>
+ </organization>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <npm.executable>npm</npm.executable>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+ <!--Don't set any language to let sonar enable multi-language support-->
+ <sonar.language/>
+ <!--Provide src/main as source path so both src/main/java and src/main/kotlin are scanned-->
+ <sonar.sources>src/main</sonar.sources>
+ <!--Provide src/test as source path for test so both src/test/java and src/test/kotlin are scanned-->
+ <sonar.tests>src/test</sonar.tests>
+ <!--Only include java and kt files to the scan-->
+ <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
+ <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report.
+ Note: coverage for now is invalid and is failing to load because of:
+ "Cannot import coverage information for file '{file}', coverage data is invalid."
+ see https://github.com/jacoco/jacoco/issues/763
+ That issue has been fixed in 0.8.3 , so we override the default ONAP
+ version here to pick up that fix -->
+ <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+ </sonar.coverage.jacoco.xmlReportPaths>
+ <jacoco.version>0.8.3</jacoco.version>
</properties>
--->
-<build>
+ <build>
<plugins>
<plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>${basedir}/TagVersion.groovy</source>
- </configuration>
- </execution>
- </executions>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
- <id>docker</id>
+ <id>blackduck</id>
+ <activation>
+ <property>
+ <name>blackduck-scan</name>
+ </property>
+ </activation>
<build>
<plugins>
<plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.28.0</version>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>1.4.0</version>
<inherited>false</inherited>
<configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/cds-ui</dockerFileDir>
- <tags>
- <tag>${project.docker.latestminortag.version}</tag>
- <tag>${project.docker.latestfulltag.version}</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
- </tags>
- </build>
- </image>
- </images>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
</configuration>
<executions>
<execution>
- <id>generate-images</id>
+ <id>create-bdio-file</id>
<phase>package</phase>
<goals>
- <goal>build</goal>
- </goals>
- </execution>
-
- <execution>
- <id>push-images</id>
- <phase>deploy</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
+ <goal>createHubOutput</goal>
</goals>
</execution>
</executions>
</build>
</profile>
</profiles>
- <organization>
- <name>ONAP</name>
- </organization>
-</project>
+</project>
\ No newline at end of file