summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/client/src/app/common/core/services/api.service.ts32
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html6
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts274
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts59
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html4
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts3
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts7
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html12
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts16
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts5
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.service.ts39
-rw-r--r--cds-ui/server/src/controllers/blueprint-rest.controller.ts152
-rw-r--r--cds-ui/server/src/controllers/data-dictionary.controller.ts85
-rw-r--r--cds-ui/server/src/controllers/index.ts1
-rw-r--r--cds-ui/server/src/datasources/index.ts1
-rw-r--r--cds-ui/server/src/datasources/resource-dictionary.datasource.json89
-rw-r--r--cds-ui/server/src/datasources/resource-dictionary.datasource.ts14
-rw-r--r--cds-ui/server/src/services/index.ts1
-rw-r--r--cds-ui/server/src/services/resource-dictionary.service.ts23
-rw-r--r--docs/CBA/index.rst4
-rw-r--r--docs/CBA/resourceassignment.rst3
-rw-r--r--docs/bluePrintsProcessor.rst54
-rw-r--r--docs/controllerBlueprintStudioProcessor.rst28
-rw-r--r--docs/datadictionary/capabilitytable.JPGbin0 -> 57448 bytes
-rw-r--r--docs/datadictionary/index.rst87
-rw-r--r--docs/datadictionary/media/image0.JPGbin0 -> 48105 bytes
-rw-r--r--docs/datadictionary/media/image1.JPGbin0 -> 79730 bytes
-rw-r--r--docs/datadictionary/resourcesource.rst110
-rw-r--r--docs/datadictionary/restauth.rst42
-rw-r--r--docs/datadictionary/resttable.JPGbin0 -> 79877 bytes
-rw-r--r--docs/datadictionary/sqltable.JPGbin0 -> 36259 bytes
-rw-r--r--docs/index.rst25
-rw-r--r--docs/media/CDS_architecture.JPGbin0 -> 140539 bytes
-rw-r--r--docs/media/image0.jpgbin0 -> 84320 bytes
-rw-r--r--docs/resourceassignment.rst73
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml5
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcDisable.java (renamed from ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintHttpServer.java)5
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcEnable.java56
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt2
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt76
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt11
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt)8
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt)6
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt (renamed from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt)0
50 files changed, 1118 insertions, 306 deletions
diff --git a/cds-ui/client/src/app/common/core/services/api.service.ts b/cds-ui/client/src/app/common/core/services/api.service.ts
index 20d8a9bce..463ef3827 100644
--- a/cds-ui/client/src/app/common/core/services/api.service.ts
+++ b/cds-ui/client/src/app/common/core/services/api.service.ts
@@ -31,38 +31,14 @@ export class ApiService {
constructor(private _http: HttpClient) {
}
- enrich(uri: string, body: FormData): Observable<any> {
-
- var HTTPOptions = {
- headers: new HttpHeaders({ 'Accept': 'application/zip', }),
- observe: "response" as 'body',// to display the full response & as 'body' for type cast
- 'responseType': 'blob' as 'json'
- }
- return this._http.post(LoopbackConfig.url + uri, body, HTTPOptions);
-
+ get(url: string, params?: any): Observable<any> {
+ return this._http.get(url,params);
}
- downloadCBA(uri: string, params?: any): Observable<Blob> {
- // return this._http.get<Blob>(LoopbackConfig.url+uri);
- var HTTPOptions = {
- headers: new HttpHeaders({ 'Accept': 'application/zip; charset=UTF-8', }),
- observe: "response" as 'body',// to display the full response & as 'body' for type cast
- 'responseType': 'blob' as 'json'
- }
- return this._http.get<Blob>(LoopbackConfig.url + uri, HTTPOptions);
- }
+ post(url: string, body: any | null, options?:any): Observable<any> {
- post(uri: string, body: FormData): Observable<any> {
- // to do
- const httpOptions = {
- headers: new HttpHeaders({
- 'Authorization': LoopbackConfig.authtoken,
-
- })
- };
- return this._http.post(LoopbackConfig.url + uri, body, httpOptions);
+ return this._http.post(url, body,options);
}
-
put() {
// to do
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
index 5a3973a5e..619412c17 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
@@ -35,13 +35,13 @@ limitations under the License.
<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 (click)="activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
+ <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="selectFolder(node);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 (click)="selectFolder(node)">{{node.name}}</button>
+ <button mat-icon-button>{{node.name}}</button>
</mat-tree-node>
</mat-tree>
</div>
@@ -49,7 +49,7 @@ limitations under the License.
<!-- <i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
<ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor> -->
<div class="normal-editor-mode" [ngClass]="{ 'resource-mapping-mode': viewTemplateMode}">
- <i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
+ <i class="fa fa-save save-icon" style="font-size:24px" (click)="saveEditedChanges()"></i>
<ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor>
</div>
<button *ngIf="viewTemplateMode" class="btn-active" (click)="loadConfigParams()">Load Config Parameters</button>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
index 7cbf5b0a5..1f8526a53 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
@@ -36,7 +36,8 @@ import { Observable } from 'rxjs';
import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
import { LoadBlueprintSuccess, SetBlueprintState } from '../../../../common/core/store/actions/blueprint.action'
import { ApiService } from 'src/app/common/core/services/api.service';
-
+import { IMetaData } from 'src/app/common/core/store/models/metadata.model';
+import { EditorService } from './editor.service';
interface Node {
name: string;
@@ -92,9 +93,9 @@ export class EditorComponent implements OnInit {
currentFilePath: string = '';
selectedFileObj = { name: '', type: '' };
viewTemplateMode: boolean = false;
- paramData : any = {
+ paramData: any = {
'capability-data': [],
- 'resourceAccumulatorResolvedData' : []
+ 'resourceAccumulatorResolvedData': []
};
validfile: boolean = false;
@ViewChild('fileInput') fileInput;
@@ -103,6 +104,7 @@ export class EditorComponent implements OnInit {
private tree;
private fileObject: any;
private tocsaMetadaData: any;
+ metadata: IMetaData;
private transformer = (node: Node, level: number) => {
return {
@@ -119,8 +121,10 @@ export class EditorComponent implements OnInit {
this.transformer, node => node.level, node => node.expandable, node => node.children);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
+ artifactName: any;
+ artifactVersion: any;
- constructor(private store: Store<IAppState>, private apiservice: ApiService) {
+ constructor(private store: Store<IAppState>, private apiservice: EditorService) {
this.dataSource.data = TREE_DATA;
this.bpState = this.store.select('blueprint');
// this.dataSource.data = TREE_DATA;
@@ -161,8 +165,15 @@ export class EditorComponent implements OnInit {
blueprint.push(this.blueprintdata[key]);
}
}
- // this.text = JSON.stringify(this.blueprintdata, null, '\t');
- // this.editor.getEditor().getSession().setMode("ace/mode/json");
+ this.metadata = blueprintState.blueprint.metadata;
+ let metadatavalues = [];
+ for (let key in this.metadata) {
+ if (this.metadata.hasOwnProperty(key)) {
+ metadatavalues.push(this.metadata[key]);
+ }
+ }
+ this.artifactName = metadatavalues[3];
+ this.artifactVersion = metadatavalues[4];
this.editor.getEditor().getSession().setTabSize(2);
this.editor.getEditor().getSession().setUseWrapMode(true);
this.setEditorMode();
@@ -170,21 +181,21 @@ export class EditorComponent implements OnInit {
}
updateBlueprint() {
- console.log(this.blueprint);
- this.filesData.forEach(fileNode => {
- if (this.selectedFile && fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
- fileNode.data = this.text;
- } else if (this.selectedFile && fileNode.name.includes(this.currentFilePath)) {
- // this.selectedFile && fileNode.name.includes(this.selectedFile.trim())) {
- fileNode.data = this.text;
- }
- });
-
- if (this.selectedFile && this.selectedFile == this.blueprintName.trim()) {
- this.blueprint = JSON.parse(this.text);
- } else {
- this.blueprint = this.blueprintdata;
- }
+ // console.log(this.blueprint);
+ // this.filesData.forEach(fileNode => {
+ // if (this.selectedFile && fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
+ // fileNode.data = this.text;
+ // } else if (this.selectedFile && fileNode.name.includes(this.currentFilePath)) {
+ // // this.selectedFile && fileNode.name.includes(this.selectedFile.trim())) {
+ // fileNode.data = this.text;
+ // }
+ // });
+
+ // if (this.selectedFile && this.selectedFile == this.blueprintName.trim()) {
+ // this.blueprint = JSON.parse(this.text);
+ // } else {
+ // this.blueprint = this.blueprintdata;
+ // }
let blueprintState = {
blueprint: this.blueprint,
@@ -197,7 +208,7 @@ export class EditorComponent implements OnInit {
}
selectFileToView(file) {
- if(file.name.includes('.vtl')) { this.viewTemplateMode = true;} else { this.viewTemplateMode = false;}
+ if (file.name.includes('.vtl')) { this.viewTemplateMode = true; } else { this.viewTemplateMode = false; }
this.currentFilePath = '';
this.expandParents(file);
this.selectedFileObj.name = file.name;
@@ -224,70 +235,21 @@ export class EditorComponent implements OnInit {
this.apiservice.enrich("/enrich-blueprint/", formData)
.subscribe(
(response) => {
- console.log("Inside blob");
- var blob = new Blob([response.data], { type: 'application/zip' });
- const fileName = 'CBA.zip';
- saveAs(blob, fileName);
this.zipFile.files = {};
- this.zipFile.loadAsync(blob)
+ this.zipFile.loadAsync(response)
.then((zip) => {
if (zip) {
this.buildFileViewData(zip);
+ console.log("processed");
}
});
-
+ window.alert('Blueprint enriched successfully');
});
-
});
-
}
- async buildFileViewData(zip) {
- this.validfile = false;
- this.paths = [];
- for (var file in zip.files) {
- this.fileObject = {
- name: zip.files[file].name,
- data: ''
- };
- const value = <any>await zip.files[file].async('string');
- this.fileObject.data = value;
- this.paths.push(this.fileObject);
- }
-
- if(this.paths) {
- this.paths.forEach(path =>{
- if(path.name.includes("TOSCA.meta")) {
- this.validfile = true
- }
- });
- } else {
- alert('Please update proper file');
- }
- if(this.validfile) {
- this.fetchTOSACAMetadata();
- this.tree = this.arrangeTreeData(this.paths);
- } else {
- alert('Please update proper file with TOSCA metadata');
- }
- }
- fetchTOSACAMetadata() {
- let toscaData = {};
- this.paths.forEach(file =>{
- if(file.name.includes('TOSCA.meta')) {
- let keys = file.data.split("\n");
- keys.forEach((key)=>{
- let propertyData = key.split(':');
- toscaData[propertyData[0]] = propertyData[1];
- });
- }
- });
- this.blueprintName = (((toscaData['Entry-Definitions']).split('/'))[1]).toString();;
- console.log(toscaData);
- }
-
saveToBackend() {
this.create();
this.zipFile.generateAsync({ type: "blob" })
@@ -295,7 +257,11 @@ export class EditorComponent implements OnInit {
const formData = new FormData();
formData.append("file", blob);
this.apiservice.post("/create-blueprint/", formData)
- .subscribe(data => console.log(data));
+ .subscribe(
+ data => {
+ // console.log(data);
+ window.alert('Success:' + JSON.stringify(data));
+ });
});
}
@@ -307,8 +273,11 @@ export class EditorComponent implements OnInit {
.then(blob => {
const formData = new FormData();
formData.append("file", blob);
- this.apiservice.post("/deploy-blueprint/", formData)
- .subscribe(data => console.log(data));
+ this.apiservice.deployPost("/deploy-blueprint/", formData)
+ .subscribe(data => {
+ // console.log(data);
+ window.alert('Saved Successfully:' + JSON.stringify(data));
+ });
});
}
@@ -320,7 +289,10 @@ export class EditorComponent implements OnInit {
const formData = new FormData();
formData.append("file", blob);
this.apiservice.post("/publish/", formData)
- .subscribe(data => console.log(data));
+ .subscribe(data => {
+ // console.log(data);
+ window.alert('Published:' + JSON.stringify(data));
+ });
});
@@ -328,22 +300,33 @@ export class EditorComponent implements OnInit {
create() {
this.filesData.forEach((path) => {
- this.zipFile.file(path.name, path.data);
+ let index = path.name.indexOf("/");
+ let name = path.name.slice(index + 1, path.name.length);
+ this.zipFile.file(name, path.data);
});
}
download() {
- this.apiservice.downloadCBA("/download-blueprint/baseconfiguration/1.0.0")
- .subscribe(response => {
- console.log(response);
- var blob = new Blob([response], { type: 'application/zip' });
- const fileName = 'CBA';
- saveAs(blob, fileName);
- },
- error => {
- console.log(error);
- }
- );
+ console.log(this.artifactName);
+ status = this.apiservice.downloadCBA("/download-blueprint/" + this.artifactName + "/" + this.artifactVersion);
+ window.alert(status);
+ // .subscribe(response => {
+ // console.log(response);
+ // var blob = new Blob([response], { type: 'application/zip' });
+ // const fileName = 'CBA';
+ // saveAs(blob, fileName);
+ // },
+ // error => {
+ // console.log(error);
+ // }
+ // );
+
+ // this.create();
+ // var zipFilename = "baseconfiguration.zip";
+ // this.zipFile.generateAsync({ type: "blob" })
+ // .then(blob => {
+ // saveAs(blob, zipFilename);
+ // });
}
setEditorMode() {
switch (this.fileExtension) {
@@ -417,6 +400,52 @@ export class EditorComponent implements OnInit {
return indexForNewNode;
}
+ async buildFileViewData(zip) {
+ this.validfile = false;
+ this.paths = [];
+ for (var file in zip.files) {
+ this.fileObject = {
+ name: zip.files[file].name,
+ data: ''
+ };
+ const value = <any>await zip.files[file].async('string');
+ this.fileObject.data = value;
+ this.paths.push(this.fileObject);
+ }
+
+ if (this.paths) {
+ this.paths.forEach(path => {
+ if (path.name.includes("TOSCA.meta")) {
+ this.validfile = true
+ }
+ });
+ } else {
+ alert('Please update proper file');
+ }
+
+ if (this.validfile) {
+ this.fetchTOSACAMetadata();
+ this.tree = this.arrangeTreeData(this.paths);
+ } else {
+ alert('Please update proper file with TOSCA metadata');
+ }
+ }
+
+ fetchTOSACAMetadata() {
+ let toscaData = {};
+ this.paths.forEach(file => {
+ if (file.name.includes('TOSCA.meta')) {
+ let keys = file.data.split("\n");
+ keys.forEach((key) => {
+ let propertyData = key.split(':');
+ toscaData[propertyData[0]] = propertyData[1];
+ });
+ }
+ });
+ this.blueprintName = (((toscaData['Entry-Definitions']).split('/'))[1]).toString();;
+ console.log(toscaData);
+ }
+
arrangeTreeData(paths) {
const tree = [];
@@ -505,36 +534,55 @@ export class EditorComponent implements OnInit {
}
loadConfigParams() {
console.log(this.currentFilePath);
- console.log(this.selectedFile);
- console.log(this.selectedFileObj);
- console.log(this.selectedFolder);
- console.log(this.text);
-
- let parsedData = JSON.parse(this.text);
- this.paramData.resourceAccumulatorResolvedData = parsedData['resource-accumulator-resolved-data'];
- let i=0;
-
- this.paramData.resourceAccumulatorResolvedData.forEach(element => {
- element.id = i;
- let tempElement = element['param-value'];
- let indexLength = tempElement.length;
- tempElement = tempElement.slice(2,indexLength);
- let index = tempElement.indexOf('}');
- tempElement = this.removeItemByIndex(tempElement, index);
- element['param-value'] = tempElement;
- i++;
- });
+ console.log(this.selectedFile);
+ console.log(this.selectedFileObj);
+ console.log(this.selectedFolder);
+ console.log(this.text);
+
+ let parsedData = JSON.parse(this.text);
+ this.paramData.resourceAccumulatorResolvedData = parsedData['resource-accumulator-resolved-data'];
+ let i = 0;
+
+ this.paramData.resourceAccumulatorResolvedData.forEach(element => {
+ element.id = i;
+ let tempElement = element['param-value'];
+ let indexLength = tempElement.length;
+ tempElement = tempElement.slice(2, indexLength);
+ let index = tempElement.indexOf('}');
+ tempElement = this.removeItemByIndex(tempElement, index);
+ element['param-value'] = tempElement;
+ i++;
+ });
}
removeItemByIndex(paramValue, index) {
- if(index == 0) {
- return paramValue.slice(1)
- } else if(index > 0) {
+ if (index == 0) {
+ return paramValue.slice(1)
+ } else if (index > 0) {
let indexLength = paramValue.length;
- return paramValue.slice(0,index) + paramValue.slice(index+1, indexLength);
+ return paramValue.slice(0, index) + paramValue.slice(index + 1, indexLength);
} else {
return paramValue;
}
}
+
+ saveEditedChanges() {
+ this.filesData.forEach(fileNode => {
+ if (this.selectedFile && fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
+ fileNode.data = this.text;
+ } else if (this.selectedFile && fileNode.name.includes(this.currentFilePath)) {
+ // this.selectedFile && fileNode.name.includes(this.selectedFile.trim())) {
+ fileNode.data = this.text;
+ }
+ });
+
+ if (this.selectedFile && this.selectedFile == this.blueprintName.trim()) {
+ this.blueprint = JSON.parse(this.text);
+ } else {
+ this.blueprint = this.blueprintdata;
+ }
+
+ this.updateBlueprint();
+ }
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts
new file mode 100644
index 000000000..63c8019c3
--- /dev/null
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.service.ts
@@ -0,0 +1,59 @@
+/*
+============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============================================
+*/
+
+
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable, observable } from 'rxjs';
+import { ApiService } from '../../../../common/core/services/api.service';
+import { LoopbackConfig } from '../../../../common/constants/app-constants';
+import { saveAs } from 'file-saver';
+
+@Injectable()
+export class EditorService {
+ // blueprintUrl = '../../constants/blueprint.json';
+
+ constructor(private _http: HttpClient, private api: ApiService) {
+ }
+
+ enrich(uri: string, body: FormData): Observable<any> {
+ return this.api.post(LoopbackConfig.url + uri, body, { responseType: 'blob' });
+ }
+ downloadCBA(uri: string): string {
+ this.api.get(LoopbackConfig.url + uri, { responseType: 'blob' })
+ .subscribe(response => {
+ let blob = new Blob([response], { 'type': "application/octet-stream" });
+ saveAs(blob, "CBA.zip");
+ window.alert('Blueprint download successfull' );
+ });
+ return "Download Success";
+
+ }
+ post(uri: string, body: any | null, options?: any): Observable<any> {
+
+ return this.api.post(LoopbackConfig.url + uri, body, options);
+ }
+
+ deployPost(uri: string, body: any | null, options?: any): Observable<any> {
+
+ return this.api.post(LoopbackConfig.url + uri, body, { responseType: 'text' });
+ }
+} \ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html
index 1d9b5266e..546668d43 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html
@@ -36,9 +36,9 @@ limitations under the License.
<button class="mat-button-active" mat-button [matMenuTriggerFor]="menu">Deploy</button>
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="saveToBlueprintProcessor()">Deploy</button>
- <button mat-menu-item (click)="processBlueprint()">Test</button>
+ <!-- <button mat-menu-item (click)="processBlueprint()">Test</button> -->
</mat-menu>
- <button [disabled]="!isEnriched" class="btn-active" (click)="publishToControllerBlueprint()">Publish</button>
+ <button class="btn-active" (click)="publishToControllerBlueprint()">Publish</button>
<button class="btn-active" (click)="saveToControllerBlueprint()">Save</button>
<button class="btn-active" (click)="getEnriched()">Enrich</button>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts
index 7d22c569b..64ba4cdb1 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts
@@ -31,6 +31,7 @@ import { EditorComponent } from './editor/editor.component';
import { AceEditorModule } from 'ng2-ace-editor';
import { ResourceMappingComponent } from './resource-mapping/resource-mapping.component';
import { ResourceMappingService } from './resource-mapping/resource-mapping.service';
+import { EditorService } from './editor/editor.service';
@NgModule({
declarations: [
@@ -52,6 +53,6 @@ import { ResourceMappingService } from './resource-mapping/resource-mapping.serv
AceEditorModule,
FormsModule
],
- providers: [ ResourceMappingService ]
+ providers: [ ResourceMappingService , EditorService ]
})
export class ModifyTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
index 36876233d..9c11f7684 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
@@ -42,7 +42,7 @@ export class SearchTemplateComponent implements OnInit {
blueprintState: IBlueprintState;
bpState: Observable<IBlueprintState>;
validfile: boolean = false;
-
+ uploadedFileName: string;
@ViewChild('fileInput') fileInput;
result: string = '';
@@ -62,6 +62,7 @@ export class SearchTemplateComponent implements OnInit {
fileChanged(e: any) {
this.paths = [];
this.file = e.target.files[0];
+ this.uploadedFileName = (this.file.name.split('.'))[0];
this.zipFile.files = {};
this.zipFile.loadAsync(this.file)
.then((zip) => {
@@ -88,7 +89,9 @@ export class SearchTemplateComponent implements OnInit {
this.paths = [];
for (var file in zip.files) {
this.fileObject = {
- name: zip.files[file].name,
+ // nameForUIDisplay: this.uploadedFileName + '/' + zip.files[file].name,
+ // name: zip.files[file].name,
+ name: this.uploadedFileName + '/' + zip.files[file].name,
data: ''
};
const value = <any>await zip.files[file].async('string');
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html
index da3580cd5..c69c511e6 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html
@@ -18,21 +18,25 @@ See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
-->
-<div class="testTemplateContainer">
+<div style="border: 1px solid #3f51b5; padding: 1em;">
+ <i class="fa fa-exclamation-circle" style="color: #3f51b5" aria-hidden="true"></i>
+
+</div>
+<div class="testTemplateContainer">
<div class="editorContainer">
<div class="editorDiv">
<p>Request</p>
- <ace-editor [(text)]="text" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
+ <ace-editor [(text)]="requestText" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
<div class="btnContainer">
- <button class="button">Submit</button>
+ <button class="button" (click)="submitRequest()">Submit</button>
<button class="button">Clear</button>
</div>
</div>
<div class="editorDiv">
<p>Response</p>
- <ace-editor [(text)]="text" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
+ <ace-editor [(text)]="responseText" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
</div>
</div>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
index 9a7a570ad..63c00e508 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
@@ -30,6 +30,7 @@ import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState
import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
import { IMetaData } from '../../../common/core/store/models/metadata.model';
import { LoadBlueprintSuccess } from 'src/app/common/core/store/actions/blueprint.action';
+import { TestTemplateService } from './test-template.service'
import "ace-builds/webpack-resolver";
import 'brace';
@@ -47,8 +48,10 @@ export class TestTemplateComponent implements OnInit {
private workflows = [];
@ViewChild('editor') editor;
options: any = { fontSize: "100%", printMargin: false, tabSize: 2 };
+ requestText: string;
+ responseText: string;
- constructor(private store: Store<IAppState>) {
+ constructor(private store: Store<IAppState>, private testTemplateService: TestTemplateService) {
this.blueprintpState = this.store.select('blueprint')
.subscribe((data: any) => {
console.log(data);
@@ -81,4 +84,15 @@ export class TestTemplateComponent implements OnInit {
}
+ submitRequest() {
+ this.testTemplateService.submitRequest(this.requestText)
+ .subscribe((response) =>{
+ this.responseText = response;
+ window.alert('Success');
+ },
+ (error)=>{
+ this.responseText = "Error in processing request";
+ })
+ }
+
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts
index ea5b5ffb2..6eca01877 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts
@@ -25,7 +25,7 @@ import { TestTemplateComponent } from './test-template.component';
import { TestTemplateRoutingModule } from './test-template-routing.module';
import { AppMaterialModule } from '../../../common/modules/app-material.module';
import { AceEditorModule } from 'ng2-ace-editor';
-
+import { TestTemplateService } from './test-template.service';
@NgModule({
declarations: [
TestTemplateComponent
@@ -38,6 +38,7 @@ import { AceEditorModule } from 'ng2-ace-editor';
AppMaterialModule,
TestTemplateRoutingModule,
AceEditorModule
- ]
+ ],
+ providers: [TestTemplateService]
})
export class TestTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.service.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.service.ts
new file mode 100644
index 000000000..8df8e78a6
--- /dev/null
+++ b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.service.ts
@@ -0,0 +1,39 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 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============================================
+*/
+
+
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable, observable } from 'rxjs';
+import { ApiService } from '../../../common/core/services/api.service';
+import { LoopbackConfig } from '../../../common/constants/app-constants';
+
+@Injectable()
+export class TestTemplateService {
+ // blueprintUrl = '../../constants/blueprint.json';
+
+ constructor(private _http: HttpClient, private api: ApiService) {
+ }
+
+ submitRequest(request) {
+ return this.api.get('', request);
+ }
+} \ No newline at end of file
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
index c1f7f9640..38abad80c 100644
--- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts
+++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
@@ -51,12 +51,11 @@ import * as request_lib from 'request';
const REST_BLUEPRINT_CONTROLLER_BASE_URL = process.env.REST_BLUEPRINT_CONTROLLER_BASE_URL || "http://localhost:8080/api/v1";
const REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER = process.env.REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER || "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==";
-const REST_BLUEPRINT_PROCESSOR_BASE_URL= "http://localhost:8081/api/v1";
+const REST_BLUEPRINT_PROCESSOR_BASE_URL= process.env.REST_BLUEPRINT_PROCESSOR_BASE_URL ||"http://localhost:8081/api/v1";
+const MULTIPART_FORM_UPLOAD_DIR = process.env.MULTIPART_FORM_UPLOAD_DIR || "/tmp";
export class BlueprintRestController {
constructor(
- // @repository(BlueprintRepository)
- // public blueprintRepository : BlueprintRepository,
@inject('services.BlueprintService')
public bpservice: BlueprintService,
) {}
@@ -71,7 +70,6 @@ export class BlueprintRestController {
})
async getall() {
return await this.bpservice.getAllblueprints(REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER);
-
}
@post('/create-blueprint')
@@ -89,12 +87,39 @@ export class BlueprintRestController {
})
request: Request,
@inject(RestBindings.Http.RESPONSE) response: Response,
- ): Promise<object> {
+ ): Promise<Response> {
return new Promise((resolve, reject) => {
this.getFileFromMultiPartForm(request).then(file=>{
- this.uploadFileToBlueprintController(file, "/blueprint-model/").then(resp=>{
- response.setHeader("X-ONAP-RequestID", resp.headers['x-onap-requestid']);
- resolve(JSON.parse(resp.body));
+ this.uploadFileToBlueprintController(file, REST_BLUEPRINT_CONTROLLER_BASE_URL+"/blueprint-model/", response).then(resp=>{
+ resolve(resp);
+ }, err=>{
+ reject(err);
+ });
+ }, err=>{
+ reject(err);
+ });
+ });
+ }
+ @post('/publish')
+ async publish(
+ @requestBody({
+ description: 'multipart/form-data value.',
+ required: true,
+ content: {
+ 'multipart/form-data': {
+ // Skip body parsing
+ 'x-parser': 'stream',
+ schema: {type: 'object'},
+ },
+ },
+ })
+ request: Request,
+ @inject(RestBindings.Http.RESPONSE) response: Response,
+ ): Promise<Response> {
+ return new Promise((resolve, reject) => {
+ this.getFileFromMultiPartForm(request).then(file=>{
+ this.uploadFileToBlueprintController(file, REST_BLUEPRINT_CONTROLLER_BASE_URL+"/blueprint-model/publish/", response).then(resp=>{
+ resolve(resp);
}, err=>{
reject(err);
});
@@ -103,7 +128,6 @@ export class BlueprintRestController {
});
});
}
-
@post('/enrich-blueprint')
async enrich(
@requestBody({
@@ -119,13 +143,11 @@ export class BlueprintRestController {
})
request: Request,
@inject(RestBindings.Http.RESPONSE) response: Response,
- ): Promise<any> {
+ ): Promise<Response> {
return new Promise((resolve, reject) => {
this.getFileFromMultiPartForm(request).then(file=>{
- this.uploadFileToBlueprintController(file, "/blueprint-model/enrich/").then(resp=>{
- response.setHeader("X-ONAP-RequestID", resp.headers['x-onap-requestid']);
- response.setHeader("Content-Disposition", resp.headers['content-disposition']);
- resolve(resp.body);
+ this.uploadFileToBlueprintController(file, REST_BLUEPRINT_CONTROLLER_BASE_URL+"/blueprint-model/enrich/", response).then(resp=>{
+ resolve(resp);
}, err=>{
reject(err);
});
@@ -139,25 +161,13 @@ export class BlueprintRestController {
async download(
@param.path.string('name') name: string,
@param.path.string('version') version:string,
- // @inject(RestBindings.Http.REQUEST) request: Request,
@inject(RestBindings.Http.RESPONSE) response: Response,
- ): Promise<any> {
- return new Promise((resolve, reject) => {
- this.downloadFileFromBlueprintController("/blueprint-model/download/by-name/"+name+"/version/"+version).then(resp=>{
- response.setHeader("X-ONAP-RequestID", resp.headers['x-onap-requestid']);
- response.setHeader("Content-Disposition", resp.headers['content-disposition']);
- resolve(resp.body);
- }, err=>{
- reject(err);
- });
- });
+ ): Promise<Response> {
+ return this.downloadFileFromBlueprintController(REST_BLUEPRINT_CONTROLLER_BASE_URL+"/blueprint-model/download/by-name/"+name+"/version/"+version, response);
}
- async getFileFromMultiPartForm(request: Request): Promise<any>{
+ async getFileFromMultiPartForm(request: Request): Promise<multiparty.File>{
return new Promise((resolve, reject) => {
- // let options = {
- // uploadDir: MULTIPART_FORM_UPLOAD_DIR
- // }
let form = new multiparty.Form();
form.parse(request, (err: any, fields: any, files: { [x: string]: any[]; }) => {
if (err) reject(err);
@@ -171,9 +181,38 @@ export class BlueprintRestController {
})
}
- async uploadFileToBlueprintController(file: any, uri: string): Promise<any>{
+ @post('/deploy-blueprint')
+ async deploy(
+ @requestBody({
+ description: 'multipart/form-data value.',
+ required: true,
+ content: {
+ 'multipart/form-data': {
+ // Skip body parsing
+ 'x-parser': 'stream',
+ schema: {type: 'object'},
+ },
+ },
+ })
+ request: Request,
+ @inject(RestBindings.Http.RESPONSE) response: Response,
+ ): Promise<Response> {
+ return new Promise((resolve, reject) => {
+ this.getFileFromMultiPartForm(request).then(file=>{
+ this.uploadFileToBlueprintController(file, REST_BLUEPRINT_PROCESSOR_BASE_URL+"/execution-service/upload/", response).then(resp=>{
+ resolve(resp);
+ }, err=>{
+ reject(err);
+ });
+ }, err=>{
+ reject(err);
+ });
+ });
+ }
+ async uploadFileToBlueprintController(file: multiparty.File, uri: string, response: Response): Promise<Response>{
let options = {
- url: REST_BLUEPRINT_CONTROLLER_BASE_URL + uri,
+ // url: REST_BLUEPRINT_CONTROLLER_BASE_URL + uri,
+ url:uri,
headers: {
Authorization: REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER,
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
@@ -189,40 +228,43 @@ export class BlueprintRestController {
}
};
- return new Promise((resolve, reject) => {
- request_lib.post(options, (err: any, resp: any, body: any) => {
+ var removeTempFile = () => {
+ fs.unlink(file.path, (err: any) => {
if (err) {
- //delete tmp file
- fs.unlink(file.path, (err: any) => {
- if (err) {
- console.error(err);
- return
- }
- })
+ console.error(err);
+ }
+ });
+ }
+
+ return new Promise((resolve, reject) => {
+ request_lib.post(options)
+ .on("error", err => {
reject(err);
- }else{
- resolve(resp);
- }
- })
+ })
+ .pipe(response)
+ .once("finish", () => {
+ removeTempFile();
+ resolve(response);
+ });
})
}
-
- async downloadFileFromBlueprintController(uri: string): Promise<any> {
+ async downloadFileFromBlueprintController(uri: string, response: Response): Promise<Response> {
let options = {
- url: REST_BLUEPRINT_CONTROLLER_BASE_URL + uri,
+ url: uri,
+ // REST_BLUEPRINT_CONTROLLER_BASE_URL + uri,
headers: {
Authorization: REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER,
}
};
-
return new Promise((resolve, reject) => {
- request_lib.get(options, (err: any, resp: any, body: any) => {
- if (err) {
+ request_lib.get(options)
+ .on("error", err => {
reject(err);
- }else{
- resolve(resp);
- }
- })
+ })
+ .pipe(response)
+ .once("finish", () => {
+ resolve(response);
+ });
})
-}
+ }
} \ No newline at end of file
diff --git a/cds-ui/server/src/controllers/data-dictionary.controller.ts b/cds-ui/server/src/controllers/data-dictionary.controller.ts
new file mode 100644
index 000000000..36efe6e8a
--- /dev/null
+++ b/cds-ui/server/src/controllers/data-dictionary.controller.ts
@@ -0,0 +1,85 @@
+// Uncomment these imports to begin using these cool features!
+
+// import {inject} from '@loopback/context';
+import {
+ post,
+ param,
+ get,
+ getFilterSchemaFor,
+ getWhereSchemaFor,
+ patch,
+ put,
+ del,
+ requestBody,
+ Request,
+ Response,
+ RestBindings,
+} from '@loopback/rest';
+import { inject } from '@loopback/core';
+import { ResourceDictionaryService } from '../services';
+
+const REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER = process.env.REST_BLUEPRINT_CONTROLLER_BASIC_AUTH_HEADER || "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==";
+export class DataDictionaryController {
+ constructor(
+ @inject('services.ResourceDictionaryService')
+ public rdservice: ResourceDictionaryService,
+ ) { }
+
+ @get('/resourcedictionary/{name}', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} },
+ },
+ },
+ })
+ async getByName(@param.path.string('name') name: string) {
+ return await this.rdservice.getByName(name, REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER);
+ }
+ @get('/resourcedictionary/{tags}', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} },
+ },
+ },
+ })
+ async getByTags(@param.path.string('tags') tags: string) {
+ return await this.rdservice.getByTags(tags, REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER);
+ }
+
+ @get('/resourcedictionary/source-mapping', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} },
+ },
+ },
+ })
+ async getSourceMapping() {
+ return await this.rdservice.getSourceMapping(REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER);
+ }
+ @post('/resourcedictionary/save', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} }
+ }
+ },
+ })
+ async save(@requestBody({
+ content: { 'application/json': { schema: { 'x-ts-type': JSON } } },
+ accepts: { 'application/json': { schema: { 'x-ts-type': JSON } } }
+ }) resourceDictionary: JSON): Promise<any> {
+ return await this.rdservice.save(REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER, resourceDictionary);
+ }
+ @post('/resourcedictionary/search/by-names', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} }
+ }
+ },
+ })
+ async searchByNames(@requestBody({
+ content: { 'application/json': { schema: { 'x-ts-type': JSON } } },
+ accepts: { 'application/json': { schema: { 'x-ts-type': JSON } } }
+ }) resourceDictionaryList: JSON): Promise<any> {
+ return await this.rdservice.searchbyNames(REST_RESOURCE_DICTIONARY_BASIC_AUTH_HEADER, resourceDictionaryList);
+ }
+}
diff --git a/cds-ui/server/src/controllers/index.ts b/cds-ui/server/src/controllers/index.ts
index bf2bd6fb7..59f635149 100644
--- a/cds-ui/server/src/controllers/index.ts
+++ b/cds-ui/server/src/controllers/index.ts
@@ -20,3 +20,4 @@ limitations under the License.
*/
export * from './ping.controller';
+export * from './data-dictionary.controller';
diff --git a/cds-ui/server/src/datasources/index.ts b/cds-ui/server/src/datasources/index.ts
index f7a934cd8..7ed2c9121 100644
--- a/cds-ui/server/src/datasources/index.ts
+++ b/cds-ui/server/src/datasources/index.ts
@@ -22,3 +22,4 @@ limitations under the License.
export * from './db.datasource';
export * from './blueprint.datasource';
+export * from './resource-dictionary.datasource';
diff --git a/cds-ui/server/src/datasources/resource-dictionary.datasource.json b/cds-ui/server/src/datasources/resource-dictionary.datasource.json
new file mode 100644
index 000000000..9bf5f30c4
--- /dev/null
+++ b/cds-ui/server/src/datasources/resource-dictionary.datasource.json
@@ -0,0 +1,89 @@
+{
+ "name": "resourceDictionary",
+ "connector": "rest",
+ "baseURL": "http://localhost:8080/api/v1/dictionary",
+ "crud": false,
+ "operations": [{
+ "template": {
+ "method": "GET",
+ "url": "http://localhost:8080/api/v1/dictionary/{name}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": "{authtoken}"
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getByName": ["name", "authtoken"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "GET",
+ "url": "http://localhost:8080/api/v1/dictionary/source-mapping",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": "{authtoken}"
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getSourceMapping": ["authtoken"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "GET",
+ "url": "http://localhost:8080/api/v1/dictionary/search/{tags}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": "{authtoken}"
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "getByTags": ["tags", "authtoken"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "POST",
+ "url": "http://localhost:8080/api/v1/dictionary",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": "{authtoken}"
+ },
+ "body": "{resourceDictionary}",
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "save": ["authtoken", "resourceDictionary"]
+
+ }
+ },
+ {
+ "template": {
+ "method": "POST",
+ "url": "http://localhost:8080/api/v1/dictionary/by-names",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": "{authtoken}"
+ },
+ "body": "{resourceDictionaryList}",
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "searchbyNames": ["authtoken", "resourceDictionaryList"]
+
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/cds-ui/server/src/datasources/resource-dictionary.datasource.ts b/cds-ui/server/src/datasources/resource-dictionary.datasource.ts
new file mode 100644
index 000000000..381ab9a78
--- /dev/null
+++ b/cds-ui/server/src/datasources/resource-dictionary.datasource.ts
@@ -0,0 +1,14 @@
+import {inject} from '@loopback/core';
+import {juggler} from '@loopback/repository';
+import * as config from './resource-dictionary.datasource.json';
+
+export class ResourceDictionaryDataSource extends juggler.DataSource {
+ static dataSourceName = 'resourceDictionary';
+
+ constructor(
+ @inject('datasources.config.resourceDictionary', {optional: true})
+ dsConfig: object = config,
+ ) {
+ super(dsConfig);
+ }
+}
diff --git a/cds-ui/server/src/services/index.ts b/cds-ui/server/src/services/index.ts
index 26b01ed0b..8a82e3231 100644
--- a/cds-ui/server/src/services/index.ts
+++ b/cds-ui/server/src/services/index.ts
@@ -1 +1,2 @@
export * from './blueprint.service';
+export * from './resource-dictionary.service';
diff --git a/cds-ui/server/src/services/resource-dictionary.service.ts b/cds-ui/server/src/services/resource-dictionary.service.ts
new file mode 100644
index 000000000..44ba1a347
--- /dev/null
+++ b/cds-ui/server/src/services/resource-dictionary.service.ts
@@ -0,0 +1,23 @@
+import {getService} from '@loopback/service-proxy';
+import {inject, Provider} from '@loopback/core';
+import {ResourceDictionaryDataSource} from '../datasources';
+
+export interface ResourceDictionaryService {
+ getByName(name: string, authtoken: string): Promise<JSON>;
+ getSourceMapping(authtoken: string): Promise<JSON>;
+ getByTags(tags: string, authtoken: string): Promise<JSON>;
+ save(authtoken: string, resourceDictionary: JSON): Promise<JSON>;
+ searchbyNames(authtoken: string, resourceDictionaryList: JSON): Promise<JSON>;
+}
+
+export class ResourceDictionaryServiceProvider implements Provider<ResourceDictionaryService> {
+ constructor(
+ // resourceDictionary must match the name property in the datasource json file
+ @inject('datasources.resourceDictionary')
+ protected dataSource: ResourceDictionaryDataSource = new ResourceDictionaryDataSource(),
+ ) {}
+
+ value(): Promise<ResourceDictionaryService> {
+ return getService(this.dataSource);
+ }
+}
diff --git a/docs/CBA/index.rst b/docs/CBA/index.rst
index c7b219f5c..43317e6e5 100644
--- a/docs/CBA/index.rst
+++ b/docs/CBA/index.rst
@@ -2,8 +2,8 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright (C) 2019 IBM.
-Controller Blueprint Archived Tool(CBA)
-----------------------------------------
+Controller Blueprint Archived Designer Tool(CBA)
+------------------------------------------------
.. toctree::
:maxdepth: 1
diff --git a/docs/CBA/resourceassignment.rst b/docs/CBA/resourceassignment.rst
index be8b08e25..eec6ba368 100644
--- a/docs/CBA/resourceassignment.rst
+++ b/docs/CBA/resourceassignment.rst
@@ -4,9 +4,6 @@
Resource Assignment
===================
-.. toctree::
- :maxdepth: 1
-
Component executor:
===================
diff --git a/docs/bluePrintsProcessor.rst b/docs/bluePrintsProcessor.rst
index a687d50be..911f99945 100644
--- a/docs/bluePrintsProcessor.rst
+++ b/docs/bluePrintsProcessor.rst
@@ -11,6 +11,8 @@ Blueprints Processor
Micro service to Manage Controller Blueprint Models, such as Resource Dictionary, Service Models, Velocity Templates etc, which will serve service for Controller Design Studio and Controller runtimes.
+This microservice is used to deploy Controller Blueprint Archive file in Run time database. This also helps to test the Valid Blueprint.
+
Architecture:
==============
@@ -18,4 +20,54 @@ Architecture:
.. |image0| image:: images/blueprintprocessor.jpg
:height: 600px
- :width: 800px \ No newline at end of file
+ :width: 800px
+
+Running Blueprints Processor Microservice Locally:
+==================================================
+
+The purpose of this page is to show how to run the Blueprints Processor microservice locally, using the docker-compose.yaml file provided in the project.
+
+Check out the CDS' code:
+
+Check out the latest code from Gerrit: https://gerrit.onap.org/r/#/admin/projects/ccsdk/cds
+
+Build CDS locally:
+In the checked out directory, type
+
+ mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
+
+Create the needed Docker images:
+
+The Blueprints Processor microservice project has a module, called distribution, that provides a docker-compose.yaml file that can be used to spin up Docker containers to run this microservice.
+
+The first step is to create any custom image needed, by building the distribution module. From the CDS home directory (where the code was checked out), navigate to the module:
+
+ cd ms/blueprintsprocessor/distribution/
+Build it using the Maven profile called Docker:
+
+ mvn clean install -Pdocker
+
+Start Docker containers using docker-composer:
+==============================================
+
+Navigate to the docker-compose file in the distribution module:
+
+ cd src/main/dc/
+
+From there, start the containers:
+
+ docker-compose up -d
+This will spin the Docker containers declared inside the docker-compose.yaml file in the background.
+
+
+To verify the logs generated by docker-composer, type:
+
+ docker-compose logs -f
+
+
+Testing the environment:
+========================
+
+Point your browser to http://localhost:8000/api/v1/execution-service/ping (please note that the port is 8000, not 8080)
+
+To authenticate, use ccsdkapps / ccsdkapps as login / password. \ No newline at end of file
diff --git a/docs/controllerBlueprintStudioProcessor.rst b/docs/controllerBlueprintStudioProcessor.rst
index fc9112296..5c67d6c1d 100644
--- a/docs/controllerBlueprintStudioProcessor.rst
+++ b/docs/controllerBlueprintStudioProcessor.rst
@@ -5,6 +5,28 @@
Controller Blueprints Studio Processor
======================================
-.. toctree::
- :maxdepth: 1
- :titlesonly: \ No newline at end of file
+The Controller Blueprint Archive is the overall service design, fully model-driven, intent based package needed for SELF SERVICE provisioning and configuration management automation.
+
+The CBA is .zip file which is saved in Controller Blueprint Database.
+
+Dynamic API:
+===========
+
+The nature of the API request and response is meant to be model driven and dynamic. They both share the same definition.
+
+The actionName, under the actionIdentifiers refers to the name of a Workflow (see workflow)
+
+The content of the payload is what is fully dynamic / model driven.
+
+The first top level element will always be either $actionName-request for a request or $actionName-response for a response.
+
+Then the content within this element is fully based on the workflow input and output.
+
+
+Enrichment:
+===========
+
+Helps to generate complete valid CBA file.
+
+
+ \ No newline at end of file
diff --git a/docs/datadictionary/capabilitytable.JPG b/docs/datadictionary/capabilitytable.JPG
new file mode 100644
index 000000000..7db4715ea
--- /dev/null
+++ b/docs/datadictionary/capabilitytable.JPG
Binary files differ
diff --git a/docs/datadictionary/index.rst b/docs/datadictionary/index.rst
index 83c6e47b8..a7e78564f 100644
--- a/docs/datadictionary/index.rst
+++ b/docs/datadictionary/index.rst
@@ -9,37 +9,74 @@ Resource Definition
Introduction:
=============
-A Resource Definition defines a specifc resource that can be resolved using the bellow supported sources.
+A data dictionary models the how a specific resource can be resolved.
-A Resource Definition can support multiple sources.
+A resource is a variable/parameter in the context of the service. It can be anything, but it should not be confused with SDC or Openstack resources.
-The main goal of Resource Definition is to define generic entity that could be shared accross services.
+A data dictionary can have multiple sources to handle resolution in different ways.
+The main goal of data dictionary is to define re-usable entity that could be shared.
-Resolution sources:
-===================
+Creation of data dictionaries is a standalone activity, separated from the blueprint design.
- * Input
- * Default
- * DB
- * REST
- * Capability
-Artifacts:
-==========
+As part of modelling a data dictionary entry, the following generic information should be provided:
- * artifact-mapping-resource
- * artifact-template-velocity
- * artifact-directed-graph
+|image0|
-Node type:
-==========
-
- * component-resource-resolution
- * component-jython-executor
- * component-netconf-executor
- * component-restconf-executor
+.. |image0| image:: media/image0.jpg
+ :width: 7.88889in
+ :height: 4.43750in
-Data type:
-==========
- * vnf-netconf-device \ No newline at end of file
+Bellow are properties that all the resource source have will have
+
+The modeling does allow for data translation between external capability and CDS for both input and output key mapping.
+
+|image1|
+
+.. |image1| image:: media/image0.jpg
+ :width: 7.88889in
+ :height: 4.43750in
+
+Example:
+========
+
+vf-module-model-customization-uuid and vf-module-label are two data dictionaries. A SQL table, VF_MODULE_MODEL, exist to correlate them.
+
+Here is how input-key-mapping, output-key-mapping and key-dependencies can be used:
+
+vf-module-label data dictionary
+
+{
+ "name" : "vf-module-label",
+ "tags" : "vf-module-label",
+ "updated-by" : "adetalhouet",
+ "property" : {
+ "description" : "vf-module-label",
+ "type" : "string"
+ },
+ "sources" : {
+ "primary-db" : {
+ "type" : "source-primary-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-module-label" : "vf_module_label"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
+ }
+ }
+ }
+}
+
+
+Resource source:
+================
+
+Defines the contract to resolve a resource.
+
+A resource source is modeled, following http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/csprd01/TOSCA-Simple-Profile-YAML-v1.0-csprd01.html#DEFN_ENTITY_NODE_TYPE, and derives from the https://wiki.onap.org/display/DW/Modeling+Concepts#ModelingConcepts-NodeResourceSource \ No newline at end of file
diff --git a/docs/datadictionary/media/image0.JPG b/docs/datadictionary/media/image0.JPG
new file mode 100644
index 000000000..074d20076
--- /dev/null
+++ b/docs/datadictionary/media/image0.JPG
Binary files differ
diff --git a/docs/datadictionary/media/image1.JPG b/docs/datadictionary/media/image1.JPG
new file mode 100644
index 000000000..a27502a75
--- /dev/null
+++ b/docs/datadictionary/media/image1.JPG
Binary files differ
diff --git a/docs/datadictionary/resourcesource.rst b/docs/datadictionary/resourcesource.rst
new file mode 100644
index 000000000..fffeec313
--- /dev/null
+++ b/docs/datadictionary/resourcesource.rst
@@ -0,0 +1,110 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Resource Source
+---------------
+
+Input:
+======
+Expects the value to be provided as input to the request.
+
+source-input:
+
+{
+ "description": "This is Input Resource Source Node Type",
+ "version": "1.0.0",
+ "properties": {},
+ "derived_from": "tosca.nodes.ResourceSource"
+}
+
+
+Default:
+========
+Expects the value to be defaulted in the model itself.
+
+source-default:
+
+{
+ "description": "This is Default Resource Source Node Type",
+ "version": "1.0.0",
+ "properties": {},
+ "derived_from": "tosca.nodes.ResourceSource"
+}
+
+
+sql:
+====
+
+Expects the SQL query to be modeled; that SQL query can be parameterized, and the parameters be other resources resolved through other means. If that's the case, this data dictionary definition will have to define key-dependencies along with input-key-mapping.
+
+CDS is currently deployed along the side of SDNC, hence the primary database connection provided by the framework is to SDNC database.
+
+|image0|
+
+.. |image0| image:: image0.jpg
+ :width: 7.88889in
+ :height: 4.43750in
+
+.. toctree::
+ :maxdepth: 1
+
+ sourceprimarydb
+
+Connection to a specific database can be expressed through the endpoint-selector property, which refers to a macro defining the information about the database the connect to. Understand TOSCA Macro in the context of CDS.
+
+.. toctree::
+ :maxdepth: 1
+
+ dbsystem
+
+
+REST:
+=====
+
+Expects the URI along with the VERB and the payload, if needed.
+
+CDS is currently deployed along the side of SDNC, hence the default rest connection provided by the framework is to SDNC MDSAL.
+
+|image1|
+
+.. |image1| image:: image1.jpg
+ :width: 7.88889in
+ :height: 4.43750in
+
+.. toctree::
+ :maxdepth: 1
+
+ rest
+
+Connection to a specific REST system can be expressed through the endpoint-selector property, which refers to a macro defining the information about the REST system the connect to. Understand TOSCA Macro in the context of CDS.
+
+Few ways are available to authenticate to the REST system:
+
+ * token-auth
+ * basic-auth
+ * ssl-basic-auth
+
+For source code of Authentication click below link:
+
+.. toctree::
+ :maxdepth: 1
+
+ auth
+
+Capability:
+===========
+
+Expects a script to be provided.
+
+|image2|
+
+.. |image2| image:: image2.jpg
+ :width: 7.88889in
+ :height: 4.43750in
+
+
+.. toctree::
+ :maxdepth: 1
+
+ source-capability
diff --git a/docs/datadictionary/restauth.rst b/docs/datadictionary/restauth.rst
new file mode 100644
index 000000000..40c179375
--- /dev/null
+++ b/docs/datadictionary/restauth.rst
@@ -0,0 +1,42 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+
+Resource Rest Authentication
+----------------------------
+
+token-auth:
+
+"dsl_definitions": {
+ "dynamic-rest-source": {
+ "type" : "token-auth",
+ "url" : "http://localhost:32778",
+ "token" : "Token 0123456789abcdef0123456789abcdef01234567"
+ }
+}
+
+basic-auth:
+
+"dsl_definitions": {
+ "dynamic-rest-source": {
+ "type" : "basic-auth",
+ "url" : "http://localhost:32778",
+ "username" : "bob",
+ "password": "marley"
+ }
+}
+
+ssl-basic-auth:
+
+"dsl_definitions": {
+ "dynamic-rest-source": {
+ "type" : "ssl-basic-auth",
+ "url" : "http://localhost:32778",
+ "keyStoreInstance": "JKS or PKCS12",
+ "sslTrust": "trusture",
+ "sslTrustPassword": "trustore password",
+ "sslKey": "keystore",
+ "sslKeyPassword: "keystore password"
+ }
+} \ No newline at end of file
diff --git a/docs/datadictionary/resttable.JPG b/docs/datadictionary/resttable.JPG
new file mode 100644
index 000000000..568ad0a9f
--- /dev/null
+++ b/docs/datadictionary/resttable.JPG
Binary files differ
diff --git a/docs/datadictionary/sqltable.JPG b/docs/datadictionary/sqltable.JPG
new file mode 100644
index 000000000..15d246743
--- /dev/null
+++ b/docs/datadictionary/sqltable.JPG
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index 8db565a37..5f3902687 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -13,6 +13,24 @@ The system is designed to be self service, which means that users, not just prog
Self service is a completely new way of delivering services. It removes the dependence on code releases and the delays they cause and puts the control of services into the hands of the service providers. They can change a model and its parameters and create a new service without writing a single line of code.
This makes SERVICE PROVIDER(S) more responsive to its customers and able to deliver products that more closely match the needs of its customers.
+Modeling Concept:
+=================
+In Dublin release, the CDS community has contributed a framework to automate the resolution of resources for instantiation and any config provisioning operation, such as day0, day1 or day2 configuration.
+
+The content of the CBA Package is driven from a catalog of reusable data dictionary, component and workflow, delivering a reusable and simplified self service experience.
+
+TOSCA based JSON formatted model following standard: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html
+
+Most of the TOSCA modeled entity presented in the bellow documentation can be found here: https://github.com/onap/ccsdk-cds/tree/master/components/model-catalog/definition-type/starter-type
+
+Tosca Model Reference:
+
+|image0|
+
+.. |image0| image:: media/image0.jpg
+ :width: 7.88889in
+ :height: 4.43750in
+
Design tools:
=============
.. toctree::
@@ -38,6 +56,13 @@ The Controller Design Studio is composed of two major components:
* The Run Time (or backend)
The GUI handles direct user input and allows for displaying both design time and run time activities. For design time, it allows for the creation of controller blueprint, from selecting the DGs to be included, to incorporating the artifact templates, to adding necessary components. For run time, it allows the user to direct the system to resolve the unresolved elements of the controller blueprint and download the resulting configuration into a VNF. At a more basic level, it allows for creation of data dictionaries, capabilities catalogs, and controller blueprint, the basic elements that are used to generate a configuration. The essential function of the Controller Design Studio is to create and populate a controller blueprint, create a configuration file from this Controller blueprint, and download this configuration file (configlet) to a VNF/PNF.
+|image0|
+
+.. |image0| image:: media/CDS_architecture.jpg
+ :height: 4.43750in
+ :width: 7.88889in
+
+
Resource assignment:
=====================
.. toctree::
diff --git a/docs/media/CDS_architecture.JPG b/docs/media/CDS_architecture.JPG
new file mode 100644
index 000000000..c8528ac1e
--- /dev/null
+++ b/docs/media/CDS_architecture.JPG
Binary files differ
diff --git a/docs/media/image0.jpg b/docs/media/image0.jpg
new file mode 100644
index 000000000..dce3cee25
--- /dev/null
+++ b/docs/media/image0.jpg
Binary files differ
diff --git a/docs/resourceassignment.rst b/docs/resourceassignment.rst
new file mode 100644
index 000000000..be8b08e25
--- /dev/null
+++ b/docs/resourceassignment.rst
@@ -0,0 +1,73 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Resource Assignment
+===================
+.. toctree::
+ :maxdepth: 1
+
+
+Component executor:
+===================
+Workflow:
+=========
+
+A workflow defines an overall action to be taken for the service; it can be composed of a set of sub-actions to execute. Currently, workflows are backed by Directed Graph engine.
+
+A CBA can have as many workflow as needed.
+
+Template:
+=========
+
+A template is an artifact.
+
+A template is parameterized and each parameter must be defined in a corresponding mapping file.
+
+In order to know which mapping correlate to which template, the file name must start with an artifact-prefix, serving as identifier to the overall template + mapping.
+
+The requirement is as follow:
+
+${artifact-prefix}-template
+${artifact-prefix}-mapping
+
+A template can represent anything, such as device config, payload to interact with 3rd party systems, resource-accumulator template, etc...
+
+Mapping:
+========
+Defines the contract of each resource to be resolved. Each placeholder in the template must have a corresponding mapping definition.
+
+A mapping is comprised of:
+
+- name
+- required / optional
+- type (support complex type)
+- dictionary-name
+- dictionary-source
+
+Dependencies:
+=============
+
+This allows to make sure given resources get resolved prior the resolution of the resources defining the dependency.
+The dictionary fields reference to a specific data dictionary.
+
+Resource accumulator:
+=====================
+
+In order to resolve HEAT environment variables, resource accumulator templates are being in used for Dublin.
+
+These templates are specific to the pre-instantiation scenario, and relies on GR-API within SDNC.
+
+It is composed of the following sections:
+
+resource-accumulator-resolved-data: defines all the resources that can be resolved directly from the context. It expresses a direct mapping between the name of the resource and its value.
+
+capability-data: defines what capability to use to create a specific resource, along with the ingredients required to invoke the capability and the output mapping.
+
+- Scripts
+- Library
+- NetconfClient
+
+In order to facilitate NETCONF interaction within scripts, a python NetconfClient binded to our Kotlin implementation is made available. This NetconfClient can be used when using the netconf-component-executor.
+
+The client can be find here: https://github.com/onap/ccsdk-apps/blob/master/components/scripts/python/ccsdk_netconf/netconfclient.py \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index e7af4c852..c079ba990 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -37,11 +37,6 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintHttpServer.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcDisable.java
index 85ccd1f43..c20a324d5 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintHttpServer.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcDisable.java
@@ -17,12 +17,15 @@
package org.onap.ccsdk.cds.blueprintsprocessor;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;
+// When GRPC disable, no need to create the netty server
+@ConditionalOnProperty(name = "blueprintsprocessor.grpcEnable", havingValue = "false")
@Component
-public class BlueprintHttpServer implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
+public class HttpServerWhenGrpcDisable implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
@Value("${blueprintsprocessor.httpPort}")
private Integer httpPort;
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcEnable.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcEnable.java
new file mode 100644
index 000000000..e769b9361
--- /dev/null
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/HttpServerWhenGrpcEnable.java
@@ -0,0 +1,56 @@
+/*
+ * 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.blueprintsprocessor;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
+import org.springframework.boot.web.reactive.server.ReactiveWebServerFactory;
+import org.springframework.boot.web.server.WebServer;
+import org.springframework.http.server.reactive.HttpHandler;
+import org.springframework.stereotype.Component;
+
+// When GRPC enable, we need to manually create the netty server
+@ConditionalOnProperty(name = "blueprintsprocessor.grpcEnable", havingValue = "true")
+@Component
+public class HttpServerWhenGrpcEnable {
+
+ @Value("${blueprintsprocessor.httpPort}")
+ private Integer httpPort;
+
+ private final HttpHandler httpHandler;
+ private WebServer http;
+
+ @Autowired
+ public HttpServerWhenGrpcEnable(HttpHandler httpHandler) {
+ this.httpHandler = httpHandler;
+ }
+
+ @PostConstruct
+ public void start() {
+ ReactiveWebServerFactory factory = new NettyReactiveWebServerFactory(httpPort);
+ this.http = factory.getWebServer(this.httpHandler);
+ this.http.start();
+ }
+
+ @PreDestroy
+ public void stop() {
+ this.http.stop();
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt
index 6ef4f41fb..aa156e2a8 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt
@@ -57,7 +57,7 @@ class NetconfDeviceCommunicator(private var inputStream: InputStream,
while (!socketClosed) {
val cInt = bufferReader.read()
if (cInt == -1) {
- log.error("$deviceInfo: Received cInt = -1")
+ log.debug("$deviceInfo: Received end of stream, closing socket.")
socketClosed = true
}
val c = cInt.toChar()
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt
index 7e56e3e51..b1121b3d4 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt
@@ -80,11 +80,11 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
RpcStatus.FAILURE, true)) {
rpcService.closeSession(true)
}
-
- session.close()
- // Closes the socket which should interrupt the streamHandler
- channel.close()
- client.close()
+ try {
+ close()
+ } catch (ioe: IOException) {
+ log.warn("$deviceInfo: Error closing session($sessionId) for host($deviceInfo)", ioe)
+ }
}
override fun reconnect() {
@@ -98,8 +98,8 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
checkAndReestablish()
try {
- return streamHandler.sendMessage(formattedRequest, messageId).get(replyTimeout.toLong(), TimeUnit.SECONDS)
-// replies.remove(messageId)
+ return streamHandler.getFutureFromSendMessage(streamHandler.sendMessage(formattedRequest, messageId),
+ replyTimeout.toLong(), TimeUnit.SECONDS)
} catch (e: InterruptedException) {
Thread.currentThread().interrupt()
throw NetconfException("$deviceInfo: Interrupted while waiting for reply for request: $formattedRequest", e)
@@ -109,10 +109,7 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
} catch (e: ExecutionException) {
log.warn("$deviceInfo: Closing session($sessionId) due to unexpected Error", e)
try {
- session.close()
- // Closes the socket which should interrupt the streamHandler
- channel.close()
- client.close()
+ close()
} catch (ioe: IOException) {
log.warn("$deviceInfo: Error closing session($sessionId) for host($deviceInfo)", ioe)
}
@@ -138,20 +135,23 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
override fun checkAndReestablish() {
try {
- if (client.isClosed) {
- log.info("Trying to restart the whole SSH connection with {}", deviceInfo)
- clearReplies()
- startConnection()
- } else if (session.isClosed) {
- log.info("Trying to restart the session with {}", deviceInfo)
- clearReplies()
- startSession()
- } else if (channel.isClosed) {
- log.info("Trying to reopen the channel with {}", deviceInfo)
- clearReplies()
- openChannel()
- } else {
- return
+ when {
+ client.isClosed -> {
+ log.info("Trying to restart the whole SSH connection with {}", deviceInfo)
+ clearReplies()
+ startConnection()
+ }
+ session.isClosed -> {
+ log.info("Trying to restart the session with {}", deviceInfo)
+ clearReplies()
+ startSession()
+ }
+ channel.isClosed -> {
+ log.info("Trying to reopen the channel with {}", deviceInfo)
+ clearReplies()
+ openChannel()
+ }
+ else -> return
}
} catch (e: IOException) {
log.error("Can't reopen connection for device {} error: {}", deviceInfo, e.message)
@@ -257,16 +257,8 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
}
val capabilityMatcher = NetconfMessageUtils.CAPABILITY_REGEX_PATTERN.matcher(serverHelloResponse)
- while (capabilityMatcher.find()) {
- deviceCapabilities.plus(capabilityMatcher.group(1))
- }
- }
-
- fun sessionstatus(state:String): Boolean{
- return when (state){
- "Close" -> channel.isClosed
- "Open" -> channel.isOpen
- else -> false
+ while (capabilityMatcher.find()) { //TODO: refactor to add unit test easily for device capability accumulation.
+ deviceCapabilities.add(capabilityMatcher.group(1))
}
}
@@ -279,7 +271,6 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
* Used by {@link NetconfSessionListenerImpl}
*/
internal fun addDeviceErrorReply(errReply: String) {
- println("addDeviceErrorReply (errReply: $errReply") //TODO : get rid of this.
errorReplies.add(errReply)
}
@@ -288,11 +279,21 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
* Used by {@link NetconfSessionListenerImpl}
*/
internal fun addDeviceReply(messageId: String, replyMsg: String) {
- println("addDeviceReply (messageId: $messageId replyMsg: $replyMsg") //TODO : get rid of this.
replies[messageId]?.complete(replyMsg)
}
/**
+ * Closes the session/channel/client
+ */
+ @Throws(IOException::class)
+ private fun close() {
+ session.close()
+ // Closes the socket which should interrupt the streamHandler
+ channel.close()
+ client.close()
+ }
+
+ /**
* Internal function for accessing replies for testing.
*/
internal fun getReplies() = replies
@@ -301,7 +302,6 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ
* internal function for accessing errorReplies for testing.
*/
internal fun getErrorReplies() = errorReplies
-
internal fun clearErrorReplies() = errorReplies.clear()
internal fun clearReplies() = replies.clear()
internal fun setClient(client: SshClient) { this.client = client }
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt
index 1f526f445..f5fd5410a 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt
@@ -168,7 +168,6 @@ class NetconfSessionImplTest {
}
- @Ignore //TODO undo close method removal
@Test
fun `disconnect wraps exception from ssh closing error`() {
val netconfSessionSpy = spyk(netconfSession, recordPrivateCalls = true)
@@ -295,7 +294,6 @@ class NetconfSessionImplTest {
}
}
- @Ignore //TODO revert back on getFutureFromSendMessage
@Test
fun `syncRpc throws NetconfException if TimeoutException is caught`() {
val expectedExceptionMsg = "$deviceInfo: Timed out while waiting for reply for request $formattedRequest after ${deviceInfo.replyTimeout} sec."
@@ -310,23 +308,23 @@ class NetconfSessionImplTest {
}
}
- @Ignore
@Test
fun `syncRpc throws NetconfException if ExecutionException is caught`() {
val expectedExceptionMsg = "$deviceInfo: Closing session $sessionId for request $formattedRequest"
assertFailsWith(exceptionClass = NetconfException::class, message = expectedExceptionMsg) {
- val netconfSessionSpy = spyk(netconfSession)
+ val netconfSessionSpy = spyk(netconfSession, recordPrivateCalls = false)
val futureRet: CompletableFuture<String> = CompletableFuture.completedFuture(futureMsg)
every { netconfCommunicator.sendMessage(any(), any()) } returns futureRet
every { netconfCommunicator.getFutureFromSendMessage(any(), any(), any()) } throws
- ExecutionException("exec exception", Exception("nested exception")) //TODO revert getFutureFromSendMessage back
+ ExecutionException("exec exception", Exception("nested exception"))
+ every { netconfSessionSpy["close"]() as Unit } just Runs
every { netconfSessionSpy.checkAndReestablish() } just Runs
+ netconfSessionSpy.setSession(mockClientSession)
//call the method
netconfSessionSpy.syncRpc("0", "0")
}
}
- @Ignore //TODO revert back on getFutureFromSendMessage
@Test
fun `syncRpc throws NetconfException if caught ExecutionException and failed to close SSH session`() {
val expectedExceptionMsg = "$deviceInfo: Closing session $sessionId for request $formattedRequest"
@@ -525,7 +523,6 @@ class NetconfSessionImplTest {
verify { mockSshClient.close() }
}
- @Ignore
@Test
fun `disconnect wraps IOException if channel doesn't close`() { //this test is equivalent to others
every { rpcService.closeSession(false) } returns SUCCESSFUL_DEVICE_RESPONSE
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
index b18617422..8ae128d4b 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
@@ -29,8 +29,8 @@ import org.springframework.stereotype.Service
@Service("bluePrintWorkflowExecutionService")
open class BluePrintWorkflowExecutionServiceImpl(
- private val componentWorkflowExecutionService: ComponentWorkflowExecutionService,
- private val dgWorkflowExecutionService: DGWorkflowExecutionService
+ private val componentWorkflowExecutionService: ComponentWorkflowExecutionService,
+ private val dgWorkflowExecutionService: DGWorkflowExecutionService
) : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
private val log = LoggerFactory.getLogger(BluePrintWorkflowExecutionServiceImpl::class.java)!!
@@ -57,11 +57,11 @@ open class BluePrintWorkflowExecutionServiceImpl(
val executionServiceOutput: ExecutionServiceOutput = when {
derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
componentWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
dgWorkflowExecutionService
- .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
else -> {
throw BluePrintProcessorException("couldn't execute workflow($workflowName) step mapped " +
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
index a2db8aab7..a2db8aab7 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
index df250ae98..df250ae98 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
index ee6c35397..3c474de37 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
@@ -39,7 +39,7 @@ open class ComponentWorkflowExecutionService(private val nodeTemplateExecutionSe
val nodeTemplateName = bluePrintContext.workflowFirstStepNodeTemplate(workflowName)
return nodeTemplateExecutionService.executeNodeTemplate(bluePrintRuntimeService,
- nodeTemplateName, executionServiceInput)
+ nodeTemplateName, executionServiceInput)
}
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
index 80aa1030d..4485800ff 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
@@ -48,7 +48,7 @@ open class DGWorkflowExecutionService(private val blueprintSvcLogicService: Blue
// Get the DG file info
val artifactDefinition = bluePrintContext.nodeTemplateArtifactForArtifactType(nodeTemplateName,
- WorkflowServiceConstants.ARTIFACT_TYPE_DIRECTED_GRAPH)
+ WorkflowServiceConstants.ARTIFACT_TYPE_DIRECTED_GRAPH)
// Populate the DG Path
val dgFilePath = normalizedPathName(bluePrintContext.rootPath, artifactDefinition.file)
@@ -59,7 +59,9 @@ open class DGWorkflowExecutionService(private val blueprintSvcLogicService: Blue
val graph = SvcGraphUtils.getSvcGraphFromFile(dgFilePath)
// Execute the DG
- return blueprintSvcLogicService.execute(graph, bluePrintRuntimeService, executionServiceInput) as ExecutionServiceOutput
+ return blueprintSvcLogicService.execute(graph,
+ bluePrintRuntimeService,
+ executionServiceInput) as ExecutionServiceOutput
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
index 5ed280cb5..af7846340 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
@@ -72,7 +72,7 @@ open class NodeTemplateExecutionService(private val applicationContext: Applicat
clonedExecutionServiceInput.stepData = stepInputData
// Get the Request from the Context and Set to the Function Input and Invoke the function
- return plugin.applyNB(clonedExecutionServiceInput)
+ return plugin.applyNB(clonedExecutionServiceInput)
}
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt
index 67f13f760..67f13f760 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/WorkflowServiceConfiguration.kt
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
index cfba5becd..b6e767503 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
@@ -50,7 +50,7 @@ open class ComponentExecuteNodeExecutor(private val nodeTemplateExecutionService
try { // Get the Request from the Context and Set to the Function Input and Invoke the function
val executionOutput = nodeTemplateExecutionService.executeNodeTemplate(ctx.getBluePrintService(),
- nodeTemplateName, executionInput)
+ nodeTemplateName, executionInput)
ctx.setResponse(executionOutput)
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt
index 8f9579230..8f9579230 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/utils/SvcGraphUtils.kt