)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3582849f134f7e78031e70dce37008c65ef1f272","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     ZhaoBo \u003czhaobo6@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-04-13 20:50:32 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[2]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f6a8fd7_10e475e0","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":30},"updated":"2018-04-20 09:39:11.000000000","message":"I think the neutron-server side (this) patch, should be the first one, and the l3 agent side patch depends on this.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     ZhaoBo \u003czhaobo6@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-04-13 20:50:32 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[2]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f6a8fd7_c76b8f1b","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":30},"in_reply_to":"9f6a8fd7_10e475e0","updated":"2018-04-21 07:17:41.000000000","message":"OK, thanks. Will change them.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     ZhaoBo \u003czhaobo6@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-05-15 11:41:54 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_95b6ee89","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":40},"updated":"2018-05-15 07:40:40.000000000","message":"What about \"Neutron server side floating IP port forwarding\" ?","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     ZhaoBo \u003czhaobo6@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-05-15 11:41:54 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_daa6ce0f","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":40},"in_reply_to":"5f7c97a3_95b6ee89","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_75af9229","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":25},"updated":"2018-05-15 07:40:40.000000000","message":"s/implements","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_7ab1ba46","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":25},"in_reply_to":"5f7c97a3_75af9229","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_f0e2d0d4","line":10,"updated":"2018-05-15 07:40:40.000000000","message":"Add a brief description for what API was changed? What plugin was introduced? That will help people review this patch.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":7,"context_line":"FIP port forwarding support[server_side]"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_9aacd6ed","line":10,"in_reply_to":"5f7c97a3_f0e2d0d4","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":15,"context_line":"Partial-Bug: #1491317"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_357a7ab9","line":12,"range":{"start_line":11,"start_character":0,"end_line":12,"end_character":78},"updated":"2018-05-15 07:40:40.000000000","message":"Try to add this line `Implements blueprint:  port-forwarding`,\nthen you can put such spec link to the LP whiteboard.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will implement the plugin and db layer code."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch partially implements the following spec:"},{"line_number":12,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":15,"context_line":"Partial-Bug: #1491317"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_3a902295","line":12,"range":{"start_line":11,"start_character":0,"end_line":12,"end_character":78},"in_reply_to":"5f7c97a3_357a7ab9","updated":"2018-05-15 09:13:30.000000000","message":"Thanks, but I think the whiteboard will trace the patches based on the topic name. :)","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"40c7ba0cf67e924f410691ac027d35cbf89db902","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":19,"context_line":"Partial-Bug: #1491317"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5f7c97a3_beb6383e","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":78},"updated":"2018-05-17 02:48:58.000000000","message":"This return 404.\nIt is in `queens` path.","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"95451d610f8ee7afe1a6b4a91a30387277799cee","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":19,"context_line":"Partial-Bug: #1491317"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5f7c97a3_7eee608c","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":78},"in_reply_to":"5f7c97a3_beb6383e","updated":"2018-05-17 03:32:37.000000000","message":"Done","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Neutron server side Floating IP port forwarding"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the plugin and db layer code."},{"line_number":10,"context_line":"This patch introduce a new service plugin for port forwarding resources,"},{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and support create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_496eb500","line":10,"range":{"start_line":10,"start_character":11,"end_line":10,"end_character":20},"updated":"2018-05-28 23:38:35.000000000","message":"introduces","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Neutron server side Floating IP port forwarding"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the plugin and db layer code."},{"line_number":10,"context_line":"This patch introduce a new service plugin for port forwarding resources,"},{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and support create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_ac46774f","line":10,"range":{"start_line":10,"start_character":11,"end_line":10,"end_character":20},"in_reply_to":"5f7c97a3_496eb500","updated":"2018-05-29 02:08:40.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the plugin and db layer code."},{"line_number":10,"context_line":"This patch introduce a new service plugin for port forwarding resources,"},{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and support create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_e976a1d8","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":30},"updated":"2018-05-28 23:38:35.000000000","message":"supports","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch implements the plugin and db layer code."},{"line_number":10,"context_line":"This patch introduce a new service plugin for port forwarding resources,"},{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and support create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_6c761fa7","line":11,"range":{"start_line":11,"start_character":23,"end_line":11,"end_character":30},"in_reply_to":"5f7c97a3_e976a1d8","updated":"2018-05-29 02:08:40.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"9526a912f73e67ab84a9caad37ce8e77dc070130","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":19,"context_line":"Partial-Bug: #1491317"},{"line_number":20,"context_line":"Change-Id: If24e1b3161e2a86ccc5cc21acf05d0a17f6856e7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_61d8461d","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":7},"updated":"2018-05-30 17:36:19.000000000","message":"Nit: it looks this patch doesn\u0027t depend on the neutron-lib\u0027s patch anymore.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"8a59fb97b57370521e1e7af2e3f8cb684eae57b3","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: https://review.openstack.org/#/c/535638/"},{"line_number":19,"context_line":"Partial-Bug: #1491317"},{"line_number":20,"context_line":"Change-Id: If24e1b3161e2a86ccc5cc21acf05d0a17f6856e7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"5f7c97a3_a570a141","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":7},"in_reply_to":"5f7c97a3_61d8461d","updated":"2018-05-31 02:00:48.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"312c08f76d78a319a25184d927a28b5cc960927c","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Partial-Bug: #1491317"},{"line_number":19,"context_line":"Change-Id: If24e1b3161e2a86ccc5cc21acf05d0a17f6856e7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5f7c97a3_8f164049","line":16,"updated":"2018-06-07 20:27:54.000000000","message":"I guess you might want to update the policy.json file (https://github.com/openstack/neutron/blob/master/etc/policy.json) for defining default rules for the new API endpoints?","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"adc7c9189f9f1c48b62196bb306a9201a9eaf439","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Partial-Bug: #1491317"},{"line_number":19,"context_line":"Change-Id: If24e1b3161e2a86ccc5cc21acf05d0a17f6856e7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5f7c97a3_3a56e22b","line":16,"in_reply_to":"5f7c97a3_232aa47d","updated":"2018-06-14 06:43:05.000000000","message":"Hmm, I revonsider whether we need the policy. As this function is based on floatingip, so the fip owner and the admin can operate the port forwardings,","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"bd6c695f52b74289c03f7a2b9fc983953646bda5","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Partial-Bug: #1491317"},{"line_number":19,"context_line":"Change-Id: If24e1b3161e2a86ccc5cc21acf05d0a17f6856e7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5f7c97a3_232aa47d","line":16,"in_reply_to":"5f7c97a3_8f164049","updated":"2018-06-08 02:03:11.000000000","message":"The operation priorites of port forwardings should be the same with the associated fip resource. Not deep into it yet..","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and supports create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5f7c97a3_7bc88e74","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":11},"updated":"2018-06-28 22:19:37.000000000","message":"Partially-Implements:","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":11,"context_line":"named \u0027pf_plugin\u0027, and supports create/update/delete port forwarding"},{"line_number":12,"context_line":"operation towards a free Floating IP."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint port-forwarding"},{"line_number":15,"context_line":"This patch partially implements the following spec:"},{"line_number":16,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5f7c97a3_16329110","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":11},"in_reply_to":"5f7c97a3_7bc88e74","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dd422b51753fcc5f1b52c8f294267f73b66dcc43","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Such as:"},{"line_number":11,"context_line":"* Introduces a new OVO named \u0027PortForwarding\u0027."},{"line_number":12,"context_line":"* Introduces a new db model for OVO."},{"line_number":13,"context_line":"* A miration db script for port forwarding function."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially-Implements: blueprint port-forwarding"},{"line_number":16,"context_line":"This patch partially implements the following spec:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"5f7c97a3_87337bf7","line":13,"range":{"start_line":13,"start_character":4,"end_line":13,"end_character":12},"updated":"2018-07-03 22:44:10.000000000","message":"migration","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"5ba9ca1ebad523a46842bac4a3e8e590a4cb6ddf","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Such as:"},{"line_number":11,"context_line":"* Introduces a new OVO named \u0027PortForwarding\u0027."},{"line_number":12,"context_line":"* Introduces a new db model for OVO."},{"line_number":13,"context_line":"* A miration db script for port forwarding function."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially-Implements: blueprint port-forwarding"},{"line_number":16,"context_line":"This patch partially implements the following spec:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"5f7c97a3_2ea27b40","line":13,"range":{"start_line":13,"start_character":4,"end_line":13,"end_character":12},"in_reply_to":"5f7c97a3_87337bf7","updated":"2018-07-04 02:55:35.000000000","message":"Done","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"94780e7e2ae9ebf5dd4c8a2796279ae6a3374dd3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"* A migration db script for port forwarding function."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially-Implements: blueprint port-forwarding"},{"line_number":16,"context_line":"This patch partially implements the following spec:"},{"line_number":17,"context_line":"https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"The race issue fix in:"},{"line_number":20,"context_line":"https://review.openstack.org/#/c/574673/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"5f7c97a3_bdd9b528","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":84},"updated":"2018-07-18 14:28:29.000000000","message":"nit: I still consider that this two lines are duplicated to the Line 15.","commit_id":"5bd6281f9cf2362cd2964b2e7c2e7cbc479d9461"}],"etc/policy.json":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"58d0f6c8ba2abe6c4f99bc247ffdad040a8159b9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    \"shared_address_scopes\": \"field:address_scopes:shared\u003dTrue\","},{"line_number":14,"context_line":"    \"external\": \"field:networks:router:external\u003dTrue\","},{"line_number":15,"context_line":"    \"default\": \"rule:admin_or_owner\","},{"line_number":16,"context_line":"    \"admin_or_floatingip_owner\": \"rule:context_is_admin or tenant_id:%(floatingip:tenant_id)s\","},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    \"create_subnet\": \"rule:admin_or_network_owner\","},{"line_number":19,"context_line":"    \"create_subnet:segment_id\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":22,"id":"5f7c97a3_d1f08c69","line":16,"range":{"start_line":16,"start_character":5,"end_line":16,"end_character":30},"updated":"2018-06-18 21:01:09.000000000","message":"Suppose a user tries to do the following:\n\n* Create a port forwarding in tenant A\n* Based on a floating IP in tenant B.\n\nSuppose the user is not an admin, he/she is a member of tenant A, not a member of tenant B. Then, in this case, based on this set of policy rules, the user will get a 403 response. Is it correct?\n\nHowever, it seems the convention is to give a 404 response in this case. At least, this is the case for listing subports of a trunk that doesn\u0027t belong to current tenant.\n\nMost importantly, I think there might be a security implication of the current design. It allows users to query the existent of a floating IP in other tenants since an existing floating IP will give a 403 response and non-existing floating IP will give a 404 response.","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"2b85788da1cd79f5d884a836b421ad15bf4dc439","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    \"shared_address_scopes\": \"field:address_scopes:shared\u003dTrue\","},{"line_number":14,"context_line":"    \"external\": \"field:networks:router:external\u003dTrue\","},{"line_number":15,"context_line":"    \"default\": \"rule:admin_or_owner\","},{"line_number":16,"context_line":"    \"admin_or_floatingip_owner\": \"rule:context_is_admin or tenant_id:%(floatingip:tenant_id)s\","},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    \"create_subnet\": \"rule:admin_or_network_owner\","},{"line_number":19,"context_line":"    \"create_subnet:segment_id\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":22,"id":"5f7c97a3_3c7bd029","line":16,"range":{"start_line":16,"start_character":5,"end_line":16,"end_character":30},"in_reply_to":"5f7c97a3_d1f08c69","updated":"2018-06-19 03:29:14.000000000","message":"\u003e Suppose a user tries to do the following:\n \u003e \n \u003e * Create a port forwarding in tenant A\n \u003e * Based on a floating IP in tenant B.\n \u003e \n \u003e Suppose the user is not an admin, he/she is a member of tenant A,\n \u003e not a member of tenant B. Then, in this case, based on this set of\n \u003e policy rules, the user will get a 403 response. Is it correct?\n \u003e \n \u003e However, it seems the convention is to give a 404 response in this\n \u003e case. At least, this is the case for listing subports of a trunk\n \u003e that doesn\u0027t belong to current tenant.\n \u003e \n \u003e Most importantly, I think there might be a security implication of\n \u003e the current design. It allows users to query the existent of a\n \u003e floating IP in other tenants since an existing floating IP will\n \u003e give a 403 response and non-existing floating IP will give a 404\n \u003e response.\n\nsuppose 1)\n \u003e * Create a port forwarding in tenant A\n \u003e * Based on a floating IP in tenant B.\nFor this operation, the user must be a admin user. The admin user must could see the resources from both tenants, such as, the floatingip of tenant B, the internal neutron port of tenant A.\n\nsuppose 2)\n \u003e Suppose the user is not an admin, he/she is a member of tenant A,\n \u003e not a member of tenant B. Then, in this case, based on this set of\n \u003e policy rules, the user will get a 403 response. Is it correct?\nThe user is from tenant A, user want to create a port forwarding, that\u0027s contradictory, if the user is NOT a admin, how can he/she get the floatingip_id which is owned by tenant B during REST requests?\n\nOK, if there is a admin had created a port forwarding for tenant A based on the tenant B\u0027s floatingip. Then there is a user from tenant A, which is not a admin, want to GET/PUT/DELETE the port forwarding which created by the admin but the floatingip owner is tenant B, \"That\u0027s why I said that the port forwarding owner must be the same with floatingip owner, we didn\u0027t intro a project_id into port forwarding for forbiding the complex policy cases\", in this case, the port forwarding should be owned by tenant B(floatingip owner), the non-admin user from tenant B can list the port forwardings by the floatingip. The user from tenant A can not know/see the floatingip_id. So 404 will be raised in GET/LIST requests, not 403.\n\nYeah, if the trunk owner is not by the request tenant user, also return 404.\n\nsee the operation log in my test env [1] \n\n3) For the security issue, let\u0027s discuss in port forwarding obj comments.\n\n[1] http://paste.openstack.org/show/723771/\nNOTES: This log is depolyed all of the server part codes(server part 3 patches)","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    \"delete_log\": \"rule:admin_only\","},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    \"create_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":251,"context_line":"    \"update_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":252,"context_line":"    \"get_floatingip_port_forwarding\": \"rule:regular_user\","},{"line_number":253,"context_line":"    \"get_floatingip_port_forwardings\": \"rule:regular_user\","},{"line_number":254,"context_line":"    \"delete_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\""}],"source_content_type":"application/json","patch_set":25,"id":"5f7c97a3_130148b6","line":251,"updated":"2018-06-28 18:51:21.000000000","message":"Can you put update below get like other blocks do?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    \"delete_log\": \"rule:admin_only\","},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    \"create_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":251,"context_line":"    \"update_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":252,"context_line":"    \"get_floatingip_port_forwarding\": \"rule:regular_user\","},{"line_number":253,"context_line":"    \"get_floatingip_port_forwardings\": \"rule:regular_user\","},{"line_number":254,"context_line":"    \"delete_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\""}],"source_content_type":"application/json","patch_set":25,"id":"5f7c97a3_b1040716","line":251,"in_reply_to":"5f7c97a3_130148b6","updated":"2018-06-29 04:35:53.000000000","message":"Thanks, will update.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        return routers"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _sync_port_forwarding_fip(self, plugin, context, routers):"},{"line_number":132,"context_line":"        return plugin.sync_port_forwarding_fip(context, routers)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _routers_to_sync(self, context, router_ids, host\u003dNone):"},{"line_number":135,"context_line":"        if extensions.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d214aeeb","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":64},"updated":"2018-05-29 08:29:09.000000000","message":"can\u0027t You simply call this in L127?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        return routers"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _sync_port_forwarding_fip(self, plugin, context, routers):"},{"line_number":132,"context_line":"        return plugin.sync_port_forwarding_fip(context, routers)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _routers_to_sync(self, context, router_ids, host\u003dNone):"},{"line_number":135,"context_line":"        if extensions.is_extension_supported("}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_b818f175","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":64},"in_reply_to":"5f7c97a3_d214aeeb","updated":"2018-05-29 09:36:20.000000000","message":"Yeah, I can. Thanks for this suggestion. I will move it.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from neutron.common import constants as n_const"},{"line_number":29,"context_line":"from neutron.db import api as db_api"},{"line_number":30,"context_line":"from neutron.extensions import _floating_ip_port_forwarding_lib as fippf_apidef"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_54359843","line":30,"updated":"2018-06-01 23:52:52.000000000","message":"We released neutron-lib yesterday: https://review.openstack.org/#/c/571429/. Now you can import the api definition from neutron-lib","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from neutron.common import constants as n_const"},{"line_number":29,"context_line":"from neutron.db import api as db_api"},{"line_number":30,"context_line":"from neutron.extensions import _floating_ip_port_forwarding_lib as fippf_apidef"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6a345bad","line":30,"in_reply_to":"5f7c97a3_54359843","updated":"2018-06-04 07:34:16.000000000","message":"Thanks. Let me change it.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self._ensure_host_set_on_ports(context, host, routers)"},{"line_number":124,"context_line":"            # refresh the data structure after ports are bound"},{"line_number":125,"context_line":"            routers \u003d self._routers_to_sync(context, router_ids, host)"},{"line_number":126,"context_line":"        if directory.get_plugin(fippf_apidef.PORTFORWARDING):"},{"line_number":127,"context_line":"            pf_plugin \u003d directory.get_plugin(fippf_apidef.PORTFORWARDING)"},{"line_number":128,"context_line":"            pf_plugin.sync_port_forwarding_fip(context, routers)"},{"line_number":129,"context_line":"        return routers"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_f4cce46a","line":126,"range":{"start_line":126,"start_character":32,"end_line":126,"end_character":59},"updated":"2018-06-01 23:52:52.000000000","message":"Please see my comment to https://review.openstack.org/#/c/535647/15/neutron/extensions/_floating_ip_port_forwarding_lib.py@28","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self._ensure_host_set_on_ports(context, host, routers)"},{"line_number":124,"context_line":"            # refresh the data structure after ports are bound"},{"line_number":125,"context_line":"            routers \u003d self._routers_to_sync(context, router_ids, host)"},{"line_number":126,"context_line":"        if directory.get_plugin(fippf_apidef.PORTFORWARDING):"},{"line_number":127,"context_line":"            pf_plugin \u003d directory.get_plugin(fippf_apidef.PORTFORWARDING)"},{"line_number":128,"context_line":"            pf_plugin.sync_port_forwarding_fip(context, routers)"},{"line_number":129,"context_line":"        return routers"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_2a3e638b","line":126,"range":{"start_line":126,"start_character":32,"end_line":126,"end_character":59},"in_reply_to":"5f7c97a3_f4cce46a","updated":"2018-06-04 07:34:16.000000000","message":"Thanks, Miguel","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"}],"neutron/api/v2/base.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"58d0f6c8ba2abe6c4f99bc247ffdad040a8159b9","unresolved":false,"context_lines":[{"line_number":764,"context_line":"            self, request, resource_item, parent_id):"},{"line_number":765,"context_line":"        if (request.context.is_admin or request.context.is_advsvc or"},{"line_number":766,"context_line":"                self.parent[\u0027member_name\u0027] not in (l3.FLOATINGIP, l3.ROUTER) or"},{"line_number":767,"context_line":"                resource_item.get(self._resource).get(self._parent_id_name)):"},{"line_number":768,"context_line":"            return"},{"line_number":769,"context_line":"        resource_item[self._resource][self._parent_id_name] \u003d parent_id"},{"line_number":770,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_4306f223","line":767,"range":{"start_line":767,"start_character":16,"end_line":767,"end_character":49},"updated":"2018-06-18 21:01:09.000000000","message":"Nit: I guess it is safe to use resource_item.get[self._resource]","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"2b85788da1cd79f5d884a836b421ad15bf4dc439","unresolved":false,"context_lines":[{"line_number":764,"context_line":"            self, request, resource_item, parent_id):"},{"line_number":765,"context_line":"        if (request.context.is_admin or request.context.is_advsvc or"},{"line_number":766,"context_line":"                self.parent[\u0027member_name\u0027] not in (l3.FLOATINGIP, l3.ROUTER) or"},{"line_number":767,"context_line":"                resource_item.get(self._resource).get(self._parent_id_name)):"},{"line_number":768,"context_line":"            return"},{"line_number":769,"context_line":"        resource_item[self._resource][self._parent_id_name] \u003d parent_id"},{"line_number":770,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_dc8f3c20","line":767,"range":{"start_line":767,"start_character":16,"end_line":767,"end_character":49},"in_reply_to":"5f7c97a3_4306f223","updated":"2018-06-19 03:29:14.000000000","message":"Done","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"58d0f6c8ba2abe6c4f99bc247ffdad040a8159b9","unresolved":false,"context_lines":[{"line_number":764,"context_line":"            self, request, resource_item, parent_id):"},{"line_number":765,"context_line":"        if (request.context.is_admin or request.context.is_advsvc or"},{"line_number":766,"context_line":"                self.parent[\u0027member_name\u0027] not in (l3.FLOATINGIP, l3.ROUTER) or"},{"line_number":767,"context_line":"                resource_item.get(self._resource).get(self._parent_id_name)):"},{"line_number":768,"context_line":"            return"},{"line_number":769,"context_line":"        resource_item[self._resource][self._parent_id_name] \u003d parent_id"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"def create_resource(collection, resource, plugin, params, allow_bulk\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_8641780d","line":769,"range":{"start_line":767,"start_character":16,"end_line":769,"end_character":71},"updated":"2018-06-18 21:01:09.000000000","message":"This can be achieved by:\n\n  resource_item[self._resource].setdefault(self._parent_id_name, parent_id)","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"2b85788da1cd79f5d884a836b421ad15bf4dc439","unresolved":false,"context_lines":[{"line_number":764,"context_line":"            self, request, resource_item, parent_id):"},{"line_number":765,"context_line":"        if (request.context.is_admin or request.context.is_advsvc or"},{"line_number":766,"context_line":"                self.parent[\u0027member_name\u0027] not in (l3.FLOATINGIP, l3.ROUTER) or"},{"line_number":767,"context_line":"                resource_item.get(self._resource).get(self._parent_id_name)):"},{"line_number":768,"context_line":"            return"},{"line_number":769,"context_line":"        resource_item[self._resource][self._parent_id_name] \u003d parent_id"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"def create_resource(collection, resource, plugin, params, allow_bulk\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_7c962841","line":769,"range":{"start_line":767,"start_character":16,"end_line":769,"end_character":71},"in_reply_to":"5f7c97a3_8641780d","updated":"2018-06-19 03:29:14.000000000","message":"Done","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"}],"neutron/db/migration/alembic_migrations/versions/rocky/expand/867d39095bf4_port_forwarding.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e2e0238779d8c8977ff81c0a15c15a4e129e8c75","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":52,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027),"},{"line_number":53,"context_line":"        sa.UniqueConstraint(\u0027floating_ip_id\u0027, \u0027external_port\u0027,"},{"line_number":54,"context_line":"                            name\u003d\u0027floating_ip_id_external_port_constraint\u0027),"},{"line_number":55,"context_line":"        sa.UniqueConstraint(\u0027internal_neutron_port_id\u0027, \u0027socket\u0027,"},{"line_number":56,"context_line":"                            name\u003d\u0027internal_neutron_port_id_socket_constraint\u0027)"},{"line_number":57,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_3015a8e5","line":54,"range":{"start_line":54,"start_character":34,"end_line":54,"end_character":73},"updated":"2018-05-15 07:32:51.000000000","message":"we always set unique constraints names like:\nuniq_\u003ctable_name\u003e0\u003ccolumns_names\u003e","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":52,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027),"},{"line_number":53,"context_line":"        sa.UniqueConstraint(\u0027floating_ip_id\u0027, \u0027external_port\u0027,"},{"line_number":54,"context_line":"                            name\u003d\u0027floating_ip_id_external_port_constraint\u0027),"},{"line_number":55,"context_line":"        sa.UniqueConstraint(\u0027internal_neutron_port_id\u0027, \u0027socket\u0027,"},{"line_number":56,"context_line":"                            name\u003d\u0027internal_neutron_port_id_socket_constraint\u0027)"},{"line_number":57,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_7ac8daa4","line":54,"range":{"start_line":54,"start_character":34,"end_line":54,"end_character":73},"in_reply_to":"5f7c97a3_3015a8e5","updated":"2018-05-15 09:13:30.000000000","message":"Yes, thanks to point out. I will change it.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"9526a912f73e67ab84a9caad37ce8e77dc070130","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        sa.Column(\u0027internal_neutron_port_id\u0027,"},{"line_number":44,"context_line":"                  sa.String(length\u003dconstants.UUID_FIELD_SIZE),"},{"line_number":45,"context_line":"                  nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.Column(\u0027protocol\u0027, sa.String(length\u003d40), nullable\u003dFalse),"},{"line_number":47,"context_line":"        sa.Column(\u0027socket\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027floating_ip_id\u0027], [\u0027floatingips.id\u0027],"},{"line_number":49,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_010ab21e","line":46,"range":{"start_line":46,"start_character":47,"end_line":46,"end_character":49},"updated":"2018-05-30 17:36:19.000000000","message":"Nit: better to define a constant for protocol size and share this constant with the \u0027protocol\u0027 field in security group rules table. However, I feel this is an optional enhancement and I am fine without it.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"8a59fb97b57370521e1e7af2e3f8cb684eae57b3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        sa.Column(\u0027internal_neutron_port_id\u0027,"},{"line_number":44,"context_line":"                  sa.String(length\u003dconstants.UUID_FIELD_SIZE),"},{"line_number":45,"context_line":"                  nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.Column(\u0027protocol\u0027, sa.String(length\u003d40), nullable\u003dFalse),"},{"line_number":47,"context_line":"        sa.Column(\u0027socket\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027floating_ip_id\u0027], [\u0027floatingips.id\u0027],"},{"line_number":49,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_0020639a","line":46,"range":{"start_line":46,"start_character":47,"end_line":46,"end_character":49},"in_reply_to":"5f7c97a3_010ab21e","updated":"2018-05-31 02:00:48.000000000","message":"Yeah, I also think it may be better, but maybe it\u0027s out of this patch scope. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"3173f4326d873dad429db3649af281eff2855388","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  sa.String(length\u003dconstants.UUID_FIELD_SIZE),"},{"line_number":45,"context_line":"                  nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.Column(\u0027protocol\u0027, sa.String(length\u003d40), nullable\u003dFalse),"},{"line_number":47,"context_line":"        sa.Column(\u0027socket\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027floatingip_id\u0027], [\u0027floatingips.id\u0027],"},{"line_number":49,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":50,"context_line":"        sa.ForeignKeyConstraint([\u0027internal_neutron_port_id\u0027], [\u0027ports.id\u0027],"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_ab2ad474","line":47,"updated":"2018-07-18 09:33:40.000000000","message":"why there are differences between length of those fields here and in specs? In specs socket is defined with size 20 and protocol 4. Here it\u0027s much bigger.\nI just want to know why You changed it :)","commit_id":"5bd6281f9cf2362cd2964b2e7c2e7cbc479d9461"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"23bf01e54fe98b7afdb9fde656e9d40a4749c94a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  sa.String(length\u003dconstants.UUID_FIELD_SIZE),"},{"line_number":45,"context_line":"                  nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.Column(\u0027protocol\u0027, sa.String(length\u003d40), nullable\u003dFalse),"},{"line_number":47,"context_line":"        sa.Column(\u0027socket\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027floatingip_id\u0027], [\u0027floatingips.id\u0027],"},{"line_number":49,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":50,"context_line":"        sa.ForeignKeyConstraint([\u0027internal_neutron_port_id\u0027], [\u0027ports.id\u0027],"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_e6f483d2","line":47,"in_reply_to":"5f7c97a3_ab2ad474","updated":"2018-07-18 10:26:23.000000000","message":"Thanks for review. :). Yeah, it\u0027s different here, as during the actual development work, honestly in UTs, as it will genarate each protocol randomly, the length of \u0027protocol\u0027 is so small, the db errors raise everywhere. So I reference the \u0027protocol\u0027 length from \u0027securitygrouprules\u0027 table.\n\nFor \u0027socket\u0027, the longest string must be \"255.255.255.255:65535\", its length is 21. I found most of the length definitions are bigger than actual. And the port forwarding feature just work with ipv4(the same with floatingip), so I choose a 36.","commit_id":"5bd6281f9cf2362cd2964b2e7c2e7cbc479d9461"}],"neutron/db/models/port_forwarding.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    socket \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":47,"context_line":"    port \u003d orm.relationship("},{"line_number":48,"context_line":"        models_v2.Port, load_on_pending\u003dTrue,"},{"line_number":49,"context_line":"        backref\u003dorm.backref(\"ports\","},{"line_number":50,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":51,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":52,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_49479578","line":49,"range":{"start_line":49,"start_character":29,"end_line":49,"end_character":34},"updated":"2018-05-28 23:38:35.000000000","message":"Why not port_forwardings since this relationship will point to PortForwarding objects?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    socket \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":47,"context_line":"    port \u003d orm.relationship("},{"line_number":48,"context_line":"        models_v2.Port, load_on_pending\u003dTrue,"},{"line_number":49,"context_line":"        backref\u003dorm.backref(\"ports\","},{"line_number":50,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":51,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":52,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_0c676beb","line":49,"range":{"start_line":49,"start_character":29,"end_line":49,"end_character":34},"in_reply_to":"5f7c97a3_49479578","updated":"2018-05-29 02:08:40.000000000","message":"Right. I missed this part.. As I don\u0027t use it for now, but will do that in the future. Thanks very much for point it out. Miguel.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("},{"line_number":54,"context_line":"        l3.FloatingIP, load_on_pending\u003dTrue,"},{"line_number":55,"context_line":"        backref\u003dorm.backref(\"floatingips\","},{"line_number":56,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":57,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":58,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_e95f813e","line":55,"range":{"start_line":55,"start_character":29,"end_line":55,"end_character":40},"updated":"2018-05-28 23:38:35.000000000","message":"Why not port_forwardings since this relationship will point to PortForwarding objects?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("},{"line_number":54,"context_line":"        l3.FloatingIP, load_on_pending\u003dTrue,"},{"line_number":55,"context_line":"        backref\u003dorm.backref(\"floatingips\","},{"line_number":56,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"},{"line_number":57,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":58,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_0cc3eb8a","line":55,"range":{"start_line":55,"start_character":29,"end_line":55,"end_character":40},"in_reply_to":"5f7c97a3_e95f813e","updated":"2018-05-29 02:08:40.000000000","message":"Correct. This part is for meeting the floatingip part in the https://specs.openstack.org/openstack/neutron-specs/specs/rocky/port-forwarding.html#rest-api-impact . But for https://review.openstack.org/#/c/535638/5/neutron_lib/api/definitions/floating_ip_port_forwarding.py in L66, I realize that you left comments in neutron-lib patch. Hmmm, maybe some misunderstandings, so I still leave this part for support floatingip extending port forwarding fields. I think I can fit all of them and rework. Thanks, Miguel, Need more feedback here","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dd422b51753fcc5f1b52c8f294267f73b66dcc43","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    port \u003d orm.relationship("},{"line_number":48,"context_line":"        models_v2.Port, load_on_pending\u003dTrue,"},{"line_number":49,"context_line":"        backref\u003dorm.backref(\"port_forwardings\","},{"line_number":50,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dTrue,"},{"line_number":51,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_2bf90dc4","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":40},"updated":"2018-07-03 22:44:10.000000000","message":"This backref relationship is going to be 1 - M on the port side. Please look at https://review.openstack.org/#/c/408143 and related bug. As you can see, there was a previous effort to convert the loading of these relationships to subquery. Let\u0027s be consistent with that","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"5ba9ca1ebad523a46842bac4a3e8e590a4cb6ddf","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    port \u003d orm.relationship("},{"line_number":48,"context_line":"        models_v2.Port, load_on_pending\u003dTrue,"},{"line_number":49,"context_line":"        backref\u003dorm.backref(\"port_forwardings\","},{"line_number":50,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dTrue,"},{"line_number":51,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_2e77dbd3","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":40},"in_reply_to":"5f7c97a3_2bf90dc4","updated":"2018-07-04 02:55:35.000000000","message":"Thanks, Miguel. It\u0027s helpful to me and understand better. I will change it.","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"dd422b51753fcc5f1b52c8f294267f73b66dcc43","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("},{"line_number":54,"context_line":"        l3.FloatingIP, load_on_pending\u003dTrue,"},{"line_number":55,"context_line":"        backref\u003dorm.backref(\"port_forwardings\","},{"line_number":56,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dTrue,"},{"line_number":57,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":58,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_cb2bb930","line":56,"range":{"start_line":56,"start_character":33,"end_line":56,"end_character":40},"updated":"2018-07-03 22:44:10.000000000","message":"Same here","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"5ba9ca1ebad523a46842bac4a3e8e590a4cb6ddf","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    floating_ip \u003d orm.relationship("},{"line_number":54,"context_line":"        l3.FloatingIP, load_on_pending\u003dTrue,"},{"line_number":55,"context_line":"        backref\u003dorm.backref(\"port_forwardings\","},{"line_number":56,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dTrue,"},{"line_number":57,"context_line":"                            cascade\u003d\u0027delete\u0027)"},{"line_number":58,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_ce49878e","line":56,"range":{"start_line":56,"start_character":33,"end_line":56,"end_character":40},"in_reply_to":"5f7c97a3_cb2bb930","updated":"2018-07-04 02:55:35.000000000","message":"Thanks. :)","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"}],"neutron/extensions/_floating_ip_port_forwarding_lib.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"5f7c97a3_9409f0dd","updated":"2018-06-01 23:52:52.000000000","message":"Yesterday we release neutron-lib: https://review.openstack.org/#/c/571429/. So you don\u0027t need this module anymore","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"5f7c97a3_ea470b1e","in_reply_to":"5f7c97a3_9409f0dd","updated":"2018-06-04 07:34:16.000000000","message":"Yeah, remove this file","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron_lib.db import constants as db_const"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"PORTFORWARDING \u003d \"PORTFORWARDING\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"PROTOCOLS \u003d constants.IPTABLES_PROTOCOL_MAP.keys()"},{"line_number":31,"context_line":"# The alias of the extension."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_34da5c4a","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":33},"updated":"2018-06-01 23:52:52.000000000","message":"This definition is missing in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/definitions/floating_ip_port_forwarding.py. You need to find a new home for it. Probably https://review.openstack.org/#/c/535647/15/neutron/extensions/floating_ip_port_forwarding.py","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron_lib.db import constants as db_const"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"PORTFORWARDING \u003d \"PORTFORWARDING\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"PROTOCOLS \u003d constants.IPTABLES_PROTOCOL_MAP.keys()"},{"line_number":31,"context_line":"# The alias of the extension."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4a5cffec","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":33},"in_reply_to":"5f7c97a3_34da5c4a","updated":"2018-06-04 07:34:16.000000000","message":"Correct. But it\u0027s from https://github.com/openstack/neutron-lib/blob/master/neutron_lib/plugins/constants.py . :).","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"91931a65b086d17b08c418149de71b4a26689259","unresolved":false,"context_lines":[{"line_number":66,"context_line":"PARENT_RESOURCE_NAME \u003d l3.FLOATINGIP"},{"line_number":67,"context_line":"PARENT_COLLECTION_NAME \u003d l3.FLOATINGIPS"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ID \u003d \u0027id\u0027"},{"line_number":70,"context_line":"PROJECT_ID \u003d \u0027project_id\u0027"},{"line_number":71,"context_line":"EXTERNAL_PORT \u003d \u0027external_port\u0027"},{"line_number":72,"context_line":"INTERNAL_PORT \u003d \u0027internal_port\u0027"},{"line_number":73,"context_line":"INTERNAL_IP_ADDRESS \u003d \u0027internal_ip_address\u0027"},{"line_number":74,"context_line":"PROTOCOL \u003d \u0027protocol\u0027"},{"line_number":75,"context_line":"INTERNAL_PORT_ID \u003d \u0027internal_port_id\u0027"},{"line_number":76,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"# The subresource attribute map for the extension. It adds child resources"},{"line_number":79,"context_line":"# to main extension\u0027s resource. The subresource map must have a parent and"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_33ee0ded","line":76,"range":{"start_line":69,"start_character":1,"end_line":76,"end_character":27},"updated":"2018-05-31 21:31:07.000000000","message":"since every section is classified with comments so would be better to name this too \n# Extension attributes ?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d02172c1de4e8cf2ebc08fffbe6af7c8ae6afd3f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"PARENT_RESOURCE_NAME \u003d l3.FLOATINGIP"},{"line_number":67,"context_line":"PARENT_COLLECTION_NAME \u003d l3.FLOATINGIPS"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ID \u003d \u0027id\u0027"},{"line_number":70,"context_line":"PROJECT_ID \u003d \u0027project_id\u0027"},{"line_number":71,"context_line":"EXTERNAL_PORT \u003d \u0027external_port\u0027"},{"line_number":72,"context_line":"INTERNAL_PORT \u003d \u0027internal_port\u0027"},{"line_number":73,"context_line":"INTERNAL_IP_ADDRESS \u003d \u0027internal_ip_address\u0027"},{"line_number":74,"context_line":"PROTOCOL \u003d \u0027protocol\u0027"},{"line_number":75,"context_line":"INTERNAL_PORT_ID \u003d \u0027internal_port_id\u0027"},{"line_number":76,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"# The subresource attribute map for the extension. It adds child resources"},{"line_number":79,"context_line":"# to main extension\u0027s resource. The subresource map must have a parent and"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_77430c6d","line":76,"range":{"start_line":69,"start_character":1,"end_line":76,"end_character":27},"in_reply_to":"5f7c97a3_33ee0ded","updated":"2018-06-01 01:15:49.000000000","message":"Thanks, let me doc them. :)","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"PARENT_RESOURCE_NAME \u003d l3.FLOATINGIP"},{"line_number":67,"context_line":"PARENT_COLLECTION_NAME \u003d l3.FLOATINGIPS"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ID \u003d \u0027id\u0027"},{"line_number":70,"context_line":"PROJECT_ID \u003d \u0027project_id\u0027"},{"line_number":71,"context_line":"EXTERNAL_PORT \u003d \u0027external_port\u0027"},{"line_number":72,"context_line":"INTERNAL_PORT \u003d \u0027internal_port\u0027"},{"line_number":73,"context_line":"INTERNAL_IP_ADDRESS \u003d \u0027internal_ip_address\u0027"},{"line_number":74,"context_line":"PROTOCOL \u003d \u0027protocol\u0027"},{"line_number":75,"context_line":"INTERNAL_PORT_ID \u003d \u0027internal_port_id\u0027"},{"line_number":76,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"# The subresource attribute map for the extension. It adds child resources"},{"line_number":79,"context_line":"# to main extension\u0027s resource. The subresource map must have a parent and"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b4042c19","line":76,"range":{"start_line":69,"start_character":1,"end_line":76,"end_character":27},"in_reply_to":"5f7c97a3_77430c6d","updated":"2018-06-01 23:52:52.000000000","message":"Well we are getting rid of this module","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"}],"neutron/extensions/floating_ip_port_forwarding.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Red Hat Inc."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_f090e145","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":33},"updated":"2018-04-20 09:38:20.000000000","message":"Change this maybe.\n\n# Copyright 2018 Openstack Foundation\n# All Rights Reserved.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Red Hat Inc."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_8771170f","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":33},"in_reply_to":"9f6a8fd7_f090e145","updated":"2018-04-21 07:17:41.000000000","message":"Ha, thanks. Will correct.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"},{"line_number":34,"context_line":"    \"\"\"Quality of Service API extension.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    api_definition \u003d apidef"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_70a4d1a6","line":34,"range":{"start_line":34,"start_character":7,"end_line":34,"end_character":40},"updated":"2018-04-20 09:38:20.000000000","message":"Forget change the comments?","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"},{"line_number":34,"context_line":"    \"\"\"Quality of Service API extension.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    api_definition \u003d apidef"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_4769bf1e","line":34,"range":{"start_line":34,"start_character":7,"end_line":34,"end_character":40},"in_reply_to":"9f6a8fd7_70a4d1a6","updated":"2018-04-21 07:17:41.000000000","message":"囧,  right. :)","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def get_plugin_type(cls):"},{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f0041017","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":31},"updated":"2018-05-15 07:40:40.000000000","message":"Should use the floating_ip_port_forwarding_lib definition.\napidef.PORTFORWARDING","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def get_plugin_type(cls):"},{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_da424e0f","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":31},"in_reply_to":"5f7c97a3_f0041017","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_503e24c1","line":103,"range":{"start_line":103,"start_character":15,"end_line":103,"end_character":47},"updated":"2018-05-15 07:40:40.000000000","message":"apidef.DESCRIPTION","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_7a4d3a3c","line":103,"range":{"start_line":103,"start_character":15,"end_line":103,"end_character":47},"in_reply_to":"5f7c97a3_503e24c1","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_b0a6980e","line":106,"range":{"start_line":106,"start_character":15,"end_line":106,"end_character":25},"updated":"2018-05-15 07:40:40.000000000","message":"I noticed that here you set these function with name `floatingip`, but for other code you set it to `floating_ip`. So I suggest here use `floating_ip` to make consistent.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_bae512de","line":106,"range":{"start_line":106,"start_character":15,"end_line":106,"end_character":25},"in_reply_to":"5f7c97a3_b0a6980e","updated":"2018-05-15 09:13:30.000000000","message":"No, this function name is generated by api route based on resource name. I can not change it. The \u0027other code\u0027 you mean what?  I look around the code again, I don\u0027t set \u0027floating_ip\u0027 in function name...Do you mean the variables?","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b71d2ec46df3f5f27edf74500bef467c27c6a17d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_68d5541b","line":106,"range":{"start_line":106,"start_character":15,"end_line":106,"end_character":25},"in_reply_to":"5f7c97a3_bae512de","updated":"2018-05-17 02:47:19.000000000","message":"According to the definition [1], the resource name is `port_forwarding`.\nSo here should the function name be `create_port_forwarding`?\n\nMy original thoughts is to change such `xx_floatingip_xxx` name to\n\u0027xx_floating_ip_xxx\u0027, make it consistent with the file name here: floating_ip_port_forwarding.py\n\n[1] https://review.openstack.org/#/c/535647/10/neutron/extensions/floating_ip_port_forwarding_lib.py@60","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @abc.abstractmethod"},{"line_number":110,"context_line":"    def update_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":111,"context_line":"        pass"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_50b14446","line":110,"range":{"start_line":110,"start_character":15,"end_line":110,"end_character":25},"updated":"2018-05-15 07:40:40.000000000","message":"ditto","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        pass"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    @abc.abstractmethod"},{"line_number":114,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":115,"context_line":"        pass"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_10b74c3c","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":22},"updated":"2018-05-15 07:40:40.000000000","message":"ditto","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        pass"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @abc.abstractmethod"},{"line_number":118,"context_line":"    def get_floatingip_port_forwardings(self, context, **kwargs):"},{"line_number":119,"context_line":"        pass"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_d086b466","line":118,"range":{"start_line":118,"start_character":12,"end_line":118,"end_character":22},"updated":"2018-05-15 07:40:40.000000000","message":"ditto","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        pass"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @abc.abstractmethod"},{"line_number":122,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":123,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_907cbc72","line":122,"range":{"start_line":122,"start_character":15,"end_line":122,"end_character":25},"updated":"2018-05-15 07:40:40.000000000","message":"ditto","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"40c7ba0cf67e924f410691ac027d35cbf89db902","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def get_plugin_type(cls):"},{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_3e7c6871","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":31},"updated":"2018-05-17 02:48:58.000000000","message":"forget this ?","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"95451d610f8ee7afe1a6b4a91a30387277799cee","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @classmethod"},{"line_number":99,"context_line":"    def get_plugin_type(cls):"},{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_9eca5c18","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":31},"in_reply_to":"5f7c97a3_3e7c6871","updated":"2018-05-17 03:32:37.000000000","message":"Thanks, this need to be constrant.","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"40c7ba0cf67e924f410691ac027d35cbf89db902","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_5e81244a","line":103,"range":{"start_line":103,"start_character":15,"end_line":103,"end_character":47},"updated":"2018-05-17 02:48:58.000000000","message":"ditto","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"95451d610f8ee7afe1a6b4a91a30387277799cee","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return \u0027PORTFORWARDING\u0027"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_plugin_description(self):"},{"line_number":103,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @abc.abstractmethod"},{"line_number":106,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_dedf74d4","line":103,"range":{"start_line":103,"start_character":15,"end_line":103,"end_character":47},"in_reply_to":"5f7c97a3_5e81244a","updated":"2018-05-17 03:32:37.000000000","message":"This won\u0027t, it\u0027s plugin description, it\u0027s OK to define in the base class.","commit_id":"e5ca8aae6854e8c8f119138c05d9c14bcb792432"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                allow_bulk\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":"        for collection_name in apidef.SUB_RESOURCE_ATTRIBUTE_MAP:"},{"line_number":57,"context_line":"            resource_name \u003d collection_name[:-1]"},{"line_number":58,"context_line":"            parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["},{"line_number":59,"context_line":"                collection_name].get(\u0027parent\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_c952c535","line":56,"updated":"2018-05-28 23:38:35.000000000","message":"Do we need the for loop? You have only one collection in the sub-resource attribute map?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                allow_bulk\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":"        for collection_name in apidef.SUB_RESOURCE_ATTRIBUTE_MAP:"},{"line_number":57,"context_line":"            resource_name \u003d collection_name[:-1]"},{"line_number":58,"context_line":"            parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["},{"line_number":59,"context_line":"                collection_name].get(\u0027parent\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_cc4df33b","line":56,"in_reply_to":"5f7c97a3_c952c535","updated":"2018-05-29 02:08:40.000000000","message":"Thanks for point it out, Miguel. Just clear this, My first thought about this is for supporting more port forwarding functionality, not just floatingip, but also router gateway port something. So I create the code like this before. But for now, it\u0027s true that we can remove the for loop. Thanks.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.api import extensions"},{"line_number":25,"context_line":"from neutron.api.v2 import base"},{"line_number":26,"context_line":"from neutron.api.v2 import resource_helper"},{"line_number":27,"context_line":"from neutron.extensions import _floating_ip_port_forwarding_lib as apidef"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_687794a1","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":73},"updated":"2018-06-01 23:52:52.000000000","message":"We released neutron-lib yesterday: https://review.openstack.org/#/c/571429/. Now you can import the api definition from neutron-lib","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.api import extensions"},{"line_number":25,"context_line":"from neutron.api.v2 import base"},{"line_number":26,"context_line":"from neutron.api.v2 import resource_helper"},{"line_number":27,"context_line":"from neutron.extensions import _floating_ip_port_forwarding_lib as apidef"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8a0777ca","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":73},"in_reply_to":"5f7c97a3_687794a1","updated":"2018-06-04 07:34:16.000000000","message":"I will change to the released neutron-lib.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                translate_name\u003dTrue,"},{"line_number":53,"context_line":"                allow_bulk\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        resource_name \u003d apidef.COLLECTION_NAME[:-1]"},{"line_number":58,"context_line":"        parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_684eb46f","line":55,"range":{"start_line":55,"start_character":38,"end_line":55,"end_character":60},"updated":"2018-06-01 23:52:52.000000000","message":"Please see my comment to https://review.openstack.org/#/c/535647/15/neutron/extensions/_floating_ip_port_forwarding_lib.py@28","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                translate_name\u003dTrue,"},{"line_number":53,"context_line":"                allow_bulk\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        resource_name \u003d apidef.COLLECTION_NAME[:-1]"},{"line_number":58,"context_line":"        parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0af367e9","line":55,"range":{"start_line":55,"start_character":38,"end_line":55,"end_character":60},"in_reply_to":"5f7c97a3_684eb46f","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"91931a65b086d17b08c418149de71b4a26689259","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        resource_name \u003d apidef.COLLECTION_NAME[:-1]"},{"line_number":58,"context_line":"        parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["},{"line_number":59,"context_line":"            apidef.COLLECTION_NAME].get(\u0027parent\u0027)"},{"line_number":60,"context_line":"        params \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP[apidef.COLLECTION_NAME].get("}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b3969d3d","line":57,"range":{"start_line":57,"start_character":31,"end_line":57,"end_character":51},"updated":"2018-05-31 21:31:07.000000000","message":"why not RESOURCE_NAME ?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d02172c1de4e8cf2ebc08fffbe6af7c8ae6afd3f","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        plugin \u003d directory.get_plugin(apidef.PORTFORWARDING)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        resource_name \u003d apidef.COLLECTION_NAME[:-1]"},{"line_number":58,"context_line":"        parent \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP["},{"line_number":59,"context_line":"            apidef.COLLECTION_NAME].get(\u0027parent\u0027)"},{"line_number":60,"context_line":"        params \u003d apidef.SUB_RESOURCE_ATTRIBUTE_MAP[apidef.COLLECTION_NAME].get("}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_37611406","line":57,"range":{"start_line":57,"start_character":31,"end_line":57,"end_character":51},"in_reply_to":"5f7c97a3_b3969d3d","updated":"2018-06-01 01:15:49.000000000","message":"Thanks, you are right.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @classmethod"},{"line_number":100,"context_line":"    def get_plugin_type(cls):"},{"line_number":101,"context_line":"        return apidef.PORTFORWARDING"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def get_plugin_description(self):"},{"line_number":104,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_48a5f801","line":101,"range":{"start_line":101,"start_character":15,"end_line":101,"end_character":36},"updated":"2018-06-01 23:52:52.000000000","message":"Please see my comment to https://review.openstack.org/#/c/535647/15/neutron/extensions/_floating_ip_port_forwarding_lib.py@28","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @classmethod"},{"line_number":100,"context_line":"    def get_plugin_type(cls):"},{"line_number":101,"context_line":"        return apidef.PORTFORWARDING"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def get_plugin_description(self):"},{"line_number":104,"context_line":"        return \"Port Forwarding Service Plugin\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_cafc8fb7","line":101,"range":{"start_line":101,"start_character":15,"end_line":101,"end_character":36},"in_reply_to":"5f7c97a3_48a5f801","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @abc.abstractmethod"},{"line_number":107,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":108,"context_line":"        pass"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_28c99caa","line":107,"range":{"start_line":107,"start_character":57,"end_line":107,"end_character":65},"updated":"2018-06-01 23:52:52.000000000","message":"Why kwargs? The point here is to define the API. Let\u0027s make the args explicit","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        return \"Port Forwarding Service Plugin\""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @abc.abstractmethod"},{"line_number":107,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":108,"context_line":"        pass"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6a2bfb32","line":107,"range":{"start_line":107,"start_character":57,"end_line":107,"end_character":65},"in_reply_to":"5f7c97a3_28c99caa","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        pass"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"},{"line_number":111,"context_line":"    def update_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":112,"context_line":"        pass"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_08c2a085","line":111,"range":{"start_line":111,"start_character":61,"end_line":111,"end_character":69},"updated":"2018-06-01 23:52:52.000000000","message":"Ditto","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        pass"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"},{"line_number":111,"context_line":"    def update_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":112,"context_line":"        pass"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4a2abf2c","line":111,"range":{"start_line":111,"start_character":61,"end_line":111,"end_character":69},"in_reply_to":"5f7c97a3_08c2a085","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        pass"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @abc.abstractmethod"},{"line_number":115,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":116,"context_line":"        pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c8b7c820","line":115,"range":{"start_line":115,"start_character":58,"end_line":115,"end_character":66},"updated":"2018-06-01 23:52:52.000000000","message":"Ditto","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        pass"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @abc.abstractmethod"},{"line_number":115,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":116,"context_line":"        pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8a30d7a0","line":115,"range":{"start_line":115,"start_character":58,"end_line":115,"end_character":66},"in_reply_to":"5f7c97a3_c8b7c820","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        pass"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @abc.abstractmethod"},{"line_number":126,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":127,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_883b109a","line":126,"range":{"start_line":126,"start_character":61,"end_line":126,"end_character":69},"updated":"2018-06-01 23:52:52.000000000","message":"Ditto","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        pass"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @abc.abstractmethod"},{"line_number":126,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":127,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_ea1e2b0c","line":126,"range":{"start_line":126,"start_character":61,"end_line":126,"end_character":69},"in_reply_to":"5f7c97a3_883b109a","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from neutron.api.v2 import resource_helper"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"},{"line_number":32,"context_line":"    \"\"\"Floating IP Port Forwarding API extension.\"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    api_definition \u003d apidef"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_25ef55b2","line":31,"range":{"start_line":31,"start_character":6,"end_line":31,"end_character":33},"updated":"2018-06-28 22:19:37.000000000","message":"consider PascalCase for this as per other class names in neutron\n\n\nNote: this doesn\u0027t contribute to -1 for patch","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from neutron.api.v2 import resource_helper"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Floating_ip_port_forwarding(api_extensions.APIExtensionDescriptor):"},{"line_number":32,"context_line":"    \"\"\"Floating IP Port Forwarding API extension.\"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    api_definition \u003d apidef"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_1177fba1","line":31,"range":{"start_line":31,"start_character":6,"end_line":31,"end_character":33},"in_reply_to":"5f7c97a3_25ef55b2","updated":"2018-06-29 04:35:53.000000000","message":"No, we must write the class name like this, as this file name is floating_ip_port_forwarding. The api extension mechnism load the extension based on the file name, and load the class name with the first capitalized letter of file name. please see neutron/api/extensions.py:ExtensionManager","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/extensions/floating_ip_port_forwarding_lib.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"9526a912f73e67ab84a9caad37ce8e77dc070130","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack Foundation."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_c19fda4d","line":1,"updated":"2018-05-30 17:36:19.000000000","message":"Consider prefixing \u0027_\u0027 to the filename to get rid of this warning:\n\n  Did not find expected name \"Floating_ip_port_forwarding_lib\" in /opt/stack/new/neutron/neutron/extensions/floating_ip_port_forwarding_lib.py\n\nIt looks neutron server will try to load extensions from each file under this folder. Adding \u0027_\u0027 to the filename can avoid such loading and speeding up the gate a bit.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"8a59fb97b57370521e1e7af2e3f8cb684eae57b3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2012 OpenStack Foundation."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_2058ff2e","line":1,"in_reply_to":"5f7c97a3_c19fda4d","updated":"2018-05-31 02:00:48.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":51,"context_line":"API_PREFIX \u003d \u0027/\u0027 + l3.FLOATINGIPS"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"# The description of the extension."},{"line_number":54,"context_line":"DESCRIPTION \u003d \"Allow port forwarding from internal port to a floating IP port\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# A timestamp of when the extension was introduced."},{"line_number":57,"context_line":"UPDATED_TIMESTAMP \u003d \"2018-01-19T10:00:00-00:00\""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_12a0e68f","line":54,"updated":"2018-05-29 08:29:09.000000000","message":"This description here is different than in https://review.openstack.org/#/c/535638/9/neutron_lib/api/definitions/floating_ip_port_forwarding.py","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"API_PREFIX \u003d \u0027/\u0027 + l3.FLOATINGIPS"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"# The description of the extension."},{"line_number":54,"context_line":"DESCRIPTION \u003d \"Allow port forwarding from internal port to a floating IP port\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# A timestamp of when the extension was introduced."},{"line_number":57,"context_line":"UPDATED_TIMESTAMP \u003d \"2018-01-19T10:00:00-00:00\""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_386ce1ce","line":54,"in_reply_to":"5f7c97a3_12a0e68f","updated":"2018-05-29 09:36:20.000000000","message":"Thanks, will make it the same.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                         \u0027is_visible\u0027: False},"},{"line_number":98,"context_line":"            EXTERNAL_PORT: {"},{"line_number":99,"context_line":"                \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":100,"context_line":"                \u0027validate\u0027: {\u0027type:range\u0027: [1, 65535]},"},{"line_number":101,"context_line":"                \u0027is_visible\u0027: True},"},{"line_number":102,"context_line":"            INTERNAL_PORT: {"},{"line_number":103,"context_line":"                \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_72dd9a12","line":100,"updated":"2018-05-29 08:29:09.000000000","message":"in neutron-lib apidef there is \u0027type:port_range\u0027 validator used, can\u0027t it be used also here?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                         \u0027is_visible\u0027: False},"},{"line_number":98,"context_line":"            EXTERNAL_PORT: {"},{"line_number":99,"context_line":"                \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":100,"context_line":"                \u0027validate\u0027: {\u0027type:range\u0027: [1, 65535]},"},{"line_number":101,"context_line":"                \u0027is_visible\u0027: True},"},{"line_number":102,"context_line":"            INTERNAL_PORT: {"},{"line_number":103,"context_line":"                \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7876d9a6","line":100,"in_reply_to":"5f7c97a3_72dd9a12","updated":"2018-05-29 09:36:20.000000000","message":"Yeah. This file is just for test and the work could be continue. But you are right. I will make it the same.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"}],"neutron/objects/port_forwarding.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @classmethod"},{"line_number":130,"context_line":"    def _unique_port_forwarding_iterator(cls, query):"},{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_7096114f","line":131,"range":{"start_line":131,"start_character":42,"end_line":131,"end_character":54},"updated":"2018-04-20 09:38:20.000000000","message":"s/port_forwarding ?","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @classmethod"},{"line_number":130,"context_line":"    def _unique_port_forwarding_iterator(cls, query):"},{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_e759f38d","line":131,"range":{"start_line":131,"start_character":42,"end_line":131,"end_character":54},"in_reply_to":"9f6a8fd7_7096114f","updated":"2018-04-21 07:17:41.000000000","message":"Done","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    @classmethod"},{"line_number":130,"context_line":"    def _unique_port_forwarding_iterator(cls, query):"},{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"},{"line_number":135,"context_line":"        group_iterator \u003d itertools.groupby(q, keyfunc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_309c1969","line":132,"range":{"start_line":132,"start_character":24,"end_line":132,"end_character":27},"updated":"2018-04-20 09:38:20.000000000","message":"ditto","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    @classmethod"},{"line_number":130,"context_line":"    def _unique_port_forwarding_iterator(cls, query):"},{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"},{"line_number":135,"context_line":"        group_iterator \u003d itertools.groupby(q, keyfunc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_075f4772","line":132,"range":{"start_line":132,"start_character":24,"end_line":132,"end_character":27},"in_reply_to":"9f6a8fd7_309c1969","updated":"2018-04-21 07:17:41.000000000","message":"Done","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"},{"line_number":135,"context_line":"        group_iterator \u003d itertools.groupby(q, keyfunc)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        for key, value in group_iterator:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_b08109fe","line":134,"range":{"start_line":134,"start_character":38,"end_line":134,"end_character":63},"updated":"2018-04-20 09:38:20.000000000","message":"We do not add tail comments.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        \"\"\"Iterates over only one row per floating ip. Ignores others.\"\"\""},{"line_number":132,"context_line":"        # Group rows by fip id. They must be sorted by same."},{"line_number":133,"context_line":"        q \u003d query.order_by(l3.FloatingIP.router_id)"},{"line_number":134,"context_line":"        keyfunc \u003d lambda row: row[1]  # groupby floatingipmodel"},{"line_number":135,"context_line":"        group_iterator \u003d itertools.groupby(q, keyfunc)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        for key, value in group_iterator:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_c754ef55","line":134,"range":{"start_line":134,"start_character":38,"end_line":134,"end_character":63},"in_reply_to":"9f6a8fd7_b08109fe","updated":"2018-04-21 07:17:41.000000000","message":"Will remove, thanks.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields_need_translation \u003d {"},{"line_number":39,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":40,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_d039d4a3","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":27},"updated":"2018-05-15 07:40:40.000000000","message":"nothing changed, why put `socket` here?","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields_need_translation \u003d {"},{"line_number":39,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":40,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_e7e8d3b3","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":27},"in_reply_to":"5f7c97a3_d039d4a3","updated":"2018-05-15 09:13:30.000000000","message":"No, I think it\u0027s changed, as we store the field internal_ip_address:internal_port floatingip_address:external_port into db called \u0027socket\u0027 which is not defined in \"fields\", we need to make sure we can get the colume and split them out.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields_need_translation \u003d {"},{"line_number":41,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":42,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":43,"context_line":"    }"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_2937b900","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":26},"updated":"2018-05-28 23:38:35.000000000","message":"Why is this translation needed?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields_need_translation \u003d {"},{"line_number":41,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":42,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":43,"context_line":"    }"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ac1757ee","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":26},"in_reply_to":"5f7c97a3_2937b900","updated":"2018-05-29 02:08:40.000000000","message":"As this obj doesn\u0027t define a field named \u0027socket\u0027, but the db model does. And this obj defines some fields ‘internal_ip_address’ and \u0027internal_port\u0027 which can be accepted by this obj, but the db model doesn\u0027t. So if I don\u0027t set the \u0027socket\u0027 into fields_need_translation, when we CRUD the obj, the db won\u0027t store it. Please see http://git.openstack.org/cgit/openstack/neutron/tree/neutron/objects/base.py#n468\n\nJust from my opinion, the current obj now is an abnormal case from the others, I think. :)\nPlease feel free to correct. Any other nicer ideas are welcome. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields_need_translation \u003d {"},{"line_number":41,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":42,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":43,"context_line":"    }"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9190eb98","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":26},"in_reply_to":"5f7c97a3_ac1757ee","updated":"2018-06-29 04:35:53.000000000","message":"\u003e As this obj doesn\u0027t define a field named \u0027socket\u0027, but the db model\n \u003e does. And this obj defines some fields ‘internal_ip_address’ and\n \u003e \u0027internal_port\u0027 which can be accepted by this obj, but the db model\n \u003e doesn\u0027t. So if I don\u0027t set the \u0027socket\u0027 into fields_need_translation,\n \u003e when we CRUD the obj, the db won\u0027t store it. Please see\n \u003e http://git.openstack.org/cgit/openstack/neutron/tree/neutron/objects/base.py#n468\n \u003e \n \u003e Just from my opinion, the current obj now is an abnormal case from\n \u003e the others, I think. :)\n \u003e Please feel free to correct. Any other nicer ideas are welcome. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields_need_translation \u003d {"},{"line_number":41,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":42,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":43,"context_line":"    }"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_493c75e0","line":42,"range":{"start_line":42,"start_character":8,"end_line":42,"end_character":54},"updated":"2018-05-28 23:38:35.000000000","message":"See my comment to L50 below?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields_need_translation \u003d {"},{"line_number":41,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":42,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":43,"context_line":"    }"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_cc973345","line":42,"range":{"start_line":42,"start_character":8,"end_line":42,"end_character":54},"in_reply_to":"5f7c97a3_493c75e0","updated":"2018-05-29 02:08:40.000000000","message":"Thanks, Miguel","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ab091cf80016d5b0f5a67d46165506cda7780993","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027floating_ip_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":49,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_89360d03","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":25},"updated":"2018-05-28 23:38:35.000000000","message":"I understand that in the DB model (https://review.openstack.org/#/c/535647/13/neutron/db/models/port_forwarding.py@41) you named this field as internal_neutron_port_id to emphasize that you are referring to a neutron port. That emphasis is still needed here. Why not name this field internal_neutron_port_id and be compatible with the SQLAlchemy model?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027floating_ip_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":49,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_f897498f","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":25},"in_reply_to":"5f7c97a3_12f7868d","updated":"2018-05-29 09:36:20.000000000","message":"Hmm, Thanks, Slawek. But the merged spec use that name in db table, should we change the spec, as the real implementation may be different with that if we do this. Just my worried.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d1994749d77d93c08ae8950caa2f819ae2eb793b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027floating_ip_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":49,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_ac9af76b","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":25},"in_reply_to":"5f7c97a3_89360d03","updated":"2018-05-29 02:08:40.000000000","message":"But the merged api defination see, which copied from neutron-lib\nhttps://review.openstack.org/#/c/535647/13/neutron/extensions/floating_ip_port_forwarding_lib.py@115\n\nThe reason for this is we can accept the request body from API request directly. And The API field accepts \u0027internal_port_id\u0027, but not \u0027internal_neutron_port_id\u0027. So there must contain a translation from \u0027internal_port_id\u0027 to \u0027internal_neutron_port_id\u0027. Did you mean that we translate it outside? Or we need to change the existing API defination(we\u0027d better not to do, :))? \n\nHi, Miguel. This also needs more feedback from you. Thank you.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027floating_ip_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":49,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_12f7868d","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":25},"in_reply_to":"5f7c97a3_ac9af76b","updated":"2018-05-29 08:29:09.000000000","message":"IMHO this emphasize is not necessary and You could use just internal_port_id name in db model as well","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        \u0027floating_ip_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":49,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_c8134800","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":25},"in_reply_to":"5f7c97a3_f897498f","updated":"2018-06-01 23:52:52.000000000","message":"It\u0027s fine. I understand better now","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        if \u0027socket\u0027 in result:"},{"line_number":97,"context_line":"            groups \u003d result[\u0027socket\u0027].split(\":\")"},{"line_number":98,"context_line":"            result[\u0027internal_ip_address\u0027] \u003d netaddr.IPAddress("},{"line_number":99,"context_line":"                groups[0], version\u003d4)"},{"line_number":100,"context_line":"            result[\u0027internal_port\u0027] \u003d int(groups[1])"},{"line_number":101,"context_line":"            del result[\u0027socket\u0027]"},{"line_number":102,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_52365e53","line":99,"range":{"start_line":99,"start_character":35,"end_line":99,"end_character":36},"updated":"2018-05-29 08:29:09.000000000","message":"there is constant in neutron_lib.constants for it :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        if \u0027socket\u0027 in result:"},{"line_number":97,"context_line":"            groups \u003d result[\u0027socket\u0027].split(\":\")"},{"line_number":98,"context_line":"            result[\u0027internal_ip_address\u0027] \u003d netaddr.IPAddress("},{"line_number":99,"context_line":"                groups[0], version\u003d4)"},{"line_number":100,"context_line":"            result[\u0027internal_port\u0027] \u003d int(groups[1])"},{"line_number":101,"context_line":"            del result[\u0027socket\u0027]"},{"line_number":102,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_18956587","line":99,"range":{"start_line":99,"start_character":35,"end_line":99,"end_character":36},"in_reply_to":"5f7c97a3_52365e53","updated":"2018-05-29 09:36:20.000000000","message":"OH, thanks for pointing out. I will make it better.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"91931a65b086d17b08c418149de71b4a26689259","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        return self.FIP_OBJ"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _load_attr_from_fip(self, attrname):"},{"line_number":83,"context_line":"        # get router_id and floating_ip_address from fip obj"},{"line_number":84,"context_line":"        fip_obj \u003d self._get_fip_obj()"},{"line_number":85,"context_line":"        value \u003d getattr(fip_obj, attrname)"},{"line_number":86,"context_line":"        setattr(self, attrname, value)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_ee7ae8ee","line":83,"range":{"start_line":83,"start_character":8,"end_line":83,"end_character":60},"updated":"2018-05-31 21:31:07.000000000","message":"this could be any attribute not just the floating_ip_adress and router_id. comment needs update","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d02172c1de4e8cf2ebc08fffbe6af7c8ae6afd3f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        return self.FIP_OBJ"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _load_attr_from_fip(self, attrname):"},{"line_number":83,"context_line":"        # get router_id and floating_ip_address from fip obj"},{"line_number":84,"context_line":"        fip_obj \u003d self._get_fip_obj()"},{"line_number":85,"context_line":"        value \u003d getattr(fip_obj, attrname)"},{"line_number":86,"context_line":"        setattr(self, attrname, value)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_f7563c2a","line":83,"range":{"start_line":83,"start_character":8,"end_line":83,"end_character":60},"in_reply_to":"5f7c97a3_ee7ae8ee","updated":"2018-06-01 01:15:49.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"54f73dce25cbf39f511bb2a00475529716a8fd34","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":54,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"},{"line_number":55,"context_line":"        \u0027router_id\u0027: common_types.UUIDField()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_41db5820","line":52,"range":{"start_line":52,"start_character":68,"end_line":52,"end_character":73},"updated":"2018-06-06 16:30:07.000000000","message":"Ideally, if the \u0027internal_ip_address\u0027 is not provided, neutron can pick the first address of the internal port. If this logic is implemented, should this field be nullable?","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"b204168b5894d664c736385a5b5fd0ad7477abe3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \u0027external_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":50,"context_line":"        \u0027protocol\u0027: common_types.IpProtocolEnumField(nullable\u003dFalse),"},{"line_number":51,"context_line":"        \u0027internal_port_id\u0027: common_types.UUIDField(nullable\u003dFalse),"},{"line_number":52,"context_line":"        \u0027internal_ip_address\u0027: obj_fields.IPV4AddressField(nullable\u003dFalse),"},{"line_number":53,"context_line":"        \u0027internal_port\u0027: common_types.PortRangeField(nullable\u003dFalse),"},{"line_number":54,"context_line":"        \u0027floating_ip_address\u0027: obj_fields.IPV4AddressField(),"},{"line_number":55,"context_line":"        \u0027router_id\u0027: common_types.UUIDField()"}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_c57994c5","line":52,"range":{"start_line":52,"start_character":68,"end_line":52,"end_character":73},"in_reply_to":"5f7c97a3_41db5820","updated":"2018-06-07 02:18:37.000000000","message":"Yeah, as the spec mentioned, it should be that. the first address get is https://review.openstack.org/#/c/535647/16/neutron/services/portforwarding/pf_plugin.py@93-98 . Let me have a fullstack test, and update the all.","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"58d0f6c8ba2abe6c4f99bc247ffdad040a8159b9","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _get_fip_obj(self):"},{"line_number":77,"context_line":"        if not self.FIP_OBJ:"},{"line_number":78,"context_line":"            context \u003d self.obj_context.elevated()"},{"line_number":79,"context_line":"            self.FIP_OBJ \u003d router.FloatingIP.get_object("},{"line_number":80,"context_line":"                context, id\u003dself.floatingip_id)"},{"line_number":81,"context_line":"        return self.FIP_OBJ"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_4cbe1f01","line":78,"range":{"start_line":78,"start_character":39,"end_line":78,"end_character":47},"updated":"2018-06-18 21:01:09.000000000","message":"I guess there must be a reason to use a elevated context, but I think it is better to avoid this when listing the floating IP. I think this will align with the tenancy model better and ensure the users won\u0027t list any floating IP in other tenant.","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"2b85788da1cd79f5d884a836b421ad15bf4dc439","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _get_fip_obj(self):"},{"line_number":77,"context_line":"        if not self.FIP_OBJ:"},{"line_number":78,"context_line":"            context \u003d self.obj_context.elevated()"},{"line_number":79,"context_line":"            self.FIP_OBJ \u003d router.FloatingIP.get_object("},{"line_number":80,"context_line":"                context, id\u003dself.floatingip_id)"},{"line_number":81,"context_line":"        return self.FIP_OBJ"}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_baf36009","line":78,"range":{"start_line":78,"start_character":39,"end_line":78,"end_character":47},"in_reply_to":"5f7c97a3_4cbe1f01","updated":"2018-06-19 03:29:14.000000000","message":"This try to fit all cases that if a admin user create a cross-tenant port forwarding, which means the associated neutron port owned by tenant A, the floating ip owned by tenant B. Then a user from tenant A can know the tenant B\u0027s floatingip_id and port forwarding id in some abnormal way, then the user from tenant A want to request a url /floatingips/FIP_ID/portforwardings or /floatingips/FIP_ID/portforwardings/PORTFORWARDING_ID.\n\nThen for the there urls process, let\u0027s discuss the second one, the first is the same. please see the master code [1].\ndef show - \u003e def _item this func will directly call the plugin func, then do auth, which is different with other funcs, such as def _create, def _delete, def _update which auth first, then process real operation in the next. So even though, we define the \"get_floatingip_port_forwarding\" policy, it will raised error in server side, if the request user not owned the floatingip and not owned a admin role, as we know the port forwarding resource can not exist without a floatingip_id(also we define the port forwarding obj attr \u0027floatingip_id\u0027 not NULL). Server side will raise 500. For check in policy after real GET, I elevate the context, so, that\u0027s why I do this.\n\nFor def index, yes, it will also directly call the plugin\u0027s func. We write the func to check the fip exist first. Then raise 404 floatingipNOTFOUND. Not check the policy.\n\nAlso there is subconscious in my mind that:\n1) if you know floatingip_id, you maybe the floatingip owner or not, so we check floatingip first.\n2) if you know floatingip_id, and portforwarding_id, eventhough the floatingip is the parent resource, now that you know the portforwarding_id already, you must be the floatingip owner, I(neutron server) will check the subresource first, it will be success if the port forwarding exists. Then according to the defined policy to process next(return / not return/ 404).\nSo for 2), if we also do the same with list portforwarding, which check the floatingip first, the policy defination of get_floatingip_port_forwarding is meaningless.As we still return 404 floatingip NOT found.\n\nThey(GET/LIST) seem different. The return errcode is the same(404), but the response body is different(GET return resource not found by policy check failed, LIST reutrn floatingip NOT FOUND), then the security issue hit. So I think I need to change the \"get_floatinigip_port_forwarding\" func in pf_plugin.py for get port forwarding obj by fip_id and portforwarding_id. Any suggests about this?\n\nFor create/update/delete cases, it will be the same, as do_auth is hit before do_creata/update/delete.\n\n\n[1] http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/base.py#n361\nhttp://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/base.py#n341\n\n\nOther notes:\nplease see\nhttps://review.openstack.org/#/c/574673/5/neutron/services/portforwarding/pf_plugin.py@87 .\nFor the case,\n* create a port forwarding based on tenant A\u0027s internal neutron port\n* based on a floatingip of tenant B\nA admin user create a port forwarding based on the requirement below. It will be success. So the user of tenant B want to UPDATE/DELETE his/her floatingip.\n\nhttps://review.openstack.org/#/c/574673/5/neutron/services/portforwarding/pf_plugin.py@127 .\nFor the case,\n* create a port forwarding based on tenant A\u0027s internal neutron port\n* based on a floatingip of tenant B\nThen, a admin user create a port forwarding based on the requirement below. It will be success. So the user of tenant A DELETE/UPDATE the neutron port which was associated with the port forwarding resource already. We need to delete the associated port forwarding for free the floatingip.","commit_id":"d120d8cc5862c358a0de78045f080793dd25a66d"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    fields_need_translation \u003d {"},{"line_number":42,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":43,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_c58301cb","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":26},"updated":"2018-06-28 22:19:37.000000000","message":"why though ? socket to socket ?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                    \u0027Port\u0027: {\u0027internal_port_id\u0027: \u0027id\u0027}}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    fields_need_translation \u003d {"},{"line_number":42,"context_line":"        \u0027socket\u0027: \u0027socket\u0027,"},{"line_number":43,"context_line":"        \u0027internal_port_id\u0027: \u0027internal_neutron_port_id\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_71aaefd3","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":26},"in_reply_to":"5f7c97a3_c58301cb","updated":"2018-06-29 04:35:53.000000000","message":"I explained it in PS13, I copy it from there.\n As this obj doesn\u0027t define a field named \u0027socket\u0027, but the db model does. And this obj defines some fields ‘internal_ip_address’ and \u0027internal_port\u0027 which can be accepted by this obj, but the db model doesn\u0027t. So if I don\u0027t set the \u0027socket\u0027 into fields_need_translation, when we CRUD the obj, the db won\u0027t store it. Please see\nhttp://git.openstack.org/cgit/openstack/neutron/tree/neutron/objects/base.py#n468\n\nJust from my opinion, the current obj now is an abnormal case from the others, I think. :)\nPlease feel free to correct. Any other nicer ideas are welcome. :)","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"1a9f96b78dfaa666a1d63fd557b4e92969ee7e51","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        super(PortForwarding, self).obj_load_attr(attrname)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _get_fip_obj(self):"},{"line_number":85,"context_line":"        if not self.FIP_OBJ:"},{"line_number":86,"context_line":"            self.FIP_OBJ \u003d router.FloatingIP.get_object("},{"line_number":87,"context_line":"                self.obj_context, id\u003dself.floatingip_id)"},{"line_number":88,"context_line":"        return self.FIP_OBJ"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_eb2a357c","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":28},"updated":"2018-07-03 21:58:31.000000000","message":"IMO, this caching of object may create issues, I guess a fresh copy of object should always be fetched couple of potential failures I could think of.\n\n1. suppose it mixes different fip objects, since self.FIP_OBJ has no id comparison or match. imagine multiple fips being fetched at the same time, in that case what\u0027s guarantee that its the right one ?\n\n2. In case it gets right fip, but what if it is stale not updated ?\n\nits better do a fresh get_object for all cases or have some id comparison in place","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"488daa19a9418591c7ac4e4fff8f90e23f71da31","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        super(PortForwarding, self).obj_load_attr(attrname)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _get_fip_obj(self):"},{"line_number":85,"context_line":"        if not self.FIP_OBJ:"},{"line_number":86,"context_line":"            self.FIP_OBJ \u003d router.FloatingIP.get_object("},{"line_number":87,"context_line":"                self.obj_context, id\u003dself.floatingip_id)"},{"line_number":88,"context_line":"        return self.FIP_OBJ"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_127c61e8","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":28},"in_reply_to":"5f7c97a3_54ce6a5b","updated":"2018-07-05 16:20:33.000000000","message":"just normal get_object based on fip id and return it would be fine and it will issue get_object with id every time its requested.","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"5ba9ca1ebad523a46842bac4a3e8e590a4cb6ddf","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        super(PortForwarding, self).obj_load_attr(attrname)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _get_fip_obj(self):"},{"line_number":85,"context_line":"        if not self.FIP_OBJ:"},{"line_number":86,"context_line":"            self.FIP_OBJ \u003d router.FloatingIP.get_object("},{"line_number":87,"context_line":"                self.obj_context, id\u003dself.floatingip_id)"},{"line_number":88,"context_line":"        return self.FIP_OBJ"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_54ce6a5b","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":28},"in_reply_to":"5f7c97a3_eb2a357c","updated":"2018-07-04 02:55:35.000000000","message":"Thanks for review. Let me test about your mentioned.\n\nNotes:\nWe just want the \u0027floating_ip_address\u0027 and \u0027router_id\u0027 from floatingip. \u0027floating_ip_address\u0027 won\u0027t change if fip still exists, and in api logic, we do not allow to delete fip before port forwarding(more details see race issue patch, eventhough the db record defined the \"cascaded-delete\"), also it is called by from_db_object and behind the base from_db_object, that means the port forwarding had been found, then the fip must exist. So that\u0027s the logic here.\n\nOh, I test it, every port forwarding obj won\u0027t a  self.FIP_OBJ, it will get the fip object every time during get port forwarding from db. So I think to remove  self.FIP_OBJ, just get_object. Any suggests？","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"}],"neutron/services/portforwarding/common/exceptions.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class LogResourceNotFound(n_exc.NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_9020854a","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":37},"updated":"2018-04-20 09:38:20.000000000","message":"`id` is a key word for python, someone will write such code: PortForwardingNotFound(id\u003d\"a_id\").\nIt\u0027s better to change to port_forward_id or something like that.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class LogResourceNotFound(n_exc.NotFound):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_674de3c2","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":37},"in_reply_to":"9f6a8fd7_9020854a","updated":"2018-04-21 07:17:41.000000000","message":"Thanks, will change.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    message \u003d _(\"Invalid log resource_type: %(resource_type)s.\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class LoggingTypeNotSupported(n_exc.Conflict):"},{"line_number":33,"context_line":"    message \u003d _(\"Logging type %(log_type)s is not supported on \""},{"line_number":34,"context_line":"                \"port %(port_id)s.\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class TargetResourceNotFound(n_exc.NotFound):"},{"line_number":38,"context_line":"    message \u003d _(\"Target resource %(target_id)s could not be found.\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class ResourceNotFound(n_exc.NotFound):"},{"line_number":42,"context_line":"    message \u003d _(\"Resource %(resource_id)s could not be found.\")"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class InvalidResourceConstraint(n_exc.InvalidInput):"},{"line_number":46,"context_line":"    message \u003d _(\"Invalid resource constraint between resource \""},{"line_number":47,"context_line":"                \"(%(resource)s %(resource_id)s) and target resource \""},{"line_number":48,"context_line":"                \"(%(target_resource)s %(target_id)s).\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"class LogapiDriverException(n_exc.NeutronException):"},{"line_number":52,"context_line":"    \"\"\"A log api driver Exception\"\"\""},{"line_number":53,"context_line":"    message \u003d _(\"Driver exception: %(exception_msg)s\")"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class CookieNotFound(n_exc.NotFound):"},{"line_number":57,"context_line":"    message \u003d _(\"Cookie %(cookie_id)s could not be found.\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_b001b86c","line":57,"range":{"start_line":32,"start_character":0,"end_line":57,"end_character":59},"updated":"2018-05-15 07:40:40.000000000","message":"Seems all duplicated to neutron.services.logapi.common.exceptions","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    message \u003d _(\"Invalid log resource_type: %(resource_type)s.\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class LoggingTypeNotSupported(n_exc.Conflict):"},{"line_number":33,"context_line":"    message \u003d _(\"Logging type %(log_type)s is not supported on \""},{"line_number":34,"context_line":"                \"port %(port_id)s.\")"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class TargetResourceNotFound(n_exc.NotFound):"},{"line_number":38,"context_line":"    message \u003d _(\"Target resource %(target_id)s could not be found.\")"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class ResourceNotFound(n_exc.NotFound):"},{"line_number":42,"context_line":"    message \u003d _(\"Resource %(resource_id)s could not be found.\")"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class InvalidResourceConstraint(n_exc.InvalidInput):"},{"line_number":46,"context_line":"    message \u003d _(\"Invalid resource constraint between resource \""},{"line_number":47,"context_line":"                \"(%(resource)s %(resource_id)s) and target resource \""},{"line_number":48,"context_line":"                \"(%(target_resource)s %(target_id)s).\")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"class LogapiDriverException(n_exc.NeutronException):"},{"line_number":52,"context_line":"    \"\"\"A log api driver Exception\"\"\""},{"line_number":53,"context_line":"    message \u003d _(\"Driver exception: %(exception_msg)s\")"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"class CookieNotFound(n_exc.NotFound):"},{"line_number":57,"context_line":"    message \u003d _(\"Cookie %(cookie_id)s could not be found.\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_50106457","line":57,"range":{"start_line":32,"start_character":0,"end_line":57,"end_character":59},"in_reply_to":"5f7c97a3_b001b86c","updated":"2018-05-15 09:13:30.000000000","message":"OH, forget to remove..Thanks for point out.","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(port_forwarding_id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_b21d72bf","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":51},"updated":"2018-05-29 08:29:09.000000000","message":"IMHO just \"id\" would be enough here","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(port_forwarding_id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d88a8d62","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":51},"in_reply_to":"5f7c97a3_b21d72bf","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"},{"line_number":25,"context_line":"    message \u003d _(\"Port Forwarding lists can not be filtered by \""},{"line_number":26,"context_line":"                \"%(invalid_filter)s\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_72791afa","line":26,"range":{"start_line":26,"start_character":19,"end_line":26,"end_character":27},"updated":"2018-05-29 08:29:09.000000000","message":"IMHO just \"filter\" would be enough","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"},{"line_number":25,"context_line":"    message \u003d _(\"Port Forwarding lists can not be filtered by \""},{"line_number":26,"context_line":"                \"%(invalid_filter)s\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_78e9f917","line":26,"range":{"start_line":26,"start_character":19,"end_line":26,"end_character":27},"in_reply_to":"5f7c97a3_72791afa","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"91931a65b086d17b08c418149de71b4a26689259","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Fujitsu Limited."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_e9bd02d8","line":1,"range":{"start_line":1,"start_character":11,"end_line":1,"end_character":16},"updated":"2018-05-31 21:31:07.000000000","message":"2018","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Fujitsu Limited."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_28b3dc0b","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":33},"updated":"2018-06-01 23:52:52.000000000","message":"And you don\u0027t work for Fujitsu, as far as I know ;-)","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d02172c1de4e8cf2ebc08fffbe6af7c8ae6afd3f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Fujitsu Limited."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b732040f","line":1,"range":{"start_line":1,"start_character":11,"end_line":1,"end_character":16},"in_reply_to":"5f7c97a3_e9bd02d8","updated":"2018-06-01 01:15:49.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"91931a65b086d17b08c418149de71b4a26689259","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_49dd16db","line":21,"range":{"start_line":21,"start_character":17,"end_line":21,"end_character":60},"updated":"2018-05-31 21:31:07.000000000","message":"portforwarding resource has its own id, so is this that id or port id, \n\ncan port_id be included in this that would make more sense, IMO.\n\n\"Port forwarding for port %(port_id)s could not be found\"","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"d02172c1de4e8cf2ebc08fffbe6af7c8ae6afd3f","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class PortForwardingNotFound(n_exc.NotFound):"},{"line_number":21,"context_line":"    message \u003d _(\"Port Forwarding %(id)s could not be found.\")"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_3ab01943","line":21,"range":{"start_line":21,"start_character":17,"end_line":21,"end_character":60},"in_reply_to":"5f7c97a3_49dd16db","updated":"2018-06-01 01:15:49.000000000","message":"This is the id of port forwarding resource. As the error will be raised during get/update/delete a single port forwarding resource, I think the extended info(port association/fip association) is not good for exposing during requests. Could you tell me your cases? For now, It may looks odd if we expose the port id or some associations.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"},{"line_number":25,"context_line":"    message \u003d _(\"Port Forwarding lists can not be filtered by %(filter)s\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_8809a333","line":25,"range":{"start_line":25,"start_character":72,"end_line":25,"end_character":73},"updated":"2018-06-28 18:51:21.000000000","message":"missing trailing period","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PortForwardingNotSupportFilterField(n_exc.BadRequest):"},{"line_number":25,"context_line":"    message \u003d _(\"Port Forwarding lists can not be filtered by %(filter)s\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_f1cd9fba","line":25,"range":{"start_line":25,"start_character":72,"end_line":25,"end_character":73},"in_reply_to":"5f7c97a3_8809a333","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/services/portforwarding/pf_plugin.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"import collections"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron._i18n import _"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.api.rpc.callbacks import events as rpc_events"},{"line_number":22,"context_line":"from neutron.api.rpc.handlers import resources_rpc"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_70e851e1","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":27},"updated":"2018-04-20 09:38:20.000000000","message":"Seems we no longer translate the log.","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"import collections"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron._i18n import _"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.api.rpc.callbacks import events as rpc_events"},{"line_number":22,"context_line":"from neutron.api.rpc.handlers import resources_rpc"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_47ce9f2e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":27},"in_reply_to":"9f6a8fd7_70e851e1","updated":"2018-04-21 07:17:41.000000000","message":"Yeah, I didn\u0027t feed some log translation, just err message. :)","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cd0e1b1621fa6cafb3669ec7b1554412fdb85520","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":129,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        # TODO use API layer to translate the value to IPNETWORK,"},{"line_number":132,"context_line":"        # NO way TO SET,"},{"line_number":133,"context_line":"        # So set them here for now."},{"line_number":134,"context_line":"        port_forwarding[\u0027port_forwarding\u0027]["}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_90ce4580","line":131,"range":{"start_line":131,"start_character":10,"end_line":131,"end_character":14},"updated":"2018-04-20 09:38:20.000000000","message":"Who take responsibility for this ? Will do it in this patch? Or a future patch?","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"1792d7cb0c638e7f8cbc0782fcaadf30665642b0","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":129,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        # TODO use API layer to translate the value to IPNETWORK,"},{"line_number":132,"context_line":"        # NO way TO SET,"},{"line_number":133,"context_line":"        # So set them here for now."},{"line_number":134,"context_line":"        port_forwarding[\u0027port_forwarding\u0027]["}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_07d427bc","line":131,"range":{"start_line":131,"start_character":10,"end_line":131,"end_character":14},"in_reply_to":"9f6a8fd7_90ce4580","updated":"2018-04-21 07:17:41.000000000","message":"I will do in this patch. But for now, I don\u0027t find a good way to set the IPNetwork value. So, it\u0027s for reminding me not forget it. :)","commit_id":"87c978e430ff99b288585d216df13d1e9b92c12a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            internal_ip_address, fixed_ips)"},{"line_number":90,"context_line":"        if not internal_subnet_id:"},{"line_number":91,"context_line":"            message \u003d _("},{"line_number":92,"context_line":"                \"Requested Internal IP address %(internal_ip_address)s is not \""},{"line_number":93,"context_line":"                \"suitable for Internal Neutron Port %(internal_port_id)s, as \""},{"line_number":94,"context_line":"                \"its fixed_ips are %(fixed_ips)s\") % {"},{"line_number":95,"context_line":"                \u0027internal_ip_address\u0027: internal_ip_address,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_50d38404","line":92,"range":{"start_line":92,"start_character":27,"end_line":92,"end_character":35},"updated":"2018-05-15 07:40:40.000000000","message":"lower case","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            internal_ip_address, fixed_ips)"},{"line_number":90,"context_line":"        if not internal_subnet_id:"},{"line_number":91,"context_line":"            message \u003d _("},{"line_number":92,"context_line":"                \"Requested Internal IP address %(internal_ip_address)s is not \""},{"line_number":93,"context_line":"                \"suitable for Internal Neutron Port %(internal_port_id)s, as \""},{"line_number":94,"context_line":"                \"its fixed_ips are %(fixed_ips)s\") % {"},{"line_number":95,"context_line":"                \u0027internal_ip_address\u0027: internal_ip_address,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_1a344692","line":92,"range":{"start_line":92,"start_character":27,"end_line":92,"end_character":35},"in_reply_to":"5f7c97a3_50d38404","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d5fdbfb38aee40822afae906657fce726b8e098f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        if not internal_subnet_id:"},{"line_number":91,"context_line":"            message \u003d _("},{"line_number":92,"context_line":"                \"Requested Internal IP address %(internal_ip_address)s is not \""},{"line_number":93,"context_line":"                \"suitable for Internal Neutron Port %(internal_port_id)s, as \""},{"line_number":94,"context_line":"                \"its fixed_ips are %(fixed_ips)s\") % {"},{"line_number":95,"context_line":"                \u0027internal_ip_address\u0027: internal_ip_address,"},{"line_number":96,"context_line":"                \u0027internal_port_id\u0027: internal_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_30d4c8e8","line":93,"range":{"start_line":93,"start_character":30,"end_line":93,"end_character":51},"updated":"2018-05-15 07:40:40.000000000","message":"lower case","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"708d11f4db135c2279084d7ba34369ebdedb2ada","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        if not internal_subnet_id:"},{"line_number":91,"context_line":"            message \u003d _("},{"line_number":92,"context_line":"                \"Requested Internal IP address %(internal_ip_address)s is not \""},{"line_number":93,"context_line":"                \"suitable for Internal Neutron Port %(internal_port_id)s, as \""},{"line_number":94,"context_line":"                \"its fixed_ips are %(fixed_ips)s\") % {"},{"line_number":95,"context_line":"                \u0027internal_ip_address\u0027: internal_ip_address,"},{"line_number":96,"context_line":"                \u0027internal_port_id\u0027: internal_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_ba267267","line":93,"range":{"start_line":93,"start_character":30,"end_line":93,"end_character":51},"in_reply_to":"5f7c97a3_30d4c8e8","updated":"2018-05-15 09:13:30.000000000","message":"Done","commit_id":"2dc35099b7508540727dc8e5635550e452c46146"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.core_plugin \u003d self._get_core_plugin()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _get_l3_plugin(self):"},{"line_number":65,"context_line":"        if not self.L3_PLUGIN:"},{"line_number":66,"context_line":"            self.L3_PLUGIN \u003d directory.get_plugin(constants.L3)"},{"line_number":67,"context_line":"        return self.L3_PLUGIN"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _get_core_plugin(self):"},{"line_number":70,"context_line":"        if not self.CORE_PLUGIN:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_329ba217","line":67,"range":{"start_line":65,"start_character":8,"end_line":67,"end_character":29},"updated":"2018-05-29 08:29:09.000000000","message":"this looks for me like kind of \"lazy loading\" of l3 plugin but it\u0027s used only in __init__ method so if You want to load it always in __init__, can\u0027t You just load it directly there?\nOr use this method but only where it is really needed :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.core_plugin \u003d self._get_core_plugin()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _get_l3_plugin(self):"},{"line_number":65,"context_line":"        if not self.L3_PLUGIN:"},{"line_number":66,"context_line":"            self.L3_PLUGIN \u003d directory.get_plugin(constants.L3)"},{"line_number":67,"context_line":"        return self.L3_PLUGIN"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _get_core_plugin(self):"},{"line_number":70,"context_line":"        if not self.CORE_PLUGIN:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_98517539","line":67,"range":{"start_line":65,"start_character":8,"end_line":67,"end_character":29},"in_reply_to":"5f7c97a3_329ba217","updated":"2018-05-29 09:36:20.000000000","message":"Correct. I will change to load them directly. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return self.L3_PLUGIN"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _get_core_plugin(self):"},{"line_number":70,"context_line":"        if not self.CORE_PLUGIN:"},{"line_number":71,"context_line":"            self.CORE_PLUGIN \u003d directory.get_plugin()"},{"line_number":72,"context_line":"        return self.CORE_PLUGIN"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":75,"context_line":"        for fixed_ip in exist_fixed_ips:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1286a6ba","line":72,"range":{"start_line":70,"start_character":0,"end_line":72,"end_character":31},"updated":"2018-05-29 08:29:09.000000000","message":"same here","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        return self.L3_PLUGIN"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _get_core_plugin(self):"},{"line_number":70,"context_line":"        if not self.CORE_PLUGIN:"},{"line_number":71,"context_line":"            self.CORE_PLUGIN \u003d directory.get_plugin()"},{"line_number":72,"context_line":"        return self.CORE_PLUGIN"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":75,"context_line":"        for fixed_ip in exist_fixed_ips:"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3842a169","line":72,"range":{"start_line":70,"start_character":0,"end_line":72,"end_character":31},"in_reply_to":"5f7c97a3_1286a6ba","updated":"2018-05-29 09:36:20.000000000","message":"Correct. I will change to load them directly. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.CORE_PLUGIN \u003d directory.get_plugin()"},{"line_number":72,"context_line":"        return self.CORE_PLUGIN"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":75,"context_line":"        for fixed_ip in exist_fixed_ips:"},{"line_number":76,"context_line":"            if netaddr.IPNetwork("},{"line_number":77,"context_line":"                    fixed_ip[\u0027ip_address\u0027]) \u003d\u003d netaddr.IPNetwork(request_ip):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_72befa65","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":43},"updated":"2018-05-29 08:29:09.000000000","message":"what this method should in fact do? there is \"get\" and \"check\" in one name. IMO method should do only one thing at all :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            self.CORE_PLUGIN \u003d directory.get_plugin()"},{"line_number":72,"context_line":"        return self.CORE_PLUGIN"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":75,"context_line":"        for fixed_ip in exist_fixed_ips:"},{"line_number":76,"context_line":"            if netaddr.IPNetwork("},{"line_number":77,"context_line":"                    fixed_ip[\u0027ip_address\u0027]) \u003d\u003d netaddr.IPNetwork(request_ip):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_a3044216","line":74,"range":{"start_line":74,"start_character":8,"end_line":74,"end_character":43},"in_reply_to":"5f7c97a3_72befa65","updated":"2018-05-29 09:36:20.000000000","message":"Ha, thanks for suggestion. Yeah, that\u0027s the right code behavior/style. This method(called by _find_a_router_for_fippf L88-L99) is for check the request internal_ip_address is in the fixips list of the neutron internal port. This method will return the right subnet_id, and the api validate(L90) will based on the returned value to raise the Badrequest.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except lib_l3_exc.ExternalGatewayForFloatingIPNotFound:"},{"line_number":108,"context_line":"            message \u003d _("},{"line_number":109,"context_line":"                \"External network %(external_net_id)s is not reachable from \""},{"line_number":110,"context_line":"                \"subnet %(internal_subnet_id)s. Cannot setting \""},{"line_number":111,"context_line":"                \"Port forwarding for Port %(internal_port_id)s with \""},{"line_number":112,"context_line":"                \"Floating IP %(port_forwarding_id)s\") % {"},{"line_number":113,"context_line":"                \u0027external_net_id\u0027: external_network_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_32372201","line":110,"range":{"start_line":110,"start_character":55,"end_line":110,"end_character":62},"updated":"2018-05-29 08:29:09.000000000","message":"shouldn\u0027t be \"set\"?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        except lib_l3_exc.ExternalGatewayForFloatingIPNotFound:"},{"line_number":108,"context_line":"            message \u003d _("},{"line_number":109,"context_line":"                \"External network %(external_net_id)s is not reachable from \""},{"line_number":110,"context_line":"                \"subnet %(internal_subnet_id)s. Cannot setting \""},{"line_number":111,"context_line":"                \"Port forwarding for Port %(internal_port_id)s with \""},{"line_number":112,"context_line":"                \"Floating IP %(port_forwarding_id)s\") % {"},{"line_number":113,"context_line":"                \u0027external_net_id\u0027: external_network_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_98ee5520","line":110,"range":{"start_line":110,"start_character":55,"end_line":110,"end_character":62},"in_reply_to":"5f7c97a3_32372201","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":150,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":151,"context_line":"                        \"exist a portforwarding with params \""},{"line_number":152,"context_line":"                        \"%s\") % conflict_param"},{"line_number":153,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":154,"context_line":"                                     msg\u003dmessage)"},{"line_number":155,"context_line":"        self.push_api.push(context, [pf_obj], rpc_events.CREATED)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_5dde6f3e","line":152,"range":{"start_line":152,"start_character":32,"end_line":152,"end_character":46},"updated":"2018-05-29 08:29:09.000000000","message":"conflict param (one) or params like is in message?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":150,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":151,"context_line":"                        \"exist a portforwarding with params \""},{"line_number":152,"context_line":"                        \"%s\") % conflict_param"},{"line_number":153,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":154,"context_line":"                                     msg\u003dmessage)"},{"line_number":155,"context_line":"        self.push_api.push(context, [pf_obj], rpc_events.CREATED)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_986895f5","line":152,"range":{"start_line":152,"start_character":32,"end_line":152,"end_character":46},"in_reply_to":"5f7c97a3_5dde6f3e","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                internal_port\u003dpf_dict["},{"line_number":180,"context_line":"                    \u0027port_forwarding\u0027][\u0027internal_port\u0027])"},{"line_number":181,"context_line":"            if objs:"},{"line_number":182,"context_line":"                message \u003d _(\"There is exist Floating IP %(floatingip_id)s \""},{"line_number":183,"context_line":"                            \"with params: internal_ip_address: \""},{"line_number":184,"context_line":"                            \"%(internal_ip_address)s, internal_port: \""},{"line_number":185,"context_line":"                            \"%(internal_port)s\") % {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_bdc5435e","line":182,"range":{"start_line":182,"start_character":29,"end_line":182,"end_character":75},"updated":"2018-05-29 08:29:09.000000000","message":"I would rather propose something like \"Floating IP %(fip_id)s with params: ... already exists\"","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                internal_port\u003dpf_dict["},{"line_number":180,"context_line":"                    \u0027port_forwarding\u0027][\u0027internal_port\u0027])"},{"line_number":181,"context_line":"            if objs:"},{"line_number":182,"context_line":"                message \u003d _(\"There is exist Floating IP %(floatingip_id)s \""},{"line_number":183,"context_line":"                            \"with params: internal_ip_address: \""},{"line_number":184,"context_line":"                            \"%(internal_ip_address)s, internal_port: \""},{"line_number":185,"context_line":"                            \"%(internal_port)s\") % {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9dc16757","line":182,"range":{"start_line":182,"start_character":38,"end_line":182,"end_character":43},"updated":"2018-05-29 08:29:09.000000000","message":"existing","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                internal_port\u003dpf_dict["},{"line_number":180,"context_line":"                    \u0027port_forwarding\u0027][\u0027internal_port\u0027])"},{"line_number":181,"context_line":"            if objs:"},{"line_number":182,"context_line":"                message \u003d _(\"There is exist Floating IP %(floatingip_id)s \""},{"line_number":183,"context_line":"                            \"with params: internal_ip_address: \""},{"line_number":184,"context_line":"                            \"%(internal_ip_address)s, internal_port: \""},{"line_number":185,"context_line":"                            \"%(internal_port)s\") % {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_98c3b5ed","line":182,"range":{"start_line":182,"start_character":38,"end_line":182,"end_character":43},"in_reply_to":"5f7c97a3_9dc16757","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                internal_port\u003dpf_dict["},{"line_number":180,"context_line":"                    \u0027port_forwarding\u0027][\u0027internal_port\u0027])"},{"line_number":181,"context_line":"            if objs:"},{"line_number":182,"context_line":"                message \u003d _(\"There is exist Floating IP %(floatingip_id)s \""},{"line_number":183,"context_line":"                            \"with params: internal_ip_address: \""},{"line_number":184,"context_line":"                            \"%(internal_ip_address)s, internal_port: \""},{"line_number":185,"context_line":"                            \"%(internal_port)s\") % {"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_58b99d76","line":182,"range":{"start_line":182,"start_character":29,"end_line":182,"end_character":75},"in_reply_to":"5f7c97a3_bdc5435e","updated":"2018-05-29 09:36:20.000000000","message":"Thanks, I will rework here.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        \u0027internal_port\u0027]}"},{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7da1eba8","line":193,"range":{"start_line":193,"start_character":32,"end_line":193,"end_character":33},"updated":"2018-05-29 08:29:09.000000000","message":"lowercase","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        \u0027internal_port\u0027]}"},{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_9da647c1","line":193,"range":{"start_line":193,"start_character":58,"end_line":193,"end_character":59},"updated":"2018-05-29 08:29:09.000000000","message":"lowercase","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        \u0027internal_port\u0027]}"},{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_78bed965","line":193,"range":{"start_line":193,"start_character":32,"end_line":193,"end_character":33},"in_reply_to":"5f7c97a3_7da1eba8","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                        \u0027internal_port\u0027]}"},{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1886c5ba","line":193,"range":{"start_line":193,"start_character":58,"end_line":193,"end_character":59},"in_reply_to":"5f7c97a3_9da647c1","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"},{"line_number":197,"context_line":"                    \u0027internal_port_id\u0027: internal_port_id}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3da7f3be","line":194,"range":{"start_line":194,"start_character":29,"end_line":194,"end_character":30},"updated":"2018-05-29 08:29:09.000000000","message":"lowercase","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            else:"},{"line_number":192,"context_line":"                message \u003d _(\"The Floating IP %(floatingip_id)s had been set \""},{"line_number":193,"context_line":"                            \"on Router %(router_id)s, the Internal Neutron \""},{"line_number":194,"context_line":"                            \"Port %(internal_port_id)s can not reach it\") % {"},{"line_number":195,"context_line":"                    \u0027floatingip_id\u0027: fip_obj.id,"},{"line_number":196,"context_line":"                    \u0027router_id\u0027: fip_obj.router_id,"},{"line_number":197,"context_line":"                    \u0027internal_port_id\u0027: internal_port_id}"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_f888a9c6","line":194,"range":{"start_line":194,"start_character":29,"end_line":194,"end_character":30},"in_reply_to":"5f7c97a3_3da7f3be","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":199,"context_line":"                                     msg\u003dmessage)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":202,"context_line":"                       specify_params\u003dNone):"},{"line_number":203,"context_line":"        if not specify_params:"},{"line_number":204,"context_line":"            internal_port_id \u003d port_forwarding["}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1d7b1728","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":22},"updated":"2018-05-29 08:29:09.000000000","message":"what exactly this method should do?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":199,"context_line":"                                     msg\u003dmessage)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":202,"context_line":"                       specify_params\u003dNone):"},{"line_number":203,"context_line":"        if not specify_params:"},{"line_number":204,"context_line":"            internal_port_id \u003d port_forwarding["}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_98e2d5d4","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":22},"in_reply_to":"5f7c97a3_1d7b1728","updated":"2018-05-29 09:36:20.000000000","message":"Let me explain here, this method is called by create_floatingip_port_forwarding method. If create failure, I think we need to figure out what input parameters cause the NeutronDbObjectDuplicateEntry for user\u0027s bad requests.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":202,"context_line":"                       specify_params\u003dNone):"},{"line_number":203,"context_line":"        if not specify_params:"},{"line_number":204,"context_line":"            internal_port_id \u003d port_forwarding["},{"line_number":205,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_port_id\u0027]"},{"line_number":206,"context_line":"            internal_ip_address \u003d port_forwarding["},{"line_number":207,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_ip_address\u0027]"},{"line_number":208,"context_line":"            external_port \u003d port_forwarding["},{"line_number":209,"context_line":"                \u0027port_forwarding\u0027][\u0027external_port\u0027]"},{"line_number":210,"context_line":"            internal_port \u003d port_forwarding["},{"line_number":211,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_port\u0027]"},{"line_number":212,"context_line":"            params \u003d [{\u0027floating_ip_id\u0027: floatingip_id,"},{"line_number":213,"context_line":"                       \u0027external_port\u0027: external_port},"},{"line_number":214,"context_line":"                      {\u0027internal_port_id\u0027: internal_port_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1da0f78f","line":211,"range":{"start_line":204,"start_character":12,"end_line":211,"end_character":51},"updated":"2018-05-29 08:29:09.000000000","message":"why You need those variables here? They are not used anywhere except lines 213-216 where You can use directly \"port_forwarding[\u0027port_forwarding\u0027][...]\"","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":202,"context_line":"                       specify_params\u003dNone):"},{"line_number":203,"context_line":"        if not specify_params:"},{"line_number":204,"context_line":"            internal_port_id \u003d port_forwarding["},{"line_number":205,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_port_id\u0027]"},{"line_number":206,"context_line":"            internal_ip_address \u003d port_forwarding["},{"line_number":207,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_ip_address\u0027]"},{"line_number":208,"context_line":"            external_port \u003d port_forwarding["},{"line_number":209,"context_line":"                \u0027port_forwarding\u0027][\u0027external_port\u0027]"},{"line_number":210,"context_line":"            internal_port \u003d port_forwarding["},{"line_number":211,"context_line":"                \u0027port_forwarding\u0027][\u0027internal_port\u0027]"},{"line_number":212,"context_line":"            params \u003d [{\u0027floating_ip_id\u0027: floatingip_id,"},{"line_number":213,"context_line":"                       \u0027external_port\u0027: external_port},"},{"line_number":214,"context_line":"                      {\u0027internal_port_id\u0027: internal_port_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_389b8117","line":211,"range":{"start_line":204,"start_character":12,"end_line":211,"end_character":51},"in_reply_to":"5f7c97a3_1da0f78f","updated":"2018-05-29 09:36:20.000000000","message":"Yeah, we can do that, this is just for the each Line limit 79, as the format is not good for read..So I make it from that to this.\n\nThis creation case, the specify_params is None, also the db side define the UniqueConstraint like https://review.openstack.org/#/c/535647/13/neutron/db/models/port_forwarding.py@28-33 . So I think we need to figure out which constraint we hit. So the params would be like L212-216 for dunplication records.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":225,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":226,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":227,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":228,"context_line":"        if not obj:"},{"line_number":229,"context_line":"            raise pf_exc.PortForwardingNotFound(port_forwarding_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_dda59fa0","line":226,"updated":"2018-05-29 08:29:09.000000000","message":"will You add it in this patch or in following one?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":225,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":226,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":227,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":228,"context_line":"        if not obj:"},{"line_number":229,"context_line":"            raise pf_exc.PortForwardingNotFound(port_forwarding_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_f87d091c","line":226,"in_reply_to":"5f7c97a3_dda59fa0","updated":"2018-05-29 09:36:20.000000000","message":"I\u0027m not sure whether we should support the fields function \u0027-F\u0027, as it just a very simple response body. So I hesitated and write this TODO for future work if possible. Could you please give some advices for this and L245.","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            context, _pager\u003dpager, floating_ip_id\u003dfloatingip_id, **filters)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":256,"context_line":"        self._delete_port_forwarding(context, id, **kwargs)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _delete_port_forwarding(self, context, id, **kwargs):"},{"line_number":259,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":260,"context_line":"        pf_obj \u003d pf.PortForwarding.get_object("},{"line_number":261,"context_line":"            context, id\u003did, floating_ip_id\u003dfloatingip_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_3dae1381","line":258,"range":{"start_line":256,"start_character":8,"end_line":258,"end_character":61},"updated":"2018-05-29 08:29:09.000000000","message":"is this private method really necessary?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            context, _pager\u003dpager, floating_ip_id\u003dfloatingip_id, **filters)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":256,"context_line":"        self._delete_port_forwarding(context, id, **kwargs)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _delete_port_forwarding(self, context, id, **kwargs):"},{"line_number":259,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":260,"context_line":"        pf_obj \u003d pf.PortForwarding.get_object("},{"line_number":261,"context_line":"            context, id\u003did, floating_ip_id\u003dfloatingip_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_38d94155","line":258,"range":{"start_line":256,"start_character":8,"end_line":258,"end_character":61},"in_reply_to":"5f7c97a3_3dae1381","updated":"2018-05-29 09:36:20.000000000","message":"For a brief sight, it\u0027s not necesary. I will move it. :)","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def sync_port_forwarding_fip(self, context, routers):"},{"line_number":280,"context_line":"        if not routers:"},{"line_number":281,"context_line":"            return []"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        router_ids \u003d [router.get(\u0027id\u0027) for router in routers]"},{"line_number":284,"context_line":"        router_pf_fip_set \u003d collections.defaultdict(set)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_bdef83af","line":281,"updated":"2018-05-29 08:29:09.000000000","message":"Here You return empty list but if routers is not \"None\" then You will not return anything. Is that intentional?","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def sync_port_forwarding_fip(self, context, routers):"},{"line_number":280,"context_line":"        if not routers:"},{"line_number":281,"context_line":"            return []"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        router_ids \u003d [router.get(\u0027id\u0027) for router in routers]"},{"line_number":284,"context_line":"        router_pf_fip_set \u003d collections.defaultdict(set)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_d8fb6dbb","line":281,"in_reply_to":"5f7c97a3_bdef83af","updated":"2018-05-29 09:36:20.000000000","message":"Oh, good catch. This must be \"return\" is OK. As thi function is just called by l3_rpc for sync_router function. I just want to inject the port forwarding info, dont return anything. Thanks for pointing out","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e3e48666b30f5a7ac081175dba22fb226e799780","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"@resource_extend.has_resource_extenders"},{"line_number":42,"context_line":"@registry.has_registry_receivers"},{"line_number":43,"context_line":"class PortForwardingPlugin(fip_pf.PortForwardingPluginBase):"},{"line_number":44,"context_line":"    \"\"\"Implementation of the Neutron Port Forwarding Service Plugin."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    This class implements a Port Forwarding plugin."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_63afa07d","line":43,"range":{"start_line":43,"start_character":6,"end_line":43,"end_character":60},"updated":"2018-06-04 14:43:51.000000000","message":"What if floating IP A only has one port forwarding under router A, and then users try to bind this floating IP A to another port under router B, could this scenario happen？ Or could you please point us, which logical here is to prevent such behavior ?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"195e0a49d1676085610105af0f6fe360ba0eee62","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"@resource_extend.has_resource_extenders"},{"line_number":42,"context_line":"@registry.has_registry_receivers"},{"line_number":43,"context_line":"class PortForwardingPlugin(fip_pf.PortForwardingPluginBase):"},{"line_number":44,"context_line":"    \"\"\"Implementation of the Neutron Port Forwarding Service Plugin."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    This class implements a Port Forwarding plugin."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_26af762c","line":43,"range":{"start_line":43,"start_character":6,"end_line":43,"end_character":60},"in_reply_to":"5f7c97a3_63afa07d","updated":"2018-06-04 15:22:17.000000000","message":"Yeah, for current code behavior, it could be happened, but I know there are some works need to be done just like Miguel metioned in the last patchset, the floatingip extend part be not implemented yet. For the code size limitation and good for review, this patch is just for port forwarding part. For other limitation and API extend should be done in the following patch. As this patch is large enough, do you agree?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    \"\"\"Implementation of the Neutron Port Forwarding Service Plugin."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    This class implements a Port Forwarding plugin."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    supported_extension_aliases \u003d [\u0027floating-ip-port-forwarding\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_a8a92c7c","line":47,"updated":"2018-06-01 23:52:52.000000000","message":"Nit: do we need this blank line?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    \"\"\"Implementation of the Neutron Port Forwarding Service Plugin."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    This class implements a Port Forwarding plugin."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    supported_extension_aliases \u003d [\u0027floating-ip-port-forwarding\u0027]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_ca156fe7","line":47,"in_reply_to":"5f7c97a3_a8a92c7c","updated":"2018-06-04 07:34:16.000000000","message":"No, I will remove it. Thanks","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # check the matched fixed ip"},{"line_number":75,"context_line":"        internal_subnet_id \u003d self._get_subnet_check_valid_internal_ip("},{"line_number":76,"context_line":"            internal_ip_address, fixed_ips)"},{"line_number":77,"context_line":"        if not internal_subnet_id:"},{"line_number":78,"context_line":"            message \u003d _("},{"line_number":79,"context_line":"                \"Requested internal IP address %(internal_ip_address)s is not \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0885c0ac","line":76,"range":{"start_line":76,"start_character":33,"end_line":76,"end_character":42},"updated":"2018-06-01 23:52:52.000000000","message":"The port can have IPv6 addresses. Should we only pass the IPv4 addresses?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # check the matched fixed ip"},{"line_number":75,"context_line":"        internal_subnet_id \u003d self._get_subnet_check_valid_internal_ip("},{"line_number":76,"context_line":"            internal_ip_address, fixed_ips)"},{"line_number":77,"context_line":"        if not internal_subnet_id:"},{"line_number":78,"context_line":"            message \u003d _("},{"line_number":79,"context_line":"                \"Requested internal IP address %(internal_ip_address)s is not \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_eae38b05","line":76,"range":{"start_line":76,"start_character":33,"end_line":76,"end_character":42},"in_reply_to":"5f7c97a3_0885c0ac","updated":"2018-06-04 07:34:16.000000000","message":"Thanks for pointing out. Yeah, we should only pass the IPv4 address.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":109,"context_line":"    @db_api.context_manager.writer"},{"line_number":110,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":111,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":112,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":113,"context_line":"        port_forwarding[\u0027port_forwarding\u0027][\u0027floating_ip_id\u0027] \u003d floatingip_id"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_88e1d0d2","line":110,"range":{"start_line":110,"start_character":57,"end_line":110,"end_character":65},"updated":"2018-06-01 23:52:52.000000000","message":"Let\u0027s make the args explicit, which are well defined: floatingip_id and port_forwarding","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":109,"context_line":"    @db_api.context_manager.writer"},{"line_number":110,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":111,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":112,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":113,"context_line":"        port_forwarding[\u0027port_forwarding\u0027][\u0027floating_ip_id\u0027] \u003d floatingip_id"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0aca876d","line":110,"range":{"start_line":110,"start_character":57,"end_line":110,"end_character":65},"in_reply_to":"5f7c97a3_88e1d0d2","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":109,"context_line":"    @db_api.context_manager.writer"},{"line_number":110,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":111,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":112,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":113,"context_line":"        port_forwarding[\u0027port_forwarding\u0027][\u0027floating_ip_id\u0027] \u003d floatingip_id"},{"line_number":114,"context_line":"        pf_obj \u003d pf.PortForwarding(context,"},{"line_number":115,"context_line":"                                   **port_forwarding[\u0027port_forwarding\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_08cdc05b","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":55},"updated":"2018-06-01 23:52:52.000000000","message":"Not needed","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":109,"context_line":"    @db_api.context_manager.writer"},{"line_number":110,"context_line":"    def create_floatingip_port_forwarding(self, context, **kwargs):"},{"line_number":111,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":112,"context_line":"        port_forwarding \u003d kwargs.get(\u0027port_forwarding\u0027)"},{"line_number":113,"context_line":"        port_forwarding[\u0027port_forwarding\u0027][\u0027floating_ip_id\u0027] \u003d floatingip_id"},{"line_number":114,"context_line":"        pf_obj \u003d pf.PortForwarding(context,"},{"line_number":115,"context_line":"                                   **port_forwarding[\u0027port_forwarding\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_eacceb8b","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":55},"in_reply_to":"5f7c97a3_08cdc05b","updated":"2018-06-04 07:34:16.000000000","message":"Yeah, let me change these functions","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                router_id \u003d self._find_a_router_for_fippf(context,"},{"line_number":123,"context_line":"                                                          port_forwarding,"},{"line_number":124,"context_line":"                                                          fip_obj)"},{"line_number":125,"context_line":"                # If this func not raise, means the router_id matched"},{"line_number":126,"context_line":"                # case1: fip_obj.router_id \u003d None"},{"line_number":127,"context_line":"                # case2: fip_obj.router_id is the same with we selected."},{"line_number":128,"context_line":"                self._check_router_match(context, fip_obj,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6b00ee01","line":125,"range":{"start_line":125,"start_character":31,"end_line":125,"end_character":47},"updated":"2018-06-01 23:52:52.000000000","message":"Nit: does not raise an exception, it means","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                router_id \u003d self._find_a_router_for_fippf(context,"},{"line_number":123,"context_line":"                                                          port_forwarding,"},{"line_number":124,"context_line":"                                                          fip_obj)"},{"line_number":125,"context_line":"                # If this func not raise, means the router_id matched"},{"line_number":126,"context_line":"                # case1: fip_obj.router_id \u003d None"},{"line_number":127,"context_line":"                # case2: fip_obj.router_id is the same with we selected."},{"line_number":128,"context_line":"                self._check_router_match(context, fip_obj,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6a9e9b6a","line":125,"range":{"start_line":125,"start_character":31,"end_line":125,"end_character":47},"in_reply_to":"5f7c97a3_6b00ee01","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                    fip_obj.update()"},{"line_number":133,"context_line":"                pf_obj.create()"},{"line_number":134,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":135,"context_line":"            (exist_obj, conflict_params) \u003d self.try_find_exist("},{"line_number":136,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":137,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":138,"context_line":"                        \"exist a portforwarding with conflict params like \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4b573202","line":135,"range":{"start_line":135,"start_character":13,"end_line":135,"end_character":22},"updated":"2018-06-01 23:52:52.000000000","message":"Nit: since you are not using it, this could by _","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                    fip_obj.update()"},{"line_number":133,"context_line":"                pf_obj.create()"},{"line_number":134,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":135,"context_line":"            (exist_obj, conflict_params) \u003d self.try_find_exist("},{"line_number":136,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":137,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":138,"context_line":"                        \"exist a portforwarding with conflict params like \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_2a8183fc","line":135,"range":{"start_line":135,"start_character":13,"end_line":135,"end_character":22},"in_reply_to":"5f7c97a3_4b573202","updated":"2018-06-04 07:34:16.000000000","message":"Oh, yeah, thanks. remove it","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":135,"context_line":"            (exist_obj, conflict_params) \u003d self.try_find_exist("},{"line_number":136,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":137,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":138,"context_line":"                        \"exist a portforwarding with conflict params like \""},{"line_number":139,"context_line":"                        \"%s\") % conflict_params"},{"line_number":140,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":141,"context_line":"                                     msg\u003dmessage)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0b385ad0","line":138,"range":{"start_line":137,"start_character":51,"end_line":138,"end_character":73},"updated":"2018-06-01 23:52:52.000000000","message":"a port forwarding with same attributes already exists","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":135,"context_line":"            (exist_obj, conflict_params) \u003d self.try_find_exist("},{"line_number":136,"context_line":"                context, floatingip_id, port_forwarding)"},{"line_number":137,"context_line":"            message \u003d _(\"Duplicate portforwarding, there is already \""},{"line_number":138,"context_line":"                        \"exist a portforwarding with conflict params like \""},{"line_number":139,"context_line":"                        \"%s\") % conflict_params"},{"line_number":140,"context_line":"            raise lib_exc.BadRequest(resource\u003d\u0027portforwarding\u0027,"},{"line_number":141,"context_line":"                                     msg\u003dmessage)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_ea7aab23","line":138,"range":{"start_line":137,"start_character":51,"end_line":138,"end_character":73},"in_reply_to":"5f7c97a3_0b385ad0","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        return pf_obj"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":146,"context_line":"    def update_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":147,"context_line":"        pf_data \u003d kwargs[\u0027port_forwarding\u0027][\u0027port_forwarding\u0027]"},{"line_number":148,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":149,"context_line":"            pf_obj \u003d pf.PortForwarding.get_object(context, id\u003did)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0b3dbab9","line":146,"range":{"start_line":146,"start_character":61,"end_line":146,"end_character":70},"updated":"2018-06-01 23:52:52.000000000","message":"Let\u0027s make the arguments explicit: port_forwarding","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        return pf_obj"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":146,"context_line":"    def update_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":147,"context_line":"        pf_data \u003d kwargs[\u0027port_forwarding\u0027][\u0027port_forwarding\u0027]"},{"line_number":148,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":149,"context_line":"            pf_obj \u003d pf.PortForwarding.get_object(context, id\u003did)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_0a784729","line":146,"range":{"start_line":146,"start_character":61,"end_line":146,"end_character":70},"in_reply_to":"5f7c97a3_0b3dbab9","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            pf_obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":150,"context_line":"            if not pf_obj:"},{"line_number":151,"context_line":"                raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":152,"context_line":"            pf_obj.update_fields(pf_data, reset_changes\u003dTrue)"},{"line_number":153,"context_line":"            pf_obj.update()"},{"line_number":154,"context_line":"        self.push_api.push(context, [pf_obj], rpc_events.UPDATED)"},{"line_number":155,"context_line":"        return pf_obj"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8b9f8ab2","line":152,"updated":"2018-06-01 23:52:52.000000000","message":"The internal port id is updatable, per the extension definition: https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/definitions/floating_ip_port_forwarding.py#L107. Shouldn\u0027t we do the same checks we do for the create?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            pf_obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":150,"context_line":"            if not pf_obj:"},{"line_number":151,"context_line":"                raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":152,"context_line":"            pf_obj.update_fields(pf_data, reset_changes\u003dTrue)"},{"line_number":153,"context_line":"            pf_obj.update()"},{"line_number":154,"context_line":"        self.push_api.push(context, [pf_obj], rpc_events.UPDATED)"},{"line_number":155,"context_line":"        return pf_obj"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6ab53bd0","line":152,"in_reply_to":"5f7c97a3_8b9f8ab2","updated":"2018-06-04 07:34:16.000000000","message":"Right, need to check the port exist, thanks. Miguel. Let me re-consider this. :)","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                return (objs[0], param)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":207,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":208,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":209,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":210,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4b7e526a","line":207,"range":{"start_line":207,"start_character":58,"end_line":207,"end_character":66},"updated":"2018-06-01 23:52:52.000000000","message":"Let\u0027s make these args explicit","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                return (objs[0], param)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":207,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":208,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":209,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":210,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6a03fb77","line":207,"range":{"start_line":207,"start_character":58,"end_line":207,"end_character":66},"in_reply_to":"5f7c97a3_4b7e526a","updated":"2018-06-04 07:34:16.000000000","message":"Done","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":207,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":208,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":209,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":210,"context_line":"        if not obj:"},{"line_number":211,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8bd6aa4e","line":208,"updated":"2018-06-01 23:52:52.000000000","message":"Don\u0027t forget this TODO.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":207,"context_line":"    def get_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":208,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":209,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":210,"context_line":"        if not obj:"},{"line_number":211,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_eaf62b91","line":208,"in_reply_to":"5f7c97a3_8bd6aa4e","updated":"2018-06-04 07:34:16.000000000","message":"Oh, :). This fields function, ok. I will post for support in the next one.","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b88eb7b72416d09a8c5182c297a3cb1fe1d2e70b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                                        filters\u003dNone, fields\u003dNone, sorts\u003dNone,"},{"line_number":225,"context_line":"                                        limit\u003dNone, marker\u003dNone,"},{"line_number":226,"context_line":"                                        page_reverse\u003dFalse):"},{"line_number":227,"context_line":"        # TODO(bzhao) will add fields function in the following."},{"line_number":228,"context_line":"        fip_obj \u003d router.FloatingIP.get_object(context, id\u003dfloatingip_id)"},{"line_number":229,"context_line":"        if not fip_obj:"},{"line_number":230,"context_line":"            raise lib_l3_exc.FloatingIPNotFound(floatingip_id\u003dfloatingip_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4b289231","line":227,"updated":"2018-06-01 23:53:39.000000000","message":"Don\u0027t forget this TODO","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        return pf.PortForwarding.get_objects("},{"line_number":235,"context_line":"            context, _pager\u003dpager, floating_ip_id\u003dfloatingip_id, **filters)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":238,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":239,"context_line":"        pf_obj \u003d pf.PortForwarding.get_object("},{"line_number":240,"context_line":"            context, id\u003did, floating_ip_id\u003dfloatingip_id)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8b646aba","line":237,"range":{"start_line":237,"start_character":61,"end_line":237,"end_character":69},"updated":"2018-06-01 23:52:52.000000000","message":"let\u0027s make these args explicit","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"093719b6368c7e3a693ba4110c8604f05c52633b","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":238,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":239,"context_line":"        pf_obj \u003d pf.PortForwarding.get_object("},{"line_number":240,"context_line":"            context, id\u003did, floating_ip_id\u003dfloatingip_id)"},{"line_number":241,"context_line":"        if not pf_obj:"},{"line_number":242,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":243,"context_line":"        with db_api.context_manager.writer.using(context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_6b06aed0","line":240,"range":{"start_line":240,"start_character":21,"end_line":240,"end_character":57},"updated":"2018-06-01 23:52:52.000000000","message":"if a port forwarding has its own id, why do we need to search with the fip\u0027s id?","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a490284a0bb48402c19e423ff55c19833dec02a8","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    def delete_floatingip_port_forwarding(self, context, id, **kwargs):"},{"line_number":238,"context_line":"        floatingip_id \u003d kwargs.get(\u0027floatingip_id\u0027)"},{"line_number":239,"context_line":"        pf_obj \u003d pf.PortForwarding.get_object("},{"line_number":240,"context_line":"            context, id\u003did, floating_ip_id\u003dfloatingip_id)"},{"line_number":241,"context_line":"        if not pf_obj:"},{"line_number":242,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":243,"context_line":"        with db_api.context_manager.writer.using(context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_aaf03393","line":240,"range":{"start_line":240,"start_character":21,"end_line":240,"end_character":57},"in_reply_to":"5f7c97a3_6b06aed0","updated":"2018-06-04 07:34:16.000000000","message":"Correct. removing floating_ip_id","commit_id":"930f2786a872d145d9bbe78a3647154f169a5870"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"8c53db9e9d01ddbc7032e220876700b1824708f4","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":144,"context_line":"                fip_obj \u003d router.FloatingIP.get_object(context,"},{"line_number":145,"context_line":"                                                       id\u003dfloatingip_id)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"                router_id \u003d self._find_a_router_for_fippf(context,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_328c3434","line":144,"range":{"start_line":144,"start_character":16,"end_line":144,"end_character":23},"updated":"2018-06-07 22:33:27.000000000","message":"Would it better to add another check to verify if this floating IP is already associated with a port and reject the request if it is?","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"bd6c695f52b74289c03f7a2b9fc983953646bda5","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        try:"},{"line_number":143,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":144,"context_line":"                fip_obj \u003d router.FloatingIP.get_object(context,"},{"line_number":145,"context_line":"                                                       id\u003dfloatingip_id)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"                router_id \u003d self._find_a_router_for_fippf(context,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_23d4e446","line":144,"range":{"start_line":144,"start_character":16,"end_line":144,"end_character":23},"in_reply_to":"5f7c97a3_328c3434","updated":"2018-06-08 02:03:11.000000000","message":"Correct, I\u0027m fixing it now, through checking its whether it already associated, also here need to check whether the fip_obj exists, my thought is that raising FipNotFound if fip_obj is None following get fip object, and raising conflict if fip_obj.fixed_port_id exists, but my way seems too low, so eager to some nice one. :).","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e557e4d81246819cb42c713c566d791d04df6a17","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                    fip_obj.router_id \u003d router_id"},{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_2f336b15","line":160,"range":{"start_line":160,"start_character":23,"end_line":160,"end_character":52},"updated":"2018-06-07 21:30:54.000000000","message":"Could we add unit test coverage for this branch (if it is not done yet).","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"bd6c695f52b74289c03f7a2b9fc983953646bda5","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                    fip_obj.router_id \u003d router_id"},{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_43bec0ff","line":160,"range":{"start_line":160,"start_character":23,"end_line":160,"end_character":52},"in_reply_to":"5f7c97a3_2f336b15","updated":"2018-06-08 02:03:11.000000000","message":"OK, currently,  I owe many tests. :) Will done.","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"e557e4d81246819cb42c713c566d791d04df6a17","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_4f582755","line":161,"range":{"start_line":161,"start_character":41,"end_line":161,"end_character":55},"updated":"2018-06-07 21:30:54.000000000","message":"I hit this error: http://paste.openstack.org/show/722924/ . Then, neutron server return 500","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"eea425e301bfe18ebfe35e12701440f6802c7a9d","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_abb8bd74","line":161,"range":{"start_line":161,"start_character":41,"end_line":161,"end_character":55},"in_reply_to":"5f7c97a3_1ea33fb3","updated":"2018-06-08 15:33:45.000000000","message":"Here is how I tested it:\n\n  $ FIP_ID\u003d$(openstack floating ip create public | awk \u0027/ id /{print $4}\u0027)\n  $ PORT_ID\u003d$(openstack port create --network private testport | awk \u0027/ id /{print $4}\u0027)\n  $ IP_ADDR\u003d$(openstack port show -c fixed_ips -f value $PORT_ID | sed \"s/.*ip_address\u003d\u0027\\(.*\\)\u0027, .*/\\1/\" | head -1)\n  $ curl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\\"internal_port\\\": 25, \\\"internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\"\n  $ curl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\\"internal_port\\\": 25, \\\"internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\"\n  HTTP/1.1 500 Internal Server Error\n  Content-Type: application/json\n  Content-Length: 150\n  X-Openstack-Request-Id: req-04208e99-42d6-4c07-9ddf-dd3993058360\n  Date: Fri, 08 Jun 2018 15:31:10 GMT\n\n  {\"NeutronError\": {\"message\": \"Request Failed: internal server error while processing your request.\", \"type\": \"HTTPInternalServerError\", \"detail\": \"\"}}","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"b43efe3fb892e5c54242669744a8e76accfd3530","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_1ea33fb3","line":161,"range":{"start_line":161,"start_character":41,"end_line":161,"end_character":55},"in_reply_to":"5f7c97a3_43efa0e8","updated":"2018-06-08 03:01:49.000000000","message":"Cloud you please tell me the test details, as for here, the transtion finish by hitting NeutronDbObjectDuplicateEntry. And the outside session would be maintained by @db_api.context_manager.writer. They are different transition. Did you test in parallel manner? Let me try.","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"bd6c695f52b74289c03f7a2b9fc983953646bda5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_43efa0e8","line":161,"range":{"start_line":161,"start_character":41,"end_line":161,"end_character":55},"in_reply_to":"5f7c97a3_4f582755","updated":"2018-06-08 02:03:11.000000000","message":"hmm, must be related with \" @db_api.context_manager.writer\", \"with db_api.context_manager.writer.using(context):\", any suggest?","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"efacf64a79797d4af08a1496749639fe085ac771","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    fip_obj.update()"},{"line_number":159,"context_line":"                pf_obj.create()"},{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""}],"source_content_type":"text/x-python","patch_set":16,"id":"5f7c97a3_35c71515","line":161,"range":{"start_line":161,"start_character":41,"end_line":161,"end_character":55},"in_reply_to":"5f7c97a3_abb8bd74","updated":"2018-06-11 06:06:49.000000000","message":"Oh, I cannot repo it,if we test it in this way. Also I tested it in parallel manner, I didn\u0027t hit this error. It\u0027s a big probability event in your env?\n\nroot@fwenv:~# FIP_ID\u003d$(openstack floating ip create public | awk \u0027/ id /{print $4}\u0027)\nroot@fwenv:~# PORT_ID\u003d$(openstack port create --network private testport | awk \u0027/ id /{print $4}\u0027)\nroot@fwenv:~# IP_ADDR\u003d$(openstack port show -c fixed_ips -f value $PORT_ID | sed \"s/.*ip_address\u003d\u0027\\(.*\\)\u0027, .*/\\1/\" | head -1)\nroot@fwenv:~# curl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\\"internal_port\\\": 25, \\\"internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\"\nHTTP/1.1 201 Created\nContent-Type: application/json\nContent-Length: 226\nX-Openstack-Request-Id: req-63ced4f4-815b-4b80-8d68-4f14973d5e83\nDate: Sun, 10 Jun 2018 02:42:06 GMT\n\n{\"port_forwarding\": {\"protocol\": \"tcp\", \"internal_ip_address\": \"10.0.0.11\", \"internal_port\": 25, \"internal_port_id\": \"f20a604d-e32f-4568-8bd3-72f760965e19\", \"external_port\": 2225, \"id\": \"af68219c-cec6-4d3b-9fff-696bc2083ebb\"}}root@fwenv:~# curl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\"\nHTTP/1.1 400 Bad Request\nContent-Type: application/json\nContent-Length: 258\nX-Openstack-Request-Id: req-6dab966b-a6cc-47b2-b499-9076f5aa9e5d\nDate: Sun, 10 Jun 2018 02:42:06 GMT\n\n{\"NeutronError\": {\"message\": \"Bad portforwarding request: Duplicate portforwarding, there is already exist a portforwarding with params {\u0027floating_ip_id\u0027: u\u0027843c0c99-3574-4a59-b9a4-660b6641cbd9\u0027, \u0027external_port\u0027: 2225}.\", \"type\": \"BadRequest\", \"detail\": \"\"}}\n\nroot@fwenv:~# cat multi\nTOKEN\u003d`openstack token issue -f value -c id`\nFIP_ID\u003d$(openstack floating ip create public | awk \u0027/ id /{print $4}\u0027)\nPORT_ID\u003d$(openstack port create --network private testport | awk \u0027/ id /{print $4}\u0027)\nIP_ADDR\u003d$(openstack port show -c fixed_ips -f value $PORT_ID | sed \"s/.*ip_address\u003d\u0027\\(.*\\)\u0027, .*/\\1/\" | head -1)\ncurl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\\"internal_port\\\": 25, \\\"internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\" \u0026\ncurl -g -i -X POST -H \"X-Auth-Token: $TOKEN\" \"http://localhost:9696/v2.0/floatingips/$FIP_ID/port_forwardings\" -d \"{\\\"port_forwarding\\\": {\\\"external_port\\\": 2225, \\\"internal_port\\\": 25, \\\"internal_port_id\\\": \\\"$PORT_ID\\\", \\\"protocol\\\": \\\"tcp\\\", \\\"internal_ip_address\\\": \\\"$IP_ADDR\\\"}}\" \u0026","commit_id":"c869624c0f890031de6a1dd629f62441609cc537"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import functools"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron._i18n import _"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_133388c6","line":20,"updated":"2018-06-28 18:51:21.000000000","message":"no reason to have empty lines above","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import functools"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron._i18n import _"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_11d37b61","line":20,"in_reply_to":"5f7c97a3_133388c6","updated":"2018-06-29 04:35:53.000000000","message":"Thanks, I will make it better. :)","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from neutron_lib.api.definitions import floating_ip_port_forwarding as apidef"},{"line_number":37,"context_line":"from neutron_lib.callbacks import registry"},{"line_number":38,"context_line":"from neutron_lib import constants as lib_conts"},{"line_number":39,"context_line":"from neutron_lib import exceptions as lib_exc"},{"line_number":40,"context_line":"from neutron_lib.exceptions import l3 as lib_l3_exc"},{"line_number":41,"context_line":"from neutron_lib.objects import exceptions as obj_exc"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_d3043017","line":38,"range":{"start_line":38,"start_character":37,"end_line":38,"end_character":46},"updated":"2018-06-28 18:51:21.000000000","message":"nit lib_consts","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from neutron_lib.api.definitions import floating_ip_port_forwarding as apidef"},{"line_number":37,"context_line":"from neutron_lib.callbacks import registry"},{"line_number":38,"context_line":"from neutron_lib import constants as lib_conts"},{"line_number":39,"context_line":"from neutron_lib import exceptions as lib_exc"},{"line_number":40,"context_line":"from neutron_lib.exceptions import l3 as lib_l3_exc"},{"line_number":41,"context_line":"from neutron_lib.objects import exceptions as obj_exc"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_d1cc23bd","line":38,"range":{"start_line":38,"start_character":37,"end_line":38,"end_character":46},"in_reply_to":"5f7c97a3_d3043017","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"from neutron_lib.exceptions import l3 as lib_l3_exc"},{"line_number":41,"context_line":"from neutron_lib.objects import exceptions as obj_exc"},{"line_number":42,"context_line":"from neutron_lib.plugins import constants"},{"line_number":43,"context_line":"from neutron_lib.plugins import directory"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def make_result_with_fields(f):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_3338049e","line":43,"updated":"2018-06-28 18:51:21.000000000","message":"neutron_lib should be above neutron imports","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":40,"context_line":"from neutron_lib.exceptions import l3 as lib_l3_exc"},{"line_number":41,"context_line":"from neutron_lib.objects import exceptions as obj_exc"},{"line_number":42,"context_line":"from neutron_lib.plugins import constants"},{"line_number":43,"context_line":"from neutron_lib.plugins import directory"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def make_result_with_fields(f):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_31bb1710","line":43,"in_reply_to":"5f7c97a3_3338049e","updated":"2018-06-29 04:35:53.000000000","message":"Thanks, Brian. I will rework the order here.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":81,"context_line":"        for fixed_ip in exist_fixed_ips:"},{"line_number":82,"context_line":"            if netaddr.IPNetwork("},{"line_number":83,"context_line":"                    fixed_ip[\u0027ip_address\u0027]) \u003d\u003d netaddr.IPNetwork(request_ip):"},{"line_number":84,"context_line":"                return fixed_ip[\u0027subnet_id\u0027]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _find_a_router_for_fippf(self, context, pf_dict, fip_obj):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_33d4841f","line":83,"range":{"start_line":83,"start_character":47,"end_line":83,"end_character":75},"updated":"2018-06-28 18:51:21.000000000","message":"might be worthwhile to call this once outside of loop since it will not change","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def _get_subnet_check_valid_internal_ip(self, request_ip, exist_fixed_ips):"},{"line_number":81,"context_line":"        for fixed_ip in exist_fixed_ips:"},{"line_number":82,"context_line":"            if netaddr.IPNetwork("},{"line_number":83,"context_line":"                    fixed_ip[\u0027ip_address\u0027]) \u003d\u003d netaddr.IPNetwork(request_ip):"},{"line_number":84,"context_line":"                return fixed_ip[\u0027subnet_id\u0027]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _find_a_router_for_fippf(self, context, pf_dict, fip_obj):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_d10f43de","line":83,"range":{"start_line":83,"start_character":47,"end_line":83,"end_character":75},"in_reply_to":"5f7c97a3_33d4841f","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            message \u003d _("},{"line_number":122,"context_line":"                \"External network %(external_net_id)s is not reachable from \""},{"line_number":123,"context_line":"                \"subnet %(internal_subnet_id)s. Cannot set \""},{"line_number":124,"context_line":"                \"Port forwarding for Port %(internal_port_id)s with \""},{"line_number":125,"context_line":"                \"Floating IP %(port_forwarding_id)s\") % {"},{"line_number":126,"context_line":"                \u0027external_net_id\u0027: external_network_id,"},{"line_number":127,"context_line":"                \u0027internal_subnet_id\u0027: internal_subnet_id,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_53eca0f3","line":124,"range":{"start_line":124,"start_character":37,"end_line":124,"end_character":41},"updated":"2018-06-28 18:51:21.000000000","message":"s/port","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            message \u003d _("},{"line_number":122,"context_line":"                \"External network %(external_net_id)s is not reachable from \""},{"line_number":123,"context_line":"                \"subnet %(internal_subnet_id)s. Cannot set \""},{"line_number":124,"context_line":"                \"Port forwarding for Port %(internal_port_id)s with \""},{"line_number":125,"context_line":"                \"Floating IP %(port_forwarding_id)s\") % {"},{"line_number":126,"context_line":"                \u0027external_net_id\u0027: external_network_id,"},{"line_number":127,"context_line":"                \u0027internal_subnet_id\u0027: internal_subnet_id,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_71f42fd1","line":124,"range":{"start_line":124,"start_character":37,"end_line":124,"end_character":41},"in_reply_to":"5f7c97a3_53eca0f3","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""},{"line_number":165,"context_line":"                        \"%s\") % conflict_params"},{"line_number":166,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_73c2fc55","line":163,"range":{"start_line":163,"start_character":25,"end_line":163,"end_character":73},"updated":"2018-06-28 18:51:21.000000000","message":"s/A duplicate port forwarding entry with the","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":161,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":162,"context_line":"                                                        port_forwarding)"},{"line_number":163,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":164,"context_line":"                        \"same attributes already exists, conflict params like \""},{"line_number":165,"context_line":"                        \"%s\") % conflict_params"},{"line_number":166,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_91f1cbe1","line":163,"range":{"start_line":163,"start_character":25,"end_line":163,"end_character":73},"in_reply_to":"5f7c97a3_73c2fc55","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":197,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":198,"context_line":"                                                        pf_obj.to_dict())"},{"line_number":199,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":200,"context_line":"                        \"same attributes already exists, conflict params like \""},{"line_number":201,"context_line":"                        \"%s\") % conflict_params"},{"line_number":202,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_f3ab6c85","line":199,"range":{"start_line":199,"start_character":25,"end_line":199,"end_character":72},"updated":"2018-06-28 18:51:21.000000000","message":"s/A duplicate port forwarding entry with the","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        except obj_exc.NeutronDbObjectDuplicateEntry:"},{"line_number":197,"context_line":"            (__, conflict_params) \u003d self.try_find_exist(context, floatingip_id,"},{"line_number":198,"context_line":"                                                        pf_obj.to_dict())"},{"line_number":199,"context_line":"            message \u003d _(\"Duplicate portforwarding, a port forwarding with \""},{"line_number":200,"context_line":"                        \"same attributes already exists, conflict params like \""},{"line_number":201,"context_line":"                        \"%s\") % conflict_params"},{"line_number":202,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_07901942","line":199,"range":{"start_line":199,"start_character":25,"end_line":199,"end_character":72},"in_reply_to":"5f7c97a3_f3ab6c85","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"},{"line_number":230,"context_line":"                                     msg\u003dmessage)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":233,"context_line":"                       specify_params\u003dNone):"},{"line_number":234,"context_line":"        # Because the session had been flushed by NeutronDbObjectDuplicateEntry"},{"line_number":235,"context_line":"        # so if we want to use the context to get another db queries, we need"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_73be7caf","line":232,"range":{"start_line":232,"start_character":8,"end_line":232,"end_character":22},"updated":"2018-06-28 18:51:21.000000000","message":"can this be private?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            raise lib_exc.BadRequest(resource\u003dapidef.RESOURCE_NAME,"},{"line_number":230,"context_line":"                                     msg\u003dmessage)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def try_find_exist(self, context, floatingip_id, port_forwarding,"},{"line_number":233,"context_line":"                       specify_params\u003dNone):"},{"line_number":234,"context_line":"        # Because the session had been flushed by NeutronDbObjectDuplicateEntry"},{"line_number":235,"context_line":"        # so if we want to use the context to get another db queries, we need"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_112ffb3e","line":232,"range":{"start_line":232,"start_character":8,"end_line":232,"end_character":22},"in_reply_to":"5f7c97a3_73be7caf","updated":"2018-06-29 04:35:53.000000000","message":"yeah, I will make it as a private function.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    @make_result_with_fields"},{"line_number":258,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":259,"context_line":"    def get_floatingip_port_forwarding(self, context, id, floatingip_id,"},{"line_number":260,"context_line":"                                       fields\u003dNone):"},{"line_number":261,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":262,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":263,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_7b396ecd","line":260,"range":{"start_line":260,"start_character":39,"end_line":260,"end_character":50},"updated":"2018-06-28 22:19:37.000000000","message":"this also looks useless, if you plans to add more filter later then its worth adding a comment","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    @make_result_with_fields"},{"line_number":258,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":259,"context_line":"    def get_floatingip_port_forwarding(self, context, id, floatingip_id,"},{"line_number":260,"context_line":"                                       fields\u003dNone):"},{"line_number":261,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":262,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":263,"context_line":"        if not obj:"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_2cd65af4","line":260,"range":{"start_line":260,"start_character":39,"end_line":260,"end_character":50},"in_reply_to":"5f7c97a3_7b396ecd","updated":"2018-06-29 04:35:53.000000000","message":"Do you think we should remove it? But the base class and other service plugins define the function like this. So I don\u0027t agree to remove it, as we change the func parameters, eventhough we don\u0027t use it here. Do you agree?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":259,"context_line":"    def get_floatingip_port_forwarding(self, context, id, floatingip_id,"},{"line_number":260,"context_line":"                                       fields\u003dNone):"},{"line_number":261,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":262,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":263,"context_line":"        if not obj:"},{"line_number":264,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_3b2e968c","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":49},"updated":"2018-06-28 22:19:37.000000000","message":"this looks of no use here ? or is it just here to make sure that fip exists ? since fip_id is there then FloatingIP.object_exists can be used.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":259,"context_line":"    def get_floatingip_port_forwarding(self, context, id, floatingip_id,"},{"line_number":260,"context_line":"                                       fields\u003dNone):"},{"line_number":261,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":262,"context_line":"        obj \u003d pf.PortForwarding.get_object(context, id\u003did)"},{"line_number":263,"context_line":"        if not obj:"},{"line_number":264,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_cc00066a","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":49},"in_reply_to":"5f7c97a3_3b2e968c","updated":"2018-06-29 04:35:53.000000000","message":"No, the api can request like this /floatingips/\u003cFIP_ID\u003e/\u003cPF_ID\u003e, right? Also in spec mentioned the GET port_forwarding request should be check the fip owner first. And the limitation about the neutron base api func(item, index), the policy check is behind the real function calls, so it\u0027s also not good to set the GET policy like other operations, so we should check the fip first.\n\nThen back to the above request url /floatingips/\u003cFIP_ID\u003e/\u003cPF_ID\u003e,\nif this _get_fip_obj is not yours, then you can just pass a non-exist fip_id and the port_forwarding_id, query the db just by portforwarding_id. I can pass and not raise any error. We need to fit the other plugins behavior which earge to implement a subresource for a standard resource. Right?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                                        filters\u003dNone, fields\u003dNone, sorts\u003dNone,"},{"line_number":279,"context_line":"                                        limit\u003dNone, marker\u003dNone,"},{"line_number":280,"context_line":"                                        page_reverse\u003dFalse):"},{"line_number":281,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":282,"context_line":"        filters \u003d filters or {}"},{"line_number":283,"context_line":"        self._validate_filter_for_port_forwarding(filters)"},{"line_number":284,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_bbcce6bb","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":49},"updated":"2018-06-28 22:19:37.000000000","message":"same concern as comment on L261","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                                        filters\u003dNone, fields\u003dNone, sorts\u003dNone,"},{"line_number":279,"context_line":"                                        limit\u003dNone, marker\u003dNone,"},{"line_number":280,"context_line":"                                        page_reverse\u003dFalse):"},{"line_number":281,"context_line":"        self._get_fip_obj(context, floatingip_id)"},{"line_number":282,"context_line":"        filters \u003d filters or {}"},{"line_number":283,"context_line":"        self._validate_filter_for_port_forwarding(filters)"},{"line_number":284,"context_line":"        pager \u003d base_obj.Pager(sorts, limit, page_reverse, marker)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_2c1dfabd","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":49},"in_reply_to":"5f7c97a3_bbcce6bb","updated":"2018-06-29 04:35:53.000000000","message":"see line 261 comments. It\u0027s the same reason.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not pf_obj:"},{"line_number":291,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":292,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":293,"context_line":"            pf_objs \u003d pf.PortForwarding.get_objects("},{"line_number":294,"context_line":"                context, floatingip_id\u003dfloatingip_id)"},{"line_number":295,"context_line":"            if len(pf_objs) \u003d\u003d 1:"},{"line_number":296,"context_line":"                fip_obj \u003d router.FloatingIP.get_object("},{"line_number":297,"context_line":"                    context, id\u003dpf_obj.floatingip_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_7b1ace18","line":294,"range":{"start_line":293,"start_character":12,"end_line":294,"end_character":53},"updated":"2018-06-28 22:19:37.000000000","message":"to reduce a db transaction can this be moved out instead of code @L289, and result can be filtered for portforwarding id ?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not pf_obj:"},{"line_number":291,"context_line":"            raise pf_exc.PortForwardingNotFound(id\u003did)"},{"line_number":292,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":293,"context_line":"            pf_objs \u003d pf.PortForwarding.get_objects("},{"line_number":294,"context_line":"                context, floatingip_id\u003dfloatingip_id)"},{"line_number":295,"context_line":"            if len(pf_objs) \u003d\u003d 1:"},{"line_number":296,"context_line":"                fip_obj \u003d router.FloatingIP.get_object("},{"line_number":297,"context_line":"                    context, id\u003dpf_obj.floatingip_id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_279af56e","line":294,"range":{"start_line":293,"start_character":12,"end_line":294,"end_character":53},"in_reply_to":"5f7c97a3_7b1ace18","updated":"2018-06-29 04:35:53.000000000","message":"Why to reduce a db transaction? \nAs my understanding, these are 2 subsessions.\n1 is for check if the pf exist.\n2 is for check if the exist pf resources which related with request fip_id is the last one. So 2 use writer to make sure that we get the db lock to read/update the obj before we delete pf and update fip. If any process error, the whole session rollback. Please feel free to correct.\n\nBut I found this delete function may be lack some logic to check the request fip_id is the same as pf_obj.floatingip_id we get.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"4afb3d8adf17fc341011d9aa6dc1c8b77f66b223","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":293,"context_line":"            pf_objs \u003d pf.PortForwarding.get_objects("},{"line_number":294,"context_line":"                context, floatingip_id\u003dfloatingip_id)"},{"line_number":295,"context_line":"            if len(pf_objs) \u003d\u003d 1:"},{"line_number":296,"context_line":"                fip_obj \u003d router.FloatingIP.get_object("},{"line_number":297,"context_line":"                    context, id\u003dpf_obj.floatingip_id)"},{"line_number":298,"context_line":"                fip_obj.update_fields({\u0027router_id\u0027: None})"},{"line_number":299,"context_line":"                fip_obj.update()"},{"line_number":300,"context_line":"            pf_obj.delete()"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_3be9b6e2","line":297,"range":{"start_line":295,"start_character":11,"end_line":297,"end_character":53},"updated":"2018-06-28 22:19:37.000000000","message":"shouldn\u0027t the id of portforwarding along with length also be compared if that matches the object returned this will avoid any potential race condition","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":293,"context_line":"            pf_objs \u003d pf.PortForwarding.get_objects("},{"line_number":294,"context_line":"                context, floatingip_id\u003dfloatingip_id)"},{"line_number":295,"context_line":"            if len(pf_objs) \u003d\u003d 1:"},{"line_number":296,"context_line":"                fip_obj \u003d router.FloatingIP.get_object("},{"line_number":297,"context_line":"                    context, id\u003dpf_obj.floatingip_id)"},{"line_number":298,"context_line":"                fip_obj.update_fields({\u0027router_id\u0027: None})"},{"line_number":299,"context_line":"                fip_obj.update()"},{"line_number":300,"context_line":"            pf_obj.delete()"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_6779cd2e","line":297,"range":{"start_line":295,"start_character":11,"end_line":297,"end_character":53},"in_reply_to":"5f7c97a3_3be9b6e2","updated":"2018-06-29 04:35:53.000000000","message":"Hmmm, right. The check is necessary.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        for (router_id,"},{"line_number":316,"context_line":"             fip_addr, pf_id, fip_id) in self._get_port_forwarding_by_routers("},{"line_number":317,"context_line":"                context, router_ids):"},{"line_number":318,"context_line":"            router_pf_fip_set[router_id].add(fip_addr + \u0027/32\u0027)"},{"line_number":319,"context_line":"            fip_pfs[fip_id].add(pf_id)"},{"line_number":320,"context_line":"            router_fip[router_id].add(fip_id)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_13ce28b7","line":318,"range":{"start_line":318,"start_character":45,"end_line":318,"end_character":61},"updated":"2018-06-28 18:51:21.000000000","message":"nit\nfrom neutron.common import utils\n\n...(utils(ip_to_cidr(fip_addr))","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        for (router_id,"},{"line_number":316,"context_line":"             fip_addr, pf_id, fip_id) in self._get_port_forwarding_by_routers("},{"line_number":317,"context_line":"                context, router_ids):"},{"line_number":318,"context_line":"            router_pf_fip_set[router_id].add(fip_addr + \u0027/32\u0027)"},{"line_number":319,"context_line":"            fip_pfs[fip_id].add(pf_id)"},{"line_number":320,"context_line":"            router_fip[router_id].add(fip_id)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_4c6f1628","line":318,"range":{"start_line":318,"start_character":45,"end_line":318,"end_character":61},"in_reply_to":"5f7c97a3_13ce28b7","updated":"2018-06-29 04:35:53.000000000","message":"Thanks, will rework here.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/tests/etc/policy.json":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    \"delete_log\": \"rule:admin_only\","},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    \"create_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":251,"context_line":"    \"update_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":252,"context_line":"    \"get_floatingip_port_forwarding\": \"rule:regular_user\","},{"line_number":253,"context_line":"    \"get_floatingip_port_forwardings\": \"rule:regular_user\","},{"line_number":254,"context_line":"    \"delete_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\""}],"source_content_type":"application/json","patch_set":25,"id":"5f7c97a3_135ce8ee","line":251,"updated":"2018-06-28 18:51:21.000000000","message":"can you put update below get as other blocks do?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    \"delete_log\": \"rule:admin_only\","},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    \"create_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":251,"context_line":"    \"update_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\","},{"line_number":252,"context_line":"    \"get_floatingip_port_forwarding\": \"rule:regular_user\","},{"line_number":253,"context_line":"    \"get_floatingip_port_forwardings\": \"rule:regular_user\","},{"line_number":254,"context_line":"    \"delete_floatingip_port_forwarding\": \"rule:admin_or_floatingip_owner\""}],"source_content_type":"application/json","patch_set":25,"id":"5f7c97a3_27a8b576","line":251,"in_reply_to":"5f7c97a3_135ce8ee","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/tests/functional/services/portforwarding/test_port_forwarding.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        self.subnet \u003d self._create_subnet(self.fmt, self.net[\u0027id\u0027],"},{"line_number":60,"context_line":"                                          \u002710.0.0.0/24\u0027).json[\u0027subnet\u0027]"},{"line_number":61,"context_line":"        self._set_router_gw(self.router[\u0027id\u0027], self.ext_net[\u0027id\u0027])"},{"line_number":62,"context_line":"        self._add_router_interface(self.router[\u0027id\u0027], self.subnet[\u0027id\u0027])"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_negative_create_floatingip_port_forwarding(self):"},{"line_number":65,"context_line":"        fip \u003d self._create_floatingip(self.ext_net[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_7348bcb2","line":62,"updated":"2018-06-28 18:51:21.000000000","message":"A lot of the above seems like it shouldn\u0027t be done it setup, but in another helper function, or just directly in the test since there is only one.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        self.subnet \u003d self._create_subnet(self.fmt, self.net[\u0027id\u0027],"},{"line_number":60,"context_line":"                                          \u002710.0.0.0/24\u0027).json[\u0027subnet\u0027]"},{"line_number":61,"context_line":"        self._set_router_gw(self.router[\u0027id\u0027], self.ext_net[\u0027id\u0027])"},{"line_number":62,"context_line":"        self._add_router_interface(self.router[\u0027id\u0027], self.subnet[\u0027id\u0027])"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_negative_create_floatingip_port_forwarding(self):"},{"line_number":65,"context_line":"        fip \u003d self._create_floatingip(self.ext_net[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_87c98952","line":62,"in_reply_to":"5f7c97a3_7348bcb2","updated":"2018-06-29 04:35:53.000000000","message":"Oh yeah, right. I move them into the testcase. As most tests of plugin are UTs.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"404b5ae8b18aac7573fc90131ac3fd55f44c76d7","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        self.subnet \u003d self._create_subnet(self.fmt, self.net[\u0027id\u0027],"},{"line_number":60,"context_line":"                                          \u002710.0.0.0/24\u0027).json[\u0027subnet\u0027]"},{"line_number":61,"context_line":"        self._set_router_gw(self.router[\u0027id\u0027], self.ext_net[\u0027id\u0027])"},{"line_number":62,"context_line":"        self._add_router_interface(self.router[\u0027id\u0027], self.subnet[\u0027id\u0027])"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_negative_create_floatingip_port_forwarding(self):"},{"line_number":65,"context_line":"        fip \u003d self._create_floatingip(self.ext_net[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_9273c8e8","line":62,"in_reply_to":"5f7c97a3_87c98952","updated":"2018-07-03 08:53:57.000000000","message":"Oh sorry, I forget the https://review.openstack.org/#/c/574673/8/neutron/tests/functional/services/portforwarding/test_port_forwarding.py  will add some tests, and it\u0027s true that it should be setup.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f1569a8ea207335e63ce4b28f314ed657201c0c8","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                 \"internal_ip_address\": port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]}}"},{"line_number":74,"context_line":"        # This would be success"},{"line_number":75,"context_line":"        self.pf_plugin.create_floatingip_port_forwarding("},{"line_number":76,"context_line":"            self.context, fip[\u0027id\u0027], port_forwarding)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # This will be fail with the same params"},{"line_number":79,"context_line":"        self.assertRaises(lib_exc.BadRequest,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_332c8400","line":76,"updated":"2018-06-28 18:51:21.000000000","message":"Does this return an object that can then be verified?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                 \"internal_ip_address\": port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]}}"},{"line_number":74,"context_line":"        # This would be success"},{"line_number":75,"context_line":"        self.pf_plugin.create_floatingip_port_forwarding("},{"line_number":76,"context_line":"            self.context, fip[\u0027id\u0027], port_forwarding)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # This will be fail with the same params"},{"line_number":79,"context_line":"        self.assertRaises(lib_exc.BadRequest,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_87c42943","line":76,"in_reply_to":"5f7c97a3_332c8400","updated":"2018-06-29 04:35:53.000000000","message":"yeah, it will. I will add the verfify logic soon. Thanks","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    obj_fields.DictOfStringsField: get_random_dict_of_strings,"},{"line_number":525,"context_line":"    obj_fields.IPAddressField: tools.get_random_ip_address,"},{"line_number":526,"context_line":"    obj_fields.IPV4AddressField: lambda: tools.get_random_ip_address("},{"line_number":527,"context_line":"        version\u003d4),"},{"line_number":528,"context_line":"    obj_fields.IntegerField: tools.get_random_integer,"},{"line_number":529,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":530,"context_line":"    obj_fields.ListOfStringsField: tools.get_random_string_list,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_dd411fa8","line":527,"range":{"start_line":527,"start_character":16,"end_line":527,"end_character":17},"updated":"2018-05-29 08:29:09.000000000","message":"there is constant for it in neutron_lib.constants","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    obj_fields.DictOfStringsField: get_random_dict_of_strings,"},{"line_number":525,"context_line":"    obj_fields.IPAddressField: tools.get_random_ip_address,"},{"line_number":526,"context_line":"    obj_fields.IPV4AddressField: lambda: tools.get_random_ip_address("},{"line_number":527,"context_line":"        version\u003d4),"},{"line_number":528,"context_line":"    obj_fields.IntegerField: tools.get_random_integer,"},{"line_number":529,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":530,"context_line":"    obj_fields.ListOfStringsField: tools.get_random_string_list,"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_630aaa20","line":527,"range":{"start_line":527,"start_character":16,"end_line":527,"end_character":17},"in_reply_to":"5f7c97a3_dd411fa8","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"}],"neutron/tests/unit/objects/test_port_forwarding.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"5c1e01f39bfb60ee0536c43ab437840ed1b8d827","unresolved":false,"context_lines":[{"line_number":60,"context_line":"             \u0027internal_port_id\u0027: lambda: self._create_test_port_id()})"},{"line_number":61,"context_line":"        # \u0027portforwardings\u0027 table will store the \u0027internal_ip_address\u0027 and"},{"line_number":62,"context_line":"        # \u0027internal_port\u0027 as a single \u0027socket\u0027 column."},{"line_number":63,"context_line":"        # Port forwarding Object accepts \u0027internal_ip_address\u0027 and"},{"line_number":64,"context_line":"        # \u0027internal_port\u0027, but can not filter the records in db, so the"},{"line_number":65,"context_line":"        # valid filters can not contain them."},{"line_number":66,"context_line":"        not_supported_filter_fields \u003d [\u0027internal_ip_address\u0027, \u0027internal_port\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7d79ebf9","line":63,"range":{"start_line":63,"start_character":26,"end_line":63,"end_character":27},"updated":"2018-05-29 08:29:09.000000000","message":"nit: lowercase","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"79750bd8fed099c78acbd2b1aad51a0840570f9f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"             \u0027internal_port_id\u0027: lambda: self._create_test_port_id()})"},{"line_number":61,"context_line":"        # \u0027portforwardings\u0027 table will store the \u0027internal_ip_address\u0027 and"},{"line_number":62,"context_line":"        # \u0027internal_port\u0027 as a single \u0027socket\u0027 column."},{"line_number":63,"context_line":"        # Port forwarding Object accepts \u0027internal_ip_address\u0027 and"},{"line_number":64,"context_line":"        # \u0027internal_port\u0027, but can not filter the records in db, so the"},{"line_number":65,"context_line":"        # valid filters can not contain them."},{"line_number":66,"context_line":"        not_supported_filter_fields \u003d [\u0027internal_ip_address\u0027, \u0027internal_port\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_2310324e","line":63,"range":{"start_line":63,"start_character":26,"end_line":63,"end_character":27},"in_reply_to":"5f7c97a3_7d79ebf9","updated":"2018-05-29 09:36:20.000000000","message":"Done","commit_id":"c017cf2d8ae9d62b4f6f053dffde15ca4af4ba62"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7bf7e62390bd3c68b0fc6bda7c6a712e0006be44","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.fip_db_fields \u003d self.get_random_db_fields(router.FloatingIP)"},{"line_number":33,"context_line":"        del self.fip_db_fields[\u0027floating_ip_address\u0027]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        def ramdon_generate_fip_obj(db_fields, **floatingip):"},{"line_number":36,"context_line":"            if db_fields.get("},{"line_number":37,"context_line":"                    \u0027id\u0027, None) and floatingip.get("},{"line_number":38,"context_line":"                 \u0027id\u0027, None) and db_fields.get(\u0027id\u0027) \u003d\u003d floatingip.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_16a291ae","line":35,"range":{"start_line":35,"start_character":12,"end_line":35,"end_character":18},"updated":"2018-06-29 00:18:34.000000000","message":"nit: \u0027random\u0027","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.fip_db_fields \u003d self.get_random_db_fields(router.FloatingIP)"},{"line_number":33,"context_line":"        del self.fip_db_fields[\u0027floating_ip_address\u0027]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        def ramdon_generate_fip_obj(db_fields, **floatingip):"},{"line_number":36,"context_line":"            if db_fields.get("},{"line_number":37,"context_line":"                    \u0027id\u0027, None) and floatingip.get("},{"line_number":38,"context_line":"                 \u0027id\u0027, None) and db_fields.get(\u0027id\u0027) \u003d\u003d floatingip.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_27d675f4","line":35,"range":{"start_line":35,"start_character":12,"end_line":35,"end_character":18},"in_reply_to":"5f7c97a3_16a291ae","updated":"2018-06-29 04:35:53.000000000","message":"Thanks, nice catch.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"1a9f96b78dfaa666a1d63fd557b4e92969ee7e51","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj.delete()"},{"line_number":124,"context_line":"        self.assertIsNone(obj.db_obj)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":127,"context_line":"        # TODO(bzhao) Port Forwarding uses query FLoatingIP for injecting"},{"line_number":128,"context_line":"        # floating_ip_address and router_id, not depends on relationship,"},{"line_number":129,"context_line":"        # so it will cost extra SQL query each time for finding the"},{"line_number":130,"context_line":"        # associated Floating IP by floatingip_id each time(or each"},{"line_number":131,"context_line":"        # Port Forwarding Object). Rework this if this customized OVO"},{"line_number":132,"context_line":"        # needs to be changed."},{"line_number":133,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_0853f73b","line":133,"range":{"start_line":126,"start_character":4,"end_line":133,"end_character":12},"updated":"2018-07-03 21:58:31.000000000","message":"this might not be needed as this test have been marked unstable so it won\u0027t fail if this test fails. I\u0027d suggest to run this (if it failed test will not be counted), rather than just passing always.","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"5ba9ca1ebad523a46842bac4a3e8e590a4cb6ddf","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj.delete()"},{"line_number":124,"context_line":"        self.assertIsNone(obj.db_obj)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":127,"context_line":"        # TODO(bzhao) Port Forwarding uses query FLoatingIP for injecting"},{"line_number":128,"context_line":"        # floating_ip_address and router_id, not depends on relationship,"},{"line_number":129,"context_line":"        # so it will cost extra SQL query each time for finding the"},{"line_number":130,"context_line":"        # associated Floating IP by floatingip_id each time(or each"},{"line_number":131,"context_line":"        # Port Forwarding Object). Rework this if this customized OVO"},{"line_number":132,"context_line":"        # needs to be changed."},{"line_number":133,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_8eaf0f9c","line":133,"range":{"start_line":126,"start_character":4,"end_line":133,"end_character":12},"in_reply_to":"5f7c97a3_0853f73b","updated":"2018-07-04 02:55:35.000000000","message":"Thanks, but it\u0027s necessary to let other people know the reason here. Also I think the unstable must be another reasons, we can see other tests about this, all of them describe the reason about they can not pass the test. That means if they run the base test, it must be fail.","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"488daa19a9418591c7ac4e4fff8f90e23f71da31","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        obj.delete()"},{"line_number":124,"context_line":"        self.assertIsNone(obj.db_obj)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":127,"context_line":"        # TODO(bzhao) Port Forwarding uses query FLoatingIP for injecting"},{"line_number":128,"context_line":"        # floating_ip_address and router_id, not depends on relationship,"},{"line_number":129,"context_line":"        # so it will cost extra SQL query each time for finding the"},{"line_number":130,"context_line":"        # associated Floating IP by floatingip_id each time(or each"},{"line_number":131,"context_line":"        # Port Forwarding Object). Rework this if this customized OVO"},{"line_number":132,"context_line":"        # needs to be changed."},{"line_number":133,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_f2668555","line":133,"range":{"start_line":126,"start_character":4,"end_line":133,"end_character":12},"in_reply_to":"5f7c97a3_8eaf0f9c","updated":"2018-07-05 16:20:33.000000000","message":"ok, it can be kept no issues","commit_id":"6f1e05a1140c6f4a486800e734645817d5b0b8dc"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"5bdf65d313fdabf73d2550269341563f629e9c5b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                self.assertEqual(v, obj.db_obj[k], \u0027%s attribute differs\u0027 % k)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        obj.delete()"},{"line_number":124,"context_line":"        self.assertIsNone(obj.db_obj)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":127,"context_line":"        # NOTE(bzhao) Port Forwarding uses query FLoatingIP for injecting"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_75657f1c","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":37},"updated":"2018-07-05 17:07:24.000000000","message":"i guess since this unique object having db field \u0027socket\u0027 that\u0027s like two separate fields in object.\n\nso more assertions can be made before and after update\n\nsocket \u003d obj_db_obj.socket.split(\":\")\nself.assertEqual(socket[0], str(obj.internal_ip_address))\nself.assertEqual(socket[1], str(obj.internal_port))","commit_id":"9919b442bfbea561f6f68f9f435701bada9d284f"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"7b5fa60ca541835b5954f258ab2ab6501b8b816d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                self.assertEqual(v, obj.db_obj[k], \u0027%s attribute differs\u0027 % k)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        obj.delete()"},{"line_number":124,"context_line":"        self.assertIsNone(obj.db_obj)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_get_objects_queries_constant(self):"},{"line_number":127,"context_line":"        # NOTE(bzhao) Port Forwarding uses query FLoatingIP for injecting"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_2c25710a","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":37},"in_reply_to":"5f7c97a3_75657f1c","updated":"2018-07-06 09:31:34.000000000","message":"Hmm, good suggest. Thanks, will update.","commit_id":"9919b442bfbea561f6f68f9f435701bada9d284f"}],"neutron/tests/unit/services/portforwarding/test_pf_plugin.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7bf7e62390bd3c68b0fc6bda7c6a712e0006be44","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            pf_get_object_mock, push_api_mock):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # After delete, not empty resource list"},{"line_number":113,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027port_forwarding1\u0027,"},{"line_number":114,"context_line":"                                            \u0027port_forwarding2\u0027]"},{"line_number":115,"context_line":"        pf_obj \u003d mock.Mock()"},{"line_number":116,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":117,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_36d6adf4","line":114,"range":{"start_line":113,"start_character":44,"end_line":114,"end_character":62},"updated":"2018-06-29 00:18:34.000000000","message":"even though it will work but this should be list of objects not list of strings as get_objects return list of objects.","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            pf_get_object_mock, push_api_mock):"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # After delete, not empty resource list"},{"line_number":113,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027port_forwarding1\u0027,"},{"line_number":114,"context_line":"                                            \u0027port_forwarding2\u0027]"},{"line_number":115,"context_line":"        pf_obj \u003d mock.Mock()"},{"line_number":116,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":117,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_e70f1d89","line":114,"range":{"start_line":113,"start_character":44,"end_line":114,"end_character":62},"in_reply_to":"5f7c97a3_36d6adf4","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7bf7e62390bd3c68b0fc6bda7c6a712e0006be44","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            self.ctxt, floatingip_id\u003d\u0027fip_id\u0027)"},{"line_number":121,"context_line":"        pf_get_object_mock.assert_called_once_with("},{"line_number":122,"context_line":"            self.ctxt, id\u003d\u0027pf_id\u0027)"},{"line_number":123,"context_line":"        self.assertTrue(pf_obj.delete.called)"},{"line_number":124,"context_line":"        push_api_mock.assert_called_once_with("},{"line_number":125,"context_line":"            self.ctxt, mock.ANY, rpc_events.DELETED)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_76f50584","line":123,"range":{"start_line":123,"start_character":7,"end_line":123,"end_character":45},"updated":"2018-06-29 00:18:34.000000000","message":"optionally can make it simple by pf_obj.delete.assert_called()","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            self.ctxt, floatingip_id\u003d\u0027fip_id\u0027)"},{"line_number":121,"context_line":"        pf_get_object_mock.assert_called_once_with("},{"line_number":122,"context_line":"            self.ctxt, id\u003d\u0027pf_id\u0027)"},{"line_number":123,"context_line":"        self.assertTrue(pf_obj.delete.called)"},{"line_number":124,"context_line":"        push_api_mock.assert_called_once_with("},{"line_number":125,"context_line":"            self.ctxt, mock.ANY, rpc_events.DELETED)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_271d15be","line":123,"range":{"start_line":123,"start_character":7,"end_line":123,"end_character":45},"in_reply_to":"5f7c97a3_76f50584","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7bf7e62390bd3c68b0fc6bda7c6a712e0006be44","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        fip_obj \u003d mock.Mock()"},{"line_number":133,"context_line":"        fip_get_object_mock.return_value \u003d fip_obj"},{"line_number":134,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":135,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027need_to_delete_pf_id\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("},{"line_number":138,"context_line":"            self.ctxt, \u0027need_to_delete_pf_id\u0027, \u0027fip_id\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_36ef8db2","line":135,"range":{"start_line":135,"start_character":44,"end_line":135,"end_character":66},"updated":"2018-06-29 00:18:34.000000000","message":"mock.Mock(id\u003d\u0027pf_id2\u0027) use pf_id1 or pf_id2 for simplification instead of \u0027need_to_delete_pf_id\u0027","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        fip_obj \u003d mock.Mock()"},{"line_number":133,"context_line":"        fip_get_object_mock.return_value \u003d fip_obj"},{"line_number":134,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":135,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027need_to_delete_pf_id\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("},{"line_number":138,"context_line":"            self.ctxt, \u0027need_to_delete_pf_id\u0027, \u0027fip_id\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_471a91c6","line":135,"range":{"start_line":135,"start_character":44,"end_line":135,"end_character":66},"in_reply_to":"5f7c97a3_36ef8db2","updated":"2018-06-29 04:35:53.000000000","message":"Done","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7bf7e62390bd3c68b0fc6bda7c6a712e0006be44","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":135,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027need_to_delete_pf_id\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("},{"line_number":138,"context_line":"            self.ctxt, \u0027need_to_delete_pf_id\u0027, \u0027fip_id\u0027)"},{"line_number":139,"context_line":"        pf_get_objects_mock.assert_called_once_with("},{"line_number":140,"context_line":"            self.ctxt, floatingip_id\u003d\u0027fip_id\u0027)"},{"line_number":141,"context_line":"        pf_get_object_mock.assert_called_once_with("},{"line_number":142,"context_line":"            self.ctxt, id\u003d\u0027need_to_delete_pf_id\u0027)"},{"line_number":143,"context_line":"        fip_get_object_mock.assert_called_once_with(self.ctxt, id\u003dmock.ANY)"},{"line_number":144,"context_line":"        fip_obj.update_fields.assert_called_once_with({\u0027router_id\u0027: None})"},{"line_number":145,"context_line":"        self.assertTrue(fip_obj.update.called)"},{"line_number":146,"context_line":"        push_api_mock.assert_called_once_with("},{"line_number":147,"context_line":"            self.ctxt, mock.ANY, rpc_events.DELETED)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @mock.patch.object(port_forwarding.PortForwarding, \u0027get_object\u0027)"},{"line_number":150,"context_line":"    def test_negative_delete_floatingip_port_forwarding("}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_36446db8","line":147,"range":{"start_line":137,"start_character":8,"end_line":147,"end_character":52},"updated":"2018-06-29 00:18:34.000000000","message":"this is kind of repeat what\u0027s already test before reset, suggestion: use plugin.delete_floating_ip to make sure that cascade delete works ?","commit_id":"73e815f069893445cbf3f0276305b382ee086152"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"c08f1d586b6523b80c547aeb78f9745a92cb7253","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        pf_get_object_mock.return_value \u003d pf_obj"},{"line_number":135,"context_line":"        pf_get_objects_mock.return_value \u003d [\u0027need_to_delete_pf_id\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        self.pf_plugin.delete_floatingip_port_forwarding("},{"line_number":138,"context_line":"            self.ctxt, \u0027need_to_delete_pf_id\u0027, \u0027fip_id\u0027)"},{"line_number":139,"context_line":"        pf_get_objects_mock.assert_called_once_with("},{"line_number":140,"context_line":"            self.ctxt, floatingip_id\u003d\u0027fip_id\u0027)"},{"line_number":141,"context_line":"        pf_get_object_mock.assert_called_once_with("},{"line_number":142,"context_line":"            self.ctxt, id\u003d\u0027need_to_delete_pf_id\u0027)"},{"line_number":143,"context_line":"        fip_get_object_mock.assert_called_once_with(self.ctxt, id\u003dmock.ANY)"},{"line_number":144,"context_line":"        fip_obj.update_fields.assert_called_once_with({\u0027router_id\u0027: None})"},{"line_number":145,"context_line":"        self.assertTrue(fip_obj.update.called)"},{"line_number":146,"context_line":"        push_api_mock.assert_called_once_with("},{"line_number":147,"context_line":"            self.ctxt, mock.ANY, rpc_events.DELETED)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @mock.patch.object(port_forwarding.PortForwarding, \u0027get_object\u0027)"},{"line_number":150,"context_line":"    def test_negative_delete_floatingip_port_forwarding("}],"source_content_type":"text/x-python","patch_set":25,"id":"5f7c97a3_0715799b","line":147,"range":{"start_line":137,"start_character":8,"end_line":147,"end_character":52},"in_reply_to":"5f7c97a3_36446db8","updated":"2018-06-29 04:35:53.000000000","message":"Hmm, the case you said it not covered by this test. It sounds like a functional test. Also the patch not cover your case, it\u0027s in the second patch https://review.openstack.org/#/c/574673/8/neutron/services/portforwarding/pf_plugin.py","commit_id":"73e815f069893445cbf3f0276305b382ee086152"}]}
