bug fixes october 19th 17/70817/4
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Fri, 19 Oct 2018 13:32:18 +0000 (09:32 -0400)
committerRob Daugherty <rd472p@att.com>
Fri, 19 Oct 2018 22:55:36 +0000 (18:55 -0400)
Fixed issue with resource version being added twice.
added silent success to orch validation when unassign is not found
Removed SNAPSHOT from dependency
Fixed failing BBInputSetup tests
Updated apih tests to use networkInstanceGroup
Updated ModelType enum and fixed compilation issues
Change the place where the data for multistage gets set
Update treatment of PENDING_ACTIVATION VF_MODULE CREATE entries to
SILENT_SUCCESS to support first stage of multistage.
Implement second stage of multistage design VF Module Creation
Implementation of the first stage of multistage design for VF Module
creation.

Change-Id: I6d76282d1f37c081355cee72797d8e13da4e3cb0
Issue-ID: SO-1149
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Signed-off-by: Rob Daugherty <rd472p@att.com>
20 files changed:
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/BuildingBlockExecution.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/DelegateExecutionImpl.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetails_CreateVnf.json
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeRollback.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidatorTest.java
common/src/main/java/org/onap/so/serviceinstancebeans/ModelType.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidation.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkInstanceGroup.json [moved from mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json with 96% similarity]
mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfwithNeteworkInstanceGroup.json [new file with mode: 0644]
mso-catalog-db/src/test/resources/data.sql

index a2f6637..1ffd9dd 100644 (file)
@@ -34,4 +34,5 @@ public interface BuildingBlockExecution {
        public <T> T getRequiredVariable(String key) throws RequiredExecutionVariableExeception;
        public void setVariable(String key, Serializable value);
        public Map<ResourceKey, String> getLookupMap();
+       public String getFlowToBeCalled();
 }
index ef564c6..1c1d6b7 100644 (file)
@@ -97,6 +97,10 @@ public class DelegateExecutionImpl implements BuildingBlockExecution, Serializab
                return this.get("lookupKeyMap");
        }
        
+       @Override
+       public String getFlowToBeCalled() {
+               return this.get("flowToBeCalled");
+       }
        public DelegateExecution getDelegateExecution() {
                return this.execution;
        }
