跳到主要内容
博客云概述libcloud 完全支持 Linode

在libcloud中全面支持Linode

我很荣幸地宣布,Libcloud将全面支持 Linode API!

libcloud 是Cloudkick创始人为实现云提供商 API 标准化而开展的标准化工作。我很荣幸能与 Alex Polvi 和 libcloud 的贡献者合作,将Linode API集成到 libcloud 中。

使用 libcloud(用Python 编写),重启所有 Linodes 的简单方法如下:

from libcloud.providers import linode
driver = linode.LinodeNodeDriver("api_key")
for node in driver.list_nodes():
    node.reboot()

libcloud 的大部分功能集都非常抽象;Linode API 提供的自定义功能很少能通过 libcloud 实现。代码中存在许多假设,Linode API 中的许多内容都是根据libcloud 调整的,而不是反过来--由于 libcloud 被设计为高级抽象层,而不是完整的解决方案,因此只能提供非常基本的功能。

对于大多数项目,您需要考虑使用完整的Linode API

以下是 libcloud 的六项功能与相应 Linode API 调用的粗略映射。

libcloud Linode API
节点列表 linode.list
重启节点 linode.reboot
destroy_node linode.delete
创建节点 linode.create
linode.disk.createfromdistribution
linode.disk.create
linode.config.create
linode.boot
大小列表 利用线路图
图片列表 利用分发

libcloud 目前仅通过 git 提供。更多信息请参见GitHub 项目页面。我个人的 libcloud 树也在 GitHub 上,我将在这里进行 Linode 开发。

我希望 libcloud 能为大家带来更多便利。我鼓励大家积极测试并报告错误(我需要它们!),因为我无法测试每一种可能的情况。请享用!


评论 (4)

  1. Author Photo

    I’d probably still use Linode API, More choice is good though and I can see this being useful for some people.

    Thanks!

  2. Author Photo

    Jed,

    That is GREAT news.

    Good work getting that in place.

    -Dave

  3. Linode Blog » Linode Now Supported on Cloudkick

    […] may remember full libcloud support for Linode that we announced in September. It has been our privilege to work with the Cloudkick and libcloud teams to bring Linode support to […]

  4. Author Photo

    I know this is quite old – was wondering if you had considered any of the newer libraries (http://bit.ly/9pLiJs)

留下回复

您的电子邮件地址将不会被公布。 必须填写的字段被标记为*