diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/resources')
23 files changed, 912 insertions, 10 deletions
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/OrchestrationRequest/OrchestrationList.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json index 90089c0c7e..baddb21617 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json @@ -34,7 +34,7 @@ }, { "request":{ - "requestId":"00032ab7-na18-42e5-965d-8ea592502018", + "requestId":"00032ab7-1a18-42e5-965d-8ea592502018", "requestScope":"vfModule", "requestType":"deleteInstance", "requestDetails":{ @@ -298,7 +298,7 @@ }, { "request":{ - "requestId":"00032ab7-na18-42e5-965d-8ea592502018", + "requestId":"00032ab7-1a18-42e5-965d-8ea592502018", "requestScope":"instanceGroup", "requestType":"addMembers", "requestDetails":{ diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getOrchestrationOpenstackRequestDetails.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getOrchestrationOpenstackRequestDetails.json new file mode 100644 index 0000000000..41d7e4d706 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/getOrchestrationOpenstackRequestDetails.json @@ -0,0 +1,62 @@ +{ + "clientRequestId": "00032ab7-3fb3-42e5-965d-8ea592502016", + "action": "deleteInstance", + "requestStatus": "COMPLETE", + "statusMessage": "Vf Module has been deleted successfully.", + "progress": 100, + "startTime": "2016-12-22T13:29:54.000+0000", + "endTime": "2016-12-22T13:30:28.000+0000", + "source": "VID", + "vnfId": "b92f60c8-8de3-46c1-8dc1-e4390ac2b005", + "vnfName": null, + "vnfType": null, + "serviceType": null, + "aicNodeClli": null, + "tenantId": "6accefef3cb442ff9e644d589fb04107", + "provStatus": null, + "vnfParams": null, + "vnfOutputs": null, + "requestBody": "{\"modelInfo\":{\"modelType\":\"vfModule\",\"modelName\":\"test::base::module-0\"},\"requestInfo\":{\"source\":\"VID\"},\"cloudConfiguration\":{\"tenantId\":\"6accefef3cb442ff9e644d589fb04107\",\"lcpCloudRegionId\":\"n6\"}}", + "responseBody": null, + "lastModifiedBy": "BPMN", + "modifyTime": "2016-12-22T13:30:28.000+0000", + "requestType": null, + "volumeGroupId": null, + "volumeGroupName": null, + "vfModuleId": "c7d527b1-7a91-49fd-b97d-1c8c0f4a7992", + "vfModuleName": null, + "vfModuleModelName": "test::base::module-0", + "aaiServiceId": null, + "aicCloudRegion": "n6", + "callBackUrl": null, + "correlator": null, + "serviceInstanceId": "e3b5744d-2ad1-4cdd-8390-c999a38829bc", + "serviceInstanceName": null, + "requestScope": "vfModule", + "requestAction": "deleteInstance", + "networkId": null, + "networkName": null, + "networkType": null, + "requestorId": null, + "configurationId": null, + "configurationName": null, + "operationalEnvId": null, + "operationalEnvName": null, + "cloudApiRequests":[ + { + "id": 1, + "cloudIdentifier": "heatstackName/123123", + "requestBody":"{\r\n \"test\": \"00032ab7-3fb3-42e5-965d-8ea592502016\",\r\n \"test2\": \"deleteInstance\",\r\n \"test3\": \"COMPLETE\",\r\n \"test4\": \"Vf Module has been deleted successfully.\",\r\n \"test5\": 100\r\n}", + "created": "2016-12-22T13:29:54.000+0000" + } + ], + "requestURI": "00032ab7-3fb3-42e5-965d-8ea592502017", + "_links": { + "self": { + "href": "http://localhost:8087/infraActiveRequests/00032ab7-3fb3-42e5-965d-8ea592502017" + }, + "infraActiveRequests": { + "href": "http://localhost:8087/infraActiveRequests/00032ab7-3fb3-42e5-965d-8ea592502017" + } + } +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/ALaCarteNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/ALaCarteNull.json new file mode 100644 index 0000000000..5da139e711 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/ALaCarteNull.json @@ -0,0 +1,13 @@ +{ + "requestDetails":{ + "requestInfo":{ + "source":"VID", + "requestorId":"xxxxxx", + "instanceName":"testService", + "productFamilyId":"test" + }, + "requestParameters":{ + "usePreload": "false" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBody.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBody.json new file mode 100644 index 0000000000..d6406338a0 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBody.json @@ -0,0 +1,19 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965", + "modelVersion": "1.0", + "modelType":"service", + "modelName":"serviceModel" + }, + "requestInfo":{ + "source":"VID", + "requestorId":"xxxxxx", + "instanceName":"testService", + "productFamilyId":"test" + }, + "requestParameters":{ + "aLaCarte":"false" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBodyNewRequestorId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBodyNewRequestorId.json new file mode 100644 index 0000000000..740d4e2ec2 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ResumeOrchestrationRequest/RequestBodyNewRequestorId.json @@ -0,0 +1,19 @@ +{ + "requestDetails":{ + "modelInfo":{ + "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965", + "modelVersion": "1.0", + "modelType":"service", + "modelName":"serviceModel" + }, + "requestInfo":{ + "source":"VID", + "requestorId":"yyyyyy", + "instanceName":"testService", + "productFamilyId":"test" + }, + "requestParameters":{ + "aLaCarte":"false" + } + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleRetainAssignments.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleRetainAssignments.json new file mode 100644 index 0000000000..166f7ccce8 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleRetainAssignments.json @@ -0,0 +1,33 @@ +{ + "requestDetails": { + "requestInfo": { + "source": "VID", + "requestorId": "xxxxxx", + "instanceName": "testService60" + }, + "requestParameters": { + "aLaCarte": true, + "autoBuildVfModules": false, + "retainAssignments": true, + "subscriptionServiceType": "test" + }, + "cloudConfiguration": { + "lcpCloudRegionId": "mdt1", + "tenantId": "88a6ca3ee0394ade9403f075db23167e" + }, + "modelInfo":{ + "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968", + "modelVersion":"2", + "modelVersionId":"78ca26d0-246d-11e7-93ae-92361f002671", + "modelType":"vfModule", + "modelName":"serviceModel", + "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7" + }, + "subscriberInfo": { + "globalSubscriberId": "MSO_1610_dev", + "subscriberName": "MSO_1610_dev" + } + } +} + +
\ 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/__files/infra/ExpectedServiceRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedServiceRequest.json new file mode 100644 index 0000000000..3ad3d1efec --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedServiceRequest.json @@ -0,0 +1,20 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "service", + "modelVersionId": "bad955c3-29b2-4a27-932e-28e942cc6480", + "modelUuid": "bad955c3-29b2-4a27-932e-28e942cc6480" + }, + "requestInfo": { + "instanceName": "Robot_SI_For_VolumeGroup", + "suppressRollback": false + }, + "requestParameters": { + "userParams": [], + "aLaCarte": true, + "testApi": "GR_API" + }, + "instanceName": [], + "configurationParameters": [] + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVfModuleRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVfModuleRequest.json new file mode 100644 index 0000000000..9670c3b645 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVfModuleRequest.json @@ -0,0 +1,25 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "vfModule", + "modelCustomizationUuid": "074c64d0-7e13-4bcc-8bdb-ea922331102d", + "modelCustomizationId": "074c64d0-7e13-4bcc-8bdb-ea922331102d" + }, + "requestInfo": { + "instanceName": "dummy_id", + "suppressRollback": false + }, + "cloudConfiguration": { + "tenantId": "0422ffb57ba042c0800a29dc85ca70f8", + "cloudOwner": "cloudOwner", + "lcpCloudRegionId": "regionOne" + }, + "requestParameters": { + "userParams": [], + "aLaCarte": true, + "testApi": "GR_API" + }, + "instanceName": [], + "configurationParameters": [] + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVnfRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVnfRequest.json new file mode 100644 index 0000000000..59602f7ac2 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVnfRequest.json @@ -0,0 +1,20 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "vnf", + "modelCustomizationUuid": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade", + "modelCustomizationId": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade" + }, + "requestInfo": { + "instanceName": "Robot_VNF_For_Volume_Group", + "suppressRollback": false + }, + "requestParameters": { + "userParams": [], + "aLaCarte": true, + "testApi": "GR_API" + }, + "instanceName": [], + "configurationParameters": [] + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVolumeGroupRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVolumeGroupRequest.json new file mode 100644 index 0000000000..ec7acf1e41 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVolumeGroupRequest.json @@ -0,0 +1,25 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "volumeGroup", + "modelCustomizationUuid": "e38906fa-717c-49b0-b391-e6ec12b50c4a", + "modelCustomizationId": "e38906fa-717c-49b0-b391-e6ec12b50c4a" + }, + "requestInfo": { + "instanceName": "VolumeGroup", + "suppressRollback": false + }, + "cloudConfiguration": { + "tenantId": "0422ffb57ba042c0800a29dc85ca70f8", + "cloudOwner": "cloudOwner", + "lcpCloudRegionId": "regionOne" + }, + "requestParameters": { + "userParams": [], + "aLaCarte": true, + "testApi": "GR_API" + }, + "instanceName": [], + "configurationParameters": [] + } +}
\ No newline at end of file diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ServiceInstance.json new file mode 100644 index 0000000000..7d7a103123 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ServiceInstance.json @@ -0,0 +1,35 @@ +{ + "service-instance-id": "e9fbfab4-d91c-4508-a429-2046c8751371", + "service-instance-name": "Robot_SI_For_VolumeGroup", + "environment-context": "General_Revenue-Bearing", + "model-invariant-id": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b", + "model-version-id": "bad955c3-29b2-4a27-932e-28e942cc6480", + "resource-version": "1560538276937", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "project", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v15/business/projects/project/GR_API_OE_MSO_Test200", + "relationship-data": [ + { + "relationship-key": "project.project-name", + "relationship-value": "GR_API_OE_MSO_Test200" + } + ] + }, + { + "related-to": "owning-entity", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "related-link": "/aai/v15/business/owning-entities/owning-entity/c3f57fa8-ac7d-11e8-98d0-529269fb1459", + "relationship-data": [ + { + "relationship-key": "owning-entity.owning-entity-id", + "relationship-value": "c3f57fa8-ac7d-11e8-98d0-529269fb1459" + } + ] + } + ] + } +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VfModule.json new file mode 100644 index 0000000000..cfd9eb3e3c --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VfModule.json @@ -0,0 +1,37 @@ +{ + "vf-module-id": "b70060b7-0031-4065-9462-3cd5b753d2db", + "vf-module-name": "dummy_id", + "heat-stack-id": "dummy_id/stackId", + "orchestration-status": "Active", + "is-base-vf-module": true, + "automated-assignment": false, + "resource-version": "1560538368229", + "model-invariant-id": "f7a867f2-596b-4f4a-a128-421e825a6190", + "model-version-id": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46", + "model-customization-id": "074c64d0-7e13-4bcc-8bdb-ea922331102d", + "module-index": 0, + "selflink": "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/e9fbfab4-d91c-4508-a429-2046c8751371/service-data/vnfs/vnf/829924cc-8932-4875-b0af-d7a02799da9a/vnf-data//vf-modules/vf-module/dummy_id/vf-module-data/vf-module-topology/", + "relationship-list": { + "relationship": [ + { + "related-to": "volume-group", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/regionOne/volume-groups/volume-group/18b220c8-af84-4b82-a8c0-41bbea6328a6", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "cloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "regionOne" + }, + { + "relationship-key": "volume-group.volume-group-id", + "relationship-value": "18b220c8-af84-4b82-a8c0-41bbea6328a6" + } + ] + } + ] + } +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/Vnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/Vnf.json new file mode 100644 index 0000000000..09f6d81da3 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/Vnf.json @@ -0,0 +1,131 @@ +{ + "vnf-id": "829924cc-8932-4875-b0af-d7a02799da9a", + "vnf-name": "Robot_VNF_For_Volume_Group", + "vnf-type": "Vf zrdm5bpxmc02092017-Service/Vf zrdm5bpxmc02092017-VF 0", + "service-id": "06f76284-8710-11e6-ae22-56b6b6499611", + "prov-status": "PREPROV", + "orchestration-status": "Active", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1560538316260", + "model-invariant-id": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "model-version-id": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "model-customization-id": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade", + "selflink": "/sim/restconf/config/GENERIC-RESOURCE-API:services/service/e9fbfab4-d91c-4508-a429-2046c8751371/service-data/vnfs/vnf/829924cc-8932-4875-b0af-d7a02799da9a/vnf-data/vnf-topology/", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "relationship-label": "org.onap.relationships.inventory.ComposedOf", + "related-link": "/aai/v15/business/customers/customer/Robot_Test_Subscriber_ID/service-subscriptions/service-subscription/Robot_Test_Service_Type/service-instances/service-instance/e9fbfab4-d91c-4508-a429-2046c8751371", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Robot_Test_Subscriber_ID" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "Robot_Test_Service_Type" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "e9fbfab4-d91c-4508-a429-2046c8751371" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "Robot_SI_For_VolumeGroup" + } + ] + }, + { + "related-to": "platform", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v15/business/platforms/platform/vSAMP12_14-2XXX-Aug18-9001%20-%20Platform", + "relationship-data": [ + { + "relationship-key": "platform.platform-name", + "relationship-value": "vSAMP12_14-2XXX-Aug18-9001 - Platform" + } + ] + }, + { + "related-to": "line-of-business", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v15/business/lines-of-business/line-of-business/vSAMP12_14-2XXX-Aug18-9001%20-%20LOB", + "relationship-data": [ + { + "relationship-key": "line-of-business.line-of-business-name", + "relationship-value": "vSAMP12_14-2XXX-Aug18-9001 - LOB" + } + ] + }, + { + "related-to": "tenant", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "related-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/regionOne/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "cloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "regionOne" + }, + { + "relationship-key": "tenant.tenant-id", + "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8" + } + ], + "related-to-property": [ + { + "property-key": "tenant.tenant-name", + "property-value": "tenantName" + } + ] + }, + { + "related-to": "volume-group", + "relationship-label": "org.onap.relationships.inventory.DependsOn", + "related-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/regionOne/volume-groups/volume-group/volumeGroupId", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "cloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "regionOne" + }, + { + "relationship-key": "volume-group.volume-group-id", + "relationship-value": "18b220c8-af84-4b82-a8c0-41bbea6328a6" + } + ] + }, + { + "related-to": "cloud-region", + "relationship-label": "org.onap.relationships.inventory.LocatedIn", + "related-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/regionOne", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "cloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "regionOne" + } + ], + "related-to-property": [ + { + "property-key": "cloud-region.owner-defined-type", + "property-value": "LCP" + } + ] + } + ] + } +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VolumeGroup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VolumeGroup.json new file mode 100644 index 0000000000..328b82ed55 --- /dev/null +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VolumeGroup.json @@ -0,0 +1,56 @@ +{ + "volume-group-id": "5e6bca5b-8e14-4bdd-a419-820f68019b19", + "volume-group-name": "VolumeGroup", + "heat-stack-id": "VolumeGroup/stackId", + "vnf-type": "Vf zrdm5bpxmc02092017-Service/Vf zrdm5bpxmc02092017-VF 0", + "orchestration-status": "Active", + "model-customization-id": "e38906fa-717c-49b0-b391-e6ec12b50c4a", + "vf-module-model-customization-id": "e38906fa-717c-49b0-b391-e6ec12b50c4a", + "resource-version": "1560526466219", + "relationship-list": { + "relationship": [ + { + "related-to": "tenant", + "relationship-label": "org.onap.relationships.inventory.DependsOn", + "related-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner/regionOne/tenants/tenant/0422ffb57ba042c0800a29dc85ca70f8", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "cloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "regionOne" + }, + { + "relationship-key": "tenant.tenant-id", + "relationship-value": "0422ffb57ba042c0800a29dc85ca70f8" + } + ], + "related-to-property": [ + { + "property-key": "tenant.tenant-name", + "property-value": "tenantName" + } + ] + }, + { + "related-to": "generic-vnf", + "relationship-label": "org.onap.relationships.inventory.DependsOn", + "related-link": "/aai/v15/network/generic-vnfs/generic-vnf/82035634-1878-4fd9-ab14-04b819bea24b", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "82035634-1878-4fd9-ab14-04b819bea24b" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "Robot_VNF_For_Volume_Group" + } + ] + } + ] + } +} diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml index 712fbf54ca..2e1c6a9bdc 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml +++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml @@ -83,6 +83,8 @@ mso: spring: + jersey: + type: filter datasource: jdbcUrl: jdbc:mariadb://localhost:3307/catalogdb username: root @@ -97,11 +99,10 @@ spring: naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy enable-lazy-load-no-trans: true database-platform: org.hibernate.dialect.MySQL5InnoDBDialect - jersey: - type: filter + security: usercredentials: - - + - username: test password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu' role: InfraPortal-Client 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 bc9003f5d0..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 @@ -1108,6 +1111,7 @@ CREATE TABLE `vnf_resource_customization` ( `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL, `SERVICE_MODEL_UUID` varchar(200) NOT NULL, + `VNFCINSTANCEGROUP_ORDER` varchar(200) default NULL, PRIMARY KEY (`ID`), UNIQUE KEY `UK_vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`,`SERVICE_MODEL_UUID`), KEY `fk_vnf_resource_customization__vnf_resource1_idx` (`VNF_RESOURCE_MODEL_UUID`), @@ -1134,6 +1138,8 @@ CREATE TABLE `vnfc_customization` ( `MODEL_NAME` varchar(200) NOT NULL, `TOSCA_NODE_TYPE` varchar(200) NOT NULL, `DESCRIPTION` varchar(1200) DEFAULT NULL, + `RESOURCE_INPUT` varchar(20000) DEFAULT NULL, + `VNFC_INSTANCE_GROUP_CUSTOMIZATION_ID` integer DEFAULT NULL, `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -1460,6 +1466,16 @@ create table if not exists model ( FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `requestdb`.`cloud_api_requests` ( +`ID` INT(13) NOT NULL AUTO_INCREMENT, +`REQUEST_BODY` LONGTEXT NOT NULL, +`CLOUD_IDENTIFIER` VARCHAR(200) NULL, +`SO_REQUEST_ID` VARCHAR(45) NOT NULL, +`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`ID`), +INDEX `fk_cloud_api_requests__so_request_id_idx` (`SO_REQUEST_ID` ASC)) +ENGINE = InnoDB DEFAULT CHARSET=latin1; + CREATE TABLE IF NOT EXISTS `workflow` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `ARTIFACT_UUID` varchar(200) NOT NULL, @@ -1477,8 +1493,3 @@ CREATE TABLE IF NOT EXISTS `workflow` ( PRIMARY KEY (`ID`), UNIQUE KEY `UK_workflow` (`ARTIFACT_UUID`,`NAME`,`VERSION`,`SOURCE`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; - - - - - |