Conversation
The values on <https://aws.amazon.com/ec2/instance-types/?nc1=f_ls> are given in [GiB]. Let Python convert them to [MiB], as the current values are a mix of [MB] and [MiB].
The values on <https://aws.amazon.com/ec2/instance-types/?nc1=f_ls> are given in [GB]. Let Python calculate the size of multiple disks. Remove wrong factor 1000 from m3 instances.
Add vCPU information from <https://aws.amazon.com/ec2/instance-types/?nc1=f_ls>
i2 are I/O optimized, while d2 are dense optimized
t2.micro is also a "Burstable Performance General Purpose" instance type.
Add source URLs. Add unit type for RAM and disk size.
Commit b7d851f added the pricing and instance info multiple times.
There was a problem hiding this comment.
I think you missed a trailing comma here.
|
Wow, that must have been super tedious. I'm surprised Amazon doesn't provide an API for this information. It looked good to me apart from that missing comma, but I don't have a lot of context around AWS so someone else more familiar should probably review. |
contrib/scrape-ec2-prices.py changes the ordering of data/pricing.json, as it sorts the dictionary keys by string, which puts '10' before '2'. Add a function to split the dictionary keys into the numeric, alphabetic and other part and compare the first as integer, the middle by meaning, and the later as string.
Please note that the scraper stores the price as string and does not beautify the string to have exactly 3 digits in the radix part.
Remove duplicate description for NodeState.STOPPED added by commit b09c1be
|
I only slightly improved the sorting of EC2 scraper written mainly by Tomaz Muraus, which basically used the data from https://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js. That could also be used to fill in the data in <libcloud/compute/drivers/ec2.py>, but that's for another day. |
There was a problem hiding this comment.
@pmhahn Why has outscale been completely removed?
There was a problem hiding this comment.
@tonybaloney No it hasn't been removed conmpletely, only the duplicate entries: it's a JSON dictionary, where the key is unique and only the last(?) entry wins:
Warning: the following script will create the files [1-8].py in your current directory!
curl -s https://raw.githubusercontent.com/apache/libcloud/trunk/libcloud/compute/drivers/ec2.py | sed -ne '
1567,1593w 1.py
1594,1620w 2.py
1621,1647w 3.py
1648,1674w 4.py
1729,1755w 5.py
1756,1782w 6.py
1783,1809w 7.py
1810,1836w 8.py
'
diff 1.py 2.py ; diff 2.py 3.py ; diff 3.py 4.py
diff 5.py 6.py ; diff 6.py 7.py ; diff 7.py 8.py
There was a problem hiding this comment.
Yep, eu-west-2 exists up above in the elided part of the diff, line 1293.
|
Yeah, there is |
|
@tonybaloney: My reading is, that #645 is wrong, since OUTSCALE_(SAS|INC)_REGION_DETAILS is a dictionary and the keys "eu-west-2", "us-east-2" are used multiple times: @Kami: You wan't me not not update the EC2 pricing? At least adding the prices for g2.8xlarge and t2.large is required to not break the unit test. |
|
@pmhahn yep good point, i see the mistake now. |
|
LGTM |
|
Ok @pmhahn I'll close and merge this. FYI @LordShion see above. |
The EC2 Instance Type information contains some errors (especially the disk size for the m3 instances), conversion errors between GiB an M[i]B, disk count, ..
Also g2.8xlarge and t2.large are missing.