)]}'
{"nova/db/api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6bf5932079de75fe2a2d5bed95d0e594500206c0","unresolved":false,"context_lines":[{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":"def aggregate_get_by_uuid(context, uuid):"},{"line_number":1772,"context_line":"    \"\"\"Get a specific aggregate by uuid.\"\"\""},{"line_number":1773,"context_line":"    return IMPL.aggregate_get_by_uuid(context, uuid)"},{"line_number":1774,"context_line":""},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"def aggregate_metadata_get_by_host(context, host, key\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa0719c6_7213eeb8","line":1773,"updated":"2016-03-22 20:25:57.000000000","message":"I believe the direction now is to not add any further methods to nova.db.api and instead call SQLAlchemy methods directly from the object methods themselves. This is especially true for API database stuff, which I believe the aggregates are moving towards?","commit_id":"312d54e3e99206a65310338c0918b0159de718bb"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"f73bb3309bd7501e7167d743e49c5461cca39705","unresolved":false,"context_lines":[{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":"def aggregate_get_by_uuid(context, uuid):"},{"line_number":1772,"context_line":"    \"\"\"Get a specific aggregate by uuid.\"\"\""},{"line_number":1773,"context_line":"    return IMPL.aggregate_get_by_uuid(context, uuid)"},{"line_number":1774,"context_line":""},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"def aggregate_metadata_get_by_host(context, host, key\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa0719c6_159c1c68","line":1773,"in_reply_to":"fa0719c6_7213eeb8","updated":"2016-03-22 20:45:47.000000000","message":"I\u0027m working on the aggregates API migration now. Because we need to do live migration of items in the API database I\u0027m using functions in nova.db.api and ones added to the object methods.\n\nSo the \u0027Aggregate.get_by_id\u0027 function looks like this:\ndef get_by_id(cls, context, aggregate_id):                                                                                                                              \n         try:                                                                                                                                                                \n              db_aggregate \u003d cls._aggregate_get_from_db(context, :aggregate_id)                                                                                                \n         except exception.AggregateNotFound:                                                                                                                                 \n              db_aggregate \u003d db.aggregate_get(context, aggregate_id)                                                                                                          \n        return cls._from_db_object(context, cls(), db_aggregate)\n\nI\u0027m actually fine having it in here. The other option is to eventually have two functions in the Aggregate object. \u0027get_by_uuid_from_db\u0027 and \u0027get_by_uuid_from_api_db\u0027.\n\nhttps://review.openstack.org/#/c/296014/1/nova/objects/aggregate.py","commit_id":"312d54e3e99206a65310338c0918b0159de718bb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"058c1508234a1ab55a69f2b8037669fd3d448bbe","unresolved":false,"context_lines":[{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":"def aggregate_get_by_uuid(context, uuid):"},{"line_number":1772,"context_line":"    \"\"\"Get a specific aggregate by uuid.\"\"\""},{"line_number":1773,"context_line":"    return IMPL.aggregate_get_by_uuid(context, uuid)"},{"line_number":1774,"context_line":""},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"def aggregate_metadata_get_by_host(context, host, key\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa0719c6_80862811","line":1773,"in_reply_to":"fa0719c6_7213eeb8","updated":"2016-03-22 21:07:32.000000000","message":"Jay,\n\nYeah, I wasn\u0027t sure what do in this regard as it felt quite odd to mix the different styles in the object. I prefer the in-object style, but having both seems wrong.\n\nSo my thought was that we could choose to modify the entire object either in a dependent patch or later, or something else, but doing so now would not be germane.\n\nBut happy to be told otherwise.","commit_id":"312d54e3e99206a65310338c0918b0159de718bb"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3d18735fccc67b1ee55f579f9fa62b3a79ef440a","unresolved":false,"context_lines":[{"line_number":5841,"context_line":"    return aggregate"},{"line_number":5842,"context_line":""},{"line_number":5843,"context_line":""},{"line_number":5844,"context_line":"@main_context_manager.reader"},{"line_number":5845,"context_line":"def aggregate_get_by_uuid(context, uuid):"},{"line_number":5846,"context_line":"    query \u003d _aggregate_get_query(context,"},{"line_number":5847,"context_line":"                                 models.Aggregate,"}],"source_content_type":"text/x-python","patch_set":36,"id":"7aa08908_b2955888","line":5844,"updated":"2016-06-07 15:40:44.000000000","message":"see, I\u0027m okay with that change, but I\u0027m very torn about the ordering wrt the Aggregate DB API migration we\u0027re currently working on.","commit_id":"82a04ea90f4f799bc527a989890a2feda8f4ec18"}]}
