)]}'
{"nova/objects/flavor.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d5bff17e8741cd9af60eef6b2ea1abb8fac97bc6","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                if \u0027id\u0027 in self:"},{"line_number":246,"context_line":"                    self._flavor_get_from_db(self._context, self.id)"},{"line_number":247,"context_line":"                else:"},{"line_number":248,"context_line":"                    flavor \u003d self._flavor_get_by_flavor_id_from_db("},{"line_number":249,"context_line":"                        self._context,"},{"line_number":250,"context_line":"                        self.flavorid)"},{"line_number":251,"context_line":"                    # Fix us up so we can use our real id"},{"line_number":252,"context_line":"                    self.id \u003d flavor[\u0027id\u0027]"},{"line_number":253,"context_line":"                self._in_api \u003d True"},{"line_number":254,"context_line":"            except exception.FlavorNotFound:"},{"line_number":255,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_777233e7","side":"PARENT","line":252,"range":{"start_line":248,"start_character":0,"end_line":252,"end_character":42},"updated":"2017-02-10 17:35:52.000000000","message":"This is where we were doing the load of id before.","commit_id":"19998818a83e09834c62d30c8f9c64989d151ab2"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ee35fb733425a8aa5fb52accf761ccd487334dec","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.obj_reset_changes([\u0027projects\u0027])"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _load_id(self):"},{"line_number":316,"context_line":"        flavor \u003d Flavor.get_by_flavor_id(self._context, self.flavorid)"},{"line_number":317,"context_line":"        self.id \u003d flavor.id"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":320,"context_line":"        # NOTE(danms): Only projects could be lazy-loaded right now"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_665c4726","line":317,"range":{"start_line":316,"start_character":7,"end_line":317,"end_character":27},"updated":"2017-02-10 16:25:28.000000000","message":"this seems inefficient, retrieving the whole object just to get the id.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"82db3fe9e5affbbee73f683e0772e01c59203abc","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.obj_reset_changes([\u0027projects\u0027])"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _load_id(self):"},{"line_number":316,"context_line":"        flavor \u003d Flavor.get_by_flavor_id(self._context, self.flavorid)"},{"line_number":317,"context_line":"        self.id \u003d flavor.id"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":320,"context_line":"        # NOTE(danms): Only projects could be lazy-loaded right now"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_7addb713","line":317,"range":{"start_line":316,"start_character":7,"end_line":317,"end_character":27},"in_reply_to":"fa31d9ce_576d2f03","updated":"2017-02-10 19:09:59.000000000","message":"All good points.  I retract my statement.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d5bff17e8741cd9af60eef6b2ea1abb8fac97bc6","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.obj_reset_changes([\u0027projects\u0027])"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _load_id(self):"},{"line_number":316,"context_line":"        flavor \u003d Flavor.get_by_flavor_id(self._context, self.flavorid)"},{"line_number":317,"context_line":"        self.id \u003d flavor.id"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":320,"context_line":"        # NOTE(danms): Only projects could be lazy-loaded right now"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_576d2f03","line":317,"range":{"start_line":316,"start_character":7,"end_line":317,"end_character":27},"in_reply_to":"fa31d9ce_665c4726","updated":"2017-02-10 17:35:52.000000000","message":"The object is small, we\u0027re not pulling any of the extra stuff, and we have to pull the row to get this anyway. This turns into an RPC call to a DB fetch, so it\u0027s no more efficient if we just pull the ID, plus we\u0027d need a dedicated RPC call for \"get me the id of a flavor).\n\nAlso, this is a direct replacement for what was happening in in_api(), and this moves it to the actual load handler when the thing is missing instead of buried there.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ee35fb733425a8aa5fb52accf761ccd487334dec","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        self.id \u003d flavor.id"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":320,"context_line":"        # NOTE(danms): Only projects could be lazy-loaded right now"},{"line_number":321,"context_line":"        if attrname not in (\u0027projects\u0027, \u0027id\u0027):"},{"line_number":322,"context_line":"            raise exception.ObjectActionError("},{"line_number":323,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_863a1bcc","line":320,"range":{"start_line":320,"start_character":23,"end_line":320,"end_character":67},"updated":"2017-02-10 16:25:28.000000000","message":"does this comment need to be updated?","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d5bff17e8741cd9af60eef6b2ea1abb8fac97bc6","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        self.id \u003d flavor.id"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def obj_load_attr(self, attrname):"},{"line_number":320,"context_line":"        # NOTE(danms): Only projects could be lazy-loaded right now"},{"line_number":321,"context_line":"        if attrname not in (\u0027projects\u0027, \u0027id\u0027):"},{"line_number":322,"context_line":"            raise exception.ObjectActionError("},{"line_number":323,"context_line":"                action\u003d\u0027obj_load_attr\u0027, reason\u003d\u0027unable to load %s\u0027 % attrname)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_d7811f91","line":320,"range":{"start_line":320,"start_character":23,"end_line":320,"end_character":67},"in_reply_to":"fa31d9ce_863a1bcc","updated":"2017-02-10 17:35:52.000000000","message":"Yes.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ee35fb733425a8aa5fb52accf761ccd487334dec","unresolved":false,"context_lines":[{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    @base.remotable"},{"line_number":522,"context_line":"    def destroy(self):"},{"line_number":523,"context_line":"        # NOTE(danms): Historically the only way to delete a flavor"},{"line_number":524,"context_line":"        # is via name, which is not very precise. We need to be able to"},{"line_number":525,"context_line":"        # support the light construction of a flavor object and subsequent"},{"line_number":526,"context_line":"        # delete request with only our name filled out. However, if we have"},{"line_number":527,"context_line":"        # our id property, we should instead delete with that since it\u0027s"},{"line_number":528,"context_line":"        # far more specific."},{"line_number":529,"context_line":"        if \u0027id\u0027 in self:"},{"line_number":530,"context_line":"            db_flavor \u003d self._flavor_destroy(self._context,"},{"line_number":531,"context_line":"                                             flavor_id\u003dself.id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_06370bb1","line":528,"range":{"start_line":523,"start_character":25,"end_line":528,"end_character":28},"updated":"2017-02-10 16:25:28.000000000","message":"I find the conflation of \"name\" and \"flavorid\" confusing, since there is actually a \"name\" class member but that\u0027s not what we\u0027re talking about here.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"}],"nova/tests/unit/objects/test_flavor.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ee35fb733425a8aa5fb52accf761ccd487334dec","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            test.assertEqual(db[field], obj[field])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @mock.patch(\u0027nova.objects.Flavor._flavor_get_from_db\u0027)"},{"line_number":82,"context_line":"    def test_api_get_by_id(self, mock_get):"},{"line_number":83,"context_line":"        mock_get.return_value \u003d fake_api_flavor"},{"line_number":84,"context_line":"        flavor \u003d flavor_obj.Flavor.get_by_id(self.context, 1)"},{"line_number":85,"context_line":"        self._compare(self, fake_api_flavor, flavor)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_e61d97be","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":26},"updated":"2017-02-10 16:25:28.000000000","message":"should this be \"test_get_by_id\"?","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d5bff17e8741cd9af60eef6b2ea1abb8fac97bc6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            test.assertEqual(db[field], obj[field])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @mock.patch(\u0027nova.objects.Flavor._flavor_get_from_db\u0027)"},{"line_number":82,"context_line":"    def test_api_get_by_id(self, mock_get):"},{"line_number":83,"context_line":"        mock_get.return_value \u003d fake_api_flavor"},{"line_number":84,"context_line":"        flavor \u003d flavor_obj.Flavor.get_by_id(self.context, 1)"},{"line_number":85,"context_line":"        self._compare(self, fake_api_flavor, flavor)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_720ec135","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":26},"in_reply_to":"fa31d9ce_e61d97be","updated":"2017-02-10 17:35:52.000000000","message":"Sure.","commit_id":"d8854e48cccd54ad4f07f1ed921c7cf0db3231a7"}]}
