amazon-pricing 0.1.36 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjNjZjUyYmZmYzgwMTU3YWZlZjkyODE1YzkyZThlN2VlMDk0N2IzZQ==
5
+ data.tar.gz: !binary |-
6
+ MTJhZmJhMDhlODI5Njg2ODBmODlmM2NjYjE4NmJkZjhkMmUyY2U2YQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ OWFkZjI2ZTM0NTgwMzFjNmFmYzNiYzZhNTczNjQ4MDYyZWE5ZmM4MWQxZjZm
10
+ NzRkNzRiNzJmMDEyNjdjNjA2ZGY3NmQ4MjRkNTM2OTBmNDM4NGMxMjFhZmQ1
11
+ NjAzNzExMzNiOTVlNTYzNmExMzY1YmYwMzVkN2NhYmViMDFiNDQ=
12
+ data.tar.gz: !binary |-
13
+ ZWExYWRhZjI3Mjk0ODYyNjkyNjZjYzU4MTczNzcxZmNmNTFkNDlhYzMzZTJj
14
+ NjRlNDZjYmViZWY0YzU1MTFmZmUzOWI0OTJkYWRiYmU0Y2FjOTE3ZmMxNDE2
15
+ MDMyMjI2NTFhOGZhODJiZjQ0ZjAxYWFjOWI3NDc3MmIxMzY3YjY=
@@ -92,8 +92,7 @@ module AwsPricing
92
92
  end
93
93
 
94
94
  def self.populate_lookups
95
- return unless @@Memory_Lookup.empty? && @@Compute_Units_Lookup.empty? && @@Virtual_Cores_Lookup.empty?
96
-
95
+ # We use Linux on-demand to populate the lookup tables with the basic lookup information
97
96
  res = AwsPricing::PriceList.fetch_url("http://aws-assets-pricing-prod.s3.amazonaws.com/pricing/ec2/linux-od.js")
98
97
  res['config']['regions'].each do |reg|
99
98
  reg['instanceTypes'].each do |type|
@@ -175,6 +174,7 @@ module AwsPricing
175
174
  'c3.large' => 'High-Compute Large', 'c3.xlarge' => 'High-Compute Extra Large', 'c3.2xlarge' => 'High-Compute Double Extra Large', 'c3.4xlarge' => 'High-Compute Quadruple Extra Large', 'c3.8xlarge' => 'High-Compute Eight Extra Large',
176
175
  'i2.xlarge' => 'High I/O Extra Large', 'i2.2xlarge' => 'High I/O Double Extra Large', 'i2.4xlarge' => 'High I/O Quadruple Extra Large', 'i2.8xlarge' => 'High I/O Eight Extra Large',
177
176
  'r3.large' => 'Memory Optimized Large', 'r3.xlarge' => 'Memory Optimized Extra Large', 'r3.2xlarge' => 'Memory Optimized Double Extra Large', 'r3.4xlarge' => 'Memory Optimized Quadruple Extra Large', 'r3.8xlarge' => 'Memory Optimized Eight Extra Large',
177
+ 't2.micro' => 'Burstable Performance Instance Micro', 't2.small' => 'Burstable Performance Instance Small', 't2.medium' => 'Burstable Performance Instance Medium',
178
178
  }
179
179
  @@Disk_Lookup = {
180
180
  'm1.small' => 160, 'm1.medium' => 410, 'm1.large' =>850, 'm1.xlarge' => 1690,
@@ -194,6 +194,7 @@ module AwsPricing
194
194
  'c3.large' => 32, 'c3.xlarge' => 80, 'c3.2xlarge' => 160, 'c3.4xlarge' => 320, 'c3.8xlarge' => 640,
195
195
  'i2.large' => 360, 'i2.xlarge' => 720, 'i2.2xlarge' => 1440, 'i2.4xlarge' => 2880, 'i2.8xlarge' => 5760,
196
196
  'r3.large' => 32, 'r3.xlarge' => 80, 'r3.2xlarge' => 160, 'r3.4xlarge' => 320, 'r3.8xlarge' => 640,
197
+ 't2.micro' => 0, 't2.small' => 0, 't2.medium' => 0,
197
198
  }
198
199
  @@Platform_Lookup = {
199
200
  'm1.small' => 32, 'm1.medium' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
@@ -213,6 +214,7 @@ module AwsPricing
213
214
  'c3.large' => 64, 'c3.xlarge' => 64, 'c3.2xlarge' => 64, 'c3.4xlarge' => 64, 'c3.8xlarge' => 64,
214
215
  'i2.large' => 64, 'i2.xlarge' => 64, 'i2.2xlarge' => 64, 'i2.4xlarge' => 64, 'i2.8xlarge' => 64,
215
216
  'r3.large' => 64, 'r3.xlarge' => 64, 'r3.2xlarge' => 64, 'r3.4xlarge' => 64, 'r3.8xlarge' => 64,
217
+ 't2.micro' => 64, 't2.small' => 64, 't2.medium' => 64,
216
218
  }
