)]}'
{"nova/api/openstack/compute/contrib/cells.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"0f235d55bcb839a919a55240af4d98a063f91f83","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    return dict((k, v) for k, v in item.iteritems() if k in keys)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def _scrub_cell(cell, detail\u003dFalse):"},{"line_number":118,"context_line":"    keys \u003d [\u0027id\u0027, \u0027name\u0027, \u0027username\u0027, \u0027rpc_host\u0027, \u0027rpc_port\u0027]"},{"line_number":119,"context_line":"    if detail:"},{"line_number":120,"context_line":"        keys.append(\u0027capabilities\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALn%2F%2F0k4%3D","line":117,"updated":"2012-11-03 07:24:13.000000000","message":"Why is this needed?","commit_id":"965e240adf8dc292a82f2c6e6db82078dd813cf5"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"228f49e2191465be95455bff5349c0decf86aaf9","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from nova.openstack.common import log as logging"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(\"nova.api.openstack.compute.contrib.cells\")"},{"line_number":37,"context_line":"CONF \u003d cfg.CONF"},{"line_number":38,"context_line":"CONF.import_opt(\u0027name\u0027, \u0027nova.cells.opts\u0027, group\u003d\u0027cells\u0027)"},{"line_number":39,"context_line":"CONF.import_opt(\u0027capabilities\u0027, \u0027nova.cells.opts\u0027, group\u003d\u0027cells\u0027)"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAM3%2F%2FnuQ%3D","line":36,"updated":"2013-01-12 15:09:06.000000000","message":"Should probably use __name__ here instead","commit_id":"b426edcaf38249e40bc2f9d8071cfcdce1519de4"}],"nova/cells/rpcapi.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"cad14705e5749e4f12feca845be8fd8ab18c2088","unresolved":false,"context_lines":[{"line_number":177,"context_line":"               \u0027args\u0027: {}}"},{"line_number":178,"context_line":"        return self.call(context, msg)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def sync_instances(self, context, project_id\u003dNone, updated_since\u003dNone,"},{"line_number":181,"context_line":"            deleted\u003dFalse):"},{"line_number":182,"context_line":"        \"\"\"Broadcast message down to tell cells to sync instance data.\"\"\""},{"line_number":183,"context_line":"        if not CONF.cells.enable:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAMH%2F%2Fwt0%3D","line":180,"updated":"2012-11-26 21:47:47.000000000","message":"Oh, wait; I think you meant to have this in the following patch in the series…","commit_id":"cb98377cd8de11bf570d7c7ac79cd1d6e0366998"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"228f49e2191465be95455bff5349c0decf86aaf9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\"Get information about our neighbor cells from the manager.\"\"\""},{"line_number":142,"context_line":"        if not CONF.cells.enable:"},{"line_number":143,"context_line":"            return []"},{"line_number":144,"context_line":"        return self.call(ctxt, self.make_msg(\u0027get_cell_info_for_neighbors\u0027))"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAM3%2F%2FnuM%3D","line":144,"updated":"2013-01-12 15:09:06.000000000","message":"The addition of this method needs to bump the cells rpc api to 1.1","commit_id":"b426edcaf38249e40bc2f9d8071cfcdce1519de4"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"573578a062e7bd662c2917e06b665b92c676a688","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"    with session.begin():"},{"line_number":3731,"context_line":"        cell \u003d _cell_get_by_name_query(context, cell_name, session\u003dsession)"},{"line_number":3732,"context_line":"        cell.update(values)"},{"line_number":3733,"context_line":"        cell.save()"},{"line_number":3734,"context_line":"    return cell"},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAM3%2F%2Fxck%3D","line":3733,"updated":"2013-01-06 08:35:24.000000000","message":"You should remove cell.save() there is no need to call it because session.flush() will be automatically called on session.commit() which is called in sqlalchemy.SessionTransaction.__exit__() hook.\nAnd one more nit. \nIf you use NovaBase.save() method you should call it with session parameter otherwise it will produce new session object, and it will try to add cell_ref to another session and this as I know should produce Exception (that cell_ref is already added to another session).","commit_id":"1ac95fd5b9b2d7e726434c183d558062bc09d5dd"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"82b8b350d86fa0480359f38c0ad42bcbec372b96","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"    with session.begin():"},{"line_number":3731,"context_line":"        cell \u003d _cell_get_by_name_query(context, cell_name, session\u003dsession)"},{"line_number":3732,"context_line":"        cell.update(values)"},{"line_number":3733,"context_line":"        cell.save()"},{"line_number":3734,"context_line":"    return cell"},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAM3%2F%2FxcI%3D","line":3733,"in_reply_to":"AAAAM3%2F%2Fxck%3D","updated":"2013-01-06 09:01:17.000000000","message":"Oh sorry I didn\u0027t see that you\u0027re working with query.. But in this case you shouldn\u0027t also use query.save() method. update() method will produce db request.","commit_id":"1ac95fd5b9b2d7e726434c183d558062bc09d5dd"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"573578a062e7bd662c2917e06b665b92c676a688","unresolved":false,"context_lines":[{"line_number":3736,"context_line":""},{"line_number":3737,"context_line":"@require_admin_context"},{"line_number":3738,"context_line":"def cell_delete(context, cell_name):"},{"line_number":3739,"context_line":"    session \u003d get_session()"},{"line_number":3740,"context_line":"    with session.begin():"},{"line_number":3741,"context_line":"        return _cell_get_by_name_query(context, cell_name,"},{"line_number":3742,"context_line":"                session\u003dsession).delete()"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAM3%2F%2Fxcg%3D","line":3739,"updated":"2013-01-06 08:35:24.000000000","message":"model_query will create own session and start own transaction it there is no session parameter. So this code should be looks like:\nreturn _cel_get_by_name_query(context, cell_name).delete()\n\nAlso, are you sure that you really need to remove this entry from DB? Probably you should only mark it as soft deleted?","commit_id":"1ac95fd5b9b2d7e726434c183d558062bc09d5dd"}]}
