apache / apache/libcloud

get_object_cdn_url() & get_container_cdn_url() implementation for StorageDrivers

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

Descrizione

## Feature Request

Hi all! After beginning to integrate the libcloud library into an application I am writing and attempting to use both the `get_object_cdn_url()` and `get_container_cdn_url()`, I have realized that these methods appear to not be implemented back at the base level (`libcloud/storage/base.py`) in the StorageDriver class, and never implements in any inherited classes. I am attempting to use the Google driver, which inherits from the S3 driver, which inherits from the base.py StorageDriver, and looking at these methods in there, it appears they are hardcoded to raise the `NotImplementedError`: _"get_container_cdn_url not implemented for this driver"_. You can see that [here](https://github.com/apache/libcloud/blob/trunk/libcloud/storage/base.py) on lines 399 and 430.

I just wanted to confirm that I am indeed right about this, and see if there is already a roadmap that includes this feature. If not, I may be willing to take it on depending on the implications to the rest of the codebase. Apologies if I am not understanding the codebase correctly, I don't have any experience at all with libcloud besides this quick integration.

**Does anyone have anything thoughts, reservations, ideas, on this?**

Here is a chunk of code using a Google Cloud Storage instance to replicate this not implemented error:

`> import libcloud`
`> driver = libcloud.storage.drivers.google_storage.GoogleStorageDriver(key='foo', secret='bar')`
`> driver.get_container_cdn_url('container name')`

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in libcloud/storage/base.py con get_container_cdn_url() e get_object_cdn_url(), quindi segui GoogleStorageDriver attraverso la sua ereditarietà da S3. Determina quali driver possono fornire URL CDN e quale comportamento del provider è richiesto; il lavoro è completato quando le implementazioni supportate non raggiungono più il NotImplementedError della classe base e vi è copertura per i driver interessati.

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

Valutazione

Stack tecnologico
python
Ambito
cloud
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.