)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":12,"context_line":"get_* methods get information from both DB. New option for migrate all"},{"line_number":13,"context_line":"flavors from nova to api is added in nova-manage."},{"line_number":14,"context_line":"example: nova-manage flavor migrate_all"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Implements: blueprint flavor-cell-api"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id0e600f0345f3a8b70f5229ce3275b0d98a330b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a7e1126_9d5cabee","line":15,"updated":"2016-01-07 02:08:39.000000000","message":"I think this needs a DocImpact tag for the new nova-manage command","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"}],"nova/cmd/manage.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2b2bf60a41b1718ebbcf8b05f42ed6cd83cf115e","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":413,"context_line":"        try:"},{"line_number":414,"context_line":"            objects.FlavorList.migrate_all(ctxt)"},{"line_number":415,"context_line":"            print(\"Flavors Migrated Successfully\")"},{"line_number":416,"context_line":"        except Exception as ex:"},{"line_number":417,"context_line":"            print(_(\"error: %s\") % ex)"},{"line_number":418,"context_line":"            return(2)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a29b11f_a1bbe70d","line":415,"updated":"2015-10-19 08:34:15.000000000","message":"please add in the translations _()","commit_id":"83e6417c21427f485d9e9c85c75bf6cf90e982ad"},{"author":{"_account_id":16895,"name":"lalit dagre","email":"lalitdagre@gmail.com","username":"lalitdagre"},"change_message_id":"ed70779e81ea2adbe9cfda8dff2215d57a93d11b","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":413,"context_line":"        try:"},{"line_number":414,"context_line":"            objects.FlavorList.migrate_all(ctxt)"},{"line_number":415,"context_line":"            print(\"Flavors Migrated Successfully\")"},{"line_number":416,"context_line":"        except Exception as ex:"},{"line_number":417,"context_line":"            print(_(\"error: %s\") % ex)"},{"line_number":418,"context_line":"            return(2)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa80f949_7d5be0f6","line":415,"in_reply_to":"3a29b11f_a1bbe70d","updated":"2015-11-06 08:13:28.000000000","message":"Done","commit_id":"83e6417c21427f485d9e9c85c75bf6cf90e982ad"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":419,"context_line":""},{"line_number":420,"context_line":"class FlavorCommands(object):"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def migrate_all(self, host\u003dNone):"},{"line_number":423,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            objects.FlavorList.migrate_all(ctxt)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_5d92c358","line":422,"range":{"start_line":422,"start_character":24,"end_line":422,"end_character":35},"updated":"2016-01-07 02:08:39.000000000","message":"It looks like this should be removed, it\u0027s not used for anything","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":422,"context_line":"    def migrate_all(self, host\u003dNone):"},{"line_number":423,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            objects.FlavorList.migrate_all(ctxt)"},{"line_number":426,"context_line":"            print(_(\"Flavors Migrated Successfully\"))"},{"line_number":427,"context_line":"        except Exception as ex:"},{"line_number":428,"context_line":"            print(_(\"error: %s\") % ex)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_afd7ee21","line":425,"updated":"2016-01-07 02:08:39.000000000","message":"General question: Should we have a max_count here like we had for migrating flavor data from sysmeta? Or do we assume the number of flavors will be small enough that it won\u0027t cause a performance problem?","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c7b8c4c223bae9da3506075756fe2096088f2063","unresolved":false,"context_lines":[{"line_number":426,"context_line":"            print(_(\"Flavors Migrated Successfully\"))"},{"line_number":427,"context_line":"        except Exception as ex:"},{"line_number":428,"context_line":"            print(_(\"error: %s\") % ex)"},{"line_number":429,"context_line":"            return(2)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"class FloatingIpCommands(object):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1af94dfe_4cf9074d","line":429,"updated":"2016-03-16 22:07:33.000000000","message":"This whole thing should be moved into the online_data_migrations command we have in nova-manage","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":1324,"context_line":"    \u0027api_db\u0027: ApiDbCommands,"},{"line_number":1325,"context_line":"    \u0027cell\u0027: CellCommands,"},{"line_number":1326,"context_line":"    \u0027cell_v2\u0027: CellV2Commands,"},{"line_number":1327,"context_line":"    \u0027db\u0027: DbCommands,"},{"line_number":1328,"context_line":"    \u0027fixed\u0027: FixedIpCommands,"},{"line_number":1329,"context_line":"    \u0027floating\u0027: FloatingIpCommands,"},{"line_number":1330,"context_line":"    \u0027host\u0027: HostCommands,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_2ff69ed7","line":1327,"updated":"2016-01-07 02:08:39.000000000","message":"I wonder if instead of a flavor category we have a \"migrate_flavors_to_api_db\" command under DbCommands, since this command is all about the db","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"}],"nova/compute/flavors.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2b2bf60a41b1718ebbcf8b05f42ed6cd83cf115e","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    \"\"\""},{"line_number":258,"context_line":"    if ctxt is None:"},{"line_number":259,"context_line":"        ctxt \u003d context.get_admin_context(read_deleted\u003dread_deleted)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    return objects.Flavor.get_by_flavor_id(ctxt, flavorid, read_deleted)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a29b11f_613cef93","side":"PARENT","line":260,"updated":"2015-10-19 08:34:15.000000000","message":"unrelated to the patch","commit_id":"f445ec202bfa38a03bc90e0ff2daa832107ba1d8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    \"\"\""},{"line_number":227,"context_line":"    if ctxt is None:"},{"line_number":228,"context_line":"        ctxt \u003d context.get_admin_context(read_deleted\u003dread_deleted)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    return objects.Flavor.get_by_flavor_id(ctxt, flavorid, read_deleted)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_62c7de45","side":"PARENT","line":229,"updated":"2016-01-07 02:08:39.000000000","message":"Please remove the unrelated whitespace change here","commit_id":"162ac540695e95e2110481e9ba975ce4952858ea"}],"nova/db/sqlalchemy/api_models.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2141de171ee3e70c98e78cfa9da760981dd2459a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    value \u003d Column(String(255))"},{"line_number":108,"context_line":"    flavor_id \u003d Column(Integer, ForeignKey(\u0027flavors.id\u0027),"},{"line_number":109,"context_line":"              nullable\u003dFalse)"},{"line_number":110,"context_line":"    flavor \u003d orm.relationship(Flavors, backref\u003d\"extra_specs\","},{"line_number":111,"context_line":"                 foreign_keys\u003dflavor_id)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_a1d2925a","line":110,"updated":"2015-08-19 21:18:15.000000000","message":"These should be moved into the patch before this that sets up the tables.","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"}],"nova/objects/flavor.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2141de171ee3e70c98e78cfa9da760981dd2459a","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @base.remotable_classmethod"},{"line_number":132,"context_line":"    def get_by_id(cls, context, id):"},{"line_number":133,"context_line":"        db_flavor \u003d db.flavor_get(context, id)"},{"line_number":134,"context_line":"        return cls._from_db_object(context, cls(context), db_flavor,"},{"line_number":135,"context_line":"                                   expected_attrs\u003d[\u0027extra_specs\u0027])"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_a114d29f","line":133,"updated":"2015-08-19 21:18:15.000000000","message":"Take a look at how get_* methods are implemented in the cell_mapping or host_mapping object.  Implement a new _get_by_id_from_db method and then call it here.  If the flavor is not found by that method then call db.flavor_get.","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2141de171ee3e70c98e78cfa9da760981dd2459a","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            if attr in updates:"},{"line_number":175,"context_line":"                expected_attrs.append(attr)"},{"line_number":176,"context_line":"        projects \u003d updates.pop(\u0027projects\u0027, [])"},{"line_number":177,"context_line":"        db_flavor \u003d db.flavor_create(self._context, updates, projects\u003dprojects)"},{"line_number":178,"context_line":"        self._from_db_object(self._context, self, db_flavor,"},{"line_number":179,"context_line":"                             expected_attrs\u003dexpected_attrs)"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_81ae6e96","line":177,"updated":"2015-08-19 21:18:15.000000000","message":"This should be modified here to create the flavor in the api database.  If you look at some of the NovaObjects we have that only use the nova_api database you\u0027ll see that we\u0027ve been moving towards a model of having the db api be embedded in the object.  Look at cell_mapping/host_mapping for examples.  So rather than calling db.flavor_create here and having that method work with both databases, call the create method for the nova_api database here.","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"21abf00794920b097a4ee955e3254935bd6f185c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                    first()"},{"line_number":68,"context_line":"    if not result:"},{"line_number":69,"context_line":"        raise exception.FlavorNotFound(flavor_id\u003dflavor_id)"},{"line_number":70,"context_line":"    return result[0]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _flavor_access_get_by_flavor_id_db(context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_b38acebd","line":70,"updated":"2015-09-04 18:38:14.000000000","message":"If you added deleted/deleted_at keys into the result before returning it then you wouldn\u0027t need the api db to have soft-delete.  Not just on this method but any that return a flavor.","commit_id":"85d8dfa0a2b63f3b226d3f6f97df6368a56f4bb1"},{"author":{"_account_id":16895,"name":"lalit dagre","email":"lalitdagre@gmail.com","username":"lalitdagre"},"change_message_id":"0165dbc2f7daae56fee613e274706075ac5b4e4b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                    first()"},{"line_number":68,"context_line":"    if not result:"},{"line_number":69,"context_line":"        raise exception.FlavorNotFound(flavor_id\u003dflavor_id)"},{"line_number":70,"context_line":"    return result[0]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _flavor_access_get_by_flavor_id_db(context, flavor_id):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_e1ae9e80","line":70,"in_reply_to":"da20952f_b38acebd","updated":"2015-09-09 14:21:27.000000000","message":"Thanks Andrew for comment,  I tried it with no soft-delete in flavor model, it is raising Unknown column \u0027flavors.deleted_at/deleted\u0027 exception even in model_query, before result. In query might be there is filter for deleted/deleted_at due to read_deleted parameter","commit_id":"85d8dfa0a2b63f3b226d3f6f97df6368a56f4bb1"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"21abf00794920b097a4ee955e3254935bd6f185c","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                                    id\u003dflavor_id, retries\u003dmax_retries)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"def _flavor_create_db(context, values, projects\u003dNone):"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    \"\"\"Create a new instance type. In order to pass in extra specs,"},{"line_number":240,"context_line":"    the values dict should contain a \u0027extra_specs\u0027 key/value pair:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_33647e20","line":237,"updated":"2015-09-04 18:38:14.000000000","message":"if you made sure deleted/deleted_at weren\u0027t in values here then you could remove soft-delete from the api db.  And any other method that updates the db.","commit_id":"85d8dfa0a2b63f3b226d3f6f97df6368a56f4bb1"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"21abf00794920b097a4ee955e3254935bd6f185c","unresolved":false,"context_lines":[{"line_number":571,"context_line":"    @base.remotable_classmethod"},{"line_number":572,"context_line":"    def get_by_name(cls, context, name):"},{"line_number":573,"context_line":"        try:"},{"line_number":574,"context_line":"            db_flavor \u003d _flavor_get_by_name_db(context, name)"},{"line_number":575,"context_line":"        except exception.FlavorNotFoundByName:"},{"line_number":576,"context_line":"            db_flavor \u003d db.flavor_get_by_name(context, name)"},{"line_number":577,"context_line":"        return cls._from_db_object(context, cls(context), db_flavor,"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_3319de88","line":574,"updated":"2015-09-04 18:38:14.000000000","message":"It\u0027s not enforced anywhere yet, but I prefer to use the convention of *_from_db for methods that read from the db and *_to_db for methods that write.","commit_id":"85d8dfa0a2b63f3b226d3f6f97df6368a56f4bb1"},{"author":{"_account_id":16895,"name":"lalit dagre","email":"lalitdagre@gmail.com","username":"lalitdagre"},"change_message_id":"6eec56b694355cf395a4fcfc16fb4ad9bf4170ff","unresolved":false,"context_lines":[{"line_number":571,"context_line":"    @base.remotable_classmethod"},{"line_number":572,"context_line":"    def get_by_name(cls, context, name):"},{"line_number":573,"context_line":"        try:"},{"line_number":574,"context_line":"            db_flavor \u003d _flavor_get_by_name_db(context, name)"},{"line_number":575,"context_line":"        except exception.FlavorNotFoundByName:"},{"line_number":576,"context_line":"            db_flavor \u003d db.flavor_get_by_name(context, name)"},{"line_number":577,"context_line":"        return cls._from_db_object(context, cls(context), db_flavor,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a1a9d01_f3908797","line":574,"in_reply_to":"da20952f_3319de88","updated":"2015-10-19 08:51:42.000000000","message":"Done","commit_id":"85d8dfa0a2b63f3b226d3f6f97df6368a56f4bb1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2b2bf60a41b1718ebbcf8b05f42ed6cd83cf115e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.0: Initial version"},{"line_number":43,"context_line":"    # Version 1.1: Added save_projects(), save_extra_specs(), removed"},{"line_number":44,"context_line":"    #              remoteable from save()"},{"line_number":45,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    fields \u003d {"},{"line_number":48,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a29b11f_c14b832a","line":45,"updated":"2015-10-19 08:34:15.000000000","message":"you need to bump the versions","commit_id":"83e6417c21427f485d9e9c85c75bf6cf90e982ad"},{"author":{"_account_id":16895,"name":"lalit dagre","email":"lalitdagre@gmail.com","username":"lalitdagre"},"change_message_id":"ed70779e81ea2adbe9cfda8dff2215d57a93d11b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.0: Initial version"},{"line_number":43,"context_line":"    # Version 1.1: Added save_projects(), save_extra_specs(), removed"},{"line_number":44,"context_line":"    #              remoteable from save()"},{"line_number":45,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    fields \u003d {"},{"line_number":48,"context_line":"        \u0027id\u0027: fields.IntegerField(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa80f949_5d3ffc86","line":45,"in_reply_to":"3a29b11f_c14b832a","updated":"2015-11-06 08:13:28.000000000","message":"Done","commit_id":"83e6417c21427f485d9e9c85c75bf6cf90e982ad"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import copy"},{"line_number":16,"context_line":"from nova import db"},{"line_number":17,"context_line":"from nova import exception"},{"line_number":18,"context_line":"from nova import objects"},{"line_number":19,"context_line":"from nova.objects import base"},{"line_number":20,"context_line":"from nova.objects import fields"},{"line_number":21,"context_line":"from operator import itemgetter"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo_db.sqlalchemy import utils as sqlalchemyutils"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa69d971_8a7b7cbd","line":20,"range":{"start_line":16,"start_character":0,"end_line":20,"end_character":31},"updated":"2016-01-07 02:08:39.000000000","message":"These are project imports that go in the last section L29 - L31\n\nhttp://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from nova.db.sqlalchemy import api as db_api"},{"line_number":30,"context_line":"from nova.db.sqlalchemy.api import require_context"},{"line_number":31,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":32,"context_line":"from oslo_db import exception as db_exc"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"OPTIONAL_FIELDS \u003d [\u0027extra_specs\u0027, \u0027projects\u0027]"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa69d971_0a6f8cfc","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":39},"updated":"2016-01-07 02:08:39.000000000","message":"This belongs in the third-party imports section L23","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.0: Initial version"},{"line_number":43,"context_line":"    # Version 1.1: Added save_projects(), save_extra_specs(), removed"},{"line_number":44,"context_line":"    #              remoteable from save()"},{"line_number":45,"context_line":"    # Version 1.2: Added functionality to support api,nova db and active"},{"line_number":46,"context_line":"    #              migration"},{"line_number":47,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_7d0a1f23","line":46,"range":{"start_line":45,"start_character":19,"end_line":46,"end_character":28},"updated":"2016-01-07 02:08:39.000000000","message":"This comment isn\u0027t too clear IMHO. Maybe something like, \"Added support for API DB and active migration\" instead?","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c7b8c4c223bae9da3506075756fe2096088f2063","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    # Version 1.0: Initial version"},{"line_number":43,"context_line":"    # Version 1.1: Added save_projects(), save_extra_specs(), removed"},{"line_number":44,"context_line":"    #              remoteable from save()"},{"line_number":45,"context_line":"    # Version 1.2: Added functionality to support api,nova db and active"},{"line_number":46,"context_line":"    #              migration"},{"line_number":47,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":24,"id":"1af94dfe_ccba376e","line":46,"range":{"start_line":45,"start_character":19,"end_line":46,"end_character":28},"in_reply_to":"3a7e1126_7d0a1f23","updated":"2016-03-16 22:07:33.000000000","message":"Agree it\u0027s confusing, although I also don\u0027t think the bump is necessarily required. We should remove it unless we need to change something that needs a version to signal it.","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    @staticmethod"},{"line_number":407,"context_line":"    def _flavor_create_to_db(context, values, projects\u003dNone):"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        \"\"\"Create a new instance type. In order to pass in extra specs,"},{"line_number":410,"context_line":"        the values dict should contain a \u0027extra_specs\u0027 key/value pair:"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"fa69d971_ac49bd32","line":408,"updated":"2016-01-07 02:08:39.000000000","message":"You don\u0027t need to add a blank line before docstrings","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":406,"context_line":"    @staticmethod"},{"line_number":407,"context_line":"    def _flavor_create_to_db(context, values, projects\u003dNone):"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        \"\"\"Create a new instance type. In order to pass in extra specs,"},{"line_number":410,"context_line":"        the values dict should contain a \u0027extra_specs\u0027 key/value pair:"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        {\u0027extra_specs\u0027 : {\u0027k1\u0027: \u0027v1\u0027, \u0027k2\u0027: \u0027v2\u0027, ...}}"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa69d971_cc5671cd","line":409,"range":{"start_line":409,"start_character":24,"end_line":409,"end_character":37},"updated":"2016-01-07 02:08:39.000000000","message":"s/instance type/flavor/","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                                       sort_dir\u003dsort_dir, limit\u003dlimit,"},{"line_number":711,"context_line":"                                       marker\u003dNone)"},{"line_number":712,"context_line":"        api_flavors \u003d [db_api._dict_with_extra_specs(i) for i in flavors]"},{"line_number":713,"context_line":"        flavor_union \u003d FlavorList._flavor_union_list(api_flavors, nova_flavors)"},{"line_number":714,"context_line":"        flavor_union \u003d FlavorList._sort_flavor_list(flavor_union, sort_key,"},{"line_number":715,"context_line":"                                                     sort_dir)"},{"line_number":716,"context_line":"        if (union_marker \u003d\u003d 1):"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa69d971_4f9ef363","line":713,"range":{"start_line":713,"start_character":34,"end_line":713,"end_character":52},"updated":"2016-01-07 02:08:39.000000000","message":"So this will form a union of the flavors in the api db and the nova db and return them as Flavor objects. What about flavor migrations in this case? If someone does a flavor.save() on one of the returned flavors before it\u0027s been migrated, the extra_specs and projects changes will get written to the api db but the flavor itself isn\u0027t yet in the api db. I would imagine a later lookup of the flavor would find it in the nova db, possibly migrate it, and maybe lose the extra_specs and projects changes that had occurred before.\n\nI noticed the only function that does migration is Flavor.get_by_flavor_id. Shouldn\u0027t we have migration routines on all of the \"get\" functions? I would have thought so but I haven\u0027t been deep into the discussions of the migration from nova db to api db","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"48765191b1af474fdf29b098296e23a045925fdf","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                                       sort_dir\u003dsort_dir, limit\u003dlimit,"},{"line_number":711,"context_line":"                                       marker\u003dNone)"},{"line_number":712,"context_line":"        api_flavors \u003d [db_api._dict_with_extra_specs(i) for i in flavors]"},{"line_number":713,"context_line":"        flavor_union \u003d FlavorList._flavor_union_list(api_flavors, nova_flavors)"},{"line_number":714,"context_line":"        flavor_union \u003d FlavorList._sort_flavor_list(flavor_union, sort_key,"},{"line_number":715,"context_line":"                                                     sort_dir)"},{"line_number":716,"context_line":"        if (union_marker \u003d\u003d 1):"}],"source_content_type":"text/x-python","patch_set":24,"id":"da6ed579_70b90fe9","line":713,"range":{"start_line":713,"start_character":34,"end_line":713,"end_character":52},"in_reply_to":"fa69d971_4f9ef363","updated":"2016-01-12 20:09:25.000000000","message":"This is a good point. Like melanie I can\u0027t quite tell from the code what will happen to the extra specs or projects in this case. Its possible that things will work properly and the extra specs will be pulled from the api db properly even if the flavor is in the nova db. I\u0027m not sure.\n\nEither way doesn\u0027t it make sense to add migration to the \u0027save\u0027 method as well as the \u0027get_by_flavor_id\u0027 method?\n\nAt what point have previous online migration schemes done this?","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":719,"context_line":""},{"line_number":720,"context_line":"        return FlavorList._limit_flavor_list(flavor_union, limit)"},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"    @base.remotable_classmethod"},{"line_number":723,"context_line":"    def migrate_all(cls, context, inactive\u003dFalse, filters\u003dNone,"},{"line_number":724,"context_line":"                sort_key\u003d\u0027flavorid\u0027, sort_dir\u003d\u0027asc\u0027, limit\u003dNone, marker\u003dNone):"},{"line_number":725,"context_line":"        nova_flavors \u003d db.flavor_get_all(context, inactive\u003dinactive,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_cfa03aa2","line":722,"updated":"2016-01-07 02:08:39.000000000","message":"I think this should rather be a @staticmethod and it should also have @require_admin_context","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":720,"context_line":"        return FlavorList._limit_flavor_list(flavor_union, limit)"},{"line_number":721,"context_line":""},{"line_number":722,"context_line":"    @base.remotable_classmethod"},{"line_number":723,"context_line":"    def migrate_all(cls, context, inactive\u003dFalse, filters\u003dNone,"},{"line_number":724,"context_line":"                sort_key\u003d\u0027flavorid\u0027, sort_dir\u003d\u0027asc\u0027, limit\u003dNone, marker\u003dNone):"},{"line_number":725,"context_line":"        nova_flavors \u003d db.flavor_get_all(context, inactive\u003dinactive,"},{"line_number":726,"context_line":"                                   filters\u003dfilters, sort_key\u003dsort_key,"},{"line_number":727,"context_line":"                                   sort_dir\u003dsort_dir, limit\u003dlimit,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_2fcbfe73","line":724,"range":{"start_line":723,"start_character":32,"end_line":724,"end_character":76},"updated":"2016-01-07 02:08:39.000000000","message":"I don\u0027t think we need all of these kwargs, we\u0027re not using them in the nova-manage command and I don\u0027t think we expect to be calling this anywhere else","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":722,"context_line":"    @base.remotable_classmethod"},{"line_number":723,"context_line":"    def migrate_all(cls, context, inactive\u003dFalse, filters\u003dNone,"},{"line_number":724,"context_line":"                sort_key\u003d\u0027flavorid\u0027, sort_dir\u003d\u0027asc\u0027, limit\u003dNone, marker\u003dNone):"},{"line_number":725,"context_line":"        nova_flavors \u003d db.flavor_get_all(context, inactive\u003dinactive,"},{"line_number":726,"context_line":"                                   filters\u003dfilters, sort_key\u003dsort_key,"},{"line_number":727,"context_line":"                                   sort_dir\u003dsort_dir, limit\u003dlimit,"},{"line_number":728,"context_line":"                                   marker\u003dNone)"},{"line_number":729,"context_line":"        for k in nova_flavors:"},{"line_number":730,"context_line":"            Flavor.get_by_flavor_id(context, k[\"flavorid\"], read_deleted\u003dNone)"},{"line_number":731,"context_line":"        return nova_flavors"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_0fd3a205","line":728,"range":{"start_line":725,"start_character":48,"end_line":728,"end_character":46},"updated":"2016-01-07 02:08:39.000000000","message":"You can also remove these","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":726,"context_line":"                                   filters\u003dfilters, sort_key\u003dsort_key,"},{"line_number":727,"context_line":"                                   sort_dir\u003dsort_dir, limit\u003dlimit,"},{"line_number":728,"context_line":"                                   marker\u003dNone)"},{"line_number":729,"context_line":"        for k in nova_flavors:"},{"line_number":730,"context_line":"            Flavor.get_by_flavor_id(context, k[\"flavorid\"], read_deleted\u003dNone)"},{"line_number":731,"context_line":"        return nova_flavors"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_8f1312b8","line":729,"range":{"start_line":729,"start_character":12,"end_line":729,"end_character":13},"updated":"2016-01-07 02:08:39.000000000","message":"Usually you would name this \"flavor\" or \"f\" if you want to keep it short, to indicate something about the variable instead of an arbitrary character","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":727,"context_line":"                                   sort_dir\u003dsort_dir, limit\u003dlimit,"},{"line_number":728,"context_line":"                                   marker\u003dNone)"},{"line_number":729,"context_line":"        for k in nova_flavors:"},{"line_number":730,"context_line":"            Flavor.get_by_flavor_id(context, k[\"flavorid\"], read_deleted\u003dNone)"},{"line_number":731,"context_line":"        return nova_flavors"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_4f0d2a8f","line":730,"range":{"start_line":730,"start_character":58,"end_line":730,"end_character":77},"updated":"2016-01-07 02:08:39.000000000","message":"You don\u0027t need this","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0642a739d44ffae4c3855b4c2b8f1b7ee2b60164","unresolved":false,"context_lines":[{"line_number":728,"context_line":"                                   marker\u003dNone)"},{"line_number":729,"context_line":"        for k in nova_flavors:"},{"line_number":730,"context_line":"            Flavor.get_by_flavor_id(context, k[\"flavorid\"], read_deleted\u003dNone)"},{"line_number":731,"context_line":"        return nova_flavors"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a7e1126_92001503","line":731,"range":{"start_line":731,"start_character":8,"end_line":731,"end_character":27},"updated":"2016-01-07 02:08:39.000000000","message":"I don\u0027t think this function needs to return anything","commit_id":"b26aa45969bb2eb4de20e8b5525e7bc94c26301d"}],"nova/test.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2141de171ee3e70c98e78cfa9da760981dd2459a","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        return \"\u003cMatchType:\" + str(self.wanttype) + \"\u003e\""},{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class BothDBTestCase(TestCase):"},{"line_number":459,"context_line":"    def setUp(self):"},{"line_number":460,"context_line":"        super(BothDBTestCase, self).setUp()"},{"line_number":461,"context_line":"        self.useFixture(nova_fixtures.Database(database\u003d\u0027api\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_a184d25d","line":458,"updated":"2015-08-19 21:18:15.000000000","message":"Minor thing, but I would just call this DBTestCase.","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"4155547c873e8e8956a90586b14a76a5f5528a29","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        return \"\u003cMatchType:\" + str(self.wanttype) + \"\u003e\""},{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class BothDBTestCase(TestCase):"},{"line_number":459,"context_line":"    def setUp(self):"},{"line_number":460,"context_line":"        super(BothDBTestCase, self).setUp()"},{"line_number":461,"context_line":"        self.useFixture(nova_fixtures.Database(database\u003d\u0027api\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_de372afd","line":458,"in_reply_to":"fa1b9901_8d0c4eed","updated":"2015-08-20 21:03:36.000000000","message":"I\u0027m thinking that we could end up with multiple fixtures: TestCase which should really be named DBTestCase, DBTestCase which sets up all dbs, NoDBTestCase, and APIDBTestCase.  We don\u0027t really need all of those right now, and maybe it will be a bit much to add them all.  But using \u0027Both\u0027 leaves this ambiguous for future changes, if we happened to ever have another db.  Perhaps AllDBTest case?","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"},{"author":{"_account_id":16895,"name":"lalit dagre","email":"lalitdagre@gmail.com","username":"lalitdagre"},"change_message_id":"6b9e69b386252933154e9ae1df61307f344f11b4","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        return \"\u003cMatchType:\" + str(self.wanttype) + \"\u003e\""},{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class BothDBTestCase(TestCase):"},{"line_number":459,"context_line":"    def setUp(self):"},{"line_number":460,"context_line":"        super(BothDBTestCase, self).setUp()"},{"line_number":461,"context_line":"        self.useFixture(nova_fixtures.Database(database\u003d\u0027api\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_8d0c4eed","line":458,"in_reply_to":"fa1b9901_a184d25d","updated":"2015-08-20 08:25:07.000000000","message":"this sets up both fixtures, we named it so to avoid confusion","commit_id":"130c5e2797314c9eb77dd8c4fa5318bddd5dfad2"}]}
