update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[osm/SO.git] / rwcal / plugins / vala / rwcal_aws / rift / rwcal / aws / aws_table.py
1 #!/usr/bin/python
2
3 #
4 # Copyright 2016 RIFT.IO Inc
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18
19
20 """
21 Sizes must be hardcoded, because Amazon doesn't provide an API to fetch them.
22 From http://aws.amazon.com/ec2/instance-types/
23 max_inst From http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2
24 paravirt from https://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
25 """
26 INSTANCE_TYPES = {
27 'm4.large': {
28 'id': 'm4.large',
29 'name': 'Large Instance',
30 'ram': 8*1024,
31 'vcpu': 2,
32 'disk': 0,
33 'bandwidth': None,
34 'max_inst': 20,
35 'sriov': True,
36 'paravirt': False
37 },
38 'm4.xlarge': {
39 'id': 'm4.xlarge',
40 'name': 'Large Instance',
41 'ram': 16*1024,
42 'vcpu': 4,
43 'disk': 0,
44 'bandwidth': None,
45 'max_inst': 20,
46 'sriov': True,
47 'paravirt': False
48 },
49 'm4.2xlarge': {
50 'id': 'm4.2xlarge',
51 'name': 'Large Instance',
52 'ram': 32*1024,
53 'vcpu': 8,
54 'disk': 0,
55 'bandwidth': None,
56 'max_inst': 20,
57 'sriov': True,
58 'paravirt': False
59 },
60 'm4.4xlarge': {
61 'id': 'm4.4xlarge',
62 'name': 'Large Instance',
63 'ram': 64*1024,
64 'vcpu': 16,
65 'disk': 0,
66 'bandwidth': None,
67 'max_inst': 10,
68 'sriov': True,
69 'paravirt': False
70 },
71 'm4.10xlarge': {
72 'id': 'm4.10xlarge',
73 'name': 'Large Instance',
74 'ram': 160*1024,
75 'vcpu': 40,
76 'disk': 0,
77 'bandwidth': None,
78 'max_inst': 5,
79 'sriov': True,
80 'paravirt': False
81 },
82 'm3.medium': {
83 'id': 'm3.medium',
84 'name': 'Medium Instance',
85 'ram': 3.75*1024, #3840
86 'vcpu': 1,
87 'disk': 4,
88 'bandwidth': None,
89 'max_inst': 20,
90 'sriov': False,
91 'paravirt': True
92 },
93 'm3.large': {
94 'id': 'm3.large',
95 'name': 'Large Instance',
96 'ram': 7.5*1024, #7168
97 'vcpu': 2,
98 'disk': 32,
99 'bandwidth': None,
100 'max_inst': 20,
101 'sriov': False,
102 'paravirt': True
103 },
104 'm3.xlarge': {
105 'id': 'm3.xlarge',
106 'name': 'Extra Large Instance',
107 'ram': 15*1024,#15360
108 'vcpu': 4,
109 'disk': 80,
110 'bandwidth': None,
111 'max_inst': 20,
112 'sriov': False,
113 'paravirt': True
114 },
115 'm3.2xlarge': {
116 'id': 'm3.2xlarge',
117 'name': 'Double Extra Large Instance',
118 'ram': 30*1024, #30720
119 'vcpu': 8,
120 'disk': 160,
121 'bandwidth': None,
122 'max_inst': 20,
123 'sriov': False,
124 'paravirt': True
125 },
126 'g2.2xlarge': {
127 'id': 'g2.2xlarge',
128 'name': 'Cluster GPU G2 Double Extra Large Instance',
129 'ram': 15000,
130 'disk': 60,
131 'vcpu': 5,
132 'bandwidth': None,
133 'max_inst': 20,
134 'sriov': False,
135 'paravirt': False
136 },
137 'g2.8xlarge': {
138 'id': 'g2.8xlarge',
139 'name': 'Cluster GPU G2 Double Extra Large Instance',
140 'ram': 60000,
141 'disk': 240,
142 'vcpu': 2,
143 'bandwidth': None,
144 'max_inst': 20,
145 'sriov': False,
146 'paravirt': False
147 },
148 # c4 instances have 2 SSDs of the specified disk size
149 'c4.large': {
150 'id': 'c4.large',
151 'name': 'Compute Optimized Large Instance',
152 'ram': 3750,
153 'vcpu':2,
154 'disk': 0, #EBS-only
155 'bandwidth': None,
156 'max_inst': 20,
157 'sriov': True,
158 'paravirt': False
159 },
160 'c4.xlarge': {
161 'id': 'c4.xlarge',
162 'name': 'Compute Optimized Extra Large Instance',
163 'ram': 7500,
164 'vcpu':4,
165 'disk': 0, #EBS-only
166 'bandwidth': None,
167 'max_inst': 20,
168 'sriov': True,
169 'paravirt': False
170 },
171 'c4.2xlarge': {
172 'id': 'c4.2xlarge',
173 'name': 'Compute Optimized Double Extra Large Instance',
174 'ram': 15000,
175 'vcpu':8,
176 'disk': 0, #EBS-only
177 'bandwidth': None,
178 'max_inst': 20,
179 'sriov': True,
180 'paravirt': False
181 },
182 'c4.4xlarge': {
183 'id': 'c4.4xlarge',
184 'name': 'Compute Optimized Quadruple Extra Large Instance',
185 'ram': 30000,
186 'vcpu':16,
187 'disk': 0, #EBS-only
188 'bandwidth': None,
189 'max_inst': 10,
190 'sriov': True,
191 'paravirt': False
192 },
193 'c4.8xlarge': {
194 'id': 'c4.8xlarge',
195 'name': 'Compute Optimized Eight Extra Large Instance',
196 'ram': 60000,
197 'vcpu':36,
198 'disk': 0, #EBS-only
199 'bandwidth': None,
200 'max_inst': 5,
201 'sriov': True,
202 'paravirt': False
203 },
204 # c3 instances have 2 SSDs of the specified disk size
205 'c3.large': {
206 'id': 'c3.large',
207 'name': 'Compute Optimized Large Instance',
208 'ram': 3750,
209 'vcpu':2,
210 'disk': 32, # x2
211 'bandwidth': None,
212 'max_inst': 20,
213 'sriov': True,
214 'paravirt': True
215 },
216 'c3.xlarge': {
217 'id': 'c3.xlarge',
218 'name': 'Compute Optimized Extra Large Instance',
219 'ram': 7500,
220 'vcpu':4,
221 'disk': 80, # x2
222 'bandwidth': None,
223 'max_inst': 20,
224 'sriov': True,
225 'paravirt': True
226 },
227 'c3.2xlarge': {
228 'id': 'c3.2xlarge',
229 'name': 'Compute Optimized Double Extra Large Instance',
230 'ram': 15000,
231 'vcpu':8,
232 'disk': 160, # x2
233 'bandwidth': None,
234 'max_inst': 20,
235 'sriov': True,
236 'paravirt': True
237 },
238 'c3.4xlarge': {
239 'id': 'c3.4xlarge',
240 'name': 'Compute Optimized Quadruple Extra Large Instance',
241 'ram': 30000,
242 'vcpu':16,
243 'disk': 320, # x2
244 'bandwidth': None,
245 'max_inst': 20,
246 'sriov': True,
247 'paravirt': True
248 },
249 'c3.8xlarge': {
250 'id': 'c3.8xlarge',
251 'name': 'Compute Optimized Eight Extra Large Instance',
252 'ram': 60000,
253 'vcpu':32,
254 'disk': 640, # x2
255 'bandwidth': None,
256 'max_inst': 20,
257 'sriov': True,
258 'paravirt': True
259 },
260 # i2 instances have up to eight SSD drives
261 'i2.xlarge': {
262 'id': 'i2.xlarge',
263 'name': 'High Storage Optimized Extra Large Instance',
264 'ram': 31232,
265 'vcpu': 4,
266 'disk': 800,
267 'bandwidth': None,
268 'max_inst': 8,
269 'sriov': True,
270 'paravirt': False
271 },
272 'i2.2xlarge': {
273 'id': 'i2.2xlarge',
274 'name': 'High Storage Optimized Double Extra Large Instance',
275 'ram': 62464,
276 'vcpu': 8,
277 'disk': 1600,
278 'bandwidth': None,
279 'max_inst': 8,
280 'sriov': True,
281 'paravirt': False
282 },
283 'i2.4xlarge': {
284 'id': 'i2.4xlarge',
285 'name': 'High Storage Optimized Quadruple Large Instance',
286 'ram': 124928,
287 'vcpu': 16,
288 'disk': 3200,
289 'bandwidth': None,
290 'max_inst': 4,
291 'sriov': True,
292 'paravirt': False
293 },
294 'i2.8xlarge': {
295 'id': 'i2.8xlarge',
296 'name': 'High Storage Optimized Eight Extra Large Instance',
297 'ram': 249856,
298 'vcpu': 32,
299 'disk': 6400,
300 'bandwidth': None,
301 'max_inst': 2,
302 'sriov': True,
303 'paravirt': False
304 },
305 'd2.xlarge': {
306 'id': 'd2.xlarge',
307 'name': 'High Storage Optimized Extra Large Instance',
308 'ram': 30050,
309 'vcpu': 4,
310 'disk': 6000, # 3 x 2 TB
311 'max_inst': 20,
312 'bandwidth': None,
313 'sriov': True,
314 'paravirt': False
315 },
316 'd2.2xlarge': {
317 'id': 'd2.2xlarge',
318 'name': 'High Storage Optimized Double Extra Large Instance',
319 'ram': 61952,
320 'vcpu': 8,
321 'disk': 12000, # 6 x 2 TB
322 'bandwidth': None,
323 'max_inst': 20,
324 'sriov': True,
325 'paravirt': False
326 },
327 'd2.4xlarge': {
328 'id': 'd2.4xlarge',
329 'name': 'High Storage Optimized Quadruple Extra Large Instance',
330 'ram': 122000,
331 'vcpu': 16,
332 'disk': 24000, # 12 x 2 TB
333 'bandwidth': None,
334 'max_inst': 10,
335 'sriov': True,
336 'paravirt': False
337 },
338 'd2.8xlarge': {
339 'id': 'd2.8xlarge',
340 'name': 'High Storage Optimized Eight Extra Large Instance',
341 'ram': 244000,
342 'vcpu': 36,
343 'disk': 48000, # 24 x 2 TB
344 'bandwidth': None,
345 'max_inst': 5,
346 'sriov': True,
347 'paravirt': False
348 },
349 # 1x SSD
350 'r3.large': {
351 'id': 'r3.large',
352 'name': 'Memory Optimized Large instance',
353 'ram': 15000,
354 'vcpu': 2,
355 'disk': 32,
356 'bandwidth': None,
357 'max_inst': 20,
358 'sriov': True,
359 'paravirt': False
360 },
361 'r3.xlarge': {
362 'id': 'r3.xlarge',
363 'name': 'Memory Optimized Extra Large instance',
364 'ram': 30500,
365 'vcpu': 4,
366 'disk': 80,
367 'bandwidth': None,
368 'max_inst': 20,
369 'sriov': True,
370 'paravirt': False
371 },
372 'r3.2xlarge': {
373 'id': 'r3.2xlarge',
374 'name': 'Memory Optimized Double Extra Large instance',
375 'ram': 61000,
376 'vcpu': 8,
377 'disk': 160,
378 'bandwidth': None,
379 'max_inst': 20,
380 'sriov': True,
381 'paravirt': False
382 },
383 'r3.4xlarge': {
384 'id': 'r3.4xlarge',
385 'name': 'Memory Optimized Quadruple Extra Large instance',
386 'ram': 122000,
387 'vcpu': 16,
388 'disk': 320,
389 'bandwidth': None,
390 'max_inst': 10,
391 'sriov': True,
392 'paravirt': False
393 },
394 'r3.8xlarge': {
395 'id': 'r3.8xlarge',
396 'name': 'Memory Optimized Eight Extra Large instance',
397 'ram': 244000,
398 'vcpu': 32,
399 'disk': 320, # x2
400 'bandwidth': None,
401 'max_inst': 5,
402 'sriov': True,
403 'paravirt': False
404 },
405 't2.micro': {
406 'id': 't2.micro',
407 'name': 'Burstable Performance Micro Instance',
408 'ram': 1024,
409 'disk': 0, # EBS Only
410 'vcpu': 1,
411 'bandwidth': None,
412 'max_inst': 20,
413 'sriov': False,
414 'paravirt': False,
415 'extra': {
416 'cpu': 6
417 }
418 },
419 # Burstable Performance General Purpose
420 't2.small': {
421 'id': 't2.small',
422 'name': 'Burstable Performance Small Instance',
423 'ram': 2048,
424 'vcpu': 1,
425 'disk': 0, # EBS Only
426 'bandwidth': None,
427 'max_inst': 20,
428 'sriov': False,
429 'paravirt': False,
430 'extra': {
431 'cpu': 12
432 }
433 },
434 't2.medium': {
435 'id': 't2.medium',
436 'name': 'Burstable Performance Medium Instance',
437 'ram': 4096,
438 'disk': 0, # EBS Only
439 'vcpu': 2,
440 'bandwidth': None,
441 'max_inst': 20,
442 'sriov': False,
443 'paravirt': False,
444 'extra': {
445 'cpu': 24
446 }
447 },
448 't2.large': {
449 'id': 't2.large',
450 'name': 'Burstable Performance Large Instance',
451 'ram': 8192,
452 'disk': 0, # EBS Only
453 'vcpu': 2,
454 'bandwidth': None,
455 'max_inst': 20,
456 'sriov': False,
457 'paravirt': False,
458 'extra': {
459 'cpu': 36
460 }
461 }
462 }
463