)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d0969de45dfba4eafd9f62132065b6e43aa46c0e","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"    # ) AS allocs"},{"line_number":1829,"context_line":"    # ON inv.resource_provider_id \u003d allocs.resource_provider_id"},{"line_number":1830,"context_line":"    # AND inv.resource_class_id \u003d allocs.resource_class_id"},{"line_number":1831,"context_line":"    # WHERE rp.uuid IN ($RESOURCE_PROVIDER_UIDS)"},{"line_number":1832,"context_line":"    # AND inv.resource_class_id IN ($RESOURCE_CLASSES)"},{"line_number":1833,"context_line":"    #"},{"line_number":1834,"context_line":"    # We then take the results of the above and determine if any of the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_79ac118c","line":1831,"range":{"start_line":1831,"start_character":42,"end_line":1831,"end_character":47},"updated":"2018-04-17 14:29:23.000000000","message":"UUIDS","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"b1535fd880f8dddc4d95dd3a4eef9a1efa0b5363","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"    # ) AS allocs"},{"line_number":1829,"context_line":"    # ON inv.resource_provider_id \u003d allocs.resource_provider_id"},{"line_number":1830,"context_line":"    # AND inv.resource_class_id \u003d allocs.resource_class_id"},{"line_number":1831,"context_line":"    # WHERE rp.uuid IN ($RESOURCE_PROVIDER_UIDS)"},{"line_number":1832,"context_line":"    # AND inv.resource_class_id IN ($RESOURCE_CLASSES)"},{"line_number":1833,"context_line":"    #"},{"line_number":1834,"context_line":"    # We then take the results of the above and determine if any of the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_3e0e683b","line":1831,"range":{"start_line":1831,"start_character":42,"end_line":1831,"end_character":47},"in_reply_to":"9f6a8fd7_79ac118c","updated":"2018-04-18 09:22:22.000000000","message":"good catch","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d0969de45dfba4eafd9f62132065b6e43aa46c0e","unresolved":false,"context_lines":[{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"    sel \u003d sa.select(cols_in_output).select_from(primary_join)"},{"line_number":1873,"context_line":"    sel \u003d sel.where("},{"line_number":1874,"context_line":"            sa.and_(_RP_TBL.c.uuid.in_(provider_uuids),"},{"line_number":1875,"context_line":"                    _INV_TBL.c.resource_class_id.in_(rc_ids)))"},{"line_number":1876,"context_line":"    records \u003d ctx.session.execute(sel)"},{"line_number":1877,"context_line":"    # Create a map keyed by (rp_uuid, res_class) for the records in the DB"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_39621940","line":1874,"updated":"2018-04-17 14:29:23.000000000","message":"If you\u0027re going to create provider_ids above, and we\u0027re trying to optimize this entire check, you might consider changing this to use c.id.in(provider_ids)?","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c4358c2a6d457b5005c5aa02446d7dc7d1d6977a","unresolved":false,"context_lines":[{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"    sel \u003d sa.select(cols_in_output).select_from(primary_join)"},{"line_number":1873,"context_line":"    sel \u003d sel.where("},{"line_number":1874,"context_line":"            sa.and_(_RP_TBL.c.uuid.in_(provider_uuids),"},{"line_number":1875,"context_line":"                    _INV_TBL.c.resource_class_id.in_(rc_ids)))"},{"line_number":1876,"context_line":"    records \u003d ctx.session.execute(sel)"},{"line_number":1877,"context_line":"    # Create a map keyed by (rp_uuid, res_class) for the records in the DB"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_a54a6052","line":1874,"in_reply_to":"9f6a8fd7_39621940","updated":"2018-04-18 14:56:29.000000000","message":"agreed.","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"b1535fd880f8dddc4d95dd3a4eef9a1efa0b5363","unresolved":false,"context_lines":[{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"    sel \u003d sa.select(cols_in_output).select_from(primary_join)"},{"line_number":1873,"context_line":"    sel \u003d sel.where("},{"line_number":1874,"context_line":"            sa.and_(_RP_TBL.c.uuid.in_(provider_uuids),"},{"line_number":1875,"context_line":"                    _INV_TBL.c.resource_class_id.in_(rc_ids)))"},{"line_number":1876,"context_line":"    records \u003d ctx.session.execute(sel)"},{"line_number":1877,"context_line":"    # Create a map keyed by (rp_uuid, res_class) for the records in the DB"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_e1029509","line":1874,"in_reply_to":"9f6a8fd7_39621940","updated":"2018-04-18 09:22:22.000000000","message":"yeah, will do","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"}],"nova/tests/functional/api/openstack/placement/db/test_resource_provider.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8df7a935b78ef258245bf5a66cc4c384b31849ce","unresolved":false,"context_lines":[{"line_number":1976,"context_line":""},{"line_number":1977,"context_line":"        # Create a allocation list consists of valid requests and a invalid"},{"line_number":1978,"context_line":"        # request exceeds memory full_rp can provide."},{"line_number":1979,"context_line":"        alloc_list \u003d rp_obj.AllocationList(context\u003dself.ctx,"},{"line_number":1980,"context_line":"            objects\u003d["},{"line_number":1981,"context_line":"                rp_obj.Allocation("},{"line_number":1982,"context_line":"                    context\u003dself.ctx,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_70a86876","line":1979,"range":{"start_line":1979,"start_character":28,"end_line":1979,"end_character":42},"updated":"2018-04-19 14:44:26.000000000","message":"nit: could use self._make_allocation for these (throughout)","commit_id":"7c01dd1a656d4a1f65609436bcef821a7d8a1ddd"}],"nova/tests/unit/api/openstack/placement/objects/test_resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d0969de45dfba4eafd9f62132065b6e43aa46c0e","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                                      objects\u003d[obj])"},{"line_number":413,"context_line":"        self.assertRaises(exception.ObjectActionError, alloc_list.create_all)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"    def test_create_exceed_capacity_fails(self):"},{"line_number":416,"context_line":"        rp \u003d resource_provider.ResourceProvider(context\u003dself.context,"},{"line_number":417,"context_line":"                                                uuid\u003d_RESOURCE_PROVIDER_UUID,"},{"line_number":418,"context_line":"                                                name\u003d_RESOURCE_PROVIDER_NAME)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_d9d75dbf","line":415,"updated":"2018-04-17 14:29:23.000000000","message":"Instead of, or in addition to, this test here you might make a more complex test (in nova/tests/functional/api/openstack/placement/db) that, as efried suggests, works with a list of allocations involving multiple resource providers.","commit_id":"70ca6b4816e66400d2f22ccc7a74d37c6bd51153"}]}
