amazon-pricing 0.0.3 → 0.0.6

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ = Version 0.0.6
2
+ * Another missing instance type, cc2.8xlarge
3
+
4
+ = Version 0.0.5
5
+ * Added conventional region name lookup
6
+
7
+ = Version 0.0.4
8
+ * Added missing instance types
9
+
1
10
  = Version 0.0.1
2
11
 
3
12
  * Created basic framework for dynamically retrieving pricing information
data/README CHANGED
@@ -41,6 +41,10 @@ To install from git for adding features or fixing bugs, you'll need to clone and
41
41
 
42
42
  The library exposes one main interface class AwsPricing::PriceList that allows you to retrieve pricing information from Amazon. The information is retrieved using undocumented json APIs - so has the potential to undergo change from time to time.
43
43
 
44
+ The following article provides a good introduction to using the gem:
45
+
46
+ http://www.hightechinthehub.com/2012/03/programmatically-retrieving-aws-pricing/
47
+
44
48
  === The Basics
45
49
 
46
50
  The library exposes one main interface module
@@ -29,7 +29,7 @@ module AwsPricing
29
29
  end
30
30
 
31
31
  def get_region(name)
32
- @_regions[name]
32
+ @_regions[@@Region_Lookup[name] || name]
33
33
  end
34
34
 
35
35
  def regions
@@ -119,5 +119,15 @@ module AwsPricing
119
119
  'ap-northeast-1a' => 'apac-tokyo', 'ap-northeast-1b' => 'apac-tokyo', 'sa-east-1a' => 'sa-east-1',
120
120
  'sa-east-1b' => 'sa-east-1'
121
121
  }
122
+
123
+ @@Region_Lookup = {
124
+ 'us-east-1' => 'us-east',
125
+ 'us-west-1' => 'us-west',
126
+ 'us-west-2' => 'us-west-2',
127
+ 'eu-west-1' => 'eu-ireland',
128
+ 'ap-southeast-1' => 'apac-sin',
129
+ 'ap-northeast-1' => 'apac-tokyo',
130
+ 'sa-east-1' => 'sa-east-1'
131
+ }
122
132
  end
123
133
  end
@@ -77,51 +77,57 @@ module AwsPricing
77
77
 
78
78
 
79
79
  @@Api_Name_Lookup = {
80
- 'stdODI' => {'sm' => 'm1.small', 'lg' => 'm1.large', 'xl' => 'm1.xlarge'},
80
+ 'stdODI' => {'sm' => 'm1.small', 'med' => 'm1.medium', 'lg' => 'm1.large', 'xl' => 'm1.xlarge'},
81
81
  'hiMemODI' => {'xl' => 'm2.xlarge', 'xxl' => 'm2.2xlarge', 'xxxxl' => 'm2.4xlarge'},
82
82
  'hiCPUODI' => {'med' => 'c1.medium', 'xl' => 'c1.xlarge'},
83
+ 'hiIoODI' => {'xxxxl' => 'hi1.4xlarge'},
83
84
  'clusterGPUI' => {'xxxxl' => 'cg1.4xlarge'},
84
- 'clusterComputeI' => {'xxxxl' => 'cc1.4xlarge','xxxxxxxxl' => 'Cluster Compute Eight Extra Large'},
85
+ 'clusterComputeI' => {'xxxxl' => 'cc1.4xlarge','xxxxxxxxl' => 'cc2.8xlarge'},
85
86
  'uODI' => {'u' => 't1.micro'},
86
87
  }
