- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Using exclude with next_available_ip
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-10-2013 10:11 AM
This code works properly, so I'm using it as a starting point:
This is the error message that comes back:
Re: next_available_ip
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-19-2012 06:23 AM
Re: Using exclude with next
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-10-2013 10:36 AM
Re: Using exclude with next
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-10-2013 10:40 AM
This looks like a bug. Can you file a ticket with support on it?
Re: Using exclude with next
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-13-2013 08:56 AM
Hi,
Has this been resolved ? I'm trying to get this to work via the command line using curl and getting similar errors.
I've tried the following:
$ curl -k -u userasswd -X POST "https://192.168.1.1/wapi/v1.1/network/AbcDefGhiJklMnoPqrTuvWxyZ012345678901:192.168.20.0/23/default?...



Also, is there some way to say "give me the next available IP after a certain one? For example, we reserve the first 20 IPs for network gear and misc. temporary testing devices. I'd really like to say _function=next_available_ip&starting_at=192.168.10.21 rather than having list all 20 IPs from .1-.20 in an exclude statement.
Thanks.
Re: Using exclude with next
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-13-2013 09:24 AM
Here's the solution I received from support:
Word back from the WAPI developers is that we needed to use json content-type in the URI header for the POST, and use the array-of-strings for the exclude parameter...
$ curl -k -u admin:infoblox -X GET https://10.64.41.6/wapi/v1.1/network?ipv4addr=10.144.2.0 [
{
"_ref": "network/ZG5zLm5ldHdvcmskMTAuMTQ0LjIuMC8yNC8w:10.144.2.0/24/default",
"comment": "PLCA McAllen TX",
"network": "10.144.2.0/24",
"network_view": "default"
}
]
$ curl -k -u admin:infoblox -X POST https://10.64.41.6/wapi/v1.1/network/ZG5zLm5ldHdvcmskMTAuMTQ0LjIuMC8yNC8... -H "Content-Type: application/json" -d '{"exclude": ["10.144.2.8", "10.144.2.10"], "num": 6}'
{
"ips": [
"10.144.2.2",
"10.144.2.3",
"10.144.2.9",
"10.144.2.11",
"10.144.2.12",
"10.144.2.16"
]
}
$ curl -k -u admin:infoblox -X POST https://10.64.41.6/wapi/v1.1/network/ZG5zLm5ldHdvcmskMTAuMTQ0LjIuMC8yNC8... -H "Content-Type: application/json" -d '{"exclude": ["10.144.2.11", "10.144.2.12"], "num": 6}'
{
"ips": [
"10.144.2.2",
"10.144.2.3",
"10.144.2.8",
"10.144.2.9",
"10.144.2.10",
"10.144.2.16"
]
}
Re: Using exclude with next
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-13-2013 10:30 AM
Excellent! Thanks so much.
Any chance of getting a "start_at" parameter so we can just exclude an entire set of IPs below a specified number ?