FixedIPAddress: Set DHCPv4 options
Closed this issue · 2 comments
staeglis commented
Hi,
how can I set DHCPv4 options like domain name, DNS server, search domains, next server for FixedIPAddress objects? When I run the following code all options except IP and mac aren't applied:
objects.FixedAddress.create(conn,
ipv4addr="10.5.152.3",
mac="00:00:00:00:00:0",
domain_name="test.domain",
nextserver = "tftp.test.domain")
Best,
Stefan
sarya-infoblox commented
Hi @staeglis
We are working on a new release right now, we will look at this issue as soon as we get time.
staeglis commented
The issue is resolved for me.
First you have to adjust the queries
objects.FixedAddressV4.search_all(self._infoblox_connection,
match_client='MAC_ADDRESS',
return_fields=['bootfile',
'ipv4addr',
'mac',
'name',
'nextserver',
'options',
'use_nextserver']):
For host-name, domain-name and domainsearch you have to create a DHCpOption object:
objects.Dhcpoption(name="host-name", value=hostname)