summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/createNetworkRequest.json8
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/generalBB.json6
3 files changed, 17 insertions, 5 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
index 4c84ee4003..f917aed39e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
@@ -283,6 +283,14 @@ public class NetworkAdapterObjectMapper {
//add host route to the list
openstackHostRouteList.add(openstackHostRoute);
}
+ if (subnet.getDhcpStart() != null && !subnet.getDhcpStart().equals("")) {
+ org.onap.so.openstack.beans.Pool openstackAllocationPool = new org.onap.so.openstack.beans.Pool();
+ openstackAllocationPool.setStart(subnet.getDhcpStart());
+ openstackAllocationPool.setEnd(subnet.getDhcpEnd());
+ List<org.onap.so.openstack.beans.Pool> allocationPools = new ArrayList<>();
+ allocationPools.add(openstackAllocationPool);
+ openstackSubnet.setAllocationPools(allocationPools);
+ }
openstackSubnet.setHostRoutes(openstackHostRouteList);
//add subnet to the list
subnetList.add(openstackSubnet);
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/createNetworkRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/createNetworkRequest.json
index a9cef565df..d7e282dda7 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/createNetworkRequest.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/createNetworkRequest.json
@@ -13,9 +13,13 @@
"cidr": "107.244.64.2/20",
"gatewayIp": "107.244.64.1",
"ipVersion": "4",
- "enableDHCP": false,
+ "enableDHCP": true,
"addrFromStart": true,
- "hostRoutes": []
+ "hostRoutes": [],
+ "allocationPools": [{
+ "start": "107.244.64.2",
+ "end": "107.244.64.16"
+ }]
}
],
"providerVlanNetwork": {
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/generalBB.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/generalBB.json
index 6c6981b96a..e0b3bc4ff9 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/generalBB.json
+++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/NetworkMapper/generalBB.json
@@ -64,9 +64,9 @@
"cidr-mask" : "20",
"ip-version" : "4",
"orchestration-status" : null,
- "dhcp-enabled" : false,
- "dhcp-start" : "",
- "dhcp-end" : "",
+ "dhcp-enabled" : true,
+ "dhcp-start" : "107.244.64.2",
+ "dhcp-end" : "107.244.64.16",
"subnet-role" : "",
"ip-assignment-direction" : "true",
"subnet-sequence" : null,