apache / apache/libcloud

get_object_cdn_url() & get_container_cdn_url() implementation for StorageDrivers

Ouverte
#1,696 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
2.1k
Forks
931
Merge moyen
1 j 2 h
PR mergées (30 j)
4

Description

## 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')`

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans libcloud/storage/base.py avec get_container_cdn_url() et get_object_cdn_url(), puis suivez GoogleStorageDriver à travers son héritage de S3. Déterminez quels drivers peuvent fournir des URLs CDN et quel comportement du fournisseur est requis ; le travail est terminé lorsque les implémentations prises en charge n’atteignent plus le NotImplementedError de la classe de base, avec une couverture pour les drivers concernés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
cloud
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.