Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

Get next available network without creating the network

New Member
Posts: 1
341     0

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

New Member
Posts: 1
342     0

You want to get next available subnet without creating it. It's not a good option for it. 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin