libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [09/12] libcloud git commit: Update scrape-ec2-prices script so it doesn't include pricing for instances for which pricing data is not available.
Date Fri, 20 May 2016 10:09:09 GMT
Update scrape-ec2-prices script so it doesn't include pricing for instances for
which pricing data is not available.


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

Branch: refs/heads/trunk
Commit: 4b53c91472127b8d61c12720ee9c492c0e9477a1
Parents: 752688e
Author: Tomaz Muraus <tomaz@tomaz.me>
Authored: Fri May 20 11:32:55 2016 +0200
Committer: Tomaz Muraus <tomaz@tomaz.me>
Committed: Fri May 20 11:32:55 2016 +0200

----------------------------------------------------------------------
 contrib/scrape-ec2-prices.py |  4 +++
 libcloud/data/pricing.json   | 68 +++++++++------------------------------
 2 files changed, 19 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4b53c914/contrib/scrape-ec2-prices.py
----------------------------------------------------------------------
diff --git a/contrib/scrape-ec2-prices.py b/contrib/scrape-ec2-prices.py
index 7d390e6..438046c 100755
--- a/contrib/scrape-ec2-prices.py
+++ b/contrib/scrape-ec2-prices.py
@@ -162,6 +162,10 @@ def scrape_ec2_pricing():
 
                 for size in sizes:
                     price = size['valueColumns'][0]['prices']['USD']
