Reply
Highlighted

get_next_available_ip()

nikita
Techie
Posts: 1
1766     0

I am trying to get the next available ip based on a range(10.99.3.200-10.99.3.249) using the rest API.

However, when I send an ip to next_available_ip where the last octect is 0 (ie: 10.99.3.0) it returns 10.99.3.1 which is the next available. But, when I send 10.99.3.200 it returns 0. Why is that the case? Any help would be more than appreciated! 

Re: get_next_available_ip()

Adviser
Posts: 70
1767     0

Hi Nikita,

 

This seems to be working differently for me.

 

Please see the calls below.

 

curl -k -u admin:infoblox -H "Content-Type: application/json" -X POST https://10.192.32.240/wapi/v2.5/fixedaddress -d '{"ipv4addr": "func:nextavailableip:10.192.16.206-0.192.16.210", "mac": "1abbcccdeeff" }'


"fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMTkyLjE2LjIwNi4wLi4:10.192.16.206/default"

 

curl -k -u admin:infoblox -H "Content-Type: appliction/json" -X GET https://10.192.32.240/wapi/v2.5/fixedaddress -d '{"mac": "1a:bb:cc:cd:ee:ff" }'
[
    {
        "_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMTkyLjE2LjIwNi4wLi4:10.192.16.206/default",
        "ipv4addr": "10.192.16.206",
        "network_view": "default"
    }
]

 

 

If you are using a similar API call and getting different results, perhaps opening a support case would be ideal.

 

Regards,

Sandeep

Showing results for 
Search instead for 
Do you mean 

Recommended for You