apache / apache/libcloud

get_object_cdn_url() & get_container_cdn_url() implementation for StorageDrivers

オープン
#1,696 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
2.1k
フォーク
931
平均マージ
1日 2時間
マージ済み PR(30日)
4

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

libcloud/storage/base.py の get_container_cdn_url() と get_object_cdn_url() から始め、GoogleStorageDriver を S3 の継承関係に沿って追跡します。どのドライバが CDN URL を提供できるか、またプロバイダにどのような動作が必要かを確認します。対応する実装が base の NotImplementedError に到達しなくなり、影響を受けるドライバがカバレッジで網羅されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cloud
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。