index 769d3e4..8cc25a2 100644 (file)
@@ -571,7 +571,7 @@ public class BBInputSetup implements JavaDelegate {
                if (relatedInstanceList != null) {
                        for (RelatedInstanceList relatedInstList : relatedInstanceList) {
                                RelatedInstance relatedInstance = relatedInstList.getRelatedInstance();
-                               if (relatedInstance.getModelInfo().getModelType().equals(ModelType.networkCollection)) {
+                               if (relatedInstance.getModelInfo().getModelType().equals(ModelType.networkInstanceGroup)) {
                                        instanceGroupModelInfo = relatedInstance.getModelInfo();
                                        instanceGroupId = relatedInstance.getInstanceId();
                                }
index 8332ddc..a6072bb 100644 (file)
@@ -45,7 +45,7 @@
                        "relatedInstance": {
                                "instanceId": "{instanceGroupId}",
                                "modelInfo": {
-                                       "modelType": "networkCollection",
+                                       "modelType": "networkInstanceGroup",
                                        "modelInvariantId": "9ea660dc-155f-44d3-b45c-cc7648b4f31c",
                                        "modelVersionId": "bb07aad1-ce2d-40c1-85cb-5392f76bb1ef",
                                        "modelName": "{network collection model name}",
index 92b03a7..3ab34c4 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
   <bpmn:process id="AssignVfModuleBB" name="AssignVfModuleBB" isExecutable="true">
     <bpmn:startEvent id="AssignVfModuleBB_Start">
       <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
@@ -18,7 +18,7 @@
       <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming>
     </bpmn:endEvent>
     <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="UpdateVfModuleStatus" targetRef="AssignVfModuleBB_End" />
-    <bpmn:serviceTask id="UpdateVfModuleStatus" name="&#10;AAI&#10;Update&#10;(vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+    <bpmn:serviceTask id="UpdateVfModuleStatus" name="&#10;AAI&#10;Update&#10;(vf module)&#10;" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedOrPendingActivationVfModule(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
       <bpmn:incoming>SequenceFlow_15hn8si</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing>
     </bpmn:serviceTask>
index 7ddfdec..83f2fe0 100644 (file)
@@ -395,13 +395,9 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
 
                AaiUtil aaiUtil = new AaiUtil(this)
 
-               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).queryParam("resource-version", resourceVersion)
+               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).resourceVersion(resourceVersion)
                def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
 
-               if(resourceVersion !=null){
-                       deleteAAIVolumeGrpIdRequest = deleteAAIVolumeGrpIdRequest +'?resource-version=' + UriUtils.encode(resourceVersion, 'UTF-8')
-               }
-
                msoLogger.debug("Delete AAI volume group : " + deleteAAIVolumeGrpIdRequest)
 
                APIResponse response = aaiUtil.executeAAIDeleteCall(execution, deleteAAIVolumeGrpIdRequest)
index 6783808..58b90a1 100644 (file)
@@ -720,7 +720,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        def vfModuleName = execution.getVariable('DCVFM_vfModuleName')
 
                        AaiUtil aaiUriUtil = new AaiUtil(this)
-                       AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULES, vnfId).queryParam("vf-module-name",vfModuleName)
+                       AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, vnfId).queryParam("vf-module-name",vfModuleName)
                        String endPoint = aaiUriUtil.createAaiUri(uri)
 
                        try {
index 3b0707a..8968c75 100644 (file)
@@ -193,7 +193,7 @@ public class DoCreateVfModuleVolumeRollback extends AbstractServiceTaskProcessor
 
                AaiUtil aaiUtil = new AaiUtil(this)
 
-               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId).queryParam("resource-version", resourceVersion)
+               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, volumeGroupId).resourceVersion(resourceVersion)
                def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
 
                msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
index 03e47cf..73fd78f 100644 (file)
@@ -271,7 +271,7 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
 
                AaiUtil aaiUtil = new AaiUtil(this)
 
-               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).queryParam("resource-version", resourceVersion)
+               AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, Defaults.CLOUD_OWNER.toString(), cloudRegion, groupId).resourceVersion(resourceVersion)
                def deleteAAIVolumeGrpIdRequest = aaiUtil.createAaiUri(uri)
 
                msoLogger.debug('Delete AAI volume group : ' + deleteAAIVolumeGrpIdRequest)
@@ -282,8 +282,6 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
                String returnCode = response.getStatusCode()
                String aaiResponseAsString = response.getResponseBodyAsString()
 
-               msoLogger.debug("AAI delete volume group return code: " + returnCode)
-               msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
                msoLogger.debug("AAI delete volume group return code: " + returnCode)
                msoLogger.debug("AAI delete volume group response: " + aaiResponseAsString)
 
index c84e269..87c04d7 100644 (file)
@@ -54,6 +54,8 @@ import org.springframework.stereotype.Component;
 @Component
 public class AAIUpdateTasks {
        private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIUpdateTasks.class);
+       private static final String MULTI_STAGE_DESIGN_OFF = "false";
+       private static final String MULTI_STAGE_DESIGN_ON = "true";
        @Autowired
        private AAIServiceInstanceResources aaiServiceInstanceResources;
        @Autowired
@@ -185,6 +187,26 @@ public class AAIUpdateTasks {
                }
        }
        
