)]}'
{"blazar/plugins/oshosts/host_plugin.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"3739d0172a27835ea4a6db825d4365174b0714e9","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        added_hosts \u003d []"},{"line_number":171,"context_line":"        for allocation in db_api.host_allocation_get_all_by_values("},{"line_number":172,"context_line":"                reservation_id\u003dhost_reservation[\u0027reservation_id\u0027]):"},{"line_number":173,"context_line":"            try:"},{"line_number":174,"context_line":"                host \u003d db_api.host_get(allocation[\u0027compute_host_id\u0027])"},{"line_number":175,"context_line":"                pool.add_computehost(host_reservation[\u0027aggregate_id\u0027],"},{"line_number":176,"context_line":"                                     host[\u0027service_name\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_2f25a4c0","line":173,"updated":"2018-12-18 08:58:06.000000000","message":"This type of problems usually happen in both the host reservation and the instance reservation[1].  My suggestion is ReservationPool class handles the exception internally with add_computehost() accepts multi hosts as its argument or using new bulk method, like set_computehosts(hosts, aggregate).\n\nHow do you think?\n\nhttps://github.com/openstack/blazar/blob/master/blazar/plugins/instances/instance_plugin.py#L459","commit_id":"d894fa8b8f3c5bf12d30a39605753deafb08d8d6"}],"blazar/tests/utils/openstack/test_nova.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ee4fe5c57212873d6af3ec34009d73d44da73180","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        check0 \u003d self.nova.aggregates.add_host"},{"line_number":287,"context_line":"        check0.assert_any_call(self.fake_aggregate.id, \u0027host3\u0027)"},{"line_number":288,"context_line":"        check1 \u003d self.nova.aggregates.remove_host"},{"line_number":289,"context_line":"        check1.assert_any_call(self.fake_aggregate.id, \u0027host3\u0027)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_add_computehost_with_host_id(self):"},{"line_number":292,"context_line":"        # NOTE(sbauza): Freepool.hosts only contains names of hosts, not UUIDs"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_81650a48","side":"PARENT","line":289,"updated":"2019-03-19 07:43:54.000000000","message":"Okay, good catch...","commit_id":"7dc9a6a7bfe35ffb204a24ab4ad8e32d4e3496ea"}],"blazar/utils/openstack/nova.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ee4fe5c57212873d6af3ec34009d73d44da73180","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        Each host must exist and be in the freepool, otherwise raise an error."},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        :param pool: Name or UUID of the pool to rattach the host"},{"line_number":336,"context_line":"        :param hosts: Names (not UUID) of hosts to associate"},{"line_number":337,"context_line":"        :type host: str or list of str"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_21e536dd","line":335,"range":{"start_line":335,"start_character":49,"end_line":335,"end_character":56},"updated":"2019-03-19 07:43:54.000000000","message":"I\u0027m not sure this is a typo of attach or a proper word that I don\u0027t know.","commit_id":"3ef8b6638a84a73e9ff2db857d04f0112e45202b"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ee4fe5c57212873d6af3ec34009d73d44da73180","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        :param pool: Name or UUID of the pool to rattach the host"},{"line_number":336,"context_line":"        :param hosts: Names (not UUID) of hosts to associate"},{"line_number":337,"context_line":"        :type host: str or list of str"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        Return the related aggregate."},{"line_number":340,"context_line":"        Raise an aggregate exception if something wrong."}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_c116b2f2","line":337,"range":{"start_line":337,"start_character":14,"end_line":337,"end_character":18},"updated":"2019-03-19 07:43:54.000000000","message":"hosts","commit_id":"3ef8b6638a84a73e9ff2db857d04f0112e45202b"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ee4fe5c57212873d6af3ec34009d73d44da73180","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                except nova_exception.Conflict as e:"},{"line_number":378,"context_line":"                    raise manager_exceptions.AggregateAlreadyHasHost("},{"line_number":379,"context_line":"                        pool\u003dpool, host\u003dhost, nova_exception\u003dstr(e))"},{"line_number":380,"context_line":"        except Exception as e:"},{"line_number":381,"context_line":"            if added_hosts:"},{"line_number":382,"context_line":"                LOG.warn(\u0027Removing hosts added to aggregate %s: %s\u0027,"},{"line_number":383,"context_line":"                         agg.id, added_hosts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_81bf4acf","line":380,"range":{"start_line":380,"start_character":8,"end_line":380,"end_character":30},"updated":"2019-03-19 07:43:54.000000000","message":"It is good to use oslo_utils.save_and_reraise_exception() instead","commit_id":"3ef8b6638a84a73e9ff2db857d04f0112e45202b"}],"releasenotes/notes/move-hosts-back-to-freepool-041fcda9fb3fc6c3.yaml":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ee4fe5c57212873d6af3ec34009d73d44da73180","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5fc1f717_01c7da47","line":8,"updated":"2019-03-19 07:43:54.000000000","message":"It might be worth adding the bug link","commit_id":"3ef8b6638a84a73e9ff2db857d04f0112e45202b"}]}
