This is an automated email from the ASF dual-hosted git repository. tomaz pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit ce2be92b0a5a57575b2d163f12f52b86dac5a5c0 Author: Tio Gobin <tio1.go...@epitech.eu> AuthorDate: Wed Sep 2 14:36:49 2020 +0200 Outscale Driver Documentation --- docs/compute/drivers/outscale.rst | 61 +++++++++++++++++++++++++++ docs/examples/compute/outscale/__init__.py | 0 docs/examples/compute/outscale/instantiate.py | 10 +++++ docs/examples/compute/outscale/list_nodes.py | 14 ++++++ 4 files changed, 85 insertions(+) diff --git a/docs/compute/drivers/outscale.rst b/docs/compute/drivers/outscale.rst new file mode 100644 index 0000000..f09b74f --- /dev/null +++ b/docs/compute/drivers/outscale.rst @@ -0,0 +1,61 @@ +Outscale Driver Documentation +================================= + +`Outscale`_ provides an IaaS platform allowing +developers to benefit from all the flexibility of the Cloud. +This IaaS platform relies on TINA OS, its Cloud manager whose purpose is to +provide great performances on the Cloud. +TINA OS is software developed by Outscale. + +.. figure:: /_static/images/provider_logos/outscale.jpg + :align: center + :width: 300 + :target: https://www.outscale.com/ + +Outscale users can start virtual machines in the following regions: + +* cloudgouv-west-1, France +* eu-west-2, France +* us-est-2, US +* us-west-1, US +* cn-southeast-1, China + +Outscale is an European company and is priced in Euros. + +Instantiating a driver +~~~~~~~~~~~~~~~~~~~~~~ + +When you instantiate a driver you need to pass the following arguments to the +driver constructor: + +* ``key`` - Your Outscale access key +* ``secret`` - Your Outscale secret key +* ``region`` - The region you want to make action on +* ``service`` - The Outscale service you want to use + +Once you have some credentials you can instantiate the driver as shown below. + +.. literalinclude:: /examples/compute/outscale/instantiate.py + :language: python + +List the Virtual Machines (node) +-------------------------------- + +Listing the Virtual Machines on Outscale using libcloud works the same as on any +other platform. This example is just to show exactly that. + +This example will list the Virtual Machines in eu-west-2 region. + +.. literalinclude:: /examples/compute/outscale/list_nodes.py + :language: python + + +API Documentation +----------------- + +.. autoclass:: libcloud.compute.drivers.outscale.OutscaleNodeDriver + :members: + :inherited-members: + +.. _`Outscale`: https://docs.outscale.com/api +.. _`Outscale Inc.`: outscale_inc.html \ No newline at end of file diff --git a/docs/examples/compute/outscale/__init__.py b/docs/examples/compute/outscale/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/docs/examples/compute/outscale/instantiate.py b/docs/examples/compute/outscale/instantiate.py new file mode 100644 index 0000000..63444a5 --- /dev/null +++ b/docs/examples/compute/outscale/instantiate.py @@ -0,0 +1,10 @@ +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.OUTSCALE) +driver = cls( + key='my_key', + secret='my_secret', + region="my_region", + service="my_service" +) diff --git a/docs/examples/compute/outscale/list_nodes.py b/docs/examples/compute/outscale/list_nodes.py new file mode 100644 index 0000000..86fbd4d --- /dev/null +++ b/docs/examples/compute/outscale/list_nodes.py @@ -0,0 +1,14 @@ +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +key = 'my_key' +secret = 'my_secret' +region = 'eu-west-2' +service = 'api' + +Driver = get_driver(Provider.OUTSCALE) +driver = Driver(key=key, secret=secret, region=region, service=service) + +node = driver.list_nodes() + +print(node)