{"action":"created","issue":{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/331","repository_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere","labels_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/331/comments","events_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/331/events","html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/331","id":144736734,"number":331,"title":"Fix provider size lookup when calculating resource usage","user":{"login":"lenards","id":5923,"avatar_url":"https://avatars.githubusercontent.com/u/5923?v=3","gravatar_id":"","url":"https://api.github.com/users/lenards","html_url":"https://github.com/lenards","followers_url":"https://api.github.com/users/lenards/followers","following_url":"https://api.github.com/users/lenards/following{/other_user}","gists_url":"https://api.github.com/users/lenards/gists{/gist_id}","starred_url":"https://api.github.com/users/lenards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenards/subscriptions","organizations_url":"https://api.github.com/users/lenards/orgs","repos_url":"https://api.github.com/users/lenards/repos","events_url":"https://api.github.com/users/lenards/events{/privacy}","received_events_url":"https://api.github.com/users/lenards/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/labels/enhancement","name":"enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/labels/%E2%9C%88%EF%B8%8E","name":"✈︎","color":"E5004A"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-30T22:20:00Z","updated_at":"2016-03-31T17:23:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/pulls/331","html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/331","diff_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/331.diff","patch_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/331.patch"},"body":"If you do not hit `api/v2/size?archived=true`, then you will only get\r\nthe _active_ sizes (tiny1, tiny2, small1, medium, etc) for a cloud\r\n(by the providers within a cloud).\r\n\r\nSo, if you are just looking at _active_ sizes, there is a possibility\r\nthat an instance's size is no longer available when fetching data to\r\nshow statistics or resource consumption, the number of that ilk.\r\n\r\nThis commit offers two improvements:\r\n- leverage the fact that Atmosphere API does *not* delete things, it\r\n  merely end-dates them\r\n- handle a situation when the 'size' for the Identity model is not\r\n  known (so be robust ... or dare I say _anti-fragile_)\r\n\r\nOne notion missing from this is the ability to communicate a statistic\r\nis \"uncertain\" because of the failure to find the associated CPU or\r\nmemory for an instance. If `size.get('cpu')` fails because `size` is\r\nfalse-y (null, undefined, etc) - there is not a way to say \"hey, this\r\nCPU count is *kind of* close, but _not_ exactly right\".\r\n\r\n- [ ] cherry-pick to `master`\r\n"},"comment":{"url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/comments/204035320","html_url":"https://github.com/iPlantCollaborativeOpenSource/troposphere/pull/331#issuecomment-204035320","issue_url":"https://api.github.com/repos/iPlantCollaborativeOpenSource/troposphere/issues/331","id":204035320,"user":{"login":"lenards","id":5923,"avatar_url":"https://avatars.githubusercontent.com/u/5923?v=3","gravatar_id":"","url":"https://api.github.com/users/lenards","html_url":"https://github.com/lenards","followers_url":"https://api.github.com/users/lenards/followers","following_url":"https://api.github.com/users/lenards/following{/other_user}","gists_url":"https://api.github.com/users/lenards/gists{/gist_id}","starred_url":"https://api.github.com/users/lenards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenards/subscriptions","organizations_url":"https://api.github.com/users/lenards/orgs","repos_url":"https://api.github.com/users/lenards/repos","events_url":"https://api.github.com/users/lenards/events{/privacy}","received_events_url":"https://api.github.com/users/lenards/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T17:23:06Z","updated_at":"2016-03-31T17:23:06Z","body":"Great! \r\n"}}