diff options
30 files changed, 1068 insertions, 803 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java index 359c8cd46e..e276faf5d0 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java @@ -27,6 +27,7 @@ import javax.ws.rs.ApplicationPath; import org.glassfish.jersey.server.ResourceConfig; import org.onap.logging.filter.base.Constants; import org.onap.logging.filter.base.ONAPComponents; +import org.onap.so.adapters.catalogdb.rest.BuildingBlockRollbackRestImpl; import org.onap.so.adapters.catalogdb.rest.CatalogDbAdapterRest; import org.onap.so.adapters.catalogdb.rest.ServiceRestImpl; import org.onap.so.adapters.catalogdb.rest.VnfRestImpl; @@ -53,6 +54,7 @@ public class JerseyConfiguration extends ResourceConfig { register(AcceptHeaderOpenApiResource.class); register(ServiceRestImpl.class); register(VnfRestImpl.class); + register(BuildingBlockRollbackRestImpl.class); OpenAPI oas = new OpenAPI(); Info info = new Info(); diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/BuildingBlockRollbackRestImpl.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/BuildingBlockRollbackRestImpl.java new file mode 100644 index 0000000000..bd247e1a4f --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/BuildingBlockRollbackRestImpl.java @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Bell Canada + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.so.adapters.catalogdb.rest; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import java.util.List; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import org.onap.so.db.catalog.beans.BuildingBlockRollback; +import org.onap.so.db.catalog.data.repository.BuildingBlockRollbackRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +@OpenAPIDefinition(info = @Info(title = "/v1", description = "model")) +@Path("/v1/buildingBlockRollback") +@Component +public class BuildingBlockRollbackRestImpl { + + @Autowired + private BuildingBlockRollbackRepository bbRollbackRepo; + + @GET + @Path("/{id}") + @Produces({MediaType.APPLICATION_JSON}) + @Transactional(readOnly = true) + public BuildingBlockRollback findService(@PathParam("id") Integer id) { + return bbRollbackRepo.findOneById(id); + } + + @GET + @Operation(description = "Look up BuildingBlock Rollback List", responses = @ApiResponse( + content = @Content(array = @ArraySchema(schema = @Schema(implementation = BuildingBlockRollback.class))))) + @Produces({MediaType.APPLICATION_JSON}) + @Transactional(readOnly = true) + public List<BuildingBlockRollback> getBBRollbackList() { + return bbRollbackRepo.findAll(); + } +} diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql index de16fe36ce..3b95ffef0a 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql @@ -11,317 +11,316 @@ INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, I ('Service-Create', 'createInstance', 'Service', true,true, '7','7', 'DEFAULT', '*'), ('Service-Delete', 'deleteInstance', 'Service', true,true, '7','7', 'DEFAULT', '*'), ('Service-Macro-Assign', 'assignInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), -('Service-Macro-Activate', 'activateInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), +('Service-Macro-Activate', 'activateInstance', 'Service', false,true, '5','7', 'DEFAULT', '*'), +('Service-Macro-Deactivate', 'deactivateInstance', 'Service', false,true, '5', '7', 'DEFAULT', '*'), ('Service-Macro-Unassign', 'unassignInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), ('Service-Macro-Create', 'createInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), ('Service-Macro-Delete', 'deleteInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), ('Service-Macro-Upgrade', 'upgradeInstance', 'Service', false,true, '7','7', 'DEFAULT', '*'), ('Network-Create', 'createInstance', 'Network', true,true, '7','7', 'DEFAULT', '*'), ('Network-Delete', 'deleteInstance', 'Network', true,true, '7','7', 'DEFAULT', '*'), +('Network-Update', 'updateInstance', 'Network', true,true, '7','7', 'DEFAULT', '*'), ('VNF-Macro-Create', 'createInstance', 'Vnf', false,true, '7','7', 'DEFAULT', '*'), ('VNF-Macro-Recreate', 'recreateInstance', 'Vnf', false,true, '7','7', 'DEFAULT', '*'), ('VNF-Macro-Replace', 'replaceInstance', 'Vnf', false,true, '7','7', 'DEFAULT', '*'), ('VNF-Create', 'createInstance', 'Vnf', true,true, '7', '7', 'DEFAULT', '*'), ('VNF-Delete', 'deleteInstance', 'Vnf', true,true, '7', '7', 'DEFAULT', '*'), ('VNF-Macro-Delete', 'deleteInstance', 'Vnf', false,true, '7', '7', 'DEFAULT', '*'), +('VNF-Macro-Modify', 'updateInstance', 'Vnf', false,true, '7', '7','k8scloudowner4', '*'), +('VNF-Macro-HealthCheck', 'healthCheck', 'Vnf', false,true, '7', '7','DEFAULT', '*'), ('VolumeGroup-Create', 'createInstance', 'VolumeGroup', true,true, '7','7', 'DEFAULT', '*'), ('VolumeGroup-Delete', 'deleteInstance', 'VolumeGroup', true,true, '7','7', 'DEFAULT', '*'), ('VFModule-Create', 'createInstance', 'VfModule', true,true, '7','7', 'DEFAULT', '*'), ('VFModule-Delete', 'deleteInstance', 'VfModule', true,true, '7','7', 'DEFAULT', '*'), ('VFModule-Replace', 'replaceInstance', 'VfModule', true,true, '7','7', 'DEFAULT', '*'), ('VFModule-Replace-Retain-Assignments', 'replaceInstanceRetainAssignments', 'VfModule', true,true, '7','7', 'DEFAULT', '*'), +('VFModule-DeactivateAndCloudDelete', 'deactivateAndCloudDelete', 'VfModule', true,true, '7','7', 'DEFAULT', '*'), ('NetworkCollection-Macro-Create', 'createInstance', 'NetworkCollection', false,true, '7','7', 'DEFAULT', '*'), ('NetworkCollection-Macro-Delete', 'deleteInstance', 'NetworkCollection', false,true, '7','7', 'DEFAULT', '*'), ('VFModule-ScaleOut', 'scaleOut', 'VfModule', true, true, '7','7', 'DEFAULT', '*'), ('VNF-InPlaceUpdate', 'inPlaceSoftwareUpdate', 'Vnf', true, true, '7','7', 'DEFAULT', '*'), ('VNF-Config-Update', 'applyUpdatedConfig', 'Vnf', true, true, '7','7', 'DEFAULT', '*'); --- --- northbound_request_ref_lookup for updateInstance (Macro Flow) --- -INSERT INTO northbound_request_ref_lookup(REQUEST_SCOPE, MACRO_ACTION, ACTION, IS_ALACARTE, MIN_API_VERSION, MAX_API_VERSION, IS_TOPLEVELFLOW, CLOUD_OWNER, SERVICE_TYPE) -VALUES ('Vnf', 'VNF-Macro-Modify', 'updateInstance', 0, 7, 7, 1, 'k8scloudowner4', '*'); - --- --- northbound_request_ref_lookup for CNF healthCheck (Macro Flow) --- -INSERT INTO northbound_request_ref_lookup(REQUEST_SCOPE, MACRO_ACTION, ACTION, IS_ALACARTE, MIN_API_VERSION, MAX_API_VERSION, IS_TOPLEVELFLOW, CLOUD_OWNER, SERVICE_TYPE) -VALUES ('Vnf', 'VNF-Macro-HealthCheck', 'healthCheck', 0, 7, 7, 1, 'DEFAULT', '*'); - - -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES -('Service-Create', '1', 'AssignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Create', '2', 'ActivateServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Delete', '1', 'DeactivateServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Delete', '2', 'UnassignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '1', 'AssignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '2', 'AssignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '3', 'AssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '4', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '5', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Assign', '6', 'ConfigAssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '1', 'CreateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '2', 'ActivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '3', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '4', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '5', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '6', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '7', 'ConfigDeployVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '8', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Activate', '9', 'ActivateServiceInstance', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Unassign', '1', 'UnassignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Unassign', '2', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Unassign', '3', 'UnassignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Unassign', '4', 'UnassignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Unassign', '5', 'UnassignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '1', 'AssignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '2', 'CreateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '3', 'AssignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '4', 'AssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '5', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '6', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '7', 'ConfigAssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '8', 'AssignPnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '9', 'WaitForPnfReadyBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '12', 'ActivatePnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '13', 'CreateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '14', 'ActivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '15', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '16', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '17', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '18', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '19', 'ConfigDeployVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '20', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '21', 'ActivateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Create', '22', 'ActivateServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '1', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '2', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '3', 'DeactivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '4', 'DeleteVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '5', 'DeactivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '6', 'DeactivatePnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '7', 'DeactivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '8', 'DeleteNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '9', 'DeactivateNetworkCollectionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '10', 'DeleteNetworkCollectionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '11', 'DeactivateServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '12', 'UnassignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '13', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '14', 'UnassignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '15', 'UnassignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Delete', '16', 'UnassignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Service-Macro-Upgrade', '1', 'ChangeModelServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), -('Network-Create', '1', 'AssignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), -('Network-Create', '2', 'CreateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), -('Network-Create', '3', 'ActivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), -('Network-Delete', '1', 'DeactivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Network-Delete', '2', 'DeleteNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), -('Network-Delete', '3', 'UnassignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Create', '1', 'AssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Create', '2', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Delete', '1', 'DeactivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Delete', '2', 'UnassignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '1', 'CreateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '2', 'AssignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '3', 'AssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '4', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '5', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '6', 'ConfigAssignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '7', 'AssignPnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '8', 'WaitForPnfReadyBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '9', 'ActivatePnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '10', 'CreateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '11', 'ActivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '12', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '13', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '14', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '15', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '16', 'ConfigDeployVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '17', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Create', '18', 'ActivateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '1', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '2', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '3', 'DeactivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '4', 'DeleteVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '5', 'DeactivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '6', 'DeactivateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '7', 'DeleteNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '8', 'DeactivateNetworkCollectionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '9', 'DeleteNetworkCollectionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '10', 'UnassignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '11', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '12', 'UnassignVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Delete', '13', 'UnassignNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '1', 'AAICheckVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '2', 'AAISetVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '3', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '4', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '5', 'DeactivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '6', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '7', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '8', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '9', 'SDNOVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Recreate', '10', 'AAIUnsetVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '1', 'AAICheckVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '2', 'AAISetVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '5', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '6', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '7', 'DeactivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '8', 'ChangeModelVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '9', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '10', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '13', 'ChangeModelVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '14', 'ActivateVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '15', 'ChangeModelServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '16', 'SDNOVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Macro-Replace', '17', 'AAIUnsetVnfInMaintBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Create', '1', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Create', '2', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Create', '3', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Delete', '1', 'DeactivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Delete', '2', 'DeleteVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VolumeGroup-Delete', '3', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Create', '1', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Create', '2', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Create', '3', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Delete', '3', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Delete', '4', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Delete', '5', 'UnassignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Create', '1', 'CreateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Create', '2', 'AssignNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Create', '3', 'CreateNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Create', '4', 'ActivateNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Create', '5', 'ActivateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Delete', '1', 'DeactivateNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Delete', '2', 'DeleteNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Delete', '3', 'UnassignNetworkBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Delete', '4', 'DeactivateNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('NetworkCollection-Macro-Delete', '5', 'DeleteNetworkCollectionBB',1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '1', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '2', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '3', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '4', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '5', 'ConfigurationScaleOutBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-ScaleOut', '6', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '1', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '2', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '3', 'DeactivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '4', 'DeleteVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '5', 'UnassignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '6', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '7', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '8', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '9', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '10', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '11', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '12', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '13', 'ChangeModelVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace', '14', 'ChangeModelServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '1', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '2', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '3', 'DeactivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '4', 'DeleteVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '5', 'UnassignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '6', 'AssignVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '7', 'ChangeModelVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '8', 'CreateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '9', 'ActivateVolumeGroupBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '10', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '11', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '12', 'ChangeModelVnfBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-Replace-Retain-Assignments', '13', 'ChangeModelServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '1', 'VNFCheckPserversLockedFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '2', 'VNFCheckInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '3', 'VNFSetInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '4', 'VNFCheckClosedLoopDisabledFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '5', 'VNFSetClosedLoopDisabledFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '6', 'VNFLockActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '7', 'VNFUpgradePreCheckActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '8', 'VNFQuiesceTrafficActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '9', 'VNFStopActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '10', 'VNFSnapShotActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '11', 'VNFStartActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '12', 'VNFUpgradeBackupActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '13', 'VNFUpgradeSoftwareActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '14', 'VNFUpgradePostCheckActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '15', 'VNFResumeTrafficActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '16', 'VNFUnlockActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '17', 'VNFUnsetInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-InPlaceUpdate', '18', 'VNFUnsetClosedLoopDisabledFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '1', 'VNFCheckPserversLockedFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '2', 'VNFCheckInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '3', 'VNFSetInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '4', 'VNFSetClosedLoopDisabledFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '5', 'VNFHealthCheckActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '6', 'VNFConfigModifyActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '7', 'VNFHealthCheckActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '8', 'VNFUnsetInMaintFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), -('VNF-Config-Update', '9', 'VNFUnsetClosedLoopDisabledFlagActivity', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')); - --- --- orchestration_flow_reference for updateInstance (Macro Flow) --- -insert into orchestration_flow_reference (COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, SCOPE, ACTION, NB_REQ_REF_LOOKUP_ID) -values ('VNF-Macro-Modify', 1, 'ControllerExecutionBB', 1, 'vnf', 'config-assign', (SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Modify' and CLOUD_OWNER = 'k8scloudowner4')); -insert into orchestration_flow_reference (COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, SCOPE, ACTION, NB_REQ_REF_LOOKUP_ID) -values ('VNF-Macro-Modify', 2, 'ControllerExecutionBB', 1, 'vnf', 'config-deploy', (SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Modify' and CLOUD_OWNER = 'k8scloudowner4')); - --- --- orchestration_flow_reference for CNF healthCheck (Macro Flow) --- -insert into orchestration_flow_reference (COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, SCOPE, ACTION, NB_REQ_REF_LOOKUP_ID) -values ('VNF-Macro-HealthCheck', 1, 'HealthCheckBB', 1, 'vnf', 'status-check', (SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-HealthCheck' and CLOUD_OWNER = 'DEFAULT')); -insert into orchestration_flow_reference (COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, SCOPE, ACTION, NB_REQ_REF_LOOKUP_ID) -values ('VNF-Macro-HealthCheck', 2, 'HealthCheckBB', 1, 'vnf', 'health-check', (SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-HealthCheck' and CLOUD_OWNER = 'DEFAULT')); - -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID, SCOPE, ACTION) VALUES -('Service-Macro-Create', '10', 'ControllerExecutionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT'), 'pnf', 'config-assign'); - -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID, SCOPE, ACTION) VALUES -('Service-Macro-Create', '11', 'ControllerExecutionBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT'), 'pnf', 'config-deploy'); - -INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY) -VALUES -('ActivateNetworkBB', '*', '*', '*', '*' , 'Rollback'), -('ActivateNetworkCollectionBB', '*', '*', '*', '*' , 'Rollback'), -('ActivateServiceInstanceBB', '*', '*', '*', '*' , 'Rollback'), -('ActivateVfModuleBB', '*', '*', '*', '*' , 'RollbackToAssigned'), -('ActivateVnfBB', '*', '*', '*', '*' , 'Rollback'), -('ActivateVolumeGroupBB', '*', '*', '*', '*' , 'Rollback'), -('AssignNetworkBB', '*', '*', '*', '*' , 'Rollback'), -('AssignServiceInstanceBB', '*', '*', '*', '*' , 'Rollback'), -('AssignVfModuleBB', '*', '*', '*', '*' , 'Rollback'), -('AssignVnfBB', '*', '*', '*', '*' , 'Rollback'), -('AssignVolumeGroupBB', '*', '*', '*', '*' , 'Rollback'), -('CreateNetworkBB', '*', '*', '*', '*' , 'Retry'), -('CreateNetworkCollectionBB', '*', '*', '*', '*' , 'Retry'), -('CreateVfModuleBB', '*', '*', '*', '*' , 'Retry'), -('CreateVolumeGroupBB', '*', '*', '*', '*' , 'Retry'), -('ChangeModelServiceInstanceBB', '*', '*', '*', '*' , 'Abort'), -('ChangeModelVfModuleBB', '*', '*', '*', '*' , 'Abort'), -('ChangeModelVnfBB', '*', '*', '*', '*' , 'Abort'), -('CreateCustomerBB', '*', '*', '*', '*' , 'Abort'), -('DeactivateNetworkBB', '*', '*', '*', '*' , 'Abort'), -('DeactivateServiceInstanceBB', '*', '*', '*', '*' , 'Abort'), -('DeactivateVfModuleBB', '*', '*', '*', '*' , 'Abort'), -('DeactivateVnfBB', '*', '*', '*', '*' , 'Abort'), -('DeactivateVolumeGroupBB', '*', '*', '*', '*' , 'Abort'), -('DeleteNetworkBB', '*', '*', '*', '*' , 'Retry'), -('DeleteNetworkCollectionBB', '*', '*', '*', '*' , 'Retry'), -('DeleteVfModuleBB', '*', '*', '*', '*' , 'Retry'), -('DeleteVolumeGroupBB', '*', '*', '*', '*' , 'Retry'), -('UnassignNetworkBB', '*', '*', '*', '*' , 'Retry'), -('UnassignServiceInstanceBB', '*', '*', '*', '*' , 'Retry'), -('UnassignVfModuleBB', '*', '*', '*', '*' , 'Retry'), -('UnassignVnfBB', '*', '*', '*', '*' , 'Retry'), -('UnassignVolumeGroupBB', '*', '*', '*', '*' , 'Retry'), -('UpdateNetworkBB', '*', '*', '*', '*' , 'Retry'), -('VnfAdapterBB', '*', '*', '*', '*' , 'Retry'), -('AAICheckVnfInMaintBB', '*', '*', '*', '*' , 'Abort'), -('AAISetVnfInMaintBB', '*', '*', '*', '*' , 'Abort'), -('AAIUnsetVnfInMaintBB', '*', '*', '*', '*' , 'Abort'), -('ConfigDeployVnfBB', '*', '*', '*', '*' , 'Retry'); +INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, SCOPE, ACTION, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES +('Service-Create', '1', 'AssignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Create', '2', 'ActivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Delete', '1', 'DeactivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Delete', '2', 'UnassignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '1', 'AssignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '2', 'AssignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '3', 'AssignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '4', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '5', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Assign', '6', 'ControllerExecutionBB', 'vnf', 'config-assign', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Assign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '1', 'CreateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '2', 'ActivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '3', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '4', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '5', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '6', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '7', 'ControllerExecutionBB', 'vnf', 'config-deploy', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '8', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Activate', '9', 'ActivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Activate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Deactivate', '1', 'DeactivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id FROM northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Deactivate' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Unassign', '1', 'UnassignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Unassign', '2', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Unassign', '3', 'UnassignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Unassign', '4', 'UnassignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Unassign', '5', 'UnassignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Unassign' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '1', 'AssignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '2', 'CreateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '3', 'AssignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '4', 'AssignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '5', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '6', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '7', 'ControllerExecutionBB', 'vnf', 'config-assign', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '8', 'AssignPnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '9', 'WaitForPnfReadyBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '10', 'ControllerExecutionBB', 'pnf', 'config-assign', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '11', 'ControllerExecutionBB', 'pnf', 'config-deploy', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '12', 'ActivatePnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '13', 'CreateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '14', 'ActivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '15', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '16', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '17', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '18', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '19', 'ControllerExecutionBB', 'vnf', 'config-deploy', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '20', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '21', 'ActivateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Create', '22', 'ActivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '3', 'DeactivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '4', 'DeleteVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '5', 'DeactivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '6', 'DeactivatePnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '7', 'DeactivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '8', 'DeleteNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '9', 'DeleteNetworkCollectionBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '10', 'DeactivateServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '11', 'UnassignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '12', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '13', 'UnassignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '14', 'UnassignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Delete', '15', 'UnassignServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Service-Macro-Upgrade', '1', 'ChangeModelServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Upgrade' and CLOUD_OWNER = 'DEFAULT')), +('Network-Create', '1', 'AssignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), +('Network-Create', '2', 'CreateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), +('Network-Create', '3', 'ActivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Create' and CLOUD_OWNER = 'DEFAULT')), +('Network-Delete', '1', 'DeactivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Network-Delete', '2', 'DeleteNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Network-Delete', '3', 'UnassignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Delete' and CLOUD_OWNER = 'DEFAULT')), +('Network-Update', '1', 'UpdateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Create', '1', 'AssignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Create', '2', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Delete', '1', 'DeactivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Delete', '2', 'UnassignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '1', 'CreateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '2', 'AssignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '3', 'AssignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '4', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '5', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '6', 'ControllerExecutionBB', 'vnf', 'config-assign', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '7', 'AssignPnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '8', 'WaitForPnfReadyBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '9', 'ActivatePnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '10', 'CreateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '11', 'ActivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '12', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '13', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '14', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '15', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '16', 'ControllerExecutionBB', 'vnf', 'config-deploy', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '17', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Create', '18', 'ActivateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '3', 'DeactivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '4', 'DeleteVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '5', 'DeactivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '6', 'DeactivateNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '7', 'DeleteNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '9', 'DeleteNetworkCollectionBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '10', 'UnassignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '11', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '12', 'UnassignVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Delete', '13', 'UnassignNetworkBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '1', 'AAICheckVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '2', 'AAISetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '3', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '4', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '5', 'DeactivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '6', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '7', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '8', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '9', 'SDNOVnfHealthCheckBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Recreate', '10', 'AAIUnsetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Recreate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '1', 'AAICheckVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '2', 'AAISetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '5', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '6', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '7', 'DeactivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '8', 'ChangeModelVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '9', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '10', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '13', 'ChangeModelVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '14', 'ActivateVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '15', 'ChangeModelServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '16', 'SDNOVnfHealthCheckBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Replace', '17', 'AAIUnsetVnfInMaintBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Create', '1', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Create', '2', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Create', '3', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Create' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Delete', '1', 'DeactivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Delete', '2', 'DeleteVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VolumeGroup-Delete', '3', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VolumeGroup-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Create', '1', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Create', '2', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Create', '3', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Create' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Delete', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Delete', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Delete', '3', 'UnassignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Delete' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Create', '1', 'CreateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Create', '2', 'AssignNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Create', '3', 'CreateNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Create', '4', 'ActivateNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Create', '5', 'ActivateNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Create' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Delete', '1', 'DeactivateNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Delete', '2', 'DeleteNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Delete', '3', 'UnassignNetworkBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('NetworkCollection-Macro-Delete', '4', 'DeleteNetworkCollectionBB', NULL, NULL,1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'NetworkCollection-Macro-Delete' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '1', 'ControllerExecutionBB', 'vnf', 'HealthCheck', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '2', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '3', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '4', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '5', 'ConfigurationScaleOutBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-ScaleOut', '6', 'ControllerExecutionBB', 'vnf', 'HealthCheck', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '3', 'DeactivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '4', 'DeleteVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '5', 'UnassignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '6', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '7', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '8', 'AssignVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '9', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '10', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '11', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '12', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '13', 'ChangeModelVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace', '14', 'ChangeModelServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '3', 'DeactivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '4', 'DeleteVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '5', 'UnassignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '6', 'AssignVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '7', 'ChangeModelVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '8', 'CreateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '9', 'ActivateVolumeGroupBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '10', 'CreateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '11', 'ActivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '12', 'ChangeModelVnfBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-Replace-Retain-Assignments', '13', 'ChangeModelServiceInstanceBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-Replace-Retain-Assignments' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-DeactivateAndCloudDelete', '1', 'DeactivateVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-DeactivateAndCloudDelete' and CLOUD_OWNER = 'DEFAULT')), +('VFModule-DeactivateAndCloudDelete', '2', 'DeleteVfModuleBB', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-DeactivateAndCloudDelete' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '1', 'VNFCheckPserversLockedFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '2', 'VNFCheckInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '3', 'VNFSetInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '4', 'VNFCheckClosedLoopDisabledFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '5', 'VNFSetClosedLoopDisabledFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '6', 'VNFLockActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '7', 'VNFUpgradePreCheckActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '8', 'VNFQuiesceTrafficActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '9', 'VNFStopActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '10', 'VNFSnapShotActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '11', 'VNFStartActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '12', 'VNFUpgradeBackupActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '13', 'VNFUpgradeSoftwareActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '14', 'VNFUpgradePostCheckActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '15', 'VNFResumeTrafficActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '16', 'VNFUnlockActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '17', 'VNFUnsetInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-InPlaceUpdate', '18', 'VNFUnsetClosedLoopDisabledFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-InPlaceUpdate' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '1', 'VNFCheckPserversLockedFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '2', 'VNFCheckInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '3', 'VNFSetInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '4', 'VNFSetClosedLoopDisabledFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '5', 'VNFHealthCheckActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '6', 'VNFConfigModifyActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '7', 'VNFHealthCheckActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '8', 'VNFUnsetInMaintFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Config-Update', '9', 'VNFUnsetClosedLoopDisabledFlagActivity', NULL, NULL, 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Config-Update' and CLOUD_OWNER = 'DEFAULT')), +('VNF-Macro-Modify', '1', 'ControllerExecutionBB', 'vnf', 'config-assign', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Modify' and CLOUD_OWNER = 'k8scloudowner4')), +('VNF-Macro-Modify', '2', 'ControllerExecutionBB', 'vnf', 'config-deploy', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-Modify' and CLOUD_OWNER = 'k8scloudowner4')), +('VNF-Macro-HealthCheck', '1', 'HealthCheckBB', 'vnf', 'status-check', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VNF-Macro-HealthCheck' and CLOUD_OWNER = 'DEFAULT')); + +INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY, SECONDARY_POLICY, REG_EX_ERROR_MESSAGE, SERVICE_ROLE) +VALUES +('ActivateNetworkBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('ActivateNetworkCollectionBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('ActivateServiceInstanceBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('ActivateVfModuleBB', '*', '*', '*', '*' , 'RollbackToAssigned', NULL, '*', '*'), +('ActivateVnfBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('ActivateVolumeGroupBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('AssignNetworkBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('AssignServiceInstanceBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('AssignVfModuleBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('AssignVnfBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('AssignVolumeGroupBB', '*', '*', '*', '*' , 'Rollback', 'Abort', '*', '*'), +('CreateNetworkBB', '*', '*', '*', '*' , 'Retry', 'Rollback', '*', '*'), +('CreateNetworkCollectionBB', '*', '*', '*', '*' , 'Retry', 'Rollback', '*', '*'), +('CreateVfModuleBB', '*', '*', '*', '*' , 'Retry', 'RollbackToAssigned', '*', '*'), +('CreateVolumeGroupBB', '*', '*', '*', '*' , 'Retry', 'Rollback', '*', '*'), +('ChangeModelServiceInstanceBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('ChangeModelVfModuleBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('ChangeModelVnfBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('CreateCustomerBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeactivateNetworkBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeactivateServiceInstanceBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeactivateVfModuleBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeactivateVnfBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeactivateVolumeGroupBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('DeleteNetworkBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('DeleteNetworkCollectionBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('DeleteVfModuleBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('DeleteVolumeGroupBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UnassignNetworkBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UnassignServiceInstanceBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UnassignVfModuleBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UnassignVnfBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UnassignVolumeGroupBB', '*', '*', '*', '*' , 'Retry', 'Abort', '*', '*'), +('UpdateNetworkBB', '*', '*', '*', '*' , 'Retry', 'Rollback', '*', '*'), +('VnfAdapterBB', '*', '*', '*', '*' , 'Retry', 'Rollback', '*', '*'), +('AAICheckVnfInMaintBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('AAISetVnfInMaintBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('AAIUnsetVnfInMaintBB', '*', '*', '*', '*' , 'Abort', 'Abort', '*', '*'), +('ConfigDeployVnfBB', '*', '*', '*', '*' , 'Retry', NULL, '*', '*'), +('GenericVnfHealthCheckBB', '*', '*', '*', "*" , 'Retry', NULL, '*', '*'), +('ConfigurationScaleOutBB', '*', '*', '*', "*" , 'Retry', NULL, '*', '*'), +('VNFCheckPserversLockedFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFCheckInMaintFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFSetInMaintFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFCheckClosedLoopDisabledFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFSetClosedLoopDisabledFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFLockActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFUpgradePreCheckActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFQuiesceTrafficActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFStopActivity','*','*','*','*','Rollback','Abort','*', '*'), +('VNFSnapShotActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFStartActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUpgradeBackupActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUpgradeSoftwareActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUpgradePostCheckActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFResumeTrafficActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUnlockActivity','*','*','*','*','Manual','Abort','*', '*'), +('SDNOVnfHealthCheckBB','*','*','*','*','Manual','Abort','*', '*'), +('VNFHealthCheckActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFConfigModifyActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUnsetInMaintFlagActivity','*','*','*','*','Manual','Abort','*', '*'), +('VNFUnsetClosedLoopDisabledActivity','*','*','*','*','Manual','Abort','*', '*'); INSERT INTO building_block_detail (building_block_name, resource_type, target_action) VALUES @@ -334,7 +333,7 @@ VALUES ('UnassignServiceInstanceBB', 'SERVICE', 'UNASSIGN'), ('UnassignVnfBB', 'VNF', 'UNASSIGN'), -('UnassignVolumeGroup', 'VOLUME_GROUP', 'UNASSIGN'), +('UnassignVolumeGroupBB', 'VOLUME_GROUP', 'UNASSIGN'), ('UnassignNetworkBB', 'NETWORK', 'UNASSIGN'), ('ActivateServiceInstanceBB', 'SERVICE', 'ACTIVATE'), @@ -342,7 +341,7 @@ VALUES ('ActivateVolumeGroupBB', 'VOLUME_GROUP', 'ACTIVATE'), ('ActivateVfModuleBB', 'VF_MODULE', 'ACTIVATE'), ('ActivateNetworkBB', 'NETWORK', 'ACTIVATE'), -('ActivateNetworkCollectionBB', 'NETWORK', 'ACTIVATE'), +('ActivateNetworkCollectionBB', 'NETWORK_COLLECTION', 'ACTIVATE'), ('ActivatePnfBB', 'NO_VALIDATE', 'ACTIVATE'), ('DeactivateServiceInstanceBB', 'SERVICE', 'DEACTIVATE'), @@ -353,25 +352,65 @@ VALUES ('DeactivatePnfBB', 'NO_VALIDATE', 'DEACTIVATE'), -('ChangeModelServiceInstanceBB', 'SERVICE', 'CHANGEMODEL'), -('ChangeModelVnfBB', 'VNF', 'CHANGEMODEL'), -('ChangeModelVfModuleBB', 'VF_MODULE', 'CHANGEMODEL'), +('ChangeModelServiceInstanceBB', 'SERVICE', 'CHANGE_MODEL'), +('ChangeModelVnfBB', 'VNF', 'CHANGE_MODEL'), +('ChangeModelVfModuleBB', 'VF_MODULE', 'CHANGE_MODEL'), ('CreateVolumeGroupBB', 'VOLUME_GROUP', 'CREATE'), ('CreateVfModuleBB', 'VF_MODULE', 'CREATE'), ('CreateNetworkBB', 'NETWORK', 'CREATE'), -('CreateNetworkCollectionBB', 'NETWORK', 'CREATE'), +('CreateNetworkCollectionBB', 'NETWORK_COLLECTION', 'CREATE'), ('DeleteVolumeGroupBB', 'VOLUME_GROUP', 'DELETE'), ('DeleteVfModuleBB', 'VF_MODULE', 'DELETE'), ('DeleteNetworkBB', 'NETWORK', 'DELETE'), -('DeleteNetworkCollectionBB', 'NETWORK', 'DELETE'), +('DeleteNetworkCollectionBB', 'NETWORK_COLLECTION', 'DELETE'), ('ConfigurationScaleOutBB', 'NO_VALIDATE', 'CUSTOM'), ('GenericVnfHealthCheckBB', 'NO_VALIDATE', 'CUSTOM'), -('WaitForPnfReadyBB', 'NO_VALIDATE', 'CUSTOM'); +('WaitForPnfReadyBB', 'NO_VALIDATE', 'CUSTOM'), + +('UnassignVfModuleBB', 'VF_MODULE', 'UNASSIGN'), +('SniroHoming', 'NO_VALIDATE', 'CUSTOM'), +('DeactivateAndUnassignVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'), +('DeactivateNetworkCollectionBB', 'NETWORK_COLLECTION', 'DEACTIVATE'), +('AAICheckVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), +('AAISetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), +('AAIUnsetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), +('SDNOVnfHealthCheckBB', 'NO_VALIDATE', 'CUSTOM'), +('VNF-Macro-Replace', 'NO_VALIDATE', 'CUSTOM'), +('HomingBB', 'NO_VALIDATE', 'CUSTOM'), +('UpdateNetworkBB','NETWORK','UPDATE'), +('VNFSetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFCheckPserversLockedFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFCheckInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFCheckClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFSetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUnsetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFLockActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUnlockActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFStopActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFStartActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFSnapShotActivity', 'NO_VALIDATE', 'CUSTOM'), +('FlowCompleteActivity', 'NO_VALIDATE', 'CUSTOM'), +('PauseForManualTaskActivity', 'NO_VALIDATE', 'CUSTOM'), +('DistributeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), +('DistributeTrafficCheckActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFHealthCheckActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFQuiesceTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFResumeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUnsetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUpgradeBackupActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUpgradePostCheckActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUpgradePreCheckActivity', 'NO_VALIDATE', 'CUSTOM'), +('VNFUpgradeSoftwareActivity', 'NO_VALIDATE', 'CUSTOM'), +('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM'), +('VNFConfigModifyActivity', 'NO_VALIDATE', 'CUSTOM'), +('ConfigAssignVnfBB', 'NO_VALIDATE', 'CUSTOM'), +('ConfigDeployVnfBB', 'NO_VALIDATE', 'CUSTOM'), +('ControllerExecutionBB', 'NO_VALIDATE', 'CUSTOM'); INSERT INTO orchestration_status_state_transition_directive (resource_type, orchestration_status, target_action, flow_directive) VALUES @@ -631,7 +670,6 @@ VALUES ('VNF', 'PENDING', 'CHANGE_MODEL', 'FAIL'), ('VF_MODULE', 'PENDING', 'CHANGE_MODEL', 'FAIL'), - ('VOLUME_GROUP', 'PRECREATED', 'CREATE', 'FAIL'), ('VF_MODULE', 'PRECREATED', 'CREATE', 'FAIL'), ('NETWORK', 'PRECREATED', 'CREATE', 'FAIL'), @@ -713,48 +751,8 @@ VALUES ('VNF', 'CONFIGURE', 'DEACTIVATE', 'SILENT_SUCCESS'), ('VNF', 'CONFIGASSIGNED', 'UNASSIGN', 'CONTINUE'), -('VNF', 'CONFIGASSIGNED', 'DEACTIVATE', 'SILENT_SUCCESS'); - -UPDATE orchestration_flow_reference SET FLOW_NAME = 'HomingBB' WHERE FLOW_NAME = 'SniroHoming'; +('VNF', 'CONFIGASSIGNED', 'DEACTIVATE', 'SILENT_SUCCESS'), -UPDATE orchestration_flow_reference -SET FLOW_NAME = 'ActivateServiceInstanceBB' -WHERE FLOW_NAME = 'ActivateServiceInstance'; - -DELETE FROM orchestration_flow_reference -WHERE FLOW_NAME = 'DeactivateNetworkCollectionBB'; - -UPDATE orchestration_flow_reference -SET SEQ_NO = SEQ_NO - 1 -WHERE COMPOSITE_ACTION = 'Service-Macro-Delete' AND SEQ_NO > 8; - -UPDATE orchestration_flow_reference -SET SEQ_NO = SEQ_NO - 1 -WHERE COMPOSITE_ACTION = 'NetworkCollection-Macro-Delete' AND SEQ_NO > 4; - -UPDATE building_block_detail -SET BUILDING_BLOCK_NAME = 'UnassignVolumeGroupBB' -WHERE BUILDING_BLOCK_NAME = 'UnassignVolumeGroup'; - -UPDATE building_block_detail -SET TARGET_ACTION = 'CHANGE_MODEL' -WHERE TARGET_ACTION = 'CHANGEMODEL'; - -INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) -VALUES -('UnassignVfModuleBB', 'VF_MODULE', 'UNASSIGN'), -('SniroHoming', 'NO_VALIDATE', 'CUSTOM'), -('DeactivateAndUnassignVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'), -('DeactivateNetworkCollectionBB', 'NO_VALIDATE', 'CUSTOM'), -('AAICheckVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), -('AAISetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), -('AAIUnsetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'), -('SDNOVnfHealthCheckBB', 'NO_VALIDATE', 'CUSTOM'), -('VNF-Macro-Replace', 'NO_VALIDATE', 'CUSTOM'), -('HomingBB', 'NO_VALIDATE', 'CUSTOM'); - -INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) -VALUES ('NO_VALIDATE', 'ACTIVE', 'CUSTOM', 'CONTINUE'), ('NO_VALIDATE', 'ASSIGNED', 'CUSTOM', 'CONTINUE'), ('NO_VALIDATE', 'CREATED', 'CUSTOM', 'CONTINUE'), @@ -763,37 +761,8 @@ VALUES ('NO_VALIDATE', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE'), ('NO_VALIDATE', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE'), ('NO_VALIDATE', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'), -('NO_VALIDATE', 'PRECREATED', 'CUSTOM', 'CONTINUE'); - -INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, MIN_API_VERSION, MAX_API_VERSION, IS_TOPLEVELFLOW, CLOUD_OWNER, SERVICE_TYPE) VALUES -('VFModule-DeactivateAndCloudDelete', 'deactivateAndCloudDelete', 'VfModule', true, '7','7', true, 'DEFAULT', '*'); - -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES -('VFModule-DeactivateAndCloudDelete', '1', 'DeactivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-DeactivateAndCloudDelete' and CLOUD_OWNER = 'DEFAULT')), -('VFModule-DeactivateAndCloudDelete', '2', 'DeleteVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-DeactivateAndCloudDelete' and CLOUD_OWNER = 'DEFAULT')); - -INSERT INTO northbound_request_ref_lookup (REQUEST_SCOPE, MACRO_ACTION, ACTION, IS_ALACARTE, MIN_API_VERSION, MAX_API_VERSION, IS_TOPLEVELFLOW, CLOUD_OWNER, SERVICE_TYPE) -values ( 'Service', 'Service-Macro-Deactivate', 'deactivateInstance', '0', '7', '7', '1', 'DEFAULT', '*'); +('NO_VALIDATE', 'PRECREATED', 'CUSTOM', 'CONTINUE'), -INSERT INTO orchestration_flow_reference (COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) -values ( 'Service-Macro-Deactivate', '1', 'DeactivateServiceInstanceBB', '1', (SELECT id FROM northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Macro-Deactivate' and CLOUD_OWNER = 'DEFAULT')); - - -UPDATE northbound_request_ref_lookup SET MIN_API_VERSION = 5 WHERE MACRO_ACTION = 'Service-Macro-Create'; -UPDATE northbound_request_ref_lookup SET MIN_API_VERSION = 5 WHERE MACRO_ACTION = 'Service-Macro-Delete'; -UPDATE northbound_request_ref_lookup SET MIN_API_VERSION = 5 WHERE MACRO_ACTION = 'Service-Macro-Activate'; - -UPDATE northbound_request_ref_lookup SET MIN_API_VERSION = 5 WHERE MACRO_ACTION = 'Service-Macro-Deactivate'; - -INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, MIN_API_VERSION, MAX_API_VERSION, IS_TOPLEVELFLOW, CLOUD_OWNER, SERVICE_TYPE) VALUES -('Network-Update', 'updateInstance', 'Network', true, '7','7','1', 'DEFAULT', '*'); -INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES -('Network-Update', '1', 'UpdateNetworkBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Network-Update' and CLOUD_OWNER = 'DEFAULT')); - -INSERT INTO building_block_detail(BUILDING_BLOCK_NAME,RESOURCE_TYPE,TARGET_ACTION) VALUES -('UpdateNetworkBB','NETWORK','UPDATE'); - -INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS,TARGET_ACTION,FLOW_DIRECTIVE) VALUES ('NETWORK','PRECREATED','UPDATE','FAIL'), ('NETWORK','INVENTORIED','UPDATE','FAIL'), ('NETWORK','ASSIGNED','UPDATE','FAIL'), @@ -801,15 +770,8 @@ INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHE ('NETWORK','PENDING_CREATE','UPDATE','FAIL'), ('NETWORK','PENDING_DELETE','UPDATE','FAIL'), ('NETWORK','PENDING_ACTIVATION','UPDATE','FAIL'), -('NETWORK','ACTIVE','UPDATE','CONTINUE'); +('NETWORK','ACTIVE','UPDATE','CONTINUE'), -UPDATE building_block_detail SET RESOURCE_TYPE = 'NETWORK_COLLECTION' WHERE BUILDING_BLOCK_NAME = 'ActivateNetworkCollectionBB'; -UPDATE building_block_detail SET RESOURCE_TYPE = 'NETWORK_COLLECTION' WHERE BUILDING_BLOCK_NAME = 'CreateNetworkCollectionBB'; -UPDATE building_block_detail SET RESOURCE_TYPE = 'NETWORK_COLLECTION' WHERE BUILDING_BLOCK_NAME = 'DeleteNetworkCollectionBB'; -UPDATE building_block_detail SET RESOURCE_TYPE = 'NETWORK_COLLECTION' WHERE BUILDING_BLOCK_NAME = 'DeactivateNetworkCollectionBB'; -UPDATE building_block_detail SET TARGET_ACTION = 'DEACTIVATE' WHERE BUILDING_BLOCK_NAME = 'DeactivateNetworkCollectionBB'; - -INSERT into orchestration_status_state_transition_directive (RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) values ('NETWORK_COLLECTION', 'PRECREATED', 'CREATE', 'CONTINUE'), ('NETWORK_COLLECTION', 'ASSIGNED', 'CREATE', 'FAIL'), ('NETWORK_COLLECTION', 'CREATED', 'CREATE', 'FAIL'), @@ -830,20 +792,16 @@ INSERT into orchestration_status_state_transition_directive (RESOURCE_TYPE, ORCH ('NETWORK_COLLECTION', 'PENDING', 'DELETE', 'FAIL'), ('NETWORK_COLLECTION', 'INVENTORIED', 'DELETE', 'CONTINUE'), -('NETWORK_COLLECTION', 'PRECREATED', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'ASSIGNED', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'CREATED', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'ACTIVE', 'ACTIVE', 'SILENT_SUCCESS'), -('NETWORK_COLLECTION', 'PENDING_CREATE', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'PENDING_DELETE', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'PENDING_ACTIVATION', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'PENDING', 'ACTIVE', 'FAIL'), -('NETWORK_COLLECTION', 'INVENTORIED', 'ACTIVE', 'CONTINUE'); - -UPDATE orchestration_status_state_transition_directive SET TARGET_ACTION = 'ACTIVATE' WHERE TARGET_ACTION = 'ACTIVE'; +('NETWORK_COLLECTION', 'PRECREATED', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'ASSIGNED', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'CREATED', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'ACTIVE', 'ACTIVATE', 'SILENT_SUCCESS'), +('NETWORK_COLLECTION', 'PENDING_CREATE', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'PENDING_DELETE', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'PENDING_ACTIVATION', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'PENDING', 'ACTIVATE', 'FAIL'), +('NETWORK_COLLECTION', 'INVENTORIED', 'ACTIVATE', 'CONTINUE'), -INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) -VALUES ('CONFIGURATION', 'PRECREATED', 'UNASSIGN', 'SILENT SUCCESS'), ('CONFIGURATION', 'INVENTORIED', 'UNASSIGN', 'CONTINUE'), ('CONFIGURATION', 'ASSIGNED', 'UNASSIGN', 'CONTINUE'), @@ -852,14 +810,8 @@ VALUES ('CONFIGURATION', 'PENDING CREATE', 'UNASSIGN', 'FAIL'), ('CONFIGURATION', 'PENDING DELETE', 'UNASSIGN', 'FAIL'), ('CONFIGURATION', 'PENDING ACTIVATION', 'UNASSIGN', 'FAIL'), -('CONFIGURATION', 'PENDING', 'UNASSIGN', 'FAIL'); - -UPDATE orchestration_flow_reference -SET SEQ_NO = SEQ_NO + 2 WHERE COMPOSITE_ACTION = 'SERVICE-MACRO-DELETE'; - +('CONFIGURATION', 'PENDING', 'UNASSIGN', 'FAIL'), -INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) -VALUES ('CONFIGURATION', 'PRECREATED', 'ASSIGN', 'CONTINUE'), ('CONFIGURATION', 'INVENTORIED', 'ASSIGN', 'CONTINUE'), ('CONFIGURATION', 'ASSIGNED', 'ASSIGN', 'SILENT SUCCESS'), @@ -891,85 +843,6 @@ VALUES ('CONFIGURATION', 'PENDING', 'DEACTIVATE', 'FAIL'), ('VNF','CONFIGDEPLOYED','ACTIVATE','CONTINUE'); -UPDATE orchestration_flow_reference -SET SEQ_NO = SEQ_NO + 2 WHERE COMPOSITE_ACTION = 'Service-Macro-Create' AND SEQ_NO > 12; - -UPDATE orchestration_flow_reference -SET SEQ_NO = SEQ_NO + 1 WHERE COMPOSITE_ACTION = 'Service-Macro-Activate' AND SEQ_NO > 6; - - - -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE POLICY = 'Rollback'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE POLICY = 'Abort'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Rollback' WHERE FLOW_NAME = 'CreateNetworkBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Rollback' WHERE FLOW_NAME = 'CreateNetworkCollectionBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'RollbackToAssigned' WHERE FLOW_NAME = 'CreateVfModuleBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Rollback' WHERE FLOW_NAME = 'CreateVolumeGroupBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'DeleteNetworkBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'DeleteNetworkCollectionBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'DeleteVfModuleBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'DeleteVolumeGroupBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'UnassignNetworkBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'UnassignServiceInstanceBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'UnassignVfModuleBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'UnassignVnfBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Abort' WHERE FLOW_NAME = 'UnassignVolumeGroupBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Rollback' WHERE FLOW_NAME = 'UpdateNetworkBB'; -UPDATE rainy_day_handler_macro SET Secondary_Policy = 'Rollback' WHERE FLOW_NAME = 'VnfAdapterBB'; - - - - -INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY) -VALUES -('GenericVnfHealthCheckBB', '*', '*', '*', "*" , 'Retry'), -('ConfigurationScaleOutBB', '*', '*', '*', "*" , 'Retry'); - -INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) -VALUES -('VNFSetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFCheckPserversLockedFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFCheckInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFCheckClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFSetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUnsetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFLockActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUnlockActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFStopActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFStartActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFSnapShotActivity', 'NO_VALIDATE', 'CUSTOM'), -('FlowCompleteActivity', 'NO_VALIDATE', 'CUSTOM'), -('PauseForManualTaskActivity', 'NO_VALIDATE', 'CUSTOM'), -('DistributeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), -('DistributeTrafficCheckActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFHealthCheckActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFQuiesceTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFResumeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUnsetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUpgradeBackupActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUpgradePostCheckActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUpgradePreCheckActivity', 'NO_VALIDATE', 'CUSTOM'), -('VNFUpgradeSoftwareActivity', 'NO_VALIDATE', 'CUSTOM'), -('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM'), -('VNFConfigModifyActivity', 'NO_VALIDATE', 'CUSTOM'); - -UPDATE northbound_request_ref_lookup SET SERVICE_TYPE = '*' WHERE SERVICE_TYPE IS NULL; - -INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) -VALUES -('ConfigAssignVnfBB', 'NO_VALIDATE', 'CUSTOM'), -('ConfigDeployVnfBB', 'NO_VALIDATE', 'CUSTOM'), -('ControllerExecutionBB', 'NO_VALIDATE', 'CUSTOM'); - -INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION) -VALUES -('StatusCheckBB', 'NO_VALIDATE', 'CUSTOM'), -('HealthCheckBB', 'NO_VALIDATE', 'CUSTOM'); - - -UPDATE rainy_day_handler_macro SET reg_ex_error_message = '*' WHERE reg_ex_error_message IS null; - -UPDATE rainy_day_handler_macro SET SERVICE_ROLE = '*' WHERE SERVICE_ROLE IS null; INSERT INTO vnf_components_recipe (VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, VERSION, ORCHESTRATION_URI, RECIPE_TIMEOUT) VALUES @@ -987,35 +860,3 @@ DELETE FROM service_recipe where ACTION = 'upgradeInstance'; INSERT INTO service_recipe (ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, SERVICE_MODEL_UUID) VALUES ('upgradeInstance', '1.0', 'Gr api recipe to upgrade service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'); - - -INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY, SECONDARY_POLICY, REG_EX_ERROR_MESSAGE, SERVICE_ROLE) -VALUES -('VNFCheckPserversLockedFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFCheckInMaintFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFSetInMaintFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFCheckClosedLoopDisabledFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFSetClosedLoopDisabledFlagActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFLockActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFUpgradePreCheckActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFQuiesceTrafficActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFStopActivity','*','*','*','*','Rollback','Abort','*', '*'), -('VNFSnapShotActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFStartActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUpgradeBackupActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUpgradeSoftwareActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUpgradePostCheckActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFResumeTrafficActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUnlockActivity','*','*','*','*','Manual','Abort','*', '*'), -('SDNOVnfHealthCheckBB','*','*','*','*','Manual','Abort','*', '*'), -('VNFHealthCheckActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFConfigModifyActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUnsetInMaintFlagActivity','*','*','*','*','Manual','Abort','*', '*'), -('VNFUnsetClosedLoopDisabledActivity','*','*','*','*','Manual','Abort','*', '*'); - -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vnf', ACTION='config-assign' WHERE COMPOSITE_ACTION = 'Service-Macro-Create' and FLOW_NAME = 'ConfigAssignVnfBB'; -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vnf', ACTION='config-deploy' WHERE COMPOSITE_ACTION = 'Service-Macro-Create' and FLOW_NAME = 'ConfigDeployVnfBB'; -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vnf', ACTION='config-assign' WHERE COMPOSITE_ACTION = 'VNF-Macro-Create' and FLOW_NAME = 'ConfigAssignVnfBB'; -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vnf', ACTION='config-deploy' WHERE COMPOSITE_ACTION = 'VNF-Macro-Create' and FLOW_NAME = 'ConfigDeployVnfBB'; -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vnf', ACTION='HealthCheck' WHERE COMPOSITE_ACTION = 'VFModule-ScaleOut' and FLOW_NAME = 'GenericVnfHealthCheckBB'; -UPDATE orchestration_flow_reference set FLOW_NAME='ControllerExecutionBB', SCOPE='vfmodule', ACTION='ScaleOutReconfiguration' WHERE COMPOSITE_ACTION = 'VFModule-ScaleOut' and FLOW_NAME = 'GenericVnfHealthCheckBB'; diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql new file mode 100644 index 0000000000..11dd1ecfb3 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql @@ -0,0 +1,10 @@ +use catalogdb; + +CREATE TABLE IF NOT EXISTS `building_block_rollback` ( + `ID` INT NOT NULL AUTO_INCREMENT, + `BUILDING_BLOCK_NAME` varchar(200) NOT NULL, + `ACTION` varchar(200) null, + `ROLLBACK_BUILDING_BLOCK_NAME` varchar(200) NOT NULL, + `ROLLBACK_ACTION` varchar(200) NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy index a812b37879..07a23481d7 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AnNssmfutils.groovy @@ -356,12 +356,15 @@ private SliceProfile createSliceProfile(String domainType, DelegateExecution exe JsonArray connectionLinksList = new JsonArray() JsonObject connectionLinks = new JsonObject() Gson jsonConverter = new Gson() + String TNFH_nssiInstanceId = UUID.randomUUID().toString() + String TNMH_nssiInstanceId = UUID.randomUUID().toString() + if(action.equals("allocate")){ JsonObject endpoints = new JsonObject() if(domainType.equals("TN_FH")) { serviceInfo.addProperty("serviceInvariantUuid", execution.getVariable("TNFH_modelInvariantUuid")) serviceInfo.addProperty("serviceUuid", execution.getVariable("TNFH_modelUuid")) - serviceInfo.addProperty("nssiName", "nssi_"+execution.getVariable("TNFH_modelName")) + serviceInfo.addProperty("nssiName", "nssi_tn_fh_"+TNFH_nssiInstanceId) serviceInfo.addProperty("sst", execution.getVariable("sst")) allocateTnNssi.addProperty("nsstId", execution.getVariable("TNFH_modelUuid")) allocateTnNssi.addProperty("nssiName", execution.getVariable("TNFH_modelName")) @@ -374,7 +377,7 @@ private SliceProfile createSliceProfile(String domainType, DelegateExecution exe }else if(domainType.equals("TN_MH")) { serviceInfo.addProperty("serviceInvariantUuid", execution.getVariable("TNMH_modelInvariantUuid")) serviceInfo.addProperty("serviceUuid", execution.getVariable("TNMH_modelUuid")) - serviceInfo.addProperty("nssiName", "nssi_"+execution.getVariable("TNMH_modelName")) + serviceInfo.addProperty("nssiName", "nssi_tn_mh_"+TNMH_nssiInstanceId) serviceInfo.addProperty("sst", execution.getVariable("sst")) allocateTnNssi.addProperty("nsstId", execution.getVariable("TNMH_modelUuid")) allocateTnNssi.addProperty("nssiName", execution.getVariable("TNMH_modelName")) @@ -435,15 +438,15 @@ private SliceProfile createSliceProfile(String domainType, DelegateExecution exe public String buildDeallocateNssiRequest(DelegateExecution execution,String domainType) { String globalSubscriberId = execution.getVariable("globalSubscriberId") String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + List<String> sNssaiList = execution.getVariable("snssaiList") + + DeAllocateNssi deallocateNssi = new DeAllocateNssi() + deallocateNssi.setNsiId(execution.getVariable("nsiId")) + deallocateNssi.setScriptName("TN1") + deallocateNssi.setSnssaiList(sNssaiList) + deallocateNssi.setTerminateNssiOption(0) - JsonObject deAllocateNssi = new JsonObject() - deAllocateNssi.addProperty("snssaiList", execution.getVariable("snssaiList")) - deAllocateNssi.addProperty("nsiId", execution.getVariable("nsiId")) - deAllocateNssi.addProperty("modifyAction", true) - deAllocateNssi.addProperty("terminateNssiOption", 0) - deAllocateNssi.addProperty("scriptName", "TN1") - - JsonObject esrInfo = new JsonObject() esrInfo.addProperty("networkType", "tn") esrInfo.addProperty("vendor", "ONAP_internal") @@ -451,19 +454,21 @@ private SliceProfile createSliceProfile(String domainType, DelegateExecution exe JsonObject serviceInfo = new JsonObject() serviceInfo.addProperty("globalSubscriberId", globalSubscriberId) serviceInfo.addProperty("subscriptionServiceType", subscriptionServiceType) - + serviceInfo.addProperty("modifyAction", true) + if(domainType.equals("TN_FH")) { - deAllocateNssi.addProperty("nssiId", execution.getVariable("TNFH_NSSI")) + deallocateNssi.setNssiId(execution.getVariable("TNFH_NSSI")) + deallocateNssi.setSliceProfileId(execution.getVariable("TNFH_sliceProfileInstanceId")) serviceInfo.addProperty("nssiId", execution.getVariable("TNFH_NSSI")) - deAllocateNssi.addProperty("sliceProfileId", execution.getVariable("TNFH_sliceProfileInstanceId")) }else if(domainType.equals("TN_MH")) { - deAllocateNssi.addProperty("nssiId", execution.getVariable("TNMH_NSSI")) + deallocateNssi.setNssiId(execution.getVariable("TNMH_NSSI")) + deallocateNssi.setSliceProfileId(execution.getVariable("TNMH_sliceProfileInstanceId")) serviceInfo.addProperty("nssiId", execution.getVariable("TNMH_NSSI")) - deAllocateNssi.addProperty("sliceProfileId", execution.getVariable("TNMH_sliceProfileInstanceId")) } JsonObject json = new JsonObject() - json.add("deAllocateNssi", deAllocateNssi) + Gson jsonConverter = new Gson() + json.add("deAllocateNssi", jsonConverter.toJsonTree(deallocateNssi)) json.add("esrInfo", esrInfo) json.add("serviceInfo", serviceInfo) return json.toString() diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy index 2564b11295..d5c132087c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy @@ -643,7 +643,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor { logger.debug("completed AN service instance build "+ ANServiceInstance.toString()) //create RAN NF NSSI ANNFServiceInstance.setServiceInstanceId(execution.getVariable("RANNFServiceInstanceId")) - sliceInstanceName = "nssi_"+execution.getVariable("ANNF_modelName") + String ANNF_nssiInstanceId = UUID.randomUUID().toString() + sliceInstanceName = "nssi_an_nf_"+ANNF_nssiInstanceId ANNFServiceInstance.setServiceInstanceName(sliceInstanceName) ANNFServiceInstance.setServiceType(execution.getVariable("sst")) ANNFServiceInstance.setOrchestrationStatus(serviceStatus) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy index 0d64d7811b..0088ed4e54 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy @@ -691,6 +691,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{ allocateTnNssi.setNetworkSliceInfos() allocateTnNssi.setSliceProfile(sliceTaskInfo.sliceProfile.trans2TnProfile()) + allocateTnNssi.getSliceProfile().setDomainType(sliceTaskInfo.subnetType.subnetType) NsiInfo nsiInfo = new NsiInfo() nsiInfo.setNsiId(sliceParams.suggestNsiId) nsiInfo.setNsiName(sliceParams.suggestNsiName) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy index 67e4b9227d..b07f5c965d 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCommonCoreNSSI.groovy @@ -121,6 +121,7 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { currentNSSI['S-NSSAI'] = sNssai } + LOGGER.debug("S-NSSAI=" + currentNSSI['S-NSSAI']) // Slice Profile id String sliceProfileId = jsonUtil.getJsonValue(sliceProfile, "sliceProfileId") @@ -381,9 +382,10 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { } + LOGGER.debug("${getPrefix()} Exit callPUTServiceInstance") + return response - LOGGER.debug("${getPrefix()} Exit callPUTServiceInstance") } @@ -742,6 +744,8 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { // Supported S-NSSAI List<String> snssais = (List<String>) currentNSSI['S-NSSAIs'] + LOGGER.debug("prepareInstanceParams: snssais size = " + snssais.size()) + ServiceInstance nssi = (ServiceInstance) currentNSSI['nssi'] String orchStatus = nssi.getOrchestrationStatus() @@ -750,6 +754,7 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { List<Map<String, String>> snssaiList = new ArrayList<>() for(String snssai:snssais) { + LOGGER.debug("prepareInstanceParams: snssai = " + snssai) Map<String, String> snssaisMap = new HashMap<>() snssaisMap.put("snssai", snssai) snssaisMap.put("status", orchStatus) @@ -761,12 +766,15 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { ObjectMapper mapper = new ObjectMapper() - String supportedNssaiDetailsStr = mapper.writeValueAsString(snssaiList) + Map<String, Object> nSsai= new LinkedHashMap<>() + nSsai.put("sNssai", snssaiList) + // String supportedsNssaiJson = mapper.writeValueAsString(snssaiList) + String supportedsNssaiJson = mapper.writeValueAsString(nSsai) instanceParamsMap.put("k8s-rb-profile-name", "default") // ??? instanceParamsMap.put("config-type", "day2") // ??? - instanceParamsMap.put("supportedNssai", supportedNssaiDetailsStr) + instanceParamsMap.put("supportedsNssai", supportedsNssaiJson) instanceParams.add(instanceParamsMap) LOGGER.debug("${getPrefix()} Exit prepareInstanceParams") @@ -1177,9 +1185,8 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { sliceProfileInstanceUri = (AAIResourceUri)spURI } else { - String msg = "Slice Profile URI not found" - LOGGER.error(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + String msg = "Slice Profile association with NSSI was already removed" + LOGGER.info(msg) } } @@ -1220,13 +1227,12 @@ class DoCommonCoreNSSI extends AbstractServiceTaskProcessor { sliceProfileInstanceUri = (AAIResourceUri)spURI } else { - String msg = "Slice Profile URI not found" - LOGGER.error(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + String msg = "Slice Profile instance was already deleted" + LOGGER.info(msg) } } - if(sliceProfileInstanceUri != null) { // NSSI should not be terminated + if(sliceProfileInstanceUri != null) { try { client.delete(sliceProfileInstanceUri) } catch (Exception e) { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy index 0d2e6c1d5e..5a3859fff4 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeAllocateAccessNSSI.groovy @@ -38,6 +38,7 @@ import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.T import org.onap.logging.filter.base.ONAPComponents import org.onap.so.beans.nsmf.DeAllocateNssi import org.onap.so.beans.nsmf.EsrInfo +import org.onap.so.beans.nsmf.NetworkType import org.onap.so.beans.nsmf.ServiceInfo import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil @@ -55,6 +56,7 @@ import org.slf4j.LoggerFactory import com.fasterxml.jackson.databind.ObjectMapper import com.google.gson.JsonObject +import com.google.gson.Gson /** @@ -74,23 +76,23 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { private static final String ROLE_SLICE_PROFILE = "slice-profile-instance" private static final String ROLE_NSSI = "nssi" - private static final String AN_NF = "AN-NF" - private static final String TN_FH = "TN-FH" - private static final String TN_MH = "TN-MH" + private static final String AN_NF = "AN_NF" + private static final String TN_FH = "TN_FH" + private static final String TN_MH = "TN_MH" @Override public void preProcessRequest(DelegateExecution execution) { logger.debug("${Prefix} - Start preProcessRequest") String sliceParams = execution.getVariable("sliceParams") - String sNssaiList = jsonUtil.getJsonValue(sliceParams, "snssaiList") + def sNssaiList = jsonUtil.StringArrayToList(jsonUtil.getJsonValue(sliceParams, "snssaiList")) String anSliceProfileId = jsonUtil.getJsonValue(sliceParams, "sliceProfileId") String nsiId = jsonUtil.getJsonValue(sliceParams, "nsiId") String globalSubscriberId = execution.getVariable("globalSubscriberId") String subscriptionServiceType = execution.getVariable("subscriptionServiceType") String anNssiId = execution.getVariable("serviceInstanceID") - if(isBlank(sNssaiList) || isBlank(anSliceProfileId) || isBlank(nsiId)) { + if((sNssaiList.empty) || isBlank(anSliceProfileId) || isBlank(nsiId)) { String msg = "Input fields cannot be null : Mandatory attributes : [snssaiList, sliceProfileId, nsiId]" logger.debug(msg) exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) @@ -172,14 +174,15 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { boolean terminateAnNfNSSI = callOofAdapter(execution,execution.getVariable("oofAnNfNssiPayload")) execution.setVariable("terminateAnNfNSSI", terminateAnNfNSSI) if(!terminateAnNfNSSI) { - execution.setVariable("modifyAction",true) + execution.setVariable("modifyAction","deallocate") } } void prepareSdnrRequest(DelegateExecution execution) { String anNfNssiId = execution.getVariable("anNfNssiId") - String sNssai = execution.getVariable("sNssaiList") + String sNssai = execution.getVariable("sNssaiList").get(0) + String sliceProfileId = execution.getVariable("anNfSliceProfileId") String reqId = execution.getVariable("msoRequestId") String messageType = "SDNRTerminateResponse" StringBuilder callbackURL = new StringBuilder(UrnPropertiesReader.getVariable("mso.workflow.message.endpoint", execution)) @@ -188,35 +191,38 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { JsonObject input = new JsonObject() input.addProperty("RANNFNSSIId", anNfNssiId) input.addProperty("callbackURL", callbackURL.toString()) - input.addProperty("s-NSSAI", sNssai) + input.addProperty("sNSSAI", sNssai) + input.addProperty("sliceProfileId",sliceProfileId) + input.add("additionalproperties", new JsonObject()) JsonObject Payload = new JsonObject() - Payload.addProperty("version", "1.0") - Payload.addProperty("rpc-name", "terminateRANSliceInstance") - Payload.addProperty("correlation-id", reqId) - Payload.addProperty("type", "request") JsonObject wrapinput = new JsonObject() wrapinput.addProperty("action", "deallocate") JsonObject CommonHeader = new JsonObject() - CommonHeader.addProperty("time-stamp", new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault())) + CommonHeader.addProperty("timestamp", new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault())) CommonHeader.addProperty("api-ver", "1.0") + CommonHeader.addProperty("originator-id", "testing") CommonHeader.addProperty("request-id", reqId) CommonHeader.addProperty("sub-request-id", "1") + CommonHeader.add("flags", new JsonObject()) JsonObject body = new JsonObject() - body.add("input", wrapinput) JsonObject sdnrRequest = new JsonObject() Payload.add("input", input) - wrapinput.add("payload", Payload) + wrapinput.addProperty("payload", Payload.toString()) wrapinput.add("common-header", CommonHeader) body.add("input", wrapinput) sdnrRequest.add("body", body) + sdnrRequest.addProperty("version", "1.0") + sdnrRequest.addProperty("rpc-name", "terminateRANSliceInstance") + sdnrRequest.addProperty("correlation-id", reqId) + sdnrRequest.addProperty("type", "request") String json = sdnrRequest.toString() - execution.setVariable("sdnrRequest", sdnrRequest) + execution.setVariable("sdnrRequest", json) execution.setVariable("SDNR_messageType", messageType) execution.setVariable("SDNR_timeout", "PT10M") @@ -336,26 +342,26 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { String globalSubscriberId = execution.getVariable("globalSubscriberId") String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(networkType) - esrInfo.setVendor("ONAP") + JsonObject esrInfo = new JsonObject() + esrInfo.addProperty("networkType", networkType) + esrInfo.addProperty("vendor", "ONAP_internal") - ServiceInfo serviceInfo = new ServiceInfo() - serviceInfo.setNssiId(instanceId) - serviceInfo.setNsiId(execution.getVariable("nsiId")) - serviceInfo.setGlobalSubscriberId(globalSubscriberId) - serviceInfo.setSubscriptionServiceType(subscriptionServiceType) + JsonObject serviceInfo = new JsonObject() + serviceInfo.addProperty("nsiId", execution.getVariable("nsiId")) + serviceInfo.addProperty("nssiId", instanceId) + serviceInfo.addProperty("globalSubscriberId", globalSubscriberId) + serviceInfo.addProperty("subscriptionServiceType", subscriptionServiceType) - execution.setVariable("${networkType}_esrInfo", esrInfo) + execution.setVariable("${networkType}_esrInfo", esrInfo.toString()) execution.setVariable("${networkType}_responseId", responseId) - execution.setVariable("${networkType}_serviceInfo", serviceInfo) + execution.setVariable("${networkType}_serviceInfo", serviceInfo.toString()) } void validateJobStatus(DelegateExecution execution,String responseDescriptor) { logger.debug("validateJobStatus ${responseDescriptor}") - String status = jsonUtil.getJsonValue(responseDescriptor, "responseDescriptor.status") - String statusDescription = jsonUtil.getJsonValue(responseDescriptor, "responseDescriptor.statusDescription") + String status = jsonUtil.getJsonValue(responseDescriptor, "status") + String statusDescription = jsonUtil.getJsonValue(responseDescriptor, "statusDescription") if("finished".equalsIgnoreCase(status)) { execution.setVariable("isSuccess", true) }else { @@ -364,14 +370,15 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { } void prepareUpdateJobStatus(DelegateExecution execution,String status,String progress,String statusDescription) { - String serviceId = execution.getVariable("anNssiId") + String nssiId = execution.getVariable("anNssiId") String jobId = execution.getVariable("jobId") String nsiId = execution.getVariable("nsiId") ResourceOperationStatus roStatus = new ResourceOperationStatus() - roStatus.setServiceId(serviceId) + roStatus.setServiceId(nsiId) roStatus.setOperationId(jobId) - roStatus.setResourceTemplateUUID(nsiId) + //roStatus.setResourceTemplateUUID(nsiId) + roStatus.setResourceInstanceID(nssiId) roStatus.setOperType("DeAllocate") roStatus.setProgress(progress) roStatus.setStatus(status) @@ -382,7 +389,7 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { void terminateTNFHNssi(DelegateExecution execution) { logger.debug("Start terminateTNFHNssi in ${Prefix}") String nssmfRequest = buildDeallocateNssiRequest(execution, TN_FH) - String nssiId = getInstanceIdByWorkloadContext(execution.getVariable("relatedSPs"), TN_FH) + String nssiId = getInstanceIdByWorkloadContext(execution.getVariable("relatedNssis"), TN_FH) execution.setVariable("tnFHNSSIId", nssiId) String urlString = "/api/rest/provMns/v1/NSS/SliceProfiles/" + nssiId String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest) @@ -399,7 +406,7 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { void terminateTNMHNssi(DelegateExecution execution) { logger.debug("Start terminateTNMHNssi in ${Prefix}") String nssmfRequest = buildDeallocateNssiRequest(execution, TN_MH) - String nssiId = getInstanceIdByWorkloadContext(execution.getVariable("relatedSPs"), TN_MH) + String nssiId = getInstanceIdByWorkloadContext(execution.getVariable("relatedNssis"), TN_MH) execution.setVariable("tnMHNSSIId", nssiId) String urlString = "/api/rest/provMns/v1/NSS/SliceProfiles/" + nssiId String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest) @@ -430,7 +437,7 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { void deleteANNSSI(DelegateExecution execution) { logger.debug("${Prefix} delete AN NSSI") - String nssiId = execution.getVariable("serviceInstanceID") + String nssiId = execution.getVariable("anNssiId") deleteServiceInstanceInAAI(execution, nssiId) } @@ -508,42 +515,46 @@ class DoDeAllocateAccessNSSI extends AbstractServiceTaskProcessor { Map<String, ServiceInstance> relatedNssis = execution.getVariable("relatedNssis") String anNssiId = execution.getVariable("anNssiId") - List<String> sNssaiList = execution.getVariable("sNssaiList") + List<String> sNssaiList = execution.getVariable("sNssaiList") Map<String, ServiceInstance> relatedSPs = execution.getVariable("relatedSPs") DeAllocateNssi deallocateNssi = new DeAllocateNssi() - deallocateNssi.setNsiId(anNssiId) + deallocateNssi.setNsiId(execution.getVariable("nsiId")) ServiceInstance tnNssi = relatedNssis.get(serviceFunction) String nssiId = tnNssi.getServiceInstanceId() deallocateNssi.setNssiId(nssiId) - deallocateNssi.setScriptName(tnNssi.getServiceInstanceName()) + deallocateNssi.setScriptName("TN1") deallocateNssi.setSnssaiList(sNssaiList) deallocateNssi.setSliceProfileId(relatedSPs.get(serviceFunction).getServiceInstanceId()) - EsrInfo esrInfo = new EsrInfo() - esrInfo.setVendor("ONAP") - esrInfo.setNetworkType("TN") + JsonObject esrInfo = new JsonObject() + esrInfo.addProperty("networkType", "tn") + esrInfo.addProperty("vendor", "ONAP_internal") ServiceInfo serviceInfo = new ServiceInfo() serviceInfo.setServiceInvariantUuid(tnNssi.getModelInvariantId()) serviceInfo.setServiceUuid(tnNssi.getModelVersionId()) serviceInfo.setGlobalSubscriberId(globalSubscriberId) serviceInfo.setSubscriptionServiceType(subscriptionServiceType) + serviceInfo.setNssiId(nssiId) + serviceInfo.setNssiName(tnNssi.getServiceInstanceName()) JsonObject json = new JsonObject() - json.addProperty("deAllocateNssi", objectMapper.writeValueAsString(deallocateNssi)) - json.addProperty("esrInfo", objectMapper.writeValueAsString(esrInfo)) - json.addProperty("serviceInfo", objectMapper.writeValueAsString(serviceInfo)) + Gson jsonConverter = new Gson() + json.add("deAllocateNssi", jsonConverter.toJsonTree(deallocateNssi)) + json.add("esrInfo", esrInfo) + json.add("serviceInfo", jsonConverter.toJsonTree(serviceInfo)) return json.toString() } private void deleteServiceInstanceInAAI(DelegateExecution execution,String instanceId) { try { - AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(instanceId)) - getAAIClient().delete(serviceInstanceUri) + AAIResourcesClient client = getAAIClient() + AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(instanceId)) + client.delete(serviceInstanceUri) logger.debug("${Prefix} Exited deleteServiceInstance") }catch(Exception e){ logger.debug("Error occured within deleteServiceInstance method: " + e) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy index c559845e12..11058748fd 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSI.groovy @@ -238,6 +238,22 @@ class DoDeallocateCoreNSSI extends DoCommonCoreNSSI { exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) } + + // NSI + String nsiId = currentNSSI['nsiId'] + ServiceInstance nsi = null + AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nsiId)) + Optional<ServiceInstance> nsiOpt = client.get(ServiceInstance.class, nsiUri) + if (nsiOpt.isPresent()) { + nsi = nsiOpt.get() + } + else { + String msg = "NSI service instance not found in AAI for nsi id " + nsiId + LOGGER.error(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + + //Setting correlator as requestId String requestId = execution.getVariable("msoRequestId") execution.setVariable("NSSI_correlator", requestId) @@ -257,7 +273,7 @@ class DoDeallocateCoreNSSI extends DoCommonCoreNSSI { String nxlId = nssi.getServiceInstanceId() String nxlType = "NSSI" - String oofRequest = getOofUtils().buildTerminateNxiRequest(requestId, nxlId, nxlType, messageType, nssi.getServiceInstanceId()) + String oofRequest = getOofUtils().buildTerminateNxiRequest(requestId, nxlId, nxlType, messageType, nsi.getServiceInstanceId()) LOGGER.debug("**** Terminate Nxi Request: "+oofRequest) LOGGER.debug("${PREFIX} Exit buildOOFRequest") @@ -289,32 +305,31 @@ class DoDeallocateCoreNSSI extends DoCommonCoreNSSI { // http://so.onap:8080/onap/so/infra/serviceInstantiation/v7/serviceInstances/de6a0aa2-19f2-41fe-b313-a5a9f159acd7/vnfs/3abbb373-8d33-4977-aa4b-2bfee496b6d5 String url = String.format("${nsmfЕndPoint}/serviceInstantiation/v7/serviceInstances/%s/vnfs/%s", networkServiceInstance.getServiceInstanceId(), constituteVnf.getVnfId()) + LOGGER.debug("url = " + url) + currentNSSI['deleteServiceOrderURL'] = url String msoKey = UrnPropertiesReader.getVariable("mso.msoKey", execution) String basicAuth = UrnPropertiesReader.getVariable("mso.adapters.po.auth", execution) - /*String basicAuthValue = encryptBasicAuth(basicAuth, msoKey) - def authHeader = "" - if (basicAuthValue != null) { - String responseAuthHeader = getAuthHeader(execution, basicAuthValue, msoKey) - String errorCode = jsonUtil.getJsonValue(responseAuthHeader, "errorCode") - if(errorCode == null || errorCode.isEmpty()) { // No error - authHeader = responseAuthHeader - } - else { - exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(errorCode), jsonUtil.getJsonValue(responseAuthHeader, "errorMessage")) - } - } else { - LOGGER.error( "Unable to obtain BasicAuth - BasicAuth value null") - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - BasicAuth " + - "value null") - } */ - def authHeader = utils.getBasicAuth(basicAuth, msoKey) - String callDeleteServiceOrderResponse = callDeleteServiceOrder(execution, url, authHeader) - String errorCode = jsonUtil.getJsonValue(callDeleteServiceOrderResponse, "errorCode") + def requestDetails = "" + + String prepareRequestDetailsResponse = prepareRequestDetails(execution) + LOGGER.debug("deleteServiceOrder: prepareRequestDetailsResponse=" + prepareRequestDetailsResponse) + + String errorCode = jsonUtil.getJsonValue(prepareRequestDetailsResponse, "errorCode") + LOGGER.debug("deleteServiceOrder: errorCode=" + errorCode) + if(errorCode == null || errorCode.isEmpty()) { // No error + requestDetails = prepareRequestDetailsResponse + } + else { + exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(errorCode), jsonUtil.getJsonValue(prepareRequestDetailsResponse, "errorMessage")) + } + + String callDeleteServiceOrderResponse = callDeleteServiceOrder(url, authHeader, requestDetails) + errorCode = jsonUtil.getJsonValue(callDeleteServiceOrderResponse, "errorCode") if(errorCode == null || errorCode.isEmpty()) { // No error String macroOperationId = jsonUtil.getJsonValue(callDeleteServiceOrderResponse, "requestReferences.requestId") @@ -339,21 +354,24 @@ class DoDeallocateCoreNSSI extends DoCommonCoreNSSI { } - String callDeleteServiceOrder(DelegateExecution execution, String url, String authHeader) { + String callDeleteServiceOrder(String url, String authHeader, String requestDetailsStr) { LOGGER.debug("${PREFIX} Start callDeleteServiceOrder") String errorCode = "" String errorMessage = "" String response = "" + LOGGER.debug("callDeleteServiceOrder: url = " + url) + LOGGER.debug("callDeleteServiceOrder: authHeader = " + authHeader) + try { HttpClient httpClient = getHttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO) httpClient.addAdditionalHeader("Authorization", authHeader) httpClient.addAdditionalHeader("Accept", "application/json") - Response httpResponse = httpClient.delete() + Response httpResponse = httpClient.delete(requestDetailsStr) int soResponseCode = httpResponse.getStatus() - LOGGER.debug("callDeleteServiceInstance: soResponseCode = " + soResponseCode) + LOGGER.debug("callDeleteServiceOrder: soResponseCode = " + soResponseCode) if (soResponseCode >= 200 && soResponseCode < 204 && httpResponse.hasEntity()) { response = httpResponse.readEntity(String.class) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy index 3bb1c0bef5..a08eb570c9 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy @@ -609,7 +609,7 @@ class DoModifyAccessNSSI extends AbstractServiceTaskProcessor { def prepareTnMhDeallocateRequest = { DelegateExecution execution -> logger.debug(Prefix+"prepareTnFhDeallocateRequest method start") - String nssmfRequest = anNssmfUtils.buildDeallocateNssiRequest(execution, "TN_FH") + String nssmfRequest = anNssmfUtils.buildDeallocateNssiRequest(execution, "TN_MH") String nssiId = execution.getVariable("TNFH_NSSI") execution.setVariable("tnFHNSSIId", nssiId) String urlString = "/api/rest/provMns/v1/NSS/SliceProfiles/" + nssiId @@ -758,8 +758,9 @@ class DoModifyAccessNSSI extends AbstractServiceTaskProcessor { } private void deleteServiceInstanceInAAI(DelegateExecution execution,String instanceId) { try { - AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("serviceType")).serviceInstance(instanceId)) - getAAIClient().delete(serviceInstanceUri) + AAIResourcesClient client = getAAIClient() + AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(execution.getVariable("globalSubscriberId")).serviceSubscription(execution.getVariable("subscriptionServiceType")).serviceInstance(instanceId)) + client.delete(serviceInstanceUri) logger.debug("${Prefix} Exited deleteServiceInstance") }catch(Exception e){ logger.debug("Error occured within deleteServiceInstance method: " + e) diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy index 5bf4f40e50..acace8c1c7 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy @@ -95,6 +95,9 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { String nssiId = "5G-999" currentNSSI.put("nssiId", nssiId) + String nsiId = "ns-777" + currentNSSI.put("nsiId", nsiId) + when(mockExecution.getVariable("currentNSSI")).thenReturn(currentNSSI) when(mockExecution.getVariable("mso.oof.endpoint")).thenReturn("http://oof.onap:8088") @@ -127,6 +130,14 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { when(client.get(ServiceInstance.class, nssiUri)).thenReturn(nssiOpt) + AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nsiId)) + + ServiceInstance nsi = new ServiceInstance() + nsi.setServiceInstanceId("5G-777") + Optional<ServiceInstance> nsiOpt = Optional.of(nsi) + + when(client.get(ServiceInstance.class, nsiUri)).thenReturn(nsiOpt) + String urlString = "http://oof.onap:8088" String httpRequest = "{\n" + @@ -143,7 +154,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { String nxlId = nssi.getServiceInstanceId() String nxlType = "NSSI" String messageType = "cn" - String serviceInstanceId = nssi.getServiceInstanceId() + String serviceInstanceId = nsi.getServiceInstanceId() when(mockExecution.getVariable("msoRequestId")).thenReturn(requestId) when(oofUtilsMock.buildTerminateNxiRequest(requestId, nxlId, nxlType, messageType, serviceInstanceId)).thenReturn(httpRequest) @@ -213,6 +224,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { genericVnf.setVnfName("vnf-name") genericVnf.setVnfId("vnf-id") + currentNSSI.put("constituteVnf", genericVnf) String urlString = String.format("http://mso.onap:8088/serviceInstantiation/v7/serviceInstances/%s/vnfs/%s", networkServiceInstance.getServiceInstanceId(), genericVnf.getVnfId()) @@ -235,7 +247,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { when(httpClientFactoryMock.newJsonClient(any(), any())).thenReturn(httpClientMock) - when(httpClientMock.delete()).thenReturn(responseMock) + when(httpClientMock.delete(requestDetailsStr)).thenReturn(responseMock) when(responseMock.getStatus()).thenReturn(200) when(responseMock.hasEntity()).thenReturn(true) diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn index 5e4b73070d..4debe1fe21 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn @@ -639,7 +639,7 @@ deallocator.deleteANNSSI(execution)</bpmn:script> <bpmn:callActivity id="Activity_0umktii" name="Modify RAN NF NSSI" calledElement="DoModifyRanNfNssi"> <bpmn:extensionElements> <camunda:in source="anNfNssiId" target="serviceInstanceID" /> - <camunda:in source="anNfSliceProfileId" target="SliceProfileId" /> + <camunda:in source="anNfSliceProfileId" target="sliceProfileId" /> <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateCoreNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateCoreNSSI.bpmn index bfc45f26b7..3966caeba5 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateCoreNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateCoreNSSI.bpmn @@ -20,11 +20,11 @@ def dcnssi= new DoDeallocateCoreNSSI() dcnssi.getNetworkServiceInstance(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:exclusiveGateway id="Gateway_1dqw1bg" name="Is terminateNSSI=true?" default="Flow_0e3yvck"> - <bpmn:incoming>Flow_16192dm</bpmn:incoming> + <bpmn:incoming>Flow_01q7kcf</bpmn:incoming> <bpmn:outgoing>Flow_15ew9rs</bpmn:outgoing> <bpmn:outgoing>Flow_0e3yvck</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="Flow_16192dm" sourceRef="Activity_0wswwhj" targetRef="Gateway_1dqw1bg" /> + <bpmn:sequenceFlow id="Flow_16192dm" sourceRef="Activity_0wswwhj" targetRef="Activity_1anr9ry" /> <bpmn:scriptTask id="Activity_1kne6ot" name="Invoke DeleteServiceOrder API" scriptFormat="groovy"> <bpmn:incoming>Flow_15ew9rs</bpmn:incoming> <bpmn:outgoing>Flow_1b14can</bpmn:outgoing> @@ -33,14 +33,14 @@ def dcnssi= new DoDeallocateCoreNSSI() dcnssi.deleteServiceOrder(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="Activity_1anr9ry" name="Get constitute VNF from Network Service Instance" scriptFormat="groovy"> - <bpmn:incoming>Flow_1v68jns</bpmn:incoming> - <bpmn:outgoing>Flow_1eev81t</bpmn:outgoing> + <bpmn:incoming>Flow_16192dm</bpmn:incoming> + <bpmn:outgoing>Flow_01q7kcf</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi= new DoDeallocateCoreNSSI() dcnssi.getConstituteVNFFromNetworkServiceInst(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="Activity_16wfqhu" name="Get NSSI associated profiles" scriptFormat="groovy"> - <bpmn:incoming>Flow_1eev81t</bpmn:incoming> + <bpmn:incoming>Flow_1v68jns</bpmn:incoming> <bpmn:outgoing>Flow_0xrq94a</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi= new DoDeallocateCoreNSSI() @@ -113,8 +113,7 @@ def dcnssi= new DoDeallocateCoreNSSI() <bpmn:sequenceFlow id="Flow_15ew9rs" name="yes" sourceRef="Gateway_1dqw1bg" targetRef="Activity_1kne6ot"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isTerminateNSSI" ) == true)}</bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="Flow_1v68jns" sourceRef="Event_1mk9pgp" targetRef="Activity_1anr9ry" /> - <bpmn:sequenceFlow id="Flow_1eev81t" sourceRef="Activity_1anr9ry" targetRef="Activity_16wfqhu" /> + <bpmn:sequenceFlow id="Flow_1v68jns" sourceRef="Event_1mk9pgp" targetRef="Activity_16wfqhu" /> <bpmn:sequenceFlow id="Flow_0xrq94a" sourceRef="Activity_16wfqhu" targetRef="Activity_0es9or8" /> <bpmn:sequenceFlow id="Flow_1qwi2ka" sourceRef="Activity_0es9or8" targetRef="Activity_0mnkgd6" /> <bpmn:sequenceFlow id="Flow_0e3yvck" name="no" sourceRef="Gateway_1dqw1bg" targetRef="Event_016dxue" /> @@ -282,9 +281,18 @@ dcnssi.timeDelay(execution)</bpmn:script> <bpmn:sequenceFlow id="Flow_0eigzrb" sourceRef="Activity_03j1rrj" targetRef="Event_0zbwefx" /> <bpmn:sequenceFlow id="Flow_16bwdkl" sourceRef="Activity_13qnpcn" targetRef="Activity_0wswwhj" /> <bpmn:sequenceFlow id="Flow_0zxtlgn" sourceRef="Activity_1ym1op6" targetRef="Activity_1a5fd5v" /> + <bpmn:sequenceFlow id="Flow_01q7kcf" sourceRef="Activity_1anr9ry" targetRef="Gateway_1dqw1bg" /> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeallocateCoreNSSI"> + <bpmndi:BPMNEdge id="Flow_0zxtlgn_di" bpmnElement="Flow_0zxtlgn"> + <di:waypoint x="1010" y="320" /> + <di:waypoint x="1010" y="270" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="Flow_16bwdkl_di" bpmnElement="Flow_16bwdkl"> + <di:waypoint x="500" y="117" /> + <di:waypoint x="540" y="117" /> + </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0eigzrb_di" bpmnElement="Flow_0eigzrb"> <di:waypoint x="1470" y="670" /> <di:waypoint x="1532" y="670" /> @@ -295,8 +303,8 @@ dcnssi.timeDelay(execution)</bpmn:script> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0att74c_di" bpmnElement="Flow_0att74c"> <di:waypoint x="990" y="560" /> - <di:waypoint x="930" y="560" /> - <di:waypoint x="930" y="490" /> + <di:waypoint x="850" y="560" /> + <di:waypoint x="850" y="490" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0afgah7_di" bpmnElement="Flow_0afgah7"> <di:waypoint x="1040" y="475" /> @@ -326,14 +334,14 @@ dcnssi.timeDelay(execution)</bpmn:script> <di:waypoint x="1100" y="710" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0pvh1x9_di" bpmnElement="Flow_0pvh1x9"> - <di:waypoint x="980" y="450" /> + <di:waypoint x="900" y="450" /> <di:waypoint x="1015" y="450" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1j1en2h_di" bpmnElement="Flow_1j1en2h"> <di:waypoint x="1105" y="350" /> - <di:waypoint x="1000" y="350" /> + <di:waypoint x="1060" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1019" y="352" width="18" height="14" /> + <dc:Bounds x="1063" y="352" width="18" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1mrr969_di" bpmnElement="Flow_1mrr969"> @@ -344,13 +352,13 @@ dcnssi.timeDelay(execution)</bpmn:script> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1h8q1h1_di" bpmnElement="Flow_1h8q1h1"> - <di:waypoint x="1000" y="230" /> + <di:waypoint x="1060" y="230" /> <di:waypoint x="1130" y="230" /> <di:waypoint x="1130" y="325" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0g84uy5_di" bpmnElement="Flow_0g84uy5"> <di:waypoint x="360" y="117" /> - <di:waypoint x="440" y="117" /> + <di:waypoint x="400" y="117" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_15rk73d_di" bpmnElement="Flow_15rk73d"> <di:waypoint x="1150" y="670" /> @@ -376,41 +384,37 @@ dcnssi.timeDelay(execution)</bpmn:script> <di:waypoint x="260" y="670" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1b14can_di" bpmnElement="Flow_1b14can"> - <di:waypoint x="820" y="230" /> - <di:waypoint x="900" y="230" /> + <di:waypoint x="890" y="230" /> + <di:waypoint x="960" y="230" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_178myd8_di" bpmnElement="Flow_178myd8"> - <di:waypoint x="820" y="450" /> - <di:waypoint x="880" y="450" /> + <di:waypoint x="710" y="450" /> + <di:waypoint x="800" y="450" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0e3yvck_di" bpmnElement="Flow_0e3yvck"> - <di:waypoint x="795" y="117" /> - <di:waypoint x="885" y="117" /> + <di:waypoint x="865" y="117" /> + <di:waypoint x="962" y="117" /> <bpmndi:BPMNLabel> - <dc:Bounds x="807" y="95" width="13" height="14" /> + <dc:Bounds x="879" y="95" width="13" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1qwi2ka_di" bpmnElement="Flow_1qwi2ka"> - <di:waypoint x="680" y="450" /> - <di:waypoint x="720" y="450" /> + <di:waypoint x="540" y="450" /> + <di:waypoint x="610" y="450" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0xrq94a_di" bpmnElement="Flow_0xrq94a"> - <di:waypoint x="510" y="450" /> - <di:waypoint x="580" y="450" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_1eev81t_di" bpmnElement="Flow_1eev81t"> <di:waypoint x="360" y="450" /> - <di:waypoint x="410" y="450" /> + <di:waypoint x="440" y="450" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_1v68jns_di" bpmnElement="Flow_1v68jns"> <di:waypoint x="215" y="450" /> <di:waypoint x="260" y="450" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_15ew9rs_di" bpmnElement="Flow_15ew9rs"> - <di:waypoint x="770" y="142" /> - <di:waypoint x="770" y="190" /> + <di:waypoint x="840" y="142" /> + <di:waypoint x="840" y="190" /> <bpmndi:BPMNLabel> - <dc:Bounds x="751" y="157" width="17" height="14" /> + <dc:Bounds x="831" y="167" width="17" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0nvtepd_di" bpmnElement="Flow_0nvtepd"> @@ -418,20 +422,16 @@ dcnssi.timeDelay(execution)</bpmn:script> <di:waypoint x="410" y="670" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_16192dm_di" bpmnElement="Flow_16192dm"> - <di:waypoint x="691" y="117" /> - <di:waypoint x="745" y="117" /> + <di:waypoint x="640" y="117" /> + <di:waypoint x="680" y="117" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="Flow_0xxq2h8_di" bpmnElement="Flow_0xxq2h8"> <di:waypoint x="215" y="117" /> <di:waypoint x="260" y="117" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_16bwdkl_di" bpmnElement="Flow_16bwdkl"> - <di:waypoint x="540" y="117" /> - <di:waypoint x="591" y="117" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_0zxtlgn_di" bpmnElement="Flow_0zxtlgn"> - <di:waypoint x="950" y="310" /> - <di:waypoint x="950" y="270" /> + <bpmndi:BPMNEdge id="Flow_01q7kcf_di" bpmnElement="Flow_01q7kcf"> + <di:waypoint x="780" y="117" /> + <di:waypoint x="815" y="117" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> <dc:Bounds x="179" y="99" width="36" height="36" /> @@ -442,18 +442,6 @@ dcnssi.timeDelay(execution)</bpmn:script> <bpmndi:BPMNShape id="Activity_0u06qij_di" bpmnElement="Activity_0u06qij"> <dc:Bounds x="260" y="77" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_1anr9ry_di" bpmnElement="Activity_1anr9ry"> - <dc:Bounds x="260" y="410" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_16wfqhu_di" bpmnElement="Activity_16wfqhu"> - <dc:Bounds x="410" y="410" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_0es9or8_di" bpmnElement="Activity_0es9or8"> - <dc:Bounds x="580" y="410" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_0mnkgd6_di" bpmnElement="Activity_0mnkgd6"> - <dc:Bounds x="720" y="410" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_19z90sm_di" bpmnElement="Activity_19z90sm"> <dc:Bounds x="260" y="630" width="100" height="80" /> </bpmndi:BPMNShape> @@ -493,32 +481,47 @@ dcnssi.timeDelay(execution)</bpmn:script> <dc:Bounds x="160" y="695" width="88" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_16wfqhu_di" bpmnElement="Activity_16wfqhu"> + <dc:Bounds x="260" y="410" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_0mnkgd6_di" bpmnElement="Activity_0mnkgd6"> + <dc:Bounds x="610" y="410" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_07qrjro_di" bpmnElement="Activity_07qrjro"> + <dc:Bounds x="800" y="410" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_0es9or8_di" bpmnElement="Activity_0es9or8"> + <dc:Bounds x="440" y="410" width="100" height="80" /> + </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_13qnpcn_di" bpmnElement="Activity_13qnpcn"> - <dc:Bounds x="440" y="77" width="100" height="80" /> + <dc:Bounds x="400" y="77" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_0wswwhj_di" bpmnElement="Activity_0wswwhj"> - <dc:Bounds x="591" y="77" width="100" height="80" /> + <dc:Bounds x="540" y="77" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Gateway_1dqw1bg_di" bpmnElement="Gateway_1dqw1bg" isMarkerVisible="true"> - <dc:Bounds x="745" y="92" width="50" height="50" /> + <bpmndi:BPMNShape id="Event_016dxue_di" bpmnElement="Event_016dxue"> + <dc:Bounds x="962" y="99" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="728" y="53" width="86" height="40" /> + <dc:Bounds x="951" y="140" width="74" height="40" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Event_016dxue_di" bpmnElement="Event_016dxue"> - <dc:Bounds x="885" y="99" width="36" height="36" /> + <bpmndi:BPMNShape id="Gateway_1dqw1bg_di" bpmnElement="Gateway_1dqw1bg" isMarkerVisible="true"> + <dc:Bounds x="815" y="92" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="874" y="140" width="74" height="40" /> + <dc:Bounds x="799" y="53" width="85" height="40" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_1ym1op6_di" bpmnElement="Activity_1ym1op6"> - <dc:Bounds x="900" y="310" width="100" height="80" /> + <bpmndi:BPMNShape id="Activity_1a5fd5v_di" bpmnElement="Activity_1a5fd5v"> + <dc:Bounds x="960" y="190" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_1kne6ot_di" bpmnElement="Activity_1kne6ot"> - <dc:Bounds x="720" y="190" width="100" height="80" /> + <dc:Bounds x="790" y="190" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_1a5fd5v_di" bpmnElement="Activity_1a5fd5v"> - <dc:Bounds x="900" y="190" width="100" height="80" /> + <bpmndi:BPMNShape id="Activity_1anr9ry_di" bpmnElement="Activity_1anr9ry"> + <dc:Bounds x="680" y="77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="Activity_1ym1op6_di" bpmnElement="Activity_1ym1op6"> + <dc:Bounds x="960" y="320" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Activity_14l5j2f_di" bpmnElement="Activity_14l5j2f" isExpanded="true"> <dc:Bounds x="250" y="910" width="781" height="196" /> @@ -563,9 +566,6 @@ dcnssi.timeDelay(execution)</bpmn:script> <dc:Bounds x="1165" y="336" width="54" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_07qrjro_di" bpmnElement="Activity_07qrjro"> - <dc:Bounds x="880" y="410" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNShape id="Gateway_1yftwt8_di" bpmnElement="Gateway_1yftwt8" isMarkerVisible="true"> <dc:Bounds x="1015" y="425" width="50" height="50" /> <bpmndi:BPMNLabel> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyAccessNSSI.bpmn index 3844770023..d3b67432fa 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoModifyAccessNSSI.bpmn @@ -236,7 +236,7 @@ nss.createFhAllocateNssiJobQuery(execution)</bpmn:script> <camunda:in source="esrInfo" target="esrInfo" /> <camunda:in source="serviceInfo" target="serviceInfo" /> <camunda:in source="TN_FH_jobId" target="jobId" /> - <camunda:out source="jobResponse" target="TNFH_jobResponse" /> + <camunda:out source="responseDescriptor" target="TNFH_jobResponse" /> <camunda:in source="responseId" target="responseId" /> <camunda:in source="job_timeout" target="timeout" /> </bpmn:extensionElements> @@ -280,7 +280,7 @@ nss.createMhAllocateNssiJobQuery(execution)</bpmn:script> <camunda:in source="esrInfo" target="esrInfo" /> <camunda:in source="serviceInfo" target="serviceInfo" /> <camunda:in source="TN_MH_jobId" target="jobId" /> - <camunda:out source="jobResponse" target="TNMH_jobResponse" /> + <camunda:out source="responseDescriptor" target="TNMH_jobResponse" /> <camunda:in source="responseId" target="responseId" /> <camunda:in source="job_timeout" target="timeout" /> </bpmn:extensionElements> diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java index 78b9bf1ee6..228e1bd0d8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java @@ -59,6 +59,8 @@ import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.client.RequestsDbClient; import org.springframework.core.env.Environment; +// deprecated because of task SO-3772, this class will be deleted after all its usage is removed +@Deprecated @RunWith(MockitoJUnitRunner.Silent.class) public abstract class BaseTaskTest extends TestDataSetup { @Mock diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java index cb46d2de8a..6a94ee9990 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java @@ -37,7 +37,6 @@ import org.mockito.ArgumentMatchers; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.common.InjectionHelper; import org.onap.so.bpmn.common.data.TestDataSetup; @@ -45,29 +44,34 @@ import org.onap.so.bpmn.infrastructure.aai.tasks.AAIFlagTasks; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.aaiclient.client.aai.AAIResourcesClient; -import org.onap.so.client.aai.mapper.AAIObjectMapper; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.client.orchestration.AAIVnfResources; -import org.springframework.beans.factory.annotation.Autowired; - - -public class AAIFlagTasksTest extends BaseTaskTest { +@RunWith(MockitoJUnitRunner.Silent.class) +public class AAIFlagTasksTest extends TestDataSetup { + @Mock + protected AAIResourcesClient MOCK_aaiResourcesClient; + @Mock + protected InjectionHelper MOCK_injectionHelper; + @Mock + protected ExceptionBuilder exceptionUtil; + @Mock + protected AAIVnfResources aaiVnfResources; + @Mock + protected ExtractPojosForBB extractPojosForBBMock; @InjectMocks - private AAIFlagTasks aaiFlagTasks = new AAIFlagTasks(); - - private GenericVnf genericVnf; + private AAIFlagTasks aaiFlagTasks; @Before public void before() throws BBObjectNotFoundException { - genericVnf = setGenericVnf(); + GenericVnf genericVnf = setGenericVnf(); doReturn(MOCK_aaiResourcesClient).when(MOCK_injectionHelper).getAaiClient(); - when(extractPojosForBB.extractByKey(any(), any())).thenReturn(genericVnf); + when(extractPojosForBBMock.extractByKey(any(), any())).thenReturn(genericVnf); } @Test - public void checkVnfInMaintTestTrue() throws Exception { + public void checkVnfInMaintTestTrue() { doThrow(new BpmnError("VNF is in maintenance in A&AI")).when(exceptionUtil) .buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class)); doReturn(false).when(aaiVnfResources).checkInMaintFlag(isA(String.class)); @@ -82,7 +86,7 @@ public class AAIFlagTasksTest extends BaseTaskTest { } @Test - public void checkVnfInMaintTestFalse() throws Exception { + public void checkVnfInMaintTestFalse() { doReturn(false).when(aaiVnfResources).checkInMaintFlag(isA(String.class)); aaiFlagTasks.checkVnfInMaintFlag(execution); verify(exceptionUtil, times(0)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), @@ -106,7 +110,7 @@ public class AAIFlagTasksTest extends BaseTaskTest { } @Test - public void modifyVnfInMaintFlagTest() throws Exception { + public void modifyVnfInMaintFlagTest() { doNothing().when(aaiVnfResources).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class)); aaiFlagTasks.modifyVnfInMaintFlag(execution, true); verify(aaiVnfResources, times(1)).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class)); @@ -128,7 +132,7 @@ public class AAIFlagTasksTest extends BaseTaskTest { } @Test - public void checkVnfClosedLoopDisabledTestTrue() throws Exception { + public void checkVnfClosedLoopDisabledTestTrue() { doThrow(new BpmnError("VNF Closed Loop Disabled in A&AI")).when(exceptionUtil) .buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class)); doReturn(false).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class)); @@ -142,7 +146,7 @@ public class AAIFlagTasksTest extends BaseTaskTest { } @Test - public void checkVnfClosedLoopDisabledTestFalse() throws Exception { + public void checkVnfClosedLoopDisabledTestFalse() { doReturn(false).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class)); aaiFlagTasks.checkVnfClosedLoopDisabledFlag(execution); verify(exceptionUtil, times(0)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), @@ -165,7 +169,7 @@ public class AAIFlagTasksTest extends BaseTaskTest { } @Test - public void modifyVnfClosedLoopDisabledFlagTest() throws Exception { + public void modifyVnfClosedLoopDisabledFlagTest() { doNothing().when(aaiVnfResources).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class)); aaiFlagTasks.modifyVnfClosedLoopDisabledFlag(execution, true); verify(aaiVnfResources, times(1)).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class)); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java index e1d3a7cbc4..857807ef2e 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java @@ -37,19 +37,21 @@ import java.util.List; import java.util.Optional; import java.util.TreeSet; import java.util.stream.Collectors; -import com.google.common.base.Strings; import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; import org.mockito.Captor; import org.mockito.InjectMocks; +import org.mockito.Mock; import org.mockito.Mockito; -import org.onap.so.bpmn.BaseTaskTest; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.common.data.TestDataSetup; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; @@ -68,14 +70,50 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule; import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; +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.orchestration.AAIConfigurationResources; +import org.onap.so.client.orchestration.AAIInstanceGroupResources; +import org.onap.so.client.orchestration.AAINetworkResources; +import org.onap.so.client.orchestration.AAIPnfResources; +import org.onap.so.client.orchestration.AAIServiceInstanceResources; +import org.onap.so.client.orchestration.AAIVfModuleResources; +import org.onap.so.client.orchestration.AAIVnfResources; +import org.onap.so.client.orchestration.AAIVolumeGroupResources; +import org.onap.so.client.orchestration.AAIVpnBindingResources; import org.onap.so.db.catalog.beans.OrchestrationStatus; - -public class AAICreateTasksTest extends BaseTaskTest { - +import org.springframework.core.env.Environment; + +@RunWith(MockitoJUnitRunner.Silent.class) +public class AAICreateTasksTest extends TestDataSetup { + + @Mock + protected ExceptionBuilder exceptionUtil; + @Mock + protected AAIServiceInstanceResources aaiServiceInstanceResources; + @Mock + protected AAIVolumeGroupResources aaiVolumeGroupResources; + @Mock + protected AAIVnfResources aaiVnfResources; + @Mock + protected AAINetworkResources aaiNetworkResources; + @Mock + protected AAIVfModuleResources aaiVfModuleResources; + @Mock + protected AAIPnfResources aaiPnfResources; + @Mock + protected AAIVpnBindingResources aaiVpnBindingResources; + @Mock + protected AAIInstanceGroupResources aaiInstanceGroupResources; + @Mock + protected AAIConfigurationResources aaiConfigurationResources; + @Mock + protected Environment env; + @Mock + protected ExtractPojosForBB extractPojosForBBMock; @InjectMocks - private AAICreateTasks aaiCreateTasks = new AAICreateTasks(); - + private AAICreateTasks aaiCreateTasks; private ServiceInstance serviceInstance; private L3Network network; @@ -107,17 +145,19 @@ public class AAICreateTasksTest extends BaseTaskTest { configuration = setConfiguration(); instanceGroup = setInstanceGroupVnf(); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) .thenReturn(genericVnf); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))).thenReturn(network); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VOLUME_GROUP_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))) + .thenReturn(vfModule); + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))) + .thenReturn(network); + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VOLUME_GROUP_ID))) .thenReturn(volumeGroup); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) .thenReturn(serviceInstance); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.CONFIGURATION_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.CONFIGURATION_ID))) .thenReturn(configuration); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.INSTANCE_GROUP_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.INSTANCE_GROUP_ID))) .thenReturn(instanceGroup); @@ -129,7 +169,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createServiceInstanceTest() throws Exception { + public void createServiceInstanceTest() { doReturn(false).when(aaiServiceInstanceResources).checkInstanceServiceNameInUse(serviceInstance); doNothing().when(aaiServiceInstanceResources).createServiceInstance(serviceInstance, customer); aaiCreateTasks.createServiceInstance(execution); @@ -137,7 +177,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createServiceInstanceExceptionTest() throws Exception { + public void createServiceInstanceExceptionTest() { expectedException.expect(BpmnError.class); lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, "notfound"); @@ -147,7 +187,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createVolumeGroupTest() throws Exception { + public void createVolumeGroupTest() { volumeGroup.setOrchestrationStatus(OrchestrationStatus.PRECREATED); execution.setVariable("aLaCarte", Boolean.FALSE); doNothing().when(aaiVolumeGroupResources).createVolumeGroup(volumeGroup, cloudRegion); @@ -161,7 +201,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createVolumeGroupExceptionTest() throws Exception { + public void createVolumeGroupExceptionTest() { expectedException.expect(BpmnError.class); volumeGroup.setOrchestrationStatus(OrchestrationStatus.PRECREATED); @@ -181,7 +221,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createPlatformTest() throws Exception { + public void createPlatformTest() { doNothing().when(aaiVnfResources).createPlatformandConnectVnf(genericVnf.getPlatform(), genericVnf); aaiCreateTasks.createPlatform(execution); ArgumentCaptor<Platform> platformCaptor = ArgumentCaptor.forClass(Platform.class); @@ -197,7 +237,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createPlatformNetworkTest() throws Exception { + public void createPlatformNetworkTest() { doNothing().when(aaiNetworkResources).createPlatformAndConnectNetwork(network.getPlatform(), network); aaiCreateTasks.createPlatformForNetwork(execution); ArgumentCaptor<Platform> platformCaptor = ArgumentCaptor.forClass(Platform.class); @@ -221,7 +261,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createLineOfBusinessTest() throws Exception { + public void createLineOfBusinessTest() { doNothing().when(aaiVnfResources).createLineOfBusinessandConnectVnf(genericVnf.getLineOfBusiness(), genericVnf); aaiCreateTasks.createLineOfBusiness(execution); @@ -243,7 +283,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void splitCDL_Test() throws Exception { + public void splitCDL_Test() { List<String> strings = aaiCreateTasks.splitCDL("Test"); assertEquals(strings.get(0), "Test"); @@ -252,7 +292,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createProjectExceptionTest() throws Exception { + public void createProjectExceptionTest() { expectedException.expect(BpmnError.class); lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, "notfound"); @@ -262,7 +302,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createProjectNullProjectNameTest() throws Exception { + public void createProjectNullProjectNameTest() { serviceInstance.getProject().setProjectName(null); doNothing().when(aaiServiceInstanceResources) .createProjectandConnectServiceInstance(serviceInstance.getProject(), serviceInstance); @@ -272,7 +312,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createProjectEmptyProjectNameTest() throws Exception { + public void createProjectEmptyProjectNameTest() { serviceInstance.getProject().setProjectName(""); doNothing().when(aaiServiceInstanceResources) .createProjectandConnectServiceInstance(serviceInstance.getProject(), serviceInstance); @@ -282,7 +322,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createOwningEntityTest() throws Exception { + public void createOwningEntityTest() { doReturn(true).when(aaiServiceInstanceResources).existsOwningEntity(serviceInstance.getOwningEntity()); doNothing().when(aaiServiceInstanceResources) .connectOwningEntityandServiceInstance(serviceInstance.getOwningEntity(), serviceInstance); @@ -293,7 +333,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createOwningEntityNotExistsOwningEntityTest() throws Exception { + public void createOwningEntityNotExistsOwningEntityTest() { doReturn(false).when(aaiServiceInstanceResources).existsOwningEntity(serviceInstance.getOwningEntity()); doNothing().when(aaiServiceInstanceResources) .createOwningEntityandConnectServiceInstance(serviceInstance.getOwningEntity(), serviceInstance); @@ -320,7 +360,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createOwningEntityNullOwningEntityNameTest() throws Exception { + public void createOwningEntityNullOwningEntityNameTest() { expectedException.expect(BpmnError.class); serviceInstance.getOwningEntity().setOwningEntityName(null); @@ -331,7 +371,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createOwningEntityEmptyOwningEntityNameTest() throws Exception { + public void createOwningEntityEmptyOwningEntityNameTest() { expectedException.expect(BpmnError.class); serviceInstance.getOwningEntity().setOwningEntityName(""); @@ -342,7 +382,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createOwningEntityExceptionTest() throws Exception { + public void createOwningEntityExceptionTest() { expectedException.expect(BpmnError.class); doReturn(true).when(aaiServiceInstanceResources).existsOwningEntity(serviceInstance.getOwningEntity()); @@ -354,7 +394,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createVnfTest() throws Exception { + public void createVnfTest() { doNothing().when(aaiVnfResources).createVnfandConnectServiceInstance(genericVnf, serviceInstance); execution.setVariable("aLaCarte", Boolean.FALSE); aaiCreateTasks.createVnf(execution); @@ -365,7 +405,7 @@ public class AAICreateTasksTest extends BaseTaskTest { public void createVnfExceptionTest() throws Exception { expectedException.expect(BpmnError.class); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "notfound"); - doThrow(BBObjectNotFoundException.class).when(extractPojosForBB).extractByKey(any(), + doThrow(BBObjectNotFoundException.class).when(extractPojosForBBMock).extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID)); doNothing().when(aaiVnfResources).createVnfandConnectServiceInstance(genericVnf, serviceInstance); aaiCreateTasks.createVnf(execution); @@ -374,7 +414,7 @@ public class AAICreateTasksTest extends BaseTaskTest { @Test public void createPnfShouldCallCreatePnfAndConnectServiceInstance() throws BBObjectNotFoundException { - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf); + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf); aaiCreateTasks.createPnf(execution); verify(aaiPnfResources, times(1)).createPnfAndConnectServiceInstance(pnf, serviceInstance); } @@ -382,7 +422,7 @@ public class AAICreateTasksTest extends BaseTaskTest { @Test public void createPnfShouldThrowBpmnErrorWhenPnfIsNotFound() throws BBObjectNotFoundException { expectedException.expect(BpmnError.class); - doThrow(BBObjectNotFoundException.class).when(extractPojosForBB).extractByKey(execution, ResourceKey.PNF); + doThrow(BBObjectNotFoundException.class).when(extractPojosForBBMock).extractByKey(execution, ResourceKey.PNF); aaiCreateTasks.createPnf(execution); } @@ -393,7 +433,7 @@ public class AAICreateTasksTest extends BaseTaskTest { newVfModule.setModuleIndex(null); newVfModule.getModelInfoVfModule().setModelInvariantUUID("testModelInvariantUUID1"); doNothing().when(aaiVfModuleResources).createVfModule(newVfModule, genericVnf); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))) .thenReturn(newVfModule); assertEquals(null, newVfModule.getModuleIndex()); @@ -425,7 +465,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createVfModuleExceptionTest() throws Exception { + public void createVfModuleExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(aaiVfModuleResources).createVfModule(vfModule, genericVnf); @@ -433,7 +473,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectVfModuleToVolumeGroupTest() throws Exception { + public void connectVfModuleToVolumeGroupTest() { doNothing().when(aaiVfModuleResources).connectVfModuleToVolumeGroup(genericVnf, vfModule, volumeGroup, cloudRegion); aaiCreateTasks.connectVfModuleToVolumeGroup(execution); @@ -442,7 +482,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkTest() throws Exception { + public void createNetworkTest() { network.getModelInfoNetwork().setNeutronNetworkType("PROVIDER"); execution.setVariable("aLaCarte", Boolean.FALSE); doNothing().when(aaiNetworkResources).createNetworkConnectToServiceInstance(network, serviceInstance); @@ -451,7 +491,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkExceptionTest() throws Exception { + public void createNetworkExceptionTest() { expectedException.expect(BpmnError.class); lookupKeyMap.put(ResourceKey.NETWORK_ID, "notfound"); @@ -479,7 +519,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkCollectionTest() throws Exception { + public void createNetworkCollectionTest() { doNothing().when(aaiNetworkResources).createNetworkCollection(serviceInstance.getCollection()); execution.setVariable("networkCollectionName", "testNetworkCollectionName"); aaiCreateTasks.createNetworkCollection(execution); @@ -487,7 +527,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkCollectionInstanceGroupTest() throws Exception { + public void createNetworkCollectionInstanceGroupTest() { doNothing().when(aaiNetworkResources) .createNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); execution.setVariable("aLaCarte", Boolean.FALSE); @@ -497,7 +537,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectNetworkToNetworkCollectionServiceInstanceTest() throws Exception { + public void connectNetworkToNetworkCollectionServiceInstanceTest() { doNothing().when(aaiNetworkResources).connectNetworkToNetworkCollectionServiceInstance(network, serviceInstance); aaiCreateTasks.connectNetworkToNetworkCollectionServiceInstance(execution); @@ -506,7 +546,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectNetworkToNetworkCollectionInstanceGroupTest() throws Exception { + public void connectNetworkToNetworkCollectionInstanceGroupTest() { doNothing().when(aaiNetworkResources).connectNetworkToNetworkCollectionInstanceGroup(network, serviceInstance.getCollection().getInstanceGroup()); aaiCreateTasks.connectNetworkToNetworkCollectionInstanceGroup(execution); @@ -526,9 +566,9 @@ public class AAICreateTasksTest extends BaseTaskTest { gBBInput.setServiceInstance(serviceInstance); lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstance.getServiceInstanceId()); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) .thenReturn(serviceInstance); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))) .thenReturn(serviceInstance); // verify connection call was not executednetwork exception.expect(BpmnError.class); @@ -537,7 +577,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectNetworkToCloudRegionTest() throws Exception { + public void connectNetworkToCloudRegionTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiNetworkResources).connectNetworkToCloudRegion(network, gBBInput.getCloudRegion()); aaiCreateTasks.connectNetworkToCloudRegion(execution); @@ -545,7 +585,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectNetworkToTenantTest() throws Exception { + public void connectNetworkToTenantTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiNetworkResources).connectNetworkToTenant(network, gBBInput.getCloudRegion()); aaiCreateTasks.connectNetworkToTenant(execution); @@ -553,7 +593,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createConfigurationTest() throws Exception { + public void createConfigurationTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiConfigurationResources).createConfiguration(configuration); execution.setVariable("aLaCarte", Boolean.FALSE); @@ -562,7 +602,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectVnfToCloudRegionTest() throws Exception { + public void connectVnfToCloudRegionTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiVnfResources).connectVnfToCloudRegion(genericVnf, gBBInput.getCloudRegion()); aaiCreateTasks.connectVnfToCloudRegion(execution); @@ -570,7 +610,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectNoneToVnfToCloudRegionTest() throws Exception { + public void connectNoneToVnfToCloudRegionTest() { String[] arr = new String[1]; arr[0] = "test25Region2"; doReturn(arr).when(env).getProperty("mso.bpmn.cloudRegionIdsToSkipAddingVnfEdgesTo", String[].class); @@ -582,7 +622,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void connectVnfTenantTest() throws Exception { + public void connectVnfTenantTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiVnfResources).connectVnfToTenant(genericVnf, gBBInput.getCloudRegion()); aaiCreateTasks.connectVnfToTenant(execution); @@ -590,7 +630,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createInstanceGroupVnfTest() throws Exception { + public void createInstanceGroupVnfTest() { doReturn(false).when(aaiInstanceGroupResources) .checkInstanceGroupNameInUse(instanceGroup.getInstanceGroupName()); doNothing().when(aaiInstanceGroupResources).createInstanceGroupandConnectServiceInstance(instanceGroup, @@ -602,7 +642,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createInstanceGroupVnfExceptionTest() throws Exception { + public void createInstanceGroupVnfExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(aaiInstanceGroupResources) .createInstanceGroupandConnectServiceInstance(instanceGroup, serviceInstance); @@ -610,7 +650,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkPolicyNeedToCreateAllTest() throws Exception { + public void createNetworkPolicyNeedToCreateAllTest() { execution.setVariable("heatStackId", "testHeatStackId"); execution.setVariable("contrailNetworkPolicyFqdnList", "ABC123,ED456"); Optional<NetworkPolicy> networkPolicy = Optional.empty(); @@ -625,7 +665,7 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkPolicyNeedToCreateNoneTest() throws Exception { + public void createNetworkPolicyNeedToCreateNoneTest() { execution.setVariable("heatStackId", "testHeatStackId"); execution.setVariable("contrailNetworkPolicyFqdnList", "ABC123"); NetworkPolicy networkPolicy = new NetworkPolicy(); @@ -636,14 +676,14 @@ public class AAICreateTasksTest extends BaseTaskTest { } @Test - public void createNetworkPolicyNoNetworkPoliciesTest() throws Exception { + public void createNetworkPolicyNoNetworkPoliciesTest() { execution.setVariable("heatStackId", "testHeatStackId"); aaiCreateTasks.createNetworkPolicies(execution); verify(aaiNetworkResources, times(0)).createNetworkPolicy(any(NetworkPolicy.class)); } @Test - public void createVfModuleGetLowestIndexTest() throws Exception { + public void createVfModuleGetLowestIndexTest() { GenericVnf vnf = new GenericVnf(); ModelInfoGenericVnf vnfInfo = new ModelInfoGenericVnf(); vnf.setModelInfoGenericVnf(vnfInfo); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java index 243b452d18..60dbadd426 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java @@ -35,13 +35,16 @@ import java.util.Optional; import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; import org.mockito.Captor; import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.aai.domain.yang.NetworkPolicies; -import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.common.data.TestDataSetup; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; @@ -53,14 +56,41 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.aaiclient.client.aai.entities.AAIResultWrapper; import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; - - -public class AAIDeleteTasksTest extends BaseTaskTest { +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; +import org.onap.so.client.orchestration.AAIInstanceGroupResources; +import org.onap.so.client.orchestration.AAINetworkResources; +import org.onap.so.client.orchestration.AAIServiceInstanceResources; +import org.onap.so.client.orchestration.AAIVfModuleResources; +import org.onap.so.client.orchestration.AAIVnfResources; +import org.onap.so.client.orchestration.AAIVolumeGroupResources; + +@RunWith(MockitoJUnitRunner.Silent.class) +public class AAIDeleteTasksTest extends TestDataSetup { private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/"; + @Mock + protected ExceptionBuilder exceptionUtil; + @Mock + protected AAIVfModuleResources aaiVfModuleResources; + @Mock + protected AAIServiceInstanceResources aaiServiceInstanceResources; + @Mock + protected AAIVnfResources aaiVnfResources; + @Mock + protected AAINetworkResources aaiNetworkResources; + @Mock + protected AAIVolumeGroupResources aaiVolumeGroupResources; + @Mock + protected AAIConfigurationResources aaiConfigurationResources; + @Mock + protected AAIInstanceGroupResources aaiInstanceGroupResources; + @Mock + protected ExtractPojosForBB extractPojosForBBMock; @InjectMocks - private AAIDeleteTasks aaiDeleteTasks = new AAIDeleteTasks(); + private AAIDeleteTasks aaiDeleteTasks; private L3Network network; private ServiceInstance serviceInstance; @@ -85,17 +115,19 @@ public class AAIDeleteTasksTest extends BaseTaskTest { configuration = setConfiguration(); instanceGroup = setInstanceGroupVnf(); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) .thenReturn(genericVnf); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))).thenReturn(vfModule); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))).thenReturn(network); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VOLUME_GROUP_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VF_MODULE_ID))) + .thenReturn(vfModule); + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.NETWORK_ID))) + .thenReturn(network); + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.VOLUME_GROUP_ID))) .thenReturn(volumeGroup); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) .thenReturn(serviceInstance); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.CONFIGURATION_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.CONFIGURATION_ID))) .thenReturn(configuration); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.INSTANCE_GROUP_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.INSTANCE_GROUP_ID))) .thenReturn(instanceGroup); @@ -195,7 +227,7 @@ public class AAIDeleteTasksTest extends BaseTaskTest { } @Test - public void deleteConfigurationTest() throws Exception { + public void deleteConfigurationTest() { gBBInput = execution.getGeneralBuildingBlock(); doNothing().when(aaiConfigurationResources).deleteConfiguration(configuration); aaiDeleteTasks.deleteConfiguration(execution); @@ -203,7 +235,7 @@ public class AAIDeleteTasksTest extends BaseTaskTest { } @Test - public void deleteInstanceGroupVnfTest() throws Exception { + public void deleteInstanceGroupVnfTest() { doNothing().when(aaiInstanceGroupResources).deleteInstanceGroup(instanceGroup); aaiDeleteTasks.deleteInstanceGroupVnf(execution); verify(aaiInstanceGroupResources, times(1)).deleteInstanceGroup(instanceGroup); @@ -231,7 +263,7 @@ public class AAIDeleteTasksTest extends BaseTaskTest { } @Test - public void deleteNetworkPolicyNeedToDeleteNoneTest() throws Exception { + public void deleteNetworkPolicyNeedToDeleteNoneTest() { execution.setVariable("contrailNetworkPolicyFqdnList", "ABC123"); Optional<NetworkPolicies> networkPolicies = Optional.empty(); doReturn(networkPolicies).when(aaiNetworkResources).getNetworkPolicies(any(AAIBaseResourceUri.class)); @@ -240,7 +272,7 @@ public class AAIDeleteTasksTest extends BaseTaskTest { } @Test - public void deleteNetworkPolicyNoNetworkPoliciesTest() throws Exception { + public void deleteNetworkPolicyNoNetworkPoliciesTest() { aaiDeleteTasks.deleteNetworkPolicies(execution); verify(aaiNetworkResources, times(0)).deleteNetworkPolicy(any(String.class)); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivityTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivityTest.java index 1fde3f4fbc..5917bd5e36 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivityTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivityTest.java @@ -20,7 +20,6 @@ package org.onap.so.bpmn.infrastructure.activity; - import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; @@ -33,19 +32,22 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Spy; -import org.onap.so.bpmn.BaseTaskTest; +import org.mockito.junit.MockitoJUnitRunner; +import org.onap.so.bpmn.common.data.TestDataSetup; import org.onap.so.bpmn.core.WorkflowException; import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowActionBBFailure; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.client.exception.ExceptionBuilder; -public class ExecuteActivityTest extends BaseTaskTest { +@RunWith(MockitoJUnitRunner.Silent.class) +public class ExecuteActivityTest extends TestDataSetup { @InjectMocks - protected ExecuteActivity executeActivity = new ExecuteActivity(); + protected ExecuteActivity executeActivity; @InjectMocks @Spy @@ -105,7 +107,7 @@ public class ExecuteActivityTest extends BaseTaskTest { } @Test - public void buildAndThrowException_Test() throws Exception { + public void buildAndThrowException_Test() { doNothing().when(workflowActionBBFailure).updateRequestStatusToFailed(execution); doReturn("Process key").when(exceptionBuilder).getProcessKey(execution); thrown.expect(BpmnError.class); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java index f23bbd8c91..ab0704430c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java @@ -35,21 +35,37 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.appc.client.lcm.model.Action; -import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.common.data.TestDataSetup; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.appc.ApplicationControllerAction; import org.onap.so.client.exception.BBObjectNotFoundException; +import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.beans.ControllerSelectionReference; - -public class GenericVnfHealthCheckTest extends BaseTaskTest { - +import org.onap.so.db.catalog.client.CatalogDbClient; + +@RunWith(MockitoJUnitRunner.Silent.class) +public class GenericVnfHealthCheckTest extends TestDataSetup { + + @Mock + protected ExceptionBuilder exceptionUtil; + @Mock + protected CatalogDbClient catalogDbClient; + @Mock + protected ApplicationControllerAction appCClient; + @Mock + protected ExtractPojosForBB extractPojosForBBMock; @InjectMocks - private GenericVnfHealthCheck genericVnfHealthCheck = new GenericVnfHealthCheck(); + private GenericVnfHealthCheck genericVnfHealthCheck; private GenericVnf genericVnf; private RequestContext requestContext; @@ -65,12 +81,12 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { doThrow(new BpmnError("BPMN Error")).when(exceptionUtil) .buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(Exception.class)); - when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) + when(extractPojosForBBMock.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.GENERIC_VNF_ID))) .thenReturn(genericVnf); } @Test - public void setParamsForGenericVnfHealthCheckTest() throws Exception { + public void setParamsForGenericVnfHealthCheckTest() { ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); controllerSelectionReference.setControllerName("testName"); controllerSelectionReference.setActionCategory("testAction"); @@ -91,12 +107,12 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { } @Test - public void callAppcClientTest() throws Exception { + public void callAppcClientTest() { Action action = Action.HealthCheck; String vnfId = genericVnf.getVnfId(); String payload = "{\"testName\":\"testValue\",}"; String controllerType = "testType"; - HashMap<String, String> payloadInfo = new HashMap<String, String>(); + HashMap<String, String> payloadInfo = new HashMap<>(); payloadInfo.put("vnfName", "testVnfName"); payloadInfo.put("vfModuleId", "testVfModuleId"); payloadInfo.put("oamIpAddress", "testOamIpAddress"); @@ -120,13 +136,13 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { } @Test - public void callAppcClientExceptionTest() throws Exception { + public void callAppcClientExceptionTest() { expectedException.expect(BpmnError.class); Action action = Action.HealthCheck; String vnfId = genericVnf.getVnfId(); String payload = "{\"testName\":\"testValue\",}"; String controllerType = "testType"; - HashMap<String, String> payloadInfo = new HashMap<String, String>(); + HashMap<String, String> payloadInfo = new HashMap<>(); payloadInfo.put("vnfName", "testVnfName"); payloadInfo.put("vfModuleId", "testVfModuleId"); payloadInfo.put("oamIpAddress", "testOamIpAddress"); @@ -160,7 +176,7 @@ public class GenericVnfHealthCheckTest extends BaseTaskTest { String vnfId = genericVnf.getVnfId(); String payload = "{\"testName\":\"testValue\",}"; String controllerType = "testType"; - HashMap<String, String> payloadInfo = new HashMap<String, String>(); + HashMap<String, String> payloadInfo = new HashMap<>(); payloadInfo.put("vnfName", "testVnfName"); payloadInfo.put("vfModuleId", "testVfModuleId"); payloadInfo.put("oamIpAddress", "testOamIpAddress"); diff --git a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java index dca249336e..ffce5e9a23 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java @@ -49,6 +49,9 @@ public class TnSliceProfile implements Serializable { @JsonProperty(value = "jitter") private int jitter; + @JsonProperty(value = "domainType") + private String domainType; + @JsonProperty(value = "resourceSharingLevel") private ResourceSharingLevel resourceSharingLevel; } diff --git a/docs/conf.py b/docs/conf.py index 5371015c66..d211470a62 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,4 +12,4 @@ intersphinx_mapping = {} html_last_updated_fmt = '%d-%b-%y %H:%M' def setup(app): - app.add_stylesheet("css/ribbon.css") + app.add_css_file("css/ribbon.css") diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index b3188ddd38..74a3b7a3fd 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,15 +1 @@ -tox -Sphinx -doc8 -docutils -setuptools -six -sphinx_rtd_theme>=0.4.3 -sphinxcontrib-blockdiag -sphinxcontrib-needs>=0.2.3 -sphinxcontrib-nwdiag -sphinxcontrib-seqdiag -sphinxcontrib-swaggerdoc -sphinxcontrib-plantuml -sphinx_bootstrap_theme lfdocs-conf diff --git a/docs/tox.ini b/docs/tox.ini index edac8c35fc..811bb5e8ad 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -1,11 +1,14 @@ [tox] minversion = 1.6 -envlist = docs, +envlist = docs skipsdist = true [testenv:docs] basepython = python3 -deps = -r{toxinidir}/requirements-docs.txt +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt commands = sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html echo "Generated docs available in {toxinidir}/_build/html" @@ -16,7 +19,10 @@ whitelist_externals = [testenv:docs-linkcheck] basepython = python3 -#deps = -r{toxinidir}/requirements-docs.txt +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt commands = echo "Link Checking not enforced" #commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck whitelist_externals = echo diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java new file mode 100644 index 0000000000..798604e4fb --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockRollback.java @@ -0,0 +1,134 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2021 Bell Canada. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.beans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.openpojo.business.annotation.BusinessKey; +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import uk.co.blackpepper.bowman.annotation.RemoteResource; + +@Entity +@RemoteResource("/buildingBlockRollback") +@Table(name = "building_block_rollback") +public class BuildingBlockRollback implements Serializable { + + private static final long serialVersionUID = 1; + + @Id + @BusinessKey + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID", nullable = false, updatable = false) + private Integer id; + + @BusinessKey + @JsonProperty("building_block_name") + @Column(name = "BUILDING_BLOCK_NAME", nullable = false, length = 200) + private String buildingBlockName; + + @BusinessKey + @JsonProperty("action") + @Column(name = "ACTION", length = 200) + private String action; + + @BusinessKey + @JsonProperty("rollback_building_block_name") + @Column(name = "ROLLBACK_BUILDING_BLOCK_NAME", nullable = false, length = 200) + private String rollbackBuildingBlockName; + + @BusinessKey + @JsonProperty("rollback_action") + @Column(name = "ROLLBACK_ACTION", length = 200) + private String rollbackAction; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getBuildingBlockName() { + return buildingBlockName; + } + + public void setBuildingBlockName(String buildingBlockName) { + this.buildingBlockName = buildingBlockName; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getRollbackBuildingBlockName() { + return rollbackBuildingBlockName; + } + + public void setRollbackBuildingBlockName(String rollbackBuildingBlockName) { + this.rollbackBuildingBlockName = rollbackBuildingBlockName; + } + + public String getRollbackAction() { + return rollbackAction; + } + + public void setRollbackAction(String rollbackAction) { + this.rollbackAction = rollbackAction; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BuildingBlockRollback that = (BuildingBlockRollback) o; + return id.equals(that.id) && buildingBlockName.equals(that.buildingBlockName) + && Objects.equals(action, that.action) + && rollbackBuildingBlockName.equals(that.rollbackBuildingBlockName) + && Objects.equals(rollbackAction, that.rollbackAction); + } + + @Override + public int hashCode() { + return Objects.hash(id, buildingBlockName, action, rollbackBuildingBlockName, rollbackAction); + } + + @Override + public String toString() { + return "BuildingBlockRollback{" + "id='" + id + '\'' + ", buildingBlockName='" + buildingBlockName + '\'' + + ", action='" + action + '\'' + ", rollbackBuildingBlockName='" + rollbackBuildingBlockName + '\'' + + ", rollbackAction='" + rollbackAction + '\'' + '}'; + } +} diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index ae6d51c6a2..45d6a878ed 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -25,6 +25,7 @@ import java.net.URI; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Set; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import javax.persistence.EntityNotFoundException; @@ -35,6 +36,7 @@ import org.onap.logging.filter.base.Constants; import org.onap.logging.filter.spring.SpringClientPayloadFilter; import org.onap.so.db.catalog.beans.BBNameSelectionReference; import org.onap.so.db.catalog.beans.BuildingBlockDetail; +import org.onap.so.db.catalog.beans.BuildingBlockRollback; import org.onap.so.db.catalog.beans.CloudSite; import org.onap.so.db.catalog.beans.CloudifyManager; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; @@ -126,6 +128,7 @@ public class CatalogDbClient { private static final String WORKFLOW = "/workflow"; private static final String BB_NAME_SELECTION_REFERENCE = "/bbNameSelectionReference"; private static final String PROCESSING_FLAGS = "/processingFlags"; + private static final String BB_ROLLBACK = "/buildingBlockRollback"; private static final String SEARCH = "/search"; @@ -236,6 +239,7 @@ public class CatalogDbClient { private String pnfResourceURI; private String pnfResourceCustomizationURI; private String workflowURI; + private String buildingBlockRollbacksURI; private final Client<Service> serviceClient; @@ -299,6 +303,8 @@ public class CatalogDbClient { private final Client<ProcessingFlags> processingFlagsClient; + private final Client<BuildingBlockRollback> buildingBlockRollbackClient; + @Value("${mso.catalog.db.spring.endpoint:#{null}}") private String endpoint; @@ -391,7 +397,7 @@ public class CatalogDbClient { pnfResourceURI = endpoint + PNF_RESOURCE + URI_SEPARATOR; pnfResourceCustomizationURI = endpoint + PNF_RESOURCE_CUSTOMIZATION + URI_SEPARATOR; workflowURI = endpoint + WORKFLOW + URI_SEPARATOR; - + buildingBlockRollbacksURI = endpoint + BB_ROLLBACK + URI_SEPARATOR; } public CatalogDbClient() { @@ -445,6 +451,7 @@ public class CatalogDbClient { bbNameSelectionReferenceClient = clientFactory.create(BBNameSelectionReference.class); processingFlagsClient = clientFactory.create(ProcessingFlags.class); networkResourceClient = clientFactory.create(NetworkResource.class); + buildingBlockRollbackClient = clientFactory.create(BuildingBlockRollback.class); } public CatalogDbClient(String baseUri, String auth) { @@ -498,6 +505,7 @@ public class CatalogDbClient { bbNameSelectionReferenceClient = clientFactory.create(BBNameSelectionReference.class); processingFlagsClient = clientFactory.create(ProcessingFlags.class); networkResourceClient = clientFactory.create(NetworkResource.class); + buildingBlockRollbackClient = clientFactory.create(BuildingBlockRollback.class); } public NetworkCollectionResourceCustomization getNetworkCollectionResourceCustomizationByID( @@ -1224,6 +1232,20 @@ public class CatalogDbClient { getUri(UriBuilder.fromUri(findProcessingFlagsByFlag).queryParam(FLAG, flag).build().toString())); } + // TODO: redo using buildingBlockRollbackClient + public List<BuildingBlockRollback> getBuildingBlockRollbackEntries() { + try { + HttpEntity<?> entity = getHttpEntity(); + return restTemplate.exchange( + UriComponentsBuilder.fromUriString(endpoint + "/ecomp/mso/catalog/v1/buildingBlockRollback").build() + .encode().toString(), + HttpMethod.GET, entity, new ParameterizedTypeReference<List<BuildingBlockRollback>>() {}).getBody(); + } catch (HttpClientErrorException e) { + logger.error("Error Calling catalog database", e); + throw e; + } + } + public String getEndpoint() { return endpoint; } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockRollbackRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockRollbackRepository.java new file mode 100644 index 0000000000..24dd713197 --- /dev/null +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/BuildingBlockRollbackRepository.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Bell Canada + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.so.db.catalog.data.repository; + +import java.util.List; +import org.onap.so.db.catalog.beans.BuildingBlockRollback; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +@RepositoryRestResource(collectionResourceRel = "buildingBlockRollback", path = "buildingBlockRollback") +public interface BuildingBlockRollbackRepository extends JpaRepository<BuildingBlockRollback, Integer> { + + List<BuildingBlockRollback> findAll(); + + BuildingBlockRollback findOneById(Integer ID); +} diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql index 86f56ca3a5..db800b2b49 100644 --- a/mso-catalog-db/src/test/resources/schema.sql +++ b/mso-catalog-db/src/test/resources/schema.sql @@ -1415,3 +1415,12 @@ CREATE TABLE IF NOT EXISTS `processing_flags` ( PRIMARY KEY (`ID`), UNIQUE KEY `UK_processing_flags` (`FLAG`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE IF NOT EXISTS `building_block_rollback` ( + `ID` INT NOT NULL AUTO_INCREMENT, + `BUILDING_BLOCK_NAME` varchar(200) NOT NULL, + `ACTION` varchar(200) null, + `ROLLBACK_BUILDING_BLOCK_NAME` varchar(200) NOT NULL, + `ROLLBACK_ACTION` varchar(200) NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -965,7 +965,7 @@ <dependency> <groupId>org.onap.aai.schema-service</groupId> <artifactId>aai-schema</artifactId> - <version>1.9.1</version> + <version>1.9.2</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> |