)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1ef6fcbb6d24a4f1ad681e0b54247a924e010362","unresolved":false,"context_lines":[{"line_number":887,"context_line":"            LOG.info(_LI(\u0027Submitted allocation for instance\u0027),"},{"line_number":888,"context_line":"                     instance\u003dinstance)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def claim_resources(self, consumer_uuid, alloc_request, project_id,"},{"line_number":891,"context_line":"                        user_id):"},{"line_number":892,"context_line":"        \"\"\"Creates allocation records for the supplied instance UUID against"},{"line_number":893,"context_line":"        the supplied resource providers."}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_61b7bd88","line":890,"range":{"start_line":890,"start_character":8,"end_line":890,"end_character":23},"updated":"2017-07-12 14:58:31.000000000","message":"Just a question, why shouldn\u0027t we just use _allocate_for_instance ?\n\nI know we want to use a JSON body, but why couldn\u0027t we use the above method ? Also, I think it could be nice to verify if the allocation is already created before putting, nope ?","commit_id":"14c36cc088641bb3ae5c16d58b2b302658de2336"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f34eaaded92e68ea48f8e917f5be93f61d1e1304","unresolved":false,"context_lines":[{"line_number":887,"context_line":"            LOG.info(_LI(\u0027Submitted allocation for instance\u0027),"},{"line_number":888,"context_line":"                     instance\u003dinstance)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def claim_resources(self, consumer_uuid, alloc_request, project_id,"},{"line_number":891,"context_line":"                        user_id):"},{"line_number":892,"context_line":"        \"\"\"Creates allocation records for the supplied instance UUID against"},{"line_number":893,"context_line":"        the supplied resource providers."}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_cedc791a","line":890,"range":{"start_line":890,"start_character":8,"end_line":890,"end_character":23},"in_reply_to":"1f1a1f67_61b7bd88","updated":"2017-07-12 16:23:34.000000000","message":"Part of the reason was to remove calls to LOG.info() after Matt mentioned that we should not log anything unnecessary in the scheduler code paths.\n\nThe other reason was as you noted: keep the allocation request as opaque to the caller as possible.","commit_id":"14c36cc088641bb3ae5c16d58b2b302658de2336"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1ef6fcbb6d24a4f1ad681e0b54247a924e010362","unresolved":false,"context_lines":[{"line_number":911,"context_line":"                {\u0027uuid\u0027: consumer_uuid,"},{"line_number":912,"context_line":"                 \u0027code\u0027: r.status_code,"},{"line_number":913,"context_line":"                 \u0027text\u0027: r.text})"},{"line_number":914,"context_line":"        return r.status_code \u003d\u003d 204"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"    @safe_connect"},{"line_number":917,"context_line":"    def put_allocations(self, rp_uuid, consumer_uuid, alloc_data, project_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_21554551","line":914,"updated":"2017-07-12 14:58:31.000000000","message":"++","commit_id":"14c36cc088641bb3ae5c16d58b2b302658de2336"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2aeabb6440386966480ccb6528b206b4a5699de","unresolved":false,"context_lines":[{"line_number":900,"context_line":"        :returns: True if the allocations were created, False otherwise."},{"line_number":901,"context_line":"        \"\"\""},{"line_number":902,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % consumer_uuid"},{"line_number":903,"context_line":"        payload \u003d copy.deepcopy(alloc_request)"},{"line_number":904,"context_line":"        payload[\u0027project_id\u0027] \u003d project_id"},{"line_number":905,"context_line":"        payload[\u0027user_id\u0027] \u003d user_id"},{"line_number":906,"context_line":"        r \u003d self.put(url, payload, version\u003d\u00271.10\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_6a8536ad","line":903,"updated":"2017-07-13 09:35:40.000000000","message":"nit: I wonder whether we should add a comment explaining that given the alloc_requests is mutable, we don\u0027t want to add the project and user IDs. Meh, it\u0027s not a problem.","commit_id":"aa29fe7fcf58139cc6117bdd456d79dbde6de1fe"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d2aeabb6440386966480ccb6528b206b4a5699de","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        payload[\u0027user_id\u0027] \u003d user_id"},{"line_number":906,"context_line":"        r \u003d self.put(url, payload, version\u003d\u00271.10\u0027)"},{"line_number":907,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":908,"context_line":"            LOG.warning("},{"line_number":909,"context_line":"                \u0027Unable to submit allocation for instance \u0027"},{"line_number":910,"context_line":"                \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":911,"context_line":"                {\u0027uuid\u0027: consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_2aa85e1d","line":908,"range":{"start_line":908,"start_character":12,"end_line":908,"end_character":24},"updated":"2017-07-13 09:35:40.000000000","message":"shouldn\u0027t we translate the log ?","commit_id":"aa29fe7fcf58139cc6117bdd456d79dbde6de1fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1da51cd58adfe307fc613574bbd494e90ab02a71","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        payload[\u0027user_id\u0027] \u003d user_id"},{"line_number":906,"context_line":"        r \u003d self.put(url, payload, version\u003d\u00271.10\u0027)"},{"line_number":907,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":908,"context_line":"            LOG.warning("},{"line_number":909,"context_line":"                \u0027Unable to submit allocation for instance \u0027"},{"line_number":910,"context_line":"                \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":911,"context_line":"                {\u0027uuid\u0027: consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_db308beb","line":908,"range":{"start_line":908,"start_character":12,"end_line":908,"end_character":24},"in_reply_to":"1f1a1f67_25b53132","updated":"2017-07-13 16:44:42.000000000","message":"Wow you have been out of the loop...","commit_id":"aa29fe7fcf58139cc6117bdd456d79dbde6de1fe"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c4b0646c4e7361f718fce67b9c8b6a1939db297a","unresolved":false,"context_lines":[{"line_number":905,"context_line":"        payload[\u0027user_id\u0027] \u003d user_id"},{"line_number":906,"context_line":"        r \u003d self.put(url, payload, version\u003d\u00271.10\u0027)"},{"line_number":907,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":908,"context_line":"            LOG.warning("},{"line_number":909,"context_line":"                \u0027Unable to submit allocation for instance \u0027"},{"line_number":910,"context_line":"                \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":911,"context_line":"                {\u0027uuid\u0027: consumer_uuid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_25b53132","line":908,"range":{"start_line":908,"start_character":12,"end_line":908,"end_character":24},"in_reply_to":"1f1a1f67_2aa85e1d","updated":"2017-07-13 09:38:33.000000000","message":"Ha, nevermind https://docs.openstack.org/nova/latest/i18n.html","commit_id":"aa29fe7fcf58139cc6117bdd456d79dbde6de1fe"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1da51cd58adfe307fc613574bbd494e90ab02a71","unresolved":false,"context_lines":[{"line_number":907,"context_line":"        if r.status_code !\u003d 204:"},{"line_number":908,"context_line":"            LOG.warning("},{"line_number":909,"context_line":"                \u0027Unable to submit allocation for instance \u0027"},{"line_number":910,"context_line":"                \u0027%(uuid)s (%(code)i %(text)s)\u0027,"},{"line_number":911,"context_line":"                {\u0027uuid\u0027: consumer_uuid,"},{"line_number":912,"context_line":"                 \u0027code\u0027: r.status_code,"},{"line_number":913,"context_line":"                 \u0027text\u0027: r.text})"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_1b3cc3bd","line":910,"range":{"start_line":910,"start_character":19,"end_line":910,"end_character":23},"updated":"2017-07-13 16:44:42.000000000","message":"nit: could clean this up in a follow up, but use the instance_uuid\u003dconsumer_uuid kwarg in the LOG.warning method, then we get the nice context formatting in the logs.","commit_id":"aa29fe7fcf58139cc6117bdd456d79dbde6de1fe"}]}
