aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-bdd
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-bdd')
-rw-r--r--openecomp-bdd/features/InterfaceOperation/TestResourceInterfaceOperation.feature (renamed from openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature)34
-rw-r--r--openecomp-bdd/features/InterfaceOperation/TestServiceInterfaceOperation.feature37
-rw-r--r--openecomp-bdd/resources/json/operation/createOperation.json22
-rw-r--r--openecomp-bdd/resources/json/operation/createOperationWithInputOutput.json29
-rw-r--r--openecomp-bdd/resources/json/operation/createService.json102
-rw-r--r--openecomp-bdd/resources/json/operation/createVF.json (renamed from openecomp-bdd/resources/json/operation/createVF_From_Catalog.json)33
-rw-r--r--openecomp-bdd/resources/json/operation/updateOperation.json17
-rw-r--r--openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js103
8 files changed, 296 insertions, 81 deletions
diff --git a/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature b/openecomp-bdd/features/InterfaceOperation/TestResourceInterfaceOperation.feature
index dfd754f74e..9f3cd5490f 100644
--- a/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature
+++ b/openecomp-bdd/features/InterfaceOperation/TestResourceInterfaceOperation.feature
@@ -11,6 +11,8 @@ Feature: Interface Operation Feature
Then I want to check property "uniqueId" exists
And I want to create an Operation
Then I want to check property "uniqueId" exists
+ When I want to create an Operation with input output
+ Then I want to check property "uniqueId" exists
#List All Operations
When I want to list Operations
@@ -26,12 +28,12 @@ Feature: Interface Operation Feature
When I want to delete an Operation
#Checkin
- When I want to checkin this VF
+ When I want to checkin this component
Then I want to check property "lifecycleState" for value "NOT_CERTIFIED_CHECKIN"
- #Submit
- Then I want to submit this VF
- And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION"
+ #Certify
+ Then I want to certify this component
+ And I want to check property "lifecycleState" for value "CERTIFIED"
Scenario: Test InterfaceOperation CREATE
#Create Operations
@@ -46,12 +48,12 @@ Feature: Interface Operation Feature
When I want to list Operations
#Checkin
- When I want to checkin this VF
+ When I want to checkin this component
Then I want to check property "lifecycleState" for value "NOT_CERTIFIED_CHECKIN"
-#Submit
- Then I want to submit this VF
- And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION"
+#Certify
+ Then I want to certify this component
+ And I want to check property "lifecycleState" for value "CERTIFIED"
Scenario: Test InterfaceOperation UPDATE
@@ -67,12 +69,12 @@ Feature: Interface Operation Feature
Then I want to check property "uniqueId" exists
#Checkin
- When I want to checkin this VF
+ When I want to checkin this component
Then I want to check property "lifecycleState" for value "NOT_CERTIFIED_CHECKIN"
- #Submit
- Then I want to submit this VF
- And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION"
+ #Certify
+ Then I want to certify this component
+ And I want to check property "lifecycleState" for value "CERTIFIED"
Scenario: Test InterfaceOperation DELETE
@@ -88,9 +90,9 @@ Feature: Interface Operation Feature
When I want to delete an Operation
#Checkin
- When I want to checkin this VF
+ When I want to checkin this component
Then I want to check property "lifecycleState" for value "NOT_CERTIFIED_CHECKIN"
- #Submit
- Then I want to submit this VF
- And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION" \ No newline at end of file
+ #certify
+ Then I want to certify this component
+ And I want to check property "lifecycleState" for value "CERTIFIED" \ No newline at end of file
diff --git a/openecomp-bdd/features/InterfaceOperation/TestServiceInterfaceOperation.feature b/openecomp-bdd/features/InterfaceOperation/TestServiceInterfaceOperation.feature
new file mode 100644
index 0000000000..1ad2377e1b
--- /dev/null
+++ b/openecomp-bdd/features/InterfaceOperation/TestServiceInterfaceOperation.feature
@@ -0,0 +1,37 @@
+Feature: Interface Operation Feature
+
+ Background: Init
+ Given I want to create a Service
+
+ Scenario: Test InterfaceOperation CRUD
+ #Create Operations
+ When I want to create an Operation
+ Then I want to check property "uniqueId" exists
+ And I want to create an Operation
+ Then I want to check property "uniqueId" exists
+ And I want to create an Operation
+ Then I want to check property "uniqueId" exists
+ When I want to create an Operation with input output
+ Then I want to check property "uniqueId" exists
+
+ #List All Operations
+ When I want to list Operations
+
+ #Get Operation By OperationId
+ When I want to get an Operation by Id
+ Then I want to check property "uniqueId" exists
+
+ #Update Operation
+ When I want to update an Operation
+ Then I want to check property "uniqueId" exists
+
+ #Delete Operation
+ When I want to delete an Operation
+
+ #Checkin
+ When I want to checkin this component
+ Then I want to check property "lifecycleState" for value "NOT_CERTIFIED_CHECKIN"
+
+ #Submit
+ Then I want to submit this component
+ And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION"
diff --git a/openecomp-bdd/resources/json/operation/createOperation.json b/openecomp-bdd/resources/json/operation/createOperation.json
index 5d494402e5..10c34ba8f2 100644
--- a/openecomp-bdd/resources/json/operation/createOperation.json
+++ b/openecomp-bdd/resources/json/operation/createOperation.json
@@ -1,30 +1,14 @@
{
"interfaceOperations": {
- "create": {
+ "operation": {
"description": "abcd description",
"inputParams": {
- "listToscaDataDefinition": [
- {
- "paramName": "sd",
- "paramId": "67c72959-0a05-4436-9339-534aa44c9fd0.nf_naming"
- },
- {
- "paramName": "sdf",
- "paramId": "67c72959-0a05-4436-9339-534aa44c9fd0.nf_naming_code"
- }
- ]
},
"outputParams": {
- "listToscaDataDefinition": [
- {
- "paramName": "op1",
- "paramId": "68443b9d-9405-458e-811f-b62dd4975fcb.nf_naming"
- }
- ]
},
"operationType": "create",
- "workflowId" : "w_id1",
- "workflowVersionId" : "w_version_id11"
+ "workflowId" : null,
+ "workflowVersionId" : null
}
}
} \ No newline at end of file
diff --git a/openecomp-bdd/resources/json/operation/createOperationWithInputOutput.json b/openecomp-bdd/resources/json/operation/createOperationWithInputOutput.json
new file mode 100644
index 0000000000..013d615999
--- /dev/null
+++ b/openecomp-bdd/resources/json/operation/createOperationWithInputOutput.json
@@ -0,0 +1,29 @@
+{
+ "interfaceOperations": {
+ "operation": {
+ "description": "abcd description",
+ "inputParams": {
+ "listToscaDataDefinition": [
+ {
+ "name": "inp1",
+ "type": "string",
+ "property": "97477d27-8fe2-45a1-83cb-83368ef2a402.nf_naming_code",
+ "mandatory": true
+ }
+ ]
+ },
+ "outputParams": {
+ "listToscaDataDefinition": [
+ {
+ "name": "op",
+ "mandatory": true,
+ "type": "String"
+ }
+ ]
+ },
+ "operationType": "create",
+ "workflowId" : null,
+ "workflowVersionId" : null
+ }
+ }
+} \ No newline at end of file
diff --git a/openecomp-bdd/resources/json/operation/createService.json b/openecomp-bdd/resources/json/operation/createService.json
new file mode 100644
index 0000000000..e7afe2aa21
--- /dev/null
+++ b/openecomp-bdd/resources/json/operation/createService.json
@@ -0,0 +1,102 @@
+{
+ "artifacts": {
+
+ },
+ "toscaArtifacts": {
+
+ },
+ "contactId": "cs0008",
+ "categories": [
+ {
+ "name": "Network L4+",
+ "normalizedName": "network l4+",
+ "uniqueId": "serviceNewCategory.network l4+",
+ "icons": [
+ "network_l_4"
+ ],
+ "subcategories": null,
+ "version": null,
+ "ownerId": null,
+ "empty": false,
+ "type": null
+ }
+ ],
+ "description": "service1 for bdd",
+ "icon": "defaulticon",
+ "componentInstancesProperties": {
+
+ },
+ "componentInstancesAttributes": {
+
+ },
+ "name": "service1",
+ "tags": [
+ "service1"
+ ],
+ "capabilities": {
+
+ },
+ "requirements": {
+
+ },
+ "deploymentArtifacts": {
+
+ },
+ "componentType": "SERVICE",
+ "projectCode": "010203",
+ "componentInstances": [
+
+ ],
+ "properties": [
+
+ ],
+
+ "inputs": [
+ {
+ "uniqueId": "03eeb10e-cf2a-41b8-9d8e-d2dbd094f9d4.test1_dasddas",
+ "type": "scalar-unit.size",
+ "required": false,
+ "definition": false,
+ "schema": {
+ "properties": {
+
+ },
+ "property": {
+ "type": "",
+ "required": false,
+ "definition": true,
+ "password": false,
+ "hidden": false,
+ "immutable": false,
+ "getInputProperty": false,
+ "empty": false
+ },
+ "empty": false
+ },
+ "password": false,
+ "name": "test1_dasddas",
+ "hidden": false,
+ "immutable": false,
+ "instanceUniqueId": "03eeb10e-cf2a-41b8-9d8e-d2dbd094f9d4",
+ "propertyId": "03eeb10e-cf2a-41b8-9d8e-d2dbd094f9d4.dasddas",
+ "parentUniqueId": "cs0008",
+ "schemaType": "",
+ "getInputProperty": false,
+ "ownerId": "cs0008",
+ "empty": false
+ }
+ ],
+
+ "attributes": [
+
+ ],
+ "forwardingPaths": {
+
+ },
+ "ecompGeneratedNaming": true,
+ "serviceApiArtifacts": {
+
+ },
+ "instantiationType": "A-la-carte",
+ "environmentContext": "General_Revenue-Bearing"
+} \ No newline at end of file
diff --git a/openecomp-bdd/resources/json/operation/createVF_From_Catalog.json b/openecomp-bdd/resources/json/operation/createVF.json
index 7dcafc63c1..6fe9688caa 100644
--- a/openecomp-bdd/resources/json/operation/createVF_From_Catalog.json
+++ b/openecomp-bdd/resources/json/operation/createVF.json
@@ -56,7 +56,38 @@
"componentInstances": [
],
- "inputs": [ ],
+ "inputs": [{
+ "uniqueId": "abcdef",
+ "type": "org.openecomp.datatypes.Naming",
+ "required": false,
+ "definition": false,
+ "defaultValue": null,
+ "description": null,
+ "schema": null,
+ "password": false,
+ "name": "abcdef",
+ "value": null,
+ "label": null,
+ "hidden": false,
+ "immutable": false,
+ "inputPath": null,
+ "status": null,
+ "inputId": null,
+ "instanceUniqueId": null,
+ "propertyId": null,
+ "annotations": null,
+ "parentUniqueId": "abcd",
+ "getInputValues": null,
+ "constraints": null,
+ "inputs": null,
+ "properties": null,
+ "getInputProperty": false,
+ "schemaType": null,
+ "schemaProperty": null,
+ "version": null,
+ "ownerId": null,
+ "empty": false
+ } ],
"properties": [
],
diff --git a/openecomp-bdd/resources/json/operation/updateOperation.json b/openecomp-bdd/resources/json/operation/updateOperation.json
index b74262f9f4..698d38c612 100644
--- a/openecomp-bdd/resources/json/operation/updateOperation.json
+++ b/openecomp-bdd/resources/json/operation/updateOperation.json
@@ -1,12 +1,23 @@
{
"interfaceOperations": {
- "create": {
+ "operation": {
"description": "create operation_Updated",
"inputParams": {
"listToscaDataDefinition": [
{
- "paramName": "inp1",
- "paramId": "REPLACE FROM CONTEXT"
+ "name": "inp1",
+ "type": "string",
+ "property": "97477d27-8fe2-45a1-83cb-83368ef2a402.nf_naming_code",
+ "mandatory": true
+ }
+ ]
+ },
+ "outputParams": {
+ "listToscaDataDefinition": [
+ {
+ "name": "op",
+ "mandatory": true,
+ "type": "String"
}
]
},
diff --git a/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js b/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js
index 1bfd4c30a6..f4a81d6110 100644
--- a/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js
+++ b/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js
@@ -19,15 +19,28 @@ const util = require('./Utils.js');
When('I want to create a VF', function() {
- let inputData = util.getJSONFromFile('resources/json/operation/createVF_From_Catalog.json');
+ let inputData = util.getJSONFromFile('resources/json/operation/createVF.json');
inputData.name = util.random();
inputData.tags[0] = util.random();
- let path = '/catalog/resources';
+ var type = "resources";
+ let path = '/catalog/' + type;
return util.request(this.context, 'POST', path, inputData, false, 'vf').then(result => {
- this.context.item = {uniqueId : result.data.uniqueId, id : result.data.inputs[0].uniqueId, name : result.data.inputs[0].name};
- this.context.vf = {uniqueId : result.data.uniqueId, id : result.data.inputs[0].uniqueId, name : result.data.inputs[0].name};
+ this.context.component = {uniqueId : result.data.uniqueId, type : type, id : result.data.inputs[0].uniqueId};
+});
+});
+
+When('I want to create a Service', function() {
+ let inputData = util.getJSONFromFile('resources/json/operation/createService.json');
+
+ inputData.name = util.random();
+ inputData.tags[0] = util.random();
+
+ var type = "services";
+ let path = '/catalog/' + type;
+ return util.request(this.context, 'POST', path, inputData, false, 'vf').then(result => {
+ this.context.component = {uniqueId : result.data.uniqueId, type : type, id : result.data.inputs[0].uniqueId};
});
});
@@ -41,82 +54,88 @@ function makeType() {
return text;
}
-When('I want to create an Operation', function() {
- let inputData = util.getJSONFromFile('resources/json/operation/createOperation.json');
- let path = '/catalog/resources/' + this.context.vf.uniqueId +'/interfaceOperations';
-
- inputData.interfaceOperations.create.operationType = makeType();
- inputData.interfaceOperations.create.description = makeType();
- inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramName = util.random();
- inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramId = this.context.vf.id;
- inputData.interfaceOperations.create.outputParams.listToscaDataDefinition[0].paramName = util.random();
- inputData.interfaceOperations.create.outputParams.listToscaDataDefinition[0].paramId = this.context.vf.id;
- inputData.interfaceOperations.create.workflowId = makeType();
- inputData.interfaceOperations.create.workflowVersionId = makeType();
+When('I want to create an Operation with input output', function() {
+ let path = '/catalog/' + this.context.component.type + '/' + this.context.component.uniqueId + '/interfaceOperations';
+ let inputData = util.getJSONFromFile('resources/json/operation/createOperationWithInputOutput.json');
+
+ inputData.interfaceOperations.operation.inputParams.listToscaDataDefinition[0].name = util.random();
+ inputData.interfaceOperations.operation.inputParams.listToscaDataDefinition[0].property = this.context.component.id;
+ inputData.interfaceOperations.operation.outputParams.listToscaDataDefinition[0].name = util.random();
+ inputData.interfaceOperations.operation.operationType = makeType();
+ inputData.interfaceOperations.operation.description = makeType();
return util.request(this.context, 'POST', path, inputData, false, 'vf').then(result => {
- this.context.item = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
});
});
+When('I want to create an Operation', function() {
+ let path = '/catalog/' + this.context.component.type + '/' + this.context.component.uniqueId + '/interfaceOperations';
+ let inputData = util.getJSONFromFile('resources/json/operation/createOperation.json');
+ inputData.interfaceOperations.operation.operationType = makeType();
+ inputData.interfaceOperations.operation.description = makeType();
-When('I want to list Operations', function () {
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/filteredDataByParams?include=interfaces';
- return util.request(this.context, 'GET', path, null, false, 'vf').then((result)=> {
+ return util.request(this.context, 'POST', path, inputData, false, 'vf').then(result => {
+ this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
});
});
+When('I want to list Operations', function () {
+ let path = '/catalog/'+ this.context.component.type + '/' + this.context.component.uniqueId + '/filteredDataByParams?include=interfaces';
+ return util.request(this.context, 'GET', path, null, false, 'vf').then((result)=> {
+ });
+});
+
When('I want to get an Operation by Id', function () {
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/interfaceOperations/' + this.context.operation.uniqueId;
+ let path = '/catalog/'+ this.context.component.type + '/' + this.context.component.uniqueId + '/interfaceOperations/' + this.context.operation.uniqueId;
return util.request(this.context, 'GET', path, null, false, 'vf').then((result)=> {
- this.context.item ={uniqueId : result.data.uniqueId, operationType: result.data.operationType};
- this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
+ this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
});
});
-
When('I want to update an Operation', function () {
let inputData = util.getJSONFromFile('resources/json/operation/updateOperation.json');
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/interfaceOperations/';
- inputData.interfaceOperations.create.uniqueId = this.context.operation.uniqueId;
- inputData.interfaceOperations.create.operationType = this.context.operation.operationType;
- inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramName = util.random();
- inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramId = this.context.vf.id;
+ let path = '/catalog/'+ this.context.component.type + '/'+ this.context.component.uniqueId +'/interfaceOperations';
+ inputData.interfaceOperations.operation.uniqueId = this.context.operation.uniqueId;
+ inputData.interfaceOperations.operation.operationType = this.context.operation.operationType;
+ inputData.interfaceOperations.operation.inputParams.listToscaDataDefinition[0].name = util.random();
+ inputData.interfaceOperations.operation.inputParams.listToscaDataDefinition[0].property = this.context.component.id;
+ inputData.interfaceOperations.operation.outputParams.listToscaDataDefinition[0].name = util.random();
return util.request(this.context, 'PUT', path, inputData, false, 'vf').then((result)=> {
- this.context.item ={uniqueId : result.data.uniqueId, operationType: result.data.operationType};
- this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
+ this.context.operation = {uniqueId : result.data.uniqueId, operationType : result.data.operationType};
});
});
When('I want to delete an Operation', function() {
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/interfaceOperations/' + this.context.operation.uniqueId;
+ let path = '/catalog/'+ this.context.component.type + '/'+ this.context.component.uniqueId +'/interfaceOperations/' + this.context.operation.uniqueId;
return util.request(this.context, 'DELETE', path, null, false, 'vf');
});
-When('I want to checkin this VF', function () {
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/lifecycleState/CHECKIN' ;
+When('I want to checkin this component', function () {
+ let path = '/catalog/'+ this.context.component.type + '/' + this.context.component.uniqueId + '/lifecycleState/CHECKIN' ;
let inputData = {userRemarks: 'checkin'};
return util.request(this.context, 'POST', path, inputData, false, 'vf').then((result)=> {
- this.context.item ={uniqueId : result.data.uniqueId};
- this.context.vf = {uniqueId : result.data.uniqueId};
+ this.context.component = {uniqueId : result.data.uniqueId, type : this.context.component.type};
});
});
-Then('I want to submit this VF', function () {
- let path = '/catalog/resources/' + this.context.vf.uniqueId + '/lifecycleState/certificationRequest' ;
+Then('I want to submit this component', function () {
+ let path = '/catalog/'+ this.context.component.type + '/' + this.context.component.uniqueId + '/lifecycleState/certificationRequest' ;
let inputData = {userRemarks: 'submit'};
return util.request(this.context, 'POST', path, inputData, false, 'vf').then((result)=> {
- this.context.item ={uniqueId : result.data.uniqueId};
this.context.vf = {uniqueId : result.data.uniqueId};
});
});
-
-
-
+Then('I want to certify this component', function () {
+ let path = '/catalog/'+ this.context.component.type +'/' + this.context.component.uniqueId + '/lifecycleState/certify' ;
+ let inputData = {userRemarks: 'certify'};
+ return util.request(this.context, 'POST', path, inputData, false, 'vf').then((result)=> {
+ this.context.component = {uniqueId : result.data.uniqueId};
+});
+}); \ No newline at end of file