)]}'
{"nova/objects/resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"555d0c2ee8a5a8533f829bd6b2ab6a8017b4c69b","unresolved":false,"context_lines":[{"line_number":707,"context_line":"    Raises an InvalidAllocationCapacityExceeded exception if any inventory"},{"line_number":708,"context_line":"    would be exhausted by the allocation. If no inventories would be exceeded"},{"line_number":709,"context_line":"    by the allocation, the function returns a list of `ResourceProvider`"},{"line_number":710,"context_line":"    objects that contain the generation at the time of the check."},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    :param conn: SQLalchemy Connection object to use"},{"line_number":713,"context_line":"    :param allocs: List of `Allocation` objects to check"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_ca3b739b","line":710,"updated":"2016-11-14 19:43:59.000000000","message":"Please add a note that the new exception may be raised here.","commit_id":"37248cb5fbc3394e3573341881ee3b1c0856d475"}],"nova/tests/functional/db/test_resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"555d0c2ee8a5a8533f829bd6b2ab6a8017b4c69b","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        inv2 \u003d objects.Inventory(resource_provider\u003drp1,"},{"line_number":695,"context_line":"                                 resource_class\u003drp2_class,"},{"line_number":696,"context_line":"                                 total\u003d255, reserved\u003d2,"},{"line_number":697,"context_line":"                                 max_unit\u003dmax_unit)"},{"line_number":698,"context_line":"        inv2.obj_set_defaults()"},{"line_number":699,"context_line":"        inv_list \u003d objects.InventoryList(objects\u003d[inv, inv2])"},{"line_number":700,"context_line":"        rp1.set_inventory(inv_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_6ac89f75","line":697,"updated":"2016-11-14 19:43:59.000000000","message":"nit: in cases like this, I think it\u0027s more explicit to just list the amount as a number like the other numeric values are instead of using a local variable like you\u0027ve done on line 672...","commit_id":"37248cb5fbc3394e3573341881ee3b1c0856d475"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"50742c11af9defcb3940e8d3817edc887bd7678f","unresolved":false,"context_lines":[{"line_number":694,"context_line":"        inv2 \u003d objects.Inventory(resource_provider\u003drp1,"},{"line_number":695,"context_line":"                                 resource_class\u003drp2_class,"},{"line_number":696,"context_line":"                                 total\u003d255, reserved\u003d2,"},{"line_number":697,"context_line":"                                 max_unit\u003dmax_unit)"},{"line_number":698,"context_line":"        inv2.obj_set_defaults()"},{"line_number":699,"context_line":"        inv_list \u003d objects.InventoryList(objects\u003d[inv, inv2])"},{"line_number":700,"context_line":"        rp1.set_inventory(inv_list)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_0aa48b55","line":697,"in_reply_to":"7a77a97e_6ac89f75","updated":"2016-11-14 19:56:52.000000000","message":"I did that to try to keep edleafe sweet, as if I recall correctly, he doesn\u0027t like it when there are \"magical\" numbers all over the tests, so I figured setting a local variable would be more tidy and more future proof.","commit_id":"37248cb5fbc3394e3573341881ee3b1c0856d475"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dcde8f5485c214446e6ac2c62373c90df2b3be26","unresolved":false,"context_lines":[{"line_number":795,"context_line":"        # Now the allocations will still fail because max_unit 1"},{"line_number":796,"context_line":"        self.assertRaises(exception.InvalidAllocationConstraintsViolated,"},{"line_number":797,"context_line":"                          allocation_list.create_all)"},{"line_number":798,"context_line":"        inv1 \u003d objects.Inventory(resource_provider\u003drp1,"},{"line_number":799,"context_line":"                                resource_class\u003drp1_class,"},{"line_number":800,"context_line":"                                total\u003d1024, max_unit\u003dmax_unit)"},{"line_number":801,"context_line":"        inv1.obj_set_defaults()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_3b1ced12","line":798,"updated":"2016-11-16 10:29:36.000000000","message":"Nit: Some how would have preferred getting the inventory, and only setting the max unit here. But maybe thats not really how we use the API, so this is better.","commit_id":"b000989635be95a1548a983d290d16492b436571"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dcde8f5485c214446e6ac2c62373c90df2b3be26","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        inventory_kwargs \u003d {\u0027max_unit\u0027: 3}"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self._check_create_allocations(inventory_kwargs,"},{"line_number":920,"context_line":"                                       bad_used, good_used)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"class UsageListTestCase(ResourceProviderBaseCase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_9b31810e","line":920,"updated":"2016-11-16 10:29:36.000000000","message":"Nit: I slightly prefer (..., bad_used\u003d5, good_used\u003d3) passing as kwarg rather than local variable, but both of these are clear.","commit_id":"b000989635be95a1548a983d290d16492b436571"}]}
