Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ec2 eu-central-2 #2013

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions contrib/scrape-ec2-sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
"country": "Frankfurt",
"signature_version": "4",
},
"EU (Zurich)": {
"id": "eu-central-2",
"endpoint": "ec2.eu-central-2.amazonaws.com",
"api_name": "ec2_eu_central_2",
"country": "Zurich",
"signature_version": "4",
},
"EU (Stockholm)": {
"id": "eu-north-1",
"endpoint": "ec2.eu-north-1.amazonaws.com",
Expand Down
205 changes: 205 additions & 0 deletions libcloud/compute/constants/ec2_region_details_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -3409,6 +3409,211 @@
],
"signature_version": "4",
},
"eu-central-2": {
"api_name": "ec2_eu_central_2",
"country": "Zurich",
"endpoint": "ec2.eu-central-2.amazonaws.com",
"id": "eu-central-2",
"instance_types": [
"c5.12xlarge",
"c5.18xlarge",
"c5.24xlarge",
"c5.2xlarge",
"c5.4xlarge",
"c5.9xlarge",
"c5.large",
"c5.metal",
"c5.xlarge",
"c5d.12xlarge",
"c5d.18xlarge",
"c5d.24xlarge",
"c5d.2xlarge",
"c5d.4xlarge",
"c5d.9xlarge",
"c5d.large",
"c5d.metal",
"c5d.xlarge",
"c6g.12xlarge",
"c6g.16xlarge",
"c6g.2xlarge",
"c6g.4xlarge",
"c6g.8xlarge",
"c6g.large",
"c6g.medium",
"c6g.metal",
"c6g.xlarge",
"c6gd.12xlarge",
"c6gd.16xlarge",
"c6gd.2xlarge",
"c6gd.4xlarge",
"c6gd.8xlarge",
"c6gd.large",
"c6gd.medium",
"c6gd.metal",
"c6gd.xlarge",
"c6in.12xlarge",
"c6in.16xlarge",
"c6in.24xlarge",
"c6in.2xlarge",
"c6in.32xlarge",
"c6in.4xlarge",
"c6in.8xlarge",
"c6in.large",
"c6in.metal",
"c6in.xlarge",
"d3.2xlarge",
"d3.4xlarge",
"d3.8xlarge",
"d3.xlarge",
"i3.16xlarge",
"i3.2xlarge",
"i3.4xlarge",
"i3.8xlarge",
"i3.large",
"i3.xlarge",
"i3en.12xlarge",
"i3en.24xlarge",
"i3en.2xlarge",
"i3en.3xlarge",
"i3en.6xlarge",
"i3en.large",
"i3en.metal",
"i3en.xlarge",
"i4i.12xlarge",
"i4i.16xlarge",
"i4i.24xlarge",
"i4i.2xlarge",
"i4i.32xlarge",
"i4i.4xlarge",
"i4i.8xlarge",
"i4i.large",
"i4i.metal",
"i4i.xlarge",
"m5.12xlarge",
"m5.16xlarge",
"m5.24xlarge",
"m5.2xlarge",
"m5.4xlarge",
"m5.8xlarge",
"m5.large",
"m5.metal",
"m5.xlarge",
"m5d.12xlarge",
"m5d.16xlarge",
"m5d.24xlarge",
"m5d.2xlarge",
"m5d.4xlarge",
"m5d.8xlarge",
"m5d.large",
"m5d.metal",
"m5d.xlarge",
"m6g.12xlarge",
"m6g.16xlarge",
"m6g.2xlarge",
"m6g.4xlarge",
"m6g.8xlarge",
"m6g.large",
"m6g.medium",
"m6g.metal",
"m6g.xlarge",
"m6gd.12xlarge",
"m6gd.16xlarge",
"m6gd.2xlarge",
"m6gd.4xlarge",
"m6gd.8xlarge",
"m6gd.large",
"m6gd.medium",
"m6gd.metal",
"m6gd.xlarge",
"m6i.12xlarge",
"m6i.16xlarge",
"m6i.24xlarge",
"m6i.2xlarge",
"m6i.32xlarge",
"m6i.4xlarge",
"m6i.8xlarge",
"m6i.large",
"m6i.metal",
"m6i.xlarge",
"m6id.12xlarge",
"m6id.16xlarge",
"m6id.24xlarge",
"m6id.2xlarge",
"m6id.32xlarge",
"m6id.4xlarge",
"m6id.8xlarge",
"m6id.large",
"m6id.metal",
"m6id.xlarge",
"r5.12xlarge",
"r5.16xlarge",
"r5.24xlarge",
"r5.2xlarge",
"r5.4xlarge",
"r5.8xlarge",
"r5.large",
"r5.metal",
"r5.xlarge",
"r5d.12xlarge",
"r5d.16xlarge",
"r5d.24xlarge",
"r5d.2xlarge",
"r5d.4xlarge",
"r5d.8xlarge",
"r5d.large",
"r5d.metal",
"r5d.xlarge",
"r6g.12xlarge",
"r6g.16xlarge",
"r6g.2xlarge",
"r6g.4xlarge",
"r6g.8xlarge",
"r6g.large",
"r6g.medium",
"r6g.metal",
"r6g.xlarge",
"r6gd.12xlarge",
"r6gd.16xlarge",
"r6gd.2xlarge",
"r6gd.4xlarge",
"r6gd.8xlarge",
"r6gd.large",
"r6gd.medium",
"r6gd.metal",
"r6gd.xlarge",
"r6i.12xlarge",
"r6i.16xlarge",
"r6i.24xlarge",
"r6i.2xlarge",
"r6i.32xlarge",
"r6i.4xlarge",
"r6i.8xlarge",
"r6i.large",
"r6i.metal",
"r6i.xlarge",
"t3.2xlarge",
"t3.large",
"t3.medium",
"t3.micro",
"t3.nano",
"t3.small",
"t3.xlarge",
"t4g.2xlarge",
"t4g.large",
"t4g.medium",
"t4g.micro",
"t4g.nano",
"t4g.small",
"t4g.xlarge",
"u-6tb1.112xlarge",
"u-6tb1.56xlarge",
"x2idn.16xlarge",
"x2idn.24xlarge",
"x2idn.32xlarge",
"x2idn.metal",
],
"signature_version": "4",
},
"eu-north-1": {
"api_name": "ec2_eu_north_stockholm",
"country": "Stockholm",
Expand Down
7 changes: 7 additions & 0 deletions libcloud/compute/constants/ec2_region_details_partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@
"id": "eu-central-1",
"signature_version": "4",
},
"eu-central-2": {
"api_name": "ec2_eu_central_2",
"country": "Zurich",
"endpoint": "ec2.eu-central-2.amazonaws.com",
"id": "eu-central-2",
"signature_version": "4",
},
"eu-north-1": {
"api_name": "ec2_eu_north_stockholm",
"country": "Stockholm",
Expand Down
13 changes: 13 additions & 0 deletions libcloud/storage/drivers/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
S3_EU_WEST2_HOST = "s3-eu-west-2.amazonaws.com"
S3_EU_WEST3_HOST = "s3-eu-west-3.amazonaws.com"
S3_EU_CENTRAL_HOST = "s3-eu-central-1.amazonaws.com"
S3_EU_CENTRAL2_HOST = "s3-eu-central-2.amazonaws.com"
S3_EU_NORTH1_HOST = "s3-eu-north-1.amazonaws.com"
S3_EU_SOUTH1_HOST = "s3-eu-south-1.amazonaws.com"
S3_AP_SOUTH_HOST = "s3-ap-south-1.amazonaws.com"
Expand Down Expand Up @@ -98,6 +99,7 @@
"eu-north-1": "s3.eu-north-1.amazonaws.com",
"eu-south-1": "s3.eu-south-1.amazonaws.com",
"eu-central-1": S3_EU_CENTRAL_HOST,
"eu-central-2": S3_EU_CENTRAL2_HOST
"ap-south-1": S3_AP_SOUTH_HOST,
"ap-southeast-1": S3_AP_SOUTHEAST_HOST,
"ap-southeast-2": S3_AP_SOUTHEAST2_HOST,
Expand Down Expand Up @@ -1447,6 +1449,17 @@ class S3EUCentralStorageDriver(S3StorageDriver):
region_name = "eu-central-1"


class S3EUCentral2Connection(S3SignatureV4Connection):
host = S3_EU_CENTRAL2_HOST


class S3EUCentral2StorageDriver(S3StorageDriver):
name = "Amazon S3 (eu-central-2)"
connectionCls = S3EUCentral2Connection
ex_location_name = "eu-central-2"
region_name = "eu-central-2"


class S3APSEConnection(S3SignatureV4Connection):
host = S3_AP_SOUTHEAST_HOST

Expand Down
3 changes: 3 additions & 0 deletions libcloud/test/compute/test_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def test_regions_and_signature_versions(self):
driver = EC2NodeDriver(*EC2_PARAMS, region="eu-central-1", signature_version="4")
self.assertEqual(driver.signature_version, "4")

driver = EC2NodeDriver(*EC2_PARAMS, region="eu-central-2", signature_version="4")
self.assertEqual(driver.signature_version, "4")

driver = EC2NodeDriver(*EC2_PARAMS, region="ap-east-1")
self.assertEqual(driver.signature_version, "2")

Expand Down
Loading