GitHub PullRequestReviewCommentEvent at 2014-01-19 19:15:23
Repository: AWS-Reserved-Instances-Optimizer
Actor: manos
Payload: {"comment":{"url":"https://api.github.com/repos/manos/AWS-Reserved-Instances-Optimizer/pulls/comments/8993502","id":8993502,"diff_hunk":"@@ -57,89 +61,66 @@\n logging.basicConfig(stream=sys.stdout, level=log_level)\n logging.basicConfig(stream=sys.stderr, level=(logging.ERROR, logging.CRITICAL))\n \n-rates = {'us-east-1': {'m1.small': {'hourly': .06, 'hu-1y': (169, .014)},\n-                       'm1.medium': {'hourly': .12, 'hu-1y': (338, .028)},\n-                       'm1.large': {'hourly': .24, 'hu-1y': (676, .056)},\n-                       'm1.xlarge': {'hourly': .48, 'hu-1y': (1352, .112)},\n-                       'm3.xlarge': {'hourly': .50, 'hu-1y': (1489, .123)},\n-                       'm3.2xlarge': {'hourly': 1.00, 'hu-1y': (2978, .246)},\n-                       't1.micro': {'hourly': .02, 'hu-1y': (62, .005)},\n-                       'm2.xlarge': {'hourly': .41, 'hu-1y': (789, .068)},\n-                       'm2.2xlarge': {'hourly': .82, 'hu-1y': (1578, .136)},\n-                       'm2.4xlarge': {'hourly': 1.64, 'hu-1y': (3156, .272)},\n-                       'c1.medium': {'hourly': .145, 'hu-1y': (450, .036)},\n-                       'c1.xlarge': {'hourly': .58, 'hu-1y': (1800, .144)},\n-                       'cc1.4xlarge': {'hourly': 1.30, 'hu-1y': (4060, .297)},\n-                       'cc2.8xlarge': {'hourly': 2.40, 'hu-1y': (5000, .361)},\n-                       'cr1.8xlarge': {'hourly': 3.50, 'hu-1y': (7220, .62)},\n-                       'hi1.4xlarge': {'hourly': 3.10, 'hu-1y': (7280, .621)},\n-                       'hs1.8xlarge': {'hourly': 4.60, 'hu-1y': (11213, .92)},\n-                       },\n-         'us-west-2': {'m1.small': {'hourly': .06, 'hu-1y': (169, .014)},\n-                       'm1.medium': {'hourly': .12, 'hu-1y': (338, .028)},\n-                       'm1.large': {'hourly': .24, 'hu-1y': (676, .056)},\n-                       'm1.xlarge': {'hourly': .48, 'hu-1y': (1352, .112)},\n-                       'm3.xlarge': {'hourly': .50, 'hu-1y': (1489, .123)},\n-                       'm3.2xlarge': {'hourly': 1.00, 'hu-1y': (2978, .256)},\n-                       't1.micro': {'hourly': .02, 'hu-1y': (62, .005)},\n-                       'm2.xlarge': {'hourly': .41, 'hu-1y': (789, .068)},\n-                       'm2.2xlarge': {'hourly': .82, 'hu-1y': (1578, .136)},\n-                       'm2.4xlarge': {'hourly': 1.64, 'hu-1y': (3156, .272)},\n-                       'c1.medium': {'hourly': .145, 'hu-1y': (450, .036)},\n-                       'c1.xlarge': {'hourly': .58, 'hu-1y': (1800, .144)},\n-                       'cr1.8xlarge': {'hourly': 3.50, 'hu-1y': (7220, .62)},\n-                       'hi1.4xlarge': {'hourly': 3.10, 'hu-1y': (7280, .621)},\n-                       'hs1.8xlarge': {'hourly': 4.60, 'hu-1y': (11213, .92)},\n-                       },\n-         'us-west-1': {'m1.small': {'hourly': .065, 'hu-1y': (169, .022)},\n-                       'm1.medium': {'hourly': .13, 'hu-1y': (338, .044)},\n-                       'm1.large': {'hourly': .26, 'hu-1y': (676, .87)},\n-                       'm1.xlarge': {'hourly': .52, 'hu-1y': (1352, .174)},\n-                       'm3.xlarge': {'hourly': .55, 'hu-1y': (1489, .191)},\n-                       'm3.2xlarge': {'hourly': 1.10, 'hu-1y': (2978, .382)},\n-                       't1.micro': {'hourly': .025, 'hu-1y': (62, .008)},\n-                       'm2.xlarge': {'hourly': .46, 'hu-1y': (789, .102)},\n-                       'm2.2xlarge': {'hourly': .92, 'hu-1y': (1578, .204)},\n-                       'm2.4xlarge': {'hourly': 1.84, 'hu-1y': (3156, .408)},\n-                       'c1.medium': {'hourly': .165, 'hu-1y': (450, .057)},\n-                       'c1.xlarge': {'hourly': .66, 'hu-1y': (1800, .228)},\n-                       },\n-         'eu-west-1': {'m1.small': {'hourly': .065, 'hu-1y': (169, .022)},\n-                       'm1.medium': {'hourly': .13, 'hu-1y': (338, .044)},\n-                       'm1.large': {'hourly': .26, 'hu-1y': (676, .87)},\n-                       'm1.xlarge': {'hourly': .52, 'hu-1y': (1352, .174)},\n-                       'm3.xlarge': {'hourly': .55, 'hu-1y': (1489, .189)},\n-                       'm3.2xlarge': {'hourly': 1.10, 'hu-1y': (2978, .378)},\n-                       't1.micro': {'hourly': .02, 'hu-1y': (62, .008)},\n-                       'm2.xlarge': {'hourly': .46, 'hu-1y': (789, .102)},\n-                       'm2.2xlarge': {'hourly': .92, 'hu-1y': (1578, .204)},\n-                       'm2.4xlarge': {'hourly': 1.84, 'hu-1y': (3156, .408)},\n-                       'c1.medium': {'hourly': .165, 'hu-1y': (450, .057)},\n-                       'c1.xlarge': {'hourly': .66, 'hu-1y': (1800, .228)},\n-                       'cc2.8xlarge': {'hourly': 2.70, 'hu-1y': (5000, .61)},\n-                       'hi1.4xlarge': {'hourly': 3.41, 'hu-1y': (7280, .931)},\n-                       },\n-         }\n-\n+# Download the API Data file if it doesn't exist already\n+if not os.path.isfile(options.json):\n+    # Pull down price file\n+    logging.info(\"Downloading price file to %s\" % options.json)\n+    pricefile = urllib2.urlopen('http://www.cloudomix.com/json/ec2.json')","path":"rize.py","position":90,"original_position":90,"commit_id":"ac67d1eeb4d66eb467609d795d60c0d67f2dc336","original_commit_id":"ac67d1eeb4d66eb467609d795d60c0d67f2dc336","user":{"login":"manos","id":132518,"avatar_url":"https://gravatar.com/avatar/c823de40d8f11b6e6149551a7676ffff?d=https%3A%2F%2Fidenticons.github.com%2Face492111e44aabe42e9f52bbb4a325a.png&r=x","gravatar_id":"c823de40d8f11b6e6149551a7676ffff","url":"https://api.github.com/users/manos","html_url":"https://github.com/manos","followers_url":"https://api.github.com/users/manos/followers","following_url":"https://api.github.com/users/manos/following{/other_user}","gists_url":"https://api.github.com/users/manos/gists{/gist_id}","starred_url":"https://api.github.com/users/manos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manos/subscriptions","organizations_url":"https://api.github.com/users/manos/orgs","repos_url":"https://api.github.com/users/manos/repos","events_url":"https://api.github.com/users/manos/events{/privacy}","received_events_url":"https://api.github.com/users/manos/received_events","type":"User","site_admin":false},"body":"Fair enough. Always easy enough to switch (with a little work) to the aws-provided one.\r\n\r\nWhere \"work\" equals translating their weird naming into API names, like c1.medium, etc.\r\n\r\nMerging..","created_at":"2014-01-19T19:15:23Z","updated_at":"2014-01-19T19:15:23Z","html_url":"https://github.com/manos/AWS-Reserved-Instances-Optimizer/pull/4#discussion_r8993502","pull_request_url":"https://api.github.com/repos/manos/AWS-Reserved-Instances-Optimizer/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/manos/AWS-Reserved-Instances-Optimizer/pulls/comments/8993502"},"html":{"href":"https://github.com/manos/AWS-Reserved-Instances-Optimizer/pull/4#discussion_r8993502"},"pull_request":{"href":"https://api.github.com/repos/manos/AWS-Reserved-Instances-Optimizer/pulls/4"}}}}