From 62b2e47808fe1adcbac31dbcdf992617b7f0bd4d Mon Sep 17 00:00:00 2001 From: "Gamboa, Gilbert" Date: Thu, 6 Jun 2019 14:23:36 -0400 Subject: Accommodate WAN Networking checked and evaluated naming policy only if infra bonding. Updated workflowAction to include vrf configuration for vpn-binding in resourceIds list. added in linked resource to service proxy cust committing the asdc controller classpath change added some unit tests for vrf validation and updated bbinput setup test update config resource cust foreign key mapping Moved mockbean for AssignVrfConfiguration task class into BaseBpmnTest. added in a check to see if list is empty before access added unit tests for bbinput setup for vrf config Update AssignFlows enum with correct AssignVrfConfiguration flow name Change-Id: Ibf14e36505638b19c1366ecebfce560c02e69e44 Issue-ID: SO-1975 Signed-off-by: Benjamin, Max (mb388a) --- .../ServiceInstanceVpnBondingService.json | 57 ++++++++++++++++++++++ .../ServiceInstanceVpnBondingService.json | 57 ++++++++++++++++++++++ .../VpnBondingValidation/NoInstanceId.json | 56 +++++++++++++++++++++ .../NoInstanceNameNetwork.json | 56 +++++++++++++++++++++ .../NoInstanceNameVpnBinding.json | 56 +++++++++++++++++++++ .../VpnBondingValidation/NoModelInvariantId.json | 57 ++++++++++++++++++++++ .../VpnBondingValidation/NoModelType.json | 56 +++++++++++++++++++++ .../src/test/resources/schema.sql | 3 ++ 8 files changed, 398 insertions(+) create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json create mode 100644 mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/resources') diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json new file mode 100644 index 0000000000..573b7a3ebb --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json @@ -0,0 +1,57 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "vpn-name", + "modelInfo": { + "modelType": "vpnBinding" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json new file mode 100644 index 0000000000..573b7a3ebb --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json @@ -0,0 +1,57 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "vpn-name", + "modelInfo": { + "modelType": "vpnBinding" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json new file mode 100644 index 0000000000..97e480c8d8 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json @@ -0,0 +1,56 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceName": "vpn-name", + "modelInfo": { + "modelType": "vpnBinding" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json new file mode 100644 index 0000000000..f7ba4761b6 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json @@ -0,0 +1,56 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "vpn-name", + "modelInfo": { + "modelType": "vpnBinding" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json new file mode 100644 index 0000000000..ac570b3830 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json @@ -0,0 +1,56 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "modelInfo": { + "modelType": "vpnBinding" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json new file mode 100644 index 0000000000..ca02c5371a --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json @@ -0,0 +1,57 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "vpn-name", + "modelInfo": { + "modelType": "vnf" + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "service" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json new file mode 100644 index 0000000000..1d46ce2ccd --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json @@ -0,0 +1,56 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21", + "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb", + "modelName": "Test", + "modelVersion": "1.0" + }, + "cloudConfiguration": { + "cloudOwner": "test-mgr", + "lcpCloudRegionId": "abc1", + "tenantId": "19123c2924c648eb8e42a3c1f14b7682" + }, + "owningEntity": { + "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489", + "owningEntityName": "PACKET CORE" + }, + "project": { + "projectName": "projectName" + }, + "subscriberInfo": { + "globalSubscriberId": "TEST_123", + "subscriberName": "TEST_123" + }, + "requestInfo": { + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "requestorId": "xxxxxx", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "vpn-name", + "modelInfo": { + } + } + }, + { + "relatedInstance": { + "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000", + "instanceName": "network-name", + "modelInfo": { + "modelType": "network" + } + } + } + ], + "requestParameters": { + "subscriptionServiceType": "dev-service-type", + "aLaCarte": false + } + } +} \ No newline at end of file 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 c2eb21b18e..948283453b 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 @@ -806,6 +806,9 @@ CREATE TABLE `service` ( `WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL, `SERVICE_CATEGORY` varchar(200) DEFAULT NULL, `RESOURCE_ORDER` varchar(200) default NULL, + `OVERALL_DISTRIBUTION_STATUS` varchar(45), + `ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL, + `NAMING_POLICY` varchar(200) DEFAULT NULL, PRIMARY KEY (`MODEL_UUID`), KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`), CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE -- cgit 1.2.3-korg