Updated Branches: refs/heads/trunk 4e4945222 -> c28e0f1ca
docs: Add HPCloud example to OpenStack documentation> 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/734c0395 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/734c0395 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/734c0395 Branch: refs/heads/trunk Commit: 734c0395b2d73dd37cb34eb1f0b7bf9fda292bb6 Parents: 4e49452 Author: Markos Gogoulos <[email protected]> Authored: Mon Nov 25 14:46:33 2013 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Mon Nov 25 14:24:16 2013 +0100 ---------------------------------------------------------------------- docs/compute/drivers/openstack.rst | 8 +++++ docs/examples/compute/openstack/hpcloud.py | 39 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/734c0395/docs/compute/drivers/openstack.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/openstack.rst b/docs/compute/drivers/openstack.rst index 81ef8cd..66be263 100644 --- a/docs/compute/drivers/openstack.rst +++ b/docs/compute/drivers/openstack.rst @@ -91,6 +91,14 @@ token before the currently used one is about to expire. .. literalinclude:: /examples/compute/openstack/force_auth_token.py :language: python +5. HP Cloud (www.hpcloud.com) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Connecting to HP Cloud US West AZ 1-3 (OpenStack Havana) and US East (OpenStack Horizon). + +.. literalinclude:: /examples/compute/openstack/hpcloud.py + :language: python + Non-standard functionality and extension methods ------------------------------------------------ http://git-wip-us.apache.org/repos/asf/libcloud/blob/734c0395/docs/examples/compute/openstack/hpcloud.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/openstack/hpcloud.py b/docs/examples/compute/openstack/hpcloud.py new file mode 100644 index 0000000..0fc36c0 --- /dev/null +++ b/docs/examples/compute/openstack/hpcloud.py @@ -0,0 +1,39 @@ +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +HPCLOUD_AUTH_URL = 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/' +OpenStack = get_driver(Provider.OPENSTACK) + +#HP Cloud US West AZ 1 +driver = OpenStack('your_auth_username', 'your_auth_password', + ex_force_auth_version='2.0_password', + ex_force_auth_url=HPCLOUD_AUTH_URL, + ex_tenant_name='your_tenant_name', + ex_force_service_region='az-1.region-a.geo-1', + ex_force_service_name='Compute') + +#HP Cloud US West AZ 2 +driver = OpenStack('your_auth_username', 'your_auth_password', + ex_force_auth_version='2.0_password', + ex_force_auth_url=HPCLOUD_AUTH_URL, + ex_tenant_name='your_tenant_name', + ex_force_service_region='az-2.region-a.geo-1', + ex_force_service_name='Compute') + + +#HP Cloud US West AZ 3 +driver = OpenStack('your_auth_username', 'your_auth_password', + ex_force_auth_version='2.0_password', + ex_force_auth_url=HPCLOUD_AUTH_URL, + ex_tenant_name='your_tenant_name', + ex_force_service_region='az-3.region-a.geo-1', + ex_force_service_name='Compute') + + +#HP Cloud US East +driver = OpenStack('your_auth_username', 'your_auth_password', + ex_force_auth_version='2.0_password', + ex_force_auth_url=HPCLOUD_AUTH_URL, + ex_tenant_name='your_tenant_name', + ex_force_service_region='region-b.geo-1', + ex_force_service_name='Compute')