+       public void updateOrchestrationStatusAssignedOrPendingActivationVfModule(BuildingBlockExecution execution) {
+               try {
+                       VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID));
+                       vfModule.setHeatStackId("");
+                       GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+                       String multiStageDesign = MULTI_STAGE_DESIGN_OFF;
+                       if (vnf.getModelInfoGenericVnf() != null) {
+                               multiStageDesign = vnf.getModelInfoGenericVnf().getMultiStageDesign();
+                       }
+                       if (multiStageDesign != null && multiStageDesign.equalsIgnoreCase(MULTI_STAGE_DESIGN_ON)) {
+                               aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule,vnf,OrchestrationStatus.PENDING_ACTIVATION);
+                       }
+                       else {
+                               aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule,vnf,OrchestrationStatus.ASSIGNED);
+                       }
+               } catch (Exception ex) {                        
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+               }
+       }
+       
        public void updateOrchestrationStatusCreatedVfModule(BuildingBlockExecution execution) {                
                try {
                        VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID));
index 55ebad6..88ae374 100644 (file)
@@ -23,12 +23,15 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.exception.BBObjectNotFoundException;
 import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.client.exception.OrchestrationStatusValidationException;
 import org.onap.so.db.catalog.beans.BuildingBlockDetail;
+import org.onap.so.db.catalog.beans.OrchestrationAction;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective;
 import org.onap.so.db.catalog.beans.OrchestrationStatusValidationDirective;
+import org.onap.so.db.catalog.beans.ResourceType;
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.logger.MsoLogger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,6 +45,8 @@ public class OrchestrationStatusValidator {
        private static final String UNKNOWN_RESOURCE_TYPE = "Building Block (%s) not set up correctly in Orchestration_Status_Validation table in CatalogDB. ResourceType=(%s), TargetAction=(%s)";
        private static final String ORCHESTRATION_VALIDATION_FAIL = "Orchestration Status Validation failed. ResourceType=(%s), TargetAction=(%s), OrchestrationStatus=(%s)";
        private static final String ORCHESTRATION_STATUS_VALIDATION_RESULT = "orchestrationStatusValidationResult";
+       private static final String MULTI_STAGE_DESIGN_OFF = "false";
+       private static final String MULTI_STAGE_DESIGN_ON = "true";
        
        
        @Autowired
@@ -53,9 +58,11 @@ public class OrchestrationStatusValidator {
        
        public void validateOrchestrationStatus(BuildingBlockExecution execution) {
                try {
+                       OrchestrationStatusValidationDirective previousOrchestrationStatusValidationResult = execution.getVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT);
+                       
                        execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, null);
                        
-                       String buildingBlockFlowName = (String) execution.getVariable("flowToBeCalled");
+                       String buildingBlockFlowName = execution.getFlowToBeCalled();
                        
                        BuildingBlockDetail buildingBlockDetail = catalogDbClient.getBuildingBlockDetail(buildingBlockFlowName);
                        
@@ -105,13 +112,40 @@ public class OrchestrationStatusValidator {
                        }
                        OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = catalogDbClient.getOrchestrationStatusStateTransitionDirective(buildingBlockDetail.getResourceType(), orchestrationStatus, buildingBlockDetail.getTargetAction());
                        
+                       if(ResourceType.VF_MODULE.equals(buildingBlockDetail.getResourceType()) && OrchestrationAction.CREATE.equals(buildingBlockDetail.getTargetAction()) &&
+                                       OrchestrationStatus.PENDING_ACTIVATION.equals(orchestrationStatus)) {                           
+                               org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+                               orchestrationStatusStateTransitionDirective = processPossibleSecondStageofVfModuleCreate(execution, previousOrchestrationStatusValidationResult,
+                                               genericVnf, orchestrationStatusStateTransitionDirective);       
+                       }
+                       
                        if (orchestrationStatusStateTransitionDirective.getFlowDirective() == OrchestrationStatusValidationDirective.FAIL) {
                                throw new OrchestrationStatusValidationException(String.format(ORCHESTRATION_VALIDATION_FAIL, buildingBlockDetail.getResourceType(), buildingBlockDetail.getTargetAction(), orchestrationStatus));
                        }
                        
                        execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, orchestrationStatusStateTransitionDirective.getFlowDirective());
-               } catch (Exception e) {
+               }catch(BBObjectNotFoundException ex){
+                       if(execution.getFlowToBeCalled().contains("Unassign")){
+                               execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+                       }else{
+                               exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, ex);
+                       }
+               }catch (Exception e) {
                        exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, e);
                }
        }
