summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/application/.dockerignore (renamed from cds-ui/.dockerignore)0
-rw-r--r--cds-ui/application/Dockerfile (renamed from cds-ui/Dockerfile)0
-rw-r--r--cds-ui/application/pom.xml3
-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.scss9
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts135
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html4
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json4
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json4
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json4
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json13
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json14
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json17
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json13
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json4
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json25
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py123
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl24
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl6
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json100
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json54
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json1
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta5
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json4
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json37
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json72
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json2
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json45
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/dg-generic.json2
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/source-default.json14
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/source-input.json14
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json4
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/source-rest.json4
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Workflow.json (renamed from components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json)8
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json5
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json5
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json5
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/entity.json15
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintHttpServer.java33
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/test-cba.zipbin9302 -> 9554 bytes
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt9
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt2
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/test-cba.zipbin9302 -> 9554 bytes
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt4
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json4
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt7
-rw-r--r--pom.xml6
62 files changed, 278 insertions, 625 deletions
diff --git a/cds-ui/.dockerignore b/cds-ui/application/.dockerignore
index 00137e31f..00137e31f 100644
--- a/cds-ui/.dockerignore
+++ b/cds-ui/application/.dockerignore
diff --git a/cds-ui/Dockerfile b/cds-ui/application/Dockerfile
index 5bf65f428..5bf65f428 100644
--- a/cds-ui/Dockerfile
+++ b/cds-ui/application/Dockerfile
diff --git a/cds-ui/application/pom.xml b/cds-ui/application/pom.xml
index 842655934..3ab1d338b 100644
--- a/cds-ui/application/pom.xml
+++ b/cds-ui/application/pom.xml
@@ -56,7 +56,7 @@ limitations under the License.
<goal>execute</goal>
</goals>
<configuration>
- <source>../TagVersion.groovy</source>
+ <source>${project.basedir}/../../TagVersion.groovy</source>
</configuration>
</execution>
</executions>
@@ -80,7 +80,6 @@ limitations under the License.
<name>${image.name}</name>
<build>
<cleanup>try</cleanup>
- <dockerFileDir>..</dockerFileDir>
<tags>
<tag>${project.docker.latestminortag.version}</tag>
<tag>${project.docker.latestfulltag.version}</tag>
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 2b88bcfcf..1ce5bf5b7 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
@@ -23,9 +23,9 @@ limitations under the License.
<!-- <div style="width:inherit; height: inherit; position: fixed;z-index: 1; background-color: rgb(0,0,0);background-color: rgba(0,0,0,0.4);"></div> -->
<div style="display: flex;">
<div>
- <i class="fa fa-folder" aria-hidden="true" style="color:#3f51b5; font-size: 20px;margin: 3px; cursor: pointer;" (click)="enableNameInputEl('createFolder')"></i>
- <i class="fa fa-file" aria-hidden="true" style="color:#3f51b5; font-size: 18px; margin: 3px; cursor: pointer;" (click)="enableNameInputEl('createFile')"></i>
- <i class="fa fa-trash" aria-hidden="true" style="color:#3f51b5; font-size: 20px; margin: 3px; cursor: pointer;" (click)="deleteFolderOrFile('deleteFile')"></i>
+ <i class="fa fa-folder" aria-hidden="true" style="color:#3f51b5; font-size: 20px;margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled': selectedFileObj.type == 'file' || selectedFileObj.type == ''}" (click)="enableNameInputEl('createFolder')"></i>
+ <i class="fa fa-file" aria-hidden="true" style="color:#3f51b5; font-size: 18px; margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled' : selectedFileObj.type == 'file' ||selectedFileObj.type == ''}" (click)="enableNameInputEl('createFile')"></i>
+ <i class="fa fa-trash" aria-hidden="true" style="color:#3f51b5; font-size: 20px; margin: 3px; cursor: pointer;" [ngClass] ="{'fa-disabled' : selectedFileObj.type == ''}" (click)="deleteFolderOrFile('deleteFile')"></i>
</div>
<div>
<input *ngIf="isNameTextboxEnablled" type="text" (focusout)="createFolderOrFile($event)"/>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
index ad2e03833..fac43eb43 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
@@ -63,4 +63,13 @@ limitations under the License.
.background-highlight {
background-color: #3f51b5 !important;
color: white !important;
+ }
+
+ .fa-disabled {
+ opacity: 0.6;
+ pointer-events: none;
+ }
+
+ .mat-tree-node {
+ min-height: 40px !important;
} \ No newline at end of file
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 eaac8cbde..57d934b9a 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
@@ -85,9 +85,11 @@ export class EditorComponent implements OnInit {
activeNode: any;
selectedFolder: string;
activationBlueprint: string;
- isNameTextboxEnablled : boolean = false;
- fileAction : string;
- filetoDelete : string;
+ isNameTextboxEnablled: boolean = false;
+ fileAction: string;
+ filetoDelete: string;
+ currentFilePath: string = '';
+ selectedFileObj = { name: '', type: '' };
private transformer = (node: Node, level: number) => {
return {
@@ -118,9 +120,6 @@ export class EditorComponent implements OnInit {
this.dataSource.data = this.filesTree;
}
- fileClicked(file) {
- console.log('selected file:' + file);
- }
editorContent() {
this.editor.setTheme("eclipse");
this.editor.getEditor().setOptions({
@@ -162,7 +161,8 @@ export class EditorComponent implements OnInit {
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.selectedFile.trim())) {
+ } else if (this.selectedFile && fileNode.name.includes(this.currentFilePath)) {
+ // this.selectedFile && fileNode.name.includes(this.selectedFile.trim())) {
fileNode.data = this.text;
}
});
@@ -184,8 +184,13 @@ export class EditorComponent implements OnInit {
}
selectFileToView(file) {
+ this.currentFilePath = '';
+ this.expandParents(file);
+ this.selectedFileObj.name = file.name;
+ this.selectedFileObj.type = 'file';
this.selectedFile = file.name;
this.filetoDelete = file.name;
+ this.currentFilePath = this.currentFilePath + this.selectedFile;
this.filesData.forEach((fileNode) => {
if (fileNode.name.includes(file.name)) {
this.text = fileNode.data;
@@ -247,48 +252,47 @@ export class EditorComponent implements OnInit {
}
selectFolder(node) {
+ this.currentFilePath = '';
+ this.expandParents(node);
this.selectedFolder = node.name;
this.filetoDelete = node.name;
- console.log(node);
- // this.createFolderOrFile(node.name, 'folder');
+ this.selectedFileObj.name = node.name;
+ this.selectedFileObj.type = 'folder';
+ this.currentFilePath = this.currentFilePath + this.selectedFolder + '/';
}
createFolderOrFile(name) {
- let newFilesData: [any] = this.filesData;
- let newFileNode = {
- name: '',
- data: ''
- }
- let newFileNode1 = {
- name: '',
- data: ''
- }
- for(let i=0; i< this.filesData.length; i++) {
- if (this.filesData[i].name.includes(this.selectedFolder)) {
- if(this.fileAction == 'createFolder') {
- newFileNode.name = this.filesData[i].name + name.srcElement.value + '/';
- newFileNode.data = '';
-
- newFileNode1.name = this.filesData[i].name + name.srcElement.value + '/README.md'
- newFileNode1.data = name.srcElement.value + ' Folder';
- } else {
- newFileNode.name = this.filesData[i].name + name.srcElement.value;
- newFileNode.data = '';
- }
- break;
+ if (name && name.srcElement.value !== null && name.srcElement.value !== '') {
+ let newFilesData: [any] = this.filesData;
+ let newFileNode = {
+ name: '',
+ data: ''
+ }
+ let newFileNode1 = {
+ name: '',
+ data: ''
+ }
+ if (this.fileAction == 'createFolder') {
+ newFileNode.name = this.currentFilePath + name.srcElement.value + '/'
+ newFileNode.data = '';
+ newFileNode1.name = this.currentFilePath + name.srcElement.value + '/README.md'
+ newFileNode1.data = name.srcElement.value + ' Folder';
+ this.filesData.push(newFileNode);
+ this.filesData.push(newFileNode1);
+ } else {
+ newFileNode.name = this.currentFilePath + name.srcElement.value;
+ newFileNode.data = '';
+ this.filesData.push(newFileNode);
}
+ this.arrangeTreeData(this.filesData);
}
-
- this.filesData.splice(this.findIndexForNewNode()+1, 0, newFileNode);
- this.filesData.splice(this.findIndexForNewNode()+1, 0, newFileNode1);
- this.arrangeTreeData(this.filesData);
}
findIndexForNewNode() {
let indexForNewNode;
- for(let i=0; i< this.filesData.length; i++) {
+ for (let i = 0; i < this.filesData.length; i++) {
if (this.filesData[i].name.includes(this.selectedFolder)) {
- indexForNewNode = i;
+ indexForNewNode = i;
}
}
return indexForNewNode;
@@ -300,7 +304,6 @@ export class EditorComponent implements OnInit {
paths.forEach((path) => {
const pathParts = path.name.split('/');
- // pathParts.shift();
let currentLevel = tree;
pathParts.forEach((part) => {
@@ -313,16 +316,16 @@ export class EditorComponent implements OnInit {
name: part,
children: [],
data: path.data,
- path : path.name
+ path: path.name
};
- if(part.trim() == this.blueprintName.trim()) {
- this.activationBlueprint = path.data;
- newPart.data = JSON.parse(this.activationBlueprint.toString());
+ if (part.trim() == this.blueprintName.trim()) {
+ this.activationBlueprint = path.data;
+ newPart.data = JSON.parse(this.activationBlueprint.toString());
console.log('newpart', newPart);
}
- if(newPart.name !== '') {
- currentLevel.push(newPart);
- currentLevel = newPart.children;
+ if (newPart.name !== '') {
+ currentLevel.push(newPart);
+ currentLevel = newPart.children;
}
}
});
@@ -333,20 +336,52 @@ export class EditorComponent implements OnInit {
this.updateBlueprint();
}
- enableNameInputEl(action) {
+ enableNameInputEl(action) {
this.fileAction = action;
- if (action == 'createFolder' || action == 'createFile') {
+ if (action == 'createFolder' || action == 'createFile') {
this.isNameTextboxEnablled = true;
}
}
deleteFolderOrFile(action) {
- for(let i=0;i< this.filesData.length ; i++) {
- if(this.filesData[i].name.includes(this.filetoDelete.trim())) {
+ for (let i = 0; i < this.filesData.length; i++) {
+ if (this.filesData[i].name.includes(this.filetoDelete.trim()) && this.filesData[i].name.includes(this.currentFilePath)) {
this.filesData.splice(i, 1);
- i = i-1;
+ i = i - 1;
}
}
this.arrangeTreeData(this.filesData);
}
+
+ expandParents(node) {
+ const parent = this.getParent(node);
+ this.treeControl.expand(parent);
+
+ if (parent && parent.level > 0) {
+ this.expandParents(parent);
+ }
+
+ console.log(this.currentFilePath);
+ }
+
+ getParent(node) {
+ const { treeControl } = this;
+ const currentLevel = treeControl.getLevel(node);
+
+ if (currentLevel < 1) {
+ // this.currentFilePath = this.currentFilePath + this.selectedFolder;
+ return null;
+ }
+
+ const startIndex = treeControl.dataNodes.indexOf(node) - 1;
+
+ for (let i = startIndex; i >= 0; i--) {
+ const currentNode = treeControl.dataNodes[i];
+
+ if (treeControl.getLevel(currentNode) < currentLevel) {
+ this.currentFilePath = currentNode.name + '/' + this.currentFilePath;
+ return currentNode;
+ }
+ }
+ }
}
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 a77be5ba0..754ba214c 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
@@ -33,12 +33,12 @@ limitations under the License.
<div style="width: 100%;height: 3em;">
<div style="display: flex;flex-direction: row-reverse">
<button class="btn-active" (click)="downloadCBA()">Download</button>
- <button [disabled]="!isEnriched" [ngClass]="{ 'mat-button-active': isEnriched, 'mat-button-disablled': !isEnriched}" mat-button [matMenuTriggerFor]="menu">Deploy</button>
+ <button class="mat-button-active" mat-button [matMenuTriggerFor]="menu">Deploy</button>
<mat-menu #menu="matMenu">
<button mat-menu-item>Deploy</button>
<button mat-menu-item>Test</button>
</mat-menu>
- <button [disabled]="!isEnriched" [ngClass]="{ 'btn-active': isEnriched, 'btn-disablled': !isEnriched}" class="btn-active">Publish</button>
+ <button [disabled]="!isEnriched" class="btn-active">Publish</button>
<button class="btn-active">Save</button>
<button class="btn-active">Enrich</button>
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
index 4484d550e..e1d9be006 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
@@ -3318,7 +3318,7 @@
"version": "1.0.0",
"derived_from": "tosca.nodes.Root"
},
- "tosca.nodes.DG": {
+ "tosca.nodes.Workflow": {
"description": "This is Directed Graph Node Type",
"version": "1.0.0",
"derived_from": "tosca.nodes.Root"
@@ -3459,7 +3459,7 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
},
"artifact-config-template": {
"description": "This is Configuration Velocity Template",
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
index 68a8ae6bd..3658a260d 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
@@ -203,7 +203,7 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
},
"source-input": {
"description": "This is Input Resource Source Node Type",
@@ -341,7 +341,7 @@
"version": "1.0.0",
"derived_from": "tosca.nodes.Root"
},
- "tosca.nodes.DG": {
+ "tosca.nodes.Workflow": {
"description": "This is Directed Graph Node Type",
"version": "1.0.0",
"derived_from": "tosca.nodes.Root"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json
index b40c8cb34..7e78a42c8 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json
@@ -139,7 +139,7 @@
}
}
},
- "derived_from" : "tosca.nodes.DG"
+ "derived_from" : "tosca.nodes.Workflow"
},
"source-input" : {
"description" : "This is Input Resource Source Node Type",
@@ -164,7 +164,7 @@
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
},
- "tosca.nodes.DG" : {
+ "tosca.nodes.Workflow" : {
"description" : "This is Directed Graph Node Type",
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json
index 628a7d04d..b3f5272b8 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json
@@ -20,17 +20,11 @@
"file" : "Definitions/policy_types.json"
} ],
"dsl_definitions" : {
- "config-assign-properties" : {
- "resolution-key" : {
- "get_input" : "resolution-key"
- }
- },
"config-deploy-properties" : {
"resolution-key" : {
"get_input" : "resolution-key"
}
}
-
},
"topology_template" : {
"workflows" : {
@@ -49,13 +43,6 @@
"required" : true,
"type" : "string"
},
- "artifact-name" : {
- "required" : true,
- "type" : "list",
- "entry_schema" : {
- "type" : "string"
- }
- },
"store-result" : {
"required" : true,
"type" : "boolean"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json
index fc8e1bf64..fe51488c7 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json
@@ -1,13 +1 @@
-[
- {
- "name": "entity",
- "input-param": true,
- "property": {
- "type": "json"
- },
- "dictionary-name": "entity",
- "dictionary-source": "input",
- "dependencies": [
- ]
- }
-]
+[]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json
index fc8e1bf64..2a866c9b5 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json
@@ -1,11 +1,22 @@
[
{
- "name": "entity",
+ "name": "pnf-id",
"input-param": true,
"property": {
- "type": "json"
+ "type": "string"
},
- "dictionary-name": "entity",
+ "dictionary-name": "pnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+ ]
+ },
+ {
+ "name": "pnf-name",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "pnf-name",
"dictionary-source": "input",
"dependencies": [
]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
index e5aa763ba..9e9350c81 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
@@ -3,19 +3,18 @@
"dt-config-assign-properties" : {
"description" : "Dynamic DataType definition for workflow(config-assign).",
"version" : "1.0.0",
- "properties" : {
- "entity" : {
- "type" : "json"
- }
- },
+ "properties" : { },
"derived_from" : "tosca.datatypes.Dynamic"
},
"dt-config-deploy-properties" : {
"description" : "Dynamic DataType definition for workflow(config-deploy).",
"version" : "1.0.0",
"properties" : {
- "entity" : {
- "type" : "json"
+ "pnf-id" : {
+ "type" : "string"
+ },
+ "pnf-name" : {
+ "type" : "string"
}
},
"derived_from" : "tosca.datatypes.Dynamic"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
index ed7c580bc..4a0041773 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
@@ -155,7 +155,7 @@
}
}
},
- "derived_from" : "tosca.nodes.DG"
+ "derived_from" : "tosca.nodes.Workflow"
},
"source-input" : {
"description" : "This is Input Resource Source Node Type",
@@ -180,7 +180,7 @@
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
},
- "tosca.nodes.DG" : {
+ "tosca.nodes.Workflow" : {
"description" : "This is Directed Graph Node Type",
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
index 98a73b101..189cbf86f 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
@@ -1,10 +1,25 @@
{
- "entity" : {
- "tags" : "entity",
- "name" : "entity",
+ "pnf-id" : {
+ "tags" : "pnf-id",
+ "name" : "pnf-id",
"property" : {
- "description" : "entity",
- "type" : "json"
+ "description" : "pnf-id",
+ "type" : "string"
+ },
+ "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "pnf-name" : {
+ "tags" : "pnf-name",
+ "name" : "pnf-name",
+ "property" : {
+ "description" : "pnf-name",
+ "type" : "string"
},
"updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
"sources" : {
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py
index 518666a76..01e2ec477 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py
@@ -12,9 +12,8 @@
# 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.
-#
-# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
+
from time import sleep
from org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor import \
@@ -25,88 +24,104 @@ from java.lang import Exception as JavaException
class RestconfConfigDeploy(RestconfComponentFunction):
log = globals()["log"]
- seconds_to_sleep = 5
- base_mount_url = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/"
+ odl_status_check_limit = 10
+ odl_status_check_pause = 1
+ odl_status_check_url = "restconf/operational/network-topology:network-topology/topology/topology-netconf/node/"
+ base_odl_url = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/"
server_identifier = "sdncodl"
configlet_template_name = "config-assign"
+ configlet_odl_resource = "/yang-ext:mount/mynetconf:netconflist"
def process(self, execution_request):
self.log.info("Started execution of process method")
try:
- self.log.info("getting resolution-key")
- resolution_key = self.getDynamicProperties("resolution-key").asText()
- self.log.info("resolution_key: {}", resolution_key)
-
- self.log.info("getting pnf-id")
- pnf_id = execution_request.payload.get("config-deploy-request").get("config-deploy-properties").get("entity").get("pnf-id")
- pnf_id = str(pnf_id).strip('\"')
- self.log.info("pnf-id: {}", pnf_id)
-
- self.log.info("mounting device {}", pnf_id)
- self.mount(pnf_id)
-
- self.log.info("sleeping for {} seconds", self.seconds_to_sleep)
- sleep(self.seconds_to_sleep)
-
- try:
- self.log.info("configuring device {}", pnf_id)
- self.apply_configuration(pnf_id, resolution_key, self.configlet_template_name)
- except Exception, err:
- self.log.error("an error occurred while configuring device {}", err)
- raise err
- finally:
- self.log.info("unmounting device {}", pnf_id)
- self.unmount(pnf_id)
-
- self.log.info("Ended execution of process method")
-
+ pnf_id, resolution_key = self.retrieve_parameters(execution_request)
+ self.interact_with_odl(pnf_id, resolution_key)
except JavaException, err:
self.log.error("Java Exception in the script", err)
raise err
except Exception, err:
- self.log.error("Python Exception in the script", err)
+ self.log.error("Python Exception in the script:" + str(err), err)
+ raise err
+ self.log.info("Ended execution of process method")
+
+ def retrieve_parameters(self, execution_request):
+ resolution_key = self.getDynamicProperties("resolution-key").asText()
+ self.log.info("resolution_key: {}", resolution_key)
+ pnf_id = execution_request.payload.get("config-deploy-request").get("config-deploy-properties").get("pnf-id")
+ pnf_id = str(pnf_id).strip('\"')
+ self.log.info("pnf-id: {}", pnf_id)
+ return pnf_id, resolution_key
+
+ def interact_with_odl(self, pnf_id, resolution_key):
+ try:
+ self.mount(pnf_id)
+ self.log_current_configlet(pnf_id)
+ self.apply_configuration(pnf_id, resolution_key, self.configlet_template_name)
+ except Exception, err:
+ self.log.error("an error occurred while configuring device {}", err)
raise err
+ finally:
+ self.log.info("unmounting device {}", pnf_id)
+ self.unmount(pnf_id)
def mount(self, pnf_id):
- self.log.info("meshing mount payload")
+ self.log.info("mounting device {}", pnf_id)
mount_payload = self.resolveAndGenerateMessage("config-deploy-mapping", "config-deploy-template")
self.log.info("mount payload: \n {}", mount_payload)
-
- # defining custom header
- headers = {
- "Content-Type": "application/xml"
- }
-
- url = self.base_mount_url + str(pnf_id)
+ headers = {"Content-Type": "application/xml"} # defining custom header
+ url = self.base_odl_url + str(pnf_id)
self.log.info("sending mount request, url: {}", url)
web_client_service = self.restClientService(self.server_identifier)
web_client_service.exchangeResource("PUT", url, mount_payload, headers)
+ self.wait_for_odl_to_mount(pnf_id)
- def unmount(self, pnf_id):
- url = self.base_mount_url + str(pnf_id)
- self.log.info("sending unmount request, url: {}", url)
+ def wait_for_odl_to_mount(self, pnf_id):
+ counter = 0
+ url = self.odl_status_check_url + pnf_id
+ self.log.info("url for ODL status check: {}", url)
web_client_service = self.restClientService(self.server_identifier)
- web_client_service.exchangeResource("DELETE", url, "")
+ expected_result = '"netconf-node-topology:connection-status":"connected"'
+ while counter < self.odl_status_check_limit:
+ result = web_client_service.exchangeResource("GET", url, "")
+ self.log.info("ODL status check result: {}", result)
+ if expected_result in result:
+ self.log.info("PNF was mounted successfully on ODL")
+ return None
+ sleep(1)
+ counter += 1
+ raise JavaException("PNF was not mounted on ODL, aborting configuration procedure")
+
+ def log_current_configlet(self, pnf_id):
+ self.log.info("retrieving configuration for device {}", pnf_id)
+ url = self.base_odl_url + pnf_id + self.configlet_odl_resource
+ self.log.info("sending GET request, url: {}", url)
+ web_client_service = self.restClientService(self.server_identifier)
+ result = web_client_service.exchangeResource("GET", url, "")
+ self.log.info("Current configuration: {}", result)
def apply_configuration(self, pnf_id, resolution_key, template_name):
+ self.log.info("configuring device {}", pnf_id)
self.log.info("Retrieving configlet from database (resolution-key: {}, template_name: {}",
resolution_key, template_name)
configlet = self.resolveFromDatabase(resolution_key, template_name)
self.log.info("Configlet: {}", configlet)
-
- # defining custom header
- headers = {
- "Content-Type": "application/yang.patch+json"
- }
-
- url = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + pnf_id \
- + "/yang-ext:mount/mynetconf:netconflist"
+ headers = { "Content-Type": "application/yang.patch+json" } # defining custom header
+ url = self.base_odl_url + pnf_id + self.configlet_odl_resource
self.log.info("sending patch request, url: {}", url)
web_client_service = self.restClientService(self.server_identifier)
result = web_client_service.exchangeResource("PATCH", url, configlet, headers)
self.log.info("Configuration application result: {}", result)
+ def unmount(self, pnf_id):
+ url = self.base_odl_url + str(pnf_id)
+ self.log.info("sending unmount request, url: {}", url)
+ web_client_service = self.restClientService(self.server_identifier)
+ web_client_service.exchangeResource("DELETE", url, "")
+
def recover(self, runtime_exception, execution_request):
- self.log.info("Recover method, no code to execute")
- return None
+ self.log.info("Recover function called!")
+ self.log.error(runtime_exception.getMessage())
+ print self.bluePrintRuntimeService.getBluePrintError().addError(runtime_exception.getMessage())
+ return None \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl
index 3812380ea..af91ba00d 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl
@@ -10,8 +10,8 @@
"netconflist":{
"netconf":[
{
- "netconf-id":"40",
- "netconf-param":"4040"
+ "netconf-id":"10",
+ "netconf-param":"1000"
}
]
}
@@ -25,13 +25,29 @@
"netconflist":{
"netconf":[
{
- "netconf-id":"50",
- "netconf-param":"98765"
+ "netconf-id":"20",
+ "netconf-param":"2000"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "edit-id":"edit3",
+ "operation":"merge",
+ "target":"/",
+ "value":{
+ "netconflist":{
+ "netconf":[
+ {
+ "netconf-id":"30",
+ "netconf-param":"3000"
}
]
}
}
}
+
]
}
} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl
index 935177658..1f3f94d4e 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl
@@ -1,13 +1,13 @@
<node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
- <node-id>$entity.pnf-id</node-id>
+ <node-id>$pnf-id</node-id>
<key-based xmlns="urn:opendaylight:netconf-node-topology">
<key-id xmlns="urn:opendaylight:netconf-node-topology">ODL-private-key</key-id>
<username xmlns="urn:opendaylight:netconf-node-topology">netconf</username>
</key-based>
- <host xmlns="urn:opendaylight:netconf-node-topology">$entity.pnf-name</host>
+ <host xmlns="urn:opendaylight:netconf-node-topology">$pnf-name</host>
<port xmlns="urn:opendaylight:netconf-node-topology">6513</port>
<tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
- <protocol xmlns="urn:opendaylight:netconf-node-topology">
+ <protocol xmlns="urn:opendaylight:netconf-node-topology">
<name xmlns="urn:opendaylight:netconf-node-topology">TLS</name>
</protocol>
<max-connection-attempts xmlns="urn:opendaylight:netconf-node-topology">5</max-connection-attempts>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
deleted file mode 100644
index eadc848be..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "artifact_types" : { }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
deleted file mode 100644
index 9e040b85d..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "tosca_definitions_version": "controller_blueprint_1_0_0",
- "metadata": {
- "template_author": "Brinda Santh <brindasanth@in.ibm.com>",
- "template_name": "component_invoke",
- "template_version": "1.0.0",
- "template_tags": "brinda, component_invoke"
- },
- "imports": [
- {
- "file": "Definitions/data_types.json"
- },
- {
- "file": "Definitions/relationship_types.json"
- },
- {
- "file": "Definitions/artifact_types.json"
- },
- {
- "file": "Definitions/node_types.json"
- },
- {
- "file": "Definitions/policy_types.json"
- }
- ],
- "topology_template": {
- "workflows": {
- "component-invoke": {
- "steps": {
- "activate-process": {
- "description": "Sample Component Invocation flow",
- "target": "sample-component",
- "activities": [
- {
- "call_operation": "sample-component"
- }
- ]
- }
- },
- "inputs": {
- "request-id": {
- "required": true,
- "type": "string"
- },
- "action-name": {
- "required": true,
- "type": "string"
- },
- "scope-type": {
- "required": true,
- "type": "string"
- },
- "hostname": {
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "response-property1": {
- "type": "string",
- "value": "executed"
- },
- "response-property2": {
- "type": "string",
- "value": {
- "get_input": "action-name"
- }
- }
- }
- }
- },
- "node_templates": {
- "sample-component": {
- "type": "component-sample-executor",
- "interfaces": {
- "ComponentSampleExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "sample-property": "sample-value",
- "sample-list-property": [
- "json-parser-service"
- ],
- "dynamic-properties": {
- "prop1": "prop1-value",
- "prop2": "prop2-value"
- }
- },
- "outputs": {
- "response-data": "",
- "status": ""
- }
- }
- }
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
deleted file mode 100644
index 8c304c40b..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "data_types" : { }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
deleted file mode 100644
index 1e02cef4a..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "node_types": {
- "component-sample-executor": {
- "description": "This is Sample Component API",
- "version": "1.0.0",
- "interfaces": {
- "ComponentSampleExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "sample-property": {
- "description": "Sample Property.",
- "required": true,
- "type": "string"
- },
- "sample-list-property": {
- "description": "Dependent Step Components NodeTemplate name.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "dynamic-properties": {
- "description": "Dynamic Json Content or DSL Json reference.",
- "required": false,
- "type": "json"
- }
- },
- "outputs": {
- "response-data": {
- "description": "Execution Response Data in JSON format.",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
- },
- "tosca.nodes.Component": {
- "description": "This is default Component Node",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
- }
- }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
deleted file mode 100644
index 1e44cc70a..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "policy_types" : { }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
deleted file mode 100644
index 4ddd7a57c..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "relationship_types" : { }
-} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
deleted file mode 100644
index 6f31cf5a2..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
+++ /dev/null
@@ -1 +0,0 @@
-{ } \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
deleted file mode 100644
index a7c130a23..000000000
--- a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
+++ /dev/null
@@ -1,5 +0,0 @@
-TOSCA-Meta-File-Version: 1.0.0
-CSAR-Version: 1.0
-Created-By: Brinda Santh <brindasanth@in.ibm.com>
-Entry-Definitions: Definitions/component_invoke.json
-Template-Tags: Brinda Santh, component_invoke \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json
index f143e560b..c1cded219 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json
@@ -162,7 +162,7 @@
}
}
},
- "derived_from" : "tosca.nodes.DG"
+ "derived_from" : "tosca.nodes.Workflow"
},
"source-capability" : {
"description" : "This is Component Resource Source Node Type",
@@ -353,7 +353,7 @@
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
},
- "tosca.nodes.DG" : {
+ "tosca.nodes.Workflow" : {
"description" : "This is Directed Graph Node Type",
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
diff --git a/components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json b/components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json
deleted file mode 100644
index af99d75b8..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "description": "This is Configuration Velocity Template",
- "version": "1.0.0",
- "properties": {
- "action-names": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
- "capabilities": {
- "content": {
- "type": "tosca.capabilities.Content",
- "properties": {
- "content": {
- "required": true,
- "type": "string"
- }
- }
- },
- "mapping": {
- "type": "tosca.capabilities.Mapping",
- "properties": {
- "mapping": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-resource-assignment"
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Artifact"
-} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json b/components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json
deleted file mode 100644
index 263882ad7..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "description": "This is Generate Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "ConfigGeneratorComponent": {
- "operations": {
- "process": {
- "inputs": {
- "template-data": {
- "description": "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "template-content": {
- "description": "Conditional : Dynamic Template used to generate Configuration.",
- "required": false,
- "type": "string"
- },
- "resource-type": {
- "description": "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "action-name": {
- "description": "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "template-name": {
- "description": "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "generated-config": {
- "description": "Generated Configuration for the Template adn Resource Data",
- "required": true,
- "type": "string"
- },
- "mask-info": {
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.cds.controllerblueprints.core.data.custom.MaskInfo ",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json
index 5a024a7d6..b78a7c63a 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json
@@ -41,5 +41,5 @@
}
}
},
- "derived_from": "tosca.nodes.component.Jython"
+ "derived_from": "tosca.nodes.Component"
} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
deleted file mode 100644
index 68b3ebde2..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "description": "This is Sample Component API",
- "version": "1.0.0",
- "interfaces": {
- "ComponentSampleExecutor": {
- "operations": {
- "process": {
- "inputs": {
- "sample-property": {
- "description": "Sample Property.",
- "required": true,
- "type": "string"
- },
- "sample-list-property": {
- "required": true,
- "description": "Dependent Step Components NodeTemplate name.",
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "dynamic-properties": {
- "description": "Dynamic Json Content or DSL Json reference.",
- "required": false,
- "type": "json"
- }
- },
- "outputs": {
- "response-data": {
- "description": "Execution Response Data in JSON format.",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json b/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json
index ec9904bf5..23aa63ea2 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json
@@ -15,5 +15,5 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-default.json b/components/model-catalog/definition-type/starter-type/node_type/source-default.json
index 13e234e1b..3e7d14ce8 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/source-default.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/source-default.json
@@ -1,18 +1,6 @@
{
"description": "This is Default Resource Source Node Type",
"version": "1.0.0",
- "properties": {
- "key": {
- "required": false,
- "type": "string"
- },
- "key-dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
+ "properties": { },
"derived_from": "tosca.nodes.ResourceSource"
} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-input.json b/components/model-catalog/definition-type/starter-type/node_type/source-input.json
index 126ea30bd..bf84481bd 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/source-input.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/source-input.json
@@ -1,18 +1,6 @@
{
"description": "This is Input Resource Source Node Type",
"version": "1.0.0",
- "properties": {
- "key": {
- "required": false,
- "type": "string"
- },
- "key-dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
+ "properties": { },
"derived_from": "tosca.nodes.ResourceSource"
} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json
index 702748f8a..6f03dbfc4 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json
@@ -4,12 +4,12 @@
"properties": {
"type": {
"required": true,
+ "default": "SQL",
"type": "string",
"constraints": [
{
"valid_values": [
- "SQL",
- "PLSQL"
+ "SQL"
]
}
]
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-rest.json b/components/model-catalog/definition-type/starter-type/node_type/source-rest.json
index b28e9341d..f9995a883 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/source-rest.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/source-rest.json
@@ -3,7 +3,7 @@
"version": "1.0.0",
"properties": {
"type": {
- "required": false,
+ "required": true,
"type": "string",
"default": "JSON",
"constraints": [
@@ -15,7 +15,7 @@
]
},
"verb": {
- "required": false,
+ "required": true,
"type": "string",
"default": "GET",
"constraints": [
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Workflow.json
index 86728cf2f..eb8cac0ae 100644
--- a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json
+++ b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Workflow.json
@@ -1,5 +1,5 @@
-{
- "description": "This is Directed Graph Node Type",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
+{
+ "description": "This is Directed Graph Node Type",
+ "version": "1.0.0",
+ "derived_from": "tosca.nodes.Root"
} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json
deleted file mode 100644
index 8e194f6dd..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Jython Component",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json
deleted file mode 100644
index 381ed59e2..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Kotlin Component",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json
deleted file mode 100644
index 7b67c8cb2..000000000
--- a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "This is Python Component",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/entity.json b/components/model-catalog/resource-dictionary/starter-dictionary/entity.json
deleted file mode 100755
index 83a32a922..000000000
--- a/components/model-catalog/resource-dictionary/starter-dictionary/entity.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name" : "entity",
- "tags" : "entity",
- "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
- "property" : {
- "description" : "entity",
- "type" : "json"
- },
- "sources" : {
- "input" : {
- "type" : "source-input",
- "properties" : { }
- }
- }
-} \ No newline at end of file
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/BlueprintHttpServer.java
index ae75488c1..85ccd1f43 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/BlueprintHttpServer.java
@@ -16,40 +16,19 @@
package org.onap.ccsdk.cds.blueprintsprocessor;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;
@Component
-public class BlueprintHttpServer {
-
- private static Logger log = LoggerFactory.getLogger(BlueprintHttpServer.class);
+public class BlueprintHttpServer implements WebServerFactoryCustomizer<NettyReactiveWebServerFactory> {
@Value("${blueprintsprocessor.httpPort}")
private Integer httpPort;
- @Autowired
- HttpHandler httpHandler;
-
- WebServer http;
-
- @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();
+ @Override
+ public void customize(NettyReactiveWebServerFactory serverFactory) {
+ serverFactory.setPort(httpPort);
}
-}
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/test-cba.zip b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/test-cba.zip
index 907482400..785ec6c00 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/test-cba.zip
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/resources/test-cba.zip
Binary files differ
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
index 7737fd1a5..67dbd0d72 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
@@ -12,8 +12,6 @@
* 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.
- *
- * SPDX-License-Identifier: Apache-2.0
*/
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index b34d66d19..94a575397 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -12,8 +12,6 @@
* 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.
- *
- * SPDX-License-Identifier: Apache-2.0
*/
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
@@ -59,12 +57,7 @@ interface BlueprintWebClientService {
}
fun convertToBasicHeaders(headers: Map<String, String>): Array<BasicHeader> {
- val convertedHeaders = Array<BasicHeader>(headers.size){ BasicHeader("","") }
- var currentElement = 0
- for ((name, value) in headers) {
- convertedHeaders[currentElement++] = BasicHeader(name, value)
- }
- return convertedHeaders
+ return headers.map{ BasicHeader(it.key, it.value)}.toTypedArray()
}
fun delete(path: String, headers: Array<BasicHeader>): String {
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
index 609267eb9..6f81ee1a8 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
@@ -12,8 +12,6 @@
* 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.
- *
- * SPDX-License-Identifier: Apache-2.0
*/
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index 6da59399e..a02a8083b 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -13,8 +13,6 @@
* 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.
- *
- * SPDX-License-Identifier: Apache-2.0
*/
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/test-cba.zip b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/test-cba.zip
index 907482400..785ec6c00 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/test-cba.zip
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/test-cba.zip
Binary files differ
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/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
index d8aefe904..b18617422 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/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
@@ -59,7 +59,7 @@ open class BluePrintWorkflowExecutionServiceImpl(
componentWorkflowExecutionService
.executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
- derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_DG, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
dgWorkflowExecutionService
.executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json
index 57667de98..c17a36c1b 100644
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json
+++ b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-activate-netconf.json
@@ -48,5 +48,5 @@
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json
index 679c4641c..4d5343c3a 100644
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json
+++ b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-config-generator.json
@@ -47,5 +47,5 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json
index 87b052b61..f44486416 100644
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json
+++ b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assign-activate.json
@@ -52,5 +52,5 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json
index 9de599b01..d13668aaf 100644
--- a/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json
+++ b/ms/controllerblueprints/modules/blueprint-core/load/model_type/node_type/dg-resource-assignment.json
@@ -47,5 +47,5 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
index e30c1b4c9..23c52b4b3 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
@@ -98,7 +98,7 @@ object BluePrintConstants {
const val MODEL_TYPE_RELATIONSHIPS_ATTACH_TO = "tosca.relationships.AttachesTo"
const val MODEL_TYPE_RELATIONSHIPS_ROUTES_TO = "tosca.relationships.RoutesTo"
- const val MODEL_TYPE_NODE_DG = "tosca.nodes.DG"
+ const val MODEL_TYPE_NODE_WORKFLOW = "tosca.nodes.Workflow"
const val MODEL_TYPE_NODE_COMPONENT = "tosca.nodes.Component"
const val MODEL_TYPE_NODE_VNF = "tosca.nodes.Vnf"
const val MODEL_TYPE_NODE_RESOURCE_SOURCE = "tosca.nodes.ResourceSource"
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt
index 4e89907b2..30ac68abd 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt
@@ -29,7 +29,7 @@ object BluePrintTypes {
@JvmStatic
val validNodeTypeDerivedFroms: MutableList<String> = arrayListOf(
BluePrintConstants.MODEL_TYPE_NODES_ROOT,
- BluePrintConstants.MODEL_TYPE_NODE_DG,
+ BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW,
BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
BluePrintConstants.MODEL_TYPE_NODE_VNF,
BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
index a7dbbf846..13307fdfa 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
@@ -66,10 +66,10 @@ open class BluePrintWorkflowValidatorImpl(private val bluePrintTypeValidatorServ
val nodeTypeDerivedFrom = bluePrintRuntimeService.bluePrintContext().nodeTemplateNodeType(it).derivedFrom
- check(nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_DG
+ check(nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW
|| nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_COMPONENT) {
"NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected " +
- "'${BluePrintConstants.MODEL_TYPE_NODE_DG}' or '${BluePrintConstants.MODEL_TYPE_NODE_COMPONENT}'"
+ "'${BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW}' or '${BluePrintConstants.MODEL_TYPE_NODE_COMPONENT}'"
}
} catch (e: Exception) {
bluePrintRuntimeService.getBluePrintError()
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
index e12236d80..9dbd19e22 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
@@ -92,7 +92,7 @@ class BluePrintDesignTimeValidatorServiceTest {
assertEquals(1, bluePrintRuntime.getBluePrintError().errors.size)
assertEquals("Failed to validate Workflow(resource-assignment)'s step(test)'s definition : " +
"resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', " +
- "Expected 'tosca.nodes.DG' or 'tosca.nodes.Component'", bluePrintRuntime.getBluePrintError().errors[0])
+ "Expected 'tosca.nodes.Workflow' or 'tosca.nodes.Component'", bluePrintRuntime.getBluePrintError().errors[0])
}
@Test
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
index 8379e5032..02e1052b9 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
@@ -103,7 +103,7 @@ open class BluePrintWorkflowEnhancerImpl(private val bluePrintRepoService: BlueP
derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
// DO Nothing
}
- derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_DG, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
enhanceDGStepTargets(name, workflow, firstNodeTemplateName)
}
else -> {
diff --git a/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json b/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json
index 5b5332fce..c482b9b30 100644
--- a/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json
+++ b/ms/controllerblueprints/modules/service/src/main/resources/service_template/default_netconf.json
@@ -426,7 +426,7 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
},
"dg-activate-netconf": {
"description": "This is Download Netconf Directed Graph",
@@ -477,7 +477,7 @@
}
}
},
- "derived_from": "tosca.nodes.DG"
+ "derived_from": "tosca.nodes.Workflow"
},
"artifact-config-template": {
"description": "This is Configuration Velocity Template",
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index 677dd45ad..23c541d76 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -70,13 +70,6 @@ class BluePrintEnhancerServiceImplTest {
@Test
@Throws(Exception::class)
- fun testComponentInvokeEnhancementAndValidation() {
- val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/component_invoke"
- testComponentInvokeEnhancementAndValidation(basePath, "component-enhance")
- }
-
- @Test
- @Throws(Exception::class)
fun testGoldenEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden"
testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance")
diff --git a/pom.xml b/pom.xml
index e229fa98a..8c989ba09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,9 +36,9 @@ limitations under the License.
<description>CCSDK Controller Design Studio</description>
<modules>
- <!--<module>cds-ui</module>-->
- <module>components</module>
- <module>ms</module>
+ <module>cds-ui</module>
+ <!--<module>components</module>-->
+ <!--<module>ms</module>-->
</modules>
<url>https://wiki.onap.org</url>