)]}'
{"nova/objects/resource_provider.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"020e910ec59fb804a1fc53fa794eec6881463887","unresolved":false,"context_lines":[{"line_number":2458,"context_line":""},{"line_number":2459,"context_line":"    @classmethod"},{"line_number":2460,"context_line":"    def get_all_with_any_resource_and_trait(cls, context,"},{"line_number":2461,"context_line":"                                            resources, required\u003dNone):"},{"line_number":2462,"context_line":"        \"\"\"This method return a list of summary of providers which have any"},{"line_number":2463,"context_line":"        requested resource, also have any required trait."},{"line_number":2464,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_5b254b5b","line":2461,"range":{"start_line":2461,"start_character":55,"end_line":2461,"end_character":63},"updated":"2017-10-24 18:30:51.000000000","message":"You\u0027re not using this - nor should you be.  If you\u0027re spreading resources over multiple providers, some of them could (and probably will) legitimately have none of the required traits.\n\nSo I think you should remove this param and rename/redocument the method accordingly.","commit_id":"94ccf8446fcbdbc3f058d032c9b56a023957248c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"020e910ec59fb804a1fc53fa794eec6881463887","unresolved":false,"context_lines":[{"line_number":2470,"context_line":"        provider_usages_by_id \u003d collections.defaultdict(list)"},{"line_number":2471,"context_line":""},{"line_number":2472,"context_line":"        for usage in provider_usages:"},{"line_number":2473,"context_line":"            provider_usages_by_id[usage[0]].append("},{"line_number":2474,"context_line":"                [usage[2], usage[3], usage[6]])"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"        for rp_id in provider_ids:"},{"line_number":2477,"context_line":"            p_summary \u003d ProviderSummary(context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_1b7fd315","line":2474,"range":{"start_line":2473,"start_character":34,"end_line":2474,"end_character":45},"updated":"2017-10-24 18:30:51.000000000","message":"Oy vay, do that namedtuple thing Jay was talking about.","commit_id":"94ccf8446fcbdbc3f058d032c9b56a023957248c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"020e910ec59fb804a1fc53fa794eec6881463887","unresolved":false,"context_lines":[{"line_number":2474,"context_line":"                [usage[2], usage[3], usage[6]])"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"        for rp_id in provider_ids:"},{"line_number":2477,"context_line":"            p_summary \u003d ProviderSummary(context)"},{"line_number":2478,"context_line":""},{"line_number":2479,"context_line":"            p_summary.resource_provider \u003d ResourceProvider(id\u003drp_id)"},{"line_number":2480,"context_line":"            p_summary.resources \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_dbc25b34","line":2477,"updated":"2017-10-24 18:30:51.000000000","message":"Make the guts of this outermost loop a @classmethod on ProviderSummary.","commit_id":"94ccf8446fcbdbc3f058d032c9b56a023957248c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"020e910ec59fb804a1fc53fa794eec6881463887","unresolved":false,"context_lines":[{"line_number":2485,"context_line":"                p_resource.resource_class \u003d fields.ResourceClass.STANDARD["},{"line_number":2486,"context_line":"                    rc_id]"},{"line_number":2487,"context_line":"                p_resource.capacity \u003d total"},{"line_number":2488,"context_line":"                p_resource.used \u003d used if used is not None else 0"},{"line_number":2489,"context_line":"                p_summary.resources.append(p_resource)"},{"line_number":2490,"context_line":""},{"line_number":2491,"context_line":"            for _id, name in traits_by_rp_id[rp_id]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_3b43af15","line":2488,"range":{"start_line":2488,"start_character":16,"end_line":2488,"end_character":65},"updated":"2017-10-24 18:30:51.000000000","message":"or:\n\n p_resource.used \u003d used or 0","commit_id":"94ccf8446fcbdbc3f058d032c9b56a023957248c"}]}
