summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorKalkere Ramesh, Sharan <sharan.kalkere.ramesh@att.com>2019-05-15 14:34:33 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-05-15 14:34:43 -0400
commit6a4c6a980a5998c996e3ebecd340eb438bba5bc8 (patch)
tree4e296a245f51719cf24178648ab9916d8320660f /bpmn/MSOCommonBPMN/src/test
parentf9c309fb9e789225ccd6b02ec9ab4777bbd4021c (diff)
mapped host routes into gbb l3 network object
mapped host routes into gbb l3 network object Change-Id: Ie3ab4693f7584946b1e2020d43143412bec62631 Issue-ID: SO-1885 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json73
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json56
3 files changed, 134 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index e7afa9ec8b..37f8b8b2fd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -398,10 +398,12 @@ public class BBInputSetupMapperLayerTest {
@Test
public void testMapAAIL3NetworkIntoL3Network() throws IOException {
- L3Network expected = mapper.readValue(new File(RESOURCE_PATH + "l3NetworkExpected.json"), L3Network.class);
+ L3Network expected =
+ mapper.readValue(new File(RESOURCE_PATH + "l3NetworkExpectedWithSubnet.json"), L3Network.class);
- org.onap.aai.domain.yang.L3Network aaiL3Network = mapper.readValue(
- new File(RESOURCE_PATH + "aaiL3NetworkInput.json"), org.onap.aai.domain.yang.L3Network.class);
+ org.onap.aai.domain.yang.L3Network aaiL3Network =
+ mapper.readValue(new File(RESOURCE_PATH + "aaiL3NetworkInputWithSubnets.json"),
+ org.onap.aai.domain.yang.L3Network.class);
L3Network actual = bbInputSetupMapperLayer.mapAAIL3Network(aaiL3Network);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json
new file mode 100644
index 0000000000..418396f290
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json
@@ -0,0 +1,73 @@
+{
+ "networkId": "networkId",
+ "networkName": "networkName",
+ "networkType": null,
+ "networkRole": null,
+ "networkTechnology": null,
+ "neutronNetworkId": null,
+ "isBoundToVpn": true,
+ "serviceId": "serviceId",
+ "networkRoleInstance": 1234,
+ "resourceVersion": null,
+ "orchestrationStatus": "Assigned",
+ "heatStackId": "heatStackId",
+ "msoCatalogKey": null,
+ "contrailNetworkFqdn": "contrailNetworkFqdn",
+ "modelInvariantId": null,
+ "modelVersionId": null,
+ "personaModelVersion": null,
+ "modelCustomizationId": null,
+ "widgetModelId": "widgetModelId",
+ "widgetModelVersion": "widgetModelVersion",
+ "physicalNetworkName": "physicalNetworkName",
+ "isProviderNetwork": true,
+ "isSharedNetwork": true,
+ "isExternalNetwork": true,
+ "selflink": "selflink",
+ "operationalStatus": "operationalStatus",
+ "subnets": {
+ "subnet": [
+ {
+ "subnetId": "subnetId",
+ "subnetName": "subnetName",
+ "neutronSubnetId": "neutronSubnetId",
+ "gatewayAddress": "10.80.12.1",
+ "networkStartAddress": "10.80.12.0",
+ "cidrMask": "23",
+ "ipVersion": "4",
+ "orchestrationStatus": "Active",
+ "dhcpEnabled": true,
+ "dhcpStart": "10.80.12.3",
+ "dhcpEnd": "10.80.13.254",
+ "subnetRole": "s1",
+ "ipAssignmentDirection": "true",
+ "resourceVersion": "1557499815393",
+ "hostRoutes": {
+ "hostRoute": [
+ {
+ "hostRouteId": "91324351-01bf-43f8-a302-8c873451b4f1",
+ "routePrefix": "10.0.0.0/16",
+ "nextHop": "10.80.12.1",
+ "resourceVersion": "1557499777501"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "ctagAssignments": {
+ "ctagAssignment": [
+ {
+ "vlanIdInner": 1234
+ }
+ ]
+ },
+ "segmentationAssignments": {
+ "segmentationAssignment": [
+ {
+ "segmentationId": "segmentationId"
+ }
+ ]
+ },
+ "relationshipList": null
+} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json
new file mode 100644
index 0000000000..ccefe195c9
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json
@@ -0,0 +1,56 @@
+{
+ "network-id": "networkId",
+ "cascaded": null,
+ "cloud-params": {
+
+ },
+ "network-name": "networkName",
+ "is-bound-to-vpn": true,
+ "service-id": "serviceId",
+ "network-role-instance": 1234,
+ "orchestration-status": "ASSIGNED",
+ "heat-stack-id": "heatStackId",
+ "contrail-network-fqdn": "contrailNetworkFqdn",
+ "widget-model-id": "widgetModelId",
+ "widget-model-version": "widgetModelVersion",
+ "physical-network-name": "physicalNetworkName",
+ "is-provider-network": true,
+ "is-shared-network": true,
+ "is-external-network": true,
+ "self-link": "selflink",
+ "operational-status": "operationalStatus",
+ "subnets": [
+ {
+ "subnet-id": "subnetId",
+ "subnet-name": "subnetName",
+ "neutron-subnet-id": "neutronSubnetId",
+ "gateway-address": "10.80.12.1",
+ "network-start-address": "10.80.12.0",
+ "cidr-mask": "23",
+ "ip-version": "4",
+ "dhcp-enabled": true,
+ "dhcp-start": "10.80.12.3",
+ "dhcp-end": "10.80.13.254",
+ "subnet-role": "s1",
+ "ip-assignment-direction": "true",
+ "host-routes": [
+ {
+ "host-route-id": "91324351-01bf-43f8-a302-8c873451b4f1",
+ "route-prefix": "10.0.0.0/16",
+ "next-hop": "10.80.12.1"
+ }
+ ]
+ }
+ ],
+ "ctag-assignments": [
+ {
+ "vlan-id-inner": 1234
+ }
+ ],
+ "segmentation-assignments": [
+ {
+ "segmentation-id": "segmentationId"
+ }
+ ],
+ "model-info-network": null
+}