)]}'
{"nova/compute/api.py":[{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"eb0b8ba7fc3de6179be631551dc39aa0d90bc5e9","unresolved":false,"context_lines":[{"line_number":4553,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":4554,"context_line":"                                                    \"addhost.start\","},{"line_number":4555,"context_line":"                                                    aggregate_payload)"},{"line_number":4556,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4557,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4558,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4559,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_9e26d666","line":4556,"range":{"start_line":4556,"start_character":30,"end_line":4556,"end_character":49},"updated":"2017-03-07 20:49:58.000000000","message":"This should be HostMappingNotFound","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a26b6c02ac53cdbab22d603edc4869e87184e3d4","unresolved":false,"context_lines":[{"line_number":4553,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":4554,"context_line":"                                                    \"addhost.start\","},{"line_number":4555,"context_line":"                                                    aggregate_payload)"},{"line_number":4556,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4557,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4558,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4559,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_a1829ffe","line":4556,"range":{"start_line":4556,"start_character":30,"end_line":4556,"end_character":49},"in_reply_to":"9a30ddce_9e26d666","updated":"2017-03-07 21:11:00.000000000","message":"It\u0027s both actually.","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"eb0b8ba7fc3de6179be631551dc39aa0d90bc5e9","unresolved":false,"context_lines":[{"line_number":4582,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":4583,"context_line":"                                                    \"removehost.start\","},{"line_number":4584,"context_line":"                                                    aggregate_payload)"},{"line_number":4585,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4586,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4587,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4588,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_be2b9a2f","line":4585,"range":{"start_line":4585,"start_character":30,"end_line":4585,"end_character":49},"updated":"2017-03-07 20:49:58.000000000","message":"ditto","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"eb0b8ba7fc3de6179be631551dc39aa0d90bc5e9","unresolved":false,"context_lines":[{"line_number":4584,"context_line":"                                                    aggregate_payload)"},{"line_number":4585,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4586,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4587,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4588,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"},{"line_number":4589,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"},{"line_number":4590,"context_line":"        aggregate.delete_host(host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_7e304257","line":4587,"updated":"2017-03-07 20:49:58.000000000","message":"db connection is changed permanently here. why are we not using context manager for setting target cell here?","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"54c80a6c258e4a3e3fa728b262b7f96ea4ab11ba","unresolved":false,"context_lines":[{"line_number":4584,"context_line":"                                                    aggregate_payload)"},{"line_number":4585,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4586,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4587,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4588,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"},{"line_number":4589,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"},{"line_number":4590,"context_line":"        aggregate.delete_host(host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_d9ca041a","line":4587,"in_reply_to":"9a30ddce_21778f3b","updated":"2017-03-08 15:57:14.000000000","message":"got it. Thanks for the explanation!","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a26b6c02ac53cdbab22d603edc4869e87184e3d4","unresolved":false,"context_lines":[{"line_number":4584,"context_line":"                                                    aggregate_payload)"},{"line_number":4585,"context_line":"        # validates the host; ComputeHostNotFound is raised if invalid"},{"line_number":4586,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4587,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4588,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"},{"line_number":4589,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"},{"line_number":4590,"context_line":"        aggregate.delete_host(host_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_21778f3b","line":4587,"in_reply_to":"9a30ddce_7e304257","updated":"2017-03-07 21:11:00.000000000","message":"This is the pattern we\u0027ve been using for targeted operations that necessarily involve one cell. We set the context once we know what cell it pertains to so that subsequent calls (like all the ones below and any that occur in our caller) properly target the correct cell.","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d179e7217d3a1fbc97b724e5425c6750b25afe6b","unresolved":false,"context_lines":[{"line_number":4471,"context_line":"        compute_utils.notify_about_aggregate_update(context,"},{"line_number":4472,"context_line":"                                                    \"addhost.start\","},{"line_number":4473,"context_line":"                                                    aggregate_payload)"},{"line_number":4474,"context_line":"        # validates the host; HostMappingNotFound or ComputeNodeNotFound"},{"line_number":4475,"context_line":"        # is raised if invalid"},{"line_number":4476,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4477,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a30ddce_fd824193","line":4474,"range":{"start_line":4474,"start_character":53,"end_line":4474,"end_character":72},"updated":"2017-03-09 02:24:44.000000000","message":"ComputeHostNotFound","commit_id":"6de1407886830bc7696fe32d6ca38c2838676ed8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d179e7217d3a1fbc97b724e5425c6750b25afe6b","unresolved":false,"context_lines":[{"line_number":4474,"context_line":"        # validates the host; HostMappingNotFound or ComputeNodeNotFound"},{"line_number":4475,"context_line":"        # is raised if invalid"},{"line_number":4476,"context_line":"        mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":4477,"context_line":"        nova_context.set_target_cell(context, mapping.cell_mapping)"},{"line_number":4478,"context_line":"        objects.Service.get_by_compute_host(context, host_name)"},{"line_number":4479,"context_line":""},{"line_number":4480,"context_line":"        aggregate \u003d objects.Aggregate.get_by_id(context, aggregate_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a30ddce_7d3c91e2","line":4477,"updated":"2017-03-09 02:24:44.000000000","message":"If only your target_host decorator in the other patch in this series could be used then we wouldn\u0027t need this here, but the args on this method don\u0027t line up.","commit_id":"6de1407886830bc7696fe32d6ca38c2838676ed8"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"eb0b8ba7fc3de6179be631551dc39aa0d90bc5e9","unresolved":false,"context_lines":[{"line_number":11038,"context_line":"        self.assertEqual(len(aggr.hosts), len(values[0][1]))"},{"line_number":11039,"context_line":""},{"line_number":11040,"context_line":"    def test_add_host_to_aggregate_raise_not_found(self):"},{"line_number":11041,"context_line":"        # Ensure ComputeHostNotFound is raised when adding invalid host."},{"line_number":11042,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":11043,"context_line":"                                         \u0027fake_zone\u0027)"},{"line_number":11044,"context_line":"        fake_notifier.NOTIFICATIONS \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_4abc9d05","line":11041,"range":{"start_line":11041,"start_character":17,"end_line":11041,"end_character":36},"updated":"2017-03-07 20:49:58.000000000","message":"s/computeHostNotFound/HostMappingNotFound","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":18337,"name":"Sujitha","email":"sujitha.neti@intel.com","username":"Sujitha"},"change_message_id":"eb0b8ba7fc3de6179be631551dc39aa0d90bc5e9","unresolved":false,"context_lines":[{"line_number":11084,"context_line":"        mock_az.assert_called_with(self.context, host_to_remove)"},{"line_number":11085,"context_line":""},{"line_number":11086,"context_line":"    def test_remove_host_from_aggregate_raise_not_found(self):"},{"line_number":11087,"context_line":"        # Ensure ComputeHostNotFound is raised when removing invalid host."},{"line_number":11088,"context_line":"        _create_service_entries(self.context, [[\u0027fake_zone\u0027, [\u0027fake_host\u0027]]])"},{"line_number":11089,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":11090,"context_line":"                                         \u0027fake_zone\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_6ad08154","line":11087,"updated":"2017-03-07 20:49:58.000000000","message":"s/computeHostNotFound/HostMappingNotFound","commit_id":"66b3c5f333b5bb94cc7e0944a54eceb6ec3ccb19"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"52c763fadad4183c01924c9da493077f05a20e29","unresolved":false,"context_lines":[{"line_number":10587,"context_line":"                                                             \u0027fake_host2\u0027]],"},{"line_number":10588,"context_line":"                                             [\u0027avail_zone2\u0027, [\u0027fake_host3\u0027]]]):"},{"line_number":10589,"context_line":"    cells \u003d [c for c in objects.CellMappingList.get_all(context)"},{"line_number":10590,"context_line":"             if c.uuid !\u003d objects.CellMapping.CELL0_UUID]"},{"line_number":10591,"context_line":"    for (avail_zone, hosts) in values:"},{"line_number":10592,"context_line":"        for host in hosts:"},{"line_number":10593,"context_line":"            db.service_create(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_3e8db47b","line":10590,"updated":"2017-03-09 00:22:31.000000000","message":"I presume you\u0027re just not wanting to do the double-counting again here. Probably worth just adding a quick code comment saying that.","commit_id":"0e91d5ab19ca702893d5f57356b43b25450f640f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b4f3ab1df6e1fe1948b09c2c6441ee8d88897996","unresolved":false,"context_lines":[{"line_number":10587,"context_line":"                                                             \u0027fake_host2\u0027]],"},{"line_number":10588,"context_line":"                                             [\u0027avail_zone2\u0027, [\u0027fake_host3\u0027]]]):"},{"line_number":10589,"context_line":"    cells \u003d [c for c in objects.CellMappingList.get_all(context)"},{"line_number":10590,"context_line":"             if c.uuid !\u003d objects.CellMapping.CELL0_UUID]"},{"line_number":10591,"context_line":"    for (avail_zone, hosts) in values:"},{"line_number":10592,"context_line":"        for host in hosts:"},{"line_number":10593,"context_line":"            db.service_create(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_9eace0a1","line":10590,"in_reply_to":"9a30ddce_3e8db47b","updated":"2017-03-09 00:29:51.000000000","message":"No, I\u0027m just trying to get a list of cells from the fixture so I can use it below on 10600, but I\u0027ll add a comment.","commit_id":"0e91d5ab19ca702893d5f57356b43b25450f640f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"52c2fdc6fc71c47f2c88da7e7e5fbf5cb958aa7d","unresolved":false,"context_lines":[{"line_number":10587,"context_line":"                                                             \u0027fake_host2\u0027]],"},{"line_number":10588,"context_line":"                                             [\u0027avail_zone2\u0027, [\u0027fake_host3\u0027]]]):"},{"line_number":10589,"context_line":"    cells \u003d [c for c in objects.CellMappingList.get_all(context)"},{"line_number":10590,"context_line":"             if c.uuid !\u003d objects.CellMapping.CELL0_UUID]"},{"line_number":10591,"context_line":"    for (avail_zone, hosts) in values:"},{"line_number":10592,"context_line":"        for host in hosts:"},{"line_number":10593,"context_line":"            db.service_create(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_7e2f2cf6","line":10590,"in_reply_to":"9a30ddce_9eace0a1","updated":"2017-03-09 00:38:53.000000000","message":"Actually, I\u0027ll do you one better and spray the hosts we create across all the cells to validate that we\u0027re actually doing the right thing in the API.","commit_id":"0e91d5ab19ca702893d5f57356b43b25450f640f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"52c763fadad4183c01924c9da493077f05a20e29","unresolved":false,"context_lines":[{"line_number":11042,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":11043,"context_line":"                                         \u0027fake_zone\u0027)"},{"line_number":11044,"context_line":"        fake_notifier.NOTIFICATIONS \u003d []"},{"line_number":11045,"context_line":"        self.assertRaises(exception.HostMappingNotFound,"},{"line_number":11046,"context_line":"                          self.api.add_host_to_aggregate,"},{"line_number":11047,"context_line":"                          self.context, aggr.id, \u0027invalid_host\u0027)"},{"line_number":11048,"context_line":"        self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_fec07c7e","line":11045,"updated":"2017-03-09 00:22:31.000000000","message":"Is ComputeHostNotFound actually ever raised any more? If it is, probably worth adding a unit test for it.","commit_id":"0e91d5ab19ca702893d5f57356b43b25450f640f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b4f3ab1df6e1fe1948b09c2c6441ee8d88897996","unresolved":false,"context_lines":[{"line_number":11042,"context_line":"        aggr \u003d self.api.create_aggregate(self.context, \u0027fake_aggregate\u0027,"},{"line_number":11043,"context_line":"                                         \u0027fake_zone\u0027)"},{"line_number":11044,"context_line":"        fake_notifier.NOTIFICATIONS \u003d []"},{"line_number":11045,"context_line":"        self.assertRaises(exception.HostMappingNotFound,"},{"line_number":11046,"context_line":"                          self.api.add_host_to_aggregate,"},{"line_number":11047,"context_line":"                          self.context, aggr.id, \u0027invalid_host\u0027)"},{"line_number":11048,"context_line":"        self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_decf387d","line":11045,"in_reply_to":"9a30ddce_fec07c7e","updated":"2017-03-09 00:29:51.000000000","message":"It is possible, but highly unlikely. But, okay.","commit_id":"0e91d5ab19ca702893d5f57356b43b25450f640f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d179e7217d3a1fbc97b724e5425c6750b25afe6b","unresolved":false,"context_lines":[{"line_number":10598,"context_line":"            cell \u003d cells[index % len(cells)]"},{"line_number":10599,"context_line":"            index +\u003d 1"},{"line_number":10600,"context_line":"            with context.target_cell(ctxt, cell):"},{"line_number":10601,"context_line":"                    s \u003d objects.Service(context\u003dctxt,"},{"line_number":10602,"context_line":"                                        host\u003dhost,"},{"line_number":10603,"context_line":"                                        binary\u003d\u0027nova-compute\u0027,"},{"line_number":10604,"context_line":"                                        topic\u003d\u0027compute\u0027,"},{"line_number":10605,"context_line":"                                        report_count\u003d0)"},{"line_number":10606,"context_line":"                    s.create()"},{"line_number":10607,"context_line":"            hm \u003d objects.HostMapping(context\u003dctxt,"},{"line_number":10608,"context_line":"                                     cell_mapping\u003dcell,"},{"line_number":10609,"context_line":"                                     host\u003dhost)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a30ddce_001fae5f","line":10606,"range":{"start_line":10601,"start_character":0,"end_line":10606,"end_character":30},"updated":"2017-03-09 02:24:44.000000000","message":"nit: alignment","commit_id":"6de1407886830bc7696fe32d6ca38c2838676ed8"}]}
