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 <quent...@apache.org> Authored: Wed Oct 11 11:07:45 2017 +0400 Committer: Quentin Pradet <quent...@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()