libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/2] libcloud git commit: Update docs for EC2 region change in 0.14
Date Sun, 18 Oct 2015 12:47:34 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk ec9d58537 -> dddaf8473


Update docs for EC2 region change in 0.14

In 0.14 the API for selecting an EC2 region changed, but was
never reflected in the examples. This change fixes the code
snippets to use the up-to-date region selection API.

Closes #606

Signed-off-by: Tomaz Muraus <tomaz@apache.org>


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

Branch: refs/heads/trunk
Commit: fa3b8f487ebccf3d59c916a74e159997cf4b5078
Parents: ec9d585
Author: James Guthrie <james@prodigi.ch>
Authored: Fri Oct 16 16:48:13 2015 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sun Oct 18 14:25:08 2015 +0200

----------------------------------------------------------------------
 docs/compute/drivers/ec2.rst                                    | 5 +++--
 docs/examples/compute/create_ec2_node.py                        | 4 ++--
 .../compute/create_ec2_node_and_associate_elastic_ip.py         | 4 ++--
 docs/examples/compute/create_ec2_node_custom_ami.py             | 4 ++--
 docs/examples/compute/create_ec2_node_iam.py                    | 4 ++--
 docs/examples/compute/create_ec2_node_manual_instantiation.py   | 4 ++--
 docs/examples/compute/ec2/temporary_credentials.py              | 4 ++--
 7 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/compute/drivers/ec2.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/ec2.rst b/docs/compute/drivers/ec2.rst
index b42ca53..513228c 100644
--- a/docs/compute/drivers/ec2.rst
+++ b/docs/compute/drivers/ec2.rst
@@ -10,12 +10,13 @@ platform, Amazon Web Services (AWS).
     :width: 300
     :target: https://aws.amazon.com/ec2/
 
-It allows users to rent virtual servers in more than 8 regions such as:
+It allows users to rent virtual servers in more than 9 regions such as:
 
 * US East (Northern Virginia) Region
 * US West (Oregon) Region
 * US West (Northern California) Region
-* EU (Ireland) Region
+* EU West (Ireland) Region
+* EU Central (Frankfurt) Region
 * Asia Pacific (Singapore) Region
 * Asia Pacific (Sydney) Region
 * Asia Pacific (Tokyo) Region

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/create_ec2_node.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/create_ec2_node.py b/docs/examples/compute/create_ec2_node.py
index 8889410..7fdcaaa 100644
--- a/docs/examples/compute/create_ec2_node.py
+++ b/docs/examples/compute/create_ec2_node.py
@@ -7,8 +7,8 @@ SECRET_KEY = 'your secret key'
 IMAGE_ID = 'ami-c8052d8d'
 SIZE_ID = 't1.micro'
 
-cls = get_driver(Provider.EC2_US_WEST)
-driver = cls(ACCESS_ID, SECRET_KEY)
+cls = get_driver(Provider.EC2)
+driver = cls(ACCESS_ID, SECRET_KEY, region="us-west-1")
 
 # Here we select size and image
 sizes = driver.list_sizes()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/create_ec2_node_and_associate_elastic_ip.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/create_ec2_node_and_associate_elastic_ip.py b/docs/examples/compute/create_ec2_node_and_associate_elastic_ip.py
index 5d2c65c..40edfdb 100644
--- a/docs/examples/compute/create_ec2_node_and_associate_elastic_ip.py
+++ b/docs/examples/compute/create_ec2_node_and_associate_elastic_ip.py
@@ -7,8 +7,8 @@ SECRET_KEY = 'your secret key'
 IMAGE_ID = 'ami-c8052d8d'
 SIZE_ID = 't1.micro'
 
-cls = get_driver(Provider.EC2_US_WEST)
-driver = cls(ACCESS_ID, SECRET_KEY)
+cls = get_driver(Provider.EC2)
+driver = cls(ACCESS_ID, SECRET_KEY, region="us-west-1")
 
 sizes = driver.list_sizes()
 images = driver.list_images()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/create_ec2_node_custom_ami.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/create_ec2_node_custom_ami.py b/docs/examples/compute/create_ec2_node_custom_ami.py
index 4d70d58..9f19966 100644
--- a/docs/examples/compute/create_ec2_node_custom_ami.py
+++ b/docs/examples/compute/create_ec2_node_custom_ami.py
@@ -13,8 +13,8 @@ SIZE_ID = 't1.micro'
 
 # 'us-west-1' region is available in Libcloud under EC2_US_WEST provider
 # constant
-cls = get_driver(Provider.EC2_US_WEST)
-driver = cls(ACCESS_ID, SECRET_KEY)
+cls = get_driver(Provider.EC2)
+driver = cls(ACCESS_ID, SECRET_KEY, region="us-west-1")
 
 # Here we select
 sizes = driver.list_sizes()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/create_ec2_node_iam.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/create_ec2_node_iam.py b/docs/examples/compute/create_ec2_node_iam.py
index 9172673..60e0f29 100644
--- a/docs/examples/compute/create_ec2_node_iam.py
+++ b/docs/examples/compute/create_ec2_node_iam.py
@@ -7,8 +7,8 @@ IAM_PROFILE = 'your IAM profile arn or IAM profile name'
 
 IMAGE_ID = 'ami-c8052d8d'
 SIZE_ID = 't1.micro'
-cls = get_driver(Provider.EC2_US_WEST)
-driver = cls(ACCESS_ID, SECRET_KEY)
+cls = get_driver(Provider.EC2)
+driver = cls(ACCESS_ID, SECRET_KEY, region="us-west-1")
 
 # Here we select size and image
 sizes = driver.list_sizes()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/create_ec2_node_manual_instantiation.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/create_ec2_node_manual_instantiation.py b/docs/examples/compute/create_ec2_node_manual_instantiation.py
index db43c4c..bd03db8 100644
--- a/docs/examples/compute/create_ec2_node_manual_instantiation.py
+++ b/docs/examples/compute/create_ec2_node_manual_instantiation.py
@@ -8,8 +8,8 @@ SECRET_KEY = 'your secret key'
 IMAGE_ID = 'ami-c8052d8d'
 SIZE_ID = 't1.micro'
 
-cls = get_driver(Provider.EC2_US_WEST)
-driver = cls(ACCESS_ID, SECRET_KEY)
+cls = get_driver(Provider.EC2)
+driver = cls(ACCESS_ID, SECRET_KEY, region="us-west-1")
 
 size = NodeSize(id=SIZE_ID, name=None, ram=None, disk=None, bandwidth=None,
                 price=None, driver=driver)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/fa3b8f48/docs/examples/compute/ec2/temporary_credentials.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/ec2/temporary_credentials.py b/docs/examples/compute/ec2/temporary_credentials.py
index b1e78e6..8c46b68 100644
--- a/docs/examples/compute/ec2/temporary_credentials.py
+++ b/docs/examples/compute/ec2/temporary_credentials.py
@@ -1,6 +1,6 @@
 from libcloud.compute.types import Provider
 from libcloud.compute.providers import get_driver
 
-cls = get_driver(Provider.EC2_US_WEST)
+cls = get_driver(Provider.EC2)
 driver = cls('temporary access key', 'temporary secret key',
-             token='temporary session token')
+             token='temporary session token', region="us-west-1")


Mime
View raw message