)]}'
{"nova/api/openstack/compute/contrib/hypervisors.py":[{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"22db94437dbfa4c5e60cbb9e5a3ac9638f11b364","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        req.cache_db_compute_nodes(compute_nodes)"},{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_52e56407","line":91,"updated":"2015-03-02 22:02:07.000000000","message":"can we use the existing host_api call instead?\nhttps://github.com/openstack/nova/blob/master/nova/compute/cells_api.py#L608","commit_id":"115e90d700bf00691b764293e912eb4067112122"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a91e11af1f8e5c4186aa3efbcd17a6d64508ba31","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        req.cache_db_compute_nodes(compute_nodes)"},{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_9e0c2644","line":91,"in_reply_to":"ba7be1f8_1e891626","updated":"2015-03-03 15:04:30.000000000","message":"Ok, I thought that one only was about not getting the service from the compute_node and that the existing host api call was overlooked. Is the general idea to move all cells handling inside the object code?","commit_id":"115e90d700bf00691b764293e912eb4067112122"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"80342d1c2c5a7e09a29adced2d959676a32a3001","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        req.cache_db_compute_nodes(compute_nodes)"},{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_1e891626","line":91,"in_reply_to":"ba7be1f8_52e56407","updated":"2015-03-03 14:32:04.000000000","message":"This was recently changed away from using the host_api in https://review.openstack.org/#/c/150568/.  Where possible we\u0027re relying on using objects for handling lookups rather than creating proxy methods in the compute or host api.","commit_id":"115e90d700bf00691b764293e912eb4067112122"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a29f0f99672ad80f2c465b7dadc4cf1cf99b92cb","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        req.cache_db_compute_nodes(compute_nodes)"},{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_cce511a5","line":91,"in_reply_to":"ba7be1f8_9e0c2644","updated":"2015-03-03 16:52:22.000000000","message":"Probably not all of it, but some things.  If you look at the Instance and BDM objects you\u0027ll see that there\u0027s already quite a bit in objects already.\n\nUltimately we\u0027ll move towards cells v2 and avoid a lot of this mess :)","commit_id":"115e90d700bf00691b764293e912eb4067112122"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"f97a8597eca4a3713fbbe7469e477a48fa64c7b6","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        req.cache_db_compute_nodes(compute_nodes)"},{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_7b9cd5c0","line":91,"in_reply_to":"ba7be1f8_cce511a5","updated":"2015-03-03 18:08:09.000000000","message":"Ok, thanks a lot.\nNot that into cells yet, but getting there eventually ;-)","commit_id":"115e90d700bf00691b764293e912eb4067112122"},{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"4952f480506dd7982581d5800f1cb416f6b02d8c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":102,"context_line":"                                 hyp,"},{"line_number":103,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":104,"context_line":"                                     context, hyp.host),"},{"line_number":105,"context_line":"                                 True)"},{"line_number":106,"context_line":"                                 for hyp in compute_nodes])"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_adde7c3d","line":104,"updated":"2015-03-24 10:53:35.000000000","message":"host_api.service_get_by_compute_host can be called directly here.\nFor non-cell setup it simply calls objects.Service.get_by_compute_host","commit_id":"bf851312e18c5b067d9ae663a5e6f429dc6c87d7"},{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"c2b28bc003650b82f5f106d8f14fa93a0752bbe0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_3b97f991","line":92,"updated":"2015-03-25 04:42:23.000000000","message":"self.host_api.service_get_by_compute_host can be called directly here.\nAlready a host_api method is being calledon Line87.\n\nThe same holds for all other Objects.Service.get_by_compute_host calls.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6bd442967be5eb21a4f3729b755a21ed14ab38d4","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_ab045f18","line":92,"in_reply_to":"1a6ced46_3527f3cb","updated":"2015-03-25 17:35:59.000000000","message":"Well, the existing code is using objects already, so it would be a regression to directly call the proxy API.\n\nI tend to prefer Hans\u0027s proposal to have cells-aware objects but wrt cells V2, that\u0027s not the right timing for it.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1d261372ac7ea2413d4a07be1aa99e948107e9b1","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_f60c8e3d","line":92,"in_reply_to":"1a6ced46_3b97f991","updated":"2015-03-25 11:17:22.000000000","message":"As discussed on IRC with dansmith and alaski, we really want to avoid using the Compute API proxying this kind of calls and instead, move all the logic of that API up to the top-level API modules.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"},{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"02f0bd42de8cf2f3b2c4cc2b51a5e445d8caea23","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return dict(hypervisors\u003d[self._view_hypervisor("},{"line_number":90,"context_line":"                                 hyp,"},{"line_number":91,"context_line":"                                 objects.Service.get_by_compute_host("},{"line_number":92,"context_line":"                                     context, hyp.host),"},{"line_number":93,"context_line":"                                 False)"},{"line_number":94,"context_line":"                                 for hyp in compute_nodes])"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_3527f3cb","line":92,"in_reply_to":"1a6ced46_f60c8e3d","updated":"2015-03-25 15:28:02.000000000","message":"If that is done for new methods, sure. But if you are re-using already defined HostAPI methods, or ultimately calling the HostAPI method somewhere else (like it is done in objects.service for this case), then I feel it would be much simpler to call that directly here rather than introduce more conditional checks somewhere else.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"}],"nova/cells/rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b1c868442def82ccf1e817ee89e6cf80762200a","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.2\u0027)"},{"line_number":270,"context_line":"        return cctxt.call(ctxt, \u0027service_get_all\u0027, filters\u003dfilters)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    @messaging.expected_exceptions(exception.CellRoutingInconsistency)"},{"line_number":273,"context_line":"    def service_get_by_compute_host(self, ctxt, host_name):"},{"line_number":274,"context_line":"        \"\"\"Get the service entry for a host in a particular cell.  The"},{"line_number":275,"context_line":"        cell name should be encoded within the host_name."}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_6eacdfed","line":272,"updated":"2015-04-06 14:24:17.000000000","message":"Hmm, this is really supposed to be for the manager side, to avoid logging errors that are the fault of the caller. What is the intent when putting it here?","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"413ee9022b7e8107a5ef9b9bede75e3f59adf4b5","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.2\u0027)"},{"line_number":270,"context_line":"        return cctxt.call(ctxt, \u0027service_get_all\u0027, filters\u003dfilters)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    @messaging.expected_exceptions(exception.CellRoutingInconsistency)"},{"line_number":273,"context_line":"    def service_get_by_compute_host(self, ctxt, host_name):"},{"line_number":274,"context_line":"        \"\"\"Get the service entry for a host in a particular cell.  The"},{"line_number":275,"context_line":"        cell name should be encoded within the host_name."}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_46c7b212","line":272,"in_reply_to":"9aa53dc9_6eacdfed","updated":"2015-04-06 23:26:46.000000000","message":"Agreed this should go in nova/cells/manager.py","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"}],"nova/compute/cells_api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"413ee9022b7e8107a5ef9b9bede75e3f59adf4b5","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        return self.cells_rpcapi.get_migrations(context, filters)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"class ServiceProxy(object):"},{"line_number":454,"context_line":"    def __init__(self, obj, cell_path):"},{"line_number":455,"context_line":"        self._obj \u003d obj"},{"line_number":456,"context_line":"        self._cell_path \u003d cell_path"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_669076ed","line":453,"updated":"2015-04-06 23:26:46.000000000","message":"This ServiceProxy should be removed","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b1c868442def82ccf1e817ee89e6cf80762200a","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            # too and consequently reconstructed into a Service object."},{"line_number":479,"context_line":"            # Here we need to avoid that behaviour by blacklisting the method"},{"line_number":480,"context_line":"            # used for serializing the object."},{"line_number":481,"context_line":"            raise AttributeError"},{"line_number":482,"context_line":"        return getattr(self._obj, key)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_2e69378c","line":481,"updated":"2015-04-06 14:24:17.000000000","message":"I don\u0027t get this. This effectively makes a ServiceProxy unserializable right? In your comment here, can you explain *why* we want to do that?","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c65a3bbc00a9b34b6da9bd52a6e60d6b60596a61","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            # too and consequently reconstructed into a Service object."},{"line_number":479,"context_line":"            # Here we need to avoid that behaviour by blacklisting the method"},{"line_number":480,"context_line":"            # used for serializing the object."},{"line_number":481,"context_line":"            raise AttributeError"},{"line_number":482,"context_line":"        return getattr(self._obj, key)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_f408be93","line":481,"in_reply_to":"9aa53dc9_2e69378c","updated":"2015-04-06 15:09:04.000000000","message":"Is it supposed to be handled by the _CellProxy object now?\n\nhttps://review.openstack.org/#/c/157185/14/nova/cells/utils.py","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"413ee9022b7e8107a5ef9b9bede75e3f59adf4b5","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            # too and consequently reconstructed into a Service object."},{"line_number":479,"context_line":"            # Here we need to avoid that behaviour by blacklisting the method"},{"line_number":480,"context_line":"            # used for serializing the object."},{"line_number":481,"context_line":"            raise AttributeError"},{"line_number":482,"context_line":"        return getattr(self._obj, key)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_66e2b6a1","line":481,"in_reply_to":"9aa53dc9_f408be93","updated":"2015-04-06 23:26:46.000000000","message":"Matt, I think you\u0027re right. This patch was written before the serialization was added for the proxy objects, so now this patch needs to use the new ServiceProxy in nova/cells/utils.py","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"}],"nova/objects/service.py":[{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"a3f0cea8c2387ec46dced0f1ee9cd46459753822","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            try:"},{"line_number":150,"context_line":"                cells_rpc \u003d cells_rpcapi.CellsAPI()"},{"line_number":151,"context_line":"                db_service \u003d cells_rpc.service_get_by_compute_host("},{"line_number":152,"context_line":"                        context, host)"},{"line_number":153,"context_line":"            except exception.CellRoutingInconsistency:"},{"line_number":154,"context_line":"                        raise exception.ComputeHostNotFound(host\u003dhost)"},{"line_number":155,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9ef30d72","line":152,"updated":"2015-03-16 05:01:43.000000000","message":"cells_rpc returns objects with cell path prepended to the ID. Casting them to Service objects directly will lead to an error. We need to repeat the ServiceProxy magic here too or directly call the cells_api.HostAPI.service_get_by_compute_host method","commit_id":"96bbf6cd35fa9db72554073b840f41da9da9fb18"},{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"4952f480506dd7982581d5800f1cb416f6b02d8c","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def get_by_compute_host(cls, context, host, use_slave\u003dFalse):"},{"line_number":151,"context_line":"        if cells_opts.get_cell_type() \u003d\u003d \u0027api\u0027:"},{"line_number":152,"context_line":"            host_api \u003d cells_api.HostAPI()"},{"line_number":153,"context_line":"            return host_api.service_get_by_compute_host(context, host)"},{"line_number":154,"context_line":"        db_service \u003d db.service_get_by_compute_host(context, host)"},{"line_number":155,"context_line":"        return cls._from_db_object(context, cls(), db_service)"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_6d2d6446","line":153,"updated":"2015-03-24 10:53:35.000000000","message":"Why not kick it up one level and directly call this in hypervisor API?","commit_id":"bf851312e18c5b067d9ae663a5e6f429dc6c87d7"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"444a6f1b259042c2c31c4c18a8e79b0d1aad75ad","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def get_by_compute_host(cls, context, host, use_slave\u003dFalse):"},{"line_number":151,"context_line":"        if cells_opts.get_cell_type() \u003d\u003d \u0027api\u0027:"},{"line_number":152,"context_line":"            host_api \u003d cells_api.HostAPI()"},{"line_number":153,"context_line":"            return host_api.service_get_by_compute_host(context, host)"},{"line_number":154,"context_line":"        db_service \u003d db.service_get_by_compute_host(context, host)"},{"line_number":155,"context_line":"        return cls._from_db_object(context, cls(), db_service)"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_48ae9be7","line":153,"updated":"2015-03-25 14:24:38.000000000","message":"Maybe more of a longer term idea, but what if we create special cells versions of objects and register them instead of the normal ones on cells api nodes. That way we wouldn\u0027t need extra conditionals here. This is going to get ugly fast if every method of every object are to have extra checks in them like this.\n\nAnother \"crazy\" idea is to instead use the indirection_api to point calls at the cells api.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6bd442967be5eb21a4f3729b755a21ed14ab38d4","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def get_by_compute_host(cls, context, host, use_slave\u003dFalse):"},{"line_number":151,"context_line":"        if cells_opts.get_cell_type() \u003d\u003d \u0027api\u0027:"},{"line_number":152,"context_line":"            host_api \u003d cells_api.HostAPI()"},{"line_number":153,"context_line":"            return host_api.service_get_by_compute_host(context, host)"},{"line_number":154,"context_line":"        db_service \u003d db.service_get_by_compute_host(context, host)"},{"line_number":155,"context_line":"        return cls._from_db_object(context, cls(), db_service)"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_2b430f6d","line":153,"in_reply_to":"1a6ced46_48ae9be7","updated":"2015-03-25 17:35:59.000000000","message":"I totally agree with you Hans, but we wanted to prevent further work happening for cells V1 while we\u0027re targeting to put all our efforts to cells v2. Here is just a naughty fix for making sure our CI is happy.","commit_id":"d6ea624672712a57cbfd56d5621055480e7cd77d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b1c868442def82ccf1e817ee89e6cf80762200a","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def get_by_compute_host(cls, context, host, use_slave\u003dFalse):"},{"line_number":151,"context_line":"        if cells_opts.get_cell_type() \u003d\u003d \u0027api\u0027:"},{"line_number":152,"context_line":"            host_api \u003d cells_api.HostAPI()"},{"line_number":153,"context_line":"            return host_api.service_get_by_compute_host(context, host)"},{"line_number":154,"context_line":"        db_service \u003d db.service_get_by_compute_host(context, host)"},{"line_number":155,"context_line":"        return cls._from_db_object(context, cls(), db_service)"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa53dc9_8e20434b","line":153,"updated":"2015-04-06 14:24:17.000000000","message":"This returns a ServiceProxy instead of a Service, right? Since you can\u0027t serialize that, this will break if someone is using conductor and calls this remotely, right?","commit_id":"ffec6f54c5fb2a014f6d0bc263d3428df3bff5a9"}],"nova/tests/functional/test_api_samples.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d51394c70ce00971844f100a7c8c2c9a6d838a8b","unresolved":false,"context_lines":[{"line_number":2507,"context_line":"        self.flags(enable\u003dTrue, cell_type\u003d\u0027api\u0027, group\u003d\u0027cells\u0027)"},{"line_number":2508,"context_line":"        with mock.patch.object("},{"line_number":2509,"context_line":"                objects.Service, \u0027get_by_compute_host\u0027,"},{"line_number":2510,"context_line":"                side_effect\u003dself.fake_service_get_by_compute_host):"},{"line_number":2511,"context_line":"            super(HypervisorsCellsSampleJsonTests, self).setUp()"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def test_hypervisor_uptime(self, mocks):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9aa53dc9_a12623cc","line":2510,"updated":"2015-04-08 10:44:47.000000000","message":"*slaps himself*","commit_id":"046a0238f9d1b85c7c3a06703845bf0b19c9cd9d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1504c1ec265e27b911c005503e8ff2d002271bf1","unresolved":false,"context_lines":[{"line_number":2523,"context_line":"        self.stubs.Set(cells_api.HostAPI, \u0027compute_node_get\u0027,"},{"line_number":2524,"context_line":"                       fake_compute_node_get)"},{"line_number":2525,"context_line":"        self.stubs.Set(cells_api.HostAPI, \u0027service_get_by_compute_host\u0027,"},{"line_number":2526,"context_line":"                       fake_service_get_by_compute_host)"},{"line_number":2527,"context_line":""},{"line_number":2528,"context_line":"        self.stubs.Set(cells_api.HostAPI,"},{"line_number":2529,"context_line":"                       \u0027get_host_uptime\u0027, fake_get_host_uptime)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa53dc9_cebc8608","line":2526,"updated":"2015-04-09 08:56:03.000000000","message":"as you pointed out on IRC, I see this kinda tests the cells path, but it would be nice to have a test that makes it clear why you need the host_api, maybe mock out the cells rpc api in one of the API unit tests?\n\nI am worry we might try to revert this line without knowing its all about cells, so something more explicitly cells would be nice, if its not too messy.","commit_id":"fffc1486316b499e3e1ef41384d325ff7cc4e827"}],"nova/tests/unit/api/openstack/compute/contrib/test_extended_hypervisors.py":[{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"96edd892fdc5612488c7ec9a5174ce70167acfe1","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.stubs.Set(self.controller.host_api, \u0027compute_node_get\u0027,"},{"line_number":79,"context_line":"                       fake_compute_node_get)"},{"line_number":80,"context_line":"        self.stubs.Set(objects.Service, \u0027get_by_compute_host\u0027,"},{"line_number":81,"context_line":"                       fake_service_get_by_compute_host)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_view_hypervisor_detail_noservers(self):"},{"line_number":84,"context_line":"        result \u003d self.controller._view_hypervisor("}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa53dc9_1816344c","line":81,"updated":"2015-04-09 08:08:07.000000000","message":"Shouldn\u0027t this stub be for host_api, \u0027service_get_by_compute_host\u0027?","commit_id":"fffc1486316b499e3e1ef41384d325ff7cc4e827"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fd46c6f13cf52a33aaec781beb2643f8ec4b12be","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.stubs.Set(self.controller.host_api, \u0027compute_node_get\u0027,"},{"line_number":79,"context_line":"                       fake_compute_node_get)"},{"line_number":80,"context_line":"        self.stubs.Set(objects.Service, \u0027get_by_compute_host\u0027,"},{"line_number":81,"context_line":"                       fake_service_get_by_compute_host)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_view_hypervisor_detail_noservers(self):"},{"line_number":84,"context_line":"        result \u003d self.controller._view_hypervisor("}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa53dc9_db49e661","line":81,"in_reply_to":"9aa53dc9_1816344c","updated":"2015-04-09 08:30:04.000000000","message":"We can safely assume that as the HostAPI is proxying the Servoce object method, we can stub it as it makes it more clear that we\u0027re not in a cell context","commit_id":"fffc1486316b499e3e1ef41384d325ff7cc4e827"}],"nova/tests/unit/api/openstack/compute/contrib/test_hypervisors.py":[{"author":{"_account_id":12548,"name":"Dheeraj Gupta","email":"dheeraj.gupta4@gmail.com","username":"dgupta"},"change_message_id":"96edd892fdc5612488c7ec9a5174ce70167acfe1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        self.stubs.Set(self.controller.host_api, \u0027compute_node_get_all\u0027,"},{"line_number":195,"context_line":"                       fake_compute_node_get_all)"},{"line_number":196,"context_line":"        self.stubs.Set(objects.Service, \u0027get_by_compute_host\u0027,"},{"line_number":197,"context_line":"                       fake_service_get_by_compute_host)"},{"line_number":198,"context_line":"        self.stubs.Set(self.controller.host_api,"},{"line_number":199,"context_line":"                       \u0027compute_node_search_by_hypervisor\u0027,"},{"line_number":200,"context_line":"                       fake_compute_node_search_by_hypervisor)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa53dc9_a4016808","line":197,"updated":"2015-04-09 08:08:07.000000000","message":"Shouldn\u0027t this stub now be for self.controller.host_api, \u0027service_get_by_compute_host\u0027","commit_id":"fffc1486316b499e3e1ef41384d325ff7cc4e827"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fd46c6f13cf52a33aaec781beb2643f8ec4b12be","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        self.stubs.Set(self.controller.host_api, \u0027compute_node_get_all\u0027,"},{"line_number":195,"context_line":"                       fake_compute_node_get_all)"},{"line_number":196,"context_line":"        self.stubs.Set(objects.Service, \u0027get_by_compute_host\u0027,"},{"line_number":197,"context_line":"                       fake_service_get_by_compute_host)"},{"line_number":198,"context_line":"        self.stubs.Set(self.controller.host_api,"},{"line_number":199,"context_line":"                       \u0027compute_node_search_by_hypervisor\u0027,"},{"line_number":200,"context_line":"                       fake_compute_node_search_by_hypervisor)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa53dc9_5ba39600","line":197,"in_reply_to":"9aa53dc9_a4016808","updated":"2015-04-09 08:30:04.000000000","message":"Same comment as above, I preferred to leave the stub on the Service object to make it clear that we\u0027re not in a cell context","commit_id":"fffc1486316b499e3e1ef41384d325ff7cc4e827"}]}