+       
+       private OrchestrationStatusStateTransitionDirective processPossibleSecondStageofVfModuleCreate(BuildingBlockExecution execution, OrchestrationStatusValidationDirective previousOrchestrationStatusValidationResult,
+                       org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf genericVnf, OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective) {               
+               if (previousOrchestrationStatusValidationResult != null && previousOrchestrationStatusValidationResult.equals(OrchestrationStatusValidationDirective.SILENT_SUCCESS)) {                 
+                       String multiStageDesign = "false";                      
+                       if (genericVnf.getModelInfoGenericVnf() != null) {
+                               multiStageDesign = genericVnf.getModelInfoGenericVnf().getMultiStageDesign();
+                       }
+                       if (multiStageDesign != null && multiStageDesign.equalsIgnoreCase("true")) {                            
+                               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.CONTINUE);                                          
+                       }                                       
+               }
+               return orchestrationStatusStateTransitionDirective;
+       }
 }
index 5595894..560f2a9 100644 (file)
@@ -49,6 +49,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
+import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -166,6 +167,37 @@ public class AAIUpdateTasksTest extends BaseTaskTest{
                aaiUpdateTasks.updateOrchestrationStatusAssignedVfModule(execution);
        }
        
+       @Test
+       public void updateOrchestrationStatusAssignedOrPendingActivationVfModuleNoMultiStageTest() throws Exception {
+               ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("false");
+               genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+               doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.ASSIGNED);
+               aaiUpdateTasks.updateOrchestrationStatusAssignedOrPendingActivationVfModule(execution);
+               verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.ASSIGNED);
+               assertEquals("", vfModule.getHeatStackId());
+       }
+       
+       @Test
+       public void updateOrchestrationStatusAssignedOrPendingActivationVfModuleWithMultiStageTest() throws Exception {
+               ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("true");
+               genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf);
+               doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.PENDING_ACTIVATION);
+               aaiUpdateTasks.updateOrchestrationStatusAssignedOrPendingActivationVfModule(execution);
+               verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.PENDING_ACTIVATION);
+               assertEquals("", vfModule.getHeatStackId());
+       }
+       
+       @Test
+       public void updateOrchestrationStatusAssignedOrPendingActivationVfModuleExceptionTest() throws Exception {
+               doThrow(Exception.class).when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.ASSIGNED);
+               
+               expectedException.expect(BpmnError.class);
+               
+               aaiUpdateTasks.updateOrchestrationStatusAssignedOrPendingActivationVfModule(execution);
+       }
+       
        @Test
        public void updateOrchestrationStatusCreatedVfModuleTest() throws Exception {           
                doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.CREATED);
index b0b07d8..fa5081d 100644 (file)
@@ -24,14 +24,17 @@ import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.doReturn;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.camunda.bpm.engine.delegate.BpmnError;
 import org.junit.Test;
 import org.onap.so.bpmn.BaseTaskTest;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
 import org.onap.so.db.catalog.beans.BuildingBlockDetail;
 import org.onap.so.db.catalog.beans.OrchestrationAction;
 import org.onap.so.db.catalog.beans.OrchestrationStatus;
@@ -179,4 +182,206 @@ public class OrchestrationStatusValidatorTest extends BaseTaskTest {
                
                orchestrationStatusValidator.validateOrchestrationStatus(execution);
        }
