)]}'
{"neutron/agent/linux/openvswitch_firewall/firewall.py":[{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"working for Ericsson, UTC+1 (+DST)"},"change_message_id":"08e30600bc17c5a349b22e9ee66c3be511005cf7","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        \"\"\"Pass packets from these ports directly to ingress pipeline.\"\"\""},{"line_number":669,"context_line":"        ovs_ports \u003d self.get_ovs_ports(port_ids)"},{"line_number":670,"context_line":"        for port_id in port_ids:"},{"line_number":671,"context_line":"            self._initialize_egress_no_port_security(port_id,"},{"line_number":672,"context_line":"                                                     ovs_ports\u003dovs_ports)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def remove_trusted_ports(self, port_ids):"},{"line_number":675,"context_line":"        for port_id in port_ids:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_302c28ab","line":672,"range":{"start_line":671,"start_character":53,"end_line":672,"end_character":72},"updated":"2019-07-12 07:54:41.000000000","message":"It\u0027s strange that we query the ovs port by port id here when we handle multiple ports but elsewhere (in _initialize...) when we handle a single port. It would be cleaner if we did both at the same place (either here or there, but at the same place). For example _initialize_egress_no_port_security would take one or more items of the same type.","commit_id":"64168df744e1619ab9290327ad64298e1facf1a6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"883843b0107a24bea136d2fccf50afa665ff14ad","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        \"\"\"Pass packets from these ports directly to ingress pipeline.\"\"\""},{"line_number":669,"context_line":"        ovs_ports \u003d self.get_ovs_ports(port_ids)"},{"line_number":670,"context_line":"        for port_id in port_ids:"},{"line_number":671,"context_line":"            self._initialize_egress_no_port_security(port_id,"},{"line_number":672,"context_line":"                                                     ovs_ports\u003dovs_ports)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def remove_trusted_ports(self, port_ids):"},{"line_number":675,"context_line":"        for port_id in port_ids:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_dd484c88","line":672,"range":{"start_line":671,"start_character":53,"end_line":672,"end_character":72},"in_reply_to":"7faddb67_302c28ab","updated":"2019-07-12 10:22:26.000000000","message":"\"_initialize_egress_no_port_security\" is called from:\n- process_trusted_ports\n- update_port_filter\n- prepare_port_filter\n\nThe problem of modifying caller methods is that those methods are agent.FirewallDriver abstract methods implementations. Update and prepare methods only accept one port, unlike \"process_trusted_ports\". Is not that easy to change the firewall API.","commit_id":"64168df744e1619ab9290327ad64298e1facf1a6"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c2138b225d9e12e6056360140fdbf3a0ecc543e8","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def _initialize_egress_no_port_security(self, port_id, ovs_ports\u003dNone):"},{"line_number":754,"context_line":"        try:"},{"line_number":755,"context_line":"            if ovs_ports is not None:"},{"line_number":756,"context_line":"                ovs_port \u003d ovs_ports.get(port_id)"},{"line_number":757,"context_line":"                if not ovs_port:"},{"line_number":758,"context_line":"                    raise exceptions.OVSFWPortNotFound(port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_3a54edfd","line":755,"updated":"2019-07-15 08:40:58.000000000","message":"IMO would be enough something like:\n\n    if ovs_ports:\n        ....\n\nbut that is only nitty nit :)","commit_id":"ae1d36fa9d8e2115a5241b5da2e941cdefa2c463"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4cd3634c6c3ecf51d402b4965edd81cd3c0bece3","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def _initialize_egress_no_port_security(self, port_id, ovs_ports\u003dNone):"},{"line_number":754,"context_line":"        try:"},{"line_number":755,"context_line":"            if ovs_ports is not None:"},{"line_number":756,"context_line":"                ovs_port \u003d ovs_ports.get(port_id)"},{"line_number":757,"context_line":"                if not ovs_port:"},{"line_number":758,"context_line":"                    raise exceptions.OVSFWPortNotFound(port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_4380e0bf","line":755,"in_reply_to":"7faddb67_3a54edfd","updated":"2019-07-15 12:56:00.000000000","message":"By default ovs_ports is None. In this case, we need to retrieve the port information individually because no information was given (L760).\n\nBut https://review.opendev.org/#/c/670162/4/neutron/agent/linux/openvswitch_firewall/firewall.py@670 can return an empty list. In this case we need to execute this branch.","commit_id":"ae1d36fa9d8e2115a5241b5da2e941cdefa2c463"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1288cf32566b3a711104985125d7aedd55f30faa","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def _initialize_egress_no_port_security(self, port_id, ovs_ports\u003dNone):"},{"line_number":754,"context_line":"        try:"},{"line_number":755,"context_line":"            if ovs_ports is not None:"},{"line_number":756,"context_line":"                ovs_port \u003d ovs_ports.get(port_id)"},{"line_number":757,"context_line":"                if not ovs_port:"},{"line_number":758,"context_line":"                    raise exceptions.OVSFWPortNotFound(port_id\u003dport_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a3cd1432","line":755,"in_reply_to":"7faddb67_4380e0bf","updated":"2019-07-15 12:59:35.000000000","message":"ok, that makes sense :)","commit_id":"ae1d36fa9d8e2115a5241b5da2e941cdefa2c463"}]}
