)]}'
{"nova/objects/instance.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a68da5dbfbaae9ea2d624db17120967506efce53","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        pass"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def _save_migration_context(self, context):"},{"line_number":618,"context_line":"        # NOTE(ndipanov): No need for this for now"},{"line_number":619,"context_line":"        pass"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_068b2069","line":618,"updated":"2015-08-31 14:37:55.000000000","message":"So, why not just do away with the create/destroy methods on the actual object and just do them via the instance here? Seems like it might be better. Are there places where we don\u0027t have a full instance object and we need to create the context?","commit_id":"c3a18fc07123d0e127ba317b161fffd3947f4419"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a68da5dbfbaae9ea2d624db17120967506efce53","unresolved":false,"context_lines":[{"line_number":874,"context_line":"            except exception.MigrationContextNotFound:"},{"line_number":875,"context_line":"                self.migration_context \u003d None"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    def apply_migration_context(self):"},{"line_number":878,"context_line":"        if self.migration_context:"},{"line_number":879,"context_line":"            self.numa_topology \u003d self.migration_context.new_numa_topology"},{"line_number":880,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_06b9e014","line":877,"updated":"2015-08-31 14:37:55.000000000","message":"Should this and the revert variant not also destroy the context?","commit_id":"c3a18fc07123d0e127ba317b161fffd3947f4419"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a68da5dbfbaae9ea2d624db17120967506efce53","unresolved":false,"context_lines":[{"line_number":894,"context_line":"    def drop_migration_context(self):"},{"line_number":895,"context_line":"        if self.migration_context:"},{"line_number":896,"context_line":"            self.migration_context.destroy()"},{"line_number":897,"context_line":"            self.migration_context \u003d None"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":900,"context_line":"        if attrname not in INSTANCE_OPTIONAL_ATTRS:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_06e2402f","line":897,"updated":"2015-08-31 14:37:55.000000000","message":"If we dropped the destroy on the context object, this would just be:\n\n self.migration_context \u003d None\n self.save()\n\nIs there some reason not to do that?","commit_id":"c3a18fc07123d0e127ba317b161fffd3947f4419"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8679b683821a5de2206f551a96f3a9fc126df63a","unresolved":false,"context_lines":[{"line_number":866,"context_line":"    def _load_ec2_ids(self):"},{"line_number":867,"context_line":"        self.ec2_ids \u003d objects.EC2Ids.get_by_instance(self._context, self)"},{"line_number":868,"context_line":""},{"line_number":869,"context_line":"    def _load_migration_context(self, db_context\u003dNone):"},{"line_number":870,"context_line":"        if db_context is not None:"},{"line_number":871,"context_line":"            self.migration_context \u003d objects.MigrationContext.obj_from_db_obj("},{"line_number":872,"context_line":"                db_context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_98218cb7","line":869,"updated":"2015-09-01 16:44:38.000000000","message":"This is called even when we\u0027re loading from the db object, and may pass in None here because the column was none. Since we\u0027re checking for None below, any time we don\u0027t have a migration in place, we will always hit the DB again checking for it, even though we know it\u0027s already None.\n\nI think you need to use a different sentinel here to get proper behavior.","commit_id":"d8621e4e3c355e7ab88c1aa7179aca56de297cc8"}]}
