libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/2] git commit: docs: Update rackspace driver docs.
Date Sun, 08 Dec 2013 17:15:22 GMT
Updated Branches:
  refs/heads/trunk c4c9fdd61 -> 1dd2382cf


docs: Update rackspace driver docs.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7a286e79
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7a286e79
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7a286e79

Branch: refs/heads/trunk
Commit: 7a286e79fb882ad73a6bdf8c74e5ab112acc1129
Parents: c4c9fdd
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Sun Dec 8 18:13:29 2013 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sun Dec 8 18:13:29 2013 +0100

----------------------------------------------------------------------
 docs/compute/drivers/rackspace.rst              | 34 +++++++++++++++++---
 .../compute/rackspace/instantiate_first_gen.py  |  7 ++++
 .../compute/rackspace/instantiate_next_gen.py   |  5 +++
 3 files changed, 42 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a286e79/docs/compute/drivers/rackspace.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/rackspace.rst b/docs/compute/drivers/rackspace.rst
index b17131b..6ff19b5 100644
--- a/docs/compute/drivers/rackspace.rst
+++ b/docs/compute/drivers/rackspace.rst
@@ -2,11 +2,10 @@ Rackspace Compute Driver Documentation
 ======================================
 
 `Rackspace`_ is a public and private cloud provider based in San Antonio, Texas
-with datacenters in United States, United Kingdom, China and Australia.
+with data centers in United States, United Kingdom, China and Australia.
 
 Rackspace driver supports working with legacy, first-gen cloud servers and
-next-gen OpenStack based cloud servers. Driver is based on the OpenStack so for
-more informsa
+next-gen OpenStack based cloud servers.
 
 Rackspace driver is based on the OpenStack driver so for more information about
 that and OpenStack specific documentation, please refer to
@@ -15,13 +14,40 @@ that and OpenStack specific documentation, please refer to
 Instantiating a driver
 ----------------------
 
+When you instantiate a driver you need to pass the following arguments to the
+driver constructor:
+
+* ``username`` - your Rackspace Cloud username
+* ``api_key`` - your Rackspace Cloud API key
+* ``region`` - Which region to use. Supported regions depend on the driver type
+  (next-gen vs first-gen).
+
+Instantiating a next-gen driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Supported regions: ``dfw``, ``ord``, ``iad``, ``lon``, ``syd``, ``hkg``
+
+.. literalinclude:: /examples/compute/rackspace/instantiate_next_gen.py
+   :language: python
+
+Instantiating a first-gen driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Keep in mind that first-gen cloud servers have been deprecated and you are
+strongly encouraged to use next-gen cloud servers.
+
+Supported regions: ``us``, ``uk``
+
+.. literalinclude:: /examples/compute/rackspace/instantiate_first_gen.py
+   :language: python
+
 Examples
 --------
 
 1. Working with 'performance' cloud server flavors
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Rackspace recently annouced new 'perfomance' flavors of their cloud servers.
+Rackspace recently announced new 'performance' flavors of their cloud servers.
 The example bellow shows how to use this new flavors.
 
 Keep in mind that this new flavors are currently only supported in the following

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a286e79/docs/examples/compute/rackspace/instantiate_first_gen.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/rackspace/instantiate_first_gen.py b/docs/examples/compute/rackspace/instantiate_first_gen.py
new file mode 100644
index 0000000..534a73f
--- /dev/null
+++ b/docs/examples/compute/rackspace/instantiate_first_gen.py
@@ -0,0 +1,7 @@
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.RACKSPACE_FIRST_GEN)
+
+driver_us = cls('username', 'api key', region='us')
+driver_uk = cls('username', 'api key', region='uk')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a286e79/docs/examples/compute/rackspace/instantiate_next_gen.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/rackspace/instantiate_next_gen.py b/docs/examples/compute/rackspace/instantiate_next_gen.py
new file mode 100644
index 0000000..fb03cf0
--- /dev/null
+++ b/docs/examples/compute/rackspace/instantiate_next_gen.py
@@ -0,0 +1,5 @@
+from libcloud.compute.types import Provider
+from libcloud.compute.providers import get_driver
+
+cls = get_driver(Provider.RACKSPACE)
+driver = cls('username', 'api key', region='iad')


Mime
View raw message