)]}'
{"neutron/objects/trunk.py":[{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"4f0e18ebc073dc44eec967b7dcbcad3cc3060819","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_235e8e45","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"updated":"2016-06-10 01:42:09.000000000","message":"Do we really need that considering we have \u0027load_synthetic_db_fields\u0027 [1]?\n\n[1] https://github.com/openstack/neutron/blob/97ec12150275717ac044cc60ecc42f6432dce99c/neutron/objects/base.py#L320","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7eabf65db8624990ca64039ba1a030d214a1141a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_3aaa2f71","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"in_reply_to":"7aa08908_235e8e45","updated":"2016-06-10 05:01:18.000000000","message":"Just following the example here [1]\n\n[1] https://review.openstack.org/gitweb?p\u003dopenstack/neutron.git;a\u003dblob;f\u003dneutron/objects/subnetpool.py;h\u003d2188c0df3e218f2de407c11c519993488128de6b;hb\u003dHEAD","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"a8fd8fe6e5d4588386eb9bb481956b06ac709fb0","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_76496b8e","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"in_reply_to":"7aa08908_3aaa2f71","updated":"2016-06-10 08:12:20.000000000","message":"Well, the unit tests from this patch would pass without this \u0027reload\u0027. The functionality you are adding is already there in the NeutronDbObject.\n\nAnd we should probably update SubnetPool to utilise current features of NeutronDbObject :)","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"bccd7ef7ed62ccf073bd6e52c543d99331e40a92","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_e943a36a","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"in_reply_to":"7aa08908_76496b8e","updated":"2016-06-10 16:02:44.000000000","message":"No, the unit tests aren\u0027t passing without invoking reload_subports(). Every subport gets attached to every trunk without this. Without some explicit reload mechanism things fail spectacularly.","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"8641a316b7cc9ce8f41686280716e931c0e8b21c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_54136b5c","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"in_reply_to":"7aa08908_db62ee15","updated":"2016-06-10 16:58:14.000000000","message":"Thanks. I saw this behavior when I a ran under devstack, so it\u0027s not just related to the test framework. API tests were breaking without this as well.","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"c10aaeeac94b6ba88f8f04f1881551b426f80426","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._sub_ports_attrs \u003d kwargs.pop(\u0027sub_ports\u0027, [])"},{"line_number":85,"context_line":"        super(Trunk, self).__init__(context, **kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def reload_subports(self):"},{"line_number":88,"context_line":"        del self._sub_ports_attrs"},{"line_number":89,"context_line":"        self.sub_ports \u003d SubPort.get_objects(self._context, trunk_id\u003dself.id)"},{"line_number":90,"context_line":"        self.obj_reset_changes([\u0027sub_ports\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_db62ee15","line":87,"range":{"start_line":87,"start_character":8,"end_line":87,"end_character":23},"in_reply_to":"7aa08908_e943a36a","updated":"2016-06-10 16:20:36.000000000","message":"\u003e Every subport gets attached to every trunk without this\n\nThat should not happen, but if it does we probably got some bug in model/ovo/test framework. I\u0027ll look into it.","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"}],"neutron/tests/unit/objects/test_trunk.py":[{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"4f0e18ebc073dc44eec967b7dcbcad3cc3060819","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_object_filter_unrelated_subports(self):"},{"line_number":124,"context_line":"        self.test_create_with_sub_ports()"},{"line_number":125,"context_line":"        port \u003d self._create_port(network_id\u003dself._network[\u0027id\u0027])"},{"line_number":126,"context_line":"        trunk \u003d t_obj.Trunk(self.context, port_id\u003dport.id)"},{"line_number":127,"context_line":"        trunk.create()"},{"line_number":128,"context_line":"        trunk \u003d t_obj.Trunk.get_object(self.context, id\u003dtrunk.id)"},{"line_number":129,"context_line":"        self.assertEqual(0, len(trunk.sub_ports))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_c6f7d8f3","line":127,"range":{"start_line":125,"start_character":8,"end_line":127,"end_character":22},"updated":"2016-06-10 01:42:09.000000000","message":"Please consider using self.obj_fields[1] (see [1]), it already has the port.\n\n[1] https://review.openstack.org/#/c/327345/1/neutron/tests/unit/objects/test_trunk.py@93","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"a8fd8fe6e5d4588386eb9bb481956b06ac709fb0","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_object_filter_unrelated_subports(self):"},{"line_number":124,"context_line":"        self.test_create_with_sub_ports()"},{"line_number":125,"context_line":"        port \u003d self._create_port(network_id\u003dself._network[\u0027id\u0027])"},{"line_number":126,"context_line":"        trunk \u003d t_obj.Trunk(self.context, port_id\u003dport.id)"},{"line_number":127,"context_line":"        trunk.create()"},{"line_number":128,"context_line":"        trunk \u003d t_obj.Trunk.get_object(self.context, id\u003dtrunk.id)"},{"line_number":129,"context_line":"        self.assertEqual(0, len(trunk.sub_ports))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_b6c913af","line":127,"range":{"start_line":125,"start_character":8,"end_line":127,"end_character":22},"in_reply_to":"7aa08908_5a061b21","updated":"2016-06-10 08:12:20.000000000","message":"You can replace L125-126 with \u0027trunk \u003d self._make_obj(self.obj_fields[1])\u0027.","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7eabf65db8624990ca64039ba1a030d214a1141a","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_object_filter_unrelated_subports(self):"},{"line_number":124,"context_line":"        self.test_create_with_sub_ports()"},{"line_number":125,"context_line":"        port \u003d self._create_port(network_id\u003dself._network[\u0027id\u0027])"},{"line_number":126,"context_line":"        trunk \u003d t_obj.Trunk(self.context, port_id\u003dport.id)"},{"line_number":127,"context_line":"        trunk.create()"},{"line_number":128,"context_line":"        trunk \u003d t_obj.Trunk.get_object(self.context, id\u003dtrunk.id)"},{"line_number":129,"context_line":"        self.assertEqual(0, len(trunk.sub_ports))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_5a061b21","line":127,"range":{"start_line":125,"start_character":8,"end_line":127,"end_character":22},"in_reply_to":"7aa08908_c6f7d8f3","updated":"2016-06-10 05:01:18.000000000","message":"Not sure I understand. I need 2 trunks: 1 with a subport and 1 without. The assertion is that subports not attached to the trunk are not returned with an unrelated trunk. To create the 2nd trunk, I need something like [1].\n\n[1] https://review.openstack.org/#/c/327345/1/neutron/tests/unit/objects/test_trunk.py@87","commit_id":"75524ba01f6cb6576f67a7c8a468b96fd4dba596"}]}
