)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f361a310672fcbe6aa34835f692bdb8d8feee946","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This is done using a boolean argument to the get_by_filters call so"},{"line_number":15,"context_line":"we can control the functionality from a microversion in the"},{"line_number":16,"context_line":"list_resource_providers handler and implement the functionality"},{"line_number":17,"context_line":"before the microversion is ready (beause we want to implement the"},{"line_number":18,"context_line":"functionality in /allocation_candidates in the same microversion)."},{"line_number":19,"context_line":"Code for all that is coming in subsequent patches."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf659307_3ffb3647","line":17,"range":{"start_line":17,"start_character":34,"end_line":17,"end_character":40},"updated":"2018-04-13 15:09:43.000000000","message":"because","commit_id":"ce40930d73c6a9ae0d407ef7fb15de41cc2612a2"}],"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"322554778ffcd6d0905f11bd0627d1fb51388ec2","unresolved":false,"context_lines":[{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"    @staticmethod"},{"line_number":1417,"context_line":"    @db_api.api_context_manager.reader"},{"line_number":1418,"context_line":"    def _get_all_by_filters_from_db(context, filters, allow_forbidden):"},{"line_number":1419,"context_line":"        # Eg. filters can be:"},{"line_number":1420,"context_line":"        #  filters \u003d {"},{"line_number":1421,"context_line":"        #      \u0027name\u0027: \u003cname\u003e,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_e8b3464c","line":1418,"range":{"start_line":1418,"start_character":54,"end_line":1418,"end_character":69},"updated":"2018-03-27 19:21:49.000000000","message":"Ignoring the implied negative True, why would we ever not allow forbidden traits if they are marked as such?","commit_id":"0976055e33d66578683fe970d4cd1037a7d7df11"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"322554778ffcd6d0905f11bd0627d1fb51388ec2","unresolved":false,"context_lines":[{"line_number":1443,"context_line":"            forbidden \u003d set([trait for trait in required"},{"line_number":1444,"context_line":"                             if trait.startswith(\u0027!\u0027)])"},{"line_number":1445,"context_line":"            required \u003d required - forbidden"},{"line_number":1446,"context_line":"            forbidden \u003d set([trait.lstrip(\u0027!\u0027) for trait in forbidden])"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"        resources \u003d filters.pop(\u0027resources\u0027, {})"},{"line_number":1449,"context_line":"        # NOTE(sbauza): We want to key the dict by the resource class IDs"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_88e96a1b","line":1446,"range":{"start_line":1446,"start_character":29,"end_line":1446,"end_character":46},"updated":"2018-03-27 19:21:49.000000000","message":"So if allow_forbidden is false, a request with\n\n  required\u003d!foo:42\n\nwill always fail to return anything, because the leading exclamation mark is not getting stripped off. So again, I don\u0027t see the point of \u0027allow_forbidden\u0027.","commit_id":"0976055e33d66578683fe970d4cd1037a7d7df11"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f361a310672fcbe6aa34835f692bdb8d8feee946","unresolved":false,"context_lines":[{"line_number":1631,"context_line":"                        providers to filter results by and `resources` is a"},{"line_number":1632,"context_line":"                        dict of amounts keyed by resource classes."},{"line_number":1633,"context_line":"        :type filters: dict"},{"line_number":1634,"context_line":"        :param allow_forbidden: If True, allow processing of forbidden traits."},{"line_number":1635,"context_line":"        \"\"\""},{"line_number":1636,"context_line":"        _ensure_rc_cache(context)"},{"line_number":1637,"context_line":"        _ensure_trait_sync(context)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_6215953c","line":1634,"range":{"start_line":1634,"start_character":0,"end_line":1634,"end_character":78},"updated":"2018-04-13 15:09:43.000000000","message":"I would really prefer to keep all the allow and accept logic about parameter validation outside of the object layer. Can we please add this parameter to the util.normalize_trait_names() function and limit the exposure of parameter validation to the API layer?","commit_id":"ce40930d73c6a9ae0d407ef7fb15de41cc2612a2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ff3436a02fefc5d397618d5787417ea4866b88de","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"        uuid \u003d filters.pop(\u0027uuid\u0027, None)"},{"line_number":1435,"context_line":"        member_of \u003d filters.pop(\u0027member_of\u0027, [])"},{"line_number":1436,"context_line":"        required \u003d set(filters.pop(\u0027required\u0027, []))"},{"line_number":1437,"context_line":"        forbidden \u003d set()"},{"line_number":1438,"context_line":"        forbidden \u003d set([trait for trait in required"},{"line_number":1439,"context_line":"                         if trait.startswith(\u0027!\u0027)])"},{"line_number":1440,"context_line":"        required \u003d required - forbidden"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_ce5cca7e","line":1437,"range":{"start_line":1437,"start_character":8,"end_line":1437,"end_character":25},"updated":"2018-04-13 18:15:00.000000000","message":"you can remove this line.","commit_id":"741b10278db8d1554d56672aca5f647f5b74722a"}],"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":"fdbec4c125e1d85a1d798f3226bb55eec36bc08f","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"        # Three rps should have CUSTOM_TRAIT_A"},{"line_number":1162,"context_line":"        custom_a_rps \u003d rp_obj.ResourceProviderList.get_all_by_filters("},{"line_number":1163,"context_line":"            self.ctx, filters\u003d{\u0027required\u0027: [\u0027CUSTOM_TRAIT_A\u0027]})"},{"line_number":1164,"context_line":"        self.assertEqual(3, len(custom_a_rps))"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"        # One rp if we forbid CUSTOM_TRAIT_B, with a single trait of"},{"line_number":1167,"context_line":"        # CUSTOM_TRAIT_A"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_eb9c600f","line":1164,"range":{"start_line":1164,"start_character":8,"end_line":1164,"end_character":46},"updated":"2018-03-29 19:06:25.000000000","message":"I guess I would feel a leetle better if this asserted the *right* RPs came back (by name would be fine).\n\nLikewise throughout.","commit_id":"1b6055039b60cac4591da97deb26d990dc74b91c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7c88071f4fb328144d754c2a73b0864e6101d8bf","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"        # Three rps should have CUSTOM_TRAIT_A"},{"line_number":1162,"context_line":"        custom_a_rps \u003d rp_obj.ResourceProviderList.get_all_by_filters("},{"line_number":1163,"context_line":"            self.ctx, filters\u003d{\u0027required\u0027: [\u0027CUSTOM_TRAIT_A\u0027]})"},{"line_number":1164,"context_line":"        self.assertEqual(3, len(custom_a_rps))"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"        # One rp if we forbid CUSTOM_TRAIT_B, with a single trait of"},{"line_number":1167,"context_line":"        # CUSTOM_TRAIT_A"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_101f6d5b","line":1164,"range":{"start_line":1164,"start_character":8,"end_line":1164,"end_character":46},"in_reply_to":"bf659307_8b02840a","updated":"2018-03-30 13:37:39.000000000","message":"Yeah, I meant the two places you updated.  Thanks.","commit_id":"1b6055039b60cac4591da97deb26d990dc74b91c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"13aa017ebf61b5e666e42db2a9c966e11ae92ab1","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"        # Three rps should have CUSTOM_TRAIT_A"},{"line_number":1162,"context_line":"        custom_a_rps \u003d rp_obj.ResourceProviderList.get_all_by_filters("},{"line_number":1163,"context_line":"            self.ctx, filters\u003d{\u0027required\u0027: [\u0027CUSTOM_TRAIT_A\u0027]})"},{"line_number":1164,"context_line":"        self.assertEqual(3, len(custom_a_rps))"},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"        # One rp if we forbid CUSTOM_TRAIT_B, with a single trait of"},{"line_number":1167,"context_line":"        # CUSTOM_TRAIT_A"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_8b02840a","line":1164,"range":{"start_line":1164,"start_character":8,"end_line":1164,"end_character":46},"in_reply_to":"bf659307_eb9c600f","updated":"2018-03-29 19:15:21.000000000","message":"Fair enough. By throughout, you mean just here, yes? As the nest assert block does, and the one after that there are no rps.\n\nOr do you mean something else?","commit_id":"1b6055039b60cac4591da97deb26d990dc74b91c"}]}
