THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

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

New Member
Posts: 1
1407     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: 315
1407     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