)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"20004b39baa43a74c3e0d3e1537069f3b64bdf2f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move the claim_resources method to scheduler utils"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This method was originall in the filter_scheduler, but as it will need"},{"line_number":10,"context_line":"to be called by the conductor too, it should be moved to a more common"},{"line_number":11,"context_line":"location."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f4e5783_4b90ac4a","line":9,"range":{"start_line":9,"start_character":16,"end_line":9,"end_character":25},"updated":"2017-10-17 12:32:31.000000000","message":"originally","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"29a98f1d1e0435215c23a57a9bcccb27c7eb3e0a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move the claim_resources method to scheduler utils"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This method was originall in the filter_scheduler, but as it will need"},{"line_number":10,"context_line":"to be called by the conductor too, it should be moved to a more common"},{"line_number":11,"context_line":"location."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f4e5783_1f49cdb5","line":9,"range":{"start_line":9,"start_character":16,"end_line":9,"end_character":25},"in_reply_to":"5f4e5783_4b90ac4a","updated":"2017-10-17 14:56:05.000000000","message":"Done","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8b938308c4c20bffb5d73b4abfd1c0b17c681ab5","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                # want to order the allocation_requests in the future based on"},{"line_number":215,"context_line":"                # information in the provider summaries, we\u0027ll just try to"},{"line_number":216,"context_line":"                # claim resources using the first allocation_request"},{"line_number":217,"context_line":"                alloc_req \u003d alloc_reqs[0]"},{"line_number":218,"context_line":"                if utils.claim_resources(elevated, self.placement_client,"},{"line_number":219,"context_line":"                        spec_obj, instance_uuid, alloc_req,"},{"line_number":220,"context_line":"                        allocation_request_version\u003dallocation_request_version):"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_ece9041a","line":217,"range":{"start_line":217,"start_character":15,"end_line":217,"end_character":41},"updated":"2017-12-06 18:30:41.000000000","message":"we dont need to check if alloc_reqs is an empty list\nbecause we have a precondition on alloc_reqs_by_rp_uuid that it will not contain a key of cn_uuid with avalue of []\nand are therefore protected for a vaule/atribute error here by lines 204 correct.\n\ni realise the logic is the same as before but just taught i would ask.","commit_id":"383e4f78abef91cd9bfd0c321e50a730462dd7c8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"17d1270f416908e667d42b355acd334ded98ea0c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                # want to order the allocation_requests in the future based on"},{"line_number":215,"context_line":"                # information in the provider summaries, we\u0027ll just try to"},{"line_number":216,"context_line":"                # claim resources using the first allocation_request"},{"line_number":217,"context_line":"                alloc_req \u003d alloc_reqs[0]"},{"line_number":218,"context_line":"                if utils.claim_resources(elevated, self.placement_client,"},{"line_number":219,"context_line":"                        spec_obj, instance_uuid, alloc_req,"},{"line_number":220,"context_line":"                        allocation_request_version\u003dallocation_request_version):"}],"source_content_type":"text/x-python","patch_set":32,"id":"df87a7cf_4191b746","line":217,"range":{"start_line":217,"start_character":15,"end_line":217,"end_character":41},"in_reply_to":"df87a7cf_ece9041a","updated":"2017-12-07 20:52:14.000000000","message":"Yes, if there are no allocation_requests for a compute node, it will not be returned by placement. So there will always be at least one; there may be cases with nested providers when more than one set of allocations can satisfy the requested resources. The note from Jay indicates that we will have to handle that case better in the future.","commit_id":"383e4f78abef91cd9bfd0c321e50a730462dd7c8"}],"nova/scheduler/utils.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"20004b39baa43a74c3e0d3e1537069f3b64bdf2f","unresolved":false,"context_lines":[{"line_number":620,"context_line":"    HostState object for the host that was chosen for the instance, and a"},{"line_number":621,"context_line":"    list of allocation_request JSON objects, attempt to claim resources for"},{"line_number":622,"context_line":"    the instance in the placement API. Returns True if the claim process"},{"line_number":623,"context_line":"    was successful, False otherwise."},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    :param ctx: The RequestContext object"},{"line_number":626,"context_line":"    :param client: The scheduler client to use for making the claim call"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_ebd3d802","line":623,"updated":"2017-10-17 12:32:31.000000000","message":"This description is no longer accurate. There\u0027s no HostState, and there\u0027s only one allocation request.","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"29a98f1d1e0435215c23a57a9bcccb27c7eb3e0a","unresolved":false,"context_lines":[{"line_number":620,"context_line":"    HostState object for the host that was chosen for the instance, and a"},{"line_number":621,"context_line":"    list of allocation_request JSON objects, attempt to claim resources for"},{"line_number":622,"context_line":"    the instance in the placement API. Returns True if the claim process"},{"line_number":623,"context_line":"    was successful, False otherwise."},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"    :param ctx: The RequestContext object"},{"line_number":626,"context_line":"    :param client: The scheduler client to use for making the claim call"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_bfcf5927","line":623,"in_reply_to":"5f4e5783_ebd3d802","updated":"2017-10-17 14:56:05.000000000","message":"Done","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e069b6c45242133681b0d78e098bd69e0ce7cf95","unresolved":false,"context_lines":[{"line_number":755,"context_line":"def claim_resources(ctx, client, spec_obj, instance_uuid, alloc_req,"},{"line_number":756,"context_line":"        allocation_request_version\u003dNone):"},{"line_number":757,"context_line":"    \"\"\"Given an instance UUID (representing the consumer of resources) and the"},{"line_number":758,"context_line":"    allocation_request JSON objects returned from Placement, attempt to claim"},{"line_number":759,"context_line":"    resources for the instance in the placement API. Returns True if the claim"},{"line_number":760,"context_line":"    process was successful, False otherwise."},{"line_number":761,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_f7b7d185","line":758,"range":{"start_line":758,"start_character":28,"end_line":758,"end_character":35},"updated":"2017-12-04 20:43:02.000000000","message":"dict or object - singular is the point","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"f33d13de8cfe2cd87cdaa95ff31289d156964c37","unresolved":false,"context_lines":[{"line_number":755,"context_line":"def claim_resources(ctx, client, spec_obj, instance_uuid, alloc_req,"},{"line_number":756,"context_line":"        allocation_request_version\u003dNone):"},{"line_number":757,"context_line":"    \"\"\"Given an instance UUID (representing the consumer of resources) and the"},{"line_number":758,"context_line":"    allocation_request JSON objects returned from Placement, attempt to claim"},{"line_number":759,"context_line":"    resources for the instance in the placement API. Returns True if the claim"},{"line_number":760,"context_line":"    process was successful, False otherwise."},{"line_number":761,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_bb727948","line":758,"range":{"start_line":758,"start_character":28,"end_line":758,"end_character":35},"in_reply_to":"df87a7cf_f7b7d185","updated":"2017-12-05 16:17:55.000000000","message":"Done","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e069b6c45242133681b0d78e098bd69e0ce7cf95","unresolved":false,"context_lines":[{"line_number":764,"context_line":"    :param spec_obj: The RequestSpec object - needed to get the project_id"},{"line_number":765,"context_line":"    :param instance_uuid: The UUID of the consuming instance"},{"line_number":766,"context_line":"    :param alloc_req: The allocation_request received from placement for the"},{"line_number":767,"context_line":"                      resources we want to claim against the chosen host. Each"},{"line_number":768,"context_line":"                      allocation_request satisfies the original request for"},{"line_number":769,"context_line":"                      resources and can be supplied as-is (along with the"},{"line_number":770,"context_line":"                      project and user ID to the placement API\u0027s PUT"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_177275e6","line":767,"range":{"start_line":767,"start_character":74,"end_line":767,"end_character":78},"updated":"2017-12-04 20:43:02.000000000","message":"s/Each/The/","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"f33d13de8cfe2cd87cdaa95ff31289d156964c37","unresolved":false,"context_lines":[{"line_number":764,"context_line":"    :param spec_obj: The RequestSpec object - needed to get the project_id"},{"line_number":765,"context_line":"    :param instance_uuid: The UUID of the consuming instance"},{"line_number":766,"context_line":"    :param alloc_req: The allocation_request received from placement for the"},{"line_number":767,"context_line":"                      resources we want to claim against the chosen host. Each"},{"line_number":768,"context_line":"                      allocation_request satisfies the original request for"},{"line_number":769,"context_line":"                      resources and can be supplied as-is (along with the"},{"line_number":770,"context_line":"                      project and user ID to the placement API\u0027s PUT"}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_bba7d9a7","line":767,"range":{"start_line":767,"start_character":74,"end_line":767,"end_character":78},"in_reply_to":"df87a7cf_177275e6","updated":"2017-12-05 16:17:55.000000000","message":"Done","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"}],"nova/tests/unit/scheduler/test_utils.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"20004b39baa43a74c3e0d3e1537069f3b64bdf2f","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        mock_client.claim_resources.assert_called_once_with(uuids.instance,"},{"line_number":391,"context_line":"                mock.sentinel.alloc_req, uuids.project_id, uuids.user_id,"},{"line_number":392,"context_line":"                version\u003dNone)"},{"line_number":393,"context_line":"        self.assertTrue(res)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_6b7c88eb","line":392,"updated":"2017-10-17 12:32:31.000000000","message":"huzzah, python works","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"29a98f1d1e0435215c23a57a9bcccb27c7eb3e0a","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        mock_client.claim_resources.assert_called_once_with(uuids.instance,"},{"line_number":391,"context_line":"                mock.sentinel.alloc_req, uuids.project_id, uuids.user_id,"},{"line_number":392,"context_line":"                version\u003dNone)"},{"line_number":393,"context_line":"        self.assertTrue(res)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_1f70ad07","line":392,"in_reply_to":"5f4e5783_6b7c88eb","updated":"2017-10-17 14:56:05.000000000","message":"Snark aside, this assures that if someone mucks with utils.py and alters the method, that those changes don\u0027t break what gets sent to the claiming API. IOW, it tests that the unit that is the claim_resources() method of utils.py continues to work as expected. :)","commit_id":"d4ddb2b63d1a984d48868f59ffd75bfd6500d65a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e069b6c45242133681b0d78e098bd69e0ce7cf95","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient\u0027)"},{"line_number":555,"context_line":"    def test_claim_resources(self, mock_client):"},{"line_number":556,"context_line":"        \"\"\"Tests that when _schedule() calls claim_resources(), that we"},{"line_number":557,"context_line":"        appropriately call the placement client to claim resources for the"},{"line_number":558,"context_line":"        instance."},{"line_number":559,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_174b5584","line":556,"range":{"start_line":556,"start_character":17,"end_line":556,"end_character":63},"updated":"2017-12-04 20:43:02.000000000","message":"This part of the comment can be removed now.","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"f33d13de8cfe2cd87cdaa95ff31289d156964c37","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient\u0027)"},{"line_number":555,"context_line":"    def test_claim_resources(self, mock_client):"},{"line_number":556,"context_line":"        \"\"\"Tests that when _schedule() calls claim_resources(), that we"},{"line_number":557,"context_line":"        appropriately call the placement client to claim resources for the"},{"line_number":558,"context_line":"        instance."},{"line_number":559,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":30,"id":"df87a7cf_dbcbbd50","line":556,"range":{"start_line":556,"start_character":17,"end_line":556,"end_character":63},"in_reply_to":"df87a7cf_174b5584","updated":"2017-12-05 16:17:55.000000000","message":"Done","commit_id":"e6e5d7a7dee658c88af303fb02ba7a02ca088217"}]}
