diff options
18 files changed, 916 insertions, 621 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-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/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; diff --git a/releases/1.9.2.yaml b/releases/1.9.2.yaml new file mode 100644 index 0000000000..7c04ff1cfa --- /dev/null +++ b/releases/1.9.2.yaml @@ -0,0 +1,22 @@ + +--- +distribution_type: 'container' +container_release_tag: '1.9.2' +project: 'so' +log_dir: 'so-maven-docker-stage-master/880/' +ref: 'c0c57ed8c3ca558cb09e7885a9416accd2b80a67' +containers: + - name: 'so/catalog-db-adapter' + version: '1.9.2-20211012T0420' + - name: 'so/request-db-adapter' + version: '1.9.2-20211012T0420' + - name: 'so/openstack-adapter' + version: '1.9.2-20211012T0420' + - name: 'so/sdnc-adapter' + version: '1.9.2-20211012T0420' + - name: 'so/sdc-controller' + version: '1.9.2-20211012T0420' + - name: 'so/bpmn-infra' + version: '1.9.2-20211012T0420' + - name: 'so/api-handler-infra' + version: '1.9.2-20211012T0420' diff --git a/so-optimization-clients/src/main/java/org/onap/so/client/oof/OofValidator.java b/so-optimization-clients/src/main/java/org/onap/so/client/oof/OofValidator.java index 2c22d9d09e..c6d8e86d4d 100644 --- a/so-optimization-clients/src/main/java/org/onap/so/client/oof/OofValidator.java +++ b/so-optimization-clients/src/main/java/org/onap/so/client/oof/OofValidator.java @@ -21,12 +21,12 @@ package org.onap.so.client.oof; +import java.util.Map; import org.json.JSONObject; import org.onap.so.client.exception.BadResponseException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import java.util.LinkedHashMap; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -38,9 +38,9 @@ public class OofValidator { /** * Validates the synchronous homing response from oof * - * @throws BadResponseException + * @throws BadResponseException when validation failed */ - public void validateDemandsResponse(LinkedHashMap<?, ?> response) throws BadResponseException { + public void validateDemandsResponse(Map<?, ?> response) throws BadResponseException { logger.debug("Validating oofs synchronous response"); if (!response.isEmpty()) { JSONObject jsonResponse = new JSONObject(response); @@ -51,12 +51,12 @@ public class OofValidator { } else { String message = jsonResponse.getString("statusMessage"); if (isNotBlank(message)) { - logger.debug("oofs response indicates failed: " + message); + logger.debug("oofs response indicates failed: {}", message); } else { logger.debug("oofs response indicates failed: no status message provided"); message = "error message not provided"; } - throw new BadResponseException("oofs synchronous response indicates failed: " + message); + throw new BadResponseException("oofs synchronous response indicates failed: {}", message); } } else { logger.debug("oofs synchronous response does not contain: request status"); @@ -71,7 +71,7 @@ public class OofValidator { /** * Validates the asynchronous/callback response from oof which contains the homing and licensing solutions * - * @throws BadResponseException + * @throws BadResponseException when validation failed */ public void validateSolution(String response) throws BadResponseException { logger.debug("Validating oofs asynchronous callback response"); @@ -82,7 +82,7 @@ public class OofValidator { } else { String message = jsonResponse.getJSONObject("serviceException").getString("text"); if (isNotBlank(message)) { - logger.debug("oofs response contains a service exception: " + message); + logger.debug("oofs response contains a service exception: {}", message); } else { logger.debug("oofs response contains a service exception: no service exception text provided"); message = "error message not provided"; diff --git a/so-optimization-clients/src/test/java/org/onap/so/client/oof/OofValidatorTest.java b/so-optimization-clients/src/test/java/org/onap/so/client/oof/OofValidatorTest.java new file mode 100644 index 0000000000..5f9be78491 --- /dev/null +++ b/so-optimization-clients/src/test/java/org/onap/so/client/oof/OofValidatorTest.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2021 Nokia + * ================================================================================ + * 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.client.oof; + +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import org.junit.Test; +import org.onap.so.client.exception.BadResponseException; + +public class OofValidatorTest { + + @Test + public void validateDemandsResponse_success() throws Exception { + Map<String, String> map = new LinkedHashMap<>(); + map.put("requestStatus", "accepted"); + new OofValidator().validateDemandsResponse(map); + } + + @Test(expected = BadResponseException.class) + public void validateDemandsResponse_mapIsEmpty() throws Exception { + new OofValidator().validateDemandsResponse(Collections.emptyMap()); + } + + @Test(expected = BadResponseException.class) + public void validateDemandsResponse_lackOfRequestStatus() throws Exception { + Map<String, String> map = new LinkedHashMap<>(); + map.put("a", "a"); + new OofValidator().validateDemandsResponse(map); + } + + @Test(expected = BadResponseException.class) + public void validateDemandsResponse_lackOfRequestStatusProperValue() throws Exception { + Map<String, String> map = new HashMap<>(); + map.put("requestStatus", "a"); + map.put("statusMessage", "a"); + new OofValidator().validateDemandsResponse(map); + } +} diff --git a/version.properties b/version.properties index ece298009d..ccc7b6172b 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ major=1 minor=9 -patch=1 +patch=2 base_version=${major}.${minor}.${patch} |