)]}'
{"ironic/api/controllers/v1/allocation.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        if fields is None:"},{"line_number":309,"context_line":"            return"},{"line_number":310,"context_line":"        if (\u0027owner\u0027 in fields and not api_utils.allow_allocation_owner()):"},{"line_number":311,"context_line":"            raise exception.NotAcceptable()"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @METRICS.timer(\u0027AllocationsController.get_all\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_65cbefa3","line":310,"updated":"2019-12-03 11:02:25.000000000","message":"nit: redundant brackets","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        if fields is None:"},{"line_number":309,"context_line":"            return"},{"line_number":310,"context_line":"        if (\u0027owner\u0027 in fields and not api_utils.allow_allocation_owner()):"},{"line_number":311,"context_line":"            raise exception.NotAcceptable()"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @METRICS.timer(\u0027AllocationsController.get_all\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0bb553d0","line":310,"in_reply_to":"3fa7e38b_65cbefa3","updated":"2019-12-04 18:04:22.000000000","message":"Whoops - fixed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        policy.authorize(\u0027baremetal:allocation:get\u0027, cdict, cdict)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        self._check_allowed_allocation_fields(fields)"},{"line_number":341,"context_line":"        if (owner is not None and not api_utils.allow_allocation_owner()):"},{"line_number":342,"context_line":"            raise exception.NotAcceptable()"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        return self._get_allocations_collection(node, resource_class, state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_05c23b87","line":341,"updated":"2019-12-03 11:02:25.000000000","message":"nit: redundant brackets","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        policy.authorize(\u0027baremetal:allocation:get\u0027, cdict, cdict)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        self._check_allowed_allocation_fields(fields)"},{"line_number":341,"context_line":"        if (owner is not None and not api_utils.allow_allocation_owner()):"},{"line_number":342,"context_line":"            raise exception.NotAcceptable()"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        return self._get_allocations_collection(node, resource_class, state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2bb84fc5","line":341,"in_reply_to":"3fa7e38b_05c23b87","updated":"2019-12-04 18:04:22.000000000","message":"Fixed as well.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            policy.authorize(\u0027baremetal:allocation:create\u0027, cdict, cdict)"},{"line_number":380,"context_line":"        except exception.HTTPForbidden:"},{"line_number":381,"context_line":"            owner \u003d cdict.get(\u0027project_id\u0027)"},{"line_number":382,"context_line":"            if (not owner or (allocation.owner and owner !\u003d allocation.owner)):"},{"line_number":383,"context_line":"                raise"},{"line_number":384,"context_line":"            policy.authorize(\u0027baremetal:allocation:create_restricted\u0027,"},{"line_number":385,"context_line":"                             cdict, cdict)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_25bdf702","line":382,"updated":"2019-12-03 11:02:25.000000000","message":"ditto","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            policy.authorize(\u0027baremetal:allocation:create\u0027, cdict, cdict)"},{"line_number":380,"context_line":"        except exception.HTTPForbidden:"},{"line_number":381,"context_line":"            owner \u003d cdict.get(\u0027project_id\u0027)"},{"line_number":382,"context_line":"            if (not owner or (allocation.owner and owner !\u003d allocation.owner)):"},{"line_number":383,"context_line":"                raise"},{"line_number":384,"context_line":"            policy.authorize(\u0027baremetal:allocation:create_restricted\u0027,"},{"line_number":385,"context_line":"                             cdict, cdict)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_1637b6b1","line":382,"in_reply_to":"3fa7e38b_25bdf702","updated":"2019-12-04 18:04:22.000000000","message":"Fixed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                    converted[ident] for ident in allocation.candidate_nodes]"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        all_dict \u003d allocation.as_dict()"},{"line_number":433,"context_line":"        self._check_allowed_allocation_fields(all_dict)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        # NOTE(yuriyz): UUID is mandatory for notifications payload"},{"line_number":436,"context_line":"        if not all_dict.get(\u0027uuid\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c5bbc30c","line":433,"updated":"2019-12-03 11:02:25.000000000","message":"This will blow up for a restricted user using the older API. We need to somehow move this check before line 386.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                    converted[ident] for ident in allocation.candidate_nodes]"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        all_dict \u003d allocation.as_dict()"},{"line_number":433,"context_line":"        self._check_allowed_allocation_fields(all_dict)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        # NOTE(yuriyz): UUID is mandatory for notifications payload"},{"line_number":436,"context_line":"        if not all_dict.get(\u0027uuid\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_cbcdfb30","line":433,"in_reply_to":"3fa7e38b_c5bbc30c","updated":"2019-12-04 18:04:22.000000000","message":"Ah, nice catch. I think I can just move it; none of the logic above this line should affect the output of this function. Although it seems like the solution that most closely matches current behavior would be to have this check after the non-restricted check *and* after the restricted check. Let me know if you think that\u0027s wrong!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        return Allocation.convert_with_links(new_allocation)"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"    def _validate_patch(self, patch):"},{"line_number":464,"context_line":"        allowed_fields \u003d [\u0027name\u0027, \u0027extra\u0027, \u0027owner\u0027]"},{"line_number":465,"context_line":"        fields \u003d set()"},{"line_number":466,"context_line":"        for p in patch:"},{"line_number":467,"context_line":"            path \u003d p[\u0027path\u0027].split(\u0027/\u0027)[1]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_e5b6ff25","line":464,"updated":"2019-12-03 11:02:25.000000000","message":"I\u0027m not sure we should allow changing an allocation owner. What\u0027s the use case for that? The way it\u0027s implemented here allows an unprivileged user to re-assign their allocation to someone else, which is.. weird.\n\nI also think we should prevent changing a node owner if there is an owned allocation for it, but that\u0027s a different topic.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        return Allocation.convert_with_links(new_allocation)"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"    def _validate_patch(self, patch):"},{"line_number":464,"context_line":"        allowed_fields \u003d [\u0027name\u0027, \u0027extra\u0027, \u0027owner\u0027]"},{"line_number":465,"context_line":"        fields \u003d set()"},{"line_number":466,"context_line":"        for p in patch:"},{"line_number":467,"context_line":"            path \u003d p[\u0027path\u0027].split(\u0027/\u0027)[1]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_76c2aa88","line":464,"in_reply_to":"3fa7e38b_c68c173b","updated":"2019-12-04 18:04:22.000000000","message":"Makes sense. I\u0027ll remove this!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"2b619e428b1987976c1abca6c1d06e3c6d2bc63b","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        return Allocation.convert_with_links(new_allocation)"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"    def _validate_patch(self, patch):"},{"line_number":464,"context_line":"        allowed_fields \u003d [\u0027name\u0027, \u0027extra\u0027, \u0027owner\u0027]"},{"line_number":465,"context_line":"        fields \u003d set()"},{"line_number":466,"context_line":"        for p in patch:"},{"line_number":467,"context_line":"            path \u003d p[\u0027path\u0027].split(\u0027/\u0027)[1]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c68c173b","line":464,"in_reply_to":"3fa7e38b_e5b6ff25","updated":"2019-12-04 10:31:16.000000000","message":"I agree with Dmitry on this, I\u0027m strongly against allowing a change of the allocation owner to a normal user.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"}],"ironic/common/policy.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":433,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":434,"context_line":"        \u0027baremetal:allocation:create_restricted\u0027,"},{"line_number":435,"context_line":"        \u0027rule:baremetal:allocation:create\u0027,"},{"line_number":436,"context_line":"        \u0027Create restricted Allocation records\u0027,"},{"line_number":437,"context_line":"        [{\u0027path\u0027: \u0027/allocations\u0027, \u0027method\u0027: \u0027POST\u0027}]),"},{"line_number":438,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":439,"context_line":"        \u0027baremetal:allocation:delete\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_a536c7b2","line":436,"updated":"2019-12-03 11:02:25.000000000","message":"nit: \u0027Create Allocation records that are restricted to an owner\u0027? Not sure.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":433,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":434,"context_line":"        \u0027baremetal:allocation:create_restricted\u0027,"},{"line_number":435,"context_line":"        \u0027rule:baremetal:allocation:create\u0027,"},{"line_number":436,"context_line":"        \u0027Create restricted Allocation records\u0027,"},{"line_number":437,"context_line":"        [{\u0027path\u0027: \u0027/allocations\u0027, \u0027method\u0027: \u0027POST\u0027}]),"},{"line_number":438,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":439,"context_line":"        \u0027baremetal:allocation:delete\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_f6c3fa04","line":436,"in_reply_to":"3fa7e38b_a536c7b2","updated":"2019-12-04 18:04:22.000000000","message":"Your version seems clearer - I\u0027ll change it!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"}],"ironic/db/sqlalchemy/api.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        except KeyError:"},{"line_number":385,"context_line":"            pass"},{"line_number":386,"context_line":"        else:"},{"line_number":387,"context_line":"            query \u003d add_allocation_filter_by_owner(query, owner)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        if filters:"},{"line_number":390,"context_line":"            query \u003d query.filter_by(**filters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_453d938c","line":387,"updated":"2019-12-03 11:02:25.000000000","message":"This block is not needed. If you remove it, owner will be handled by line 390.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        except KeyError:"},{"line_number":385,"context_line":"            pass"},{"line_number":386,"context_line":"        else:"},{"line_number":387,"context_line":"            query \u003d add_allocation_filter_by_owner(query, owner)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"        if filters:"},{"line_number":390,"context_line":"            query \u003d query.filter_by(**filters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_b6e6e2af","line":387,"in_reply_to":"3fa7e38b_453d938c","updated":"2019-12-04 18:04:22.000000000","message":"Oh, whoops. Removed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"}],"ironic/tests/unit/api/controllers/v1/test_allocation.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1017,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"},{"line_number":1020,"context_line":"    def test_create_restricted_allocation(self, mock_authorize):"},{"line_number":1021,"context_line":"        def mock_authorize_function(rule, target, creds):"},{"line_number":1022,"context_line":"            if rule \u003d\u003d \u0027baremetal:allocation:create\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_6540cf07","line":1019,"updated":"2019-12-03 11:02:25.000000000","message":"nit: you meant autospec\u003dTrue?","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1017,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"},{"line_number":1020,"context_line":"    def test_create_restricted_allocation(self, mock_authorize):"},{"line_number":1021,"context_line":"        def mock_authorize_function(rule, target, creds):"},{"line_number":1022,"context_line":"            if rule \u003d\u003d \u0027baremetal:allocation:create\u0027:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_5151b82f","line":1019,"in_reply_to":"3fa7e38b_6540cf07","updated":"2019-12-04 18:04:22.000000000","message":"I did - fixed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        owner \u003d \u002712345\u0027"},{"line_number":1028,"context_line":"        adict \u003d apiutils.allocation_post_data()"},{"line_number":1029,"context_line":"        headers \u003d {api_base.Version.string: \u00271.60\u0027, \u0027X-Project-Id\u0027: owner}"},{"line_number":1030,"context_line":"        response \u003d self.post_json(\u0027/allocations\u0027, adict, headers\u003dheaders)"},{"line_number":1031,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1032,"context_line":"        self.assertEqual(http_client.CREATED, response.status_int)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_05479b20","line":1029,"updated":"2019-12-03 11:02:25.000000000","message":"could you add another test with everything the same, except that API versin that was minimum for allocations? Since this test does not use the owner field explicitly, it should work in older versions (see my comment in allocation.py).","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        owner \u003d \u002712345\u0027"},{"line_number":1028,"context_line":"        adict \u003d apiutils.allocation_post_data()"},{"line_number":1029,"context_line":"        headers \u003d {api_base.Version.string: \u00271.60\u0027, \u0027X-Project-Id\u0027: owner}"},{"line_number":1030,"context_line":"        response \u003d self.post_json(\u0027/allocations\u0027, adict, headers\u003dheaders)"},{"line_number":1031,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1032,"context_line":"        self.assertEqual(http_client.CREATED, response.status_int)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_1c76f7a4","line":1029,"in_reply_to":"3fa7e38b_05479b20","updated":"2019-12-04 18:04:22.000000000","message":"Done - the new test is slightly modified in that it doesn\u0027t try to grab owner information from the output.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"        result \u003d self.get_json(\u0027/allocations/%s\u0027 % adict[\u0027uuid\u0027],"},{"line_number":1035,"context_line":"                               headers\u003dheaders)"},{"line_number":1036,"context_line":"        self.assertEqual(adict[\u0027uuid\u0027], result[\u0027uuid\u0027])"},{"line_number":1037,"context_line":"        self.assertEqual(owner,"},{"line_number":1038,"context_line":"                         result[\u0027owner\u0027])"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2542d70e","line":1037,"updated":"2019-12-03 11:02:25.000000000","message":"nit: unnecessary line break","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"        result \u003d self.get_json(\u0027/allocations/%s\u0027 % adict[\u0027uuid\u0027],"},{"line_number":1035,"context_line":"                               headers\u003dheaders)"},{"line_number":1036,"context_line":"        self.assertEqual(adict[\u0027uuid\u0027], result[\u0027uuid\u0027])"},{"line_number":1037,"context_line":"        self.assertEqual(owner,"},{"line_number":1038,"context_line":"                         result[\u0027owner\u0027])"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_d13a88e4","line":1037,"in_reply_to":"3fa7e38b_2542d70e","updated":"2019-12-04 18:04:22.000000000","message":"Removed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"2b619e428b1987976c1abca6c1d06e3c6d2bc63b","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                               headers\u003dheaders)"},{"line_number":1073,"context_line":"        self.assertEqual(adict[\u0027uuid\u0027], result[\u0027uuid\u0027])"},{"line_number":1074,"context_line":"        self.assertEqual(owner,"},{"line_number":1075,"context_line":"                         result[\u0027owner\u0027])"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"},{"line_number":1078,"context_line":"    def test_create_restricted_allocation_with_mismatch_owner("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_66744337","line":1075,"updated":"2019-12-04 10:31:16.000000000","message":"nit: you can avoid line break here","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                               headers\u003dheaders)"},{"line_number":1073,"context_line":"        self.assertEqual(adict[\u0027uuid\u0027], result[\u0027uuid\u0027])"},{"line_number":1074,"context_line":"        self.assertEqual(owner,"},{"line_number":1075,"context_line":"                         result[\u0027owner\u0027])"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    @mock.patch.object(policy, \u0027authorize\u0027, spec\u003dTrue)"},{"line_number":1078,"context_line":"    def test_create_restricted_allocation_with_mismatch_owner("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_911c107c","line":1075,"in_reply_to":"3fa7e38b_66744337","updated":"2019-12-04 18:04:22.000000000","message":"Fixed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"}],"ironic/tests/unit/conductor/test_allocations.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e1f45f4fd3640ac4c5195a2fb83e83adeee54b27","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        allocation \u003d obj_utils.create_test_allocation(self.context,"},{"line_number":349,"context_line":"                                                      resource_class\u003d\u0027x-large\u0027,"},{"line_number":350,"context_line":"                                                      owner\u003d\u002712345\u0027)"},{"line_number":351,"context_line":"        allocations.do_allocate(self.context, allocation)"},{"line_number":352,"context_line":"        self.assertIn(\u0027no available nodes\u0027, allocation[\u0027last_error\u0027])"},{"line_number":353,"context_line":"        self.assertIn(\u0027x-large\u0027, allocation[\u0027last_error\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_85338bc4","line":350,"updated":"2019-12-03 11:02:25.000000000","message":"Could you add another unit test instead of changing this one? With this change none of the nodes above match any more, so it\u0027s no longer testing what it used to.","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"4e268ce7b5aab9d3301c960bf344fe74c9274131","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        allocation \u003d obj_utils.create_test_allocation(self.context,"},{"line_number":349,"context_line":"                                                      resource_class\u003d\u0027x-large\u0027,"},{"line_number":350,"context_line":"                                                      owner\u003d\u002712345\u0027)"},{"line_number":351,"context_line":"        allocations.do_allocate(self.context, allocation)"},{"line_number":352,"context_line":"        self.assertIn(\u0027no available nodes\u0027, allocation[\u0027last_error\u0027])"},{"line_number":353,"context_line":"        self.assertIn(\u0027x-large\u0027, allocation[\u0027last_error\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_114ca09b","line":350,"in_reply_to":"3fa7e38b_85338bc4","updated":"2019-12-04 18:04:22.000000000","message":"Whoops, that was careless of me. Fixed!","commit_id":"4754e762016de21aa1a02c1fc11e6e9d5427d660"}]}