+                    if str(price).lower() == 'n/a':
+                        # Price not available
+                        continue
+
                     result[libcloud_region_name][size['size']] = price
 
     return result

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4b53c914/libcloud/data/pricing.json
----------------------------------------------------------------------
diff --git a/libcloud/data/pricing.json b/libcloud/data/pricing.json
index 97a266e..b44808a 100644
--- a/libcloud/data/pricing.json
+++ b/libcloud/data/pricing.json
@@ -29,8 +29,8 @@
             "standard-small": 0.0796
         },
         "ec2_ap_northeast": {
-            "c1.medium": "N/A",
-            "c1.xlarge": "N/A",
+            "c1.medium": "0.158",
+            "c1.xlarge": "0.632",
             "c3.large": "0.128",
             "c3.xlarge": "0.255",
             "c3.2xlarge": "0.511",
@@ -41,28 +41,27 @@
             "c4.2xlarge": "0.478",
             "c4.4xlarge": "0.955",
             "c4.8xlarge": "1.91",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
+            "cc2.8xlarge": "2.349",
+            "cr1.8xlarge": "4.105",
             "d2.xlarge": "0.844",
             "d2.2xlarge": "1.688",
             "d2.4xlarge": "3.376",
             "d2.8xlarge": "6.752",
             "g2.2xlarge": "0.898",
             "g2.8xlarge": "3.592",
-            "hi1.4xlarge": "N/A",
-            "hs1.8xlarge": "N/A",
+            "hi1.4xlarge": "3.276",
+            "hs1.8xlarge": "5.4",
             "i2.xlarge": "1.001",
             "i2.2xlarge": "2.001",
             "i2.4xlarge": "4.002",
             "i2.8xlarge": "8.004",
-            "m1.small": "N/A",
-            "m1.medium": "N/A",
-            "m1.large": "N/A",
-            "m1.xlarge": "N/A",
-            "m2.xlarge": "N/A",
-            "m2.2xlarge": "N/A",
-            "m2.4xlarge": "N/A",
+            "m1.small": "0.061",
+            "m1.medium": "0.122",
+            "m1.large": "0.243",
+            "m1.xlarge": "0.486",
+            "m2.xlarge": "0.287",
+            "m2.2xlarge": "0.575",
+            "m2.4xlarge": "1.15",
             "m3.medium": "0.096",
             "m3.large": "0.193",
             "m3.xlarge": "0.385",
@@ -77,7 +76,7 @@
             "r3.2xlarge": "0.798",
             "r3.4xlarge": "1.596",
             "r3.8xlarge": "3.192",
-            "t1.micro": "N/A",
+            "t1.micro": "0.026",
             "t2.micro": "0.02",
             "t2.small": "0.04",
             "t2.medium": "0.08",
@@ -98,16 +97,12 @@
             "c4.2xlarge": "0.578",
             "c4.4xlarge": "1.155",
             "c4.8xlarge": "2.31",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
             "d2.xlarge": "0.87",
             "d2.2xlarge": "1.74",
             "d2.4xlarge": "3.48",
             "d2.8xlarge": "6.96",
             "g2.2xlarge": "1",
             "g2.8xlarge": "4",
-            "hi1.4xlarge": "N/A",
             "hs1.8xlarge": "5.57",
             "i2.xlarge": "1.018",
             "i2.2xlarge": "2.035",
@@ -155,16 +150,12 @@
             "c4.2xlarge": "0.549",
             "c4.4xlarge": "1.097",
             "c4.8xlarge": "2.195",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
             "d2.xlarge": "0.87",
             "d2.2xlarge": "1.74",
             "d2.4xlarge": "3.48",
             "d2.8xlarge": "6.96",
             "g2.2xlarge": "0.898",
             "g2.8xlarge": "3.592",
-            "hi1.4xlarge": "N/A",
             "hs1.8xlarge": "5.57",
             "i2.xlarge": "1.018",
             "i2.2xlarge": "2.035",
@@ -200,8 +191,6 @@
             "x1.32xlarge": "19.341"
         },
         "ec2_eu_central": {
-            "c1.medium": "N/A",
-            "c1.xlarge": "N/A",
             "c3.large": "0.129",
             "c3.xlarge": "0.258",
             "c3.2xlarge": "0.516",
@@ -212,28 +201,16 @@
             "c4.2xlarge": "0.534",
             "c4.4xlarge": "1.069",
             "c4.8xlarge": "2.138",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
             "d2.xlarge": "0.794",
             "d2.2xlarge": "1.588",
             "d2.4xlarge": "3.176",
             "d2.8xlarge": "6.352",
             "g2.2xlarge": "0.772",
             "g2.8xlarge": "3.088",
-            "hi1.4xlarge": "N/A",
-            "hs1.8xlarge": "N/A",
             "i2.xlarge": "1.013",
             "i2.2xlarge": "2.026",
             "i2.4xlarge": "4.051",
             "i2.8xlarge": "8.102",
-            "m1.small": "N/A",
-            "m1.medium": "N/A",
-            "m1.large": "N/A",
-            "m1.xlarge": "N/A",
-            "m2.xlarge": "N/A",
-            "m2.2xlarge": "N/A",
-            "m2.4xlarge": "N/A",
             "m3.medium": "0.079",
             "m3.large": "0.158",
             "m3.xlarge": "0.315",
@@ -248,7 +225,6 @@
             "r3.2xlarge": "0.8",
             "r3.4xlarge": "1.6",
             "r3.8xlarge": "3.201",
-            "t1.micro": "N/A",
             "t2.micro": "0.015",
             "t2.small": "0.03",
             "t2.medium": "0.06",
@@ -321,11 +297,6 @@
             "c3.2xlarge": "0.65",
             "c3.4xlarge": "1.3",
             "c3.8xlarge": "2.6",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
-            "hi1.4xlarge": "N/A",
-            "hs1.8xlarge": "N/A",
             "m1.small": "0.058",
             "m1.medium": "0.117",
             "m1.large": "0.233",
@@ -412,13 +383,10 @@
             "c3.4xlarge": "1.008",
             "c3.8xlarge": "2.016",
             "cc2.8xlarge": "2.25",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
             "d2.xlarge": "0.828",
             "d2.2xlarge": "1.656",
             "d2.4xlarge": "3.312",
             "d2.8xlarge": "6.624",
-            "hi1.4xlarge": "N/A",
             "hs1.8xlarge": "5.52",
             "i2.xlarge": "1.023",
             "i2.2xlarge": "2.046",
@@ -460,13 +428,8 @@
             "c4.2xlarge": "0.524",
             "c4.4xlarge": "1.049",
             "c4.8xlarge": "2.098",
-            "cc2.8xlarge": "N/A",
-            "cg1.4xlarge": "N/A",
-            "cr1.8xlarge": "N/A",
             "g2.2xlarge": "0.702",
             "g2.8xlarge": "2.808",
-            "hi1.4xlarge": "N/A",
-            "hs1.8xlarge": "N/A",
             "i2.xlarge": "0.938",
             "i2.2xlarge": "1.876",
             "i2.4xlarge": "3.751",
@@ -513,7 +476,6 @@
             "c4.4xlarge": "0.838",
             "c4.8xlarge": "1.675",
             "cc2.8xlarge": "2",
-            "cg1.4xlarge": "N/A",
             "cr1.8xlarge": "3.5",
             "d2.xlarge": "0.69",
             "d2.2xlarge": "1.38",
@@ -1043,5 +1005,5 @@
         }
     },
     "storage": {},
-    "updated": 1463736232
+    "updated": 1463736767
 }
\ No newline at end of file


Mime
View raw message