From a8480d1fec5b5696be04eb887f4cbed6b56238be Mon Sep 17 00:00:00 2001 From: mojahidi Date: Thu, 19 Jul 2018 12:35:31 +0530 Subject: Add support for workflowId and workflowVersionId Enhance operation data model and APIs to support workflowId and workflowVersionId Change-Id: Ib8772027a3e0147ae0bb59811a9b31fe46975ac6 Issue-ID: SDC-1535 Signed-off-by: mojahidi --- .../TestInterfaceOperation.feature | 18 +----------------- .../resources/json/operation/createOperation.json | 14 ++++++++++---- .../stepDefinitions/InterfaceOperationSteps.js | 21 ++++----------------- 3 files changed, 15 insertions(+), 38 deletions(-) (limited to 'openecomp-bdd') diff --git a/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature b/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature index fa3647e5c6..dfd754f74e 100644 --- a/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature +++ b/openecomp-bdd/features/InterfaceOperation/TestInterfaceOperation.feature @@ -93,20 +93,4 @@ Feature: Interface Operation Feature #Submit Then I want to submit this VF - And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION" - - Scenario: Test InterfaceOperation CREATE with output parameters - #Create Operations - When I want to create an Operation with outputParameter - Then I want to check property "uniqueId" exists - - #List All Operations - When I want to list Operations - -#Checkin - When I want to checkin this VF - 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" + And I want to check property "lifecycleState" for value "READY_FOR_CERTIFICATION" \ No newline at end of file diff --git a/openecomp-bdd/resources/json/operation/createOperation.json b/openecomp-bdd/resources/json/operation/createOperation.json index 394be36187..5d494402e5 100644 --- a/openecomp-bdd/resources/json/operation/createOperation.json +++ b/openecomp-bdd/resources/json/operation/createOperation.json @@ -1,12 +1,16 @@ { "interfaceOperations": { "create": { - "description": "create operation", + "description": "abcd description", "inputParams": { "listToscaDataDefinition": [ { - "paramName": "inp1", - "paramId": "68443b9d-9405-458e-811f-b62dd4975fcb.nf_naming" + "paramName": "sd", + "paramId": "67c72959-0a05-4436-9339-534aa44c9fd0.nf_naming" + }, + { + "paramName": "sdf", + "paramId": "67c72959-0a05-4436-9339-534aa44c9fd0.nf_naming_code" } ] }, @@ -18,7 +22,9 @@ } ] }, - "operationType": "create" + "operationType": "create", + "workflowId" : "w_id1", + "workflowVersionId" : "w_version_id11" } } } \ No newline at end of file diff --git a/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js b/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js index 14c5610626..1bfd4c30a6 100644 --- a/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js +++ b/openecomp-bdd/stepDefinitions/InterfaceOperationSteps.js @@ -43,30 +43,16 @@ function makeType() { When('I want to create an Operation', function() { let inputData = util.getJSONFromFile('resources/json/operation/createOperation.json'); - //let path = '/catalog/resources/f3dc81bb-85e9-4dfd-bd1b-37f5dc5e5534/interfaceOperations'; - let path = '/catalog/resources/' + this.context.vf.uniqueId +'/interfaceOperations'; - - inputData.interfaceOperations.create.operationType = makeType(); - inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramName = util.random(); - inputData.interfaceOperations.create.inputParams.listToscaDataDefinition[0].paramId = this.context.vf.id; - - 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 with outputParameter', function() { - let inputData = util.getJSONFromFile('resources/json/operation/createOperation.json'); - //let path = '/catalog/resources/f3dc81bb-85e9-4dfd-bd1b-37f5dc5e5534/interfaceOperations'; 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(); return util.request(this.context, 'POST', path, inputData, false, 'vf').then(result => { this.context.item = {uniqueId : result.data.uniqueId, operationType : result.data.operationType}; @@ -75,6 +61,7 @@ When('I want to create an Operation with outputParameter', function() { }); + 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)=> { -- cgit 1.2.3-korg