)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"42daed39da751da3232035f659715f29cfb6e576","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rafael Folco \u003crfolco@br.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-28 20:47:36 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete inventory has its own method DELETE"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously we deleted inventories with a PUT method and empty"},{"line_number":10,"context_line":"payload. With bp delete-inventories-placement-api implemented,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5ff73747_68623d0c","line":7,"updated":"2017-04-29 11:15:20.000000000","message":"you might want \"inventories\" here to distinguish from deleting a single class of inventory","commit_id":"99789b2b14b808d71e5f8e9662df937915c78c36"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"15422492678c3f33090156dbed2de0719292cff8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rafael Folco \u003crfolco@br.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-04-28 20:47:36 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete inventory has its own method DELETE"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously we deleted inventories with a PUT method and empty"},{"line_number":10,"context_line":"payload. With bp delete-inventories-placement-api implemented,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5ff73747_7192004e","line":7,"in_reply_to":"5ff73747_68623d0c","updated":"2017-05-02 13:22:22.000000000","message":"ack","commit_id":"99789b2b14b808d71e5f8e9662df937915c78c36"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"427deffbfea7926aa3aabc603a272b5f258b8560","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        LOG.info(msg, rp_uuid)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % rp_uuid"},{"line_number":620,"context_line":"        r \u003d self.delete(url)"},{"line_number":621,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":622,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":623,"context_line":"            # Update our view of the generation for next time"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_615e2013","line":620,"updated":"2017-04-27 10:36:51.000000000","message":"Have a look at the changes in https://review.openstack.org/#/c/456915/\n\nIn there the GET/POST for creating a resource class is replace with a PUT. In discussions with Matt he made it clear that the right thing to do is to maintain the old behavior so that if a new compute-node is talking to an old placement service it will still work. The linked change above shows how to do that:\n\n* try the new way with explicit microversion set\n* if there\u0027s a response that indicates the microversion is not available fail back to the old way\n\nThen, later, we can remove the old way when we know that everyone will have newer placement servers.","commit_id":"0ebb6b632e358958e516bf61ffaa10b0883d48a0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8a38ef07f51b9334c3ef0aab8056785353f26a95","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        LOG.info(msg, rp_uuid)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % rp_uuid"},{"line_number":620,"context_line":"        r \u003d self.delete(url)"},{"line_number":621,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":622,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":623,"context_line":"            # Update our view of the generation for next time"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_bac67c67","line":620,"in_reply_to":"5ff73747_5aa1b8f7","updated":"2017-04-27 19:57:43.000000000","message":"The idea is that the first request is made using the new microversion (1.5). If that version does not exist on the server, the response will be a 406. At which point you can make a request in the old style.\n\nIf you tried a DELETE without the microversion, then yes, you would get a 405 and while that would work in this case it doesn\u0027t really follow the semantics of \"does the server have this microversion?\".","commit_id":"0ebb6b632e358958e516bf61ffaa10b0883d48a0"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"5e9b66dcb50f7107c2aa8c098b28b1d45b1c5c8b","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        LOG.info(msg, rp_uuid)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % rp_uuid"},{"line_number":620,"context_line":"        r \u003d self.delete(url)"},{"line_number":621,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":622,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":623,"context_line":"            # Update our view of the generation for next time"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_5aa1b8f7","line":620,"in_reply_to":"5ff73747_615e2013","updated":"2017-04-27 19:46:28.000000000","message":"I\u0027m just wondering why 406 NotAcceptable and not 405 NotAllowed. When using earlier microversions the delete method would return 405. Am I wrong ?","commit_id":"0ebb6b632e358958e516bf61ffaa10b0883d48a0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"42daed39da751da3232035f659715f29cfb6e576","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        }"},{"line_number":625,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":626,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":627,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":628,"context_line":"            # Update our view of the generation for next time"},{"line_number":629,"context_line":"            updated_inv \u003d r.json()"},{"line_number":630,"context_line":"            new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_8847c977","side":"PARENT","line":627,"updated":"2017-04-29 11:15:20.000000000","message":"It\u0027s 200 on the response from a put and 204 on a respons from a delete if you something like:\n\n    if 200 \u003c\u003d r.status_code \u003c\u003d 299:\n\nor (probably better):\n\n    if r:\n\nwhich accomplishes the same thing.","commit_id":"0039231719d2a02c59e7cd76631e2ff03cc86b0d"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"15422492678c3f33090156dbed2de0719292cff8","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        }"},{"line_number":625,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":626,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":627,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":628,"context_line":"            # Update our view of the generation for next time"},{"line_number":629,"context_line":"            updated_inv \u003d r.json()"},{"line_number":630,"context_line":"            new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_717c40eb","side":"PARENT","line":627,"in_reply_to":"5ff73747_8847c977","updated":"2017-05-02 13:22:22.000000000","message":"I have preference for the former.","commit_id":"0039231719d2a02c59e7cd76631e2ff03cc86b0d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"42daed39da751da3232035f659715f29cfb6e576","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            # TODO(cdent): When we\u0027re happy that all placement"},{"line_number":637,"context_line":"            # servers support microversion 1.7 we can remove this"},{"line_number":638,"context_line":"            # call and the associated code."},{"line_number":639,"context_line":"            LOG.debug(\u0027Falling back to placement API microverison 1.4 \u0027"},{"line_number":640,"context_line":"                      \u0027for deleting inventory for a resource provider.\u0027)"},{"line_number":641,"context_line":"            cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":642,"context_line":"            payload \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_487421cf","line":639,"updated":"2017-04-29 11:15:20.000000000","message":"You\u0027re not actually falling back to 1.4. As written you\u0027re falling back to not stating a microversion, which will mean that it uses the 1.0 functionality of the API. That\u0027s fine, but you don\u0027t want the log message to be wrong.","commit_id":"99789b2b14b808d71e5f8e9662df937915c78c36"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"15422492678c3f33090156dbed2de0719292cff8","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            # TODO(cdent): When we\u0027re happy that all placement"},{"line_number":637,"context_line":"            # servers support microversion 1.7 we can remove this"},{"line_number":638,"context_line":"            # call and the associated code."},{"line_number":639,"context_line":"            LOG.debug(\u0027Falling back to placement API microverison 1.4 \u0027"},{"line_number":640,"context_line":"                      \u0027for deleting inventory for a resource provider.\u0027)"},{"line_number":641,"context_line":"            cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":642,"context_line":"            payload \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_d1d8b41f","line":639,"in_reply_to":"5ff73747_487421cf","updated":"2017-05-02 13:22:22.000000000","message":"Yeah, I thought it was strange like switching magically to 1.4. Makes sense now.","commit_id":"99789b2b14b808d71e5f8e9662df937915c78c36"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"40fb78a86f67f9788e93f9823230f60daa3aa550","unresolved":false,"context_lines":[{"line_number":626,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":627,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":628,"context_line":"            # Update our view of the generation for next time"},{"line_number":629,"context_line":"            updated_inv \u003d r.json()"},{"line_number":630,"context_line":"            new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_110cdc40","side":"PARENT","line":629,"updated":"2017-05-02 13:30:17.000000000","message":"Another point I missed from last time:\n\nOn a DELETE response r.json() will raise a ValueError exception \n\nso there will be no resource_provider_generation in the response\n\nSo you\u0027ll need something a bit more complex here.\n\n(And more tests to cover it)","commit_id":"0039231719d2a02c59e7cd76631e2ff03cc86b0d"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"26549704ed0ac087da1f602db4f93e03d8821ab5","unresolved":false,"context_lines":[{"line_number":626,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":627,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":628,"context_line":"            # Update our view of the generation for next time"},{"line_number":629,"context_line":"            updated_inv \u003d r.json()"},{"line_number":630,"context_line":"            new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_5ca9548e","side":"PARENT","line":629,"in_reply_to":"5ff73747_110cdc40","updated":"2017-05-02 15:48:24.000000000","message":"True. I underestimated the complexity of this change.","commit_id":"0039231719d2a02c59e7cd76631e2ff03cc86b0d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8aa22a96eb0ce0ec94f59c9306e3184ab03565d8","unresolved":false,"context_lines":[{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        First attempt to DELETE the inventory using microversion 1.7. If"},{"line_number":615,"context_line":"        this results in a 406, fail over to a PUT."},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        \"\"\""},{"line_number":618,"context_line":"        curr \u003d self._get_inventory_and_update_provider_generation(rp_uuid)"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_eb2de846","line":616,"updated":"2017-05-04 13:36:15.000000000","message":"can remove this blank line","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"6781e0a864067ebde3fcdb9443d4b4f0113b80b3","unresolved":false,"context_lines":[{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        First attempt to DELETE the inventory using microversion 1.7. If"},{"line_number":615,"context_line":"        this results in a 406, fail over to a PUT."},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        \"\"\""},{"line_number":618,"context_line":"        curr \u003d self._get_inventory_and_update_provider_generation(rp_uuid)"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_ace56faa","line":616,"in_reply_to":"3f044301_eb2de846","updated":"2017-05-08 19:56:14.000000000","message":"oops","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8aa22a96eb0ce0ec94f59c9306e3184ab03565d8","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                updated_inv \u003d r.json()"},{"line_number":652,"context_line":"                new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"                self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"},{"line_number":655,"context_line":"                msg_args \u003d {"},{"line_number":656,"context_line":"                    \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":657,"context_line":"                    \u0027generation\u0027: new_gen,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_6b0d583d","line":654,"updated":"2017-05-04 13:36:15.000000000","message":"This update of generation isn\u0027t happening when we do the delete case, because there\u0027s no response that has that info. If we don\u0027t that it means that the next time the self._resource_providers dict is used it could be out of sync which will either cause a retry or a 409 depending on where the _resource_provider info is used. You could experiment with these things in a functional test modelled on nova/tests/functional/compute/test_resource_tracker.py\n\nI say \"experiment\" because i\u0027m not exactly sure of what will happen or should happen but assuming that having the wrong generation causes a retry then after making this call we should either:\n\n* GET the /resource_provider/{uuid} to refresh self._resource_providers\n* inc the generation by 1 to less the chance of retries\n* accept retries as okay","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"6781e0a864067ebde3fcdb9443d4b4f0113b80b3","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                updated_inv \u003d r.json()"},{"line_number":652,"context_line":"                new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"                self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"},{"line_number":655,"context_line":"                msg_args \u003d {"},{"line_number":656,"context_line":"                    \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":657,"context_line":"                    \u0027generation\u0027: new_gen,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_752f23a1","line":654,"in_reply_to":"3f044301_6b0d583d","updated":"2017-05-08 19:56:14.000000000","message":"I played a bit with it and proposed the 2nd one: increment the generation. Added test to validate that in the inventory gabbit: get inventories after deletions. This test is called after two DELETE calls, bumping generation.","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"74d2ea15b9f4450e0cb2be88831c000a8c08c0c8","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                return"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        # Successful response is 204 from DELETE"},{"line_number":667,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":668,"context_line":"            msg_args \u003d {"},{"line_number":669,"context_line":"                \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":670,"context_line":"                \u0027placement_req_id\u0027: placement_req_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_f079682f","line":667,"range":{"start_line":667,"start_character":8,"end_line":667,"end_character":32},"updated":"2017-05-03 21:37:35.000000000","message":"While this is true, it is considered best practice to just check for success, instead of checking for specific codes. So if you re-spin, change this to:\n\n    if 200 \u003c\u003d r.status_code \u003c 300:","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"6781e0a864067ebde3fcdb9443d4b4f0113b80b3","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                return"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        # Successful response is 204 from DELETE"},{"line_number":667,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":668,"context_line":"            msg_args \u003d {"},{"line_number":669,"context_line":"                \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":670,"context_line":"                \u0027placement_req_id\u0027: placement_req_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_755a834f","line":667,"range":{"start_line":667,"start_character":8,"end_line":667,"end_character":32},"in_reply_to":"3f044301_f079682f","updated":"2017-05-08 19:56:14.000000000","message":"ack, I just thought that explicit status code would be more readable because we want to differentiate 200 from put (failover) and 204 from delete (original call).","commit_id":"c202d3ed5dd22c97cbe525e375da9e84860eff22"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6745171995c81328b230f537685fdab4c6d8ea50","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        LOG.info(msg, rp_uuid)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % rp_uuid"},{"line_number":631,"context_line":"        r \u003d self.delete(url, version\u003d\"1.7\")"},{"line_number":632,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":633,"context_line":"        cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":634,"context_line":"        if r.status_code \u003d\u003d 406:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_ac1b6919","line":631,"updated":"2017-05-30 15:14:11.000000000","message":"According to the Gabbi tests, we introduced DELETE /resource_providers/{uuid}/inventories support in microversion 1.5, not 1.7?","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"c7e18afe85886033407d6d24a94d57d78b1a7e0a","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        LOG.info(msg, rp_uuid)"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % rp_uuid"},{"line_number":631,"context_line":"        r \u003d self.delete(url, version\u003d\"1.7\")"},{"line_number":632,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":633,"context_line":"        cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":634,"context_line":"        if r.status_code \u003d\u003d 406:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_bd3835d3","line":631,"in_reply_to":"df140735_ac1b6919","updated":"2017-05-30 16:47:37.000000000","message":"Ok, so the idea is to force the minimum level. Yes, 1.5.","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6745171995c81328b230f537685fdab4c6d8ea50","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            }"},{"line_number":645,"context_line":"            r \u003d self.put(url, payload)"},{"line_number":646,"context_line":"            placement_req_id \u003d get_placement_request_id(r)"},{"line_number":647,"context_line":"            # Successful response is 200 from PUT"},{"line_number":648,"context_line":"            if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":649,"context_line":"                # Update our view of the generation for next time"},{"line_number":650,"context_line":"                updated_inv \u003d r.json()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_8c18a51d","line":647,"updated":"2017-05-30 15:14:11.000000000","message":"this comment isn\u0027t particularly useful :) You could remove it I think.","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"c7e18afe85886033407d6d24a94d57d78b1a7e0a","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            }"},{"line_number":645,"context_line":"            r \u003d self.put(url, payload)"},{"line_number":646,"context_line":"            placement_req_id \u003d get_placement_request_id(r)"},{"line_number":647,"context_line":"            # Successful response is 200 from PUT"},{"line_number":648,"context_line":"            if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":649,"context_line":"                # Update our view of the generation for next time"},{"line_number":650,"context_line":"                updated_inv \u003d r.json()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_7d329df3","line":647,"in_reply_to":"df140735_8c18a51d","updated":"2017-05-30 16:47:37.000000000","message":"ack","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6745171995c81328b230f537685fdab4c6d8ea50","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         msg_args)"},{"line_number":663,"context_line":"                return"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        # Successful response is 204 from DELETE"},{"line_number":666,"context_line":"        if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":667,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":668,"context_line":"            msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_6cd3113a","line":665,"updated":"2017-05-30 15:14:11.000000000","message":"Same here. I think by checking for between 200 and 300 we\u0027re essentially saying \"this is success...\"","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"c7e18afe85886033407d6d24a94d57d78b1a7e0a","unresolved":false,"context_lines":[{"line_number":662,"context_line":"                         msg_args)"},{"line_number":663,"context_line":"                return"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        # Successful response is 204 from DELETE"},{"line_number":666,"context_line":"        if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":667,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":668,"context_line":"            msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"df140735_5d4d9970","line":665,"in_reply_to":"df140735_6cd3113a","updated":"2017-05-30 16:47:37.000000000","message":"ack","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9b2078bf759846d14bbc62acc2578ecef573a31","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        \"\"\"Deletes all inventory records for a resource provider with the"},{"line_number":612,"context_line":"        supplied UUID."},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        First attempt to DELETE the inventory using microversion 1.7. If"},{"line_number":615,"context_line":"        this results in a 406, fail over to a PUT."},{"line_number":616,"context_line":"        \"\"\""},{"line_number":617,"context_line":"        curr \u003d self._get_inventory_and_update_provider_generation(rp_uuid)"}],"source_content_type":"text/x-python","patch_set":8,"id":"df140735_d8409738","line":614,"updated":"2017-05-30 17:03:31.000000000","message":"s/1.7/1.5 :)","commit_id":"750afb4aab293ee27505a5056a9672c7f0da4c56"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8418e40c7a776c9dd53ca330372e22e43e05d49","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            # TODO(cdent): When we\u0027re happy that all placement"},{"line_number":637,"context_line":"            # servers support microversion 1.5 we can remove this"},{"line_number":638,"context_line":"            # call and the associated code."},{"line_number":639,"context_line":"            LOG.debug(\u0027Falling back to placement API microverison 1.0 \u0027"},{"line_number":640,"context_line":"                      \u0027for deleting all inventory for a resource provider.\u0027)"},{"line_number":641,"context_line":"            payload \u003d {"},{"line_number":642,"context_line":"                \u0027resource_provider_generation\u0027: cur_rp_gen,"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_981b3f1a","line":639,"range":{"start_line":639,"start_character":61,"end_line":639,"end_character":63},"updated":"2017-05-30 17:11:43.000000000","message":"s/microverison/microversion/","commit_id":"40819d8e5de09653efc30aac169d754d46cefb46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        r \u003d self.delete(url, version\u003d\"1.5\")"},{"line_number":632,"context_line":"        placement_req_id \u003d get_placement_request_id(r)"},{"line_number":633,"context_line":"        cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":634,"context_line":"        if r.status_code \u003d\u003d 406:"},{"line_number":635,"context_line":"            # microversion 1.5 not available so try the earlier way"},{"line_number":636,"context_line":"            # TODO(cdent): When we\u0027re happy that all placement"},{"line_number":637,"context_line":"            # servers support microversion 1.5 we can remove this"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_ebe4390f","line":634,"range":{"start_line":634,"start_character":28,"end_line":634,"end_character":31},"updated":"2017-06-02 14:55:55.000000000","message":"OK so this is different from the 405 case:\n\nhttps://review.openstack.org/#/c/416669/19/nova/api/openstack/placement/handlers/inventory.py@391\n\nSo 406 means 1.5 isn\u0027t available in placement, 405 means 1.5 does exist, but the client didn\u0027t use that, e.g. they used 1.0 or something.\n\nJust confirming my understanding.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":633,"context_line":"        cur_rp_gen \u003d self._resource_providers[rp_uuid][\u0027generation\u0027]"},{"line_number":634,"context_line":"        if r.status_code \u003d\u003d 406:"},{"line_number":635,"context_line":"            # microversion 1.5 not available so try the earlier way"},{"line_number":636,"context_line":"            # TODO(cdent): When we\u0027re happy that all placement"},{"line_number":637,"context_line":"            # servers support microversion 1.5 we can remove this"},{"line_number":638,"context_line":"            # call and the associated code."},{"line_number":639,"context_line":"            LOG.debug(\u0027Falling back to placement API microversion 1.0 \u0027"},{"line_number":640,"context_line":"                      \u0027for deleting all inventory for a resource provider.\u0027)"},{"line_number":641,"context_line":"            payload \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_2bad919a","line":638,"range":{"start_line":636,"start_character":12,"end_line":638,"end_character":43},"updated":"2017-06-02 14:55:55.000000000","message":"We currently require 1.4 for Ocata+; this is just a reminder that if/when we bump a minimum required version, we need to update nova-status:\n\nhttps://github.com/openstack/nova/blob/046149825c5d6d5ac56a5f5d4498c996dfe8c7ee/nova/cmd/status.py#L208","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            }"},{"line_number":645,"context_line":"            r \u003d self.put(url, payload)"},{"line_number":646,"context_line":"            placement_req_id \u003d get_placement_request_id(r)"},{"line_number":647,"context_line":"            if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":648,"context_line":"                # Update our view of the generation for next time"},{"line_number":649,"context_line":"                updated_inv \u003d r.json()"},{"line_number":650,"context_line":"                new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_4b968540","line":647,"range":{"start_line":647,"start_character":12,"end_line":647,"end_character":42},"updated":"2017-06-02 14:55:55.000000000","message":"Why isn\u0027t this \"if r.status_code \u003d\u003d 200:\" like before?","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b675dec307b747f503beaaaafaa57467ccb95751","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            }"},{"line_number":645,"context_line":"            r \u003d self.put(url, payload)"},{"line_number":646,"context_line":"            placement_req_id \u003d get_placement_request_id(r)"},{"line_number":647,"context_line":"            if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":648,"context_line":"                # Update our view of the generation for next time"},{"line_number":649,"context_line":"                updated_inv \u003d r.json()"},{"line_number":650,"context_line":"                new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_ee3fa222","line":647,"range":{"start_line":647,"start_character":12,"end_line":647,"end_character":42},"in_reply_to":"df140735_1f144743","updated":"2017-06-02 18:09:42.000000000","message":"As discussed with cdent in IRC, I would have preferred to see this in a separate patch below this one in the series because when refactoring code for fallback behavior we shouldn\u0027t introduce new changes, it complicates the review and if anything goes wrong then we have to revert the entire thing. Just a mess I\u0027d rather avoid.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aedb1ba8a0f2cdc24082f414d8595254a94c62fa","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            }"},{"line_number":645,"context_line":"            r \u003d self.put(url, payload)"},{"line_number":646,"context_line":"            placement_req_id \u003d get_placement_request_id(r)"},{"line_number":647,"context_line":"            if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":648,"context_line":"                # Update our view of the generation for next time"},{"line_number":649,"context_line":"                updated_inv \u003d r.json()"},{"line_number":650,"context_line":"                new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_1f144743","line":647,"range":{"start_line":647,"start_character":12,"end_line":647,"end_character":42},"in_reply_to":"df140735_4b968540","updated":"2017-06-02 16:31:51.000000000","message":"Because we\u0027re using the above expression now for testing success.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":655,"context_line":"                    \u0027generation\u0027: new_gen,"},{"line_number":656,"context_line":"                    \u0027placement_req_id\u0027: placement_req_id,"},{"line_number":657,"context_line":"                }"},{"line_number":658,"context_line":"                LOG.info(_LI(\u0027[%(placement_req_id)s] Deleted all inventory \u0027"},{"line_number":659,"context_line":"                             \u0027for resource provider %(rp_uuid)s at generation \u0027"},{"line_number":660,"context_line":"                             \u0027%(generation)i\u0027),"},{"line_number":661,"context_line":"                         msg_args)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_2bb471d0","line":658,"range":{"start_line":658,"start_character":25,"end_line":658,"end_character":28},"updated":"2017-06-02 14:55:55.000000000","message":"Don\u0027t use this anymore for new code.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                         msg_args)"},{"line_number":662,"context_line":"                return"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        if 200 \u003c\u003d r.status_code \u003c 300:"},{"line_number":665,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":666,"context_line":"            msg_args \u003d {"},{"line_number":667,"context_line":"                \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":668,"context_line":"                \u0027placement_req_id\u0027: placement_req_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_eb25590a","line":665,"range":{"start_line":664,"start_character":8,"end_line":665,"end_character":76},"updated":"2017-06-02 14:55:55.000000000","message":"So this is for the case that 1.5 is OK and we get a 204 back, right? And that\u0027s why we have to manually update the generation on our end in the client. A comment for this would be good.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2150e87745832cd05b30e9f8a910c625c098e8c1","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":686,"context_line":"                return"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":689,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":690,"context_line":"        msg_args \u003d {"},{"line_number":691,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":692,"context_line":"            \u0027err\u0027: r.text,"},{"line_number":693,"context_line":"            \u0027placement_req_id\u0027: placement_req_id,"},{"line_number":694,"context_line":"        }"},{"line_number":695,"context_line":"        LOG.error(msg, msg_args)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"    def set_inventory_for_provider(self, rp_uuid, rp_name, inv_data):"},{"line_number":698,"context_line":"        \"\"\"Given the UUID of a provider, set the inventory records for the"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_8b7a5dee","line":695,"range":{"start_line":688,"start_character":8,"end_line":695,"end_character":32},"updated":"2017-06-02 14:55:55.000000000","message":"https://review.openstack.org/#/c/416669/19//COMMIT_MSG@14 says we can get a 404 when trying to delete all inventories if the resource provider no longer exists - shouldn\u0027t we handle that and basically ignore it since that means what we needed to do is already done?","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aedb1ba8a0f2cdc24082f414d8595254a94c62fa","unresolved":false,"context_lines":[{"line_number":685,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":686,"context_line":"                return"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":689,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":690,"context_line":"        msg_args \u003d {"},{"line_number":691,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"},{"line_number":692,"context_line":"            \u0027err\u0027: r.text,"},{"line_number":693,"context_line":"            \u0027placement_req_id\u0027: placement_req_id,"},{"line_number":694,"context_line":"        }"},{"line_number":695,"context_line":"        LOG.error(msg, msg_args)"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"    def set_inventory_for_provider(self, rp_uuid, rp_name, inv_data):"},{"line_number":698,"context_line":"        \"\"\"Given the UUID of a provider, set the inventory records for the"}],"source_content_type":"text/x-python","patch_set":10,"id":"df140735_ff3993d6","line":695,"range":{"start_line":688,"start_character":8,"end_line":695,"end_character":32},"in_reply_to":"df140735_8b7a5dee","updated":"2017-06-02 16:31:51.000000000","message":"Sure, I suppose that\u0027s a fair comment. I\u0027ll fix.","commit_id":"f5e49935870724d09aa804430549f597f58c2c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8943419bd8ebce74c43f316b17e5150e6b45f5a","unresolved":false,"context_lines":[{"line_number":611,"context_line":"            LOG.debug(msg, rp_uuid)"},{"line_number":612,"context_line":"            return"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        msg \u003d _LI(\"Compute node %s reported no inventory but previous \""},{"line_number":615,"context_line":"                  \"inventory was detected. Deleting existing inventory \""},{"line_number":616,"context_line":"                  \"records.\")"},{"line_number":617,"context_line":"        LOG.info(msg, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_170def3d","side":"PARENT","line":614,"range":{"start_line":614,"start_character":14,"end_line":614,"end_character":17},"updated":"2017-06-20 18:36:59.000000000","message":"This is an unrelated change which you didn\u0027t need to make in this patch.","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"fef6701e299b75c4935d71e7aa531733e141a12d","unresolved":false,"context_lines":[{"line_number":611,"context_line":"            LOG.debug(msg, rp_uuid)"},{"line_number":612,"context_line":"            return"},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"        msg \u003d _LI(\"Compute node %s reported no inventory but previous \""},{"line_number":615,"context_line":"                  \"inventory was detected. Deleting existing inventory \""},{"line_number":616,"context_line":"                  \"records.\")"},{"line_number":617,"context_line":"        LOG.info(msg, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_d2ef85ae","side":"PARENT","line":614,"range":{"start_line":614,"start_character":14,"end_line":614,"end_character":17},"in_reply_to":"5f201791_170def3d","updated":"2017-06-20 19:00:14.000000000","message":"Accidentally removed that, probably copying the msg from somwhere else that didn\u0027t have those markers...","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8943419bd8ebce74c43f316b17e5150e6b45f5a","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":644,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":645,"context_line":"            if rc_str is not None:"},{"line_number":646,"context_line":"                msg \u003d _LW(\"[%(placement_req_id)s] We cannot delete inventory \""},{"line_number":647,"context_line":"                          \"%(rc_str)s for resource provider %(rp_uuid)s \""},{"line_number":648,"context_line":"                          \"because the inventory is in use.\")"},{"line_number":649,"context_line":"                msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_525b752d","side":"PARENT","line":646,"range":{"start_line":646,"start_character":22,"end_line":646,"end_character":25},"updated":"2017-06-20 18:36:59.000000000","message":"Again, unrelated.","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"fef6701e299b75c4935d71e7aa531733e141a12d","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":644,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":645,"context_line":"            if rc_str is not None:"},{"line_number":646,"context_line":"                msg \u003d _LW(\"[%(placement_req_id)s] We cannot delete inventory \""},{"line_number":647,"context_line":"                          \"%(rc_str)s for resource provider %(rp_uuid)s \""},{"line_number":648,"context_line":"                          \"because the inventory is in use.\")"},{"line_number":649,"context_line":"                msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_f24721bc","side":"PARENT","line":646,"range":{"start_line":646,"start_character":22,"end_line":646,"end_character":25},"in_reply_to":"5f201791_525b752d","updated":"2017-06-20 19:00:14.000000000","message":"ack","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8943419bd8ebce74c43f316b17e5150e6b45f5a","unresolved":false,"context_lines":[{"line_number":654,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":655,"context_line":"                return"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":658,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":659,"context_line":"        msg_args \u003d {"},{"line_number":660,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_72a43109","side":"PARENT","line":657,"range":{"start_line":657,"start_character":14,"end_line":657,"end_character":17},"updated":"2017-06-20 18:36:59.000000000","message":"And here - the reason I point this out is it\u0027s cluttering up an already semi-complicated change with lots of conditional logic, making it non-trivial to review. These types of cleanups could happen in a separate patch devoted to doing translation marker cleanups.","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"fef6701e299b75c4935d71e7aa531733e141a12d","unresolved":false,"context_lines":[{"line_number":654,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":655,"context_line":"                return"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":658,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":659,"context_line":"        msg_args \u003d {"},{"line_number":660,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_521255b3","side":"PARENT","line":657,"range":{"start_line":657,"start_character":14,"end_line":657,"end_character":17},"in_reply_to":"5f201791_72a43109","updated":"2017-06-20 19:00:14.000000000","message":"fair","commit_id":"7e383b68d3c3fba118f70522a1c53c961fe9039c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8943419bd8ebce74c43f316b17e5150e6b45f5a","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        elif r.status_code \u003d\u003d 404:"},{"line_number":672,"context_line":"            # This can occur if another thread deleted the inventory and the"},{"line_number":673,"context_line":"            # resource provider already"},{"line_number":674,"context_line":"            LOG.debug(\"[%)placement_req_id)s] Resource provider %s deleted by \""},{"line_number":675,"context_line":"                      \"another thread when trying to delete inventory. \""},{"line_number":676,"context_line":"                      \"Ignoring.\")"},{"line_number":677,"context_line":"            self._resource_providers.pop(rp_uuid, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_b24c0977","line":674,"range":{"start_line":674,"start_character":64,"end_line":674,"end_character":66},"updated":"2017-06-20 18:36:59.000000000","message":"And you\u0027re missing the variables for the log message. Missing a test for this case?","commit_id":"628faaa27ca8ee699dc3c0405c20e9a5e5145aef"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f8943419bd8ebce74c43f316b17e5150e6b45f5a","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        elif r.status_code \u003d\u003d 404:"},{"line_number":672,"context_line":"            # This can occur if another thread deleted the inventory and the"},{"line_number":673,"context_line":"            # resource provider already"},{"line_number":674,"context_line":"            LOG.debug(\"[%)placement_req_id)s] Resource provider %s deleted by \""},{"line_number":675,"context_line":"                      \"another thread when trying to delete inventory. \""},{"line_number":676,"context_line":"                      \"Ignoring.\")"},{"line_number":677,"context_line":"            self._resource_providers.pop(rp_uuid, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_12385dd1","line":674,"range":{"start_line":674,"start_character":25,"end_line":674,"end_character":26},"updated":"2017-06-20 18:36:59.000000000","message":"oops","commit_id":"628faaa27ca8ee699dc3c0405c20e9a5e5145aef"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"fef6701e299b75c4935d71e7aa531733e141a12d","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        elif r.status_code \u003d\u003d 404:"},{"line_number":672,"context_line":"            # This can occur if another thread deleted the inventory and the"},{"line_number":673,"context_line":"            # resource provider already"},{"line_number":674,"context_line":"            LOG.debug(\"[%)placement_req_id)s] Resource provider %s deleted by \""},{"line_number":675,"context_line":"                      \"another thread when trying to delete inventory. \""},{"line_number":676,"context_line":"                      \"Ignoring.\")"},{"line_number":677,"context_line":"            self._resource_providers.pop(rp_uuid, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_5239353f","line":674,"range":{"start_line":674,"start_character":25,"end_line":674,"end_character":26},"in_reply_to":"5f201791_12385dd1","updated":"2017-06-20 19:00:14.000000000","message":"damm copy/paste","commit_id":"628faaa27ca8ee699dc3c0405c20e9a5e5145aef"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"fef6701e299b75c4935d71e7aa531733e141a12d","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        elif r.status_code \u003d\u003d 404:"},{"line_number":672,"context_line":"            # This can occur if another thread deleted the inventory and the"},{"line_number":673,"context_line":"            # resource provider already"},{"line_number":674,"context_line":"            LOG.debug(\"[%)placement_req_id)s] Resource provider %s deleted by \""},{"line_number":675,"context_line":"                      \"another thread when trying to delete inventory. \""},{"line_number":676,"context_line":"                      \"Ignoring.\")"},{"line_number":677,"context_line":"            self._resource_providers.pop(rp_uuid, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f201791_123bbd38","line":674,"range":{"start_line":674,"start_character":64,"end_line":674,"end_character":66},"in_reply_to":"5f201791_b24c0977","updated":"2017-06-20 19:00:14.000000000","message":"Ack","commit_id":"628faaa27ca8ee699dc3c0405c20e9a5e5145aef"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dcf32b00664dfd13d6fb1897cd70b97291b3075e","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            LOG.debug(msg, rp_uuid)"},{"line_number":623,"context_line":"            return"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"        msg \u003d _LI(\"Compute node %s reported no inventory but previous \""},{"line_number":626,"context_line":"                  \"inventory was detected. Deleting existing inventory \""},{"line_number":627,"context_line":"                  \"records.\")"},{"line_number":628,"context_line":"        LOG.info(msg, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_3a27a715","line":625,"range":{"start_line":625,"start_character":14,"end_line":625,"end_character":17},"updated":"2017-06-29 15:39:37.000000000","message":"Why was this added back into PS15? We no longer translate log messages.","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"d329a8a99d2fd52b88499625b61a04153265e803","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            LOG.debug(msg, rp_uuid)"},{"line_number":623,"context_line":"            return"},{"line_number":624,"context_line":""},{"line_number":625,"context_line":"        msg \u003d _LI(\"Compute node %s reported no inventory but previous \""},{"line_number":626,"context_line":"                  \"inventory was detected. Deleting existing inventory \""},{"line_number":627,"context_line":"                  \"records.\")"},{"line_number":628,"context_line":"        LOG.info(msg, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_d5464450","line":625,"range":{"start_line":625,"start_character":14,"end_line":625,"end_character":17},"in_reply_to":"3f1d235d_3a27a715","updated":"2017-06-29 15:51:45.000000000","message":"Please see comments in the previous patchset. It was Matt\u0027s request: leave unrelated changes to a separate patch.","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dcf32b00664dfd13d6fb1897cd70b97291b3075e","unresolved":false,"context_lines":[{"line_number":656,"context_line":""},{"line_number":657,"context_line":"                self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"},{"line_number":658,"context_line":"                msg_args[\u0027generation\u0027] \u003d new_gen"},{"line_number":659,"context_line":"                LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory \""},{"line_number":660,"context_line":"                             \"for resource provider %(rp_uuid)s at generation \""},{"line_number":661,"context_line":"                             \"%(generation)i.\"),"},{"line_number":662,"context_line":"                         msg_args)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_fa200ffa","line":659,"range":{"start_line":659,"start_character":25,"end_line":659,"end_character":28},"updated":"2017-06-29 15:39:37.000000000","message":"Ditto","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aee66453cc0de8b683e96e7ead71c1da5361a516","unresolved":false,"context_lines":[{"line_number":656,"context_line":""},{"line_number":657,"context_line":"                self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"},{"line_number":658,"context_line":"                msg_args[\u0027generation\u0027] \u003d new_gen"},{"line_number":659,"context_line":"                LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory \""},{"line_number":660,"context_line":"                             \"for resource provider %(rp_uuid)s at generation \""},{"line_number":661,"context_line":"                             \"%(generation)i.\"),"},{"line_number":662,"context_line":"                         msg_args)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_1d1a096e","line":659,"range":{"start_line":659,"start_character":25,"end_line":659,"end_character":28},"in_reply_to":"3f1d235d_55747499","updated":"2017-07-05 16:12:25.000000000","message":"Well, to be clear, I said you didn\u0027t need to remove the markers for lines that were unchanged by this patch. That doesn\u0027t mean you need to use the markers for new logging calls - that is actually wrong. But I\u0027d just like to birth this thing and get it over with, so let\u0027s follow up with a change to just remove the translation markers in this module in a single patch.","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"d329a8a99d2fd52b88499625b61a04153265e803","unresolved":false,"context_lines":[{"line_number":656,"context_line":""},{"line_number":657,"context_line":"                self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d new_gen"},{"line_number":658,"context_line":"                msg_args[\u0027generation\u0027] \u003d new_gen"},{"line_number":659,"context_line":"                LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory \""},{"line_number":660,"context_line":"                             \"for resource provider %(rp_uuid)s at generation \""},{"line_number":661,"context_line":"                             \"%(generation)i.\"),"},{"line_number":662,"context_line":"                         msg_args)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_55747499","line":659,"range":{"start_line":659,"start_character":25,"end_line":659,"end_character":28},"in_reply_to":"3f1d235d_fa200ffa","updated":"2017-06-29 15:51:45.000000000","message":"same","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9bc1597871c1b2937672170d20f5d971c5edfa0f","unresolved":false,"context_lines":[{"line_number":660,"context_line":"                             \"for resource provider %(rp_uuid)s at generation \""},{"line_number":661,"context_line":"                             \"%(generation)i.\"),"},{"line_number":662,"context_line":"                         msg_args)"},{"line_number":663,"context_line":"                return"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":666,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_5d42c13f","line":663,"range":{"start_line":663,"start_character":16,"end_line":663,"end_character":22},"updated":"2017-07-05 16:18:37.000000000","message":"nit: you should return one level below, at the if branch level for clarity purposes that the rest of code is unrelated to the case we fallbacked to the original PUT call.\n\n  if r.status_code \u003d\u003d 200:\n    \u003cthings_happen\u003e\n  return","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9bc1597871c1b2937672170d20f5d971c5edfa0f","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                return"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":666,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":667,"context_line":"            LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory for \""},{"line_number":668,"context_line":"                         \"resource provider %(rp_uuid)s.\"),"},{"line_number":669,"context_line":"                     msg_args)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_dd29318a","line":666,"updated":"2017-07-05 16:18:37.000000000","message":"That\u0027s a bit unfortunate that we don\u0027t pass the generation bit when deleting an inventory but okay. I know from the RFC standard that a DELETE response is bodiless but asserting that we can just increment the generation bit is quite aggressivly optimistic.\n\nFortunately, given we retry if the cached generation bit is incorrect, I think it\u0027s harmless. Hope I\u0027m not wrong.","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dcf32b00664dfd13d6fb1897cd70b97291b3075e","unresolved":false,"context_lines":[{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":666,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":667,"context_line":"            LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory for \""},{"line_number":668,"context_line":"                         \"resource provider %(rp_uuid)s.\"),"},{"line_number":669,"context_line":"                     msg_args)"},{"line_number":670,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_da1d53be","line":667,"range":{"start_line":667,"start_character":21,"end_line":667,"end_character":24},"updated":"2017-06-29 15:39:37.000000000","message":"Ditto","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"d329a8a99d2fd52b88499625b61a04153265e803","unresolved":false,"context_lines":[{"line_number":664,"context_line":""},{"line_number":665,"context_line":"        if r.status_code \u003d\u003d 204:"},{"line_number":666,"context_line":"            self._resource_providers[rp_uuid][\u0027generation\u0027] \u003d cur_rp_gen + 1"},{"line_number":667,"context_line":"            LOG.info(_LI(\"[%(placement_req_id)s] Deleted all inventory for \""},{"line_number":668,"context_line":"                         \"resource provider %(rp_uuid)s.\"),"},{"line_number":669,"context_line":"                     msg_args)"},{"line_number":670,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_f56260d8","line":667,"range":{"start_line":667,"start_character":21,"end_line":667,"end_character":24},"in_reply_to":"3f1d235d_da1d53be","updated":"2017-06-29 15:51:45.000000000","message":"same","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dcf32b00664dfd13d6fb1897cd70b97291b3075e","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":682,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":683,"context_line":"            if rc_str is not None:"},{"line_number":684,"context_line":"                msg \u003d _LW(\"[%(placement_req_id)s] We cannot delete inventory \""},{"line_number":685,"context_line":"                          \"%(rc_str)s for resource provider %(rp_uuid)s \""},{"line_number":686,"context_line":"                          \"because the inventory is in use.\")"},{"line_number":687,"context_line":"                msg_args[\u0027rc_str\u0027] \u003d rc_str"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_9a7d9be9","line":684,"range":{"start_line":684,"start_character":22,"end_line":684,"end_character":25},"updated":"2017-06-29 15:39:37.000000000","message":"Again","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"d329a8a99d2fd52b88499625b61a04153265e803","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":682,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":683,"context_line":"            if rc_str is not None:"},{"line_number":684,"context_line":"                msg \u003d _LW(\"[%(placement_req_id)s] We cannot delete inventory \""},{"line_number":685,"context_line":"                          \"%(rc_str)s for resource provider %(rp_uuid)s \""},{"line_number":686,"context_line":"                          \"because the inventory is in use.\")"},{"line_number":687,"context_line":"                msg_args[\u0027rc_str\u0027] \u003d rc_str"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_959facb3","line":684,"range":{"start_line":684,"start_character":22,"end_line":684,"end_character":25},"in_reply_to":"3f1d235d_9a7d9be9","updated":"2017-06-29 15:51:45.000000000","message":"same","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dcf32b00664dfd13d6fb1897cd70b97291b3075e","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":689,"context_line":"                return"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":692,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: \""},{"line_number":693,"context_line":"                  \"%(err)s.\")"},{"line_number":694,"context_line":"        msg_args[\u0027err\u0027] \u003d r.text"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_7a82bfca","line":691,"range":{"start_line":691,"start_character":14,"end_line":691,"end_character":17},"updated":"2017-06-29 15:39:37.000000000","message":"And again","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"d329a8a99d2fd52b88499625b61a04153265e803","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":689,"context_line":"                return"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        msg \u003d _LE(\"[%(placement_req_id)s] Failed to delete inventory for \""},{"line_number":692,"context_line":"                  \"resource provider %(rp_uuid)s. Got error response: \""},{"line_number":693,"context_line":"                  \"%(err)s.\")"},{"line_number":694,"context_line":"        msg_args[\u0027err\u0027] \u003d r.text"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_55a914dd","line":691,"range":{"start_line":691,"start_character":14,"end_line":691,"end_character":17},"in_reply_to":"3f1d235d_7a82bfca","updated":"2017-06-29 15:51:45.000000000","message":"same","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"}],"nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6745171995c81328b230f537685fdab4c6d8ea50","unresolved":false,"context_lines":[{"line_number":645,"context_line":"- name: delete empty inventories"},{"line_number":646,"context_line":"  DELETE: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"},{"line_number":647,"context_line":"  request_headers:"},{"line_number":648,"context_line":"      openstack-api-version: placement 1.5"},{"line_number":649,"context_line":"  status: 204"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"- name: get inventories after deletions"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"df140735_ec21614f","line":648,"updated":"2017-05-30 15:14:11.000000000","message":"Reference here for my earlier comment about microversion 1.7 not being the correct version to send in the self.delete() call in the report client.","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"c7e18afe85886033407d6d24a94d57d78b1a7e0a","unresolved":false,"context_lines":[{"line_number":645,"context_line":"- name: delete empty inventories"},{"line_number":646,"context_line":"  DELETE: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"},{"line_number":647,"context_line":"  request_headers:"},{"line_number":648,"context_line":"      openstack-api-version: placement 1.5"},{"line_number":649,"context_line":"  status: 204"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"- name: get inventories after deletions"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"df140735_ddae49e6","line":648,"in_reply_to":"df140735_ec21614f","updated":"2017-05-30 16:47:37.000000000","message":"Ack","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6745171995c81328b230f537685fdab4c6d8ea50","unresolved":false,"context_lines":[{"line_number":661,"context_line":"      openstack-api-version: placement 1.4"},{"line_number":662,"context_line":"  data:"},{"line_number":663,"context_line":"      resource_provider_generation: 8"},{"line_number":664,"context_line":"      inventories: {}"},{"line_number":665,"context_line":"  response_json_paths:"},{"line_number":666,"context_line":"      $.resource_provider_generation: 9"},{"line_number":667,"context_line":"      $.inventories: {}"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"df140735_cc1e9d0b","line":664,"updated":"2017-05-30 15:14:11.000000000","message":"Kind of weird that not changing anything results in a generation increment... but I suppose this doesn\u0027t hurt anything.","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"c7e18afe85886033407d6d24a94d57d78b1a7e0a","unresolved":false,"context_lines":[{"line_number":661,"context_line":"      openstack-api-version: placement 1.4"},{"line_number":662,"context_line":"  data:"},{"line_number":663,"context_line":"      resource_provider_generation: 8"},{"line_number":664,"context_line":"      inventories: {}"},{"line_number":665,"context_line":"  response_json_paths:"},{"line_number":666,"context_line":"      $.resource_provider_generation: 9"},{"line_number":667,"context_line":"      $.inventories: {}"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"df140735_dd940947","line":664,"in_reply_to":"df140735_cc1e9d0b","updated":"2017-05-30 16:47:37.000000000","message":"Please see suggestions Chris Dent gave on Patch Set 5 for handling generation. If this does not sound right, I\u0027ll be glad to think on alternatives.","commit_id":"8e5541ef78fa7033b7514a52a597de564ba317bf"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"8da27a0e7c5339ca81eabc8fc3a093ab25ee2af3","unresolved":false,"context_lines":[{"line_number":652,"context_line":"  GET: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"},{"line_number":653,"context_line":"  response_json_paths:"},{"line_number":654,"context_line":"      $.resource_provider_generation: 8"},{"line_number":655,"context_line":"      $.inventories: {}"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"- name: delete all inventory with put"},{"line_number":658,"context_line":"  PUT: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"df140735_22a7eb0d","line":655,"updated":"2017-06-02 20:13:44.000000000","message":"Don\u0027t you need to add some inventory back here, so that you can demonstrate that \u0027delete all inventory with put\u0027 below actually deletes something?","commit_id":"cfd4ea042914372739c2ae37cdb5c0e7011aa19c"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"a3f58df3c0be0f6ceb4b4cc475304dd49e134200","unresolved":false,"context_lines":[{"line_number":652,"context_line":"  GET: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"},{"line_number":653,"context_line":"  response_json_paths:"},{"line_number":654,"context_line":"      $.resource_provider_generation: 8"},{"line_number":655,"context_line":"      $.inventories: {}"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"- name: delete all inventory with put"},{"line_number":658,"context_line":"  PUT: /resource_providers/$ENVIRON[\u0027RP_UUID\u0027]/inventories"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"df140735_97ed5b8d","line":655,"in_reply_to":"df140735_22a7eb0d","updated":"2017-06-07 16:58:45.000000000","message":"good catch. I\u0027ll post an inventory before deleting with put.","commit_id":"cfd4ea042914372739c2ae37cdb5c0e7011aa19c"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aee66453cc0de8b683e96e7ead71c1da5361a516","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        result \u003d self.client._delete_inventory(cn.uuid)"},{"line_number":943,"context_line":"        self.assertIsNone(result)"},{"line_number":944,"context_line":"        self.assertNotIn(cn.uuid, self.client._resource_providers)"},{"line_number":945,"context_line":"        self.assertTrue(mock_debug.called)"},{"line_number":946,"context_line":"        self.assertIn(\u0027deleted by another thread\u0027, mock_debug.call_args[0][0])"},{"line_number":947,"context_line":"        self.assertEqual(uuids.request_id,"},{"line_number":948,"context_line":"                         mock_debug.call_args[0][1][\u0027placement_req_id\u0027])"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"    @mock.patch.object(report.LOG, \u0027error\u0027)"},{"line_number":951,"context_line":"    @mock.patch.object(report.LOG, \u0027warning\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f1d235d_fa53d337","line":948,"range":{"start_line":945,"start_character":8,"end_line":948,"end_character":72},"updated":"2017-07-05 16:12:25.000000000","message":"I don\u0027t want to drag this change on, but we do capture the logging output stream in the tests and could assert the log message in there using something like this (copied from another test):\n\n            self.assertIn(\n                \u0027Migrating instance to desthost finished successfully.\u0027,\n                self.stdlog.logger.output)\n\nThen the unit test is not strictly tied to the log level or the formatting in case that changes, but I won\u0027t hold this up on it.","commit_id":"86749004bb0733f6b8b902209db6519ca580633a"}]}
