)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f592e8b85844a9b45121ef8afe904e39dc3415b7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"code, it will be replaced with subnet_id, and it will confuse"},{"line_number":12,"context_line":"users"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: 1719494"},{"line_number":15,"context_line":"Change-Id: Ib14bb31af0e78378123cc64084c613f0caced912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f515b1d_5807d183","line":14,"updated":"2017-09-26 08:53:56.000000000","message":"This needs APIImpact and a release note. This changes the way that the API behaves","commit_id":"1757c654cf10d692547ca6fd8b41031bf4226cae"},{"author":{"_account_id":19956,"name":"Yang Li","email":"yang.li@easystack.cn","username":"leonstack"},"change_message_id":"472e22a469607ce1b881e3b7fab9cad309171f55","unresolved":false,"context_lines":[{"line_number":11,"context_line":"code, it will be replaced with subnet_id, and it will confuse"},{"line_number":12,"context_line":"users"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: 1719494"},{"line_number":15,"context_line":"Change-Id: Ib14bb31af0e78378123cc64084c613f0caced912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f515b1d_3cb62940","line":14,"in_reply_to":"7f515b1d_5807d183","updated":"2017-09-27 02:46:26.000000000","message":"thanks for your mention, I will add these information","commit_id":"1757c654cf10d692547ca6fd8b41031bf4226cae"}],"neutron/db/l3_db.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a4c3b4124ce6f7f0bf2c2cacecb403dd32f81426","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                \u0027status\u0027: constants.PORT_STATUS_NOTAPPLICABLE,"},{"line_number":1258,"context_line":"                \u0027name\u0027: \u0027\u0027}"},{"line_number":1259,"context_line":"        if fip.get(\u0027floating_ip_address\u0027) or fip.get(\u0027subnet_id\u0027):"},{"line_number":1260,"context_line":"            fip_info \u003d dict()"},{"line_number":1261,"context_line":"            if fip.get(\u0027floating_ip_address\u0027):"},{"line_number":1262,"context_line":"                fip_info.update({\u0027ip_address\u0027: fip[\u0027floating_ip_address\u0027]})"},{"line_number":1263,"context_line":"            if fip.get(\u0027subnet_id\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_ae05a97c","line":1260,"updated":"2017-09-22 11:42:44.000000000","message":"Don\u0027t we have to check whether if user provided IP address, that one is well in the subnet range?\n\n  I think we should have something like:\n\n  fip_info \u003d {}\n  if fip.get(\u0027subnet_id\u0027):\n    # User provided subnet_id\n    fip_info[\u0027subnet_id\u0027] \u003d fip.get(\u0027subnet_id\u0027)\n  if fip.get(\u0027floating_ip_address\u0027):\n    # User specified ip address\n    if \u0027subnet_id\u0027 in fip_info:\n      # Checks whether the IP provided is good or raise an exception\n     fip_info[\u0027ip_address\u0027] \u003d fip[\u0027floating_ip_address\u0027]\n  if fip_info:\n    port[\u0027fixed_ips\u0027] \u003d [fip_info]","commit_id":"782c32eca07b665053759cc4b1f48a83ff6f06f4"},{"author":{"_account_id":19956,"name":"Yang Li","email":"yang.li@easystack.cn","username":"leonstack"},"change_message_id":"81b42dc6b0cc05844e48e6aee7a3d4cfc8ca2ad9","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                \u0027status\u0027: constants.PORT_STATUS_NOTAPPLICABLE,"},{"line_number":1258,"context_line":"                \u0027name\u0027: \u0027\u0027}"},{"line_number":1259,"context_line":"        if fip.get(\u0027floating_ip_address\u0027) or fip.get(\u0027subnet_id\u0027):"},{"line_number":1260,"context_line":"            fip_info \u003d dict()"},{"line_number":1261,"context_line":"            if fip.get(\u0027floating_ip_address\u0027):"},{"line_number":1262,"context_line":"                fip_info.update({\u0027ip_address\u0027: fip[\u0027floating_ip_address\u0027]})"},{"line_number":1263,"context_line":"            if fip.get(\u0027subnet_id\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_c917bfed","line":1260,"in_reply_to":"7f515b1d_ae05a97c","updated":"2017-09-22 12:04:11.000000000","message":"Thanks for your suggestion  :)\nactually I have tested this case, if the IP is not in subnet cidr, it will raise an exception to user(IP address  xx.xx.xx.xx is not a valid ip for the specified subnet), so I think there is no need to deal with this exception here, the exception in create_port will take care of it :)","commit_id":"782c32eca07b665053759cc4b1f48a83ff6f06f4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"05e61939ce541b6417e35be8cdcd4f28bfe97796","unresolved":false,"context_lines":[{"line_number":1256,"context_line":"                \u0027device_owner\u0027: DEVICE_OWNER_FLOATINGIP,"},{"line_number":1257,"context_line":"                \u0027status\u0027: constants.PORT_STATUS_NOTAPPLICABLE,"},{"line_number":1258,"context_line":"                \u0027name\u0027: \u0027\u0027}"},{"line_number":1259,"context_line":"        if fip.get(\u0027floating_ip_address\u0027) or fip.get(\u0027subnet_id\u0027):"},{"line_number":1260,"context_line":"            fip_info \u003d dict()"},{"line_number":1261,"context_line":"            if fip.get(\u0027floating_ip_address\u0027):"},{"line_number":1262,"context_line":"                fip_info.update({\u0027ip_address\u0027: fip[\u0027floating_ip_address\u0027]})"},{"line_number":1263,"context_line":"            if fip.get(\u0027subnet_id\u0027):"},{"line_number":1264,"context_line":"                fip_info.update({\u0027subnet_id\u0027: fip[\u0027subnet_id\u0027]})"},{"line_number":1265,"context_line":"            port[\u0027fixed_ips\u0027] \u003d [fip_info]"},{"line_number":1266,"context_line":""},{"line_number":1267,"context_line":"        # \u0027status\u0027 in port dict could not be updated by default, use"},{"line_number":1268,"context_line":"        # check_allow_post to stop the verification of system"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_b105e2c4","line":1265,"range":{"start_line":1259,"start_character":8,"end_line":1265,"end_character":42},"updated":"2017-09-25 13:04:17.000000000","message":"I think this could be done easier, there is no need for the first condition check:\n\nfip_info \u003d {}\nif fip.get(\u0027floating_ip_address\u0027):\n    fip_info[\u0027ip_address\u0027] \u003d fip[\u0027floating_ip_address\u0027]\nif fip.get(\u0027subnet_id\u0027):\n    fip_info[\u0027subnet_id\u0027] \u003d fip[\u0027subnet_id\u0027]\nif fip_info:\n    port[\u0027fixed_ips\u0027] \u003d [fip_info]","commit_id":"28aa8dbf5fc752a1a2f0332bf5d94b037a58037e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f592e8b85844a9b45121ef8afe904e39dc3415b7","unresolved":false,"context_lines":[{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"        if fip_info:"},{"line_number":1267,"context_line":"            port[\u0027fixed_ips\u0027] \u003d [fip_info]"},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"        # \u0027status\u0027 in port dict could not be updated by default, use"},{"line_number":1270,"context_line":"        # check_allow_post to stop the verification of system"},{"line_number":1271,"context_line":"        external_port \u003d p_utils.create_port(self._core_plugin,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_78ef2db0","line":1268,"updated":"2017-09-26 08:53:56.000000000","message":"the previous solution would give the subnet-id precedence.","commit_id":"1757c654cf10d692547ca6fd8b41031bf4226cae"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e3d09ab755f177771c594581ab6c0adfcab810e6","unresolved":false,"context_lines":[{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"        if fip_info:"},{"line_number":1267,"context_line":"            port[\u0027fixed_ips\u0027] \u003d [fip_info]"},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"        # \u0027status\u0027 in port dict could not be updated by default, use"},{"line_number":1270,"context_line":"        # check_allow_post to stop the verification of system"},{"line_number":1271,"context_line":"        external_port \u003d p_utils.create_port(self._core_plugin,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_929d575b","line":1268,"in_reply_to":"7f515b1d_19eedfb3","updated":"2018-08-06 15:48:34.000000000","message":"I know this is an old review, but the issue it addresses has been noticed again.\n\nAs far as API impact, I guess it\u0027s ok since passing invalid data - fixed IP and subnet but fixed IP not in the subnet - is covered in the API:\n\nThe operation returns the Bad Request (400) response code for one of reasons:\n\n        The network is not external, such as router:external\u003dFalse.\n        The internal OpenStack Networking port is not associated with the floating IP address.\n        The requested floating IP address does not fall in the subnet range for the external network.\n        The fixed IP address is not valid.","commit_id":"1757c654cf10d692547ca6fd8b41031bf4226cae"},{"author":{"_account_id":19956,"name":"Yang Li","email":"yang.li@easystack.cn","username":"leonstack"},"change_message_id":"be21e11bb6af879642ea29eede2222c1604aa1fa","unresolved":false,"context_lines":[{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"        if fip_info:"},{"line_number":1267,"context_line":"            port[\u0027fixed_ips\u0027] \u003d [fip_info]"},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"        # \u0027status\u0027 in port dict could not be updated by default, use"},{"line_number":1270,"context_line":"        # check_allow_post to stop the verification of system"},{"line_number":1271,"context_line":"        external_port \u003d p_utils.create_port(self._core_plugin,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_19eedfb3","line":1268,"in_reply_to":"7f515b1d_78ef2db0","updated":"2017-09-27 02:22:27.000000000","message":"But it will confuse users which the allocated ip is not the ip specified, so I think the original way is a bug.","commit_id":"1757c654cf10d692547ca6fd8b41031bf4226cae"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"1b01b178ea2fd68bc6fc7fcbded10495c10d8429","unresolved":false,"context_lines":[{"line_number":3071,"context_line":"                                       floating_ip\u003d\u002710.0.0.10\u0027,"},{"line_number":3072,"context_line":"                                       subnet_id\u003ds[\u0027subnet\u0027][\u0027id\u0027])"},{"line_number":3073,"context_line":"            self.assertEqual(\u002710.0.0.10\u0027,"},{"line_number":3074,"context_line":"                             fp[\u0027floatingip\u0027][\u0027floating_ip_address\u0027])"},{"line_number":3075,"context_line":""},{"line_number":3076,"context_line":"    def test_create_floatingip_with_specific_ip_non_admin(self):"},{"line_number":3077,"context_line":"        ctx \u003d context.Context(\u0027user_id\u0027, \u0027tenant_id\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_3d89c3c9","line":3074,"updated":"2017-09-25 14:57:09.000000000","message":"Think you should verify subnet_id here as well since that\u0027s what the change did.","commit_id":"28aa8dbf5fc752a1a2f0332bf5d94b037a58037e"},{"author":{"_account_id":19956,"name":"Yang Li","email":"yang.li@easystack.cn","username":"leonstack"},"change_message_id":"8264c52586a6f190ee3f9cfeba742815337ab721","unresolved":false,"context_lines":[{"line_number":3071,"context_line":"                                       floating_ip\u003d\u002710.0.0.10\u0027,"},{"line_number":3072,"context_line":"                                       subnet_id\u003ds[\u0027subnet\u0027][\u0027id\u0027])"},{"line_number":3073,"context_line":"            self.assertEqual(\u002710.0.0.10\u0027,"},{"line_number":3074,"context_line":"                             fp[\u0027floatingip\u0027][\u0027floating_ip_address\u0027])"},{"line_number":3075,"context_line":""},{"line_number":3076,"context_line":"    def test_create_floatingip_with_specific_ip_non_admin(self):"},{"line_number":3077,"context_line":"        ctx \u003d context.Context(\u0027user_id\u0027, \u0027tenant_id\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_e676e506","line":3074,"in_reply_to":"7f515b1d_3d89c3c9","updated":"2017-09-26 02:26:42.000000000","message":"the fp infomation doesn\u0027t contain subnet, so this function cannot verify the subnet id, but I can add another test case:\nwith subnet and fip specified, the ip must in the subnet range","commit_id":"28aa8dbf5fc752a1a2f0332bf5d94b037a58037e"}]}
