)]}'
{"nova/objects/flavor.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95f5091702f49091b5b93e7db1f4cf2c7ac222e1","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    # to be able to make updates to a flavor."},{"line_number":491,"context_line":"    @db_api.api_context_manager.writer"},{"line_number":492,"context_line":"    def _save(self, context, values):"},{"line_number":493,"context_line":"        db_flavor \u003d context.session.query(api_models.Flavors).\\"},{"line_number":494,"context_line":"            filter_by(id\u003dself.id).first()"},{"line_number":495,"context_line":"        if not db_flavor:"},{"line_number":496,"context_line":"            raise exception.FlavorNotFound(flavor_id\u003dself.id)"},{"line_number":497,"context_line":"        db_flavor.update(values)"},{"line_number":498,"context_line":"        db_flavor.save(context.session)"},{"line_number":499,"context_line":"        # Refresh ourselves from the DB object so we get the new updated_at."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_e5b46984","line":496,"range":{"start_line":493,"start_character":8,"end_line":496,"end_character":61},"updated":"2017-11-02 13:49:16.000000000","message":"Why don\u0027t you use the existing db.flavor_get(self.id) instead?","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"461c4c77f8c5aca33fa709e15fa9b3bf0f317a48","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    # to be able to make updates to a flavor."},{"line_number":491,"context_line":"    @db_api.api_context_manager.writer"},{"line_number":492,"context_line":"    def _save(self, context, values):"},{"line_number":493,"context_line":"        db_flavor \u003d context.session.query(api_models.Flavors).\\"},{"line_number":494,"context_line":"            filter_by(id\u003dself.id).first()"},{"line_number":495,"context_line":"        if not db_flavor:"},{"line_number":496,"context_line":"            raise exception.FlavorNotFound(flavor_id\u003dself.id)"},{"line_number":497,"context_line":"        db_flavor.update(values)"},{"line_number":498,"context_line":"        db_flavor.save(context.session)"},{"line_number":499,"context_line":"        # Refresh ourselves from the DB object so we get the new updated_at."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_f3215ab7","line":496,"range":{"start_line":493,"start_character":8,"end_line":496,"end_character":61},"in_reply_to":"3f4b6375_59c6619c","updated":"2017-11-08 14:18:10.000000000","message":"Yeah, I thought about nova.db.sqlalchemy.api.falvor_get but I see now why that is not what we want.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"686a02dd00e2c0cd18cde05e33da5c7c90eb69f0","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    # to be able to make updates to a flavor."},{"line_number":491,"context_line":"    @db_api.api_context_manager.writer"},{"line_number":492,"context_line":"    def _save(self, context, values):"},{"line_number":493,"context_line":"        db_flavor \u003d context.session.query(api_models.Flavors).\\"},{"line_number":494,"context_line":"            filter_by(id\u003dself.id).first()"},{"line_number":495,"context_line":"        if not db_flavor:"},{"line_number":496,"context_line":"            raise exception.FlavorNotFound(flavor_id\u003dself.id)"},{"line_number":497,"context_line":"        db_flavor.update(values)"},{"line_number":498,"context_line":"        db_flavor.save(context.session)"},{"line_number":499,"context_line":"        # Refresh ourselves from the DB object so we get the new updated_at."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_59c6619c","line":496,"range":{"start_line":493,"start_character":8,"end_line":496,"end_character":61},"in_reply_to":"3f4b6375_e5b46984","updated":"2017-11-03 16:47:02.000000000","message":"Which method do you mean specifically? nova.db.sqlalchemy.api.flavor_get? Because that is the cell DB API and flavors live in the API DB now.\n\nOr do you mean _flavor_get_from_db above? I think I thought about re-using that but didn\u0027t need the extra_specs and flavor access stuff here.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"}],"nova/objects/instance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"74807a1ffd2547fcab58733e54d65ce8d11c4609","unresolved":false,"context_lines":[{"line_number":637,"context_line":"        for key in flavor_info:"},{"line_number":638,"context_line":"            flavor \u003d flavor_info[key]"},{"line_number":639,"context_line":"            if flavor and \u0027description\u0027 in flavor[\u0027nova_object.data\u0027]:"},{"line_number":640,"context_line":"                del flavor[\u0027nova_object.data\u0027][\u0027description\u0027]"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"    def _save_flavor(self, context):"},{"line_number":643,"context_line":"        if not any([x in self.obj_what_changed() for x in"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_72fdc46c","line":640,"updated":"2017-10-24 21:51:29.000000000","message":"Rather than delete the entry, we might want to just set it to None, because I think removing it might cause us to hit this during version notification payload creation for the InstancePayload:\n\nhttps://github.com/openstack/nova/blob/e4f89ed5dd4259188d020749fa8fb1c77be2c03a/nova/notifications/objects/base.py#L125\n\nBecause the embedded instance.flavor won\u0027t have a description field but it\u0027ll be in the FlavorPayload schema.","commit_id":"98777a2c0480917c0fbd7aa869a768bc9ee251d3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95f5091702f49091b5b93e7db1f4cf2c7ac222e1","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        \"\"\"Helper method to nullify descriptions from a set of primitive"},{"line_number":632,"context_line":"        flavors."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        Note that we don\u0027t remove the flavor description since that would"},{"line_number":635,"context_line":"        make the versioned notification FlavorPayload have to handle the field"},{"line_number":636,"context_line":"        not being set on the embedded instance.flavor."},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        :param dict: dict of primitive flavor objects where the values are the"},{"line_number":639,"context_line":"            flavors which get persisted in the instance_extra.flavor table."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_06066c1d","line":636,"range":{"start_line":634,"start_character":8,"end_line":636,"end_character":54},"updated":"2017-11-02 13:49:16.000000000","message":"Actually the schema population code in the versioned notification base class already handles such situation. \nhttps://github.com/openstack/nova/blob/f974e3c3566f379211d7fdc790d07b5680925584/nova/notifications/objects/base.py#L135\n\nIn this case the  setattr call will raise ObjectActionError as the filed is not defined and also not lazy loadable. Then it is catched logged on debug and then the payload field is defaulted to None.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"686a02dd00e2c0cd18cde05e33da5c7c90eb69f0","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        \"\"\"Helper method to nullify descriptions from a set of primitive"},{"line_number":632,"context_line":"        flavors."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        Note that we don\u0027t remove the flavor description since that would"},{"line_number":635,"context_line":"        make the versioned notification FlavorPayload have to handle the field"},{"line_number":636,"context_line":"        not being set on the embedded instance.flavor."},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        :param dict: dict of primitive flavor objects where the values are the"},{"line_number":639,"context_line":"            flavors which get persisted in the instance_extra.flavor table."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_198ea978","line":636,"range":{"start_line":634,"start_character":8,"end_line":636,"end_character":54},"in_reply_to":"3f4b6375_06066c1d","updated":"2017-11-03 16:47:02.000000000","message":"Yeah, but (1) I want to avoid the lazy-load altogether for performance reasons and (2) I want to avoid the debug log message in a predictable situation.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"461c4c77f8c5aca33fa709e15fa9b3bf0f317a48","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        \"\"\"Helper method to nullify descriptions from a set of primitive"},{"line_number":632,"context_line":"        flavors."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        Note that we don\u0027t remove the flavor description since that would"},{"line_number":635,"context_line":"        make the versioned notification FlavorPayload have to handle the field"},{"line_number":636,"context_line":"        not being set on the embedded instance.flavor."},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        :param dict: dict of primitive flavor objects where the values are the"},{"line_number":639,"context_line":"            flavors which get persisted in the instance_extra.flavor table."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_3ef0d9fd","line":636,"range":{"start_line":634,"start_character":8,"end_line":636,"end_character":54},"in_reply_to":"3f4b6375_198ea978","updated":"2017-11-08 14:18:10.000000000","message":"Sure, make sense.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95f5091702f49091b5b93e7db1f4cf2c7ac222e1","unresolved":false,"context_lines":[{"line_number":638,"context_line":"        :param dict: dict of primitive flavor objects where the values are the"},{"line_number":639,"context_line":"            flavors which get persisted in the instance_extra.flavor table."},{"line_number":640,"context_line":"        \"\"\""},{"line_number":641,"context_line":"        for key in flavor_info:"},{"line_number":642,"context_line":"            flavor \u003d flavor_info[key]"},{"line_number":643,"context_line":"            if flavor and \u0027description\u0027 in flavor[\u0027nova_object.data\u0027]:"},{"line_number":644,"context_line":"                flavor[\u0027nova_object.data\u0027][\u0027description\u0027] \u003d None"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_00953333","line":642,"range":{"start_line":641,"start_character":1,"end_line":642,"end_character":37},"updated":"2017-11-02 13:49:16.000000000","message":"this could be simplified to:\n    for flavor in flavor_info.values()","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4674fe34295a42afd3cc14676778381cc2e6ef56","unresolved":false,"context_lines":[{"line_number":638,"context_line":"        :param dict: dict of primitive flavor objects where the values are the"},{"line_number":639,"context_line":"            flavors which get persisted in the instance_extra.flavor table."},{"line_number":640,"context_line":"        \"\"\""},{"line_number":641,"context_line":"        for key in flavor_info:"},{"line_number":642,"context_line":"            flavor \u003d flavor_info[key]"},{"line_number":643,"context_line":"            if flavor and \u0027description\u0027 in flavor[\u0027nova_object.data\u0027]:"},{"line_number":644,"context_line":"                flavor[\u0027nova_object.data\u0027][\u0027description\u0027] \u003d None"},{"line_number":645,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_2b3c5d91","line":642,"range":{"start_line":641,"start_character":1,"end_line":642,"end_character":37},"in_reply_to":"3f4b6375_00953333","updated":"2017-11-10 23:39:06.000000000","message":"Done","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95f5091702f49091b5b93e7db1f4cf2c7ac222e1","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return vm_state - exclude_states"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _create_flavor(self, **updates):"},{"line_number":91,"context_line":"        self.none_ \u003d {\u0027id\u0027: 1, \u0027flavorid\u0027: 1, \u0027name\u0027: \u0027m1.tiny\u0027,"},{"line_number":92,"context_line":"                      \u0027memory_mb\u0027: 512, \u0027vcpus\u0027: 1, \u0027vcpu_weight\u0027: None,"},{"line_number":93,"context_line":"                      \u0027root_gb\u0027: 1, \u0027ephemeral_gb\u0027: 0, \u0027rxtx_factor\u0027: 1,"},{"line_number":94,"context_line":"                      \u0027swap\u0027: 0, \u0027deleted\u0027: 0, \u0027disabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_2006efcf","line":91,"range":{"start_line":91,"start_character":8,"end_line":91,"end_character":18},"updated":"2017-11-02 13:49:16.000000000","message":"Why do we need this extra indirection?","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"686a02dd00e2c0cd18cde05e33da5c7c90eb69f0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        return vm_state - exclude_states"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _create_flavor(self, **updates):"},{"line_number":91,"context_line":"        self.none_ \u003d {\u0027id\u0027: 1, \u0027flavorid\u0027: 1, \u0027name\u0027: \u0027m1.tiny\u0027,"},{"line_number":92,"context_line":"                      \u0027memory_mb\u0027: 512, \u0027vcpus\u0027: 1, \u0027vcpu_weight\u0027: None,"},{"line_number":93,"context_line":"                      \u0027root_gb\u0027: 1, \u0027ephemeral_gb\u0027: 0, \u0027rxtx_factor\u0027: 1,"},{"line_number":94,"context_line":"                      \u0027swap\u0027: 0, \u0027deleted\u0027: 0, \u0027disabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_59742168","line":91,"range":{"start_line":91,"start_character":8,"end_line":91,"end_character":18},"in_reply_to":"3f4b6375_2006efcf","updated":"2017-11-03 16:47:02.000000000","message":"I\u0027m not actually sure what this is. :) Maybe a rebase mess up.","commit_id":"6b7b4bbf1c67ceea47cd465a86bb636d50e522e1"}]}
