netbox-dns: soa-mname incorrectly typed as integer

Hiya there,

Currently I’m writing a python script to interpolate between the PowerDNS API and the Netbox API, while troubleshooting some API call issues, looking at the Netbox API documentation, adding zones via an API call via POST specifies the following

soa_mname 
integer
title: SOA MName

The MNAME should be a string, not an integer, as per the MNAME listed in https://www.cloudflare.com/en-gb/learning/dns/dns-records/dns-soa-record/

There would be no circumstances an SOA MNAME contained within the rrset returned would ever be an integer, so this type should be changed.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

@martydingo: I just checked some other object types in NetBox (not NetBox DNS), and the incorrect classification of object types in POST requests as integer can be found there as well.

Look, for instance, at the GET request for /dcim/devices, and the corresponding POST request in the NetBox API documentation. For the GET request, you’ll find a NestedDeviceRole object for the device_role field in the results of the API call. For the POST request, the object type is integer, just as with NetBox DNS-Objects (e.g. Record or Zone objects).

Screenshot 2022-08-20 at 16 28 43 Screenshot 2022-08-20 at 16 29 05

So it seems the incorrect type in the documentation is, if any, a bug in NetBox, not NetBox DNS.

@hatsat32: I suggest closing this issue as we can’t do anything about it.

Hi @martydingo, don’t try to fix the issue with the incorrect documentation of the soa_mname parameter in your environment, it is most likely not related to the problem you have submitting a new zone.

I see the incorrect documentation as in a functioning environment as well, and it seems to have its cause somewhere in the Code that automatically generates the API documentation or in the way netbox-dns presents its interface.