THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

Need a "Next Available Container" API call

Techie
Posts: 7
1831     2

Hi is there a "next_available_container" call similar to "next_available_network" or "next_available_ip".

 

I need this function in particular instead of Network, it needs to be Container.

 

Alternatively is there anyway of just retreiving the "next_available_network" without creating it? i.e using the GET method instead of POST. I could then use the retrieved CIDR to create a Container.

 

Thanks

Re: Need a "Next Available Container" API call

[ Edited ]
New Member
Posts: 1
1832     2

I need this function too. Since as Infoblox Terraform provider does not have "next_available_container" I want to know if there is an API call for this.

Re: Need a "Next Available Container" API call

[ Edited ]
New Member
Posts: 2
1832     2

I'd also be very interested in this

Re: Need a "Next Available Container" API call

[ Edited ]
Techie
Posts: 7
1832     2

I found two ways in the end, I should have updated that here.

 

Imagine you need to only check (not create) the "Next Available Network" with a netmask of /24 from parent container 192.168.0.0/16:

1:

curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://gridmaster/wapi/v2.12/request" -d '[{"method": "GET","object": "networkcontainer","data": {"network":"192.168.0/16"},"assign_state": {"netw_ref": "_ref"},"discard": true},{"method": "POST","object":"##STATE:netw_ref:##","args": {"_function": "next_available_network"},"data": {"cidr":24,"num":1},"enable_substitution": true}]'

While it uses the post method, nothing is created, it uses the "Request Object":

https://blogs.infoblox.com/community/consolidate-your-wapis-using-the-request-object/?_gl=1*16zvlrb*....

This method is best as you will see the alternative relies on knowing the reference of the parent container.

 

2:

 

curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://gridmaster/wapi/v2.12/networkcontainer/ZG5zLm5ldHdvcmtfY29udGFpbmVyJDE5Mi4xNjguMC4wLzE2LzA:192.168.0.0/16/default?_function=next_available_network" -d '{"cidr":24,"num":1}'

Again the post method is used but nothing is created.

 

Of course with either method you can then create a Network Container using the output of the initial curl.

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