)]}'
{"neutron/agent/linux/ovs_lib.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7c38373fa19809171bafe8b615973e6990784381","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                edge_ports.add(iface_id)"},{"line_number":368,"context_line":"        return edge_ports"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def get_port_tag_dict(self):"},{"line_number":371,"context_line":"        \"\"\"Get a dict of port names and associated vlan tags."},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"        e.g. the returned dict is of the following form::"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9Ul8%3D","line":370,"updated":"2014-02-07 18:54:57.000000000","message":"as there is a 1:1 mapping between port and interfaces, and scan_ports in the ovs agent calls get_vif_port_set, I was wondering if we could tweak that by returning all the ports with their tags, if set, thus avoiding two calls to ovs-vsctl","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":55,"name":"Édouard Thuleau","email":"ethuleau@juniper.net","username":"ethuleau"},"change_message_id":"6084e7d1ac266c5164b60da7e08fa3accb329fbe","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                edge_ports.add(iface_id)"},{"line_number":368,"context_line":"        return edge_ports"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def get_port_tag_dict(self):"},{"line_number":371,"context_line":"        \"\"\"Get a dict of port names and associated vlan tags."},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"        e.g. the returned dict is of the following form::"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2F8%2FA%3D","line":370,"in_reply_to":"AAAAUH%2F9Ul8%3D","updated":"2014-02-08 16:45:56.000000000","message":"The get_vif_port_set method use the \u0027Interface\u0027 table of OVS database whereas the tag ID is only available in the \u0027Port\u0027. So in any case, we we need to do two ovs-vsctl calls.","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7c38373fa19809171bafe8b615973e6990784381","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                continue"},{"line_number":392,"context_line":"            tag \u003d row[1]  # can be [u\u0027set\u0027, []] or an integer"},{"line_number":393,"context_line":"            if isinstance(tag, list):"},{"line_number":394,"context_line":"                tag \u003d tag[1]"},{"line_number":395,"context_line":"            port_tag_dict[name] \u003d tag"},{"line_number":396,"context_line":"        return port_tag_dict"},{"line_number":397,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9Us0%3D","line":394,"updated":"2014-02-07 18:54:57.000000000","message":"perhaps just set it to None in this case.\n\nJust an advisory comment.","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"10a022a7bd5bd65d681a10211b083cfbe35565a8","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                continue"},{"line_number":392,"context_line":"            tag \u003d row[1]  # can be [u\u0027set\u0027, []] or an integer"},{"line_number":393,"context_line":"            if isinstance(tag, list):"},{"line_number":394,"context_line":"                tag \u003d tag[1]"},{"line_number":395,"context_line":"            port_tag_dict[name] \u003d tag"},{"line_number":396,"context_line":"        return port_tag_dict"},{"line_number":397,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2F3MA%3D","line":394,"in_reply_to":"AAAAUH%2F9Us0%3D","updated":"2014-02-10 10:31:06.000000000","message":"Indeed, If I took the empty \"list\" it was just for it to reflect what we humanly see with a direct call to the ovs-vsctl command (without \u0027--format\u003djson\u0027) so that people knowing the ovs-vsctl command would be less confused.\n\nAlso, the following command can unset a tag::\n\n   ovs-vsctl set port tap3433f145-73 tag\u003d[]\n\nSo I wanted to keep it looking close to the ovs-vsctl command\u0027s response.\n\nEven though you\u0027re right, a \"None\" would also work in this case :-)\n\nI wonder however why \"tag\" returns the same format as \"trunks\" when unset or empty, while \"tag\" can only be unique unlike \"trunks\". (trunks e.g. can return [u\u0027set\u0027, [10,20,30]], so \"row[1]\" would retrieve the list, but this list indeed is always empty for \"tag\" ).\nI just wanted to be able to handle all the formats returned by a tag. and keep the same form of results. Indeed, for \"tag\" it is debatable  (but would be correct for \"trunks\").\n\nSo keeping the list as I did was for both cosmetic (look and feel :-) and compatibility with the returned format (In case one day ovs-vsctl\u0027s future version would really return a non empty list since it\u0027s the actual format of it\u0027s response).\n\nIs there a reason why \"tag\" is a list when unset?","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"775686b24122d433a28a57a27c7b7591b161d978","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":392,"context_line":"        args \u003d [\u0027--format\u003djson\u0027, \u0027--\u0027, \u0027--columns\u003dname,tag\u0027, \u0027list\u0027, \u0027Port\u0027]"},{"line_number":393,"context_line":"        result \u003d self.run_vsctl(args)"},{"line_number":394,"context_line":"        port_tag_dict \u003d {}"},{"line_number":395,"context_line":"        if not result:"},{"line_number":396,"context_line":"            return port_tag_dict"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2Fuyg%3D","line":393,"updated":"2014-03-04 12:43:17.000000000","message":"This call is expensive, I suggest to modify the function get_vif_port_set line 341 instead of adding a new function. Read my next comment please.","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a97fe784cc42c287a20a39374b3378a340fa742e","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":392,"context_line":"        args \u003d [\u0027--format\u003djson\u0027, \u0027--\u0027, \u0027--columns\u003dname,tag\u0027, \u0027list\u0027, \u0027Port\u0027]"},{"line_number":393,"context_line":"        result \u003d self.run_vsctl(args)"},{"line_number":394,"context_line":"        port_tag_dict \u003d {}"},{"line_number":395,"context_line":"        if not result:"},{"line_number":396,"context_line":"            return port_tag_dict"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2Fh%2Fk%3D","line":393,"in_reply_to":"AAAAVn%2F%2FuO8%3D","updated":"2014-03-05 15:31:14.000000000","message":"Got it, thanks for the explanation!","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"aa9cd2b672b564f45aff0ec2aa6d0ae5323d009d","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":392,"context_line":"        args \u003d [\u0027--format\u003djson\u0027, \u0027--\u0027, \u0027--columns\u003dname,tag\u0027, \u0027list\u0027, \u0027Port\u0027]"},{"line_number":393,"context_line":"        result \u003d self.run_vsctl(args)"},{"line_number":394,"context_line":"        port_tag_dict \u003d {}"},{"line_number":395,"context_line":"        if not result:"},{"line_number":396,"context_line":"            return port_tag_dict"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FuO8%3D","line":393,"in_reply_to":"AAAAVn%2F%2Fuyg%3D","updated":"2014-03-04 13:47:54.000000000","message":"get_vif_port_set in ovs_lib does not optain the tag because it calls the \"Interface\" table and it doesn\u0027t return the tag ID which is only available in the \"Port\" table.\nSo an extra call is compulsory.","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2d1be8e62d8d8211d4b7e8c5d9507aa1880ad41c","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        \"\"\""},{"line_number":411,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":412,"context_line":"        args \u003d [\u0027--format\u003djson\u0027, \u0027--\u0027, \u0027--columns\u003dname,tag\u0027, \u0027list\u0027, \u0027Port\u0027]"},{"line_number":413,"context_line":"        result \u003d self.run_vsctl(args)"},{"line_number":414,"context_line":"        port_tag_dict \u003d {}"},{"line_number":415,"context_line":"        if not result:"},{"line_number":416,"context_line":"            return port_tag_dict"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B%2BPg%3D","line":413,"updated":"2014-03-10 23:19:19.000000000","message":"consider running with check_error\u003dTrue (default logic was changed since you pushed your first patch set)","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"5303a25d732888c0009f4197ef48aa74e12e34dd","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        \"\"\""},{"line_number":411,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":412,"context_line":"        args \u003d [\u0027--format\u003djson\u0027, \u0027--\u0027, \u0027--columns\u003dname,tag\u0027, \u0027list\u0027, \u0027Port\u0027]"},{"line_number":413,"context_line":"        result \u003d self.run_vsctl(args)"},{"line_number":414,"context_line":"        port_tag_dict \u003d {}"},{"line_number":415,"context_line":"        if not result:"},{"line_number":416,"context_line":"            return port_tag_dict"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B62A%3D","line":413,"in_reply_to":"AAAAVn%2F%2B%2BPg%3D","updated":"2014-03-11 10:29:15.000000000","message":"Done","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c717692cd31a0703207dd9520fb4868b8c8c009e","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        port_tag_dict \u003d {}"},{"line_number":415,"context_line":"        if not result:"},{"line_number":416,"context_line":"            return port_tag_dict"},{"line_number":417,"context_line":"        for row in jsonutils.loads(result)[\u0027data\u0027]:"},{"line_number":418,"context_line":"            name \u003d row[0]"},{"line_number":419,"context_line":"            if name not in port_names:"},{"line_number":420,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2Fijg%3D","line":417,"updated":"2014-03-05 14:41:53.000000000","message":"it\u0027s more pythonic to write \"for name, tag in jsonutils.loads(result)[\u0027data\u0027]\"","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"5303a25d732888c0009f4197ef48aa74e12e34dd","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        port_tag_dict \u003d {}"},{"line_number":415,"context_line":"        if not result:"},{"line_number":416,"context_line":"            return port_tag_dict"},{"line_number":417,"context_line":"        for row in jsonutils.loads(result)[\u0027data\u0027]:"},{"line_number":418,"context_line":"            name \u003d row[0]"},{"line_number":419,"context_line":"            if name not in port_names:"},{"line_number":420,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B6nw%3D","line":417,"in_reply_to":"AAAAVn%2F%2Fijg%3D","updated":"2014-03-11 10:29:15.000000000","message":"Done\n\nThanks Cedric, nice catch.","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2d1be8e62d8d8211d4b7e8c5d9507aa1880ad41c","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                continue"},{"line_number":421,"context_line":"            tag \u003d row[1]  # can be [u\u0027set\u0027, []] or an integer"},{"line_number":422,"context_line":"            if isinstance(tag, list):"},{"line_number":423,"context_line":"                tag \u003d tag[1]"},{"line_number":424,"context_line":"            port_tag_dict[name] \u003d tag"},{"line_number":425,"context_line":"        return port_tag_dict"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B%2BPI%3D","line":423,"updated":"2014-03-10 23:19:19.000000000","message":"given the way ovs-vsctl format json output, in this case I would consider setting the tag to None or perhaps even not including the port in port_tag_dict (and treat it accordingly in ovs_neutron_agent)","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"5303a25d732888c0009f4197ef48aa74e12e34dd","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                continue"},{"line_number":421,"context_line":"            tag \u003d row[1]  # can be [u\u0027set\u0027, []] or an integer"},{"line_number":422,"context_line":"            if isinstance(tag, list):"},{"line_number":423,"context_line":"                tag \u003d tag[1]"},{"line_number":424,"context_line":"            port_tag_dict[name] \u003d tag"},{"line_number":425,"context_line":"        return port_tag_dict"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B61s%3D","line":423,"in_reply_to":"AAAAVn%2F%2B%2BF8%3D","updated":"2014-03-11 10:29:15.000000000","message":"Done :-)","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"894a28384f56b5f0d87e668688ce938de4dfa11b","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                continue"},{"line_number":421,"context_line":"            tag \u003d row[1]  # can be [u\u0027set\u0027, []] or an integer"},{"line_number":422,"context_line":"            if isinstance(tag, list):"},{"line_number":423,"context_line":"                tag \u003d tag[1]"},{"line_number":424,"context_line":"            port_tag_dict[name] \u003d tag"},{"line_number":425,"context_line":"        return port_tag_dict"},{"line_number":426,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B%2BF8%3D","line":423,"in_reply_to":"AAAAVn%2F%2B%2BPI%3D","updated":"2014-03-10 23:48:13.000000000","message":"I forgot I commented the same 1 month ago. Forget this please.","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"73aa0d9f1a947bf7e96d9ed820663e8ddb45b915","unresolved":false,"context_lines":[{"line_number":404,"context_line":"             u\u0027tapce5318ff-78\u0027: 1,"},{"line_number":405,"context_line":"             u\u0027tape1400310-e6\u0027: 1}"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        The TAG ID is only available in the \"Port\" table and is not available"},{"line_number":408,"context_line":"        in the \"Interface\" table queried by the get_vif_port_set() method."},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2B6Co%3D","line":407,"updated":"2014-03-11 12:59:52.000000000","message":"Thanks for adding this!","commit_id":"60cb0911712ad11688b4d09e5c01ac39c49f5aea"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"3df462bb766a069a162cc7b9c0f99f174bab37f2","unresolved":false,"context_lines":[{"line_number":863,"context_line":"                ):"},{"line_number":864,"context_line":"                    LOG.warning("},{"line_number":865,"context_line":"                        _(\"Port \u0027%(port_name)s\u0027 has lost \""},{"line_number":866,"context_line":"                            \"it\u0027s vlan tag \u0027%(vlan_tag)d\u0027!\"),"},{"line_number":867,"context_line":"                        {\u0027port_name\u0027: lvm.vif_ports[port].port_name,"},{"line_number":868,"context_line":"                         \u0027vlan_tag\u0027: lvm.vlan}"},{"line_number":869,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2BX5o%3D","line":866,"updated":"2014-01-27 16:08:50.000000000","message":"If you concider another patchset :\ns/it\u0027s/its/","commit_id":"85dbec373e745e3e106061d8d0fba7ab6f58e34e"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"e87af0ea86cd7f925dd7f266b3fb008ddcf252f9","unresolved":false,"context_lines":[{"line_number":863,"context_line":"                ):"},{"line_number":864,"context_line":"                    LOG.warning("},{"line_number":865,"context_line":"                        _(\"Port \u0027%(port_name)s\u0027 has lost \""},{"line_number":866,"context_line":"                            \"it\u0027s vlan tag \u0027%(vlan_tag)d\u0027!\"),"},{"line_number":867,"context_line":"                        {\u0027port_name\u0027: lvm.vif_ports[port].port_name,"},{"line_number":868,"context_line":"                         \u0027vlan_tag\u0027: lvm.vlan}"},{"line_number":869,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F92y4%3D","line":866,"in_reply_to":"AAAAUH%2F%2BX5o%3D","updated":"2014-02-03 09:19:34.000000000","message":"Done","commit_id":"85dbec373e745e3e106061d8d0fba7ab6f58e34e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"266be1d2d4bf79d1b473530679a87fa82a13145b","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        removed \u003d registered_ports - ports"},{"line_number":842,"context_line":"        # Treat changed ports as removed and added"},{"line_number":843,"context_line":"        added.update(changed_ports)"},{"line_number":844,"context_line":"        removed.update(changed_ports)"},{"line_number":845,"context_line":"        return {\u0027current\u0027: ports,"},{"line_number":846,"context_line":"                \u0027added\u0027: added,"},{"line_number":847,"context_line":"                \u0027removed\u0027: removed}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9vkI%3D","line":844,"updated":"2014-02-04 13:40:59.000000000","message":"My concern is about the number of rpc call that will happen since for every remove/add,  there will be 3 rpc calls (device down, get_device_details, device up). Would it be better to add a changed item to the dict and a specific method to process it which will not do any rpc call ?","commit_id":"7db12bd7e1136929329dfae7f340f565f7c18845"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"71d6b231f1c6eac20c87acc885b96a89e4498bd7","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        port_info \u003d {\u0027current\u0027: cur_ports}"},{"line_number":822,"context_line":"        if updated_ports is None:"},{"line_number":823,"context_line":"            updated_ports \u003d set()"},{"line_number":824,"context_line":"        updated_ports.update(self.check_changed_vlans(registered_ports))"},{"line_number":825,"context_line":"        if updated_ports:"},{"line_number":826,"context_line":"            # Some updated ports might have been removed in the"},{"line_number":827,"context_line":"            # meanwhile, and therefore should not be processed."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2F3IA%3D","line":824,"updated":"2014-02-10 10:44:29.000000000","message":"Regarding to my comment on a previous patch about the number of RPC calls, this patch now uses the updated field which is a good thing. The improvement of the updated field management is not related to this fix and could be addressed in another patch.","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"7c38373fa19809171bafe8b615973e6990784381","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        port_info[\u0027removed\u0027] \u003d registered_ports - cur_ports"},{"line_number":843,"context_line":"        return port_info"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def check_changed_vlans(self, registered_ports):"},{"line_number":846,"context_line":"        \"\"\"Return ports which have lost their vlan tag."},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"        The returned value is a set of port ids of the ports concerned by a"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9Umc%3D","line":845,"updated":"2014-02-07 18:54:57.000000000","message":"from a code organization standpoint, this is probably better called from within scan_ports","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"10a022a7bd5bd65d681a10211b083cfbe35565a8","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        port_info[\u0027removed\u0027] \u003d registered_ports - cur_ports"},{"line_number":843,"context_line":"        return port_info"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def check_changed_vlans(self, registered_ports):"},{"line_number":846,"context_line":"        \"\"\"Return ports which have lost their vlan tag."},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"        The returned value is a set of port ids of the ports concerned by a"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2F3nY%3D","line":845,"in_reply_to":"AAAAUH%2F9Umc%3D","updated":"2014-02-10 10:31:06.000000000","message":"Hi Salvatore,\nIt is called from within scan_ports (line 824)::\n\n    updated_ports.update(self.check_changed_vlans(registered_ports))","commit_id":"57e9e4b28018a48650e1554352d3df16a39b6af4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"775686b24122d433a28a57a27c7b7591b161d978","unresolved":false,"context_lines":[{"line_number":848,"context_line":"        The returned value is a set of port ids of the ports concerned by a"},{"line_number":849,"context_line":"        vlan tag loss."},{"line_number":850,"context_line":"        \"\"\""},{"line_number":851,"context_line":"        port_tags \u003d self.int_br.get_port_tag_dict()"},{"line_number":852,"context_line":"        changed_ports \u003d set()"},{"line_number":853,"context_line":"        for lvm in self.local_vlan_map.values():"},{"line_number":854,"context_line":"            for port in registered_ports:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2Fuzo%3D","line":851,"updated":"2014-03-04 12:43:17.000000000","message":"self.int_br.get_port_tag_dict is expensive since it is executing run_vsctl(args). If you look at line 819 self.int_br.get_vif_port_set() is also executing run_vsctl but it is not storing the tag. I think it would be better to avoid calling run_vsctl twice. I suggest you modify get_vif_port_set in ovs_lib to add the tag. Then you can just compare the tags stored in cur_ports with the ones in self.local_vlan_map","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"aa9cd2b672b564f45aff0ec2aa6d0ae5323d009d","unresolved":false,"context_lines":[{"line_number":848,"context_line":"        The returned value is a set of port ids of the ports concerned by a"},{"line_number":849,"context_line":"        vlan tag loss."},{"line_number":850,"context_line":"        \"\"\""},{"line_number":851,"context_line":"        port_tags \u003d self.int_br.get_port_tag_dict()"},{"line_number":852,"context_line":"        changed_ports \u003d set()"},{"line_number":853,"context_line":"        for lvm in self.local_vlan_map.values():"},{"line_number":854,"context_line":"            for port in registered_ports:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FuO4%3D","line":851,"in_reply_to":"AAAAVn%2F%2Fuzo%3D","updated":"2014-03-04 13:47:54.000000000","message":"get_vif_port_set in ovs_lib does not optain the tag because it calls the \"Interface\" table and it doesn\u0027t return the tag ID which is only available in the \"Port\" table.\nSo an extra call is compulsory.","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2d1be8e62d8d8211d4b7e8c5d9507aa1880ad41c","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                    and lvm.vif_ports[port].port_name in port_tags"},{"line_number":853,"context_line":"                    and port_tags[lvm.vif_ports[port].port_name] !\u003d lvm.vlan"},{"line_number":854,"context_line":"                ):"},{"line_number":855,"context_line":"                    LOG.warning("},{"line_number":856,"context_line":"                        _(\"Port \u0027%(port_name)s\u0027 has lost \""},{"line_number":857,"context_line":"                            \"its vlan tag \u0027%(vlan_tag)d\u0027!\"),"},{"line_number":858,"context_line":"                        {\u0027port_name\u0027: lvm.vif_ports[port].port_name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B%2BRM%3D","line":855,"updated":"2014-03-10 23:19:19.000000000","message":"consider reducing this to INFO.\nIt\u0027s not something to be concerned about, just the agent which did not detect an unplug-plug and therefore does not realize there has been a change","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"5303a25d732888c0009f4197ef48aa74e12e34dd","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                    and lvm.vif_ports[port].port_name in port_tags"},{"line_number":853,"context_line":"                    and port_tags[lvm.vif_ports[port].port_name] !\u003d lvm.vlan"},{"line_number":854,"context_line":"                ):"},{"line_number":855,"context_line":"                    LOG.warning("},{"line_number":856,"context_line":"                        _(\"Port \u0027%(port_name)s\u0027 has lost \""},{"line_number":857,"context_line":"                            \"its vlan tag \u0027%(vlan_tag)d\u0027!\"),"},{"line_number":858,"context_line":"                        {\u0027port_name\u0027: lvm.vif_ports[port].port_name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2B62w%3D","line":855,"in_reply_to":"AAAAVn%2F%2B%2BRM%3D","updated":"2014-03-11 10:29:15.000000000","message":"Done","commit_id":"eee8315e4a21315933a06f2de17c7de883ff3b20"}],"neutron/tests/unit/openvswitch/test_ovs_lib.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"775686b24122d433a28a57a27c7b7591b161d978","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        self.assertRaises(RuntimeError, self.br.get_vif_port_set)"},{"line_number":510,"context_line":"        tools.verify_mock_calls(self.execute, expected_calls_and_values)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def test_get_port_tag_dict(self):"},{"line_number":513,"context_line":"        headings \u003d [\u0027name\u0027, \u0027tag\u0027]"},{"line_number":514,"context_line":"        data \u003d ["},{"line_number":515,"context_line":"            [\u0027int-br-eth2\u0027, set()],"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FuvI%3D","line":512,"updated":"2014-03-04 12:43:17.000000000","message":"This is a bug fix, you might want to add a unit test that proves that the bug was solved. For example having a mismatch between the current tags on the ports of the ovs bridge and the ones that should be there and check that your change handles it correctly.","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"88cb8421ce8f97bcd2d2ab6e349369b31d7cf95e","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        self.assertRaises(RuntimeError, self.br.get_vif_port_set)"},{"line_number":510,"context_line":"        tools.verify_mock_calls(self.execute, expected_calls_and_values)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"    def test_get_port_tag_dict(self):"},{"line_number":513,"context_line":"        headings \u003d [\u0027name\u0027, \u0027tag\u0027]"},{"line_number":514,"context_line":"        data \u003d ["},{"line_number":515,"context_line":"            [\u0027int-br-eth2\u0027, set()],"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FuD4%3D","line":512,"in_reply_to":"AAAAVn%2F%2FuvI%3D","updated":"2014-03-04 14:11:53.000000000","message":"This is done in test_ovs_neutron_agent.py","commit_id":"03fe39cd7c9c5f9e05355b33c7caf01dce99b51b"}]}
