You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by qu...@apache.org on 2017/10/13 05:03:24 UTC

[1/5] libcloud git commit: [LIBCLOUD-954] ec2: Allow cn-north-1 even without pricing

Repository: libcloud
Updated Branches:
  refs/heads/trunk 8d7cf639b -> 820ff6f70


[LIBCLOUD-954] ec2: Allow cn-north-1 even without pricing


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

Branch: refs/heads/trunk
Commit: bd7a397e1ff3e3f2fc7f4d6f6b643d3d6c764111
Parents: 8d7cf63
Author: Quentin Pradet <qu...@apache.org>
Authored: Wed Oct 11 11:07:45 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Oct 13 08:56:11 2017 +0400

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py   | 4 +---
 libcloud/test/compute/test_ec2.py | 2 ++
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/bd7a397e/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 95d0392..a5bcf27 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3059,9 +3059,7 @@ VOLUME_MODIFICATION_ATTRIBUTE_MAP = {
 }
 
 VALID_EC2_REGIONS = REGION_DETAILS.keys()
-VALID_EC2_REGIONS = [
-    r for r in VALID_EC2_REGIONS if r != 'nimbus' and r != 'cn-north-1'
-]
+VALID_EC2_REGIONS = [r for r in VALID_EC2_REGIONS if r != 'nimbus']
 VALID_VOLUME_TYPES = ['standard', 'io1', 'gp2', 'st1', 'sc1']
 
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/bd7a397e/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 8b17275..2e015ac 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -75,6 +75,8 @@ class BaseEC2Tests(LibcloudTestCase):
         unsupported_regions = list()
 
         for region in VALID_EC2_REGIONS:
+            if region in ['cn-north-1']:
+                continue  # pricing not available
             driver = EC2NodeDriver(*EC2_PARAMS, **{'region': region})
             try:
                 driver.list_sizes()


[4/5] libcloud git commit: docs: Mention lack of pricing on EC2 cn-north-1

Posted by qu...@apache.org.
docs: Mention lack of pricing on EC2 cn-north-1


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

Branch: refs/heads/trunk
Commit: 4b0193ea724a9b0b5f59805cf89365853ac54c75
Parents: 4ca9730
Author: Quentin Pradet <qu...@apache.org>
Authored: Thu Oct 12 07:56:35 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Oct 13 08:56:12 2017 +0400

----------------------------------------------------------------------
 docs/compute/drivers/ec2.rst | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4b0193ea/docs/compute/drivers/ec2.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/ec2.rst b/docs/compute/drivers/ec2.rst
index b540082..f2aa428 100644
--- a/docs/compute/drivers/ec2.rst
+++ b/docs/compute/drivers/ec2.rst
@@ -29,6 +29,9 @@ It allows users to rent virtual servers in more than 15 regions such as:
 * China (Beijing) Region
 * South America (Sao Paulo) Region
 
+Note that pricing information is not available for China (Beijing)
+region.
+
 Using temporary security credentials
 ------------------------------------
 


[2/5] libcloud git commit: docs: Add missing EC2 regions

Posted by qu...@apache.org.
docs: Add missing EC2 regions


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

Branch: refs/heads/trunk
Commit: 4ca9730c83d37f0cff9d3418358730b47600b2b4
Parents: 8fbbe4b
Author: Quentin Pradet <qu...@apache.org>
Authored: Thu Oct 12 07:56:18 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Oct 13 08:56:12 2017 +0400

----------------------------------------------------------------------
 docs/compute/drivers/ec2.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4ca9730c/docs/compute/drivers/ec2.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/ec2.rst b/docs/compute/drivers/ec2.rst
index 2e3a940..b540082 100644
--- a/docs/compute/drivers/ec2.rst
+++ b/docs/compute/drivers/ec2.rst
@@ -10,23 +10,29 @@ platform, Amazon Web Services (AWS).
     :width: 300
     :target: https://aws.amazon.com/ec2/
 
