03-02-2017 04:04 AM
We have 2 use cases of creating either any available network(which works perfectly) or user-specified subnet.
Use Case 1(Creation of next available free subnet)
Lets say, we need to create next free /29 under the exisitng /23 Network Container. For this we use below mentioned API. And it works perfectly.
We get the Network Container _ref by calling below API
This returns lets say _ref = networkcontainer/ZG5zLm5ld:188.8.131.52/23/default
Request for next available /29 subnet under the Network Container specified by _ref
This returns lets say: 184.108.40.206/28
Use Case 2(Creation of user-specified subnet):
Considering I already hold a 220.127.116.11/28 subnet whose hosts are yet to be used, but should not get modified as its considered reserved.
This is a case, where user specified subnet as : 18.104.22.168/29 and user sends the request to create subnet as:
This creates a subnet as 22.214.171.124/29, but converts 126.96.36.199/28 from subnet to a Network Container which we don';t expect it to, as its a Subnet overlap.
Please suggest how can we avoid this overlap or is there any other API or attributes we should send in the POST request to avoid this further.
So, in this case case we typically do not want 188.8.131.52/29 to get created, rather it should throw back an error, saying that already we have a /28 as a subnet (which is not a network container).
05-15-2017 11:52 AM