Many of you have requested it, and it is my privilege to announce full libcloud support for the Linode API!
libcloud is a standardization effort undertaken by the founders of Cloudkick to cope with standardizing cloud providers’ APIs. It has been my honor to work with Alex Polvi and libcloud’s contributors on integrating the Linode API into libcloud; today marks success for everyone involved.
Using libcloud (written in Python), a simple recipe to reboot all of your Linodes would look like this:
from libcloud.providers import linode
driver = linode.LinodeNodeDriver("api_key")
for node in driver.list_nodes():
node.reboot()
Much of libcloud’s feature set is very abstract; very little of the customization offered by the full Linode API is implementable using it. Many assumptions are made in the code, and much of the Linode API is adapted to libcloud instead of vice versa — only very basic functionality is offered, as libcloud is designed to be a high-level abstraction layer, not a full solution.
For most projects, you will want to consider the full Linode API.
Here is a rough mapping of libcloud’s six features to the equivalent Linode API calls.
libcloud | Linode API |
list_nodes | linode.list |
reboot_node | linode.reboot |
destroy_node | linode.delete |
create_node | linode.create linode.disk.createfromdistribution linode.disk.create linode.config.create linode.boot |
list_sizes | avail.linodeplans |
list_images | avail.distributions |
libcloud is currently available only via git. See its GitHub project page for more information. My personal libcloud tree is on GitHub as well, which is where I will be doing Linode development.
It is my hope that libcloud will make life easier for many of you. I encourage active testing and bug reports (I need them!) as I cannot test every possible scenario. Enjoy!
Comments (4)
I’d probably still use Linode API, More choice is good though and I can see this being useful for some people.
Thanks!
Jed,
That is GREAT news.
Good work getting that in place.
-Dave
[…] 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 […]
I know this is quite old – was wondering if you had considered any of the newer libraries (http://bit.ly/9pLiJs)