Repository: libcloud Updated Branches: refs/heads/trunk 9ef8ccfb7 -> d9f1abde1
doc: Update documentation for AuroraCompute Add an example on how to instantiate a driver and where to find the API en Secret key. Closes #616 Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d9f1abde Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d9f1abde Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d9f1abde Branch: refs/heads/trunk Commit: d9f1abde10b561c7d3d4dc15cc51b578fb7e6840 Parents: 9ef8ccf Author: Wido den Hollander <[email protected]> Authored: Tue Oct 27 16:58:41 2015 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Sun Nov 1 20:12:10 2015 +0100 ---------------------------------------------------------------------- docs/compute/drivers/auroracompute.rst | 19 +++++++++++++++++++ .../compute/auroracompute/instantiate_driver.py | 8 ++++++++ 2 files changed, 27 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/d9f1abde/docs/compute/drivers/auroracompute.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/auroracompute.rst b/docs/compute/drivers/auroracompute.rst index e8ba8bd..07929c8 100644 --- a/docs/compute/drivers/auroracompute.rst +++ b/docs/compute/drivers/auroracompute.rst @@ -23,6 +23,24 @@ The AuroraCompute driver is based on the CloudStack driver. Please refer to information. +Instantiating a driver +---------------------- + +When you instantiate a driver you need to pass the following arguments to the +driver constructor: + +* ``key`` - Your AuroraCompute API key +* ``secret`` - Your AuroraCompute secret key + +You can find your 'key' and 'secret' in the AuroraCompute `Control Panel`_ under +your users. + +With these credentials you can instantiate a driver: + +.. literalinclude:: /examples/compute/auroracompute/instantiate_driver.py + :language: python + + API Docs -------- @@ -31,3 +49,4 @@ API Docs :inherited-members: .. _`PCextreme B.V.`: https://www.pcextreme.nl/ +.. _`Control Panel`: https://cp.pcextreme.nl/ http://git-wip-us.apache.org/repos/asf/libcloud/blob/d9f1abde/docs/examples/compute/auroracompute/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/auroracompute/instantiate_driver.py b/docs/examples/compute/auroracompute/instantiate_driver.py new file mode 100644 index 0000000..7e9f8a7 --- /dev/null +++ b/docs/examples/compute/auroracompute/instantiate_driver.py @@ -0,0 +1,8 @@ +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +apikey = 'mykey' +secretkey = 'mysecret' + +Driver = get_driver(Provider.AURORACOMPUTE) +conn = Driver(key=apikey, secret=secretkey)
