How to return DNS Servers attached to a network via WAPI

The DNS Servers are part of the IPv4 DHCP properties of the network, but when I return the "option" field of the "network" object I don't get the DNS Servers in the list. Are the DNS Servers under a different object or a different field under the network object?

Edit: I believe the DNS Servers are inherited from a parent object. Still, I don't know how to get the field after setting the "_inheritance" flag to "True".

Best Answers

  • Don Smith
    Answer ✓

    Nelson,

    In your query, use "_inheritance=True" (it's case sensitive). You'll be able to see the additional values and where they are inherited from.

    Don

  • Thanks Don, this was part of the solution. I also noticed I was using the default version of the WAPI, which is not the latest. Once I changed the version, the additional values appeared.