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

RecordType.URL should be RecordType.URI #1523

Open macfreek opened 3 years ago

macfreek commented 3 years ago

Summary

libcloud.dns.types defines a RecordType 'URL'. However, no such RR Type exists in DNS. Likely, this is supposed to refer to the 'URI' RR Type.

Detailed Information

The authoritative list of DNS RR types is https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml. There is no 'URL' RR type in this list. There is a 'URI' RR type in this list, as defined in RFC 7553

This RecordType is defined in 4 places in libcloud:

libcloud.dns.types, line 112:

    URL = 'URL'

libcloud.dns.drivers.cloudflare, line 171: [sic!]

        RecordType.URL: 'LOC'

According to the Cloudflare API documentation, the correct name should indeed be 'URI'.

libcloud.dns.drivers.dnsimple, line 57

        RecordType.URL: 'URL',

This seems correct. DNSsimple indeed has a proprietory URL record.

libcloud.dns.drivers.zerigo, line 142

        RecordType.URL: 'URL',

http://www.zerigo.com gives an error. I get the impression this API is no longer functional.

Suggested Resolution

My suggestion is to change these occurrences into 'URI' I stand corrected, DNSsimple does indeed has a proprietory URL record type. However, Cloudflare does not. My suggestion is to either remove support for the URI RR type at Cloudflare (it will likely not have worked due to the incorrect 'LOC' string), or to add support for the URI RR type next to the (unofficial) URL RR type.

I'm happy to create a PR once there is consensus about the best approach to fix this.

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.