get_object_cdn_url() & get_container_cdn_url() implementation for StorageDrivers
- 主要语言
- Python
- 星标
- 2.1k
- 派生
- 931
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 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,以及需要 provider 具备什么行为;完成的标准是受支持的实现不再触发基类 NotImplementedError,并且为受影响的驱动提供 coverage。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cloud
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100