+       
+       @Test
+       public void test_validateOrchestrationStatus_unassignNotFound() throws Exception{
+               String flowToBeCalled = "UnassignServiceInstanceBB";
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("UnassignServiceInstanceBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.SERVICE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.UNASSIGN);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               lookupKeyMap = new HashMap<ResourceKey, String>();
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.SILENT_SUCCESS,execution.getVariable("orchestrationStatusValidationResult"));
+       }
+       
+       @Test
+       public void test_validateOrchestrationStatusSecondStageOfMultiStageEnabledVfModule() throws Exception {
+               String flowToBeCalled = "CreateVfModuleBB";
+                               
+               execution.setVariable("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               GenericVnf genericVnf = buildGenericVnf();
+               ModelInfoGenericVnf modelInfoGenericVnf = genericVnf.getModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("true");
+               setGenericVnf().setModelInfoGenericVnf(modelInfoGenericVnf);
+               setVfModule().setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("CreateVfModuleBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.VF_MODULE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = new OrchestrationStatusStateTransitionDirective();
+               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.FAIL);
+               orchestrationStatusStateTransitionDirective.setId(1);
+               orchestrationStatusStateTransitionDirective.setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               orchestrationStatusStateTransitionDirective.setResourceType(ResourceType.VF_MODULE);
+               orchestrationStatusStateTransitionDirective.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(orchestrationStatusStateTransitionDirective).when(catalogDbClient).getOrchestrationStatusStateTransitionDirective(ResourceType.VF_MODULE, OrchestrationStatus.PENDING_ACTIVATION, OrchestrationAction.CREATE);
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.CONTINUE, execution.getVariable("orchestrationStatusValidationResult"));
+       }
+       
+
+       @Test
+       public void test_validateOrchestrationStatusSecondStageOfMultiStageWrongPrevStatusVfModule() throws Exception {
+               String flowToBeCalled = "CreateVfModuleBB";
+               
+               execution.setVariable("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.CONTINUE);
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               GenericVnf genericVnf = buildGenericVnf();
+               ModelInfoGenericVnf modelInfoGenericVnf = genericVnf.getModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("true");
+               setGenericVnf().setModelInfoGenericVnf(modelInfoGenericVnf);
+               setVfModule().setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("CreateVfModuleBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.VF_MODULE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = new OrchestrationStatusStateTransitionDirective();
+               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               orchestrationStatusStateTransitionDirective.setId(1);
+               orchestrationStatusStateTransitionDirective.setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               orchestrationStatusStateTransitionDirective.setResourceType(ResourceType.VF_MODULE);
+               orchestrationStatusStateTransitionDirective.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(orchestrationStatusStateTransitionDirective).when(catalogDbClient).getOrchestrationStatusStateTransitionDirective(ResourceType.VF_MODULE, OrchestrationStatus.PENDING_ACTIVATION, OrchestrationAction.CREATE);
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.SILENT_SUCCESS, execution.getVariable("orchestrationStatusValidationResult"));
+       }
+       
+       @Test
+       public void test_validateOrchestrationStatusSecondStageOfMultiStageDisabledVfModule() throws Exception {
+               String flowToBeCalled = "CreateVfModuleBB";             
+               
+               execution.setVariable("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               GenericVnf genericVnf = buildGenericVnf();
+               ModelInfoGenericVnf modelInfoGenericVnf = genericVnf.getModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("false");
+               setGenericVnf().setModelInfoGenericVnf(modelInfoGenericVnf);
+               setVfModule().setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("CreateVfModuleBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.VF_MODULE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = new OrchestrationStatusStateTransitionDirective();
+               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               orchestrationStatusStateTransitionDirective.setId(1);
+               orchestrationStatusStateTransitionDirective.setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               orchestrationStatusStateTransitionDirective.setResourceType(ResourceType.VF_MODULE);
+               orchestrationStatusStateTransitionDirective.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(orchestrationStatusStateTransitionDirective).when(catalogDbClient).getOrchestrationStatusStateTransitionDirective(ResourceType.VF_MODULE, OrchestrationStatus.PENDING_ACTIVATION, OrchestrationAction.CREATE);
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.SILENT_SUCCESS, execution.getVariable("orchestrationStatusValidationResult"));
+       }
+       
+       @Test
+       public void test_validateOrchestrationStatusSecondStageOfMultiStageWrongOrchStatusVfModule() throws Exception {
+               String flowToBeCalled = "CreateVfModuleBB";
+                               
+               execution.setVariable("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               GenericVnf genericVnf = buildGenericVnf();
+               ModelInfoGenericVnf modelInfoGenericVnf = genericVnf.getModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("true");
+               setGenericVnf().setModelInfoGenericVnf(modelInfoGenericVnf);
+               setVfModule().setOrchestrationStatus(OrchestrationStatus.ASSIGNED);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("CreateVfModuleBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.VF_MODULE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = new OrchestrationStatusStateTransitionDirective();
+               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               orchestrationStatusStateTransitionDirective.setId(1);
+               orchestrationStatusStateTransitionDirective.setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               orchestrationStatusStateTransitionDirective.setResourceType(ResourceType.VF_MODULE);
+               orchestrationStatusStateTransitionDirective.setTargetAction(OrchestrationAction.CREATE);
+               
+               doReturn(orchestrationStatusStateTransitionDirective).when(catalogDbClient).getOrchestrationStatusStateTransitionDirective(ResourceType.VF_MODULE, OrchestrationStatus.ASSIGNED, OrchestrationAction.CREATE);
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.SILENT_SUCCESS, execution.getVariable("orchestrationStatusValidationResult"));
+       }
+       
+       @Test
+       public void test_validateOrchestrationStatusSecondStageOfMultiStageWrongTargetActionVfModule() throws Exception {
+               String flowToBeCalled = "CreateVfModuleBB";
+                               
+               execution.setVariable("orchestrationStatusValidationResult", OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               
+               execution.setVariable("flowToBeCalled", flowToBeCalled);
+               
+               GenericVnf genericVnf = buildGenericVnf();
+               ModelInfoGenericVnf modelInfoGenericVnf = genericVnf.getModelInfoGenericVnf();
+               modelInfoGenericVnf.setMultiStageDesign("true");
+               setGenericVnf().setModelInfoGenericVnf(modelInfoGenericVnf);
+               setVfModule().setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               
+               BuildingBlockDetail buildingBlockDetail = new BuildingBlockDetail();
+               buildingBlockDetail.setBuildingBlockName("CreateVfModuleBB");
+               buildingBlockDetail.setId(1);
+               buildingBlockDetail.setResourceType(ResourceType.VF_MODULE);
+               buildingBlockDetail.setTargetAction(OrchestrationAction.ACTIVATE);
+               
+               doReturn(buildingBlockDetail).when(catalogDbClient).getBuildingBlockDetail(flowToBeCalled);
+               
+               OrchestrationStatusStateTransitionDirective orchestrationStatusStateTransitionDirective = new OrchestrationStatusStateTransitionDirective();
+               orchestrationStatusStateTransitionDirective.setFlowDirective(OrchestrationStatusValidationDirective.SILENT_SUCCESS);
+               orchestrationStatusStateTransitionDirective.setId(1);
+               orchestrationStatusStateTransitionDirective.setOrchestrationStatus(OrchestrationStatus.PENDING_ACTIVATION);
+               orchestrationStatusStateTransitionDirective.setResourceType(ResourceType.VF_MODULE);
+               orchestrationStatusStateTransitionDirective.setTargetAction(OrchestrationAction.ACTIVATE);
+               
+               doReturn(orchestrationStatusStateTransitionDirective).when(catalogDbClient).getOrchestrationStatusStateTransitionDirective(ResourceType.VF_MODULE, OrchestrationStatus.PENDING_ACTIVATION, OrchestrationAction.ACTIVATE);
+               
+               orchestrationStatusValidator.validateOrchestrationStatus(execution);
+               
+               assertEquals(OrchestrationStatusValidationDirective.SILENT_SUCCESS, execution.getVariable("orchestrationStatusValidationResult"));
+       }
 }
index 2ddad20..1e5124b 100644 (file)
@@ -32,5 +32,5 @@ public enum ModelType {
        configuration,
        connectionPoint,
        pnf,
-       networkCollection
+       networkInstanceGroup
 }
index 1f4fbc9..f22294b 100644 (file)
@@ -106,7 +106,7 @@ public class RelatedInstancesValidation implements ValidationRule{
                                if(!(   relatedInstanceModelInfo.getModelType().equals(ModelType.volumeGroup) || 
                                                relatedInstanceModelInfo.getModelType().equals(ModelType.connectionPoint) ||
                                                relatedInstanceModelInfo.getModelType().equals(ModelType.pnf) ||
-                                               relatedInstanceModelInfo.getModelType().equals(ModelType.networkCollection))) {
+                                               relatedInstanceModelInfo.getModelType().equals(ModelType.networkInstanceGroup))) {
 
                                        if(empty (relatedInstanceModelInfo.getModelInvariantId ())) {
                                                throw new ValidationException ("modelInvariantId in relatedInstance");
index dfcf9ff..01b5b38 100644 (file)
@@ -2392,4 +2392,43 @@ public class ServiceInstancesTest extends BaseTest{
         RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
         assertEquals("Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException: 500 Server Error", realResponse.getServiceException().getText());
     }
+    @Test
+    public void vnfUpdateWithNetworkInstanceGroup() throws IOException{
+       stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        stubFor(get(urlMatching(".*/vnfResourceCustomization/2ccae1b4-7d9e-46fa-a452-9180ce008d17"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("vnfResourceCustomization_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+        stubFor(get(urlMatching(".*/vnfResourceCustomization/68dc9a92-214c-11e7-93ae-92361f002674/vnfResources"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("vnfResources_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+        
+        stubFor(get(urlMatching(".*/vnfRecipe/search/findFirstVnfRecipeByNfRoleAndAction" +
+                "[?]nfRole=GR-API-DEFAULT&action=updateInstance"))
+                .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                        .withBody(getWiremockResponseForCatalogdb("UpdateVnfRecipe_Response.json"))
+                        .withStatus(org.apache.http.HttpStatus.SC_OK)));
+        HttpHeaders headers = new HttpHeaders();
+        headers.set(MsoLogger.CLIENT_ID, "VID");
+        //expect
+        ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+        RequestReferences requestReferences = new RequestReferences();
+        requestReferences.setInstanceId("1882939");
+        expectedResponse.setRequestReferences(requestReferences);
+        uri = servInstanceuri + "v7/serviceInstances/e05864f0-ab35-47d0-8be4-56fd9619ba3c/vnfs/f501ce76-a9bc-4601-9837-74fd9f4d5eca";
+        ResponseEntity<String> response = sendRequest(inputStream("/VnfwithNeteworkInstanceGroup.json"), uri, HttpMethod.PUT, headers);
+
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+        //then         
+        assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+        ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+        assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));        
+    }
 }
index 93542c0..02fd7a1 100644 (file)
@@ -38,8 +38,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 public class RelatedInstancesValidationTest extends BaseTest{
 
        @Test
-       public void testCreateVnfNetworkCollection() throws IOException, ValidationException {
-               String requestJson = new String(Files.readAllBytes(Paths.get("src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json")));
+       public void testCreateVnfNetworkInstanceGroup() throws IOException, ValidationException {
+               String requestJson = new String(Files.readAllBytes(Paths.get("src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkInstanceGroup.json")));
                ObjectMapper mapper = new ObjectMapper();
                ServiceInstancesRequest sir  = mapper.readValue(requestJson, ServiceInstancesRequest.class);
                ValidationInformation info = new ValidationInformation(sir, new HashMap<String, String>(), Action.createInstance, 
@@ -42,7 +42,7 @@
             "relatedInstance": {
                "instanceId": "0fd90c0c-0e3a-46e2-abb5-4c4820d5985b",
                "modelInfo": {   
-                  "modelType": "networkCollection"
+                  "modelType": "networkInstanceGroup"
                }
             }
          }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfwithNeteworkInstanceGroup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfwithNeteworkInstanceGroup.json
new file mode 100644 (file)
index 0000000..fb6b9c2
--- /dev/null
@@ -0,0 +1,57 @@
+{
+   "requestDetails":{
+      "requestInfo":{
+         "productFamilyId":"e433710f-9217-458d-a79d-1c7aff376d87",
+         "source":"VID",
+         "suppressRollback":false,
+         "requestorId":"xxxxxx"
+      },
+      "lineOfBusiness":{
+         "lineOfBusinessName":"line_of_business"
+      },
+      "cloudConfiguration":{
+         "lcpCloudRegionId":"DYH1A",
+         "tenantId":"7f3db563322146a688601ade1294a747"
+      },
+      "platform":{
+
+      },
+      "modelInfo":{
+         "modelCustomizationId":"2ccae1b4-7d9e-46fa-a452-9180ce008d17",
+         "modelCustomizationName":"test_name",
+         "modelVersionId":"0f161f68-9cd8-41f3-872d-41e58d83d318",
+         "modelName":"modelName",
+         "modelInvariantId":"f501ce76-a9bc-4601-9837-74fd9f4d5ecb",
+         "modelType":"vnf",
+         "modelVersion":"7.0"
+      },
+      "requestParameters":{
+         "userParams":[
+
+         ],
+         "testApi":"GR_API"
+      },
+      "relatedInstanceList":[
+         {
+            "relatedInstance":{
+               "instanceId":"e05864f0-ab35-47d0-8be4-56fd9619ba3c",
+               "modelInfo":{
+                  "modelVersionId":"ecd348d8-41f6-447a-93a6-4300db495688",
+                  "modelName":"Subinterface_SVC_ym161d",
+                  "modelInvariantId":"4c1147bd-de97-43d5-b05e-5faa9aba220d",
+                  "modelType":"service",
+                  "modelVersion":"5.0"
+               }
+            }
+         },
+         {
+            "relatedInstance":{
+               "instanceId":"1b53f649-8969-443f-8ca4-d70f2ec6de0b",
+               "modelInfo":{
+                  "modelType":"networkInstanceGroup"
+               }
+            }
+         }
+      ]
+   }
+}
\ No newline at end of file
index 3f3aabb..3451011 100644 (file)
@@ -512,7 +512,7 @@ VALUES
 ('SERVICE', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), 
 ('VNF', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), 
 ('VOLUME_GROUP', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), 
-('VF_MODULE', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), 
+('VF_MODULE', 'PENDING_ACTIVATION', 'ACTIVATE', 'SILENT_SUCCESS'), 
 ('NETWORK', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), 
 ('SERVICE', 'PENDING', 'ACTIVATE', 'FAIL'), 
 ('VNF', 'PENDING', 'ACTIVATE', 'FAIL'), 
@@ -613,7 +613,7 @@ VALUES
 ('VF_MODULE', 'PENDING_DELETE', 'CREATE', 'CONTINUE'), 
 ('NETWORK', 'PENDING_DELETE', 'CREATE', 'CONTINUE'), 
 ('VOLUME_GROUP', 'PENDING_ACTIVATION', 'CREATE', 'FAIL'), 
-('VF_MODULE', 'PENDING_ACTIVATION', 'CREATE', 'FAIL'), 
+('VF_MODULE', 'PENDING_ACTIVATION', 'CREATE', 'SILENT_SUCCESS'), 
 ('NETWORK', 'PENDING_ACTIVATION', 'CREATE', 'FAIL'), 
 ('VOLUME_GROUP', 'PENDING', 'CREATE', 'CONTINUE'), 
 ('VF_MODULE', 'PENDING', 'CREATE', 'FAIL'),