aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/resources
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-06-18 17:04:18 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-18 17:18:16 -0400
commit4f82c56ca62b266d007f240c7b57d11cadd5f0b3 (patch)
tree6452b1e22db9e70a7e8636689af5fe4b7ff4e7ee /mso-api-handlers/mso-api-handler-infra/src/test/resources
parent7c69f07593a8c7474bd7a69a65979dc0635f1526 (diff)
support no payload for alacarte deletes
Swap to using HTTP Enumerations rather than ints Add Unit Tests to Service Instances endpoint Add Vnf Tests remove Abstract class Clean up usage of abstract classes Fix volume and module bean wiring issues Add logic to find create request if cloud not in AAI Updated network to take in version pathparam Additonal refactor of the endpoints Add missing license headers to all files Clean up public variable usage, move to protected Change-Id: Icdbdf78aa6c8af7a30fdff8a5805103f8df9364d Issue-ID: SO-2032 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/resources')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedServiceRequest.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVfModuleRequest.json25
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVnfRequest.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ExpectedVolumeGroupRequest.json25
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/ServiceInstance.json35
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VfModule.json37
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/Vnf.json131
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VolumeGroup.json56
8 files changed, 349 insertions, 0 deletions
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"
+ }
+ ]
+ }
+ ]
+ }
+}