- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Get next available network without creating the network
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 01:39 PM
Hey all,
I'm trying to figure out how to get the next available subnet within a container without creating the subnet. In the documentation, the only 2 examples both create a subnet within the container. I have that code working as follows:
test_url = f"{infoblox_url}/wapi/v{wapi_ver}/network?_return_fields%2B=network,members&_return_as_object=1"
json_data = {
'network': f'func:nextavailablenetwork:{Net_Container},default,{CIDR}',
'network_view': 'default'
}
next_net_json = json.dumps(json_data)
try:
response = s.post(test_url, data=next_net_json, verify=False, timeout=5.0)
I've tried this as a GET instead of POST which doesn't work, and I've tried both next_available_network as well as the listed nextavailablenetwork. Not sure what the difference is, but only nextavailablenetwork returns a valid response, but creates the subnet. Also note {Net_Container} comes in the format "10.0.0.0/16" and {CIDR} would come as "27".
Thank you.
Re: Get next available network without creating the network
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2024 09:38 PM
You want to get next available subnet without creating it. It's not a good option for it.