)]}'
{"quantum/plugins/openvswitch/agent/ovs_quantum_agent.py":[{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"6e284f789093a9bb42e3e4787c086d9caf94fab3","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                     net_uuid)"},{"line_number":370,"context_line":"            return"},{"line_number":371,"context_line":"        lvm \u003d self.local_vlan_map[net_uuid]"},{"line_number":372,"context_line":"        if lvm.network_type \u003d\u003d \u0027gre\u0027:"},{"line_number":373,"context_line":"            self.tun_br.delete_flows(tun_id\u003dlvm.segmentation_id,"},{"line_number":374,"context_line":"                                     dl_dst\u003dlvm.vif_ports[vif_id].vif_mac)"},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FfxI%3D","line":372,"updated":"2012-09-06 04:16:38.000000000","message":"A \"inbound unicast\" comment here would be helpful in matching this up with the flow being created.","commit_id":"aee5bbd121bc9c703d3466785fa14d5161a5ffbc"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"0752fb86bb9dc274be36bcad63b52fd7dadd532e","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                     net_uuid)"},{"line_number":370,"context_line":"            return"},{"line_number":371,"context_line":"        lvm \u003d self.local_vlan_map[net_uuid]"},{"line_number":372,"context_line":"        if lvm.network_type \u003d\u003d \u0027gre\u0027:"},{"line_number":373,"context_line":"            self.tun_br.delete_flows(tun_id\u003dlvm.segmentation_id,"},{"line_number":374,"context_line":"                                     dl_dst\u003dlvm.vif_ports[vif_id].vif_mac)"},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2Ffws%3D","line":372,"in_reply_to":"AAAALH%2F%2FfxI%3D","updated":"2012-09-06 04:24:10.000000000","message":"Done","commit_id":"aee5bbd121bc9c703d3466785fa14d5161a5ffbc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"class LocalVLANMapping:"},{"line_number":54,"context_line":"    def __init__(self, vlan, network_type, physical_network, segmentation_id,"},{"line_number":55,"context_line":"                 vif_ports\u003dNone):"},{"line_number":56,"context_line":"        if vif_ports is None:"},{"line_number":57,"context_line":"            vif_ports \u003d {}"},{"line_number":58,"context_line":"        self.vlan \u003d vlan"},{"line_number":59,"context_line":"        self.network_type \u003d network_type"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Ffn8%3D","line":56,"updated":"2012-09-06 08:05:55.000000000","message":"Maybe using a dictionary on the base class that has the deviec_id as the key and the data is the network_id. This can save the loop to search for it. When a new device is added this can be updated. When it goes away this can be deleted.","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":185,"context_line":"                                                     self.topic,"},{"line_number":186,"context_line":"                                                     consumers)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_net_uuid(self, vif_id):"},{"line_number":189,"context_line":"        for network_id in self.local_vlan_map.keys():"},{"line_number":190,"context_line":"            port \u003d self.local_vlan_map[network_id].vif_ports.get(vif_id)"},{"line_number":191,"context_line":"            if port:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Ffn0%3D","line":188,"updated":"2012-09-06 08:05:55.000000000","message":"Please see above this could be:\nreturn self.device_id_mapping.get(device_id)\n(If this just stored the network id.","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                                     consumers)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_net_uuid(self, vif_id):"},{"line_number":189,"context_line":"        for network_id in self.local_vlan_map.keys():"},{"line_number":190,"context_line":"            port \u003d self.local_vlan_map[network_id].vif_ports.get(vif_id)"},{"line_number":191,"context_line":"            if port:"},{"line_number":192,"context_line":"                return network_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FfTE%3D","line":189,"updated":"2012-09-06 18:57:39.000000000","message":"Would the following work:\nfor network_id, vlan_mapping in self.local_vlan_map.iteritems():\n    if vlan_mapping.vif_ports.get(vif_id):\n        return network_id\n\nAlso, if you want just to iterate over the keys you can omit .keys() on a dict","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":190,"context_line":"            port \u003d self.local_vlan_map[network_id].vif_ports.get(vif_id)"},{"line_number":191,"context_line":"            if port:"},{"line_number":192,"context_line":"                return network_id"},{"line_number":193,"context_line":"        return None"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def network_delete(self, context, **kwargs):"},{"line_number":196,"context_line":"        LOG.debug(\"network_delete received\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FfTA%3D","line":193,"updated":"2012-09-06 18:57:39.000000000","message":"The above is pleonastic","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":557,"context_line":"                        LOG.info(\"Removing binding to net-id \u003d \" +"},{"line_number":558,"context_line":"                                 old_net_uuid + \" for \" + str(p)"},{"line_number":559,"context_line":"                                 + \" added to dead vlan\")"},{"line_number":560,"context_line":"                        bind \u003d net_bindings.get(old_port.network_id)"},{"line_number":561,"context_line":"                        self.port_unbound(p.vif_id, old_net_uuid)"},{"line_number":562,"context_line":"                        if p.vif_id in all_bindings:"},{"line_number":563,"context_line":"                            all_bindings[p.vif_id].status \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FfSw%3D","line":560,"updated":"2012-09-06 18:57:39.000000000","message":"It seems the value set for bind in the above statement is not used anywhere else.","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":669,"context_line":"                # Nothing to do regarding local networking"},{"line_number":670,"context_line":"            else:"},{"line_number":671,"context_line":"                LOG.debug(\"Device %s not defined on plugin\", device)"},{"line_number":672,"context_line":"                self.port_unbound(device)"},{"line_number":673,"context_line":"        return resync"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    def process_network_ports(self, port_info):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2Ffns%3D","line":672,"updated":"2012-09-06 08:05:55.000000000","message":"the device id could provide the network id","commit_id":"f51003046fe96eafc956e15511f3a183b1e20dd0"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_net_uuid(self, vif_id):"},{"line_number":189,"context_line":"        for network_id, vlan_mapping in self.local_vlan_map.iteritems():"},{"line_number":190,"context_line":"            if vlan_mapping.vif_ports.get(vif_id):"},{"line_number":191,"context_line":"                return network_id"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def network_delete(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2Fd7c%3D","line":190,"updated":"2012-09-08 06:23:10.000000000","message":"(nit) probably more clear (and pythonic) to use:\n\nif vif_id in vlan_mapping.vif_ports:","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"0752fb86bb9dc274be36bcad63b52fd7dadd532e","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def get_net_uuid(self, vif_id):"},{"line_number":189,"context_line":"        for network_id, vlan_mapping in self.local_vlan_map.iteritems():"},{"line_number":190,"context_line":"            if vlan_mapping.vif_ports.get(vif_id):"},{"line_number":191,"context_line":"                return network_id"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def network_delete(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FdT4%3D","line":190,"in_reply_to":"AAAALH%2F%2Fd7c%3D","updated":"2012-09-09 20:49:20.000000000","message":"Done","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":375,"context_line":"        if vif_id in lvm.vif_ports:"},{"line_number":376,"context_line":"            del lvm.vif_ports[vif_id]"},{"line_number":377,"context_line":"        else:"},{"line_number":378,"context_line":"            LOG.info(\u0027port_unbound: vid_id %s not in list\u0027 % port.vif_id)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if not lvm.vif_ports:"},{"line_number":381,"context_line":"            self.reclaim_local_vlan(net_uuid, lvm)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2Fd7g%3D","line":378,"updated":"2012-09-08 06:23:10.000000000","message":"vif_id?   Also, for maybe mention which list you\u0027re talking about?  like \u0027not in local_vlan_map\u0027?","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"0752fb86bb9dc274be36bcad63b52fd7dadd532e","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        if vif_id in lvm.vif_ports:"},{"line_number":376,"context_line":"            del lvm.vif_ports[vif_id]"},{"line_number":377,"context_line":"        else:"},{"line_number":378,"context_line":"            LOG.info(\u0027port_unbound: vid_id %s not in list\u0027 % port.vif_id)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if not lvm.vif_ports:"},{"line_number":381,"context_line":"            self.reclaim_local_vlan(net_uuid, lvm)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FdTE%3D","line":378,"in_reply_to":"AAAALH%2F%2Fd7g%3D","updated":"2012-09-09 20:49:20.000000000","message":"Done","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":667,"context_line":"                # Nothing to do regarding local networking"},{"line_number":668,"context_line":"            else:"},{"line_number":669,"context_line":"                LOG.debug(\"Device %s not defined on plugin\", device)"},{"line_number":670,"context_line":"                self.port_unbound(device)"},{"line_number":671,"context_line":"        return resync"},{"line_number":672,"context_line":""},{"line_number":673,"context_line":"    def process_network_ports(self, port_info):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2Fd7k%3D","line":670,"updated":"2012-09-08 06:23:10.000000000","message":"i\u0027m a bit confused here, as previously port_unbound was called with a port-id, but here its being called with what seems to be a device name.  Is this just confusing variable naming?","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"0752fb86bb9dc274be36bcad63b52fd7dadd532e","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                # Nothing to do regarding local networking"},{"line_number":668,"context_line":"            else:"},{"line_number":669,"context_line":"                LOG.debug(\"Device %s not defined on plugin\", device)"},{"line_number":670,"context_line":"                self.port_unbound(device)"},{"line_number":671,"context_line":"        return resync"},{"line_number":672,"context_line":""},{"line_number":673,"context_line":"    def process_network_ports(self, port_info):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FdSw%3D","line":670,"in_reply_to":"AAAALH%2F%2Fd7k%3D","updated":"2012-09-09 20:49:20.000000000","message":"device is the port-id. I agree the variable name here is misleading.","commit_id":"7486dc44fc347fb0e994a1f8cbf7aecddb447c1e"}]}
