Reply
Accepted Solution

Getting the next available subnet and reserving it

marcosg
Techie
Posts: 4
1701     2

Hi,

 

I have seen examples of how to get the next available IP and reserve it.  However I am looking for a way to get the next available network and reserve it/mark it as used with comments if possible.

 

I can obtain the next available subnet via the following API call

 

 

curl -k1 -u admin -X POST 'https://infoblox.local/wapi/v2.7/network network=func:nextavailablenetwork:172.16.0.0/24,29'

 

However I'm not sure how to then reserve that entire subnet.

 

Many thanks.]

 

Highlighted

Re: Getting the next available subnet and reserving it

Adviser
Posts: 111
1701     2

Hi,

 

You can use the nextavailablenetwork function while creating a network, as shown below. This will create/reserve the network and add a comment to indicate that it is used.

curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://grid-master/wapi/v2.7/network?_return_fields%2B=network,comment&_return_as_object=1" -d '{"network": "func:nextavailablenetwork:192.0.0.0/8,default,24","comment": "Used"}'

Sample output:

{
    "result": {
        "_ref": "network/ZG5zLm5ldHdvcmskMTkyLjAuNS4wLzI0LzA:192.0.5.0/24/default",
        "comment": "Used",
        "network": "192.0.5.0/24",
        "network_view": "default"
    }
}

Hope this is what you are looking for.

Showing results for 
Search instead for 
Do you mean 

Recommended for You