Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

API & Integration, DevOps,NetOps,SecOps

Reply

IPv6 ipv6network - Error when parsing dhcp6.name-servers from WAPI

Posts: 1
549     1

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.ConflictSmiley Frustratedet 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?
}

Re: IPv6 ipv6network - Error when parsing dhcp6.name-servers from WAPI

Moderator
Moderator
Posts: 246
549     1

You'll want to use the domain_name_servers and the use_domain_name_servers fields here.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You