- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
IPv6 ipv6network - Error when parsing dhcp6.name-servers from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2022 09:08 AM
I have the following sample code.
url = 'https://infoblox-server/wapi/v2.9.5/ipv6network'
api_user = 'username'
api_pass = 'some-pass'
network = {'network':'2002:ffff:A7::/121',
'options':
[{
'name' : 'netbios-name-servers',
'num' :44,
'value':'2002:9999::1',
'vendor_class': 'DHCPv6'
},{
'name' : 'cisco-tftp-server',
'num' :150,
'value':'2002:9999::1',
'vendor_class': 'DHCPv6'
},{
'name' : 'custom-string',
'num' :99,
'value':'Hello',
'vendor_class': 'DHCPv6'
}
,
{ 'name': 'dhcp6.name-servers',
'num': 23,
#'use_option': False,
'value': 'fe81::1',
'vendor_class': 'DHCPv6'}
],}
response = requests.post( url, auth=(api_user, api_pass), json=network)
print (response.text)
I get the following error:
{ "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflictet the option DHCPv6.dhcp6.name-servers from the General Properties section.)",
"code": "Client.Ibap.Data.Conflict",
"text": "Set the option DHCPv6.dhcp6.name-servers from the General Properties section."
When I remove the DHCPv6.dhcp6.name-servers fields from the list, the script runs fine. Is there a method to be able to configure (or overwrite the existing) name-servers via WAPI?
}
Solved! Go to Solution.
Re: IPv6 ipv6network - Error when parsing dhcp6.name-servers from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 07:20 AM
You'll want to use the domain_name_servers and the use_domain_name_servers fields here.