- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
nextavailablenetwork with IPv6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 01:57 AM
Hello,
can anyone tell me the correct Syntax for nextavailablenetwork from an IPv6 Container?
if i use following syntax with ipv4, i receive a network:
data = '{"network": "func:nextavailablenetwork:192.168.0.0/16,XXX,24", "network_view": "XXX", "comment": "Used"}'
But if i use the same Syntax for IPv6:
data = '{"network": "func:nextavailablenetwork:aaaa:bbbb:0000:0000:0000:0000:0000:0000/48,XXX,64", "network_view": "XXX", "comment": "Used"}'
i get following error message:
{ "Error": "AdmConProtoError: Invalid CIDR specified in network (aaaa:bbbb:0000:0000:0000:0000:0000:0000/48,XXX64)",
"code": "Client.Ibap.Proto",
"text": "Invalid CIDR specified in network (aaaa:bbbb:0000:0000:0000:0000:0000:0000/48,XXX,64)"
}
I tried also the short form of the IPv6 Prefix, bute the error message was the same:
"Error": "AdmConProtoError: Invalid CIDR specified in network (aaaa:bbbb::/48,XXX,64)",
"code": "Client.Ibap.Proto",
"text": "Invalid CIDR specified in network (aaaa:bbbb::/48,XXX,64)"
}
thanks
thomas
Solved! Go to Solution.
Re: nextavailablenetwork with IPv6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 07:43 AM
Change this:
data = '{"network": "func:nextavailablenetwork:aaaa:bbbb:0000:0000:0000:0000:0000:0000/48,XXX,64", "network_view": "XXX", "comment": "Used"}'
To this:
data = '{"ipv6network": "func:nextavailablenetwork:aaaa:bbbb:0000:0000:0000:0000:0000:0000/48,XXX,64", "network_view": "XXX", "comment": "Used"}'
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: nextavailablenetwork with IPv6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 12:46 AM
Hi SBaksh,
do i need a special Version for the command?
i changed:
data = '{"network":"
to
data = '{"ipv6network":"
But than i get following error:
{ "Error": "AdmConProtoError: field for create missing: network",
"code": "Client.Ibap.Proto",
"text": "field for create missing: network"
}
I am using Api version 2.9 and infoblox Version: 8.4.3-383835.
Could it be that i also need to change the URL?
I use following Url:
https://x.x.x.x/wapi/v2.9/network'
Thanks thomas
Re: nextavailablenetwork with IPv6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 07:32 AM
Here is a CURL Example
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: nextavailablenetwork with IPv6
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2020 12:33 PM
Hi Sbaksh,
thanks now it is working.
If anyone needs a python ipv6network example:
#!/usr/bin/env python3
import requests
headers = {
'content-type': 'application/json',
}
params = (
('_return_fields+', 'network,comment'),
('_return_as_object', '1'),
)
data = '{"network": "func:nextavailablenetwork:aaaa:bbbb::0/48,YOURVIEW,64", "network_view": "YOURVIEW", "comment": "Used"}'
response = requests.post('https://YOURHOST/wapi/v2.9/ipv6network', headers=headers, params=params, data=data, verify=False, auth=('USER', 'PASSWORD'))