amazon-pricing 0.1.76 → 0.1.78
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 +13 -5
- data/Gemfile.lock +5 -9
- data/README.md +1 -1
- data/lib/amazon-pricing/common/ec2_common.rb +58 -2
- data/lib/amazon-pricing/definitions/ec2-instance-type.rb +142 -0
- data/lib/amazon-pricing/definitions/instance-type.rb +4 -0
- data/lib/amazon-pricing/ec2-di-price-list.rb +2 -0
- data/lib/amazon-pricing/helpers/instance-type.rb +4 -2
- data/lib/amazon-pricing/version.rb +1 -1
- data/test/ec2_instance_types_test.rb +8 -0
- metadata +17 -10
- data/lib/.DS_Store +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
NmM4Y2U2ZDE4NjQ3MjU5Y2NiYmEyMzdiNWNkZjg0Mjg5MjczMGVlNA==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
YzY5ZmU2YjZjYzU4Nzc1NTVhNDY5MWE2ZjVkYjA5YTEzNTg5NDljYw==
|
|
5
7
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
OWYwYWZhZDUzZWZjMGI1ZTE5MGRlNWZhYWFjODY1OGI0ZDBiMWFjZTZiOGE4
|
|
10
|
+
NmQyYjNhOTA1ZmExODkxOTZhNjlhZWFhZWRiMjU1N2UzOTFhMWY2ZWFjMWI0
|
|
11
|
+
ZDRmODYzZDRjMWQxZTRmYjViOGI0Yjk4NjhjN2U1NDM0OTAyNjY=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
MDhmNTRlZjkwZWNhMWIxMzNiNTAzZDRiMGY0MmNkYTEyM2NhYzM5NTkzMTRi
|
|
14
|
+
MTUzZjZlZWI5ZGQ1MWI1YjAxOTk4OWMzMDIzMWE2NWE1N2ZjMzc1ZGM4ZTI4
|
|
15
|
+
MDg0NGUwYWFkNGE0NTY0MDQwMjJiOTE0ZGI4YTUyNjRkYjgwYzk=
|
data/Gemfile.lock
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
amazon-pricing (0.1.
|
|
4
|
+
amazon-pricing (0.1.78)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
coderay (1.1.
|
|
9
|
+
coderay (1.1.1)
|
|
10
10
|
diff-lcs (1.1.3)
|
|
11
11
|
method_source (0.8.2)
|
|
12
|
-
power_assert (0.
|
|
13
|
-
|
|
14
|
-
coderay (~> 1.1.0)
|
|
15
|
-
method_source (~> 0.8.1)
|
|
16
|
-
slop (~> 3.4)
|
|
17
|
-
rake (10.4.2)
|
|
12
|
+
power_assert (0.3.0)
|
|
13
|
+
rake (11.1.2)
|
|
18
14
|
rspec (2.11.0)
|
|
19
15
|
rspec-core (~> 2.11.0)
|
|
20
16
|
rspec-expectations (~> 2.11.0)
|
|
@@ -24,7 +20,7 @@ GEM
|
|
|
24
20
|
diff-lcs (~> 1.1.3)
|
|
25
21
|
rspec-mocks (2.11.3)
|
|
26
22
|
slop (3.6.0)
|
|
27
|
-
test-unit (3.
|
|
23
|
+
test-unit (3.1.9)
|
|
28
24
|
power_assert
|
|
29
25
|
|
|
30
26
|
PLATFORMS
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Amazon Web Services Pricing Ruby Gem
|
|
2
2
|
====================================
|
|
3
3
|
|
|
4
|
-
[](https://ci.solanolabs.com/cloudhealthtech/amazon-pricing/suites/48198)
|
|
5
5
|
[](http://badge.fury.io/rb/amazon-pricing)
|
|
6
6
|
[](https://codeclimate.com/github/CloudHealth/amazon-pricing)
|
|
7
7
|
[](https://coveralls.io/r/CloudHealth/amazon-pricing?branch=master)
|
|
@@ -42,9 +42,9 @@ module AwsPricing
|
|
|
42
42
|
end
|
|
43
43
|
reg['instanceTypes'].each do |type|
|
|
44
44
|
api_name = type["type"]
|
|
45
|
-
instance_type = region
|
|
45
|
+
instance_type = ensure_existence_of_instance_type(region, region_name, api_name, operating_system, type)
|
|
46
46
|
if instance_type.nil?
|
|
47
|
-
$stderr.puts "[fetch_ec2_instance_pricing_ri_v2] WARNING: new reserved instances not found for #{api_name} in #{region_name}"
|
|
47
|
+
$stderr.puts "[fetch_ec2_instance_pricing_ri_v2] WARNING: new reserved instances not found for #{api_name} in #{region_name} using #{url}"
|
|
48
48
|
next
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -69,9 +69,65 @@ module AwsPricing
|
|
|
69
69
|
instance_type.update_pricing_new(operating_system, reservation_type, price, duration, false) unless reservation_type == :allupfront || price == "N/A"
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
72
75
|
|
|
76
|
+
# let's make sure instance_type for this region has been setup correctly
|
|
77
|
+
def ensure_existence_of_instance_type(region, region_name, api_name, operating_system, type_json)
|
|
78
|
+
# input: region
|
|
79
|
+
# region_name
|
|
80
|
+
# api_name
|
|
81
|
+
# operating_system
|
|
82
|
+
# json: ri_v2 which describes instance_type (under region)
|
|
83
|
+
instance_type = find_or_create_instance_type(region, api_name, operating_system)
|
|
84
|
+
if not instance_type.nil?
|
|
85
|
+
set_od_price_if_missing(region, region_name, api_name, operating_system, instance_type, type_json)
|
|
86
|
+
end
|
|
87
|
+
instance_type
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# see if instance_type is missing; normally fetch_ec2_instance_pricing() adds instance_type and od-pricing;
|
|
91
|
+
# but if there's AWS inconsistency, make sure we add instance_type now.
|
|
92
|
+
def find_or_create_instance_type(region, api_name, operating_system)
|
|
93
|
+
if not region.instance_type_available?(api_name, :ondemand, operating_system)
|
|
94
|
+
api_name, name = Ec2InstanceType.get_name("", #unused
|
|
95
|
+
api_name,
|
|
96
|
+
false) #!:ondemand
|
|
97
|
+
instance_type = region.add_or_update_ec2_instance_type(api_name, name)
|
|
98
|
+
elsif
|
|
99
|
+
instance_type = region.get_ec2_instance_type(api_name)
|
|
100
|
+
end
|
|
101
|
+
instance_type
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# OnDemand pricing might be missing, and it's a prerequisite for it to be there for our model.
|
|
105
|
+
# one reason it's missing, is AWS added a new instance type, and we only find it now in ri
|
|
106
|
+
def set_od_price_if_missing(region, region_name, api_name, operating_system, instance_type, type_json)
|
|
107
|
+
type_json["terms"].each do |term|
|
|
108
|
+
# handle case of ondemand pricing missing; turns out od-pricing is also in ri-pricing
|
|
109
|
+
# (assumes od pricing has been set, iff both api_name+os are available)
|
|
110
|
+
if not region.instance_type_available?(api_name, :ondemand, operating_system)
|
|
111
|
+
# nb: we actually don't each-iterate below, and ignore extraneous iterations
|
|
112
|
+
term["onDemandHourly"].each do |od_option|
|
|
113
|
+
# handle case of ondemand pricing missing from non-ri case, let's try populating it here
|
|
114
|
+
# [{purchaseOption:"ODHourly",rate:"perhr",prices:{USD:"13.338"}}],
|
|
115
|
+
if od_option["purchaseOption"] != "ODHourly" || od_option["rate"] != "perhr"
|
|
116
|
+
$stderr.puts "[set_od_price_if_missing] WARNING unexpected od_option #{od_option}"
|
|
117
|
+
end
|
|
118
|
+
price = od_option["prices"]["USD"]
|
|
119
|
+
instance_type.update_pricing_new(operating_system, :ondemand, price)
|
|
120
|
+
logger.debug "od pricing update #{api_name} price #{price} for #{region_name}/#{operating_system}"
|
|
121
|
+
# prevent iteration, since it doesn't make sense, noting it's (theoretically) possible
|
|
122
|
+
break
|
|
123
|
+
end
|
|
73
124
|
end
|
|
74
125
|
end
|
|
126
|
+
# assert if we're still missing :ondemand, we'll eventually fail in our model
|
|
127
|
+
if not region.instance_type_available?(api_name, :ondemand, operating_system)
|
|
128
|
+
raise "new reserved instances missing ondemand for #{api_name} in #{region_name}/#{operating_system}}"
|
|
129
|
+
end
|
|
75
130
|
end
|
|
131
|
+
|
|
76
132
|
end
|
|
77
133
|
end
|
|
@@ -98,6 +98,23 @@ module AwsPricing
|
|
|
98
98
|
@category_types
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
# aws does not provide any json-sourced network_capacity, so for now we provide this hardcoded lookup
|
|
102
|
+
# see https://aws.amazon.com/ec2/instance-types/, under 'Instance Types Matrix', under 'Networking Performance'
|
|
103
|
+
def self.get_network_capacity(api_name)
|
|
104
|
+
throughput = @Network_Performance[api_name]
|
|
105
|
+
if not throughput
|
|
106
|
+
logger.warn "Unknown network throughput for instance type #{api_name}"
|
|
107
|
+
end
|
|
108
|
+
throughput
|
|
109
|
+
end
|
|
110
|
+
def self.get_network_mbps(throughput)
|
|
111
|
+
network_mbps = @Network_Throughput_MBits_Per_Second[throughput]
|
|
112
|
+
if not network_mbps
|
|
113
|
+
logger.warn "Unknown network throughput for #{throughput}"
|
|
114
|
+
end
|
|
115
|
+
network_mbps
|
|
116
|
+
end
|
|
117
|
+
|
|
101
118
|
protected
|
|
102
119
|
# Returns [api_name, name]
|
|
103
120
|
def self.get_name(instance_type, api_name, is_reserved = false)
|
|
@@ -114,5 +131,130 @@ module AwsPricing
|
|
|
114
131
|
[api_name, name]
|
|
115
132
|
end
|
|
116
133
|
|
|
134
|
+
# throughput values for performance ratings
|
|
135
|
+
# Amazon informally tells customers that they translate as follows:
|
|
136
|
+
# Low = 100 Mbps
|
|
137
|
+
# Medium = 500 Mbps
|
|
138
|
+
# High = 1 Gbps
|
|
139
|
+
# 10Gig = 10 Gbps (obviously)
|
|
140
|
+
@Network_Throughput_MBits_Per_Second = {
|
|
141
|
+
:very_low => 50,
|
|
142
|
+
:low => 100,
|
|
143
|
+
:low_to_moderate => 250,
|
|
144
|
+
:moderate => 500,
|
|
145
|
+
:high => 1000,
|
|
146
|
+
:ten_gigabit => 10000
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@Network_Performance = {
|
|
150
|
+
'c1.medium' => :moderate,
|
|
151
|
+
'c1.xlarge' => :high,
|
|
152
|
+
'c3.2xlarge' => :high,
|
|
153
|
+
'c3.4xlarge' => :high,
|
|
154
|
+
'c3.8xlarge' => :ten_gigabit,
|
|
155
|
+
'c3.large' => :moderate,
|
|
156
|
+
'c3.xlarge' => :moderate,
|
|
157
|
+
'c4.2xlarge' => :high,
|
|
158
|
+
'c4.4xlarge' => :high,
|
|
159
|
+
'c4.8xlarge' => :ten_gigabit,
|
|
160
|
+
'c4.large' => :moderate,
|
|
161
|
+
'c4.xlarge' => :high,
|
|
162
|
+
'cache.c1.xlarge' => :high,
|
|
163
|
+
'cache.m1.large' => :moderate,
|
|
164
|
+
'cache.m1.medium' => :moderate,
|
|
165
|
+
'cache.m1.small' => :low,
|
|
166
|
+
'cache.m1.xlarge' => :high,
|
|
167
|
+
'cache.m2.2xlarge' => :moderate,
|
|
168
|
+
'cache.m2.4xlarge' => :high,
|
|
169
|
+
'cache.m2.xlarge' => :moderate,
|
|
170
|
+
'cache.m3.2xlarge' => :high,
|
|
171
|
+
'cache.m3.large' => :moderate,
|
|
172
|
+
'cache.m3.medium' => :moderate,
|
|
173
|
+
'cache.m3.xlarge' => :high,
|
|
174
|
+
'cache.r3.2xlarge' => :high,
|
|
175
|
+
'cache.r3.4xlarge' => :high,
|
|
176
|
+
'cache.r3.8xlarge' => :ten_gigabit,
|
|
177
|
+
'cache.r3.large' => :moderate,
|
|
178
|
+
'cache.r3.xlarge' => :moderate,
|
|
179
|
+
'cache.x1.32xlarge' => :ten_gigabit,
|
|
180
|
+
'cache.t1.micro' => :very_low,
|
|
181
|
+
'cache.t2.medium' => :low_to_moderate,
|
|
182
|
+
'cache.t2.micro' => :low_to_moderate,
|
|
183
|
+
'cache.t2.small' => :low_to_moderate,
|
|
184
|
+
'cc1.4xlarge' => :ten_gigabit,
|
|
185
|
+
'cc2.8xlarge' => :ten_gigabit,
|
|
186
|
+
'cg1.4xlarge' => :ten_gigabit,
|
|
187
|
+
'cr1.8xlarge' => :ten_gigabit,
|
|
188
|
+
'd2.2xlarge' => :high,
|
|
189
|
+
'd2.4xlarge' => :high,
|
|
190
|
+
'd2.8xlarge' => :ten_gigabit,
|
|
191
|
+
'd2.xlarge' => :moderate,
|
|
192
|
+
'db.cr1.8xlarge' => :ten_gigabit,
|
|
193
|
+
'db.m1.large' => :moderate,
|
|
194
|
+
'db.m1.medium' => :moderate,
|
|
195
|
+
'db.m1.small' => :low,
|
|
196
|
+
'db.m1.xlarge' => :high,
|
|
197
|
+
'db.m2.2xlarge' => :moderate,
|
|
198
|
+
'db.m2.4xlarge' => :high,
|
|
199
|
+
'db.m2.xlarge' => :moderate,
|
|
200
|
+
'db.m3.2xlarge' => :high,
|
|
201
|
+
'db.m3.large' => :moderate,
|
|
202
|
+
'db.m3.medium' => :moderate,
|
|
203
|
+
'db.m3.xlarge' => :high,
|
|
204
|
+
'db.m4.10xlarge' => :ten_gigabit,
|
|
205
|
+
'db.m4.2xlarge' => :high,
|
|
206
|
+
'db.m4.4xlarge' => :high,
|
|
207
|
+
'db.m4.large' => :moderate,
|
|
208
|
+
'db.m4.xlarge' => :high,
|
|
209
|
+
'db.r3.2xlarge' => :high,
|
|
210
|
+
'db.r3.4xlarge' => :high,
|
|
211
|
+
'db.r3.8xlarge' => :ten_gigabit,
|
|
212
|
+
'db.r3.large' => :moderate,
|
|
213
|
+
'db.r3.xlarge' => :moderate,
|
|
214
|
+
'db.t1.micro' => :very_low,
|
|
215
|
+
'db.t2.large' => :low_to_moderate,
|
|
216
|
+
'db.t2.medium' => :low_to_moderate,
|
|
217
|
+
'db.t2.micro' => :low,
|
|
218
|
+
'db.t2.small' => :low_to_moderate,
|
|
219
|
+
'db.x1.32xlarge' => :ten_gigabit,
|
|
220
|
+
'g2.2xlarge' => :high,
|
|
221
|
+
'g2.8xlarge' => :ten_gigabit,
|
|
222
|
+
'hi1.4xlarge' => :ten_gigabit,
|
|
223
|
+
'hs1.8xlarge' => :ten_gigabit,
|
|
224
|
+
'i2.2xlarge' => :high,
|
|
225
|
+
'i2.4xlarge' => :high,
|
|
226
|
+
'i2.8xlarge' => :ten_gigabit,
|
|
227
|
+
'i2.xlarge' => :moderate,
|
|
228
|
+
'm1.large' => :moderate,
|
|
229
|
+
'm1.medium' => :moderate,
|
|
230
|
+
'm1.small' => :low,
|
|
231
|
+
'm1.xlarge' => :high,
|
|
232
|
+
'm2.2xlarge' => :moderate,
|
|
233
|
+
'm2.4xlarge' => :high,
|
|
234
|
+
'm2.xlarge' => :moderate,
|
|
235
|
+
'm3.2xlarge' => :high,
|
|
236
|
+
'm3.large' => :moderate,
|
|
237
|
+
'm3.medium' => :moderate,
|
|
238
|
+
'm3.xlarge' => :high,
|
|
239
|
+
'm4.10xlarge' => :ten_gigabit,
|
|
240
|
+
'm4.2xlarge' => :high,
|
|
241
|
+
'm4.4xlarge' => :high,
|
|
242
|
+
'm4.large' => :moderate,
|
|
243
|
+
'm4.xlarge' => :high,
|
|
244
|
+
'r3.2xlarge' => :high,
|
|
245
|
+
'r3.4xlarge' => :high,
|
|
246
|
+
'r3.8xlarge' => :ten_gigabit,
|
|
247
|
+
'r3.large' => :moderate,
|
|
248
|
+
'r3.xlarge' => :moderate,
|
|
249
|
+
't1.micro' => :very_low,
|
|
250
|
+
't2.large' => :low_to_moderate,
|
|
251
|
+
't2.medium' => :low_to_moderate,
|
|
252
|
+
't2.micro' => :low_to_moderate,
|
|
253
|
+
't2.nano' => :low,
|
|
254
|
+
't2.small' => :low_to_moderate,
|
|
255
|
+
'x1.32xlarge' => :ten_gigabit,
|
|
256
|
+
}
|
|
257
|
+
|
|
117
258
|
end
|
|
259
|
+
|
|
118
260
|
end
|
|
@@ -181,6 +181,7 @@ module AwsPricing
|
|
|
181
181
|
'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',
|
|
182
182
|
't2.nano' => 'Burstable Performance Instance Nano', 't2.micro' => 'Burstable Performance Instance Micro', 't2.small' => 'Burstable Performance Instance Small', 't2.medium' => 'Burstable Performance Instance Medium', 't2.large' => 'Burstable Performance Instance Large',
|
|
183
183
|
'c4.large' => 'Compute Optimized Large', 'c4.xlarge' => 'Compute Optimized Extra Large', 'c4.2xlarge' => 'Compute Optimized Double Extra Large', 'c4.4xlarge' => 'Compute Optimized Quadruple Extra Large', 'c4.8xlarge' => 'Compute Optimized Eight Extra Large',
|
|
184
|
+
'x1.32xlarge' => 'Memory Optimized Large-scale Enterprise-class',
|
|
184
185
|
}
|
|
185
186
|
@@Disk_Lookup = {
|
|
186
187
|
'm1.small' => 160, 'm1.medium' => 410, 'm1.large' =>850, 'm1.xlarge' => 1690,
|
|
@@ -204,6 +205,7 @@ module AwsPricing
|
|
|
204
205
|
'r3.large' => 32, 'r3.xlarge' => 80, 'r3.2xlarge' => 160, 'r3.4xlarge' => 320, 'r3.8xlarge' => 640,
|
|
205
206
|
't2.nano' => 0, 't2.micro' => 0, 't2.small' => 0, 't2.medium' => 0, 't2.large' => 0,
|
|
206
207
|
'c4.large' => 0, 'c4.xlarge' => 0, 'c4.2xlarge' => 0, 'c4.4xlarge' => 0, 'c4.8xlarge' => 0,
|
|
208
|
+
'x1.32xlarge' => 3840,
|
|
207
209
|
}
|
|
208
210
|
@@Platform_Lookup = {
|
|
209
211
|
'm1.small' => 32, 'm1.medium' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
|
|
@@ -227,6 +229,7 @@ module AwsPricing
|
|
|
227
229
|
'r3.large' => 64, 'r3.xlarge' => 64, 'r3.2xlarge' => 64, 'r3.4xlarge' => 64, 'r3.8xlarge' => 64,
|
|
228
230
|
't2.nano' => 64, 't2.micro' => 64, 't2.small' => 64, 't2.medium' => 64, 't2.large' => 64,
|
|
229
231
|
'c4.large' => 64, 'c4.xlarge' => 64, 'c4.2xlarge' => 64, 'c4.4xlarge' => 64, 'c4.8xlarge' => 64,
|
|
232
|
+
'x1.32xlarge' => 64,
|
|
230
233
|
}
|
|
231
234
|
@@Disk_Type_Lookup = {
|
|
232
235
|
'm1.small' => :ephemeral, 'm1.medium' => :ephemeral, 'm1.large' => :ephemeral, 'm1.xlarge' => :ephemeral,
|
|
@@ -251,6 +254,7 @@ module AwsPricing
|
|
|
251
254
|
'r3.large' => :ssd, 'r3.xlarge' => :ssd, 'r3.2xlarge' => :ssd, 'r3.4xlarge' => :ssd, 'r3.8xlarge' => :ssd,
|
|
252
255
|
't2.nano' => :ebs, 't2.micro' => :ebs, 't2.small' => :ebs, 't2.medium' => :ebs, 't2.large' => :ebs,
|
|
253
256
|
'c4.large' => :ebs, 'c4.xlarge' => :ebs, 'c4.2xlarge' => :ebs, 'c4.4xlarge' => :ebs, 'c4.8xlarge' => :ebs,
|
|
257
|
+
'x1.32xlarge' => :ssd,
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
# NOTE: These are populated by "populate_lookups"
|
|
@@ -6,6 +6,8 @@ module AwsPricing
|
|
|
6
6
|
super
|
|
7
7
|
InstanceType.populate_lookups
|
|
8
8
|
get_ec2_di_od_pricing
|
|
9
|
+
# assumption is above/di_od populates all InstanceType's, but it missing entries e.g. x1.32xlarge;
|
|
10
|
+
# the fix is we now allow fetch_ec2_instance_pricing_ri_v2 to add instance_types
|
|
9
11
|
get_ec2_reserved_di_pricing
|
|
10
12
|
end
|
|
11
13
|
|
|
@@ -29,7 +29,8 @@ module AwsPricing
|
|
|
29
29
|
},
|
|
30
30
|
'MemoryOptimized' => {
|
|
31
31
|
'CurrentGen' => {
|
|
32
|
-
'R3' => ['r3.large', 'r3.xlarge', 'r3.2xlarge', 'r3.4xlarge', 'r3.8xlarge']
|
|
32
|
+
'R3' => ['r3.large', 'r3.xlarge', 'r3.2xlarge', 'r3.4xlarge', 'r3.8xlarge'],
|
|
33
|
+
'X1' => ['x1.32xlarge']
|
|
33
34
|
},
|
|
34
35
|
'PreviousGen' => {
|
|
35
36
|
'M2' => ['m2.xlarge', 'm2.2xlarge', 'm2.4xlarge'],
|
|
@@ -171,7 +172,8 @@ module AwsPricing
|
|
|
171
172
|
"2xlarge" => 16,
|
|
172
173
|
"4xlarge" => 32,
|
|
173
174
|
"8xlarge" => 64,
|
|
174
|
-
"10xlarge" => 80
|
|
175
|
+
"10xlarge" => 80,
|
|
176
|
+
"32xlarge" => 256
|
|
175
177
|
}
|
|
176
178
|
NF_TO_SIZE_TABLE = SIZE_TO_NF_TABLE.invert
|
|
177
179
|
|
|
@@ -45,6 +45,14 @@ class TestEc2InstanceTypes < Test::Unit::TestCase
|
|
|
45
45
|
assert region.instance_type_available?('m3.large')
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
def test_available_x1
|
|
49
|
+
# Validate instance types in specific regions are available
|
|
50
|
+
region = @@ec2_pricing.get_region('us-east')
|
|
51
|
+
assert !region.instance_type_available?('x1.99xlarge') #bogus x1
|
|
52
|
+
assert region.instance_type_available?('x1.32xlarge') #test valid x1 available
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
|
|
48
56
|
def test_fetch_all_breakeven_months
|
|
49
57
|
@@ec2_pricing.regions.each do |region|
|
|
50
58
|
region.ec2_instance_types.each do |instance|
|
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.78
|
|
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-06-08 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
|
|
@@ -31,7 +31,6 @@ files:
|
|
|
31
31
|
- archive/ec2-2014-05-22.csv
|
|
32
32
|
- archive/rds-2014-03-18.csv
|
|
33
33
|
- archive/rds-2014-05-22.csv
|
|
34
|
-
- lib/.DS_Store
|
|
35
34
|
- lib/amazon-pricing.rb
|
|
36
35
|
- lib/amazon-pricing/aws-price-list.rb
|
|
37
36
|
- lib/amazon-pricing/common/ec2_common.rb
|
|
@@ -65,21 +64,21 @@ licenses:
|
|
|
65
64
|
metadata: {}
|
|
66
65
|
post_install_message:
|
|
67
66
|
rdoc_options:
|
|
68
|
-
-
|
|
67
|
+
- --title
|
|
69
68
|
- amazon-pricing documentation
|
|
70
|
-
-
|
|
71
|
-
-
|
|
69
|
+
- --line-numbers
|
|
70
|
+
- --main
|
|
72
71
|
- README.md
|
|
73
72
|
require_paths:
|
|
74
73
|
- lib
|
|
75
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
75
|
requirements:
|
|
77
|
-
- -
|
|
76
|
+
- - ! '>='
|
|
78
77
|
- !ruby/object:Gem::Version
|
|
79
78
|
version: '0'
|
|
80
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
80
|
requirements:
|
|
82
|
-
- -
|
|
81
|
+
- - ! '>='
|
|
83
82
|
- !ruby/object:Gem::Version
|
|
84
83
|
version: '0'
|
|
85
84
|
requirements: []
|
|
@@ -88,4 +87,12 @@ rubygems_version: 2.4.8
|
|
|
88
87
|
signing_key:
|
|
89
88
|
specification_version: 4
|
|
90
89
|
summary: Amazon Web Services Pricing Ruby gem
|
|
91
|
-
test_files:
|
|
90
|
+
test_files:
|
|
91
|
+
- spec/lib/amazon-pricing/definitions/database-type_spec.rb
|
|
92
|
+
- spec/lib/amazon-pricing/elasticache_pricing_spec.rb
|
|
93
|
+
- spec/lib/amazon-pricing/rds_pricing_spec.rb
|
|
94
|
+
- spec/spec_helper.rb
|
|
95
|
+
- spec/support/.gitignore
|
|
96
|
+
- test/ec2_instance_types_test.rb
|
|
97
|
+
- test/helper.rb
|
|
98
|
+
has_rdoc:
|
data/lib/.DS_Store
DELETED
|
Binary file
|