)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"493fa3e5aed1d63c987818c358cfce48d85ee628","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":21,"context_line":"same issue."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"},{"line_number":26,"context_line":"Closes-Bug: 1335023"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_9071ce78","line":23,"updated":"2015-11-02 15:08:03.000000000","message":"You also need to add UpgradeImpact\n\nSomeone who upgrades to M will get a different default behavior.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":21,"context_line":"same issue."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"},{"line_number":26,"context_line":"Closes-Bug: 1335023"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a26ad4f_e56b8fb7","line":23,"in_reply_to":"1a26ad4f_9071ce78","updated":"2015-11-03 04:34:07.000000000","message":"Done","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3a92c533a0ec60a820aa6f4d6fe3fb914d79c474","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":21,"context_line":"same issue."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":"UpgradeImpact"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a740942_e8d0d6cb","line":23,"updated":"2015-12-04 01:13:43.000000000","message":"Please follow guidelines as detailed here:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-November/080294.html","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"401fc634c9835186b53f1dd5fddb98b4737445d2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":21,"context_line":"same issue."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":"UpgradeImpact"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7a740942_e71d4b67","line":23,"in_reply_to":"7a740942_e8d0d6cb","updated":"2015-12-04 12:43:50.000000000","message":"Done","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"dba08b81fbd3b3cd81ec30999f86854b8a4cde92","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently \u0027force_gateway_on_subnet\u0027 configuration is set to True"},{"line_number":10,"context_line":"by default and enforces the subnet on to the gateway. With this"},{"line_number":11,"context_line":"fix \u0027force_gateway_on_subnet\u0027 is reverted to False by default,"},{"line_number":12,"context_line":"and gateway outside the subnet can be added."},{"line_number":13,"context_line":"Before adding the default route, a route to the gateway IP is"},{"line_number":14,"context_line":"added. This applies to both external and internal networks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5a5ae5dd_56e434ab","line":11,"updated":"2016-02-09 05:29:54.000000000","message":"this patch doesn\u0027t have the \"change default\" part anymore.","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"aa03cc5ac14f3df7b25fcb88eadffed35c654c0d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently \u0027force_gateway_on_subnet\u0027 configuration is set to True"},{"line_number":10,"context_line":"by default and enforces the subnet on to the gateway. With this"},{"line_number":11,"context_line":"fix \u0027force_gateway_on_subnet\u0027 is reverted to False by default,"},{"line_number":12,"context_line":"and gateway outside the subnet can be added."},{"line_number":13,"context_line":"Before adding the default route, a route to the gateway IP is"},{"line_number":14,"context_line":"added. This applies to both external and internal networks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5a5ae5dd_6dee37b6","line":11,"in_reply_to":"5a5ae5dd_56e434ab","updated":"2016-02-09 07:38:52.000000000","message":"Done","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sreekumar S \u003csreesiv@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-09 15:30:54 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Unable to add gateway outside the subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently \u0027force_gateway_on_subnet\u0027 configuration is set to True"},{"line_number":10,"context_line":"by default and enforces the subnet on to the gateway. With this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_a72bb993","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":40},"updated":"2016-02-10 22:11:07.000000000","message":"Describe what the patch changes on this line, not what was wrong.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sreekumar S \u003csreesiv@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-09 15:30:54 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Unable to add gateway outside the subnet"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently \u0027force_gateway_on_subnet\u0027 configuration is set to True"},{"line_number":10,"context_line":"by default and enforces the subnet on to the gateway. With this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_1743bf43","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":40},"in_reply_to":"3a57f1b5_a72bb993","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Before adding the default route, a route to the gateway IP is"},{"line_number":14,"context_line":"added. This applies to both external and internal networks."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This configuration option (now defaulted to false) is deprecated,"},{"line_number":17,"context_line":"and should be removed in a future release. It should always allow"},{"line_number":18,"context_line":"gateway outside the subnet. This is done as a separate patch"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/277303/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_c70d953f","line":16,"range":{"start_line":16,"start_character":27,"end_line":16,"end_character":49},"updated":"2016-02-10 22:11:07.000000000","message":"No.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Before adding the default route, a route to the gateway IP is"},{"line_number":14,"context_line":"added. This applies to both external and internal networks."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This configuration option (now defaulted to false) is deprecated,"},{"line_number":17,"context_line":"and should be removed in a future release. It should always allow"},{"line_number":18,"context_line":"gateway outside the subnet. This is done as a separate patch"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/277303/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_b778ab90","line":16,"range":{"start_line":16,"start_character":27,"end_line":16,"end_character":49},"in_reply_to":"3a57f1b5_c70d953f","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e61d9968fe286981f81e4af8c103ca1cf1797311","unresolved":false,"context_lines":[{"line_number":18,"context_line":"gateway outside the subnet. This is done as a separate patch"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/277303/"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":22,"context_line":"same issue."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"},{"line_number":25,"context_line":"Closes-Bug: #1335023"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_589f42b4","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":11},"updated":"2016-02-10 22:14:02.000000000","message":"This concerns me.  I\u0027m not sure it is wise to deprecate the option before we have an answer for this.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"gateway outside the subnet. This is done as a separate patch"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/277303/"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":22,"context_line":"same issue."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"},{"line_number":25,"context_line":"Closes-Bug: #1335023"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_775c73ed","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":11},"in_reply_to":"3a57f1b5_589f42b4","updated":"2016-02-11 10:26:41.000000000","message":"Since the deprecation change is now in a separate patch, we can hold it. In the meantime, I\u0027ll check whether the same works in DVR setup, and will make the changes as a separate patch _if needed.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"1809e302c8efddb9af7588a5d8892fb3bdfb0afc","unresolved":false,"context_lines":[{"line_number":18,"context_line":"gateway outside the subnet. This is done as a separate patch"},{"line_number":19,"context_line":"https://review.openstack.org/#/c/277303/"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DVR and Linux Bridge plugins may need additional work for the"},{"line_number":22,"context_line":"same issue."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b"},{"line_number":25,"context_line":"Closes-Bug: #1335023"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a57f1b5_c2c47560","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":11},"in_reply_to":"3a57f1b5_775c73ed","updated":"2016-02-11 15:24:47.000000000","message":"I\u0027ve checked with a 2-node DVR devstack setup.\nThe DVR FIP ns is not updated with on-link route for the gateway outside subnet. SNAT ns is updated correctly.\n\nSince I am new to the DVR architecture, setup and code, I am planning to do the DVR fix as a separate patch. Hope that\u0027s OK!","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"}],"etc/neutron.conf":[{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"5f9774adea20491ed62d7f8cbb3a93c62a5a6bea","unresolved":false,"context_lines":[{"line_number":133,"context_line":"# Ensure that configured gateway is on subnet. For IPv6, validate only if"},{"line_number":134,"context_line":"# gateway is not a link local address. Deprecated, to be removed during the"},{"line_number":135,"context_line":"# M release, at which point the gateway will not be forced on to subnet."},{"line_number":136,"context_line":"# force_gateway_on_subnet \u003d False"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"# Default maximum number of items returned in a single response,"},{"line_number":139,"context_line":"# value \u003d\u003d infinite and value \u003c 0 means no max limit, and value must"}],"source_content_type":"text/plain","patch_set":6,"id":"1a26ad4f_31322560","line":136,"updated":"2015-11-03 08:04:09.000000000","message":"as above description, this option will be removed in M release, now M has began, so I think you can remove it directly","commit_id":"a089717c35efece26153f3b196d5f865f8eb5e86"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"05d7a1f4f5a7e3ece1874f678f53e5a469899bb5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"# Ensure that configured gateway is on subnet. For IPv6, validate only if"},{"line_number":134,"context_line":"# gateway is not a link local address. Deprecated, to be removed during the"},{"line_number":135,"context_line":"# M release, at which point the gateway will not be forced on to subnet."},{"line_number":136,"context_line":"# force_gateway_on_subnet \u003d False"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"# Default maximum number of items returned in a single response,"},{"line_number":139,"context_line":"# value \u003d\u003d infinite and value \u003c 0 means no max limit, and value must"}],"source_content_type":"text/plain","patch_set":6,"id":"1a26ad4f_4b0e0de6","line":136,"in_reply_to":"1a26ad4f_31322560","updated":"2015-11-03 09:31:54.000000000","message":"Done. Idea was to keep the option for one more release. So have changed M to N.","commit_id":"a089717c35efece26153f3b196d5f865f8eb5e86"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                gateway_ips.append(self.agent_conf.ipv6_gateway)"},{"line_number":480,"context_line":"        return gateway_ips"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def _add_route_to_gw(self, ex_gw_port, device_name,"},{"line_number":483,"context_line":"                         namespace, preserve_ips):"},{"line_number":484,"context_line":"        # Here we don\u0027t consider the \u0027ipv6_gateway\u0027 added to the gateway IPs"},{"line_number":485,"context_line":"        # passed to init_l3() because it\u0027ll be the LLA of the interface on"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_2f196e88","line":482,"updated":"2015-12-03 08:00:26.000000000","message":"This is a nit comment, this method is actually _add_route_to_gw_if_gw_not_in_subnet.\n\nIt is better to split it to 2 methods, 1) _check_gw_in_subnet 2) _add_route_to_gw","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":479,"context_line":"                gateway_ips.append(self.agent_conf.ipv6_gateway)"},{"line_number":480,"context_line":"        return gateway_ips"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def _add_route_to_gw(self, ex_gw_port, device_name,"},{"line_number":483,"context_line":"                         namespace, preserve_ips):"},{"line_number":484,"context_line":"        # Here we don\u0027t consider the \u0027ipv6_gateway\u0027 added to the gateway IPs"},{"line_number":485,"context_line":"        # passed to init_l3() because it\u0027ll be the LLA of the interface on"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_86107c01","line":482,"in_reply_to":"9a8ffd7b_2f196e88","updated":"2015-12-03 11:05:23.000000000","message":"I disagree with you. This was reviewed by many earlier before reaching this state with the comments.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":496,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":497,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":498,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _external_gateway_added(self, ex_gw_port, interface_name,"},{"line_number":501,"context_line":"                                ns_name, preserve_ips):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_aa4c6c42","line":498,"updated":"2015-12-03 08:00:26.000000000","message":"Is this route needed? per my understanding, all unknown traffic will go to default route, so, if the gateway_ip is not in subnet, the traffic to it will go to default route(which also point to gateway_ip)","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d29b105cb0688bab6f4444bb6ef5322068254919","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":496,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":497,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":498,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _external_gateway_added(self, ex_gw_port, interface_name,"},{"line_number":501,"context_line":"                                ns_name, preserve_ips):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_0c93415c","line":498,"in_reply_to":"9a8ffd7b_1945c641","updated":"2015-12-03 14:20:43.000000000","message":"You will not be able to add the default route IP in the first place. That\u0027s why the bug was raised.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":496,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":497,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":498,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _external_gateway_added(self, ex_gw_port, interface_name,"},{"line_number":501,"context_line":"                                ns_name, preserve_ips):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_c63c4495","line":498,"in_reply_to":"9a8ffd7b_aa4c6c42","updated":"2015-12-03 11:05:23.000000000","message":"I think your understanding is wrong. Please read through the full history of the issue. This was discussed thoroughly.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"11ee3117ba264b79669f6385dace0c667d2c9c52","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":496,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":497,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":498,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _external_gateway_added(self, ex_gw_port, interface_name,"},{"line_number":501,"context_line":"                                ns_name, preserve_ips):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_1945c641","line":498,"in_reply_to":"9a8ffd7b_c63c4495","updated":"2015-12-03 12:33:48.000000000","message":"yeah, the route here is for adding the default route, but for network traffic, it can go through without this route.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":484,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":485,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":486,"context_line":"            device \u003d ip_lib.IPDevice(device_name, namespace\u003dnamespace)"},{"line_number":487,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":488,"context_line":"                if (subnet[\u0027gateway_ip\u0027] and"},{"line_number":489,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_422753b6","line":486,"range":{"start_line":486,"start_character":12,"end_line":486,"end_character":18},"updated":"2016-02-10 22:11:07.000000000","message":"nit: Honestly, I\u0027d just defer this to before L492.  It isn\u0027t a very expensive operation compared to the \u0027add_route\u0027 call and the code would read better with it deferred.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":484,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":485,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":486,"context_line":"            device \u003d ip_lib.IPDevice(device_name, namespace\u003dnamespace)"},{"line_number":487,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":488,"context_line":"                if (subnet[\u0027gateway_ip\u0027] and"},{"line_number":489,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_37f6fbd7","line":486,"range":{"start_line":486,"start_character":12,"end_line":486,"end_character":18},"in_reply_to":"3a57f1b5_422753b6","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":486,"context_line":"            device \u003d ip_lib.IPDevice(device_name, namespace\u003dnamespace)"},{"line_number":487,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":488,"context_line":"                if (subnet[\u0027gateway_ip\u0027] and"},{"line_number":489,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":490,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":491,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":492,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_02215b9f","line":490,"range":{"start_line":489,"start_character":20,"end_line":490,"end_character":73},"updated":"2016-02-10 22:11:07.000000000","message":"nit:  Could you break this out with a new local variable:\n\n  is_gateway_in_subnet \u003d (\n      subnet.get(\u0027gateway_ip\u0027) and\n      not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],\n                                     subnet[\u0027gateway_ip\u0027])\n  if is_gateway_in_subnet:\n      ...\n\nIMO, separating line breaks and complex conditions from the control logic helps readability.  Also, the name of the variable you use can do a lot to self-document the code.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":486,"context_line":"            device \u003d ip_lib.IPDevice(device_name, namespace\u003dnamespace)"},{"line_number":487,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":488,"context_line":"                if (subnet[\u0027gateway_ip\u0027] and"},{"line_number":489,"context_line":"                    not ipam_utils.check_subnet_ip(subnet[\u0027cidr\u0027],"},{"line_number":490,"context_line":"                                                   subnet[\u0027gateway_ip\u0027])):"},{"line_number":491,"context_line":"                    preserve_ips.append(subnet[\u0027gateway_ip\u0027])"},{"line_number":492,"context_line":"                    device.route.add_route(subnet[\u0027gateway_ip\u0027], scope\u003d\u0027link\u0027)"},{"line_number":493,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_772a332e","line":490,"range":{"start_line":489,"start_character":20,"end_line":490,"end_character":73},"in_reply_to":"3a57f1b5_02215b9f","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4824271831ec010b4409df670b4fdb3213c7148b","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":485,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":486,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":487,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":488,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":489,"context_line":"                                                    subnet[\u0027cidr\u0027],"},{"line_number":490,"context_line":"                                                    subnet[\u0027gateway_ip\u0027]))"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_5a8aa51c","line":487,"updated":"2016-02-11 17:10:47.000000000","message":"This logic is used three times. Consider putting in a method, with a descriptive name, and calling from each place.","commit_id":"e7bd35a405937840cc4004cd5f28f67a03ccafd4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"78b41cb9a311fefdd7dd54d435df1338a1e3149d","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":485,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":486,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":487,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":488,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":489,"context_line":"                                                    subnet[\u0027cidr\u0027],"},{"line_number":490,"context_line":"                                                    subnet[\u0027gateway_ip\u0027]))"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_30688df5","line":487,"in_reply_to":"3a57f1b5_5a8aa51c","updated":"2016-02-15 16:06:17.000000000","message":"This is already done by the function check_subnet_ip. The variable was used to be more descriptive as suggested by Carl Baldwin in an earlier review.","commit_id":"e7bd35a405937840cc4004cd5f28f67a03ccafd4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def _add_route_to_gw(self, ex_gw_port, device_name,"},{"line_number":576,"context_line":"                         namespace, preserve_ips):"},{"line_number":577,"context_line":"        # Here we don\u0027t consider the \u0027ipv6_gateway\u0027 added to the gateway IPs"},{"line_number":578,"context_line":"        # passed to init_l3() because it\u0027ll be the LLA of the interface on"},{"line_number":579,"context_line":"        # the upstream router. In case of LLA the gw does not need to have"},{"line_number":580,"context_line":"        # an associated subnet or a route, and if it\u0027s not configured, gw"},{"line_number":581,"context_line":"        # will be assigned by RA. If GUA is desired for IPv6, it goes via"},{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_20243bc3","line":583,"range":{"start_line":577,"start_character":8,"end_line":583,"end_character":52},"updated":"2016-02-17 17:52:05.000000000","message":"This comment seems irrelevant to the code in this method.  The code in this method does not have any special logic for IP versions, LLAs, or anything.  It is pretty generic.  Is there a better place for this comment?  Do we even need this comment?  I personally find it distracting.\n\nIf you feel the comment is important, you could shorten it.  I think the following conveys the message:\n\n # Note: ipv6_gateway is an ipv6 LLA and so doesn\u0027t need a special route","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def _add_route_to_gw(self, ex_gw_port, device_name,"},{"line_number":576,"context_line":"                         namespace, preserve_ips):"},{"line_number":577,"context_line":"        # Here we don\u0027t consider the \u0027ipv6_gateway\u0027 added to the gateway IPs"},{"line_number":578,"context_line":"        # passed to init_l3() because it\u0027ll be the LLA of the interface on"},{"line_number":579,"context_line":"        # the upstream router. In case of LLA the gw does not need to have"},{"line_number":580,"context_line":"        # an associated subnet or a route, and if it\u0027s not configured, gw"},{"line_number":581,"context_line":"        # will be assigned by RA. If GUA is desired for IPv6, it goes via"},{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_fa765f04","line":583,"range":{"start_line":577,"start_character":8,"end_line":583,"end_character":52},"in_reply_to":"dae33548_20243bc3","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        # will be assigned by RA. If GUA is desired for IPv6, it goes via"},{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":587,"context_line":"                                            not ipam_utils.check_subnet_ip("}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_a01e8b6d","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":35},"updated":"2016-02-17 17:52:05.000000000","message":"nit:  Prefer less indentation:\n\n  if \u0027subnets\u0027 not in ex_gw_port:\n      return\n\n  for subnet in ...","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        # will be assigned by RA. If GUA is desired for IPv6, it goes via"},{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":587,"context_line":"                                            not ipam_utils.check_subnet_ip("}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_fa4dbfc4","line":584,"range":{"start_line":584,"start_character":8,"end_line":584,"end_character":35},"in_reply_to":"dae33548_a01e8b6d","updated":"2016-02-18 09:20:55.000000000","message":"Done as suggested below.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":587,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":588,"context_line":"                                                    subnet[\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_200b9b2b","line":585,"range":{"start_line":585,"start_character":26,"end_line":585,"end_character":48},"updated":"2016-02-17 17:52:05.000000000","message":"nit:  You could do this, just an idea.  It obviates the need to check on L485.\n\n  for subnet in ex_gw_port.get(\u0027subnets\u0027 ,[]):\n      ...","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"643e1e7b83ce40a6dcfa3a7fa20eed2055ff03f8","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":587,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":588,"context_line":"                                                    subnet[\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_cdbc5fde","line":585,"range":{"start_line":585,"start_character":26,"end_line":585,"end_character":48},"in_reply_to":"dae33548_1acd0331","updated":"2016-02-19 17:26:20.000000000","message":"I hope my transposition of the line number didn\u0027t throw you off.  Of course, I meant L584.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        # subnet allocation and not through \u0027ipv6_gateway\u0027, and in that case"},{"line_number":583,"context_line":"        # it\u0027ll be considered for _add_route_to_gw()"},{"line_number":584,"context_line":"        if \u0027subnets\u0027 in ex_gw_port:"},{"line_number":585,"context_line":"            for subnet in ex_gw_port[\u0027subnets\u0027]:"},{"line_number":586,"context_line":"                is_gateway_not_in_subnet \u003d (subnet[\u0027gateway_ip\u0027] and"},{"line_number":587,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":588,"context_line":"                                                    subnet[\u0027cidr\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_1acd0331","line":585,"range":{"start_line":585,"start_character":26,"end_line":585,"end_character":48},"in_reply_to":"dae33548_200b9b2b","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"                if (gateway and"},{"line_number":1022,"context_line":"                    not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1023,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1024,"context_line":"                                    constants.IP_VERSION_4)"},{"line_number":1025,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("},{"line_number":1026,"context_line":"                                    constants.IP_VERSION_6)"},{"line_number":1027,"context_line":"                    existing_onlink_routes \u003d set("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_4e02e070","line":1024,"updated":"2015-10-30 18:01:35.000000000","message":"indentation","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"                if (gateway and"},{"line_number":1022,"context_line":"                    not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1023,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1024,"context_line":"                                    constants.IP_VERSION_4)"},{"line_number":1025,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("},{"line_number":1026,"context_line":"                                    constants.IP_VERSION_6)"},{"line_number":1027,"context_line":"                    existing_onlink_routes \u003d set("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_50b49633","line":1024,"in_reply_to":"1a26ad4f_4e02e070","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1024,"context_line":"                                    constants.IP_VERSION_4)"},{"line_number":1025,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("},{"line_number":1026,"context_line":"                                    constants.IP_VERSION_6)"},{"line_number":1027,"context_line":"                    existing_onlink_routes \u003d set("},{"line_number":1028,"context_line":"                        r[\u0027cidr\u0027] for r in v4_onlink + v6_onlink)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_0ef5c881","line":1026,"updated":"2015-10-30 18:01:35.000000000","message":"indentation","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1024,"context_line":"                                    constants.IP_VERSION_4)"},{"line_number":1025,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("},{"line_number":1026,"context_line":"                                    constants.IP_VERSION_6)"},{"line_number":1027,"context_line":"                    existing_onlink_routes \u003d set("},{"line_number":1028,"context_line":"                        r[\u0027cidr\u0027] for r in v4_onlink + v6_onlink)"},{"line_number":1029,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_b0f08afe","line":1026,"in_reply_to":"1a26ad4f_0ef5c881","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":2860,"name":"litong01","email":"email4tong@yahoo.com","username":"litong01"},"change_message_id":"e3ccdd297e6286ec034b6abbfc0455dcffe331aa","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1032,"context_line":"                if not ipam_utils.check_subnet_ip(subnet.cidr,"},{"line_number":1033,"context_line":"                                                  subnet.gateway_ip):"},{"line_number":1034,"context_line":"                    device.route.add_route(subnet.gateway_ip, scope\u003d\u0027link\u0027)"},{"line_number":1035,"context_line":"                device.route.add_gateway(subnet.gateway_ip)"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_e0f24006","line":1034,"updated":"2015-11-03 15:45:20.000000000","message":"The logic here is not very clear to me, the check_subnet_ip gets called twice, also deleted route and later added route, I wonder if in some cases, that deleted and added route is the same, if that is the case, doing this does not seem to be right. Can you add a bit more comments to describe the logic and possibly re-arrange the code so that the check_subnet_ip gets called just once? Like check_subnet_ip first, then check gateway, so the code will be a bit easier to follow.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"8e1b0f1b5fb5bc29c0531baa3d1e8d9c9d29ff01","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1032,"context_line":"                if not ipam_utils.check_subnet_ip(subnet.cidr,"},{"line_number":1033,"context_line":"                                                  subnet.gateway_ip):"},{"line_number":1034,"context_line":"                    device.route.add_route(subnet.gateway_ip, scope\u003d\u0027link\u0027)"},{"line_number":1035,"context_line":"                device.route.add_gateway(subnet.gateway_ip)"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_e3a7944d","line":1034,"in_reply_to":"fa80f949_e0f24006","updated":"2015-11-04 02:55:12.000000000","message":"check_subnet_ip() gets called twice.\n- First case is to check whether the existing gateway is there as an explicit route to IP, i.e. in cases where you have already added a gateway outside the subnet and now you are adding a new one which is also outside. In that case the existing one will need to be removed, otherwise there will be dangling routes, which I believe is not secure. If the existing one is inside the subnet, no need to delete the route, that route is needed.\n- Second case is when when you are adding the new gateway set/changed by the user. In that case we need to check whether that gateway falls outside the subnet, if it falls out then the route to the IP is added first and then it proceeds to add the default route.\n\nSo the delete and add does not operate on the same gateway.\n\n\u003e\u003e I wonder if in some cases, that deleted and added route is the same\nThis will not happen, pls check the condition above \"if gateway !\u003d subnet.gateway_ip:\".\n\nI believe the code is self explanatory and existing calls to check_subnet_ip() is valid.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"0085280521c35f5c74df1f0b9c1327c34fbc542a","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1032,"context_line":"                if not ipam_utils.check_subnet_ip(subnet.cidr,"},{"line_number":1033,"context_line":"                                                  subnet.gateway_ip):"},{"line_number":1034,"context_line":"                    device.route.add_route(subnet.gateway_ip, scope\u003d\u0027link\u0027)"},{"line_number":1035,"context_line":"                device.route.add_gateway(subnet.gateway_ip)"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_73a4c156","line":1034,"in_reply_to":"fa80f949_e3a7944d","updated":"2015-11-09 16:23:21.000000000","message":"Done.Added comments which explains the logic.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":1043,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1044,"context_line":"                if not ipam_utils.check_subnet_ip(subnet.cidr,"},{"line_number":1045,"context_line":"                                                  subnet.gateway_ip):"},{"line_number":1046,"context_line":"                    device.route.add_route(subnet.gateway_ip, scope\u003d\u0027link\u0027)"},{"line_number":1047,"context_line":"                device.route.add_gateway(subnet.gateway_ip)"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_0a37b84d","line":1046,"updated":"2015-12-03 08:00:26.000000000","message":"Is this route needed? per my understanding, all unknown traffic will go to default route, so, if the gateway_ip is not in subnet, the traffic to it will go to default route(which also point to gateway_ip)","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":1043,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1044,"context_line":"                if not ipam_utils.check_subnet_ip(subnet.cidr,"},{"line_number":1045,"context_line":"                                                  subnet.gateway_ip):"},{"line_number":1046,"context_line":"                    device.route.add_route(subnet.gateway_ip, scope\u003d\u0027link\u0027)"},{"line_number":1047,"context_line":"                device.route.add_gateway(subnet.gateway_ip)"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_e6ef08e7","line":1046,"in_reply_to":"9a8ffd7b_0a37b84d","updated":"2015-12-03 11:05:23.000000000","message":"I\u0027ve already replied to your comment earlier. Please read through the full history of the issue. I think your understanding is wrong.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                          \u0027%(ip)s\u0027,"},{"line_number":1029,"context_line":"                          {\u0027n\u0027: network.id, \u0027ip\u0027: subnet.gateway_ip})"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"                # IP is checked with subnet twice with check_subnet_ip()"},{"line_number":1032,"context_line":"                # First call is to check whether there is an explicit"},{"line_number":1033,"context_line":"                # route to IP for the existing gateway, i.e. in cases"},{"line_number":1034,"context_line":"                # where you are modifying a gateway outside the subnet"},{"line_number":1035,"context_line":"                # with a new one. The existing route to IP is removed,"},{"line_number":1036,"context_line":"                # to avoid stray routes."},{"line_number":1037,"context_line":"                # Second call is to check whether the new gateway is"},{"line_number":1038,"context_line":"                # outside subnet. If it is, a route to gateway IP is"},{"line_number":1039,"context_line":"                # added first and proceeds to add the default gateway."},{"line_number":1040,"context_line":"                if (gateway and"},{"line_number":1041,"context_line":"                        not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1042,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_fd12a061","line":1039,"range":{"start_line":1031,"start_character":16,"end_line":1039,"end_character":70},"updated":"2016-02-10 22:11:07.000000000","message":"This comment could be more concise.  How about before L1014:\n\n  \"Check for and remove the on-link route for the old gateway being replaced\"\n\nAnd before L1051:\n  \"Add an on-link route for the new gateway\"\n\nI think these message convey the messages and require less cognitive load on the code reviewer to decipher.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"                          \u0027%(ip)s\u0027,"},{"line_number":1029,"context_line":"                          {\u0027n\u0027: network.id, \u0027ip\u0027: subnet.gateway_ip})"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"                # IP is checked with subnet twice with check_subnet_ip()"},{"line_number":1032,"context_line":"                # First call is to check whether there is an explicit"},{"line_number":1033,"context_line":"                # route to IP for the existing gateway, i.e. in cases"},{"line_number":1034,"context_line":"                # where you are modifying a gateway outside the subnet"},{"line_number":1035,"context_line":"                # with a new one. The existing route to IP is removed,"},{"line_number":1036,"context_line":"                # to avoid stray routes."},{"line_number":1037,"context_line":"                # Second call is to check whether the new gateway is"},{"line_number":1038,"context_line":"                # outside subnet. If it is, a route to gateway IP is"},{"line_number":1039,"context_line":"                # added first and proceeds to add the default gateway."},{"line_number":1040,"context_line":"                if (gateway and"},{"line_number":1041,"context_line":"                        not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1042,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_97d48f20","line":1039,"range":{"start_line":1031,"start_character":16,"end_line":1039,"end_character":70},"in_reply_to":"3a57f1b5_fd12a061","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":1037,"context_line":"                # Second call is to check whether the new gateway is"},{"line_number":1038,"context_line":"                # outside subnet. If it is, a route to gateway IP is"},{"line_number":1039,"context_line":"                # added first and proceeds to add the default gateway."},{"line_number":1040,"context_line":"                if (gateway and"},{"line_number":1041,"context_line":"                        not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1042,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1043,"context_line":"                        constants.IP_VERSION_4)"},{"line_number":1044,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_a7541921","line":1041,"range":{"start_line":1040,"start_character":19,"end_line":1041,"end_character":77},"updated":"2016-02-10 22:11:07.000000000","message":"Apply my comment from the previous file here.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":1037,"context_line":"                # Second call is to check whether the new gateway is"},{"line_number":1038,"context_line":"                # outside subnet. If it is, a route to gateway IP is"},{"line_number":1039,"context_line":"                # added first and proceeds to add the default gateway."},{"line_number":1040,"context_line":"                if (gateway and"},{"line_number":1041,"context_line":"                        not ipam_utils.check_subnet_ip(subnet.cidr, gateway)):"},{"line_number":1042,"context_line":"                    v4_onlink \u003d device.route.list_onlink_routes("},{"line_number":1043,"context_line":"                        constants.IP_VERSION_4)"},{"line_number":1044,"context_line":"                    v6_onlink \u003d device.route.list_onlink_routes("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_d7c9a779","line":1041,"range":{"start_line":1040,"start_character":19,"end_line":1041,"end_character":77},"in_reply_to":"3a57f1b5_a7541921","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"                    if gateway in existing_onlink_routes:"},{"line_number":1045,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"                # Add an on-link route for the new gateway ,if it is"},{"line_number":1048,"context_line":"                # outside the subnet"},{"line_number":1049,"context_line":"                is_gateway_not_in_subnet \u003d (subnet.gateway_ip and"},{"line_number":1050,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":1051,"context_line":"                                                    subnet.cidr,"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_db0bc222","line":1048,"range":{"start_line":1047,"start_character":16,"end_line":1048,"end_character":36},"updated":"2016-02-17 17:52:05.000000000","message":"nit:  This comment basically says the same thing as the code.  I\u0027d just remove it, especially now that you\u0027ve added the local variable \"is_gateway_not_in_subnet\".  It is pretty much self-documenting.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"                    if gateway in existing_onlink_routes:"},{"line_number":1045,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"                # Add an on-link route for the new gateway ,if it is"},{"line_number":1048,"context_line":"                # outside the subnet"},{"line_number":1049,"context_line":"                is_gateway_not_in_subnet \u003d (subnet.gateway_ip and"},{"line_number":1050,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":1051,"context_line":"                                                    subnet.cidr,"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_9ad913f6","line":1048,"range":{"start_line":1047,"start_character":16,"end_line":1048,"end_character":36},"in_reply_to":"dae33548_db0bc222","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"850c0a48a83dc3f75417587c2d3d8082356e27f0","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"                    if gateway in existing_onlink_routes:"},{"line_number":1045,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"                is_gateway_not_in_subnet \u003d (subnet.gateway_ip and"},{"line_number":1048,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":1049,"context_line":"                                                    subnet.cidr,"},{"line_number":1050,"context_line":"                                                    subnet.gateway_ip))"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_8dda5715","line":1047,"range":{"start_line":1047,"start_character":16,"end_line":1047,"end_character":40},"updated":"2016-02-18 18:57:29.000000000","message":"nit:  Overloading this local variable name to do two jobs isn\u0027t ideal.  Only fix it if you have another patch set to do.  Maybe use two names:\n\n  is_old_gateway_not_in_subnet \n  is_new_gateway_not_in_subnet\n\nSorry, I didn\u0027t notice it before.","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"68b3454f0e2686a54b2baad0197c3adeea29212b","unresolved":false,"context_lines":[{"line_number":1044,"context_line":"                    if gateway in existing_onlink_routes:"},{"line_number":1045,"context_line":"                        device.route.delete_route(gateway, scope\u003d\u0027link\u0027)"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"                is_gateway_not_in_subnet \u003d (subnet.gateway_ip and"},{"line_number":1048,"context_line":"                                            not ipam_utils.check_subnet_ip("},{"line_number":1049,"context_line":"                                                    subnet.cidr,"},{"line_number":1050,"context_line":"                                                    subnet.gateway_ip))"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_be4810ce","line":1047,"range":{"start_line":1047,"start_character":16,"end_line":1047,"end_character":40},"in_reply_to":"dae33548_8dda5715","updated":"2016-02-19 06:22:11.000000000","message":"Done","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"}],"neutron/agent/linux/interface.py":[{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"7020f995e8a8f0751ba344e483888f21c60e822d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            device.route.add_onlink_route(route)"},{"line_number":183,"context_line":"        for route in existing_onlink_cidrs - new_onlink_cidrs:"},{"line_number":184,"context_line":"            LOG.debug(\"deleting onlink route(%s)\", route)"},{"line_number":185,"context_line":"            if (not preserve_ips or (route not in preserve_ips)):"},{"line_number":186,"context_line":"                device.route.delete_onlink_route(route)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def add_ipv6_addr(self, device_name, v6addr, namespace, scope\u003d\u0027global\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_bf620515","line":185,"updated":"2015-10-26 18:47:25.000000000","message":"I don\u0027t think you should print the debug log unless the route is actually going to be deleted","commit_id":"eb260ef1052206834bca46b05a71d67e910ca0eb"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"004c7baa5398f85b532ea186fbad2a7f0751f60a","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            device.route.add_onlink_route(route)"},{"line_number":183,"context_line":"        for route in existing_onlink_cidrs - new_onlink_cidrs:"},{"line_number":184,"context_line":"            LOG.debug(\"deleting onlink route(%s)\", route)"},{"line_number":185,"context_line":"            if (not preserve_ips or (route not in preserve_ips)):"},{"line_number":186,"context_line":"                device.route.delete_onlink_route(route)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def add_ipv6_addr(self, device_name, v6addr, namespace, scope\u003d\u0027global\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_79a03f91","line":185,"in_reply_to":"3a29b11f_bf620515","updated":"2015-10-27 07:48:57.000000000","message":"Done","commit_id":"eb260ef1052206834bca46b05a71d67e910ca0eb"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5ed39c56dfc461eea86789a0e378b60c0d8d34e0","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            LOG.debug(\"adding onlink route(%s)\", route)"},{"line_number":182,"context_line":"            device.route.add_onlink_route(route)"},{"line_number":183,"context_line":"        for route in existing_onlink_cidrs - new_onlink_cidrs:"},{"line_number":184,"context_line":"            if (not preserve_ips or (route not in preserve_ips)):"},{"line_number":185,"context_line":"                LOG.debug(\"deleting onlink route(%s)\", route)"},{"line_number":186,"context_line":"                device.route.delete_onlink_route(route)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_edca294f","line":184,"updated":"2015-11-09 06:50:23.000000000","message":"Seems existing_onlink_cidrs - new_onlink_cidrs - set(preserve_ips) will be better.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"0085280521c35f5c74df1f0b9c1327c34fbc542a","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            LOG.debug(\"adding onlink route(%s)\", route)"},{"line_number":182,"context_line":"            device.route.add_onlink_route(route)"},{"line_number":183,"context_line":"        for route in existing_onlink_cidrs - new_onlink_cidrs:"},{"line_number":184,"context_line":"            if (not preserve_ips or (route not in preserve_ips)):"},{"line_number":185,"context_line":"                LOG.debug(\"deleting onlink route(%s)\", route)"},{"line_number":186,"context_line":"                device.route.delete_onlink_route(route)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_73404157","line":184,"in_reply_to":"da85f559_edca294f","updated":"2015-11-09 16:23:21.000000000","message":"Agreed, Done","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"71fa020be504462b182d9c2a444fc49691866a9e","unresolved":false,"context_lines":[{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        LOG.debug(\u0027Inside add_route_to_ip ip %s\u0027, ip)"},{"line_number":764,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":765,"context_line":"        args \u003d [\u0027replace\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":766,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_7fb6ad8b","line":763,"updated":"2015-10-19 16:49:01.000000000","message":"nit: seems duplicated to L768\n\nSame to L777 and L772.","commit_id":"fbdcebc6e2cbbb751686426fc3fce8220cfd8476"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c335b3cb6b5a21cfed84fb43cad4103601a56f40","unresolved":false,"context_lines":[{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        LOG.debug(\u0027Inside add_route_to_ip ip %s\u0027, ip)"},{"line_number":764,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":765,"context_line":"        args \u003d [\u0027replace\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":766,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_66659edf","line":763,"in_reply_to":"3a29b11f_7fb6ad8b","updated":"2015-10-20 12:18:01.000000000","message":"Done. Removed those debug logs.","commit_id":"fbdcebc6e2cbbb751686426fc3fce8220cfd8476"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":764,"context_line":"        args \u003d [\u0027replace\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":765,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_0e6aa81a","line":762,"updated":"2015-10-30 18:01:35.000000000","message":"Duplicated add_router method","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":764,"context_line":"        args \u003d [\u0027replace\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":765,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_50b9f613","line":762,"in_reply_to":"1a26ad4f_0e6aa81a","updated":"2015-11-02 15:14:38.000000000","message":"Done. Didn\u0027t take out the function, rather made it call add_route(). I presume that would make the code more descriptive where it gets called.","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":766,"context_line":"            args +\u003d [\u0027table\u0027, table]"},{"line_number":767,"context_line":"        self._as_root([ip_version], tuple(args))"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":770,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":771,"context_line":"        args \u003d [\u0027del\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":772,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_ae7854f3","line":769,"updated":"2015-10-30 18:01:35.000000000","message":"Duplicated delete_route method","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":766,"context_line":"            args +\u003d [\u0027table\u0027, table]"},{"line_number":767,"context_line":"        self._as_root([ip_version], tuple(args))"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":770,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":771,"context_line":"        args \u003d [\u0027del\u0027, ip, \u0027dev\u0027, self.name, \u0027scope\u0027, scope]"},{"line_number":772,"context_line":"        if table:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_70e992e5","line":769,"in_reply_to":"1a26ad4f_ae7854f3","updated":"2015-11-02 15:14:38.000000000","message":"Done. Didn\u0027t take out the function, rather made it call delete_route(). I presume that would make the code more descriptive where it gets called.","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"e04ce6efbc024b058cc5f01fb94b7d5f1bf4e2c7","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_b055eac2","line":762,"updated":"2015-11-02 15:14:10.000000000","message":"Why you done this? This method should be removed and you should use self.add_route directly","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_259d07bc","line":762,"in_reply_to":"1a26ad4f_1b339fac","updated":"2015-11-03 04:34:07.000000000","message":"Done. Removed these functions and directly calling add_route().","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7885b7c0a070f470936fc5cc5c38130219de18df","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_bb962b3c","line":762,"in_reply_to":"1a26ad4f_b055eac2","updated":"2015-11-02 15:46:21.000000000","message":"I took the example of add_onlink_route, and thought that would make the called place more detailed. In case if it\u0027s not the best thing to do I\u0027ll change it to directly call.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"5faf3c7e5955ea2eacc7b21ef446cea582042374","unresolved":false,"context_lines":[{"line_number":759,"context_line":"            args +\u003d [k, v]"},{"line_number":760,"context_line":"        self._run_as_root_detect_device_not_found([ip_version], tuple(args))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_1b339fac","line":762,"in_reply_to":"1a26ad4f_b055eac2","updated":"2015-11-02 15:33:15.000000000","message":"Yeah, this is basically a copy of the other function.  Agreed.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"e04ce6efbc024b058cc5f01fb94b7d5f1bf4e2c7","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":766,"context_line":"        self.delete_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_d05ae6f1","line":765,"updated":"2015-11-02 15:14:10.000000000","message":"Same situation here","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":766,"context_line":"        self.delete_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_a5b11749","line":765,"in_reply_to":"1a26ad4f_9b1faf07","updated":"2015-11-03 04:34:07.000000000","message":"Done","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"5faf3c7e5955ea2eacc7b21ef446cea582042374","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":766,"context_line":"        self.delete_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_9b1faf07","line":765,"in_reply_to":"1a26ad4f_d05ae6f1","updated":"2015-11-02 15:33:15.000000000","message":"Agreed.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7885b7c0a070f470936fc5cc5c38130219de18df","unresolved":false,"context_lines":[{"line_number":762,"context_line":"    def add_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":763,"context_line":"        self.add_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def delete_route_to_ip(self, ip, scope\u003d\u0027global\u0027, table\u003dNone):"},{"line_number":766,"context_line":"        self.delete_route(ip, table\u003dtable, scope\u003dscope)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_7bcc136a","line":765,"in_reply_to":"1a26ad4f_d05ae6f1","updated":"2015-11-02 15:46:21.000000000","message":"Please see add_onlink_route and delete_onlink_route. I took example of these... :) Should I change to directly call?","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"}],"neutron/common/config.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"d132d89829fb45548afc42b7090164185cb4640a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                      \"services running on this machine. All the agents and \""},{"line_number":101,"context_line":"                      \"services running on this machine must use the same \""},{"line_number":102,"context_line":"                      \"host value.\")),"},{"line_number":103,"context_line":"    cfg.BoolOpt(\u0027force_gateway_on_subnet\u0027, default\u003dFalse,"},{"line_number":104,"context_line":"                help\u003d_(\"Ensure that configured gateway is on subnet. \""},{"line_number":105,"context_line":"                       \"For IPv6, validate only if gateway is not a link \""},{"line_number":106,"context_line":"                       \"local address. Deprecated, to be removed during the \""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_55cd5383","line":103,"updated":"2015-11-19 13:44:02.000000000","message":"I see on L75 and L79 a deprecated_for_removal option. It looks like it is a new option to use.  \n\nhttp://docs.openstack.org/developer/oslo.config/opts.html","commit_id":"e4cd44ccf7529c96664363a122f7436bf85e329c"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"6e568684b8ad5ed7212d7777f0e13d6713de5d4c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                      \"services running on this machine. All the agents and \""},{"line_number":101,"context_line":"                      \"services running on this machine must use the same \""},{"line_number":102,"context_line":"                      \"host value.\")),"},{"line_number":103,"context_line":"    cfg.BoolOpt(\u0027force_gateway_on_subnet\u0027, default\u003dFalse,"},{"line_number":104,"context_line":"                help\u003d_(\"Ensure that configured gateway is on subnet. \""},{"line_number":105,"context_line":"                       \"For IPv6, validate only if gateway is not a link \""},{"line_number":106,"context_line":"                       \"local address. Deprecated, to be removed during the \""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_0f2eb3fa","line":103,"in_reply_to":"ba8a016a_55cd5383","updated":"2015-11-20 03:21:05.000000000","message":"Done","commit_id":"e4cd44ccf7529c96664363a122f7436bf85e329c"}],"neutron/common/utils.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f27e31bad1689cfedaf1b0266b6c267ba87f9e4f","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"def is_ip_in_subnet(cidr, ip):"},{"line_number":405,"context_line":"    \"\"\"Validate that the ip is on the subnet.\"\"\""},{"line_number":406,"context_line":"    try:"},{"line_number":407,"context_line":"        ip \u003d netaddr.IPAddress(ip)"},{"line_number":408,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_a7ee9020","line":405,"updated":"2015-10-19 11:55:21.000000000","message":"looks like a duplicate of check_subnet_ip in ipam/utils.py","commit_id":"fbdcebc6e2cbbb751686426fc3fce8220cfd8476"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c335b3cb6b5a21cfed84fb43cad4103601a56f40","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"def is_ip_in_subnet(cidr, ip):"},{"line_number":405,"context_line":"    \"\"\"Validate that the ip is on the subnet.\"\"\""},{"line_number":406,"context_line":"    try:"},{"line_number":407,"context_line":"        ip \u003d netaddr.IPAddress(ip)"},{"line_number":408,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_c69cb2c2","line":405,"in_reply_to":"3a29b11f_a7ee9020","updated":"2015-10-20 12:18:01.000000000","message":"Done. Removed this function and updated its callers to call check_subnet_ip in ipam/utils.py","commit_id":"fbdcebc6e2cbbb751686426fc3fce8220cfd8476"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"bbddae55c1ccd62272f5508f2fa3e680e4aae2f8","unresolved":false,"context_lines":[{"line_number":478,"context_line":"            # to make sure that the gateway is not the subnet\u0027s"},{"line_number":479,"context_line":"            # network or broadcast address. If gateway is out of"},{"line_number":480,"context_line":"            # subnet, then there is no way of checking since we"},{"line_number":481,"context_line":"            # don\u0027t have the gateway\u0027s subnet cidr."},{"line_number":482,"context_line":"            if ((cfg.CONF.force_gateway_on_subnet and"},{"line_number":483,"context_line":"                not ipam.utils.check_gateway_in_subnet("},{"line_number":484,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_7dba0470","line":481,"updated":"2015-10-20 14:41:49.000000000","message":"make sense, for that case it will be administrator responsibility to make sure gateway is reachable.","commit_id":"6143107b08222eb53d772db660c2e14e2c784b14"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5ed39c56dfc461eea86789a0e378b60c0d8d34e0","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":475,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":476,"context_line":"            # This is a kludgy check and should be fixed once"},{"line_number":477,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed. We just need"},{"line_number":478,"context_line":"            # to make sure that the gateway is not the subnet\u0027s"},{"line_number":479,"context_line":"            # network or broadcast address. If gateway is out of"},{"line_number":480,"context_line":"            # subnet, then there is no way of checking since we"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_6d04f97d","line":477,"updated":"2015-11-09 06:50:23.000000000","message":"nit: How about TODO/NOTE here, about to fix code here once \u0027force_gateway_on_subnet is removed.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"0085280521c35f5c74df1f0b9c1327c34fbc542a","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":475,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":476,"context_line":"            # This is a kludgy check and should be fixed once"},{"line_number":477,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed. We just need"},{"line_number":478,"context_line":"            # to make sure that the gateway is not the subnet\u0027s"},{"line_number":479,"context_line":"            # network or broadcast address. If gateway is out of"},{"line_number":480,"context_line":"            # subnet, then there is no way of checking since we"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_8e4d7874","line":477,"in_reply_to":"da85f559_6d04f97d","updated":"2015-11-09 16:23:21.000000000","message":"Done","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"},{"line_number":471,"context_line":"                ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":472,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])):"},{"line_number":473,"context_line":"                error_message \u003d _(\"Gateway is not valid on subnet\")"},{"line_number":474,"context_line":"                raise n_exc.InvalidInput(error_message\u003derror_message)"},{"line_number":475,"context_line":"            # Ensure the gateway IP is not assigned to any port"},{"line_number":476,"context_line":"            # skip this check in case of create (s parameter won\u0027t have id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_af96be49","line":473,"updated":"2015-12-03 08:00:26.000000000","message":"Since things are more complicating here. Maybe the error_message needs update. At least the gateway ip and cidr should be added in it, to make others be clear about the problem.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"},{"line_number":471,"context_line":"                ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":472,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])):"},{"line_number":473,"context_line":"                error_message \u003d _(\"Gateway is not valid on subnet\")"},{"line_number":474,"context_line":"                raise n_exc.InvalidInput(error_message\u003derror_message)"},{"line_number":475,"context_line":"            # Ensure the gateway IP is not assigned to any port"},{"line_number":476,"context_line":"            # skip this check in case of create (s parameter won\u0027t have id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_06d56ce3","line":473,"in_reply_to":"9a8ffd7b_af96be49","updated":"2015-12-03 11:05:23.000000000","message":"I guess you misunderstood the issue. Here the existing message is retained for the older default case of the config var. In case someone specified a n/w or broadcast address for a known subnet this message will suffice.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"cfcd06f10191cd5bd2c295bb8f0b18e09405d64b","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # This is a kludgy check and should be fixed once"},{"line_number":459,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_90f09eca","line":458,"updated":"2016-02-08 14:23:59.000000000","message":"Nit: Could add TODO(...)","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"aa03cc5ac14f3df7b25fcb88eadffed35c654c0d","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # This is a kludgy check and should be fixed once"},{"line_number":459,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_ed38e73f","line":458,"in_reply_to":"5a5ae5dd_90f09eca","updated":"2016-02-09 07:38:52.000000000","message":"Done","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # TODO(sreesiv) This is a kludgy check and should be fixed"},{"line_number":459,"context_line":"            # once \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."},{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_fde8607e","line":459,"range":{"start_line":458,"start_character":28,"end_line":459,"end_character":56},"updated":"2016-02-10 22:11:07.000000000","message":"This TODO isn\u0027t necessary.  The removal of the option will necessitate the removal of this check.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        if attributes.is_attr_set(s.get(\u0027gateway_ip\u0027)):"},{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # TODO(sreesiv) This is a kludgy check and should be fixed"},{"line_number":459,"context_line":"            # once \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."},{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_b7a50bb6","line":459,"range":{"start_line":458,"start_character":28,"end_line":459,"end_character":56},"in_reply_to":"3a57f1b5_fde8607e","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # TODO(sreesiv) This is a kludgy check and should be fixed"},{"line_number":459,"context_line":"            # once \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."},{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"},{"line_number":463,"context_line":"            # validation. If gateway is out of subnet, there is no way"},{"line_number":464,"context_line":"            # to check since we don\u0027t have the gateway\u0027s subnet cidr."},{"line_number":465,"context_line":"            if ((cfg.CONF.force_gateway_on_subnet and"},{"line_number":466,"context_line":"                not ipam.utils.check_gateway_in_subnet("},{"line_number":467,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_7d9470e1","line":464,"range":{"start_line":460,"start_character":12,"end_line":464,"end_character":69},"updated":"2016-02-10 22:11:07.000000000","message":"You might consider putting this note with the check_gateway_invalid_in_subnet method.  I think having here might be overkill.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            self._validate_ip_version(ip_ver, s[\u0027gateway_ip\u0027], \u0027gateway_ip\u0027)"},{"line_number":458,"context_line":"            # TODO(sreesiv) This is a kludgy check and should be fixed"},{"line_number":459,"context_line":"            # once \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":460,"context_line":"            # NOTE(sreesiv) We just need to make sure that the gateway"},{"line_number":461,"context_line":"            # is not the subnet\u0027s network or broadcast address."},{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"},{"line_number":463,"context_line":"            # validation. If gateway is out of subnet, there is no way"},{"line_number":464,"context_line":"            # to check since we don\u0027t have the gateway\u0027s subnet cidr."},{"line_number":465,"context_line":"            if ((cfg.CONF.force_gateway_on_subnet and"},{"line_number":466,"context_line":"                not ipam.utils.check_gateway_in_subnet("},{"line_number":467,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_77af9394","line":464,"range":{"start_line":460,"start_character":12,"end_line":464,"end_character":69},"in_reply_to":"3a57f1b5_7d9470e1","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"},{"line_number":463,"context_line":"            # validation. If gateway is out of subnet, there is no way"},{"line_number":464,"context_line":"            # to check since we don\u0027t have the gateway\u0027s subnet cidr."},{"line_number":465,"context_line":"            if ((cfg.CONF.force_gateway_on_subnet and"},{"line_number":466,"context_line":"                not ipam.utils.check_gateway_in_subnet("},{"line_number":467,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"},{"line_number":468,"context_line":"                ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":469,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])):"},{"line_number":470,"context_line":"                error_message \u003d _(\"Gateway is not valid on subnet\")"},{"line_number":471,"context_line":"                raise n_exc.InvalidInput(error_message\u003derror_message)"},{"line_number":472,"context_line":"            # Ensure the gateway IP is not assigned to any port"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_e2c0bf7e","line":469,"range":{"start_line":465,"start_character":15,"end_line":469,"end_character":48},"updated":"2016-02-10 22:11:07.000000000","message":"Please expand this out for readability:\n\n  if cfg.CONF.force_gateway_on_subnet:\n      is_valid \u003d ...\n  else:\n      is_valid \u003d ...\n  if not is_valid:","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":462,"context_line":"            # Only check_gateway_invalid_in_subnet() is required for"},{"line_number":463,"context_line":"            # validation. If gateway is out of subnet, there is no way"},{"line_number":464,"context_line":"            # to check since we don\u0027t have the gateway\u0027s subnet cidr."},{"line_number":465,"context_line":"            if ((cfg.CONF.force_gateway_on_subnet and"},{"line_number":466,"context_line":"                not ipam.utils.check_gateway_in_subnet("},{"line_number":467,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])) or"},{"line_number":468,"context_line":"                ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":469,"context_line":"                    s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])):"},{"line_number":470,"context_line":"                error_message \u003d _(\"Gateway is not valid on subnet\")"},{"line_number":471,"context_line":"                raise n_exc.InvalidInput(error_message\u003derror_message)"},{"line_number":472,"context_line":"            # Ensure the gateway IP is not assigned to any port"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_37791b30","line":469,"range":{"start_line":465,"start_character":15,"end_line":469,"end_character":48},"in_reply_to":"3a57f1b5_e2c0bf7e","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4824271831ec010b4409df670b4fdb3213c7148b","unresolved":false,"context_lines":[{"line_number":462,"context_line":"                is_gateway_not_valid \u003d not ipam.utils.check_gateway_in_subnet("},{"line_number":463,"context_line":"                                            s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":464,"context_line":"            else:"},{"line_number":465,"context_line":"                is_gateway_not_valid \u003d \\"},{"line_number":466,"context_line":"                    ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":467,"context_line":"                        s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":468,"context_line":"            if is_gateway_not_valid:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_9a47bdbb","line":465,"updated":"2016-02-11 17:10:47.000000000","message":"nit: use parens instead of backslashes for continuation.","commit_id":"e7bd35a405937840cc4004cd5f28f67a03ccafd4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"78b41cb9a311fefdd7dd54d435df1338a1e3149d","unresolved":false,"context_lines":[{"line_number":462,"context_line":"                is_gateway_not_valid \u003d not ipam.utils.check_gateway_in_subnet("},{"line_number":463,"context_line":"                                            s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":464,"context_line":"            else:"},{"line_number":465,"context_line":"                is_gateway_not_valid \u003d \\"},{"line_number":466,"context_line":"                    ipam.utils.check_gateway_invalid_in_subnet("},{"line_number":467,"context_line":"                        s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":468,"context_line":"            if is_gateway_not_valid:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_1082a994","line":465,"in_reply_to":"3a57f1b5_9a47bdbb","updated":"2016-02-15 16:06:17.000000000","message":"Done","commit_id":"e7bd35a405937840cc4004cd5f28f67a03ccafd4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # NOTE(sreesiv) Only check_gateway_invalid_in_subnet() is"},{"line_number":459,"context_line":"            # required for validation here when the option"},{"line_number":460,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":461,"context_line":"            if cfg.CONF.force_gateway_on_subnet:"},{"line_number":462,"context_line":"                is_gateway_not_valid \u003d not ipam.utils.check_gateway_in_subnet("},{"line_number":463,"context_line":"                                            s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":464,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_5b185275","line":461,"updated":"2016-02-17 17:52:05.000000000","message":"Instead of the NOTE on L458, I\u0027d put a TODO here before L462 that the check_gateway_in_subnet method will be obsolete when this line is removed.  So, the method itself should be removed.  This should signal all the right cleanup and reviewers will know to look for it when the TODO is removed.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # NOTE(sreesiv) Only check_gateway_invalid_in_subnet() is"},{"line_number":459,"context_line":"            # required for validation here when the option"},{"line_number":460,"context_line":"            # \u0027force_gateway_on_subnet\u0027 is removed."},{"line_number":461,"context_line":"            if cfg.CONF.force_gateway_on_subnet:"},{"line_number":462,"context_line":"                is_gateway_not_valid \u003d not ipam.utils.check_gateway_in_subnet("},{"line_number":463,"context_line":"                                            s[\u0027cidr\u0027], s[\u0027gateway_ip\u0027])"},{"line_number":464,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_daf6fb5b","line":461,"in_reply_to":"dae33548_5b185275","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"}],"neutron/ipam/utils.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":28,"context_line":"        # network or the broadcast address (which exists only in IPv4)"},{"line_number":29,"context_line":"        return (ip !\u003d net.network"},{"line_number":30,"context_line":"                and (net.version \u003d\u003d 6 or ip !\u003d net[-1])"},{"line_number":31,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_8ecb181e","line":30,"updated":"2015-10-30 18:01:35.000000000","message":"You should use constants to verify that","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":28,"context_line":"        # network or the broadcast address (which exists only in IPv4)"},{"line_number":29,"context_line":"        return (ip !\u003d net.network"},{"line_number":30,"context_line":"                and (net.version \u003d\u003d 6 or ip !\u003d net[-1])"},{"line_number":31,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_10a85e8c","line":30,"in_reply_to":"1a26ad4f_8ecb181e","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        return (ip !\u003d net.network"},{"line_number":30,"context_line":"                and (net.version \u003d\u003d 6 or ip !\u003d net[-1])"},{"line_number":31,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":34,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":35,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_aee614b2","line":32,"updated":"2015-10-30 18:01:35.000000000","message":"You shouldn\u0027t use except Exception, you can remove information about some dipper errors. You always should use only exceptions which you want to catch not Exception","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        return (ip !\u003d net.network"},{"line_number":30,"context_line":"                and (net.version \u003d\u003d 6 or ip !\u003d net[-1])"},{"line_number":31,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":32,"context_line":"    except Exception:"},{"line_number":33,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":34,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":35,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_70975248","line":32,"in_reply_to":"1a26ad4f_aee614b2","updated":"2015-11-02 15:14:38.000000000","message":"Done. Took example of https://github.com/openstack/neutron/blob/655a1a214736e91e2f0e6186c9650946883bea41/neutron/db/db_base_plugin_v2.py#L191","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":46,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":47,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":48,"context_line":"                (net.version \u003d\u003d 4 and ip \u003d\u003d net[-1])))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def check_gateway_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_cee1109c","line":48,"updated":"2015-10-30 18:01:35.000000000","message":"Constant","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":46,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":47,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":48,"context_line":"                (net.version \u003d\u003d 4 and ip \u003d\u003d net[-1])))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def check_gateway_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_f0de0210","line":48,"in_reply_to":"1a26ad4f_cee1109c","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":52,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":53,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":54,"context_line":"    if ip.version \u003d\u003d 4 or (ip.version \u003d\u003d 6 and not ip.is_link_local()):"},{"line_number":55,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":56,"context_line":"    return True"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_ee03ac40","line":54,"updated":"2015-10-30 18:01:35.000000000","message":"Changing IP version for constants in your code additionally you can do this right here","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":52,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":53,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":54,"context_line":"    if ip.version \u003d\u003d 4 or (ip.version \u003d\u003d 6 and not ip.is_link_local()):"},{"line_number":55,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":56,"context_line":"    return True"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_d0e986b8","line":54,"in_reply_to":"1a26ad4f_ee03ac40","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"493fa3e5aed1d63c987818c358cfce48d85ee628","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from neutron.common import constants"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_f0ea820e","line":17,"updated":"2015-11-02 15:08:03.000000000","message":"the import from neutron.common import constants should be in its own section","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7885b7c0a070f470936fc5cc5c38130219de18df","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from neutron.common import constants"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_5b535739","line":17,"in_reply_to":"1a26ad4f_f0ea820e","updated":"2015-11-02 15:46:21.000000000","message":"Can you explain a bit? I didn\u0027t understand that...novice :)","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from neutron.common import constants"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_2584275c","line":17,"in_reply_to":"1a26ad4f_f0ea820e","updated":"2015-11-03 04:34:07.000000000","message":"Done. Modified it into its own line/section.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"e04ce6efbc024b058cc5f01fb94b7d5f1bf4e2c7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":59,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":60,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":61,"context_line":"       (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":62,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":63,"context_line":"    return True"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_50bfb6a9","line":61,"updated":"2015-11-02 15:14:10.000000000","message":"You should increase indentation in that line because there is no visible line between if statement and return which is inner code of that stmt.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"493fa3e5aed1d63c987818c358cfce48d85ee628","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":59,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":60,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":61,"context_line":"       (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":62,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":63,"context_line":"    return True"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_f03842a2","line":61,"updated":"2015-11-02 15:08:03.000000000","message":"please indent by one space","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":59,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":60,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":61,"context_line":"       (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":62,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":63,"context_line":"    return True"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_25ebc714","line":61,"in_reply_to":"1a26ad4f_50bfb6a9","updated":"2015-11-03 04:34:07.000000000","message":"Done","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"493fa3e5aed1d63c987818c358cfce48d85ee628","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return [netaddr.IPRange(first, last)]"},{"line_number":80,"context_line":"    first_ip \u003d first + 1"},{"line_number":81,"context_line":"    # last address is broadcast in v4"},{"line_number":82,"context_line":"    last_ip \u003d last - (ip_version \u003d\u003d constants.IP_VERSION_4)"},{"line_number":83,"context_line":"    if first_ip \u003e\u003d last_ip:"},{"line_number":84,"context_line":"        # /31 lands here"},{"line_number":85,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_904a2e25","line":82,"updated":"2015-11-02 15:08:03.000000000","message":"this is unrelated to the patch set","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"5faf3c7e5955ea2eacc7b21ef446cea582042374","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return [netaddr.IPRange(first, last)]"},{"line_number":80,"context_line":"    first_ip \u003d first + 1"},{"line_number":81,"context_line":"    # last address is broadcast in v4"},{"line_number":82,"context_line":"    last_ip \u003d last - (ip_version \u003d\u003d constants.IP_VERSION_4)"},{"line_number":83,"context_line":"    if first_ip \u003e\u003d last_ip:"},{"line_number":84,"context_line":"        # /31 lands here"},{"line_number":85,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_bb7f0b16","line":82,"in_reply_to":"1a26ad4f_904a2e25","updated":"2015-11-02 15:33:15.000000000","message":"This could be a possible different patch altogether.","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return [netaddr.IPRange(first, last)]"},{"line_number":80,"context_line":"    first_ip \u003d first + 1"},{"line_number":81,"context_line":"    # last address is broadcast in v4"},{"line_number":82,"context_line":"    last_ip \u003d last - (ip_version \u003d\u003d constants.IP_VERSION_4)"},{"line_number":83,"context_line":"    if first_ip \u003e\u003d last_ip:"},{"line_number":84,"context_line":"        # /31 lands here"},{"line_number":85,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_c5dc5375","line":82,"in_reply_to":"1a26ad4f_bb7f0b16","updated":"2015-11-03 04:34:07.000000000","message":"Done. Reverted","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7885b7c0a070f470936fc5cc5c38130219de18df","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return [netaddr.IPRange(first, last)]"},{"line_number":80,"context_line":"    first_ip \u003d first + 1"},{"line_number":81,"context_line":"    # last address is broadcast in v4"},{"line_number":82,"context_line":"    last_ip \u003d last - (ip_version \u003d\u003d constants.IP_VERSION_4)"},{"line_number":83,"context_line":"    if first_ip \u003e\u003d last_ip:"},{"line_number":84,"context_line":"        # /31 lands here"},{"line_number":85,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_1b9cff0d","line":82,"in_reply_to":"1a26ad4f_bb7f0b16","updated":"2015-11-02 15:46:21.000000000","message":"I already changed (based on review comment) check_gateway_in_subnet() above which was not modified by my original patch! So along with that change I though I would modify this one too... :)\n\nShould I revert?","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":34,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":35,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":36,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":37,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":38,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":39,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_b9260ccc","line":36,"updated":"2015-12-03 08:00:26.000000000","message":"Since you catch the exception here, I think the log level here is not enough for the exception.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"401fc634c9835186b53f1dd5fddb98b4737445d2","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":34,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":35,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":36,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":37,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":38,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":39,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_b5bc506d","line":36,"in_reply_to":"9a8ffd7b_39052a45","updated":"2015-12-04 12:43:50.000000000","message":"Done. \u0027exception\u0027 seems to be the way others have done in similar situations, where the information is logged and function handles to move on.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d29b105cb0688bab6f4444bb6ef5322068254919","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":34,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":35,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":36,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":37,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":38,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":39,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_4c3ce9e0","line":36,"in_reply_to":"9a8ffd7b_39052a45","updated":"2015-12-03 14:20:43.000000000","message":"There is only LOG.debug. Which one do you suggest? I\u0027ll change to that.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"11ee3117ba264b79669f6385dace0c667d2c9c52","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":34,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":35,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":36,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":37,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":38,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":39,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_39052a45","line":36,"in_reply_to":"9a8ffd7b_860ddc90","updated":"2015-12-03 12:33:48.000000000","message":"Some of them log as debug, some of them log as exception, some of them log as error.\nI just think debug is not enough here. When a wrong ip_address is passed in, it shouldn\u0027t hide the exception from user.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":34,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":35,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":36,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":37,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":38,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":39,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_860ddc90","line":36,"in_reply_to":"9a8ffd7b_b9260ccc","updated":"2015-12-03 11:05:23.000000000","message":"Check other functions which use the same style. I\u0027ve followed them.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_ec1cd467","line":44,"updated":"2015-12-03 08:00:26.000000000","message":"You are changing the action of the function here. UT for it may need update.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"11ee3117ba264b79669f6385dace0c667d2c9c52","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_b997daea","line":44,"in_reply_to":"9a8ffd7b_66cf9829","updated":"2015-12-03 12:33:48.000000000","message":"hiding exceptions","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d29b105cb0688bab6f4444bb6ef5322068254919","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_4f27fb62","line":44,"in_reply_to":"9a8ffd7b_b997daea","updated":"2015-12-03 14:20:43.000000000","message":"Even if there is an exception here we need to log that and keep going, which was the intention. This was added for UT case only if I remember :)","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        LOG.debug(\"check_subnet_ip() failed with \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\","},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_66cf9829","line":44,"in_reply_to":"9a8ffd7b_ec1cd467","updated":"2015-12-03 11:05:23.000000000","message":"??? Which action?","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # Check whether the gw IP is in-valid on subnet. It has to be on"},{"line_number":52,"context_line":"    # the subnet and cannot be the \u0027network\u0027 or the"},{"line_number":53,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":54,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":55,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":56,"context_line":"                (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_7990a4ed","line":54,"updated":"2015-12-03 08:00:26.000000000","message":"I am a little confused by this function. Much of the logic here can be found at check_subnet_ip, considering using them together.\n\nThis function returns False in 2 cases: 1) gateway is not in cidr 2) gateway is not a valid IP in cidr. But the name here only tell case 2).\n\nI would call it \"check_gateway_conflict_with_subnet\". And you may need to consider the special IP(like, 0.0.0.0) in the function.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # Check whether the gw IP is in-valid on subnet. It has to be on"},{"line_number":52,"context_line":"    # the subnet and cannot be the \u0027network\u0027 or the"},{"line_number":53,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":54,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":55,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":56,"context_line":"                (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_910af41e","line":54,"in_reply_to":"9a8ffd7b_7990a4ed","updated":"2015-12-03 11:05:23.000000000","message":"Please cross check. I think there is clear distinction between the two.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"11ee3117ba264b79669f6385dace0c667d2c9c52","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # Check whether the gw IP is in-valid on subnet. It has to be on"},{"line_number":52,"context_line":"    # the subnet and cannot be the \u0027network\u0027 or the"},{"line_number":53,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":54,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":55,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":56,"context_line":"                (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_d94f3e90","line":54,"in_reply_to":"9a8ffd7b_910af41e","updated":"2015-12-03 12:33:48.000000000","message":"line 54~56 is almost the same as line 32~34","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"75fa1047c9a6826fcf7383ee4b741cf1d4937ef8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_99a4684b","line":62,"updated":"2015-12-03 08:00:26.000000000","message":"No need to change this place, if it is just for using the constant. It is not relative to the bug and I remember there is another patch to address the constant issue.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d29b105cb0688bab6f4444bb6ef5322068254919","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_0f525367","line":62,"in_reply_to":"9a8ffd7b_141cad68","updated":"2015-12-03 14:20:43.000000000","message":"May be, I am new to the policies, because I am a newbie. In case someone else objects I\u0027ll revert it. My intention is to improve the patch based on comments from experienced folks like you. If someone else disagree with your suggested change?","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"11ee3117ba264b79669f6385dace0c667d2c9c52","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_141cad68","line":62,"in_reply_to":"9a8ffd7b_716c30d0","updated":"2015-12-03 12:33:48.000000000","message":"No matter what previous comments, it is wrong here. you should not change uncorrelated code, even for decoration.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c78c5fdd56734b9e4ae1fa022e564667808246cd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_716c30d0","line":62,"in_reply_to":"9a8ffd7b_99a4684b","updated":"2015-12-03 11:05:23.000000000","message":"This was done based on earlier review comments. Please go through the history of this patch. It has gone through many rounds of review and this PS is just a rebase.","commit_id":"01fdcd10036063456fc889e04e83dba59c8a3297"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"cfcd06f10191cd5bd2c295bb8f0b18e09405d64b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        LOG.exception(_LE(\"check_subnet_ip() failed with \""},{"line_number":38,"context_line":"                          \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":39,"context_line":"                      {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":40,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_f0aeb22c","line":37,"updated":"2016-02-08 14:23:59.000000000","message":"nit: It would be better IMHO, to indicate more info on what failed here and L42, in the log message.\n\nOtherwise, you could move this to L45 and then for both exceptions, just place a \"pass\" statement and remove L42-44.","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"dba08b81fbd3b3cd81ec30999f86854b8a4cde92","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        LOG.exception(_LE(\"check_subnet_ip() failed with \""},{"line_number":38,"context_line":"                          \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":39,"context_line":"                      {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":40,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_fc5dff79","line":37,"in_reply_to":"5a5ae5dd_f0aeb22c","updated":"2016-02-09 05:29:54.000000000","message":"+1\n\nand probably it isn\u0027t appropraite to have the method name in the message.","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"aa03cc5ac14f3df7b25fcb88eadffed35c654c0d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        LOG.exception(_LE(\"check_subnet_ip() failed with \""},{"line_number":38,"context_line":"                          \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":39,"context_line":"                      {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":40,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_2d16ffa7","line":37,"in_reply_to":"5a5ae5dd_f0aeb22c","updated":"2016-02-09 07:38:52.000000000","message":"Done","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"aa03cc5ac14f3df7b25fcb88eadffed35c654c0d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        LOG.exception(_LE(\"check_subnet_ip() failed with \""},{"line_number":38,"context_line":"                          \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":39,"context_line":"                      {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":40,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_cd0acb79","line":37,"in_reply_to":"5a5ae5dd_fc5dff79","updated":"2016-02-09 07:38:52.000000000","message":"Done","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"dba08b81fbd3b3cd81ec30999f86854b8a4cde92","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Validate that the gw IP address is valid on the subnet.\"\"\""},{"line_number":50,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":51,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":52,"context_line":"    # Check whether the gw IP is in-valid on subnet. It has to be on"},{"line_number":53,"context_line":"    # the subnet and cannot be the \u0027network\u0027 or the"},{"line_number":54,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":55,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":56,"context_line":"            and (ip \u003d\u003d net.network or"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_dc9da30b","line":53,"range":{"start_line":52,"start_character":53,"end_line":53,"end_character":16},"updated":"2016-02-09 05:29:54.000000000","message":"how about: If it\u0027s on the subnet, it shouldn\u0027t be the ....","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"aa03cc5ac14f3df7b25fcb88eadffed35c654c0d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Validate that the gw IP address is valid on the subnet.\"\"\""},{"line_number":50,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":51,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":52,"context_line":"    # Check whether the gw IP is in-valid on subnet. It has to be on"},{"line_number":53,"context_line":"    # the subnet and cannot be the \u0027network\u0027 or the"},{"line_number":54,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":55,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":56,"context_line":"            and (ip \u003d\u003d net.network or"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_0d78e3f7","line":53,"range":{"start_line":52,"start_character":53,"end_line":53,"end_character":16},"in_reply_to":"5a5ae5dd_dc9da30b","updated":"2016-02-09 07:38:52.000000000","message":"Done. Simplified.","commit_id":"6942e887a583ab8778bc6b1466dfb41b22a6def5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"acc1dc9d1b214aabdf5f8b559915952320aca109","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.exception(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                      \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_b54a3526","line":41,"updated":"2016-02-09 09:38:27.000000000","message":"why do we need to log the exception trace here? please use LOG.error","commit_id":"679a3b02b911977d6e077c97a14f734207e188aa"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"3e2b9bd230768e80a1552fabb31b7d5ab6cd2a00","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.exception(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                      \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"                  {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_50cbcf1e","line":41,"in_reply_to":"5a5ae5dd_b54a3526","updated":"2016-02-09 10:06:13.000000000","message":"Done","commit_id":"679a3b02b911977d6e077c97a14f734207e188aa"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def check_subnet_ip(cidr, ip_address):"},{"line_number":27,"context_line":"    \"\"\"Validate that the IP address is on the subnet.\"\"\""},{"line_number":28,"context_line":"    try:"},{"line_number":29,"context_line":"        ip \u003d netaddr.IPAddress(ip_address)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_9d160cf0","line":26,"range":{"start_line":26,"start_character":4,"end_line":26,"end_character":19},"updated":"2016-02-10 22:11:07.000000000","message":"As far as I can tell, all of the changes to this method are not relevant to this patch set.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        pass"},{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_a2ff27a9","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":12},"updated":"2016-02-10 22:11:07.000000000","message":"return False.  Don\u0027t get in the habit of \"pass\"ing exceptions if it can be avoided.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                and (net.version \u003d\u003d constants.IP_VERSION_6 or ip !\u003d net[-1])"},{"line_number":35,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"},{"line_number":36,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":37,"context_line":"        pass"},{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_17cc1f69","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":12},"in_reply_to":"3a57f1b5_a2ff27a9","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        pass"},{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.error(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"              {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_422d1345","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":12},"updated":"2016-02-10 22:11:07.000000000","message":"return False","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        pass"},{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.error(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"              {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_d7c5273c","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":12},"in_reply_to":"3a57f1b5_422d1345","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.error(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"              {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_2213370f","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":13},"updated":"2016-02-10 22:11:07.000000000","message":"This is not something to log (let alone as an error).  What action would the operator take for this?  It would just be seen as noise.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    except ValueError:"},{"line_number":39,"context_line":"        # netaddr.IPAddress would raise this"},{"line_number":40,"context_line":"        pass"},{"line_number":41,"context_line":"    LOG.error(_LE(\"Subnet IP validation failed for \""},{"line_number":42,"context_line":"                  \"arguments %(cidr)s, %(ip_address)s\"),"},{"line_number":43,"context_line":"              {\u0027cidr\u0027: cidr, \u0027ip_address\u0027: ip_address})"},{"line_number":44,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_97decf0f","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":13},"in_reply_to":"3a57f1b5_2213370f","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # Check whether the gw IP is in-valid on subnet."},{"line_number":52,"context_line":"    # Valid IP on the subnet cannot be the \u0027network\u0027 or the"},{"line_number":53,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":54,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":55,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":56,"context_line":"                (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_4290b343","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":43},"updated":"2016-02-10 22:11:07.000000000","message":"I think \"ip in net\" accomplishes this in a more readable way.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # Check whether the gw IP is in-valid on subnet."},{"line_number":52,"context_line":"    # Valid IP on the subnet cannot be the \u0027network\u0027 or the"},{"line_number":53,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":54,"context_line":"    return (net.netmask \u0026 ip \u003d\u003d net.network"},{"line_number":55,"context_line":"            and (ip \u003d\u003d net.network or"},{"line_number":56,"context_line":"                (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_b708ab92","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":43},"in_reply_to":"3a57f1b5_4290b343","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7575bb8ac49140f9d2c6ccac4127b5aafa1ac13f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_c28a63bf","line":62,"range":{"start_line":62,"start_character":32,"end_line":62,"end_character":44},"updated":"2016-02-10 22:11:07.000000000","message":"While this looks like a good change, it doesn\u0027t belong with this patch set.  It is off topic.","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"32cfc3b0b43930131ff5112165e43908da76033f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def check_gateway_in_subnet(cidr, gateway):"},{"line_number":60,"context_line":"    \"\"\"Validate that the gateway is on the subnet.\"\"\""},{"line_number":61,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":62,"context_line":"    if (ip.version \u003d\u003d constants.IP_VERSION_4 or"},{"line_number":63,"context_line":"        (ip.version \u003d\u003d constants.IP_VERSION_6 and not ip.is_link_local())):"},{"line_number":64,"context_line":"        return check_subnet_ip(cidr, gateway)"},{"line_number":65,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a57f1b5_b72f4bf5","line":62,"range":{"start_line":62,"start_character":32,"end_line":62,"end_character":44},"in_reply_to":"3a57f1b5_c28a63bf","updated":"2016-02-11 10:26:41.000000000","message":"Done","commit_id":"76a581965dad553ed6ef3fd777c8e2cad867eb59"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.common import constants"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_subnet_ip(cidr, ip_address):"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_db5aa2f1","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":3},"updated":"2016-02-17 17:52:05.000000000","message":"You\u0027re not using LOG.  Remove this.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.common import constants"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_subnet_ip(cidr, ip_address):"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_ba8cd7da","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":3},"in_reply_to":"dae33548_db5aa2f1","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_subnet_ip(cidr, ip_address):"},{"line_number":26,"context_line":"    \"\"\"Validate that the IP address is on the subnet.\"\"\""},{"line_number":27,"context_line":"    try:"},{"line_number":28,"context_line":"        ip \u003d netaddr.IPAddress(ip_address)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_7b5396e2","line":25,"range":{"start_line":25,"start_character":4,"end_line":25,"end_character":19},"updated":"2016-02-17 17:52:05.000000000","message":"Could you explain why you\u0027re changing this method?  As far as I can tell, all of the changes to this method are unnecessary in the context of this patch.\n\nIf these changes don\u0027t directly support the needs of this patch, please revert them.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def check_subnet_ip(cidr, ip_address):"},{"line_number":26,"context_line":"    \"\"\"Validate that the IP address is on the subnet.\"\"\""},{"line_number":27,"context_line":"    try:"},{"line_number":28,"context_line":"        ip \u003d netaddr.IPAddress(ip_address)"}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_5a466b7b","line":25,"range":{"start_line":25,"start_character":4,"end_line":25,"end_character":19},"in_reply_to":"dae33548_7b5396e2","updated":"2016-02-18 09:20:55.000000000","message":"Done. Reverted.","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2cdef881d32cb9387ce7dc919b78c278cb7bcb16","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":45,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":46,"context_line":"    # Check whether the gw IP is in-valid on subnet."},{"line_number":47,"context_line":"    # Valid IP on the subnet cannot be the \u0027network\u0027 or the"},{"line_number":48,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":49,"context_line":"    # If gateway is out of subnet, there is no way to check"},{"line_number":50,"context_line":"    # since we don\u0027t have the gateway\u0027s subnet cidr."}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_5b9a126f","line":47,"range":{"start_line":47,"start_character":5,"end_line":47,"end_character":28},"updated":"2016-02-17 17:52:05.000000000","message":"nit:  The following makes the language a little more consistent and, to me, makes it a little bit easier to understand.\n\nIf gateway is in the subnet, it cannot ...","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"c7eeb93795d99d501e74d6e3beb1436e8a498881","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":45,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":46,"context_line":"    # Check whether the gw IP is in-valid on subnet."},{"line_number":47,"context_line":"    # Valid IP on the subnet cannot be the \u0027network\u0027 or the"},{"line_number":48,"context_line":"    # \u0027broadcast address (which exists only in IPv4)\u0027"},{"line_number":49,"context_line":"    # If gateway is out of subnet, there is no way to check"},{"line_number":50,"context_line":"    # since we don\u0027t have the gateway\u0027s subnet cidr."}],"source_content_type":"text/x-python","patch_set":21,"id":"dae33548_ba28579b","line":47,"range":{"start_line":47,"start_character":5,"end_line":47,"end_character":28},"in_reply_to":"dae33548_5b9a126f","updated":"2016-02-18 09:20:55.000000000","message":"Done","commit_id":"cb1fa0888d80b3bc217beabc47344618adb4ff5a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"ccd3286f92405a790c6debf1770ee562541814b1","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"},{"line_number":32,"context_line":"    \"\"\"Validate that the gw IP address is valid on the subnet.\"\"\""},{"line_number":33,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":34,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":35,"context_line":"    # Check whether the gw IP is in-valid on subnet."}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_6838b7d3","line":32,"updated":"2016-02-18 13:26:28.000000000","message":"A nit on clarity. The method name (and code) suggests it is checking for invalid GW, but the docstring suggests it is checking if valid.\n\nThe word \"Validate\" implies (at least to me) that we are ensuring something is correct and not bad.\n\nConsider either changing the docstring to be less misleading, or (better still) the method name and reverse the logic so that the \"validator\" is checking for a successful condition.","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"68b3454f0e2686a54b2baad0197c3adeea29212b","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def check_gateway_invalid_in_subnet(cidr, gateway):"},{"line_number":32,"context_line":"    \"\"\"Validate that the gw IP address is valid on the subnet.\"\"\""},{"line_number":33,"context_line":"    ip \u003d netaddr.IPAddress(gateway)"},{"line_number":34,"context_line":"    net \u003d netaddr.IPNetwork(cidr)"},{"line_number":35,"context_line":"    # Check whether the gw IP is in-valid on subnet."}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_5e22a402","line":32,"in_reply_to":"dae33548_6838b7d3","updated":"2016-02-19 06:22:11.000000000","message":"Done. Corrected the docstring.","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"ccd3286f92405a790c6debf1770ee562541814b1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    # check since we don\u0027t have gateway\u0027s subnet cidr."},{"line_number":40,"context_line":"    return (ip in net and"},{"line_number":41,"context_line":"            (ip \u003d\u003d net.network or"},{"line_number":42,"context_line":"             (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def check_gateway_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_480b337d","line":42,"updated":"2016-02-18 13:26:28.000000000","message":"Do (should) we have a test case for when BCAST address and when network address?","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"68b3454f0e2686a54b2baad0197c3adeea29212b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    # check since we don\u0027t have gateway\u0027s subnet cidr."},{"line_number":40,"context_line":"    return (ip in net and"},{"line_number":41,"context_line":"            (ip \u003d\u003d net.network or"},{"line_number":42,"context_line":"             (net.version \u003d\u003d constants.IP_VERSION_4 and ip \u003d\u003d net[-1])))"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def check_gateway_in_subnet(cidr, gateway):"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_deca341a","line":42,"in_reply_to":"dae33548_480b337d","updated":"2016-02-19 06:22:11.000000000","message":"Certainly. Added unit tests to cover those corner cases  as well.","commit_id":"ae7cc39bb8de6c6339933303130640ce2913647b"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"bbddae55c1ccd62272f5508f2fa3e680e4aae2f8","unresolved":false,"context_lines":[{"line_number":3812,"context_line":"                ipv6_ra_mode\u003dra_mode,"},{"line_number":3813,"context_line":"                ipv6_address_mode\u003daddr_mode)"},{"line_number":3814,"context_line":""},{"line_number":3815,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_global_400(self):"},{"line_number":3816,"context_line":"        cfg.CONF.set_override(\u0027force_gateway_on_subnet\u0027, True)"},{"line_number":3817,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3818,"context_line":"        cidr \u003d \u00272001::/64\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_0069278b","line":3815,"updated":"2015-10-20 14:41:49.000000000","message":"nit: test_create_subnet_ipv6_out_of_cidr_global_returns_400","commit_id":"6143107b08222eb53d772db660c2e14e2c784b14"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d27b4b7d7d6397dbc80fe224ceb3abfa0fe1b147","unresolved":false,"context_lines":[{"line_number":3812,"context_line":"                ipv6_ra_mode\u003dra_mode,"},{"line_number":3813,"context_line":"                ipv6_address_mode\u003daddr_mode)"},{"line_number":3814,"context_line":""},{"line_number":3815,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_global_400(self):"},{"line_number":3816,"context_line":"        cfg.CONF.set_override(\u0027force_gateway_on_subnet\u0027, True)"},{"line_number":3817,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3818,"context_line":"        cidr \u003d \u00272001::/64\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_79851105","line":3815,"in_reply_to":"3a29b11f_0069278b","updated":"2015-10-21 08:55:41.000000000","message":"Done","commit_id":"6143107b08222eb53d772db660c2e14e2c784b14"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"bbddae55c1ccd62272f5508f2fa3e680e4aae2f8","unresolved":false,"context_lines":[{"line_number":3826,"context_line":"        self.assertEqual(ctx_manager.exception.code,"},{"line_number":3827,"context_line":"                         webob.exc.HTTPClientError.code)"},{"line_number":3828,"context_line":""},{"line_number":3829,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_global_201(self):"},{"line_number":3830,"context_line":"        cfg.CONF.set_override(\u0027force_gateway_on_subnet\u0027, False)"},{"line_number":3831,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3832,"context_line":"        cidr \u003d \u00272001::/64\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_c009efde","line":3829,"updated":"2015-10-20 14:41:49.000000000","message":"nit: returns","commit_id":"6143107b08222eb53d772db660c2e14e2c784b14"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"d27b4b7d7d6397dbc80fe224ceb3abfa0fe1b147","unresolved":false,"context_lines":[{"line_number":3826,"context_line":"        self.assertEqual(ctx_manager.exception.code,"},{"line_number":3827,"context_line":"                         webob.exc.HTTPClientError.code)"},{"line_number":3828,"context_line":""},{"line_number":3829,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_global_201(self):"},{"line_number":3830,"context_line":"        cfg.CONF.set_override(\u0027force_gateway_on_subnet\u0027, False)"},{"line_number":3831,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3832,"context_line":"        cidr \u003d \u00272001::/64\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_d9746537","line":3829,"in_reply_to":"3a29b11f_c009efde","updated":"2015-10-21 08:55:41.000000000","message":"Done","commit_id":"6143107b08222eb53d772db660c2e14e2c784b14"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":3820,"context_line":"        with testlib_api.ExpectedException("},{"line_number":3821,"context_line":"            webob.exc.HTTPClientError) as ctx_manager:"},{"line_number":3822,"context_line":"            self._test_create_subnet("},{"line_number":3823,"context_line":"                gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3824,"context_line":"                ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3825,"context_line":"                ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3826,"context_line":"        self.assertEqual(ctx_manager.exception.code,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_4e7180df","line":3823,"updated":"2015-10-30 18:01:35.000000000","message":"Constant here should also be added","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":3820,"context_line":"        with testlib_api.ExpectedException("},{"line_number":3821,"context_line":"            webob.exc.HTTPClientError) as ctx_manager:"},{"line_number":3822,"context_line":"            self._test_create_subnet("},{"line_number":3823,"context_line":"                gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3824,"context_line":"                ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3825,"context_line":"                ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3826,"context_line":"        self.assertEqual(ctx_manager.exception.code,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_d000a668","line":3823,"in_reply_to":"1a26ad4f_4e7180df","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":3831,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3832,"context_line":"        cidr \u003d \u00272001::/64\u0027"},{"line_number":3833,"context_line":"        self._test_create_subnet("},{"line_number":3834,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3835,"context_line":"            ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3836,"context_line":"            ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3837,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_cef8304c","line":3834,"updated":"2015-10-30 18:01:35.000000000","message":"Constant","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":3831,"context_line":"        gateway_ip \u003d \u00272000::1\u0027"},{"line_number":3832,"context_line":"        cidr \u003d \u00272001::/64\u0027"},{"line_number":3833,"context_line":"        self._test_create_subnet("},{"line_number":3834,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3835,"context_line":"            ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3836,"context_line":"            ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3837,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_90f78e8a","line":3834,"in_reply_to":"1a26ad4f_cef8304c","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"c0ff4db2b959571a8db86b8a40334094775aaf87","unresolved":false,"context_lines":[{"line_number":3840,"context_line":"        cidr \u003d \u00272001::/64\u0027"},{"line_number":3841,"context_line":""},{"line_number":3842,"context_line":"        self._test_create_subnet("},{"line_number":3843,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3844,"context_line":"            ipv6_ra_mode\u003dconstants.IPV6_SLAAC,"},{"line_number":3845,"context_line":"            ipv6_address_mode\u003dconstants.IPV6_SLAAC)"},{"line_number":3846,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_0e74e8cc","line":3843,"updated":"2015-10-30 18:01:35.000000000","message":"Constant","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"5d728c22255c6f4bc21a37147ee98ca3b5329f65","unresolved":false,"context_lines":[{"line_number":3840,"context_line":"        cidr \u003d \u00272001::/64\u0027"},{"line_number":3841,"context_line":""},{"line_number":3842,"context_line":"        self._test_create_subnet("},{"line_number":3843,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr, ip_version\u003d6,"},{"line_number":3844,"context_line":"            ipv6_ra_mode\u003dconstants.IPV6_SLAAC,"},{"line_number":3845,"context_line":"            ipv6_address_mode\u003dconstants.IPV6_SLAAC)"},{"line_number":3846,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_903eae26","line":3843,"in_reply_to":"1a26ad4f_0e74e8cc","updated":"2015-11-02 15:14:38.000000000","message":"Done","commit_id":"229a5e619a306da48d062d037b34501b793a70f7"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"5faf3c7e5955ea2eacc7b21ef446cea582042374","unresolved":false,"context_lines":[{"line_number":3843,"context_line":""},{"line_number":3844,"context_line":"        self._test_create_subnet("},{"line_number":3845,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr,"},{"line_number":3846,"context_line":"            ip_version\u003dconstants.IP_VERSION_6,"},{"line_number":3847,"context_line":"            ipv6_ra_mode\u003dconstants.IPV6_SLAAC,"},{"line_number":3848,"context_line":"            ipv6_address_mode\u003dconstants.IPV6_SLAAC)"},{"line_number":3849,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_bbadcb85","line":3846,"updated":"2015-11-02 15:33:15.000000000","message":"Could you mention this change in your commit message?  Or else this could possibly be a subsequent patch?","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"702c25ff0b6349cedf7669af61161d8287c16d6e","unresolved":false,"context_lines":[{"line_number":3843,"context_line":""},{"line_number":3844,"context_line":"        self._test_create_subnet("},{"line_number":3845,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr,"},{"line_number":3846,"context_line":"            ip_version\u003dconstants.IP_VERSION_6,"},{"line_number":3847,"context_line":"            ipv6_ra_mode\u003dconstants.IPV6_SLAAC,"},{"line_number":3848,"context_line":"            ipv6_address_mode\u003dconstants.IPV6_SLAAC)"},{"line_number":3849,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_c5c3f387","line":3846,"in_reply_to":"1a26ad4f_bbadcb85","updated":"2015-11-03 04:34:07.000000000","message":"Done. Reverted","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"7885b7c0a070f470936fc5cc5c38130219de18df","unresolved":false,"context_lines":[{"line_number":3843,"context_line":""},{"line_number":3844,"context_line":"        self._test_create_subnet("},{"line_number":3845,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr,"},{"line_number":3846,"context_line":"            ip_version\u003dconstants.IP_VERSION_6,"},{"line_number":3847,"context_line":"            ipv6_ra_mode\u003dconstants.IPV6_SLAAC,"},{"line_number":3848,"context_line":"            ipv6_address_mode\u003dconstants.IPV6_SLAAC)"},{"line_number":3849,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_b606421a","line":3846,"in_reply_to":"1a26ad4f_bbadcb85","updated":"2015-11-02 15:46:21.000000000","message":"I modified this based on a prior review comment. I can either revert it or mention this in commit message. Your preference?","commit_id":"8c0057f73c64e1808ae36c14d056e7457d265bd1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5ed39c56dfc461eea86789a0e378b60c0d8d34e0","unresolved":false,"context_lines":[{"line_number":3835,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr,"},{"line_number":3836,"context_line":"            ip_version\u003dconstants.IP_VERSION_6,"},{"line_number":3837,"context_line":"            ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3838,"context_line":"            ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3839,"context_line":""},{"line_number":3840,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_lla(self):"},{"line_number":3841,"context_line":"        gateway_ip \u003d \u0027fe80::1\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_d0481e5e","line":3838,"updated":"2015-11-09 06:50:23.000000000","message":"-1: with expected\u003dwebob.exc.HTTPCreated.code ?","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"0085280521c35f5c74df1f0b9c1327c34fbc542a","unresolved":false,"context_lines":[{"line_number":3835,"context_line":"            gateway_ip\u003dgateway_ip, cidr\u003dcidr,"},{"line_number":3836,"context_line":"            ip_version\u003dconstants.IP_VERSION_6,"},{"line_number":3837,"context_line":"            ipv6_ra_mode\u003dconstants.DHCPV6_STATEFUL,"},{"line_number":3838,"context_line":"            ipv6_address_mode\u003dconstants.DHCPV6_STATEFUL)"},{"line_number":3839,"context_line":""},{"line_number":3840,"context_line":"    def test_create_subnet_ipv6_out_of_cidr_lla(self):"},{"line_number":3841,"context_line":"        gateway_ip \u003d \u0027fe80::1\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_8e74989c","line":3838,"in_reply_to":"da85f559_d0481e5e","updated":"2015-11-09 16:23:21.000000000","message":"Understood the problem. Test modified to assert check. Function name is modified.","commit_id":"2b5a45fea8edd78c9896f0c6334894b30d5190f4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c96843105c83f37ceb1bd12c7f7a5a6dc5e07c8d","unresolved":false,"context_lines":[{"line_number":4064,"context_line":"                req \u003d self.new_update_request(\u0027subnets\u0027, data,"},{"line_number":4065,"context_line":"                                              subnet[\u0027subnet\u0027][\u0027id\u0027])"},{"line_number":4066,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":4067,"context_line":"                self.assertEqual(res.status_int,"},{"line_number":4068,"context_line":"                                 webob.exc.HTTPOk.code)"},{"line_number":4069,"context_line":""},{"line_number":4070,"context_line":"    def test_update_subnet_gw_ip_in_use_returns_409(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da85f559_06b5b1ec","line":4067,"updated":"2015-11-10 17:17:37.000000000","message":"nit: Assert should be (expected, actual) for args.","commit_id":"379c6c0ae1bb3eff337ad47c284d6d348baaf8bd"},{"author":{"_account_id":18289,"name":"Sreekumar S","email":"sreesiv@gmail.com","username":"sreesiv"},"change_message_id":"1917d041088d6c4410a97f8ec62102c662e09875","unresolved":false,"context_lines":[{"line_number":4064,"context_line":"                req \u003d self.new_update_request(\u0027subnets\u0027, data,"},{"line_number":4065,"context_line":"                                              subnet[\u0027subnet\u0027][\u0027id\u0027])"},{"line_number":4066,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":4067,"context_line":"                self.assertEqual(res.status_int,"},{"line_number":4068,"context_line":"                                 webob.exc.HTTPOk.code)"},{"line_number":4069,"context_line":""},{"line_number":4070,"context_line":"    def test_update_subnet_gw_ip_in_use_returns_409(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5e6da02f","line":4067,"in_reply_to":"da85f559_06b5b1ec","updated":"2015-11-18 18:46:11.000000000","message":"Done","commit_id":"379c6c0ae1bb3eff337ad47c284d6d348baaf8bd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"860337edffe033828d73bbe2e4364177b6734b81","unresolved":false,"context_lines":[{"line_number":3614,"context_line":"                                webob.exc.HTTPCreated.code,"},{"line_number":3615,"context_line":"                                gateway_ip\u003d\u0027100.0.0.1\u0027)"},{"line_number":3616,"context_line":""},{"line_number":3617,"context_line":"    def test_create_subnet_gw_is_nw_addr_returns_400(self):"},{"line_number":3618,"context_line":"        cfg.CONF.set_override(\u0027force_gateway_on_subnet\u0027, False)"},{"line_number":3619,"context_line":"        with self.network() as network:"},{"line_number":3620,"context_line":"            self._create_subnet(self.fmt,"}],"source_content_type":"text/x-python","patch_set":23,"id":"bae84128_7b8691ba","line":3617,"range":{"start_line":3617,"start_character":33,"end_line":3617,"end_character":35},"updated":"2016-02-19 14:17:51.000000000","message":"nit: could spell out network","commit_id":"b6126bc0f17f348ff6303b9bd6041cb018479ef9"}]}
