apache / libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
https://libcloud.apache.org
Apache License 2.0
2.03k stars 925 forks source link

Possible error in godaddy & hostvirtual DNS RECORD_TYPE_MAP #1520

Open macfreek opened 3 years ago

macfreek commented 3 years ago

Summary

libcloud/dns/drivers/hostvirtual.py and libcloud/dns/drivers/godaddy.py both contain the following definition:

    RECORD_TYPE_MAP = {
        RecordType.A: 'A',
        RecordType.AAAA: 'AAAA',
        RecordType.CNAME: 'CNAME',
        RecordType.MX: 'MX',
        RecordType.NS: 'SPF',
        RecordType.SRV: 'SRV',
        RecordType.TXT: 'TXT',
    }

The line RecordType.NS: 'SPF', is very unusual. I suspect this is a bug. This is only two of three places in the libcloud/driver library where there is a mismatch between record type and name. (The other is in cloudflare.py, which defines RecordType.URL: 'LOC').

If it is really not a bug, I suggest to add a comment explaining this mismatch.

My apologies for not adding a full bug report with reproducible code. I encountered this during a coarse check which record types are commonly supported.

stale[bot] commented 3 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.