Skip to content

Commit

Permalink
Added Runabove volume management & fixed many little things
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuluPro committed Jul 27, 2015
1 parent 664135b commit 272cc16
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 66 deletions.
15 changes: 10 additions & 5 deletions docs/compute/drivers/runabove.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Cloudwatt Compute Driver Documentation
======================================
RunAbove Compute Driver Documentation
=====================================

`RunAbove`_ is a public cloud offer created by OVH Group with datacenters
in North America and Europe.
Expand All @@ -18,7 +18,7 @@ Instantiating a driver
When you instantiate a driver you need to pass the following arguments to the
driver constructor:

* ``user_id`` - Application key
* ``key`` - Application key
* ``secret`` - Application secret
* ``ex_consumer_key`` - Consumer key

Expand Down Expand Up @@ -55,11 +55,16 @@ Now you have and can use you credentials with Libcloud.
Examples
--------

Create instance
~~~~~~~~~~~~~~~
Create node
~~~~~~~~~~~

.. literalinclude:: /examples/compute/runabove/create_node.py

Create and attach a volume to a node
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. literalinclude:: /examples/compute/runabove/attach_volume.py

API Docs
--------

Expand Down
11 changes: 11 additions & 0 deletions docs/examples/compute/runabove/attach_volume.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

RunAbove = get_driver(Provider.RUNABOVE)
driver = RunAbove('yourAppKey', 'yourAppSecret', 'YourConsumerKey')

location = [l for l in driver.list_locations() if l.id == 'SBG-1'][0]
node = driver.list_nodes()[0]

volume = driver.create_volume(size=10, location=location)
driver.attach_volume(node=node, volume=volume)
Loading

0 comments on commit 272cc16

Please sign in to comment.