aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.1__ServiceProxyTableConsolidation.sql44
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/schema.sql52
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java13
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java45
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java19
-rw-r--r--asdc-controller/src/test/resources/ASDC/TestBB.bpmn53
-rw-r--r--asdc-controller/src/test/resources/schema.sql63
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy12
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/NetworkUtilsTest.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtilTest.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VidUtilsTest.groovy34
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml30
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn6
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy2
-rwxr-xr-xbpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn5
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn4
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java20
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java20
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java19
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingRequestObjectBuilder.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java5
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java18
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientTest.java99
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/AssignResponse.json14
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/ErrorResponse.json6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/UnassignResponse.json14
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml2
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java11
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIVersion.java8
-rw-r--r--common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java2
-rw-r--r--common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java9
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql63
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java26
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResource.java158
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResourceCustomization.java83
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceCustomizationRepository.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceRepository.java29
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql53
76 files changed, 602 insertions, 580 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.1__ServiceProxyTableConsolidation.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.1__ServiceProxyTableConsolidation.sql
new file mode 100644
index 0000000000..c196f8f6e3
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.1__ServiceProxyTableConsolidation.sql
@@ -0,0 +1,44 @@
+use catalogdb;
+
+/* Consolidate Service_Proxy_Customization and Service_Proxy tables into a new table also called Service_Proxy_Customization */
+
+ALTER TABLE service_proxy_customization DROP FOREIGN KEY fk_service_proxy_resource_customization__service1;
+
+ALTER TABLE service_proxy_customization DROP FOREIGN KEY fk_spr_customization__service_proxy_resource1;
+
+ALTER TABLE configuration_customization DROP FOREIGN KEY fk_configuration_customization__service_proxy_customization1;
+
+CREATE TABLE IF NOT EXISTS `service_proxy_customization_temp` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `catalogdb`.`service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
+
+INSERT INTO catalogdb.service_proxy_customization_temp (model_customization_uuid,model_instance_name,model_uuid,model_invariant_uuid,model_version,model_name,tosca_node_type,description,source_service_model_uuid)
+SELECT T1.model_customization_uuid, T1.model_instance_name,T2.model_uuid, T2.model_invariant_uuid, T2.model_version, T2.model_name, T1.tosca_node_type, T2.description, T1.source_service_model_uuid
+ FROM catalogdb.service_proxy_customization T1
+ JOIN catalogdb.service_proxy T2 ON T1.service_proxy_model_uuid = T2.model_uuid;
+
+DROP TABLE service_proxy_customization;
+
+DROP TABLE service_proxy;
+
+RENAME TABLE service_proxy_customization_temp TO service_proxy_customization;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index b1e4a758fd..94434cd781 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -803,7 +803,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
throw new VnfException(error, MsoExceptionCategory.USERDATA);
} else {
- LOGGER.debug("Found vfModuleCust entry " + vfmc.toString());
+ LOGGER.trace("Found vfModuleCust entry " + vfmc.toString());
}
if (vf.getIsBase()) {
isBaseRequest = true;
diff --git a/adapters/mso-openstack-adapters/src/test/resources/schema.sql b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
index 0c67123f56..72810d6f3c 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/schema.sql
+++ b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
@@ -502,36 +502,30 @@ default character set = latin1;
engine = innodb auto_increment = 20654
default character set = latin1;
- create table if not exists `service_proxy` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
+ CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
-create table if not exists `service_proxy_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`tosca_node_type` varchar(200) not null,
-`source_service_model_uuid` varchar(200) not null,
-`creation_timestamp` datetime not null default current_timestamp,
-`service_proxy_model_uuid` varchar(200) not null,
-primary key (`model_customization_uuid`),
-index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
-index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
-constraint`fk_spr_customization__service_proxy_resource1`
-foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_service_proxy_resource_customization__service1`
-foreign key (`source_service_model_uuid`) references `service`
-(`model_uuid`) on delete cascade on update cascade)
-engine = innodb
-auto_increment = 20654
-default character set = latin1;
create table if not exists `configuration_customization` (
`model_customization_uuid` varchar(200) not null,
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
index 72aa3c7f5b..179dac3c35 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/ToscaResourceStructure.java
@@ -42,7 +42,6 @@ import org.onap.so.db.catalog.beans.NetworkInstanceGroup;
import org.onap.so.db.catalog.beans.NetworkResource;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
-import org.onap.so.db.catalog.beans.ServiceProxyResource;
import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
import org.onap.so.db.catalog.beans.TempNetworkHeatTemplateLookup;
import org.onap.so.db.catalog.beans.ToscaCsar;
@@ -83,9 +82,7 @@ public class ToscaResourceStructure {
private CollectionResourceCustomization catalogCollectionResourceCustomization;
private NetworkCollectionResourceCustomization catalogNetworkCollectionResourceCustomization;
-
- private ServiceProxyResource catalogServiceProxyResource;
-
+
private ServiceProxyResourceCustomization catalogServiceProxyResourceCustomization;
private ConfigurationResource catalogConfigurationResource;
@@ -443,14 +440,6 @@ public class ToscaResourceStructure {
this.catalogNetworkCollectionResourceCustomization = catalogNetworkCollectionResourceCustomization;
}
- public ServiceProxyResource getCatalogServiceProxyResource() {
- return catalogServiceProxyResource;
- }
-
- public void setCatalogServiceProxyResource(ServiceProxyResource catalogServiceProxyResource) {
- this.catalogServiceProxyResource = catalogServiceProxyResource;
- }
-
public ServiceProxyResourceCustomization getCatalogServiceProxyResourceCustomization() {
return catalogServiceProxyResourceCustomization;
}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index bde43b0845..722e1599b6 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -73,7 +73,6 @@ import org.onap.so.db.catalog.beans.NetworkInstanceGroup;
import org.onap.so.db.catalog.beans.NetworkResource;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
-import org.onap.so.db.catalog.beans.ServiceProxyResource;
import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
import org.onap.so.db.catalog.beans.SubType;
import org.onap.so.db.catalog.beans.TempNetworkHeatTemplateLookup;
@@ -99,7 +98,6 @@ import org.onap.so.db.catalog.data.repository.InstanceGroupRepository;
import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository;
import org.onap.so.db.catalog.data.repository.NetworkResourceRepository;
import org.onap.so.db.catalog.data.repository.ServiceProxyResourceCustomizationRepository;
-import org.onap.so.db.catalog.data.repository.ServiceProxyResourceRepository;
import org.onap.so.db.catalog.data.repository.ServiceRepository;
import org.onap.so.db.catalog.data.repository.TempNetworkHeatTemplateRepository;
import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository;
@@ -147,10 +145,7 @@ public class ToscaResourceInstaller {
@Autowired
protected ServiceProxyResourceCustomizationRepository serviceProxyCustomizationRepo;
-
- @Autowired
- protected ServiceProxyResourceRepository serviceProxyRepo;
-
+
@Autowired
protected CollectionResourceRepository collectionRepo;
@@ -401,7 +396,7 @@ public class ToscaResourceInstaller {
for (NodeTemplate spNode : serviceProxyResourceList) {
serviceProxy = createServiceProxy(spNode, service, toscaResourceStruct);
- ServiceProxyResource serviceProxyResource = findExistingServiceProxyResource(serviceProxyList, serviceProxy.getServiceProxyResource().getModelUUID());
+ ServiceProxyResourceCustomization serviceProxyResource = findExistingServiceProxyResource(serviceProxyList, serviceProxy.getModelCustomizationUUID());
if(serviceProxyResource == null){
@@ -751,28 +746,22 @@ public class ToscaResourceInstaller {
Metadata spMetadata = nodeTemplate.getMetaData();
- ServiceProxyResource spResource = new ServiceProxyResource();
-
- spResource.setModelName(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
- spResource.setModelInvariantUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
- spResource.setModelUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
- spResource.setModelVersion(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
- spResource.setDescription(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
-
ServiceProxyResourceCustomization spCustomizationResource = new ServiceProxyResourceCustomization();
Set<ServiceProxyResourceCustomization> serviceProxyCustomizationSet = new HashSet<>();
+ spCustomizationResource.setModelName(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+ spCustomizationResource.setModelInvariantUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+ spCustomizationResource.setModelUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+ spCustomizationResource.setModelVersion(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
+ spCustomizationResource.setDescription(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION));
+
spCustomizationResource.setModelCustomizationUUID(spMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
spCustomizationResource.setModelInstanceName(nodeTemplate.getName());
spCustomizationResource.setToscaNodeType(nodeTemplate.getType());
spCustomizationResource.setSourceService(service);
- spCustomizationResource.setServiceProxyResource(spResource);
spCustomizationResource.setToscaNodeType(nodeTemplate.getType());
- spCustomizationResource.setServiceProxyResource(spResource);
serviceProxyCustomizationSet.add(spCustomizationResource);
-
- toscaResourceStructure.setCatalogServiceProxyResource(spResource);
toscaResourceStructure.setCatalogServiceProxyResourceCustomization(spCustomizationResource);
@@ -802,7 +791,7 @@ public class ToscaResourceInstaller {
configCustomizationResource.setNfFunction(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION));
configCustomizationResource.setNfRole(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE));
configCustomizationResource.setNfType(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE));
- configCustomizationResource.setServiceProxyResourceCustomization(spResourceCustomization);
+ configCustomizationResource.setServiceProxyResourceCustomizationUUID(spResourceCustomization.getModelCustomizationUUID());
configCustomizationResource.setConfigResourceCustomization(configCustomizationResource);
configCustomizationResource.setConfigurationResource(configResource);
configResourceCustomizationSet.add(configCustomizationResource);
@@ -1388,18 +1377,18 @@ public class ToscaResourceInstaller {
return configResource;
}
- protected ServiceProxyResource findExistingServiceProxyResource(List<ServiceProxyResourceCustomization> serviceProxyList, String modelUUID) {
- ServiceProxyResource serviceProxyResource = null;
+ protected ServiceProxyResourceCustomization findExistingServiceProxyResource(List<ServiceProxyResourceCustomization> serviceProxyList, String modelCustomizationUUID) {
+ ServiceProxyResourceCustomization serviceProxyResourceCustomization = null;
for(ServiceProxyResourceCustomization serviceProxyResourceCustom : serviceProxyList){
- if (serviceProxyResourceCustom.getServiceProxyResource() != null
- && serviceProxyResourceCustom.getServiceProxyResource().getModelUUID().equals(modelUUID)) {
- serviceProxyResource = serviceProxyResourceCustom.getServiceProxyResource();
+ if (serviceProxyResourceCustom != null
+ && serviceProxyResourceCustom.getModelCustomizationUUID().equals(modelCustomizationUUID)) {
+ serviceProxyResourceCustomization = serviceProxyResourceCustom;
}
}
- if(serviceProxyResource==null)
- serviceProxyResource = serviceProxyRepo.findResourceByModelUUID(modelUUID);
+ if(serviceProxyResourceCustomization==null)
+ serviceProxyResourceCustomization = serviceProxyCustomizationRepo.findResourceByModelCustomizationUUID(modelCustomizationUUID);
- return serviceProxyResource;
+ return serviceProxyResourceCustomization;
}
protected VfModuleCustomization findExistingVfModuleCustomization(VnfResourceCustomization vnfResource,
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java
index 5d35ea30f1..c572097103 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java
@@ -28,6 +28,9 @@ import static org.mockito.Mockito.mock;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import javax.transaction.Transactional;
@@ -40,23 +43,31 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
@Transactional
public class BpmnInstallerTest {
private BpmnInstaller bpmnInstaller = new BpmnInstaller();
+ @Rule
+ public TemporaryFolder folder= new TemporaryFolder();
+
@Before
public void init() throws Exception {
- System.setProperty("mso.config.path", "src/test/resources");
+ System.setProperty("mso.config.path", folder.getRoot().toString());
}
@Test
public void buildMimeMultiPart_Test() throws Exception {
-
+ Path tempDirectoryPath = Paths.get(folder.getRoot().toString(), "ASDC");
+ Path tempFilePath = Paths.get(tempDirectoryPath.toAbsolutePath().toString(), "TestBB.bpmn");
+ Files.createDirectories(tempDirectoryPath);
+ Files.createFile(tempFilePath);
HttpEntity entity = bpmnInstaller.buildMimeMultipart("TestBB.bpmn");
- String mimeMultipartBodyFilePath = System.getProperty("mso.config.path") + "/mime-multipart-body.txt";
+ String mimeMultipartBodyFilePath = "src/test/resources" + "/mime-multipart-body.txt";
File mimeMultipartBody = new File(mimeMultipartBodyFilePath);
InputStream expectedContent = new FileInputStream(mimeMultipartBody);
@@ -70,7 +81,7 @@ public class BpmnInstallerTest {
public void installBpmn_Test() throws Exception {
HttpResponse response = new BasicHttpResponse(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, ""));
HttpClient httpClient = mock(HttpClient.class);
- String csarPath = System.getProperty("mso.config.path") + "/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar";
+ String csarPath = "src/test/resources" + "/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar";
doReturn(response).when(httpClient).execute(any(HttpPost.class));
bpmnInstaller.installBpmn(csarPath);
}
diff --git a/asdc-controller/src/test/resources/ASDC/TestBB.bpmn b/asdc-controller/src/test/resources/ASDC/TestBB.bpmn
deleted file mode 100644
index 47d1f6e649..0000000000
--- a/asdc-controller/src/test/resources/ASDC/TestBB.bpmn
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0">
- <bpmn:process id="TestBB" name="TestBB" isExecutable="true">
- <bpmn:startEvent id="StartEvent_1" name="Start">
- <bpmn:outgoing>SequenceFlow_1owu825</bpmn:outgoing>
- </bpmn:startEvent>
- <bpmn:endEvent id="EndEvent_06wodhm" name="End">
- <bpmn:incoming>SequenceFlow_1gwcdup</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:sequenceFlow id="SequenceFlow_1owu825" sourceRef="StartEvent_1" targetRef="FisrtTask" />
- <bpmn:sequenceFlow id="SequenceFlow_1gwcdup" sourceRef="FisrtTask" targetRef="EndEvent_06wodhm" />
- <bpmn:scriptTask id="FisrtTask" name="FirstTask" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1owu825</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1gwcdup</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-DoCreateVnf createVnf = new DoCreateVnf()
-createVnf.preProcessRequest(execution)]]></bpmn:script>
- </bpmn:scriptTask>
- </bpmn:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="TestBB">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
- <dc:Bounds x="217" y="171" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="223" y="207" width="23" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_06wodhm_di" bpmnElement="EndEvent_06wodhm">
- <dc:Bounds x="630" y="171" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="638" y="207" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1owu825_di" bpmnElement="SequenceFlow_1owu825">
- <di:waypoint xsi:type="dc:Point" x="253" y="189" />
- <di:waypoint xsi:type="dc:Point" x="390" y="189" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="322" y="174" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1gwcdup_di" bpmnElement="SequenceFlow_1gwcdup">
- <di:waypoint xsi:type="dc:Point" x="490" y="189" />
- <di:waypoint xsi:type="dc:Point" x="630" y="189" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="560" y="174" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0u50zcm_di" bpmnElement="FisrtTask">
- <dc:Bounds x="390" y="149" width="100" height="80" />
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn:definitions>
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index a84b02db63..b17fb5d47c 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -517,36 +517,29 @@ default character set = latin1;
engine = innodb auto_increment = 20654
default character set = latin1;
- create table if not exists `service_proxy` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
-create table if not exists `service_proxy_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`tosca_node_type` varchar(200) not null,
-`source_service_model_uuid` varchar(200) not null,
-`creation_timestamp` datetime not null default current_timestamp,
-`service_proxy_model_uuid` varchar(200) not null,
-primary key (`model_customization_uuid`),
-index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
-index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
-constraint`fk_spr_customization__service_proxy_resource1`
-foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_service_proxy_resource_customization__service1`
-foreign key (`source_service_model_uuid`) references `service`
-(`model_uuid`) on delete cascade on update cascade)
-engine = innodb
-auto_increment = 20654
-default character set = latin1;
+CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
create table if not exists `configuration_customization` (
`model_customization_uuid` varchar(200) not null,
@@ -560,19 +553,13 @@ create table if not exists `configuration_customization` (
`configuration_customization_model_customization_uuid` varchar(200) null,
primary key (`model_customization_uuid`),
index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__service_proxy_customization_idx`
-(`service_proxy_customization_model_customization_uuid` asc),
index `fk_configuration_customization__configuration_customization_idx`
(`configuration_customization_model_customization_uuid` asc),
constraint `fk_configuration_resource_customization__configuration_resour1`
foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
on delete cascade on update cascade,
-constraint `fk_configuration_customization__service_proxy_customization1` foreign
-key (`service_proxy_customization_model_customization_uuid`) references
-`service_proxy_customization` (`model_customization_uuid`)
-on delete cascade on update cascade, constraint
-`fk_configuration_customization__configuration_customization1` foreign
-key (`configuration_customization_model_customization_uuid`) references
+constraint `fk_configuration_customization__configuration_customization1`
+foreign key (`configuration_customization_model_customization_uuid`) references
`configuration_customization` (`model_customization_uuid`)
on delete cascade on update cascade)
engine = innodb
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
index c19851d223..865b9ee8a7 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
@@ -243,7 +243,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
msoLogger.trace('Entered ' + method)
try {
- def msoCompletionResponse = """
+ String msoCompletionResponse = """
<sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} FAILED</sdncadapterworkflow:out>
</sdncadapterworkflow:MsoCompletionResponse>
@@ -275,7 +275,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
// msoLogger.trace("Started CompleteMsoProcess PostProcessRequest Method ");
try {
- def msoCompletionResponse = """
+ String msoCompletionResponse = """
<sdncadapterworkflow:MsoCompletionResponse xmlns:sdncadapterworkflow="http://ecomp.com/mso/workflow/schema/v1">
<sdncadapterworkflow:out>BPEL ${execution.getVariable("CMSO_mso-bpel-name")} completed</sdncadapterworkflow:out>
</sdncadapterworkflow:MsoCompletionResponse>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
index 9732693f38..480dcd5e8f 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
@@ -355,7 +355,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
Boolean success = (Boolean) execution.getVariable("FH_success")
String out = success ? "Fallout Handler Succeeded" : "Fallout Handler Failed";
- def falloutHandlerResponse = """
+ String falloutHandlerResponse = """
<workflow:FalloutHandlerResponse xmlns:workflow="http://org.onap/so/workflow/schema/v1">
<workflow:out>${MsoUtils.xmlEscape(out)}</workflow:out>
</workflow:FalloutHandlerResponse>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
index 32d1ee74bf..bed857dda8 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
@@ -144,7 +144,7 @@ class SDNCAdapterUtils {
def prefix = execution.getVariable('prefix')
def request = taskProcessor.getVariable(execution, prefix+'Request')
- def requestInformation = """<request-information>
+ String requestInformation = """<request-information>
<request-id>${MsoUtils.xmlEscape(execution.getVariable("mso-request-id"))}</request-id>
<request-action>torepl</request-action>
<source>${MsoUtils.xmlEscape(execution.getVariable(prefix+"source"))}</source>
@@ -172,7 +172,7 @@ class SDNCAdapterUtils {
//Build Service Information
// Send serviceName from CANOPI to sdnc for service-type
- def serviceInformation = """<service-information>
+ String serviceInformation = """<service-information>
<service-type>${MsoUtils.xmlEscape(execution.getVariable(prefix+"serviceName"))}</service-type>
<service-instance-id>${MsoUtils.xmlEscape(svcInstanceId)}</service-instance-id>
<subscriber-name>${MsoUtils.xmlEscape(execution.getVariable(prefix+"subscriberName"))}</subscriber-name>
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
index 5eb72bb2f2..9fd16340b6 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
@@ -183,7 +183,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
}
// Construct payload
- personaModelVersionEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'model-version-id')
+ personaModelVersionEntry = updateGenericVnfNode(origRequest, 'model-version-id')
}
// Handle ipv4-oam-address
@@ -191,7 +191,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
String ipv4OamAddressEntry = ""
if (ipv4OamAddress != null) {
// Construct payload
- ipv4OamAddressEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'ipv4-oam-address')
+ ipv4OamAddressEntry = updateGenericVnfNode(origRequest, 'ipv4-oam-address')
}
// Handle management-v6-address
@@ -199,7 +199,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
String managementV6AddressEntry = ""
if (managementV6Address != null) {
// Construct payload
- managementV6AddressEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'management-v6-address')
+ managementV6AddressEntry = updateGenericVnfNode(origRequest, 'management-v6-address')
}
// Handle orchestration-status
@@ -207,10 +207,10 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
String orchestrationStatusEntry = ""
if (orchestrationStatus != null) {
// Construct payload
- orchestrationStatusEntry = updateGenericVnfNode(origRequest, genericVnfNode, 'orchestration-status')
+ orchestrationStatusEntry = updateGenericVnfNode(origRequest, 'orchestration-status')
}
- def payload = """
+ String payload = """
{ ${personaModelVersionEntry}
${ipv4OamAddressEntry}
${managementV6AddressEntry}
@@ -243,7 +243,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
* @param genericVnf Current Generic VNF retrieved from AAI.
* @param element Name of element to be inserted.
*/
- public String updateGenericVnfNode(String origRequest, Node genericVnfNode, String elementName) {
+ public String updateGenericVnfNode(String origRequest, String elementName) {
if (!utils.nodeExists(origRequest, elementName)) {
return ""
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
index 6e09837274..40b0368eaa 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VidUtils.groovy
@@ -116,7 +116,7 @@ class VidUtils {
}
def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationUuid ?: ''
- def xmlReq = """
+ String xmlReq = """
<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>${MsoUtils.xmlEscape(action)}</action>
@@ -251,7 +251,7 @@ class VidUtils {
//'sdncVersion' = current, '1610' (non-RPC SDNC) or '1702' (RPC SDNC)
def sdncVersion = execution.getVariable("sdncVersion")
- def xmlReq = """
+ String xmlReq = """
<network-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
@@ -393,7 +393,7 @@ class VidUtils {
userParamsNode = buildUserParams(userParams)
}
- def xmlReq = """
+ String xmlReq = """
<network-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
@@ -512,7 +512,7 @@ class VidUtils {
def personaModelVersion = requestMap.requestDetails?.modelInfo?.modelUuid ?: ''
def modelCustomizationId = requestMap.requestDetails?.modelInfo?.modelCustomizationUuid ?: ''
- def xmlReq = """
+ String xmlReq = """
<vnf-request>
<request-info>
<request-id>${MsoUtils.xmlEscape(requestId)}</request-id>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy
index 1fa10a56c5..55f68f665e 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModuleTest.groovy
@@ -57,7 +57,7 @@ class CreateAAIVfModuleTest extends MsoGroovyTest{
private static final String VNF_PERSONAL_MODEL_VER = "14"
private static final String VF_MODULE_NAME = "modTestName"
private static final String VF_MODULE_MODEL_NAME = "modModelNameTest"
- private static final String DEFAULT_AAI_VERSION = "9"
+ private static final String DEFAULT_AAI_VERSION = "14"
private static final String DEFAULT_AAI_NAMESPACE = "defaultTestNamespace"
@Spy
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/NetworkUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/NetworkUtilsTest.groovy
index 510dcf665c..a920b22c71 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/NetworkUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/NetworkUtilsTest.groovy
@@ -30,7 +30,7 @@ import org.junit.Test;
class NetworkUtilsTest {
- def volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ String volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
index e351210586..3438c7957c 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterTest.groovy
@@ -424,7 +424,7 @@ public class SDNCAdapterTest {
</rest:payload>
</sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
-def sdncAdapterResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+String sdncAdapterResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
<sdncadapterworkflow:response-data>
<tag0:CallbackHeader xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1">
<tag0:RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</tag0:RequestId>
@@ -439,7 +439,7 @@ def sdncAdapterResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xm
</sdncadapterworkflow:SDNCAdapterWorkflowResponse>
"""
-def workflowErrorResponse = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+String workflowErrorResponse = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
<aetgt:ErrorMessage>Received error from SDN-C: Error processing request to SDNC. Not Found.
https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
SDNC Returned-[error-type:application, error-tag:data-missing,
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
index ef71e9073b..51dd77d383 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtilsTest.groovy
@@ -180,7 +180,7 @@ public class SDNCAdapterUtilsTest {
def rc = respcode
def rm = respmsg
- def output = """
+ String output = """
<output xmlns="org:onap:sdnc:northbound:generic-resource">
<svc-request-id>8b46e36e-b44f-4085-9404-427be1bc8a3</svc-request-id>
<response-code>${MsoUtils.xmlEscape(rc)}</response-code>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtilTest.groovy
index 52f59a3fad..14fb60c245 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtilTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtilTest.groovy
@@ -41,7 +41,7 @@ import org.junit.Test
class TrinityExceptionUtilTest {
- def aotsFault ="""<n1:Fault xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd" xmlns:cer="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/ErrorResponse.xsd" xsi:schemaLocation="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd SoapFault-CDM.xsd">
+ String aotsFault ="""<n1:Fault xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd" xmlns:cer="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/ErrorResponse.xsd" xsi:schemaLocation="http://csi.cingular.com/CSI/Namespaces/OneTicketingSystem/InfrastructureCommon/Types/Public/SoapFault.xsd SoapFault-CDM.xsd">
<n1:faultcode>xml:space</n1:faultcode>
<n1:faultstring>String</n1:faultstring>
<n1:faultactor>http://test.com</n1:faultactor>
@@ -113,7 +113,7 @@ class TrinityExceptionUtilTest {
</requestError>
</Fault>
"""
- def errorString = """<requestError>
+ String errorString = """<requestError>
<serviceException>
<messageId>SVC3002</messageId>
<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VidUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VidUtilsTest.groovy
index 1ab049571a..b80cb87c16 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VidUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VidUtilsTest.groovy
@@ -53,7 +53,7 @@ import org.junit.Test;
class VidUtilsTest {
- def vfModuleReqJson = """
+ String vfModuleReqJson = """
{
"requestDetails": {
"modelInfo": {
@@ -153,7 +153,7 @@ class VidUtilsTest {
}
}
"""
- def bpmnReq1 = """
+ String bpmnReq1 = """
{
"requestDetails": {
"modelInfo": {
@@ -220,7 +220,7 @@ class VidUtilsTest {
}
"""
- def vidUtilResp1 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ String vidUtilResp1 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -256,7 +256,7 @@ class VidUtilsTest {
</volume-request>
"""
- def bpmnReq2 = """
+ String bpmnReq2 = """
{
"requestDetails": {
"modelInfo": {
@@ -305,7 +305,7 @@ class VidUtilsTest {
}
"""
- def bpmnReqJsonVolumeSuppressRollbackTrue = """
+ String bpmnReqJsonVolumeSuppressRollbackTrue = """
{
"requestDetails": {
"modelInfo": {
@@ -354,7 +354,7 @@ class VidUtilsTest {
}
"""
-def bpmnReqJsonVolumeSuppressRollbackFalse = """
+String bpmnReqJsonVolumeSuppressRollbackFalse = """
{
"requestDetails": {
"modelInfo": {
@@ -403,7 +403,7 @@ def bpmnReqJsonVolumeSuppressRollbackFalse = """
}
"""
-def bpmnReqJsonVolumeSuppressRollbackNone = """
+String bpmnReqJsonVolumeSuppressRollbackNone = """
{
"requestDetails": {
"modelInfo": {
@@ -451,7 +451,7 @@ def bpmnReqJsonVolumeSuppressRollbackNone = """
}
"""
- def bpmnReqJsonVfModuleSuppressRollbackTrue = """
+ String bpmnReqJsonVfModuleSuppressRollbackTrue = """
{
"requestDetails": {
"modelInfo": {
@@ -518,7 +518,7 @@ def bpmnReqJsonVolumeSuppressRollbackNone = """
}
"""
-def bpmnReqJsonVfModuleSuppressRollbackFalse = """
+String bpmnReqJsonVfModuleSuppressRollbackFalse = """
{
"requestDetails": {
"modelInfo": {
@@ -585,7 +585,7 @@ def bpmnReqJsonVfModuleSuppressRollbackFalse = """
}
"""
-def bpmnReqJsonVfModuleSuppressRollbackNone = """
+String bpmnReqJsonVfModuleSuppressRollbackNone = """
{
"requestDetails": {
"modelInfo": {
@@ -650,7 +650,7 @@ def bpmnReqJsonVfModuleSuppressRollbackNone = """
}
}
"""
- def vidUtilResp2 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ String vidUtilResp2 = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -672,7 +672,7 @@ def bpmnReqJsonVfModuleSuppressRollbackNone = """
</volume-request>
"""
-def vidUtilVolumeRespBackoutOnFailureFalse = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+String vidUtilVolumeRespBackoutOnFailureFalse = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -694,7 +694,7 @@ def vidUtilVolumeRespBackoutOnFailureFalse = """<volume-request xmlns="http://ww
</volume-request>
"""
-def vidUtilVolumeRespBackoutOnFailureTrue = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+String vidUtilVolumeRespBackoutOnFailureTrue = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -716,7 +716,7 @@ def vidUtilVolumeRespBackoutOnFailureTrue = """<volume-request xmlns="http://www
</volume-request>
"""
-def vidUtilVolumeRespBackoutOnFailureEmpty = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+String vidUtilVolumeRespBackoutOnFailureEmpty = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -738,7 +738,7 @@ def vidUtilVolumeRespBackoutOnFailureEmpty = """<volume-request xmlns="http://ww
</volume-request>
"""
-def vidUtilVfModuleRespBackoutOnFailureFalse = """<vnf-request>
+String vidUtilVfModuleRespBackoutOnFailureFalse = """<vnf-request>
<request-info>
<request-id>test-request-id-123</request-id>
<action>CREATE_VF_MODULE</action>
@@ -767,7 +767,7 @@ def vidUtilVfModuleRespBackoutOnFailureFalse = """<vnf-request>
</vnf-request>
"""
-def vidUtilVfModuleRespBackoutOnFailureTrue = """<vnf-request>
+String vidUtilVfModuleRespBackoutOnFailureTrue = """<vnf-request>
<request-info>
<request-id>test-request-id-123</request-id>
<action>CREATE_VF_MODULE</action>
@@ -796,7 +796,7 @@ def vidUtilVfModuleRespBackoutOnFailureTrue = """<vnf-request>
</vnf-request>
"""
-def vidUtilVfModuleRespBackoutOnFailureEmpty = """<vnf-request>
+String vidUtilVfModuleRespBackoutOnFailureEmpty = """<vnf-request>
<request-info>
<request-id>test-request-id-123</request-id>
<action>CREATE_VF_MODULE</action>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
index 72cde00877..afc180e8a4 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
@@ -79,7 +79,7 @@ public class VnfAdapterRestV1Test {
}
- def rollbackReq = """
+ String rollbackReq = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
<volumeGroupId>8a07b246-155e-4b08-b56e-76e98a3c2d66</volumeGroupId>
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
index efabdb147a..09ffc0eb5c 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
@@ -101,38 +101,14 @@ mso:
default:
aai:
cloud-region:
- version: '9'
+ version: '14'
generic-vnf:
- version: '9'
- v8:
- customer:
- uri: /aai/v8/business/customers/customer
- generic-query:
- uri: /aai/v8/search/generic-query
- l3-network:
- uri: /aai/v8/network/l3-networks/l3-network
- network-policy:
- uri: /aai/v8/network/network-policies/network-policy
- nodes-query:
- uri: /aai/v8/search/nodes-query
- route-table-reference:
- uri: /aai/v8/network/route-table-references/route-table-reference
- tenant:
- uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/AAIAIC25/tenants/tenant
- vce:
- uri: /aai/v8/network/vces/vce
- vpn-binding:
- uri: /aai/v8/network/vpn-bindings/vpn-binding
- v9:
- cloud-region:
- uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner
- generic-vnf:
- uri: /aai/v9/network/generic-vnfs/generic-vnf
+ version: '14'
global:
default:
aai:
namespace: http://org.openecomp.aai.inventory/
- version: '8'
+ version: '14'
message:
endpoint: http://localhost:${wiremock.server.port}/mso/WorkflowMesssage
notification:
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn
index 78a389a67d..19845c4e8d 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn
@@ -21,6 +21,8 @@
<bpmn2:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0zzlwi7</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0wb238v</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
index 259a3341c2..ef19e6e35b 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1a495wm</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1j4x1ej</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn
index e1f80dc77a..198b8d97e5 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0wk5e4o</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ho00ja</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn
index 967e01885c..7c86e964ec 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn
@@ -66,6 +66,8 @@
<bpmn2:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0rt36co</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1mvf7b9</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn
index a98db3ac7b..7368f35d31 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn
@@ -41,6 +41,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1vmf5yv</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0c6u1cp</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
index 7dee0f709d..1109e9cd9d 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn
@@ -31,6 +31,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0269euz</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dttbxh</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
index f4db92ba5c..ce4d2e1dab 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
@@ -87,6 +87,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1qkhm79</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1vw20wu</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn
index c2e960364c..044ab840db 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn
@@ -21,6 +21,8 @@
<bpmn2:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_1q3rjt4</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0ycnbyf</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn
index 28957c6197..82c7e8d8b2 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0m403q5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0rpp4hi</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn
index 59c35c3c5b..ea7167247e 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn
@@ -32,6 +32,8 @@
<bpmn2:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_17yjhsl</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1h1zrcl</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn
index 29a03c4e6b..f4bd6c2953 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn
@@ -21,6 +21,8 @@
<bpmn2:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0hfjdl4</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0cu0wy4</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn
index 41517871d0..d03d17db03 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1j9qa4p</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ck1p4o</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn
index 37fd2dbd98..48243881dc 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_15ep3y7</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1gx4xce</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn
index c627789119..11aa52ab86 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_000o6c2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ageldf</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
index 1fdf2f3c66..cd62636b77 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
- <bpmn2:process id="HomingBB" name="Homing" isExecutable="true">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+ <bpmn2:process id="HomingBB" name="HomingBB" isExecutable="true">
<bpmn2:startEvent id="start">
<bpmn2:outgoing>SequenceFlow_1x9usa6</bpmn2:outgoing>
</bpmn2:startEvent>
@@ -43,7 +43,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_0kamg53" name="" sourceRef="startJavaError" targetRef="processJavaException" />
<bpmn2:sequenceFlow id="SequenceFlow_1o7154s" name="" sourceRef="processJavaException" targetRef="endJavaError" />
</bpmn2:subProcess>
- <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" camunda:modelerTemplate="receiveWorkflowMessage" calledElement="ReceiveWorkflowMessage">
+ <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" calledElement="ReceiveWorkflowMessage" camunda:modelerTemplate="receiveWorkflowMessage">
<bpmn2:extensionElements>
<camunda:in source="true" target="isDebugLogEnabled" />
<camunda:out source="WorkflowException" target="WorkflowException" />
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn
index 8e4c8501b5..128135d808 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn
@@ -31,6 +31,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1woj6rc</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_15oc7ot</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn
index 08f17469da..e44be1a19e 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_00dyi16</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0uzdp0c</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn
index dd00078fb5..7de68db4cf 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn
@@ -21,6 +21,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_152ntu2</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0py9tf7</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn
index dec5681c9d..7ac8f9db76 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn
@@ -26,6 +26,8 @@
<bpmn:extensionElements>
<camunda:in source="SDNCRequest" target="SDNCRequest" />
<camunda:out source="SDNCResponse" target="SDNCResponse" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0ielrmh</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1cpzq86</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 089239fa07..1d3d3331ef 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -1003,7 +1003,7 @@ public class DoCreateVfModule extends VfModuleBase {
svcInstId = serviceInstanceId
}
- def createVnfARequest = """
+ String createVnfARequest = """
<createVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
index b42962adac..87f598db5d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -445,7 +445,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
public String buildRollbackVolumeGroupRequestXml(volumeGroupId, cloudSiteId, tenantId, requestId, serviceId, messageId, notificationUrl) {
- def request = """
+ String request = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
<volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
index 161075f66e..1b92592e37 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1Test.groovy
@@ -47,7 +47,7 @@ class CreateVfModuleVolumeInfraV1Test extends MsoGroovyTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
- def jsonRequest = """
+ String jsonRequest = """
{
"requestDetails": {
"modelInfo": {
@@ -114,7 +114,7 @@ class CreateVfModuleVolumeInfraV1Test extends MsoGroovyTest {
}
"""
- def volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
+ String volumeRequestXml = """<volume-request xmlns="http://www.w3.org/2001/XMLSchema">
<request-info>
<action>CREATE_VF_MODULE_VOL</action>
<source>VID</source>
@@ -149,7 +149,7 @@ class CreateVfModuleVolumeInfraV1Test extends MsoGroovyTest {
</volume-params>
</volume-request>"""
- def completeMsoRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String completeMsoRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1"
xmlns="http://org.onap/so/infra/vnf-request/v1">
<request-info>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
index 6ed5bfe89a..0e7114dd03 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1Test.groovy
@@ -65,7 +65,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
when(deleteVfModuleVolumeInfraV1.getAAIClient()).thenReturn(client)
}
- def deleteVnfAdapterRequestXml = """<deleteVolumeGroupRequest>
+ String deleteVnfAdapterRequestXml = """<deleteVolumeGroupRequest>
<cloudSiteId>RDM2WAGPLCP</cloudSiteId>
<tenantId>fba1bd1e195a404cacb9ce17a9b2b421</tenantId>
<volumeGroupId>78987</volumeGroupId>
@@ -79,7 +79,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
<notificationUrl>http://localhost:28080/mso/WorkflowMessage/VNFAResponse/ebb9ef7b-a6a5-40e6-953e-f868f1767677</notificationUrl>
</deleteVolumeGroupRequest>"""
- def dbRequestXml = """<soapenv:Envelope xmlns:req="http://org.onap.so/requestsdb"
+ String dbRequestXml = """<soapenv:Envelope xmlns:req="http://org.onap.so/requestsdb"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
@@ -94,7 +94,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
</soapenv:Body>
</soapenv:Envelope>"""
- def completionRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String completionRequestXml = """<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1"
xmlns="http://org.onap/so/infra/vnf-request/v1">
<request-info>
@@ -106,7 +106,7 @@ class DeleteVfModuleVolumeInfraV1Test extends MsoGroovyTest {
<aetgt:mso-bpel-name>BPMN VF Module Volume action: DELETE</aetgt:mso-bpel-name>
</aetgt:MsoCompletionRequest>"""
- def falloutHandlerRequestXml = """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ String falloutHandlerRequestXml = """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1"
xmlns="http://org.onap/so/infra/vnf-request/v1">
<request-info>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
index 7523427c84..e8170ed2cb 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstanceTest.groovy
@@ -2954,7 +2954,7 @@ String sdncAdapterWorkflowAssignResponse =
println "************ preProcessRequest_Payload ************* "
- def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ String networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
"modelName": "CONTRAIL_EXTERNAL",
"modelType": "CONTRAIL_EXTERNAL",
"modelVersion": "1",
@@ -2962,7 +2962,7 @@ String sdncAdapterWorkflowAssignResponse =
"modelInvariantUuid": "sn5256d1-5a33-55df-13ab-12abad84e764"
}""".trim()
- def serviceModelInfo = """{"modelUuid": "36a3a8ea-49a6-4ac8-b06c-89a54544b9b6",
+ String serviceModelInfo = """{"modelUuid": "36a3a8ea-49a6-4ac8-b06c-89a54544b9b6",
"modelName": "HNGW Protected OAM",
"modelType": "service",
"modelVersion": "1.0",
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
index 53c164ab45..606efa8b73 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2Test.groovy
@@ -60,7 +60,7 @@ class DoCreateVfModuleVolumeV2Test extends MsoGroovyTest {
@Captor
static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
- def String volumeRollbackRequest = """
+ String volumeRollbackRequest = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
<volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
@@ -79,7 +79,7 @@ class DoCreateVfModuleVolumeV2Test extends MsoGroovyTest {
</rollbackVolumeGroupRequest>
"""
- def String volumeRollbackRequestWithStackId = """
+ String volumeRollbackRequestWithStackId = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
<volumeGroupId>171907d6-cdf0-4e08-953d-81ee104005a7</volumeGroupId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
index f6efe1d7d1..a95a01912d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstanceTest.groovy
@@ -1187,7 +1187,7 @@ String sdncAdapterWorkflowFormattedResponse_404 =
//@Ignore
public void preProcessRequest_vPER() {
- def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ String networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
"modelName": "CONTRAIL_EXTERNAL",
"modelType": "CONTRAIL_EXTERNAL",
"modelVersion": "1",
@@ -1354,7 +1354,7 @@ String sdncAdapterWorkflowFormattedResponse_404 =
//@Ignore
public void preProcessRequest_Json_MissingCloudRegion() {
- def networkModelInfo = """{"modelVersionId": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ String networkModelInfo = """{"modelVersionId": "sn5256d1-5a33-55df-13ab-12abad84e111",
"modelName": "CONTRAIL_EXTERNAL",
"modelType": "CONTRAIL_EXTERNAL",
"modelVersion": "1",
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
index 14dd10fc49..68a9ed659e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstanceTest.groovy
@@ -1795,7 +1795,7 @@ String rollbackNetworkRequest =
//@Ignore
public void preProcessRequest_vPERNetworkRequest() {
- def networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
+ String networkModelInfo = """{"modelUuid": "sn5256d1-5a33-55df-13ab-12abad84e111",
"modelName": "CONTRAIL_EXTERNAL",
"modelType": "CONTRAIL_EXTERNAL",
"modelVersion": "1",
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
index 9e2049732a..627cee4293 100755
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
<bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -38,6 +38,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
<camunda:in sourceExpression="1610" target="sdncVersion" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
<camunda:in source="bpmnRequest" target="requestJson" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_1fv5tk6</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
@@ -169,6 +170,7 @@ csi.prepareDecomposeService(execution)]]></bpmn2:script>
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
<camunda:out source="serviceDecomposition" target="serviceDecomposition" />
<camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0xhu1k3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1o3ihrh</bpmn2:outgoing>
@@ -185,7 +187,7 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1tfe975" sourceRef="IntermediateCatchEvent_00tv706" targetRef="ScriptTask_1vr3ks5" />
<bpmn2:sequenceFlow id="SequenceFlow_14ajbme" sourceRef="CallActivity_1y1p4bd" targetRef="IntermediateThrowEvent_1tbopzu" />
<bpmn2:sequenceFlow id="SequenceFlow_1hjh5zy" sourceRef="IntermediateCatchEvent_1aouco1" targetRef="ScriptTask_04zaa1o" />
- <bpmn2:callActivity id="CallActivity_1y1p4bd" name="Call Homing Service" camunda:modelerTemplate="homingBlock" calledElement="Homing">
+ <bpmn2:callActivity id="CallActivity_1y1p4bd" name="Call Homing Service" calledElement="Homing" camunda:modelerTemplate="homingBlock">
<bpmn2:extensionElements>
<camunda:in source="true" target="isDebugLogEnabled" />
<camunda:in source="null" target="timeout" />
@@ -204,6 +206,7 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
<camunda:in source="homingModelIds" target="homingModelIds" />
<camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+ <camunda:in source="mso-request-id" target="mso-request-d" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0bng27u</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14ajbme</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
index 5c9a80072a..4224f9a94b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DeleteGenericALaCarteServiceInstance" name="DeleteGenericALaCarteServiceInstance" isExecutable="true">
<bpmn2:startEvent id="deleteSI_startEvent" name="Delete SI Start Flow">
<bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -36,6 +36,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
<camunda:in sourceExpression="1610" target="sdncVersion" />
+ <camunda:in source="msoRequestId" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
@@ -328,4 +329,4 @@ csi.sendSyncResponse(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
+</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn
index 6092de6c79..3cb879ac3f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVnfInfra.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_9MhrcHqVEea26OhQB97uCQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DeleteVnfInfra" name="DeleteVnfInfra" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -107,6 +107,7 @@ deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
<camunda:in source="DELVI_vnfId" target="vnfId" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_00bhxtl</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1f56g06</bpmn2:outgoing>
@@ -134,6 +135,7 @@ deleteVnf.prepareCompletionHandlerRequest(execution)]]></bpmn2:script>
<camunda:in source="DELVI_serviceInstanceId" target="serviceInstanceId" />
<camunda:in source="DELVI_cloudConfiguration" target="cloudConfiguration" />
<camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="mso-request-id" target="mso-request-id" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_00o02cv</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0dy2xw0</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
index e3f1d7721d..383a9f54e0 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
- <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance&#10;" isExecutable="true">
+ <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
</bpmn2:startEvent>
@@ -370,4 +370,4 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn2:definitions>
+</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
index 6b89387a82..55eaf3681c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
@@ -156,10 +156,13 @@ public class SniroHomingV2 {
log.trace("Completed Sniro Homing Call Sniro");
}catch(BpmnError e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
}catch(BadResponseException e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
}catch(Exception e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while preparing sniro request: " + e.getMessage());
}
}
@@ -203,10 +206,13 @@ public class SniroHomingV2 {
log.trace("Completed Sniro Homing Process Solution");
}catch(BpmnError e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
}catch(BadResponseException e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
}catch(Exception e){
+ log.error(e);
exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while processing sniro asynchronous response: " + e.getMessage());
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 10ee13ebed..50f2091ae2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -344,6 +344,18 @@ public class WorkflowAction {
}
return vfModuleResources;
}
+
+ protected List<Resource> sortVfModulesByBaseLast(List<Resource> vfModuleResources) {
+ int count = 0;
+ for(Resource resource : vfModuleResources){
+ if(resource.isBaseVfModule()){
+ Collections.swap(vfModuleResources, vfModuleResources.size()-1, count);
+ break;
+ }
+ count++;
+ }
+ return vfModuleResources;
+ }
private void updateResourceIdsFromAAITraversal(List<ExecuteBuildingBlock> flowsToExecute,
List<Resource> resourceCounter, List<Pair<WorkflowType, String>> aaiResourceIds, String serviceInstanceId) {
@@ -969,8 +981,14 @@ public class WorkflowAction {
requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey(), false));
}
} else if (orchFlow.getFlowName().contains(VFMODULE)) {
- List<Resource> vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType())
+ List<Resource> vfModuleResourcesSorted = null;
+ if(requestAction.equals("createInstance")||requestAction.equals("assignInstance")||requestAction.equals("activateInstance")){
+ vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType())
.collect(Collectors.toList()));
+ }else{
+ vfModuleResourcesSorted = sortVfModulesByBaseLast(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType())
+ .collect(Collectors.toList()));
+ }
for (int i = 0; i < vfModuleResourcesSorted.size(); i++) {
flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i), apiVersion, resourceId,
requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false));
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
index f91ad44f2b..6bee5a9b1e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClient.java
@@ -1,5 +1,6 @@
package org.onap.so.client.namingservice;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -17,6 +18,7 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import org.springframework.web.client.HttpStatusCodeException;
import org.springframework.web.client.RestTemplate;
@@ -34,21 +36,31 @@ public class NamingClient{
@Autowired
private NamingClientResponseValidator namingClientResponseValidator;
- public String postNameGenRequest(NameGenRequest request) throws BadResponseException {
+ public String postNameGenRequest(NameGenRequest request) throws BadResponseException, IOException {
String targetUrl = env.getProperty(ENDPOINT);
HttpHeaders headers = setHeaders(env.getProperty(AUTH));
msoLogger.info("Sending postNameGenRequest to url: " + targetUrl);
HttpEntity<NameGenRequest> requestEntity = new HttpEntity<>(request, headers);
- ResponseEntity<NameGenResponse> response = restTemplate.postForEntity(targetUrl, requestEntity, NameGenResponse.class);
+ ResponseEntity<NameGenResponse> response;
+ try{
+ response = restTemplate.postForEntity(targetUrl, requestEntity, NameGenResponse.class);
+ }catch(HttpStatusCodeException e){
+ throw new BadResponseException(namingClientResponseValidator.formatError(e));
+ }
return namingClientResponseValidator.validateNameGenResponse(response);
}
- public String deleteNameGenRequest(NameGenDeleteRequest request) throws BadResponseException {
+ public String deleteNameGenRequest(NameGenDeleteRequest request) throws BadResponseException, IOException {
String targetUrl = env.getProperty(ENDPOINT);
HttpHeaders headers = setHeaders(env.getProperty(AUTH));
msoLogger.info("Sending deleteNameGenRequest to url: " + targetUrl);
HttpEntity<NameGenDeleteRequest> requestEntity = new HttpEntity<>(request, headers);
- ResponseEntity<NameGenDeleteResponse> response = restTemplate.exchange(targetUrl, HttpMethod.DELETE, requestEntity, NameGenDeleteResponse.class);
+ ResponseEntity<NameGenDeleteResponse> response;
+ try{
+ response = restTemplate.exchange(targetUrl, HttpMethod.DELETE, requestEntity, NameGenDeleteResponse.class);
+ }catch(HttpStatusCodeException e){
+ throw new BadResponseException(namingClientResponseValidator.formatError(e));
+ }
return namingClientResponseValidator.validateNameGenDeleteResponse(response);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
index ab0639574c..e790fa4b72 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
@@ -1,5 +1,6 @@
package org.onap.so.client.namingservice;
+import java.io.IOException;
import java.util.List;
import org.apache.http.HttpStatus;
@@ -12,6 +13,9 @@ import org.onap.so.logger.MessageEnum;
import org.onap.so.logger.MsoLogger;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
+import org.springframework.web.client.HttpStatusCodeException;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class NamingClientResponseValidator {
@@ -99,5 +103,20 @@ public class NamingClientResponseValidator {
private boolean isHttpCodeSuccess(int code) {
return code >= HttpStatus.SC_OK && code < HttpStatus.SC_MULTIPLE_CHOICES || code == 0;
}
+
+ protected String formatError(HttpStatusCodeException e) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ NameGenResponse errorResponse = mapper.readValue(e.getResponseBodyAsString(), NameGenResponse.class);
+ NameGenResponseError error = errorResponse.getError();
+
+ String errorMessageString = null;
+ if (error != null) {
+ errorMessageString = error.getMessage();
+ }
+ String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
+ msoLogger.error(MessageEnum.RA_GENERAL_EXCEPTION, errorMessage, "BPMN", MsoLogger.getServiceName(),
+ MsoLogger.ErrorCode.DataError, errorMessage);
+ return errorMessage;
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingRequestObjectBuilder.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingRequestObjectBuilder.java
index c3f216e288..82bad8db79 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingRequestObjectBuilder.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingRequestObjectBuilder.java
@@ -13,11 +13,11 @@ public class NamingRequestObjectBuilder{
public Element elementMapper(String instanceGroupId, String policyInstanceName, String namingType, String nfNamingCode, String instanceGroupName){
Element element = new Element();
- element.setExternalKey(instanceGroupId);
- element.setPolicyInstanceName(policyInstanceName);
- element.setNamingType(namingType);
- element.setResourceName(instanceGroupName);
- element.setNamingIngredientsZeroOrMore(nfNamingCode);
+ element.put("external-key", instanceGroupId);
+ element.put("policy-instance-name", policyInstanceName);
+ element.put("naming-type", namingType);
+ element.put("resource-name", instanceGroupName);
+ element.put("nf-naming-code", nfNamingCode);
return element;
}
public Deleteelement deleteElementMapper(String instanceGroupId){
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
index 8b443a165b..d0bf6da6c9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NamingServiceResources.java
@@ -20,6 +20,7 @@
package org.onap.so.client.orchestration;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -44,14 +45,14 @@ public class NamingServiceResources {
@Autowired
private NamingRequestObjectBuilder namingRequestObjectBuilder;
- public String generateInstanceGroupName(InstanceGroup instanceGroup, String policyInstanceName, String nfNamingCode) throws BadResponseException {
+ public String generateInstanceGroupName(InstanceGroup instanceGroup, String policyInstanceName, String nfNamingCode) throws BadResponseException, IOException {
Element element = namingRequestObjectBuilder.elementMapper(instanceGroup.getId(), policyInstanceName, NAMING_TYPE, nfNamingCode, instanceGroup.getInstanceGroupName());
List<Element> elements = new ArrayList<Element>();
elements.add(element);
return(namingClient.postNameGenRequest(namingRequestObjectBuilder.nameGenRequestMapper(elements)));
}
- public String deleteInstanceGroupName(InstanceGroup instanceGroup) throws BadResponseException {
+ public String deleteInstanceGroupName(InstanceGroup instanceGroup) throws BadResponseException, IOException {
Deleteelement deleteElement = namingRequestObjectBuilder.deleteElementMapper(instanceGroup.getId());
List<Deleteelement> deleteElements = new ArrayList<Deleteelement>();
deleteElements.add(deleteElement);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index 5699c94137..72f0ce4e6d 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -1200,6 +1200,24 @@ public class WorkflowActionTest extends BaseTaskTest {
assertEquals("111",result.get(2).getResourceId());
}
+ @Test
+ public void sortVfModulesByBaseLastTest(){
+ List<Resource> resources = new ArrayList<>();
+ Resource resource1 = new Resource(WorkflowType.VFMODULE,"111",false);
+ resource1.setBaseVfModule(true);
+ resources.add(resource1);
+ Resource resource2 = new Resource(WorkflowType.VFMODULE,"222",false);
+ resource2.setBaseVfModule(false);
+ resources.add(resource2);
+ Resource resource3 = new Resource(WorkflowType.VFMODULE,"333",false);
+ resource3.setBaseVfModule(false);
+ resources.add(resource3);
+ List<Resource> result = workflowAction.sortVfModulesByBaseLast(resources);
+ assertEquals("333",result.get(0).getResourceId());
+ assertEquals("222",result.get(1).getResourceId());
+ assertEquals("111",result.get(2).getResourceId());
+ }
+
private List<OrchestrationFlow> createFlowList (String... flowNames){
List<OrchestrationFlow> result = new ArrayList<>();
for(String flowName : flowNames){
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientTest.java
new file mode 100644
index 0000000000..c1769e3680
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingClientTest.java
@@ -0,0 +1,99 @@
+package org.onap.so.client.namingservice;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.http.HttpStatus;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onap.namingservice.model.Deleteelement;
+import org.onap.namingservice.model.Element;
+import org.onap.namingservice.model.NameGenDeleteRequest;
+import org.onap.namingservice.model.NameGenRequest;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.client.exception.BadResponseException;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+public class NamingClientTest extends BaseIntegrationTest{
+ @Autowired
+ NamingClient client;
+ @Autowired
+ NamingRequestObjectBuilder requestBuilder;
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void assignNameGenRequest() throws BadResponseException, IOException{
+ stubFor(post(urlPathEqualTo("/web/service/v1/genNetworkElementName"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("NamingClient/AssignResponse.json")
+ .withStatus(HttpStatus.SC_ACCEPTED)));
+
+ NameGenRequest request = assignSetup();
+ String response = client.postNameGenRequest(request);
+ assertTrue(response.equals("$vnf-name"));
+ }
+ @Test
+ public void assignNameGenRequestError() throws BadResponseException, IOException{
+ stubFor(post(urlPathEqualTo("/web/service/v1/genNetworkElementName"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("NamingClient/ErrorResponse.json")
+ .withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR)));
+
+ thrown.expect(BadResponseException.class);
+ thrown.expectMessage("Error from Naming Service: External Key is required and must be unique");
+ NameGenRequest request = assignSetup();
+ client.postNameGenRequest(request);
+ }
+ @Test
+ public void unassignNameGenRequest() throws BadResponseException, IOException{
+ stubFor(delete(urlPathEqualTo("/web/service/v1/genNetworkElementName"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("NamingClient/UnassignResponse.json")
+ .withStatus(HttpStatus.SC_ACCEPTED)));
+
+ String response = client.deleteNameGenRequest(unassignSetup());
+ assertTrue(response.equals(""));
+ }
+ @Test
+ public void unassignNameGenRequestError() throws BadResponseException, IOException{
+ stubFor(delete(urlPathEqualTo("/web/service/v1/genNetworkElementName"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("NamingClient/ErrorResponse.json")
+ .withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR)));
+
+ thrown.expect(BadResponseException.class);
+ thrown.expectMessage("Error from Naming Service: External Key is required and must be unique");
+ client.deleteNameGenRequest(unassignSetup());
+ }
+
+ public NameGenRequest assignSetup() throws JsonProcessingException{
+ NameGenRequest request = new NameGenRequest();
+ List<Element> elements = new ArrayList<>();
+ Element testElement = new Element();
+ testElement = requestBuilder.elementMapper("SomeUniqueValue", "SDNC_Policy.Config_MS_1806SRIOV_VNATJson.4.xml", "VNF", "nfNamingCode", "vnf_name");
+ elements.add(testElement);
+ request = requestBuilder.nameGenRequestMapper(elements);
+ return request;
+ }
+ public NameGenDeleteRequest unassignSetup() throws JsonProcessingException{
+ NameGenDeleteRequest request = new NameGenDeleteRequest();
+ List<Deleteelement> deleteElements = new ArrayList<>();
+ Deleteelement testElement = new Deleteelement();
+ testElement = requestBuilder.deleteElementMapper("instanceGroupId");
+ deleteElements.add(testElement);
+ request = requestBuilder.nameGenDeleteRequestMapper(deleteElements);
+ return request;
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java
index 0a2dc1e4fa..27839d665b 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/namingservice/NamingRequestObjectBuilderTest.java
@@ -26,11 +26,11 @@ public class NamingRequestObjectBuilderTest {
public void elementMapperTest(){
// Expected element
Element expected = new Element();
- expected.setExternalKey(instanceGroupId);
- expected.setPolicyInstanceName(policyInstanceName);
- expected.setNamingType(namingType);
- expected.setResourceName(instanceGroupName);
- expected.setNamingIngredientsZeroOrMore(nfNamingCode);
+ expected.put("external-key", instanceGroupId);
+ expected.put("policy-instance-name", policyInstanceName);
+ expected.put("naming-type", namingType);
+ expected.put("resource-name", instanceGroupName);
+ expected.put("nf-naming-code", nfNamingCode);
// Actual element
Element actual = mapper.elementMapper(instanceGroupId, policyInstanceName, namingType, nfNamingCode, instanceGroupName);
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/AssignResponse.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/AssignResponse.json
new file mode 100644
index 0000000000..b065c21339
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/AssignResponse.json
@@ -0,0 +1,14 @@
+{
+ "elements": [
+ {
+ "external-key": "$vnf-id",
+ "resource-name": "instance-group-name",
+ "resource-value": "$vnf-name"
+ },
+ {
+ "external-key": "$vnf-id",
+ "resource-name": "vm-name",
+ "resource-value": "$vm-name"
+ }
+ ]
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/ErrorResponse.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/ErrorResponse.json
new file mode 100644
index 0000000000..8bac7cd1f9
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/ErrorResponse.json
@@ -0,0 +1,6 @@
+{
+ "error": {
+ "errorId": "NELGEN-0003",
+ "message": "External Key is required and must be unique"
+ }
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/UnassignResponse.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/UnassignResponse.json
new file mode 100644
index 0000000000..b065c21339
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/NamingClient/UnassignResponse.json
@@ -0,0 +1,14 @@
+{
+ "elements": [
+ {
+ "external-key": "$vnf-id",
+ "resource-name": "instance-group-name",
+ "resource-value": "$vnf-name"
+ },
+ {
+ "external-key": "$vnf-id",
+ "resource-name": "vm-name",
+ "resource-value": "$vm-name"
+ }
+ ]
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml
index 3d45caddce..fed2aa69c7 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml
@@ -43,7 +43,7 @@ pnf:
mso:
naming:
endpoint: http://localhost:${wiremock.server.port}/web/service/v1/genNetworkElementName
- auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
adapters:
requestDb:
auth: Basic YnBlbDptc28tZGItMTUwNyE=
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java
index 813421ff80..c11b297e97 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java
@@ -39,14 +39,13 @@ import org.onap.so.client.graphinventory.Format;
public class AAIRestClientImpl implements AAIRestClientI {
- private static final AAIVersion ENDPOINT_VERSION = AAIVersion.V10;
private static final String PSERVER_VNF_QUERY = "pservers-fromVnf";
@Override
public List<Pserver> getPhysicalServerByVnfId(String vnfId) throws IOException {
List<AAIResourceUri> startNodes = new ArrayList<>();
startNodes.add(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
- String jsonInput = new AAIQueryClient(ENDPOINT_VERSION)
+ String jsonInput = new AAIQueryClient()
.query(Format.RESOURCE, new CustomQuery(startNodes, PSERVER_VNF_QUERY));
return this.getListOfPservers(jsonInput);
@@ -69,20 +68,20 @@ public class AAIRestClientImpl implements AAIRestClientI {
public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) {
GenericVnf genericVnf = new GenericVnf();
genericVnf.setInMaint(inMaint);
- new AAIResourcesClient(ENDPOINT_VERSION)
+ new AAIResourcesClient()
.update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId), genericVnf);
}
@Override
public GenericVnf getVnfByName(String vnfId) {
- return new AAIResourcesClient(ENDPOINT_VERSION)
+ return new AAIResourcesClient()
.get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)).orElse(null);
}
@Override
public Optional<Pnf> getPnfByName(String pnfId, String transactionLoggingUuid) {
- Response response = new AAIResourcesClient(ENDPOINT_VERSION)
+ Response response = new AAIResourcesClient()
.getFullResponse(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId));
if (response.getStatus() != 200) {
return Optional.empty();
@@ -93,7 +92,7 @@ public class AAIRestClientImpl implements AAIRestClientI {
@Override
public void createPnf(String pnfId, String transactionLoggingUuid, Pnf pnf) {
- new AAIResourcesClient(ENDPOINT_VERSION)
+ new AAIResourcesClient()
.createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.PNF, pnfId), Optional.of(pnf));
}
}
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
index de418f32c0..d93d656403 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
@@ -23,13 +23,9 @@ package org.onap.so.client.aai;
import org.onap.so.client.graphinventory.GraphInventoryVersion;
public enum AAIVersion implements GraphInventoryVersion {
- V8("v8"),
- V9("v9"),
- V10("v10"),
- V11("v11"),
- V12("v12"),
V13("v13"),
- V14("v14");
+ V14("v14"),
+ V15("v15");
public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
private final String value;
diff --git a/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java b/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
index b11003ed1e..5951928bf4 100644
--- a/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
+++ b/common/src/main/java/org/onap/so/client/sdno/SDNOValidatorImpl.java
@@ -53,7 +53,7 @@ public class SDNOValidatorImpl implements SDNOValidator {
public boolean healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
- AAIResourcesClient client = new AAIResourcesClient(AAIVersion.V10);
+ AAIResourcesClient client = new AAIResourcesClient();
GenericVnf vnf = client.get(GenericVnf.class, uri).orElseThrow(() -> new NotFoundException(vnfId + " not found in A&AI"));
SDNO requestDiagnostic = buildRequestDiagnostic(vnf, uuid, requestingUserId);
diff --git a/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java b/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java
index 0cee366679..0d4490f51d 100644
--- a/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java
@@ -68,6 +68,15 @@ public class AAIPatchConverterTest {
}
@Test
+ public void convertStringToPatchFormatNull_Test() throws URISyntaxException, JsonParseException, JsonMappingException, IOException {
+ AAIPatchConverter validator = new AAIPatchConverter();
+ String payload = "{\"ipv4-loopback0-address\": null}";
+ String result = validator.marshallObjectToPatchFormat(payload);
+ System.out.println(result);
+ assertEquals("expect no change", payload, result);
+ }
+
+ @Test
public void convertMapToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException {
AAIPatchConverter validator = new AAIPatchConverter();
HashMap<String, String> map = new HashMap<>();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
index 07f31d7a23..eae0e3a1cb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -517,36 +517,29 @@ default character set = latin1;
engine = innodb auto_increment = 20654
default character set = latin1;
- create table if not exists `service_proxy` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
-create table if not exists `service_proxy_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`tosca_node_type` varchar(200) not null,
-`source_service_model_uuid` varchar(200) not null,
-`creation_timestamp` datetime not null default current_timestamp,
-`service_proxy_model_uuid` varchar(200) not null,
-primary key (`model_customization_uuid`),
-index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
-index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
-constraint`fk_spr_customization__service_proxy_resource1`
-foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_service_proxy_resource_customization__service1`
-foreign key (`source_service_model_uuid`) references `service`
-(`model_uuid`) on delete cascade on update cascade)
-engine = innodb
-auto_increment = 20654
-default character set = latin1;
+ CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
create table if not exists `configuration_customization` (
`model_customization_uuid` varchar(200) not null,
@@ -560,19 +553,13 @@ create table if not exists `configuration_customization` (
`configuration_customization_model_customization_uuid` varchar(200) null,
primary key (`model_customization_uuid`),
index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__service_proxy_customization_idx`
-(`service_proxy_customization_model_customization_uuid` asc),
index `fk_configuration_customization__configuration_customization_idx`
(`configuration_customization_model_customization_uuid` asc),
constraint `fk_configuration_resource_customization__configuration_resour1`
foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
on delete cascade on update cascade,
-constraint `fk_configuration_customization__service_proxy_customization1` foreign
-key (`service_proxy_customization_model_customization_uuid`) references
-`service_proxy_customization` (`model_customization_uuid`)
-on delete cascade on update cascade, constraint
-`fk_configuration_customization__configuration_customization1` foreign
-key (`configuration_customization_model_customization_uuid`) references
+constraint `fk_configuration_customization__configuration_customization1`
+foreign key (`configuration_customization_model_customization_uuid`) references
`configuration_customization` (`model_customization_uuid`)
on delete cascade on update cascade)
engine = innodb
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
index 4f21580b9c..0b02c11701 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
@@ -22,6 +22,7 @@ package org.onap.so.db.catalog.beans;
import java.io.Serializable;
import java.util.Date;
+import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -30,6 +31,8 @@ import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
+import javax.persistence.MapsId;
+import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrePersist;
import javax.persistence.Table;
@@ -74,10 +77,9 @@ public class ConfigurationResourceCustomization implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID")
- private ServiceProxyResourceCustomization serviceProxyResourceCustomization;
-
+ @Column(name = "SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID")
+ private String serviceProxyResourceCustomizationUUID;
+
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID")
private ConfigurationResourceCustomization configResourceCustomization;
@@ -134,22 +136,20 @@ public class ConfigurationResourceCustomization implements Serializable {
public Date getCreated() {
return created;
}
-
- @LinkedResource
- public ServiceProxyResourceCustomization getServiceProxyResourceCustomization() {
- return serviceProxyResourceCustomization;
+
+ public String getServiceProxyResourceCustomizationUUID() {
+ return serviceProxyResourceCustomizationUUID;
}
- public void setServiceProxyResourceCustomization(
- ServiceProxyResourceCustomization serviceProxyResourceCustomization) {
- this.serviceProxyResourceCustomization = serviceProxyResourceCustomization;
+ public void setServiceProxyResourceCustomizationUUID(String serviceProxyResourceCustomizationUUID) {
+ this.serviceProxyResourceCustomizationUUID = serviceProxyResourceCustomizationUUID;
}
@LinkedResource
public ConfigurationResourceCustomization getConfigResourceCustomization() {
return configResourceCustomization;
}
-
+
public void setConfigResourceCustomization(ConfigurationResourceCustomization configResourceCustomization) {
this.configResourceCustomization = configResourceCustomization;
}
@@ -168,7 +168,7 @@ public class ConfigurationResourceCustomization implements Serializable {
return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
.append("modelInstanceName", modelInstanceName).append("nfFunction", nfFunction)
.append("nfType", nfType).append("nfRole", nfRole).append("created", created)
- .append("serviceProxyResourceCustomization", serviceProxyResourceCustomization)
+ //.append("serviceProxyResourceCustomization", serviceProxyResourceCustomization)
.append("configResourceCustomization", configResourceCustomization)
.append("configurationResource", configurationResource).toString();
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResource.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResource.java
deleted file mode 100644
index a3f12edef4..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResource.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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 java.io.Serializable;
-import java.util.Date;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.openpojo.business.annotation.BusinessKey;
-
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
-
-@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
-@Entity
-@Table(name = "service_proxy")
-public class ServiceProxyResource implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 8113564204017394906L;
-
- @BusinessKey
- @Id
- @Column(name = "MODEL_UUID")
- private String modelUUID;
-
- @Column(name = "MODEL_INVARIANT_UUID")
- private String modelInvariantUUID;
-
- @Column(name = "MODEL_VERSION")
- private String modelVersion;
-
- @Column(name = "MODEL_NAME")
- private String modelName;
-
- @Column(name = "DESCRIPTION")
- private String description;
-
- @Column(name = "CREATION_TIMESTAMP", updatable = false)
- @Temporal(TemporalType.TIMESTAMP)
- private Date created;
-
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "serviceProxyResource")
- private Set<ServiceProxyResourceCustomization> serviceProxyCustomization;
-
- @PrePersist
- protected void onCreate() {
- this.created = new Date();
- }
-
- public String getModelUUID() {
- return modelUUID;
- }
-
- public void setModelUUID(String modelUUID) {
- this.modelUUID = modelUUID;
- }
-
- public String getModelInvariantUUID() {
- return modelInvariantUUID;
- }
-
- public void setModelInvariantUUID(String modelInvariantUUID) {
- this.modelInvariantUUID = modelInvariantUUID;
- }
-
- public String getModelVersion() {
- return modelVersion;
- }
-
- public void setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
- }
-
- public String getModelName() {
- return modelName;
- }
-
- public void setModelName(String modelName) {
- this.modelName = modelName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getCreated() {
- return created;
- }
-
- @LinkedResource
- public Set<ServiceProxyResourceCustomization> getServiceProxyCustomization() {
- return serviceProxyCustomization;
- }
-
- public void setServiceProxyCustomization(Set<ServiceProxyResourceCustomization> serviceProxyCustomization) {
- this.serviceProxyCustomization = serviceProxyCustomization;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("modelUUID", modelUUID).append("modelInvariantUUID", modelInvariantUUID)
- .append("modelVersion", modelVersion).append("modelName", modelName).append("description", description)
- .append("created", created).append("serviceProxyCustomization", serviceProxyCustomization).toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof ServiceProxyResource)) {
- return false;
- }
- ServiceProxyResource castOther = (ServiceProxyResource) other;
- return new EqualsBuilder().append(modelUUID, castOther.modelUUID).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(modelUUID).toHashCode();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResourceCustomization.java
index 3df22bc716..d725c505ff 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceProxyResourceCustomization.java
@@ -22,14 +22,19 @@ package org.onap.so.db.catalog.beans;
import java.io.Serializable;
import java.util.Date;
+import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrePersist;
import javax.persistence.Table;
@@ -52,7 +57,7 @@ public class ServiceProxyResourceCustomization implements Serializable {
*
*/
private static final long serialVersionUID = -2822457299134903084L;
-
+
@BusinessKey
@Id
@Column(name = "MODEL_CUSTOMIZATION_UUID")
@@ -60,9 +65,24 @@ public class ServiceProxyResourceCustomization implements Serializable {
@Column(name = "MODEL_INSTANCE_NAME")
private String modelInstanceName;
+
+ @Column(name = "MODEL_UUID")
+ private String modelUUID;
+
+ @Column(name = "MODEL_INVARIANT_UUID")
+ private String modelInvariantUUID;
+
+ @Column(name = "MODEL_VERSION")
+ private String modelVersion;
+
+ @Column(name = "MODEL_NAME")
+ private String modelName;
@Column(name = "TOSCA_NODE_TYPE")
private String toscaNodeType;
+
+ @Column(name = "DESCRIPTION")
+ private String description;
@Column(name = "CREATION_TIMESTAMP", updatable = false)
@Temporal(TemporalType.TIMESTAMP)
@@ -71,19 +91,12 @@ public class ServiceProxyResourceCustomization implements Serializable {
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "SOURCE_SERVICE_MODEL_UUID")
private Service sourceService;
-
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @JoinColumn(name = "SERVICE_PROXY_MODEL_UUID")
- private ServiceProxyResource serviceProxyResource;
-
- @OneToOne(mappedBy = "serviceProxyResourceCustomization")
- private ConfigurationResourceCustomization configResourceCustomization;
-
+
@PrePersist
protected void onCreate() {
this.created = new Date();
}
-
+
public String getModelCustomizationUUID() {
return modelCustomizationUUID;
}
@@ -120,32 +133,56 @@ public class ServiceProxyResourceCustomization implements Serializable {
public void setSourceService(Service sourceService) {
this.sourceService = sourceService;
}
+
+ public String getModelUUID() {
+ return modelUUID;
+ }
- @LinkedResource
- public ServiceProxyResource getServiceProxyResource() {
- return serviceProxyResource;
+ public void setModelUUID(String modelUUID) {
+ this.modelUUID = modelUUID;
}
- public void setServiceProxyResource(ServiceProxyResource serviceProxyResource) {
- this.serviceProxyResource = serviceProxyResource;
+ public String getModelInvariantUUID() {
+ return modelInvariantUUID;
}
- @LinkedResource
- public ConfigurationResourceCustomization getConfigResourceCustomization() {
- return configResourceCustomization;
+ public void setModelInvariantUUID(String modelInvariantUUID) {
+ this.modelInvariantUUID = modelInvariantUUID;
}
- public void setConfigResourceCustomization(ConfigurationResourceCustomization configResourceCustomization) {
- this.configResourceCustomization = configResourceCustomization;
+ public String getModelVersion() {
+ return modelVersion;
}
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
@Override
public String toString() {
return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
.append("modelInstanceName", modelInstanceName).append("toscaNodeType", toscaNodeType)
- .append("created", created).append("sourceService", sourceService)
- .append("serviceProxyResource", serviceProxyResource)
- .append("configResourceCustomization", configResourceCustomization).toString();
+ .append("modelUUID", modelUUID)
+ .append("modelInvariantUUID",modelInvariantUUID).append("modelName",modelName)
+ .append("description",description)
+ .append("created", created).append("sourceService", sourceService).toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceCustomizationRepository.java
index c90fd8965a..cb98c8a709 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceCustomizationRepository.java
@@ -26,4 +26,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "serviceProxyResourceCustomization", path = "serviceProxyResourceCustomization")
public interface ServiceProxyResourceCustomizationRepository
extends JpaRepository<ServiceProxyResourceCustomization, String> {
+
+ ServiceProxyResourceCustomization findResourceByModelCustomizationUUID(String modelCustomizationUUID);
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceRepository.java
deleted file mode 100644
index e6ec3b04d1..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceProxyResourceRepository.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. 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.data.repository;
-
-import org.onap.so.db.catalog.beans.ServiceProxyResource;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.rest.core.annotation.RepositoryRestResource;
-
-@RepositoryRestResource(collectionResourceRel = "serviceProxyResource", path = "serviceProxyResource")
-public interface ServiceProxyResourceRepository extends JpaRepository<ServiceProxyResource, Long> {
- ServiceProxyResource findResourceByModelUUID(String modelUUID);
-} \ No newline at end of file
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index b7d0061e65..de2dd5e28b 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -555,36 +555,29 @@ default character set = latin1;
engine = innodb auto_increment = 20654
default character set = latin1;
- create table if not exists `service_proxy` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
-create table if not exists `service_proxy_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`tosca_node_type` varchar(200) not null,
-`source_service_model_uuid` varchar(200) not null,
-`creation_timestamp` datetime not null default current_timestamp,
-`service_proxy_model_uuid` varchar(200) not null,
-primary key (`model_customization_uuid`),
-index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
-index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
-constraint`fk_spr_customization__service_proxy_resource1`
-foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_service_proxy_resource_customization__service1`
-foreign key (`source_service_model_uuid`) references `service`
-(`model_uuid`) on delete cascade on update cascade)
-engine = innodb
-auto_increment = 20654
-default character set = latin1;
+ CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
create table if not exists `configuration_customization` (
`model_customization_uuid` varchar(200) not null,