- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Need a "Next Available Container" API call
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2023 10:23 AM
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 ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2023 10:34 AM - edited 02-03-2023 10:34 AM
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 ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:33 AM - edited 02-22-2024 07:38 AM
I'd also be very interested in this
Re: Need a "Next Available Container" API call
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 08:06 AM - edited 02-22-2024 08:09 AM
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":
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.