-It allows users to rent virtual servers in more than 9 regions such as:
+It allows users to rent virtual servers in more than 15 regions such as:
 
 * US East (Northern Virginia) Region
 * US East (Ohio) Region
 * US West (Oregon) Region
 * US West (Northern California) Region
+* GovCloud (US) Region
+* Canada (Central) Region
 * EU West (Ireland) Region
+* EU West (London) Region
 * EU Central (Frankfurt) Region
 * Asia Pacific (Singapore) Region
 * Asia Pacific (Sydney) Region
 * Asia Pacific (Tokyo) Region
+* Asia Pacific (Seoul) Region
+* Asia Pacific (Mumbai) Region
+* China (Beijing) Region
 * South America (Sao Paulo) Region
 
 Using temporary security credentials
 ------------------------------------
 
-Since Libcloud 0.14.0 above, all the Amazon drivers support using temporary
+Since Libcloud 0.14.0, all the Amazon drivers support using temporary
 security credentials.
 
 Temporary credentials can be used by passing ``token`` argument to the driver


[5/5] libcloud git commit: Add changes for #1127

Posted by qu...@apache.org.
Add changes for #1127

Closes #1127


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

Branch: refs/heads/trunk
Commit: 820ff6f70cc31d25670392428383b44513e07106
Parents: 4b0193e
Author: Quentin Pradet <qu...@apache.org>
Authored: Fri Oct 13 08:55:47 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Oct 13 08:56:29 2017 +0400

----------------------------------------------------------------------
 CHANGES.rst | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/820ff6f7/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 50a415e..98fc44f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -62,6 +62,10 @@ Compute
   (GITHUB-1126)
   [Peter Amstutz, Lucas Di Pentima]
 
+- [EC2] Allow cn-north-1 even without pricing information
+  (LIBCLOUD-954, GITHUB-1127)
+  [Quentin Pradet]
+
 
 Changes in Apache Libcloud 2.2.1
 --------------------------------


[3/5] libcloud git commit: ec2: Prevent list_sizes to fail without pricing

Posted by qu...@apache.org.
ec2: Prevent list_sizes to fail without pricing


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

Branch: refs/heads/trunk
Commit: 8fbbe4b8e28ae660f5f613922c9f84bdb7ab9efb
Parents: bd7a397
Author: Quentin Pradet <qu...@apache.org>
Authored: Thu Oct 12 07:55:42 2017 +0400
Committer: Quentin Pradet <qu...@apache.org>
Committed: Fri Oct 13 08:56:12 2017 +0400

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py   | 7 +++++--
 libcloud/test/compute/test_ec2.py | 7 ++++---
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8fbbe4b8/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index a5bcf27..dd62097 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3568,8 +3568,11 @@ class BaseEC2NodeDriver(NodeDriver):
         for instance_type in available_types:
             attributes = INSTANCE_TYPES[instance_type]
             attributes = copy.deepcopy(attributes)
-            price = self._get_size_price(size_id=instance_type)
-            attributes.update({'price': price})
+            try:
+                price = self._get_size_price(size_id=instance_type)
+                attributes['price'] = price
+            except KeyError:
+                attributes['price'] = None  # pricing not available
             sizes.append(NodeSize(driver=self, **attributes))
         return sizes
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/8fbbe4b8/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 2e015ac..a36e650 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -75,11 +75,12 @@ class BaseEC2Tests(LibcloudTestCase):
         unsupported_regions = list()
 
         for region in VALID_EC2_REGIONS:
-            if region in ['cn-north-1']:
-                continue  # pricing not available
+            no_pricing = region in ['cn-north-1']
             driver = EC2NodeDriver(*EC2_PARAMS, **{'region': region})
             try:
-                driver.list_sizes()
+                sizes = driver.list_sizes()
+                if no_pricing:
+                    self.assertTrue(all([s.price is None for s in sizes]))
             except:
                 unsupported_regions.append(region)