)]}'
{"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"f0bb921283ec18d98f34c1b5569f75b3ffd195a9","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        self._pending_arp_set -\u003d arp_delete"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _update_arp_entry(self, ip, mac, subnet_id, operation,"},{"line_number":203,"context_line":"                          device\u003dNone, device_exists\u003dNone):"},{"line_number":204,"context_line":"        \"\"\"Add or delete arp entry into router namespace for the subnet.\"\"\""},{"line_number":205,"context_line":"        if device is None or device_exists is None:"},{"line_number":206,"context_line":"            port \u003d self._get_internal_port(subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_eeec6d91","line":203,"updated":"2015-11-08 13:39:45.000000000","message":"I don\u0027t think device_exists is actually needed, since you pass in the IPDevice as the device argument. Why not check if device is not none, then call device.exists() ?","commit_id":"eb7cd43099d5a8d94f91eee6cc09174c383e02fa"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"fd75db1c4aa703384b217c05baeaf538daf75465","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        self._pending_arp_set -\u003d arp_delete"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _update_arp_entry(self, ip, mac, subnet_id, operation,"},{"line_number":203,"context_line":"                          device\u003dNone, device_exists\u003dNone):"},{"line_number":204,"context_line":"        \"\"\"Add or delete arp entry into router namespace for the subnet.\"\"\""},{"line_number":205,"context_line":"        if device is None or device_exists is None:"},{"line_number":206,"context_line":"            port \u003d self._get_internal_port(subnet_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_8b48375d","line":203,"in_reply_to":"da85f559_eeec6d91","updated":"2015-11-16 15:20:20.000000000","message":"Well, this patch try to make _update_arp_entry do less things on arp entry updating for internal port. So, I hope it can do as less as possible.\n\nYes, you\u0027re right on pass in IPDevice, it can save same time and process on object creating. Bnd to device.exists(), currently, ip_lib doesn\u0027t have use a method/attribute for IPDevice to hold its existence(it always runs a ip command to check that, and as I can see, it\u0027s also no necessary to create an attribute to save its existence status. For most places using IPDevice as a temporary variable, an IPDevice object will not exist too long in code processing. So that should be the reason why in methods such as _process_arp_cache_for_internal_port and _set_subnet_arp_info, the same IPDevice object will be repeatedly created).\n\nSo I think after we get a IPDevice object, for _update_arp_entry will be called in a for loop case, we don\u0027t need check its existence repeatedly.\n\nNot sure whether this make sense to you. BTW, thanks for review. :)","commit_id":"eb7cd43099d5a8d94f91eee6cc09174c383e02fa"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"f0bb921283ec18d98f34c1b5569f75b3ffd195a9","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":241,"context_line":"        device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":242,"context_line":"        device_exists \u003d device.exists()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        for p in subnet_ports:"},{"line_number":245,"context_line":"            if p[\u0027device_owner\u0027] not in l3_constants.ROUTER_INTERFACE_OWNERS:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_4ee579a6","line":242,"updated":"2015-11-08 13:39:45.000000000","message":"This value is only used once, and is basically just passed to another function call. Along with the actual IPDevice. Why?","commit_id":"eb7cd43099d5a8d94f91eee6cc09174c383e02fa"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"fd75db1c4aa703384b217c05baeaf538daf75465","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":241,"context_line":"        device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":242,"context_line":"        device_exists \u003d device.exists()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        for p in subnet_ports:"},{"line_number":245,"context_line":"            if p[\u0027device_owner\u0027] not in l3_constants.ROUTER_INTERFACE_OWNERS:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_ab209b4a","line":242,"in_reply_to":"da85f559_4ee579a6","updated":"2015-11-16 15:20:20.000000000","message":"To pass device_exists to _update_arp_entry, I hope my comments on L203 can make some sense. I also pass it to _process_arp_cache_for_internal_port, since currently this method is the only caller to _process_arp_cache_for_internal_port. As I considered, after we get it once, we may no need to get it again.","commit_id":"eb7cd43099d5a8d94f91eee6cc09174c383e02fa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a25b6ac8af7032eaf2c2a456ce77dac972c71dfb","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            # update arp entry only if the subnet is attached to the router"},{"line_number":211,"context_line":"            if not port:"},{"line_number":212,"context_line":"                return False"},{"line_number":213,"context_line":"            interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":214,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":215,"context_line":"            device_exists \u003d device.exists()"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba8a016a_2a72f07b","line":213,"updated":"2015-11-18 12:59:05.000000000","message":"213-215 is repeated a # of times (for example 247-249\nPlease make a helper method for this","commit_id":"8a3d8d34ae2ac022c4e931d5084c29713b80b844"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"e2d91d9fc3af46f7eb85dd396d9304a954945ae1","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            # update arp entry only if the subnet is attached to the router"},{"line_number":211,"context_line":"            if not port:"},{"line_number":212,"context_line":"                return False"},{"line_number":213,"context_line":"            interface_name \u003d self.get_internal_device_name(port[\u0027id\u0027])"},{"line_number":214,"context_line":"            device \u003d ip_lib.IPDevice(interface_name, namespace\u003dself.ns_name)"},{"line_number":215,"context_line":"            device_exists \u003d device.exists()"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba8a016a_cf9d64bd","line":213,"in_reply_to":"ba8a016a_2a72f07b","updated":"2015-11-18 17:19:55.000000000","message":"Done","commit_id":"8a3d8d34ae2ac022c4e931d5084c29713b80b844"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"0c93ba4e4d73b2fa0e05664efe90dc4d6512f21c","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":233,"context_line":"                LOG.exception(_LE(\"DVR: Failed updating arp entry\"))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _set_subnet_arp_info(self, subnet_id, port):"},{"line_number":236,"context_line":"        \"\"\"Set ARP info retrieved from Plugin for existing ports.\"\"\""},{"line_number":237,"context_line":"        # TODO(Carl) Can we eliminate the need to make this RPC while"},{"line_number":238,"context_line":"        # processing a router."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_7d7a11f3","line":235,"updated":"2016-01-22 05:17:25.000000000","message":"just pass in the port_id. we don\u0027t need the full body so there is no reason to pass it in.","commit_id":"91a07bce0a5ce687bb8d014f1145dadf14d77c23"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"c8d7cae915226290dfe320505d3206cb8009f924","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":233,"context_line":"                LOG.exception(_LE(\"DVR: Failed updating arp entry\"))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _set_subnet_arp_info(self, subnet_id, port):"},{"line_number":236,"context_line":"        \"\"\"Set ARP info retrieved from Plugin for existing ports.\"\"\""},{"line_number":237,"context_line":"        # TODO(Carl) Can we eliminate the need to make this RPC while"},{"line_number":238,"context_line":"        # processing a router."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_068934c9","line":235,"in_reply_to":"9a68dd71_7d7a11f3","updated":"2016-01-22 13:20:50.000000000","message":"Done","commit_id":"91a07bce0a5ce687bb8d014f1145dadf14d77c23"}]}