217
219
  @@Disk_Type_Lookup = {
218
220
  'm1.small' => :ephemeral, 'm1.medium' => :ephemeral, 'm1.large' => :ephemeral, 'm1.xlarge' => :ephemeral,
@@ -232,16 +234,23 @@ module AwsPricing
232
234
  'db.t1.micro' => :ebs,
233
235
  'c3.large' => :ssd, 'c3.xlarge' => :ssd, 'c3.2xlarge' => :ssd, 'c3.4xlarge' => :ssd, 'c3.8xlarge' => :ssd,
234
236
  'i2.large' => :ssd, 'i2.xlarge' => :ssd, 'i2.2xlarge' => :ssd, 'i2.4xlarge' => :ssd, 'i2.8xlarge' => :ssd,
235
- # Remove asterisk when this is released instance type
236
- #'r3.large *' => :ssd, 'r3.xlarge *' => :ssd, 'r3.2xlarge *' => :ssd, 'r3.4xlarge *' => :ssd, 'r3.8xlarge *' => :ssd,
237
+ 'r3.large' => :ssd, 'r3.xlarge' => :ssd, 'r3.2xlarge' => :ssd, 'r3.4xlarge' => :ssd, 'r3.8xlarge' => :ssd,
238
+ 't2.micro' => :ebs, 't2.small' => :ebs, 't2.medium' => :ebs,
239
+ }
240
+ # Sigh... AWS does not always provide memory info (e.g. t2, r3)
241
+ @@Memory_Lookup = {
242
+ 'r3.large' => 15250, 'r3.xlarge' => 30500, 'r3.2xlarge' => 61000, 'r3.4xlarge' => 122000, 'r3.8xlarge' => 244000,
243
+ 't2.micro' => 1000, 't2.small' => 2000, 't2.medium' => 4000,
244
+ }
245
+ @@Virtual_Cores_Lookup = {
246
+ 'r3.large' => 2, 'r3.xlarge' => 4, 'r3.2xlarge' => 8, 'r3.4xlarge' => 16, 'r3.8xlarge' => 32,
247
+ 't2.micro' => 1, 't2.small' => 1, 't2.medium' => 2,
237
248
  }
238
249
 
239
250
  # Due to fact AWS pricing API only reports these for EC2, we will fetch from EC2 and keep around for lookup
240
251
  # e.g. EC2 = http://aws-assets-pricing-prod.s3.amazonaws.com/pricing/ec2/linux-od.js
241
252
  # e.g. RDS = http://aws-assets-pricing-prod.s3.amazonaws.com/pricing/rds/mysql/pricing-standard-deployments.js
242
- @@Memory_Lookup = {}
243
253
  @@Compute_Units_Lookup = {}
244
- @@Virtual_Cores_Lookup = {}
245
254
 
246
255
  end
247
256
 
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.36'
11
+ VERSION = '0.1.37'
12
12
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.36
5
- prerelease:
4
+ version: 0.1.37
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joe Kinsella
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A Ruby library for retrieving pricing for Amazon Web Services
15
14
  email:
@@ -52,6 +51,7 @@ files:
52
51
  homepage: http://github.com/CloudHealth/amazon-pricing
53
52
  licenses:
54
53
  - MIT
54
+ metadata: {}
55
55
  post_install_message:
56
56
  rdoc_options:
57
57
  - --title
@@ -62,28 +62,20 @@ rdoc_options:
62
62
  require_paths:
63
63
  - lib
64
64
  required_ruby_version: !ruby/object:Gem::Requirement
65
- none: false
66
65
  requirements:
67
66
  - - ! '>='
68
67
  - !ruby/object:Gem::Version
69
68
  version: '0'
70
- segments:
71
- - 0
72
- hash: 87748617366120623
73
69
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
70
  requirements:
76
71
  - - ! '>='
77
72
  - !ruby/object:Gem::Version
78
73
  version: '0'
79
- segments:
80
- - 0
81
- hash: 87748617366120623
82
74
  requirements: []
83
75
  rubyforge_project: amazon-pricing
84
- rubygems_version: 1.8.25
76
+ rubygems_version: 2.2.2
85
77
  signing_key:
86
- specification_version: 3
78
+ specification_version: 4
87
79
  summary: Amazon Web Services Pricing Ruby gem
88
80
  test_files:
89
81
  - spec/instance_type_spec.rb
@@ -94,3 +86,4 @@ test_files:
94
86
  - test/ec2_instance_types_test.rb
95
87
  - test/govcloud_test.rb
96
88
  - test/helper.rb
89
+ has_rdoc: