)]}'
{"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"af736d59356c3ab1bd90a6c38600564212f523ac","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    def add_fdb_flow(self, br, port_info, remote_ip, lvm, ofport):"},{"line_number":367,"context_line":"        if port_info \u003d\u003d q_const.FLOODING_ENTRY:"},{"line_number":368,"context_line":"            lvm.tun_ofports.add(ofport)"},{"line_number":369,"context_line":"            # Sort lvm.tun_ofports here to ensure predictability of output"},{"line_number":370,"context_line":"            ofports \u003d \u0027,\u0027.join(sorted(lvm.tun_ofports))"},{"line_number":371,"context_line":"            br.mod_flow(table\u003dconstants.FLOOD_TO_TUN,"},{"line_number":372,"context_line":"                        dl_vlan\u003dlvm.vlan,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_b16324aa","line":369,"updated":"2014-08-07 22:07:19.000000000","message":"please mention that it\u0027s for unit tests.","commit_id":"ca58aa8a636c509d1f57253e9b4c4abb7c808a8c"}],"neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0343c8bd8023e64670473f2ef11130334da69e84","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":"import sets"},{"line_number":23,"context_line":"import testtools"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.agent.linux import async_process"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_1b03230e","line":22,"updated":"2014-09-10 11:01:08.000000000","message":"sets module use is deprecated since py26 and removed in py3.X","commit_id":"7156f2448c9212a2ea7e62c7d55756cb9a1ce704"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"3870ed52a4b737756aa3d684d0aac67a3e271db3","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":"import sets"},{"line_number":23,"context_line":"import testtools"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.agent.linux import async_process"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_430cdd42","line":22,"in_reply_to":"fa98f980_1b03230e","updated":"2014-09-10 13:25:21.000000000","message":"Patch set 8 no longer uses this","commit_id":"7156f2448c9212a2ea7e62c7d55756cb9a1ce704"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a9cf9675a12961741c81f333056493a54d782a1f","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"        def add_fdb_flow_mocked(self, br, port_info, remote_ip, lvm, ofport):"},{"line_number":1033,"context_line":"            class SortedSet(sets.Set):"},{"line_number":1034,"context_line":"                def __init__(self, iterable\u003dNone):"},{"line_number":1035,"context_line":"                    super(sets.Set, self).__init__()"},{"line_number":1036,"context_line":"                    self._data \u003d collections.OrderedDict()"},{"line_number":1037,"context_line":"                    if iterable is not None:"},{"line_number":1038,"context_line":"                        self.update(iterable)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_fb049f7f","line":1035,"updated":"2014-09-10 11:26:37.000000000","message":"super(SortedSet, self) you mean?","commit_id":"7156f2448c9212a2ea7e62c7d55756cb9a1ce704"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a9cf9675a12961741c81f333056493a54d782a1f","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"            class SortedSet(sets.Set):"},{"line_number":1034,"context_line":"                def __init__(self, iterable\u003dNone):"},{"line_number":1035,"context_line":"                    super(sets.Set, self).__init__()"},{"line_number":1036,"context_line":"                    self._data \u003d collections.OrderedDict()"},{"line_number":1037,"context_line":"                    if iterable is not None:"},{"line_number":1038,"context_line":"                        self.update(iterable)"},{"line_number":1039,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_bb4e97bf","line":1036,"updated":"2014-09-10 11:26:37.000000000","message":"- python 2.6 doesn\u0027t have collections.OrderedDict\n- we should not rely on internals like _data","commit_id":"7156f2448c9212a2ea7e62c7d55756cb9a1ce704"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"3870ed52a4b737756aa3d684d0aac67a3e271db3","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"            class SortedSet(sets.Set):"},{"line_number":1034,"context_line":"                def __init__(self, iterable\u003dNone):"},{"line_number":1035,"context_line":"                    super(sets.Set, self).__init__()"},{"line_number":1036,"context_line":"                    self._data \u003d collections.OrderedDict()"},{"line_number":1037,"context_line":"                    if iterable is not None:"},{"line_number":1038,"context_line":"                        self.update(iterable)"},{"line_number":1039,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_8306c51e","line":1036,"in_reply_to":"fa98f980_bb4e97bf","updated":"2014-09-10 13:25:21.000000000","message":"Patch set 8 no longer uses this","commit_id":"7156f2448c9212a2ea7e62c7d55756cb9a1ce704"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"e4deee58d51e365e6f5006529c247685d47dd82c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"fa98f980_c2efc785","side":"PARENT","updated":"2014-09-11 10:32:04.000000000","message":"Done?","commit_id":"86f969551c3e72adba23226dfbec9af48ba87b83"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3f08b1b8fe936196cdeaa67413aaf17beb6f8596","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                def __getitem__(self, key):"},{"line_number":1036,"context_line":"                    return sorted(set(self)).__getitem__(key)"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_179dac59","line":1035,"updated":"2014-09-10 16:24:11.000000000","message":"is this necessary?","commit_id":"332dc1fc3683cde6d7a09a28090a0d9fd3fa22ab"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"849eaaf583238461481690951c26d84d95a8cec1","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                def __getitem__(self, key):"},{"line_number":1036,"context_line":"                    return sorted(set(self)).__getitem__(key)"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_d7f1646b","line":1035,"in_reply_to":"fa98f980_179dac59","updated":"2014-09-10 16:30:28.000000000","message":"I put it in so that if the code changed and lvm.tun_ofports was accessed using the get method then the test would still get a sorted list. Given that is not explicitly useful at this point in time I am happy to remove it if you agree?","commit_id":"332dc1fc3683cde6d7a09a28090a0d9fd3fa22ab"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"640f2d8f6954199899991589c0ca2faa2f61952e","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                def __getitem__(self, key):"},{"line_number":1036,"context_line":"                    return sorted(set(self)).__getitem__(key)"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_a2f6435b","line":1035,"in_reply_to":"fa98f980_7f9078ed","updated":"2014-09-11 10:33:31.000000000","message":"Done","commit_id":"332dc1fc3683cde6d7a09a28090a0d9fd3fa22ab"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f912653f1386eb4b6c099c9683973caa7ff787cb","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                def __getitem__(self, key):"},{"line_number":1036,"context_line":"                    return sorted(set(self)).__getitem__(key)"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_7f9078ed","line":1035,"in_reply_to":"fa98f980_d7f1646b","updated":"2014-09-11 09:48:12.000000000","message":"if it\u0027s currently useless, then i would prefer you remove it","commit_id":"332dc1fc3683cde6d7a09a28090a0d9fd3fa22ab"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"3b39bbbd8d74a704abeae32a75ffa48e6dc1acac","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_90cc268b","line":1035,"updated":"2014-09-11 13:41:43.000000000","message":"It seems that you want to keep lvm.tun_ofports order the same, just be iterated over in a sorted order.\n\nJust wondering, is there any reason for the lvm.tun_ofports to remain in the same order and not just:\n\nlvm.tun_ofports \u003d set(sorted(lvm.tun_ofports)) ?\n\nRan the tests 10x with the line above, all passed.","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9ce88da71bed3ff3c15361eb5ed7f2df60ead90f","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b0a0f4f4","line":1035,"updated":"2014-09-15 14:13:59.000000000","message":"Sams explaination is accurate. I have updated the commit message to include this hashseed as well.","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"a78ac1fb4b349070c37eb09fda0112baf184d381","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b98d957e","line":1035,"in_reply_to":"fa98f980_90cc268b","updated":"2014-09-11 14:42:45.000000000","message":"In the add_fdb_flow function lvm.tun_ofport gets added too, and because of the way sets work you can never guarantee the order of those values after that point, this logic ensures a reliable order when iterating over the set.\n\nDid you run the tests with the right hashseed? \ntox -e hashtest --hashseed 1595538922 neutron.tests.unit.openvswitch.test_ovs_neutron_agent.TestOvsNeutronAgent.test_fdb_add_flows","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"a47994307bff4384994aaea50ff7213690fae590","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                def __iter__(self):"},{"line_number":1033,"context_line":"                    return sorted(set(self)).__iter__()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_1be70748","line":1035,"in_reply_to":"fa98f980_b0a0f4f4","updated":"2014-09-16 12:04:43.000000000","message":"Ran with your command Sam, seems I was wrong. :)\n\nSeems like SortedSet is necessary.","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"230558a136b0bd992fe6d565914c4290f1bc1302","unresolved":false,"context_lines":[{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        with contextlib.nested("},{"line_number":1040,"context_line":"            mock.patch.object(self.agent.tun_br, \u0027deferred\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_b0e4ca3c","line":1037,"updated":"2014-09-11 13:17:41.000000000","message":"Nit: I find this indentation to be a bit weird.","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"9ce88da71bed3ff3c15361eb5ed7f2df60ead90f","unresolved":false,"context_lines":[{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        with contextlib.nested("},{"line_number":1040,"context_line":"            mock.patch.object(self.agent.tun_br, \u0027deferred\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_d0a3b8fd","line":1037,"updated":"2014-09-15 14:13:59.000000000","message":"done","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"3b39bbbd8d74a704abeae32a75ffa48e6dc1acac","unresolved":false,"context_lines":[{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"            lvm.tun_ofports \u003d SortedSet(lvm.tun_ofports)"},{"line_number":1036,"context_line":"            return add_fdb_flow_unmocked(self, br, port_info, remote_ip, lvm,"},{"line_number":1037,"context_line":"                 ofport)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        with contextlib.nested("},{"line_number":1040,"context_line":"            mock.patch.object(self.agent.tun_br, \u0027deferred\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_f00652cd","line":1037,"in_reply_to":"fa98f980_b0e4ca3c","updated":"2014-09-11 13:41:43.000000000","message":"agreed.","commit_id":"1cdd8684eeb886d6aee373c1542bb9162d9dad03"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c5767013d76ac43231511c437d29044aefe6219","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"            mock.patch.object(self.agent.tun_br, \u0027do_action_flows\u0027),"},{"line_number":1042,"context_line":"            mock.patch.object(self.agent, \u0027_setup_tunnel_port\u0027),"},{"line_number":1043,"context_line":"            mock.patch(\u0027neutron.plugins.openvswitch.agent.ovs_neutron_agent\u0027"},{"line_number":1044,"context_line":"                \u0027.OVSNeutronAgent.add_fdb_flow\u0027, add_fdb_flow_mocked)"},{"line_number":1045,"context_line":"        ) as (deferred_fn, do_action_flows_fn, add_tun_fn, add_fdb_flow):"},{"line_number":1046,"context_line":"            deferred_fn.return_value \u003d ovs_lib.DeferredOVSBridge("},{"line_number":1047,"context_line":"                self.agent.tun_br)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_2e4f326c","line":1044,"updated":"2014-09-16 03:05:26.000000000","message":"Ouch, that was painful. Sorry. :-)\n\nI think there might be one slightly easier approach (see below) that won\u0027t require the mocking. Can you try something like it first?","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f7103c051332b14f0b9ec514ce6cd39d1db226f1","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"            mock.patch.object(self.agent.tun_br, \u0027do_action_flows\u0027),"},{"line_number":1042,"context_line":"            mock.patch.object(self.agent, \u0027_setup_tunnel_port\u0027),"},{"line_number":1043,"context_line":"            mock.patch(\u0027neutron.plugins.openvswitch.agent.ovs_neutron_agent\u0027"},{"line_number":1044,"context_line":"                \u0027.OVSNeutronAgent.add_fdb_flow\u0027, add_fdb_flow_mocked)"},{"line_number":1045,"context_line":"        ) as (deferred_fn, do_action_flows_fn, add_tun_fn, add_fdb_flow):"},{"line_number":1046,"context_line":"            deferred_fn.return_value \u003d ovs_lib.DeferredOVSBridge("},{"line_number":1047,"context_line":"                self.agent.tun_br)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_6ec85aa8","line":1044,"in_reply_to":"fa98f980_2e4f326c","updated":"2014-09-16 03:30:09.000000000","message":"The approach I posted will depend on how the mock internals work. If the actual list is on the left side of the comparison, this won\u0027t work.","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c5767013d76ac43231511c437d29044aefe6219","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"            self.assertFalse(add_tun_fn.called)"},{"line_number":1050,"context_line":"            actions \u003d (constants.ARP_RESPONDER_ACTIONS %"},{"line_number":1051,"context_line":"                       {\u0027mac\u0027: netaddr.EUI(FAKE_MAC, dialect\u003dnetaddr.mac_unix),"},{"line_number":1052,"context_line":"                        \u0027ip\u0027: netaddr.IPAddress(FAKE_IP1)})"},{"line_number":1053,"context_line":"            expected_calls \u003d ["},{"line_number":1054,"context_line":"                mock.call(\u0027add\u0027, [dict(table\u003dconstants.ARP_RESPONDER,"},{"line_number":1055,"context_line":"                                       priority\u003d1,"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_ee5fea0c","line":1052,"updated":"2014-09-16 03:05:26.000000000","message":"class OrderlessList(list):\n    def __eq__(self, other):\n        return sorted(self) \u003d\u003d sorted(other)","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3c5767013d76ac43231511c437d29044aefe6219","unresolved":false,"context_lines":[{"line_number":1051,"context_line":"                       {\u0027mac\u0027: netaddr.EUI(FAKE_MAC, dialect\u003dnetaddr.mac_unix),"},{"line_number":1052,"context_line":"                        \u0027ip\u0027: netaddr.IPAddress(FAKE_IP1)})"},{"line_number":1053,"context_line":"            expected_calls \u003d ["},{"line_number":1054,"context_line":"                mock.call(\u0027add\u0027, [dict(table\u003dconstants.ARP_RESPONDER,"},{"line_number":1055,"context_line":"                                       priority\u003d1,"},{"line_number":1056,"context_line":"                                       proto\u003d\u0027arp\u0027,"},{"line_number":1057,"context_line":"                                       dl_vlan\u003d\u0027vlan1\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_4ea0f6f3","line":1054,"updated":"2014-09-16 03:05:26.000000000","message":"mock.call(\u0027add\u0027, OrderlessList(dict(table\u003d...","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"},{"author":{"_account_id":6638,"name":"Bradley Jones","email":"jones.bradley@me.com","username":"bradjones"},"change_message_id":"67692165657d31a2add920929b2aff78e3bb63de","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"                                       \u0027set_tunnel:seg1,output:2\u0027)]),"},{"line_number":1066,"context_line":"                mock.call(\u0027mod\u0027, [dict(table\u003dconstants.FLOOD_TO_TUN,"},{"line_number":1067,"context_line":"                                       dl_vlan\u003d\u0027vlan1\u0027,"},{"line_number":1068,"context_line":"                                       actions\u003d\u0027strip_vlan,\u0027"},{"line_number":1069,"context_line":"                                       \u0027set_tunnel:seg1,output:1,2\u0027)]),"},{"line_number":1070,"context_line":"            ]"},{"line_number":1071,"context_line":"            do_action_flows_fn.assert_has_calls(expected_calls)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_7ab90dcb","line":1068,"updated":"2014-10-08 12:51:42.000000000","message":"Sorry, I have only just seen this message. I have tried out this method it works and I prefer this as it doesn\u0027t require mocking the add_fdb_flow function so will push up a patchset with this change.","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"526e48559c956b61ca730ff0d7873eee3639b0cd","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"                                       \u0027set_tunnel:seg1,output:2\u0027)]),"},{"line_number":1066,"context_line":"                mock.call(\u0027mod\u0027, [dict(table\u003dconstants.FLOOD_TO_TUN,"},{"line_number":1067,"context_line":"                                       dl_vlan\u003d\u0027vlan1\u0027,"},{"line_number":1068,"context_line":"                                       actions\u003d\u0027strip_vlan,\u0027"},{"line_number":1069,"context_line":"                                       \u0027set_tunnel:seg1,output:1,2\u0027)]),"},{"line_number":1070,"context_line":"            ]"},{"line_number":1071,"context_line":"            do_action_flows_fn.assert_has_calls(expected_calls)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_63dbfa21","line":1068,"updated":"2014-09-16 19:01:22.000000000","message":"Sorry, I see which order is the problem now. Here is one alternative, but it might be just as complex.\n\nactions\u003dActionMatcher(\u0027strip_vlan,set_tunnel:seg1,output:1,2\u0027)\n\nclass ActionMatcher(object):\n                def __init__(self, action_str):\n                    self.ordered \u003d self.orderports(action_str)\n                def orderports(self, action_str):\n                    halves \u003d action_str.split(\u0027output:\u0027)\n                    ports \u003d sorted(halves.pop().split(\u0027,\u0027))\n                    halves.append(\u0027,\u0027.join(ports))\n                    return \u0027output:\u0027.join(halves)\n                def __eq__(self, other):\n                    return self.ordered \u003d\u003d self.orderports(other)","commit_id":"b1d1df8bc87f8a327b9580e2032d8f643d245020"}]}