87
88
  @@Name_Lookup = {
88
- 'stdODI' => {'sm' => 'Standard Small', 'lg' => 'Standard Large', 'xl' => 'Standard Extra Large'},
89
+ 'stdODI' => {'sm' => 'Standard Small', 'med' => 'Standard Medium', 'lg' => 'Standard Large', 'xl' => 'Standard Extra Large'},
89
90
  'hiMemODI' => {'xl' => 'Hi-Memory Extra Large', 'xxl' => 'Hi-Memory Double Extra Large', 'xxxxl' => 'Hi-Memory Quadruple Extra Large'},
90
91
  'hiCPUODI' => {'med' => 'High-CPU Medium', 'xl' => 'High-CPU Extra Large'},
92
+ 'hiIoODI' => {'xxxxl' => 'High I/O Quadruple Extra Large'},
91
93
  'clusterGPUI' => {'xxxxl' => 'Cluster GPU Quadruple Extra Large'},
92
94
  'clusterComputeI' => {'xxxxl' => 'Cluster Compute Quadruple Extra Large', 'xxxxxxxxl' => 'Cluster Compute Eight Extra Large'},
93
95
  'uODI' => {'u' => 'Micro'},
94
96
  }
95
97
  @@Memory_Lookup = {
96
- 'm1.small' => 1700, 'm1.large' => 7500, 'm1.xlarge' => 15000,
98
+ 'm1.small' => 1700, 'm1.medium' => 3750, 'm1.large' => 7500, 'm1.xlarge' => 15000,
97
99
  'm2.xlarge' => 17100, 'm2.2xlarge' => 34200, 'm2.4xlarge' => 68400,
98
100
  'c1.medium' => 1700, 'c1.xlarge' => 7000,
101
+ 'hi1.4xlarge' => 60500,
99
102
  'cg1.4xlarge' => 22000,
100
- 'cc1.4xlarge' => 23000,
103
+ 'cc1.4xlarge' => 23000, 'cc2.8xlarge' => 60500,
101
104
  't1.micro' => 1700,
102
105
  }
103
106
  @@Disk_Lookup = {
104
- 'm1.small' => 160, 'm1.large' =>850, 'm1.xlarge' => 1690,
107
+ 'm1.small' => 160, 'm1.medium' => 410, 'm1.large' =>850, 'm1.xlarge' => 1690,
105
108
  'm2.xlarge' => 420, 'm2.2xlarge' => 850, 'm2.4xlarge' => 1690,
106
109
  'c1.medium' => 350, 'c1.xlarge' => 1690,
110
+ 'hi1.4xlarge' => 2048,
107
111
  'cg1.4xlarge' => 1690,
108
- 'cc1.4xlarge' => 1690,
112
+ 'cc1.4xlarge' => 1690, 'cc2.8xlarge' => 3370,
109
113
  't1.micro' => 160,
110
114
  }
111
115
  @@Platform_Lookup = {
112
- 'm1.small' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
116
+ 'm1.small' => 32, 'm1.medium' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
113
117
  'm2.xlarge' => 64, 'm2.2xlarge' => 64, 'm2.4xlarge' => 64,
114
118
  'c1.medium' => 32, 'c1.xlarge' => 64,
119
+ 'hi1.4xlarge' => 64,
115
120
  'cg1.4xlarge' => 64,
116
- 'cc1.4xlarge' => 64,
121
+ 'cc1.4xlarge' => 64, 'cc2.8xlarge' => 64,
117
122
  't1.micro' => 32,
118
123
  }
119
124
  @@Compute_Units_Lookup = {
120
- 'm1.small' => 1, 'm1.large' => 4, 'm1.xlarge' => 8,
125
+ 'm1.small' => 1, 'm1.medium' => 2, 'm1.large' => 4, 'm1.xlarge' => 8,
121
126
  'm2.xlarge' => 6, 'm2.2xlarge' => 13, 'm2.4xlarge' => 26,
122
127
  'c1.medium' => 5, 'c1.xlarge' => 20,
128
+ 'hi1.4xlarge' => 35,
123
129
  'cg1.4xlarge' => 34,
124
- 'cc1.4xlarge' => 34,
130
+ 'cc1.4xlarge' => 34, 'cc2.8xlarge' => 88,
125
131
  't1.micro' => 2,
126
132
  }
127
133
  end
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/sonian/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.0.3'
11
+ VERSION = '0.0.6'
12
12
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-pricing
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joe Kinsella
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-03 00:00:00 -05:00
18
+ date: 2012-07-26 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21