amazon-pricing 0.1.86 → 0.1.88
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/Gemfile.lock +1 -1
- data/lib/amazon-pricing/common/ec2_common.rb +10 -5
- data/lib/amazon-pricing/definitions/category-type.rb +19 -1
- data/lib/amazon-pricing/definitions/ec2-instance-type.rb +20 -5
- data/lib/amazon-pricing/definitions/elasticache_node_type.rb +4 -2
- data/lib/amazon-pricing/definitions/instance-type.rb +10 -4
- data/lib/amazon-pricing/definitions/rds-instance-type.rb +11 -3
- data/lib/amazon-pricing/helpers/instance-type.rb +5 -3
- data/lib/amazon-pricing/version.rb +1 -1
- data/test/ec2_instance_types_test.rb +12 -0
- metadata +17 -9
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
N2YyZmQ3OTMwN2Y2MzlmMzU3ODBkMjk2ZDk2ZGY0MTVhMmZkNThhZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MWQxNGFjNDg2YmIyNTlhYmQ0NzA5MjFmNDc1ZTMwYzRiY2UzNzU3ZQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
N2UzMGE4Yjk2NmMzYjdmZmJhNmRlZGZmMzczYTE3ODVjYTQ2YmI4ZmYwYWNl
|
10
|
+
MzZmZmUzNGMxNzY5NzA4Y2I4YjMzYzg3Nzg5ZGFlYmY0MjE2NjJkNDE3MjYx
|
11
|
+
MTQ5ZjA3MGM1NDRjOTYwZmUxMDQ3N2IyZTUwYjhkMzc0YmM5ZTk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjBjNWMxNzE0YzQyMzYxMThhZjcxNjQ4ZmJlNjMxMjg2NTc0NzMyMDQ4MWIy
|
14
|
+
MDllZTliMjlmZTgyOTBkZDM0OThjMWJjMzczMjQ3YmIzNDVjZWM5OTBkOWYy
|
15
|
+
YjhmM2FkMDFjYzFjNGE0NjA1MjU4YjQ5OGNiNTM4ZGQ0NGE1MDY=
|
data/Gemfile.lock
CHANGED
@@ -90,11 +90,16 @@ module AwsPricing
|
|
90
90
|
# see if instance_type is missing; normally fetch_ec2_instance_pricing() adds instance_type and od-pricing;
|
91
91
|
# but if there's AWS inconsistency, make sure we add instance_type now.
|
92
92
|
def find_or_create_instance_type(region, api_name, operating_system)
|
93
|
+
instance_type = nil
|
93
94
|
if not region.instance_type_available?(api_name, :ondemand, operating_system)
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
begin
|
96
|
+
api_name, name = Ec2InstanceType.get_name("", #unused
|
97
|
+
api_name,
|
98
|
+
false) #!:ondemand
|
99
|
+
instance_type = region.add_or_update_ec2_instance_type(api_name, name)
|
100
|
+
rescue UnknownTypeError
|
101
|
+
$stderr.puts "[#{__method__}] WARNING: unknown Ec2InstanceType:#{api_name} ignored"
|
102
|
+
end
|
98
103
|
elsif
|
99
104
|
instance_type = region.get_ec2_instance_type(api_name)
|
100
105
|
end
|
@@ -130,4 +135,4 @@ module AwsPricing
|
|
130
135
|
end
|
131
136
|
|
132
137
|
end
|
133
|
-
end
|
138
|
+
end
|
@@ -16,7 +16,9 @@ module AwsPricing
|
|
16
16
|
:light_prepay_1_year, :light_prepay_3_year, :medium_prepay_1_year, :medium_prepay_3_year, :heavy_prepay_1_year, :heavy_prepay_3_year,
|
17
17
|
:allupfront_prepay_1_year, :allupfront_prepay_3_year,
|
18
18
|
:partialupfront_price_per_hour_1_year, :partialupfront_prepay_1_year, :partialupfront_price_per_hour_3_year, :partialupfront_prepay_3_year,
|
19
|
-
:noupfront_price_per_hour_1_year, :noupfront_price_per_hour_3_year
|
19
|
+
:noupfront_price_per_hour_1_year, :noupfront_price_per_hour_3_year, :convertible_allupfront_prepay_3_year,
|
20
|
+
:convertible_partialupfront_price_per_hour_3_year, :convertible_partialupfront_prepay_3_year,
|
21
|
+
:convertible_noupfront_price_per_hour_3_year
|
20
22
|
|
21
23
|
def allupfront_effective_rate_1_year
|
22
24
|
(allupfront_prepay_1_year / 365 / 24).round(4)
|
@@ -78,12 +80,16 @@ module AwsPricing
|
|
78
80
|
@allupfront_prepay_1_year
|
79
81
|
elsif term == :year3
|
80
82
|
@allupfront_prepay_3_year
|
83
|
+
elsif term == :year3_convertible
|
84
|
+
@convertible_allupfront_prepay_3_year
|
81
85
|
end
|
82
86
|
when :partialupfront
|
83
87
|
if term == :year1
|
84
88
|
@partialupfront_prepay_1_year
|
85
89
|
elsif term == :year3
|
86
90
|
@partialupfront_prepay_3_year
|
91
|
+
elsif term == :year3_convertible
|
92
|
+
@convertible_partialupfront_prepay_3_year
|
87
93
|
end
|
88
94
|
end
|
89
95
|
end
|
@@ -115,12 +121,16 @@ module AwsPricing
|
|
115
121
|
@allupfront_prepay_1_year = price
|
116
122
|
elsif term == :year3
|
117
123
|
@allupfront_prepay_3_year = price
|
124
|
+
elsif term == :year3_convertible
|
125
|
+
@convertible_allupfront_prepay_3_year = price
|
118
126
|
end
|
119
127
|
when :partialupfront
|
120
128
|
if term == :year1
|
121
129
|
@partialupfront_prepay_1_year = price
|
122
130
|
elsif term == :year3
|
123
131
|
@partialupfront_prepay_3_year = price
|
132
|
+
elsif term == :year3_convertible
|
133
|
+
@convertible_partialupfront_prepay_3_year = price
|
124
134
|
end
|
125
135
|
else
|
126
136
|
raise "Unable to set prepay for #{instance_type.api_name} : #{name} : #{type_of_instance} : #{term} to #{price}"
|
@@ -156,12 +166,16 @@ module AwsPricing
|
|
156
166
|
@partialupfront_price_per_hour_1_year
|
157
167
|
elsif term == :year3
|
158
168
|
@partialupfront_price_per_hour_3_year
|
169
|
+
elsif term == :year3_convertible
|
170
|
+
@convertible_partialupfront_price_per_hour_3_year
|
159
171
|
end
|
160
172
|
when :noupfront
|
161
173
|
if term == :year1
|
162
174
|
@noupfront_price_per_hour_1_year
|
163
175
|
elsif term == :year3
|
164
176
|
@noupfront_price_per_hour_3_year
|
177
|
+
elsif term == :year3_convertible
|
178
|
+
@convertible_noupfront_price_per_hour_3_year
|
165
179
|
end
|
166
180
|
when :allupfront
|
167
181
|
0
|
@@ -197,12 +211,16 @@ module AwsPricing
|
|
197
211
|
@partialupfront_price_per_hour_1_year = price_per_hour
|
198
212
|
elsif term == :year3
|
199
213
|
@partialupfront_price_per_hour_3_year = price_per_hour
|
214
|
+
elsif term == :year3_convertible
|
215
|
+
@convertible_partialupfront_price_per_hour_3_year = price_per_hour
|
200
216
|
end
|
201
217
|
when :noupfront
|
202
218
|
if term == :year1
|
203
219
|
@noupfront_price_per_hour_1_year = price_per_hour
|
204
220
|
elsif term == :year3
|
205
221
|
@noupfront_price_per_hour_3_year = price_per_hour
|
222
|
+
elsif term == :year3_convertible
|
223
|
+
@convertible_noupfront_price_per_hour_3_year = price_per_hour
|
206
224
|
end
|
207
225
|
end
|
208
226
|
end
|
@@ -33,8 +33,16 @@ module AwsPricing
|
|
33
33
|
if type_of_instance == :ondemand
|
34
34
|
os.set_price_per_hour(type_of_instance, nil, p)
|
35
35
|
else
|
36
|
-
|
37
|
-
|
36
|
+
case term
|
37
|
+
when "yrTerm1", "yrTerm1Standard"
|
38
|
+
years = :year1
|
39
|
+
when "yrTerm3", "yrTerm3Standard"
|
40
|
+
years = :year3
|
41
|
+
when "yrTerm3Convertible"
|
42
|
+
years = :year3_convertible
|
43
|
+
else
|
44
|
+
$stderr.puts "[#{__method__}] WARNING: unknown term:#{term} os:#{operating_system},type:#{type_of_instance},prepay:#{is_prepay}"
|
45
|
+
end
|
38
46
|
if is_prepay
|
39
47
|
os.set_prepay(type_of_instance, years, p)
|
40
48
|
else
|
@@ -65,14 +73,16 @@ module AwsPricing
|
|
65
73
|
price = coerce_price(val['prices']['USD'])
|
66
74
|
|
67
75
|
case val["name"]
|
68
|
-
when "yrTerm1"
|
76
|
+
when "yrTerm1", "yrTerm1Standard"
|
69
77
|
os.set_prepay(type_of_instance, :year1, price)
|
70
|
-
when "yrTerm3"
|
78
|
+
when "yrTerm3", "yrTerm3Standard"
|
71
79
|
os.set_prepay(type_of_instance, :year3, price)
|
72
80
|
when "yrTerm1Hourly"
|
73
81
|
os.set_price_per_hour(type_of_instance, :year1, price)
|
74
82
|
when "yrTerm3Hourly"
|
75
83
|
os.set_price_per_hour(type_of_instance, :year3, price)
|
84
|
+
else
|
85
|
+
$stderr.puts "[#{__method__}] WARNING: unknown term:#{val["name"]}"
|
76
86
|
end
|
77
87
|
end
|
78
88
|
end
|
@@ -143,7 +153,8 @@ module AwsPricing
|
|
143
153
|
:low_to_moderate => 250,
|
144
154
|
:moderate => 500,
|
145
155
|
:high => 1000,
|
146
|
-
:ten_gigabit => 10000
|
156
|
+
:ten_gigabit => 10000,
|
157
|
+
:twenty_gigabit => 20000,
|
147
158
|
}
|
148
159
|
|
149
160
|
@Network_Performance = {
|
@@ -241,11 +252,15 @@ module AwsPricing
|
|
241
252
|
'm3.large' => :moderate,
|
242
253
|
'm3.medium' => :moderate,
|
243
254
|
'm3.xlarge' => :high,
|
255
|
+
'm4.16xlarge' => :twenty_gigabit,
|
244
256
|
'm4.10xlarge' => :ten_gigabit,
|
245
257
|
'm4.2xlarge' => :high,
|
246
258
|
'm4.4xlarge' => :high,
|
247
259
|
'm4.large' => :moderate,
|
248
260
|
'm4.xlarge' => :high,
|
261
|
+
'p2.xlarge' => :high,
|
262
|
+
'p2.8xlarge' => :ten_gigabit,
|
263
|
+
'p2.16xlarge' => :twenty_gigabit,
|
249
264
|
'r3.2xlarge' => :high,
|
250
265
|
'r3.4xlarge' => :high,
|
251
266
|
'r3.8xlarge' => :ten_gigabit,
|
@@ -43,14 +43,16 @@ module AwsPricing
|
|
43
43
|
price = coerce_price(val['prices']['USD'])
|
44
44
|
|
45
45
|
case val['name']
|
46
|
-
when "yrTerm1"
|
46
|
+
when "yrTerm1", "yrTerm1Standard"
|
47
47
|
cache.set_prepay(type_of_instance, :year1, price)
|
48
|
-
when "yrTerm3"
|
48
|
+
when "yrTerm3", "yrTerm3Standard"
|
49
49
|
cache.set_prepay(type_of_instance, :year3, price)
|
50
50
|
when "yearTerm1Hourly"
|
51
51
|
cache.set_price_per_hour(type_of_instance, :year1, price)
|
52
52
|
when "yearTerm3Hourly"
|
53
53
|
cache.set_price_per_hour(type_of_instance, :year3, price)
|
54
|
+
else
|
55
|
+
$stderr.puts "[#{__method__}] WARNING: unknown term:#{val["name"]}"
|
54
56
|
end
|
55
57
|
end
|
56
58
|
end
|
@@ -180,7 +180,9 @@ module AwsPricing
|
|
180
180
|
'm1.small' => 'Standard Small', 'm1.medium' => 'Standard Medium', 'm1.large' => 'Standard Large', 'm1.xlarge' => 'Standard Extra Large',
|
181
181
|
'm2.xlarge' => 'Hi-Memory Extra Large', 'm2.2xlarge' => 'Hi-Memory Double Extra Large', 'm2.4xlarge' => 'Hi-Memory Quadruple Extra Large',
|
182
182
|
'm3.medium' => 'M3 Medium Instance', 'm3.large'=>'M3 Large Instance', 'm3.xlarge' => 'M3 Extra Large Instance', 'm3.2xlarge' => 'M3 Double Extra Large Instance',
|
183
|
-
'm4.large' => 'M4 Large Instance', 'm4.xlarge' => 'M4 Extra Large Instance', 'm4.2xlarge' => 'M4 Double Extra Large Instance',
|
183
|
+
'm4.large' => 'M4 Large Instance', 'm4.xlarge' => 'M4 Extra Large Instance', 'm4.2xlarge' => 'M4 Double Extra Large Instance',
|
184
|
+
'm4.4xlarge' => 'M4 Quadruple Extra Large Instance', 'm4.10xlarge' => 'M4 Decuple Extra Large Instance',
|
185
|
+
'm4.16xlarge' => 'M4 Hextuple Extra Large Instance',
|
184
186
|
'c1.medium' => 'High-CPU Medium', 'c1.xlarge' => 'High-CPU Extra Large',
|
185
187
|
'hi1.4xlarge' => 'High I/O Quadruple Extra Large',
|
186
188
|
'cg1.4xlarge' => 'Cluster GPU Quadruple Extra Large',
|
@@ -189,6 +191,7 @@ module AwsPricing
|
|
189
191
|
'cr1.8xlarge' => 'High-Memory Cluster Eight Extra Large',
|
190
192
|
'hs1.8xlarge' => 'High-Storage Eight Extra Large',
|
191
193
|
'g2.2xlarge' => 'Cluster GPU Double Extra Large', 'g2.8xlarge' => 'Cluster GPU Eight Extra Large',
|
194
|
+
'p2.xlarge' => 'GPU Compute Extra Large', 'p2.8xlarge' => 'GPU Compute Eight Extra Large', 'p2.16xlarge' => 'GPU Compute Hextuple Extra Large',
|
192
195
|
'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',
|
193
196
|
'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',
|
194
197
|
'd2.xlarge' => 'Dense Storage Extra Large', 'd2.2xlarge' => 'Dense Storage Double Extra Large', 'd2.4xlarge' => 'Dense Storage Quadruple Extra Large', 'd2.8xlarge' => 'Dense Storage Eight Extra Large',
|
@@ -201,7 +204,7 @@ module AwsPricing
|
|
201
204
|
'm1.small' => 160, 'm1.medium' => 410, 'm1.large' =>850, 'm1.xlarge' => 1690,
|
202
205
|
'm2.xlarge' => 420, 'm2.2xlarge' => 850, 'm2.4xlarge' => 1690,
|
203
206
|
'm3.medium' => 4, 'm3.large' => 32, 'm3.xlarge' => 80, 'm3.2xlarge' => 160,
|
204
|
-
'm4.large' => 0, 'm4.xlarge' => 0, 'm4.2xlarge' => 0, 'm4.4xlarge' => 0, 'm4.10xlarge' => 0,
|
207
|
+
'm4.large' => 0, 'm4.xlarge' => 0, 'm4.2xlarge' => 0, 'm4.4xlarge' => 0, 'm4.10xlarge' => 0, 'm4.16xlarge' => 0,
|
205
208
|
'c1.medium' => 350, 'c1.xlarge' => 1690,
|
206
209
|
'hi1.4xlarge' => 2048,
|
207
210
|
'cg1.4xlarge' => 1690,
|
@@ -220,12 +223,13 @@ module AwsPricing
|
|
220
223
|
't2.nano' => 0, 't2.micro' => 0, 't2.small' => 0, 't2.medium' => 0, 't2.large' => 0,
|
221
224
|
'c4.large' => 0, 'c4.xlarge' => 0, 'c4.2xlarge' => 0, 'c4.4xlarge' => 0, 'c4.8xlarge' => 0,
|
222
225
|
'x1.32xlarge' => 3840,
|
226
|
+
'p2.xlarge' => 0, 'p2.8xlarge' => 0, 'p2.16xlarge' => 0,
|
223
227
|
}
|
224
228
|
@@Platform_Lookup = {
|
225
229
|
'm1.small' => 32, 'm1.medium' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
|
226
230
|
'm2.xlarge' => 64, 'm2.2xlarge' => 64, 'm2.4xlarge' => 64,
|
227
231
|
'm3.medium' => 64, 'm3.large' => 64, 'm3.xlarge' => 64, 'm3.2xlarge' => 64,
|
228
|
-
'm4.large' => 64, 'm4.xlarge' => 64, 'm4.2xlarge' => 64, 'm4.4xlarge' => 64, 'm4.10xlarge' => 64,
|
232
|
+
'm4.large' => 64, 'm4.xlarge' => 64, 'm4.2xlarge' => 64, 'm4.4xlarge' => 64, 'm4.10xlarge' => 64, 'm4.16xlarge' => 64,
|
229
233
|
'c1.medium' => 32, 'c1.xlarge' => 64,
|
230
234
|
'hi1.4xlarge' => 64,
|
231
235
|
'cg1.4xlarge' => 64,
|
@@ -244,12 +248,13 @@ module AwsPricing
|
|
244
248
|
't2.nano' => 64, 't2.micro' => 64, 't2.small' => 64, 't2.medium' => 64, 't2.large' => 64,
|
245
249
|
'c4.large' => 64, 'c4.xlarge' => 64, 'c4.2xlarge' => 64, 'c4.4xlarge' => 64, 'c4.8xlarge' => 64,
|
246
250
|
'x1.32xlarge' => 64,
|
251
|
+
'p2.xlarge' => 64, 'p2.8xlarge' => 64, 'p2.16xlarge' => 64,
|
247
252
|
}
|
248
253
|
@@Disk_Type_Lookup = {
|
249
254
|
'm1.small' => :ephemeral, 'm1.medium' => :ephemeral, 'm1.large' => :ephemeral, 'm1.xlarge' => :ephemeral,
|
250
255
|
'm2.xlarge' => :ephemeral, 'm2.2xlarge' => :ephemeral, 'm2.4xlarge' => :ephemeral,
|
251
256
|
'm3.medium' => :ssd, 'm3.large' => :ssd, 'm3.xlarge' => :ssd, 'm3.2xlarge' => :ssd,
|
252
|
-
'm4.large' => :ebs, 'm4.xlarge' => :ebs, 'm4.2xlarge' => :ebs, 'm4.4xlarge' => :ebs, 'm4.10xlarge' => :ebs,
|
257
|
+
'm4.large' => :ebs, 'm4.xlarge' => :ebs, 'm4.2xlarge' => :ebs, 'm4.4xlarge' => :ebs, 'm4.10xlarge' => :ebs, 'm4.16xlarge' => :ebs,
|
253
258
|
'c1.medium' => :ephemeral, 'c1.xlarge' => :ephemeral,
|
254
259
|
'hi1.4xlarge' => :ssd,
|
255
260
|
'cg1.4xlarge' => :ephemeral,
|
@@ -269,6 +274,7 @@ module AwsPricing
|
|
269
274
|
't2.nano' => :ebs, 't2.micro' => :ebs, 't2.small' => :ebs, 't2.medium' => :ebs, 't2.large' => :ebs,
|
270
275
|
'c4.large' => :ebs, 'c4.xlarge' => :ebs, 'c4.2xlarge' => :ebs, 'c4.4xlarge' => :ebs, 'c4.8xlarge' => :ebs,
|
271
276
|
'x1.32xlarge' => :ssd,
|
277
|
+
'p2.xlarge' => :ebs, 'p2.8xlarge' => :ebs, 'p2.16xlarge' => :ebs,
|
272
278
|
}
|
273
279
|
|
274
280
|
# NOTE: These are populated by "populate_lookups"
|
@@ -70,9 +70,9 @@ module AwsPricing
|
|
70
70
|
price = coerce_price(val['prices']['USD'])
|
71
71
|
|
72
72
|
case val["name"]
|
73
|
-
when "yrTerm1"
|
73
|
+
when "yrTerm1", "yrTerm1Standard"
|
74
74
|
db.set_prepay(type_of_instance, :year1, price)
|
75
|
-
when "yrTerm3"
|
75
|
+
when "yrTerm3", "yrTerm3Standard"
|
76
76
|
db.set_prepay(type_of_instance, :year3, price)
|
77
77
|
when "yrTerm1Hourly"
|
78
78
|
db.set_price_per_hour(type_of_instance, :year1, price)
|
@@ -82,6 +82,8 @@ module AwsPricing
|
|
82
82
|
db.set_price_per_hour(type_of_instance, :year1, price)
|
83
83
|
when "yearTerm3Hourly"
|
84
84
|
db.set_price_per_hour(type_of_instance, :year3, price)
|
85
|
+
else
|
86
|
+
$stderr.puts "[#{__method__}] WARNING: unknown term:#{val["name"]}"
|
85
87
|
end
|
86
88
|
end
|
87
89
|
end
|
@@ -112,9 +114,15 @@ module AwsPricing
|
|
112
114
|
|
113
115
|
terms_to_years = {
|
114
116
|
"yrTerm1" => :year1,
|
115
|
-
"yrTerm3" => :year3
|
117
|
+
"yrTerm3" => :year3,
|
118
|
+
"yrTerm1Standard" => :year1,
|
119
|
+
"yrTerm3Standard" => :year3
|
116
120
|
}
|
117
121
|
years = terms_to_years[term]
|
122
|
+
if years.nil?
|
123
|
+
$stderr.puts "[#{__method__}] WARNING: unknown term:#{val["name"]}"
|
124
|
+
end
|
125
|
+
|
118
126
|
prices.each do |price|
|
119
127
|
p = coerce_price(price['prices']['USD'])
|
120
128
|
case price['name']
|
@@ -6,7 +6,7 @@ module AwsPricing
|
|
6
6
|
'GeneralPurpose' => {
|
7
7
|
'CurrentGen' => {
|
8
8
|
'M3' => ['m3.medium', 'm3.large', 'm3.xlarge', 'm3.2xlarge'],
|
9
|
-
'M4' => ['m4.large', 'm4.xlarge', 'm4.2xlarge', 'm4.4xlarge', 'm4.10xlarge']
|
9
|
+
'M4' => ['m4.large', 'm4.xlarge', 'm4.2xlarge', 'm4.4xlarge', 'm4.10xlarge', 'm4.16xlarge']
|
10
10
|
},
|
11
11
|
'PreviousGen' => {
|
12
12
|
'M1' => ['m1.small', 'm1.medium', 'm1.large', 'm1.xlarge']
|
@@ -48,8 +48,9 @@ module AwsPricing
|
|
48
48
|
}
|
49
49
|
},
|
50
50
|
'GPUInstances' => {
|
51
|
-
'CurrentGen' => {
|
52
|
-
'G2' => ['g2.2xlarge', 'g2.8xlarge']
|
51
|
+
'CurrentGen' => { # G2=GPU Graphics, P2=GPU Computes
|
52
|
+
'G2' => ['g2.2xlarge', 'g2.8xlarge'],
|
53
|
+
'P2' => ['p2.xlarge', 'p2.8xlarge', 'p2.16xlarge'],
|
53
54
|
},
|
54
55
|
'PreviousGen' => {
|
55
56
|
'CG1' => ['cg1.4xlarge']
|
@@ -173,6 +174,7 @@ module AwsPricing
|
|
173
174
|
"4xlarge" => 32,
|
174
175
|
"8xlarge" => 64,
|
175
176
|
"10xlarge" => 80,
|
177
|
+
"16xlarge" => 128,
|
176
178
|
"32xlarge" => 256
|
177
179
|
}
|
178
180
|
NF_TO_SIZE_TABLE = SIZE_TO_NF_TABLE.invert
|
@@ -52,6 +52,18 @@ class TestEc2InstanceTypes < Test::Unit::TestCase
|
|
52
52
|
assert region.instance_type_available?('x1.32xlarge') #test valid x1 available
|
53
53
|
end
|
54
54
|
|
55
|
+
def test_available_m4_16xlarge
|
56
|
+
# Validate instance types in specific regions are available
|
57
|
+
region = @@ec2_pricing.get_region('us-east')
|
58
|
+
assert region.instance_type_available?('m4.16xlarge') #test valid m4.16x available
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_available_p2_16xlarge
|
62
|
+
# Validate instance types in specific regions are available
|
63
|
+
region = @@ec2_pricing.get_region('us-east')
|
64
|
+
assert region.instance_type_available?('p2.16xlarge') #test valid p2.16x available
|
65
|
+
end
|
66
|
+
|
55
67
|
|
56
68
|
def test_fetch_all_breakeven_months
|
57
69
|
@@ec2_pricing.regions.each do |region|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-pricing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.88
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Kinsella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby library for retrieving pricing for Amazon Web Services
|
14
14
|
email:
|
@@ -19,7 +19,7 @@ extra_rdoc_files:
|
|
19
19
|
- LICENSE
|
20
20
|
- README.md
|
21
21
|
files:
|
22
|
-
-
|
22
|
+
- .gitignore
|
23
23
|
- CHANGELOG.md
|
24
24
|
- Gemfile
|
25
25
|
- Gemfile.lock
|
@@ -65,21 +65,21 @@ licenses:
|
|
65
65
|
metadata: {}
|
66
66
|
post_install_message:
|
67
67
|
rdoc_options:
|
68
|
-
-
|
68
|
+
- --title
|
69
69
|
- amazon-pricing documentation
|
70
|
-
-
|
71
|
-
-
|
70
|
+
- --line-numbers
|
71
|
+
- --main
|
72
72
|
- README.md
|
73
73
|
require_paths:
|
74
74
|
- lib
|
75
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ! '>='
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - ! '>='
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
@@ -88,4 +88,12 @@ rubygems_version: 2.4.8
|
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: Amazon Web Services Pricing Ruby gem
|
91
|
-
test_files:
|
91
|
+
test_files:
|
92
|
+
- spec/lib/amazon-pricing/definitions/database-type_spec.rb
|
93
|
+
- spec/lib/amazon-pricing/elasticache_pricing_spec.rb
|
94
|
+
- spec/lib/amazon-pricing/helpers/instance-type-spec.rb
|
95
|
+
- spec/lib/amazon-pricing/rds_pricing_spec.rb
|
96
|
+
- spec/spec_helper.rb
|
97
|
+
- spec/support/.gitignore
|
98
|
+
- test/ec2_instance_types_test.rb
|
99
|
+
- test/helper.rb
|