)]}'
{"neutron/db/agents_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d7ed1bda20555d8b782f75e57590dc1bdfadd5e1","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @staticmethod"},{"line_number":271,"context_line":"    @resource_extend.extends([agent_apidef.COLLECTION_NAME])"},{"line_number":272,"context_line":"    def _extend_agent_dict_resources_synced(agent_res, agent_obj):"},{"line_number":273,"context_line":"        agent_res[\u0027resources_synced\u0027] \u003d agent_obj.resources_synced"},{"line_number":274,"context_line":"        return agent_res"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_436f5427","line":271,"updated":"2019-02-15 09:08:06.000000000","message":"I\u0027m now not sure if I understand correctly purpose of using resource_extend.extends(). I always though that it\u0027s something which can allow extend resource\u0027s attributes by some new plugin/driver/etc. but here You are using it to just add one new attribute to agent object. Can\u0027t it be done \"directly\" like e.g. \"alive\", \"resource_versions\" or any other attribute?","commit_id":"3c238711d8db13234502574a9ae0bac16a3c0eec"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"91c25d641cdcffc1397054363e576981d190fa0f","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @staticmethod"},{"line_number":271,"context_line":"    @resource_extend.extends([agent_apidef.COLLECTION_NAME])"},{"line_number":272,"context_line":"    def _extend_agent_dict_resources_synced(agent_res, agent_obj):"},{"line_number":273,"context_line":"        agent_res[\u0027resources_synced\u0027] \u003d agent_obj.resources_synced"},{"line_number":274,"context_line":"        return agent_res"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_7e38ebd1","line":271,"in_reply_to":"9fdfeff1_436f5427","updated":"2019-02-15 09:49:40.000000000","message":"While writing this patch I was a bit torn whether to make it possible to disable this extension or not. In the patch I finally uploaded it cannot be disabled. But I left stuff like this around. I\u0027ll just delete it.","commit_id":"3c238711d8db13234502574a9ae0bac16a3c0eec"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5e88adf0fb1662ee21c8698131266b33f1c07a53","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        return db_utils.resource_fields(res, fields)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @staticmethod"},{"line_number":271,"context_line":"    @resource_extend.extends([agent_apidef.COLLECTION_NAME])"},{"line_number":272,"context_line":"    def _extend_agent_dict_resources_synced(agent_res, agent_obj):"},{"line_number":273,"context_line":"        agent_res[\u0027resources_synced\u0027] \u003d agent_obj.resources_synced"},{"line_number":274,"context_line":"        return agent_res"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_d59c550f","line":271,"in_reply_to":"9fdfeff1_7e38ebd1","updated":"2019-02-15 12:30:51.000000000","message":"Thx :)","commit_id":"3c238711d8db13234502574a9ae0bac16a3c0eec"}],"neutron/db/migration/alembic_migrations/versions/stein/expand/fb0167bd9639_agent_resources_synced.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e1e443cf4e68577dc181be11289e8d48eabffb96","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            \u0027resources_synced\u0027,"},{"line_number":38,"context_line":"            sa.Boolean(),"},{"line_number":39,"context_line":"            server_default\u003dNone,"},{"line_number":40,"context_line":"            nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_0fff0568","line":40,"range":{"start_line":40,"start_character":12,"end_line":40,"end_character":25},"updated":"2019-01-18 17:57:46.000000000","message":"nullable is True by default (if this field is not a primary key)","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"da3ab3412eb59a6474334a38ac6b8d0120be2913","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            \u0027resources_synced\u0027,"},{"line_number":38,"context_line":"            sa.Boolean(),"},{"line_number":39,"context_line":"            server_default\u003dNone,"},{"line_number":40,"context_line":"            nullable\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ead61850","line":40,"range":{"start_line":40,"start_character":12,"end_line":40,"end_character":25},"in_reply_to":"9fdfeff1_0fff0568","updated":"2019-01-21 14:43:25.000000000","message":"Done","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"b6749de3c89b458567fd45994b7907ab035ccc8b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def upgrade():"},{"line_number":34,"context_line":"    op.add_column("},{"line_number":35,"context_line":"        \u0027agents\u0027,"},{"line_number":36,"context_line":"        sa.Column("},{"line_number":37,"context_line":"            \u0027resources_synced\u0027,"},{"line_number":38,"context_line":"            sa.Boolean(),"},{"line_number":39,"context_line":"            server_default\u003dNone))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_fcd322d4","line":36,"range":{"start_line":36,"start_character":11,"end_line":36,"end_character":17},"updated":"2019-02-20 20:26:32.000000000","message":"nit: the indentation is odd. How about changing it to:\n\n    op.add_column(\n        \u0027agents\u0027,\n        sa.Column(\u0027resources_synced\u0027, sa.Boolean(), server_default\u003dNone))","commit_id":"75beded757f9901724e54b7f3eaff487d4478d38"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"01dcef4968e8f83551305eda64ea38399229aaa3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"def upgrade():"},{"line_number":34,"context_line":"    op.add_column("},{"line_number":35,"context_line":"        \u0027agents\u0027,"},{"line_number":36,"context_line":"        sa.Column("},{"line_number":37,"context_line":"            \u0027resources_synced\u0027,"},{"line_number":38,"context_line":"            sa.Boolean(),"},{"line_number":39,"context_line":"            server_default\u003dNone))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_7326736b","line":36,"range":{"start_line":36,"start_character":11,"end_line":36,"end_character":17},"in_reply_to":"9fdfeff1_fcd322d4","updated":"2019-02-21 12:47:17.000000000","message":"Done","commit_id":"75beded757f9901724e54b7f3eaff487d4478d38"}],"neutron/extensions/agent_resources_synced.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"198677360a5fbaba16ea4948c297c22efa682166","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib.api.definitions import agent_resources_synced as apidef"},{"line_number":16,"context_line":"from neutron_lib.api import extensions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfdaf3ff_a203f172","line":15,"range":{"start_line":15,"start_character":40,"end_line":15,"end_character":62},"updated":"2019-01-17 13:14:44.000000000","message":"This obviously won\u0027t work until we land your lib patch that adds this extension and release lib. What other people have done is to temporary define the api extension in neutron (e.g. neutron.extensions._agent_resources_synced) and once the lib patch lands/releases just remove/replace it.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"da3ab3412eb59a6474334a38ac6b8d0120be2913","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib.api.definitions import agent_resources_synced as apidef"},{"line_number":16,"context_line":"from neutron_lib.api import extensions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_56b110e1","line":15,"range":{"start_line":15,"start_character":40,"end_line":15,"end_character":62},"in_reply_to":"bfdaf3ff_a203f172","updated":"2019-01-21 14:43:25.000000000","message":"I think we can wait easily for the next neutron-lib release. There\u0027s no rush. But thanks for the hint anyway.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"}],"neutron/objects/agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e1e443cf4e68577dc181be11289e8d48eabffb96","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \u0027resource_versions\u0027: common_types.DictOfMiscValuesField(nullable\u003dTrue),"},{"line_number":52,"context_line":"        \u0027load\u0027: obj_fields.IntegerField(default\u003d0),"},{"line_number":53,"context_line":"        \u0027resources_synced\u0027: obj_fields.BooleanField("},{"line_number":54,"context_line":"            nullable\u003dTrue, default\u003dNone),"},{"line_number":55,"context_line":"    }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ef688122","line":54,"range":{"start_line":54,"start_character":27,"end_line":54,"end_character":39},"updated":"2019-01-18 17:57:46.000000000","message":"If the field is nullable, the default value will be None. You don\u0027t need this.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"da3ab3412eb59a6474334a38ac6b8d0120be2913","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \u0027resource_versions\u0027: common_types.DictOfMiscValuesField(nullable\u003dTrue),"},{"line_number":52,"context_line":"        \u0027load\u0027: obj_fields.IntegerField(default\u003d0),"},{"line_number":53,"context_line":"        \u0027resources_synced\u0027: obj_fields.BooleanField("},{"line_number":54,"context_line":"            nullable\u003dTrue, default\u003dNone),"},{"line_number":55,"context_line":"    }"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_96dc5819","line":54,"range":{"start_line":54,"start_character":27,"end_line":54,"end_character":39},"in_reply_to":"9fdfeff1_ef688122","updated":"2019-01-21 14:43:25.000000000","message":"Done","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"}],"neutron/tests/unit/objects/test_agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e1e443cf4e68577dc181be11289e8d48eabffb96","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertNotIn("},{"line_number":81,"context_line":"            \u0027resources_synced\u0027, primitive[\u0027versioned_object.data\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_resources_synced_11(self):"},{"line_number":84,"context_line":"        obj \u003d agent.Agent()"},{"line_number":85,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.1\u0027)"},{"line_number":86,"context_line":"        self.assertIn("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_af4b59ae","line":83,"updated":"2019-01-18 17:57:46.000000000","message":"This test is not needed. This field will be in the object by definition. The valid test is the previous one, testing the version downgrade.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"059b89cbf40ccb1281ac30a1badadc71c11c6481","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertNotIn("},{"line_number":81,"context_line":"            \u0027resources_synced\u0027, primitive[\u0027versioned_object.data\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_resources_synced_11(self):"},{"line_number":84,"context_line":"        obj \u003d agent.Agent()"},{"line_number":85,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.1\u0027)"},{"line_number":86,"context_line":"        self.assertIn("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_9721a3a2","line":83,"in_reply_to":"9fdfeff1_96bd386a","updated":"2019-01-22 09:15:37.000000000","message":"I think I didn\u0027t explain myself correctly. What I said was the test \"test_resources_synced_10\" is valid because you are testing the version downgrade. But the current test is not necessary because \"resources_synced\" is going to be always in v1.1 by definition; that\u0027s why I said \"test_resources_synced_11\" is not needed.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"9e24a58de0bfbb107f467007d6f78dede6c1fdb4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertNotIn("},{"line_number":81,"context_line":"            \u0027resources_synced\u0027, primitive[\u0027versioned_object.data\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_resources_synced_11(self):"},{"line_number":84,"context_line":"        obj \u003d agent.Agent()"},{"line_number":85,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.1\u0027)"},{"line_number":86,"context_line":"        self.assertIn("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ca1beb18","line":83,"in_reply_to":"9fdfeff1_9721a3a2","updated":"2019-01-23 08:29:57.000000000","message":"Will be deleted in the next patch set.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"da3ab3412eb59a6474334a38ac6b8d0120be2913","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertNotIn("},{"line_number":81,"context_line":"            \u0027resources_synced\u0027, primitive[\u0027versioned_object.data\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_resources_synced_11(self):"},{"line_number":84,"context_line":"        obj \u003d agent.Agent()"},{"line_number":85,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.1\u0027)"},{"line_number":86,"context_line":"        self.assertIn("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_96bd386a","line":83,"in_reply_to":"9fdfeff1_af4b59ae","updated":"2019-01-21 14:43:25.000000000","message":"While working on this I was mostly following examples of this kind of change from nova. While doing that I actually found tests like this:\n\n def test_whatever_downgraded_version():\n    ...\n    assertNotIn(\u0027newkey\u0027, primitive)\n\nAnd there was no test for the presence of \u0027newkey\u0027 in the new ovo version. Also please note that the above test passes but it\u0027s actually wrong, because the right one would do this: assertNotIn(\u0027newkey\u0027, primitive[\u0027versioned_object.data\u0027]).\n\nThe test-pair would have caught that error. That\u0027s why I think the test-pair is better than having the downgrade test only.","commit_id":"134512b73a3464439b876c520a3c48e7e1880cf5"}]}
