diff options
author | 2021-11-29 16:01:45 -0500 | |
---|---|---|
committer | 2021-12-02 12:58:16 -0500 | |
commit | 4d0e2bd865cf490eb3f8d72dbbf02dd3ba8e5178 (patch) | |
tree | ed14c5b16345b2dab67e5b380037b95e6eb1d328 /ms/gra/gra-app/src/test/resources | |
parent | 749b6f7c68f3a343ba9aae5a2f5f0f5d6d1909ea (diff) |
Add test cases for gra microservice
Add test cases for GRA microservice to address test coverage being
under target
Issue-ID: SDNC-1638
Signed-off-by: Dan Timoney <dtimoney@att.com>
Change-Id: If9422cdb577ef3984f17f4ef7aa2cd7e362e2fd4
Diffstat (limited to 'ms/gra/gra-app/src/test/resources')
10 files changed, 383 insertions, 1 deletions
diff --git a/ms/gra/gra-app/src/test/resources/contrail-route-allotted-resources-1.json b/ms/gra/gra-app/src/test/resources/contrail-route-allotted-resources-1.json new file mode 100644 index 0000000..4e34fe1 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/contrail-route-allotted-resources-1.json @@ -0,0 +1,35 @@ +{ + "contrail-route-allotted-resources" : { + "contrail-route-allotted-resource" : [ + { + "allotted-resource-id": "ar1", + "allotted-resource-data": { + "allotted-resource-oper-status": { + "create-timestamp": "2020-11-24T12:41:01.796Z", + "order-status": "Active" + }, + "contrail-route-topology": { + "contrail-route-assignments": { + "contrail-id": "cr1", + "dest-network": { + "network-id": "19cdfce4-9124-4bbf-83bd-5140931bb519", + "network-role": "pktmirror" + }, + "fq-name": "default-domain.GRP-27529-T-IST-13C.GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32", + "source-network": { + "network-id": "1610d17a-fb91-48ac-9d4c-43f739fdbe54", + "network-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP" + } + }, + "allotted-resource-identifiers": { + "allotted-resource-id": "ar1", + "allotted-resource-type": "contrail-route", + "allotted-resource-name": "GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32", + "parent-service-instance-id": "service1" + } + } + } + } + ] +} +} diff --git a/ms/gra/gra-app/src/test/resources/port-mirror-configurations-1.json b/ms/gra/gra-app/src/test/resources/port-mirror-configurations-1.json new file mode 100644 index 0000000..9d7f2f2 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/port-mirror-configurations-1.json @@ -0,0 +1,122 @@ +{ + "port-mirror-configurations" : { + "port-mirror-configuration": [ + { + "configuration-data": { + "configuration-oper-status": { + "last-action": "CreatePortMirrorConfigurationInstance", + "last-rpc-action": "activate", + "order-status": "Active" + }, + "configuration-operation-information": { + "configuration-information": { + "configuration-id": "pm-config-1", + "configuration-sub-type": "vprobe", + "configuration-type": "PORT-MIRROR", + "onap-model-information": { + "model-customization-uuid": "770c991a-47fb-4225-8d72-4790847f8307", + "model-invariant-uuid": "a81abec0-222e-4fb2-b1c6-c4162359b2b3", + "model-name": "Port Mirroring Configuration", + "model-uuid": "18af239e-5397-4224-816f-d2850f3fab38", + "model-version": "23.0" + } + }, + "port-mirror-configuration-request-input": { + "dest-port": { + "vnf-information": { + "vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5" + } + }, + "source-port": { + "vnf-information": { + "vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d" + } + } + }, + "request-information": { + "request-action": "CreatePortMirrorConfigurationInstance", + "request-id": "61fe8925-fb53-4968-b9de-74be4acd06cc", + "source": "MSO" + }, + "sdnc-request-header": { + "svc-action": "activate", + "svc-notification-url": "https://mso-sdnc-s3.ecomp.idns.aic.cip.att.com:30254/adapters/rest/SDNCNotify", + "svc-request-id": "ba937e51-6baf-486c-9851-3c6a646c9256" + }, + "service-information": { + "global-customer-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5", + "subscription-service-type": "Mobility" + } + }, + "port-mirror-configuration-topology": { + "configuration-identifiers": { + "configuration-id": "pm-config-1", + "configuration-name": "vMME02_VLC_Port_Mirroring_DYH2B_SCTPA", + "configuration-sub-type": "vprobe", + "configuration-type": "PORT-MIRROR", + "parent-service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5" + }, + "port-mirror-configuration-assignments": { + "cloud-owner": "att-aic", + "cloud-region-id": "dyh2b", + "dest-network-fqdn": "default-domain:GRP-27529-T-SIL-13B:GRP-27529-T-SIL-13B_vprobe_int_pkmirror1", + "dest-vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5", + "dest-vnfc-instance-group-id": { + "configuration-id": "pm-config-1", + "instance-group-role": "pktmirror", + "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5" + }, + "owning-entity": "10c645f5-9924-4b89-bec0-b17cf49d3cad", + "probe-type": "vprobe", + "route-allotted-resource-id": "286d41ea-d644-46b2-98fc-643ea1b591d1", + "source-capacity": 100000, + "source-network-fqdn": "default-domain:GRP-27529-T-IST-13C:GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12", + "source-to-dest-maps": { + "source-to-dest-map": [ + { + "dest-ip-addresses": { + "ip-addresses": { + "ipv4-address": "107.114.102.4" + } + }, + "dest-port-id": "b91beeda-fae3-4a99-9354-06c965db83f7", + "dest-port-name": "zdyh2bprbvlba_module04-vlbagent_eph_aff_0_int_pktmirror_port_0-m5ylyrybbmmb", + "dest-vserver-id": "9e2fc5ea-a88f-4955-bda8-10e75c173a8e", + "source-port-id": "7b6ee74c-cc2c-4290-95f2-2d89a3c4da74", + "source-port-name": "default-virtual-machine-interface-7b6ee74c-cc2c-4290-95f2-2d89a3c4da74", + "source-vserver-id": "2e3a8bb2-75ff-4e97-a888-961bfc624caa" + }, + { + "dest-ip-addresses": { + "ip-addresses": { + "ipv4-address": "107.114.102.3" + } + }, + "dest-port-id": "7cf3fda3-3153-4655-ae47-36fcf4439073", + "dest-port-name": "zdyh2bprbvlba_base_5-vlbagentbase_eph_aff_0_int_pktmirror_port_0-vkvey3eyoqk2", + "dest-vserver-id": "165db140-c09f-411a-bfdc-b8e6c7dbbda4", + "source-port-id": "0fd4c63c-6fda-4564-af10-d3be157279ef", + "source-port-name": "default-virtual-machine-interface-0fd4c63c-6fda-4564-af10-d3be157279ef", + "source-vserver-id": "b5bf2e1f-9f90-445c-be00-2c882e82d1d7" + } + ] + }, + "source-vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d", + "source-vnfc-instance-group-id": { + "configuration-id": "pm-config-1", + "instance-group-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP", + "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5" + }, + "tenant": "GRP-27529-T-IST-13C", + "tenant-context": "Test", + "tenant-id": "077445458306425499337c98bafc8c47", + "vnics-group-id": "97" + } + } + }, + "configuration-id": "pm-config-1" + } + ] + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-network.json b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-network.json new file mode 100644 index 0000000..f9114c0 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-network.json @@ -0,0 +1,15 @@ +{ + "network": + { + "network-id": "net124", + "vpn-bindings": [ + { + "vpn-binding-id": "vpnbind2", + "route-target-role": "both", + "vpn-name": "myvpn2", + "global-route-target": "target2", + "aic-zone": "RDM5" + } + ] + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-vpnbind.json b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-vpnbind.json new file mode 100644 index 0000000..4e8abc3 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp-vpnbind.json @@ -0,0 +1,10 @@ +{ + "vpn-bindings": + { + "vpn-binding-id": "vpnbind3", + "route-target-role": "both", + "vpn-name": "myvpn3", + "global-route-target": "target3", + "aic-zone": "RDM5" + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-netinstancegrp.json b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp.json new file mode 100644 index 0000000..5cd12db --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-netinstancegrp.json @@ -0,0 +1,35 @@ +{ + "network-instance-group" : { + "network-instance-group-id": "netgrp123", + "networks": { + "network": [ + { + "network-id": "net123", + "vpn-bindings": [ + { + "vpn-binding-id": "vpnbind1", + "route-target-role": "both", + "vpn-name": "myvpn", + "global-route-target": "target1", + "aic-zone": "RDM5" + } + ] + } + ] + }, + "subnet-key-value": "subnet1", + "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca", + "subnet-assignment-policy": { + "subnet-use": "shared" + }, + "subnets": [ + { + "start-address": "10.1.1.1", + "ip-version": "4", + "dhcp-enabled": "N", + "subnet-name": "subnet1", + "cidr-mask": "26" + } + ] + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-network-allotted-resource.json b/ms/gra/gra-app/src/test/resources/service1-network-allotted-resource.json new file mode 100644 index 0000000..ff16380 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-network-allotted-resource.json @@ -0,0 +1,7 @@ +{ + "network-provided-allotted-resources": { + "network-provided-ar-id": [ + "ar123" + ] + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-network-id-structure.json b/ms/gra/gra-app/src/test/resources/service1-network-id-structure.json new file mode 100644 index 0000000..abc345d --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-network-id-structure.json @@ -0,0 +1,8 @@ +{ + "network-topology-identifier-structure": { + "network-technology": "soupcan", + "network-type": "CAMPBELLS_TOMATO", + "network-name": "popart", + "network-role": "dummy" + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-network-oper-status.json b/ms/gra/gra-app/src/test/resources/service1-network-oper-status.json new file mode 100644 index 0000000..1b69a3d --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-network-oper-status.json @@ -0,0 +1,5 @@ +{ + "oper-status": { + "order-status": "Created" + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1-network.json b/ms/gra/gra-app/src/test/resources/service1-network.json new file mode 100644 index 0000000..676dd35 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/service1-network.json @@ -0,0 +1,37 @@ +{ + "network": { + "network-id": "net124", + "network-data": { + "network-topology": { + "tenant": "tenant2", + "network-topology-identifier-structure": { + "network-technology": "soupcan", + "network-type": "CAMPBELLS_TOMATO", + "network-name": "andy", + "network-role": "dummy" + }, + "aic-cloud-region": "region1" + }, + "service-information": { + "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca", + "onap-model-information": { + "model-invariant-uuid": "abcdef12345", + "model-uuid": "abcdef12345" + } + }, + "network-level-oper-status": { + "order-status": "Created" + }, + "network-request-input": { + "tenant": "tenant2", + "network-name": "andy", + "aic-cloud-region": "region1" + }, + "network-information": { + "network-type": "CAMPBELLS_TOMATO", + "network-id": "net124", + "from-preload": true + } + } + } +} diff --git a/ms/gra/gra-app/src/test/resources/service1.json b/ms/gra/gra-app/src/test/resources/service1.json index 806af9c..d7bc4c0 100644 --- a/ms/gra/gra-app/src/test/resources/service1.json +++ b/ms/gra/gra-app/src/test/resources/service1.json @@ -46,6 +46,114 @@ "svc-action": "assign", "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400" }, + "network-instance-groups": { + "network-instance-group": [ + { + "network-instance-group-id": "netgrp123", + "networks" : { + "network" : [ + { + "network-id": "net123", + "vpn-bindings": [ + { + "vpn-binding-id": "vpnbind1", + "route-target-role": "both", + "vpn-name" : "myvpn", + "global-route-target": "target1", + "aic-zone": "RDM5" + } + ] + } + ] + }, + "subnet-key-value": "subnet1", + "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca", + "subnet-assignment-policy": { + "subnet-use": "shared" + }, + "subnets": [ + { + "start-address": "10.1.1.1", + "ip-version": "4", + "dhcp-enabled": "N", + "subnet-name": "subnet1", + "cidr-mask": "26" + } + ] + } + ] + + }, + "networks": { + "network": [ + { + "network-id": "net123", + "network-data": { + "network-topology": { + "tenant": "tenant1", + "network-topology-identifier-structure": { + "network-technology": "soupcan", + "network-type": "CAMPBELLS_TOMATO", + "network-name": "warhol", + "network-role": "dummy" + }, + "aic-cloud-region": "region1" + }, + "service-information": { + "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca", + "onap-model-information": { + "model-invariant-uuid": "abcdef12345", + "model-uuid": "abcdef12345" + } + }, + "network-level-oper-status": { + "order-status": "Created" + }, + "network-request-input": { + "tenant": "tenant1", + "network-name": "warhol", + "aic-cloud-region": "region1" + }, + "network-information": { + "network-type": "CAMPBELLS_TOMATO", + "network-id": "net123", + "from-preload": true + }, + "network-provided-allotted-resources": { + "network-provided-ar-id": [ + "ar123" + ] + } + } + }, + { + "network-id": "net125", + "network-data": { + "network-topology": { + "tenant": "tenant1", + "aic-cloud-region": "region1" + }, + "service-information": { + "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca", + "onap-model-information": { + "model-invariant-uuid": "abcdef12345", + "model-uuid": "abcdef12345" + } + }, + "network-request-input": { + "tenant": "tenant1", + "network-name": "popart", + "aic-cloud-region": "region1" + }, + "network-information": { + "network-type": "CAMPBELLS_TOMATO", + "network-id": "net125", + "from-preload": true + } + } + } + ] + }, "vnfs": { "vnf": [ { @@ -232,4 +340,4 @@ } } ] -}
\ No newline at end of file +} |