apache / apache/libcloud

RecordType.URL should be RecordType.URI

Aperta
#1,523 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
stale
Lingua principale
Python
Stelle
2.1k
Fork
931
Merge medio
1g 2h
PR unite (30g)
4

Descrizione

## 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](https://tools.ietf.org/html/rfc7553)

This RecordType is defined in 4 places in libcloud:

[libcloud.dns.types, line 112](https://github.com/apache/libcloud/blob/trunk/libcloud/dns/types.py#L112):
```
URL = 'URL'
```

[libcloud.dns.drivers.cloudflare, line 171](https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/cloudflare.py#L171): [sic!]
```
RecordType.URL: 'LOC'
```
According to the [Cloudflare API documentation](https://api.cloudflare.com/#dns-records-for-a-zone-create-dns-record), the correct name should indeed be `'URI'`.

[libcloud.dns.drivers.dnsimple, line 57](https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/dnsimple.py#L57)
```
RecordType.URL: 'URL',
```
This seems correct. [DNSsimple indeed has a proprietory URL record](https://support.dnsimple.com/articles/url-record/).

[`libcloud.dns.drivers.zerigo`, line 142](https://github.com/apache/libcloud/blob/trunk/libcloud/dns/drivers/zerigo.py#L142)
```
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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Esamina libcloud/dns/types.py e i mapping dei driver Cloudflare, DNSimple e Zerigo citati nella issue, quindi confronta i tipi di record documentati di ciascun provider. Risolvi il comportamento specifico del provider per URL rispetto a URI e correggi il mapping incoerente di Cloudflare o le definizioni dei record supportati; il lavoro è completato quando i mapping riflettono accuratamente le API dei provider citati e gli standard DNS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
networking
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.