)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"- Request registers for extensions."},{"line_number":14,"context_line":"- spec: https://review.openstack.org/#/c/320439"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"bug: #1563967"},{"line_number":17,"context_line":"Change-Id: Ifd13ab6757b479f624d2c7d7deef3b2a3fddf457"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"1f9dbf25_2f041a17","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":4},"updated":"2018-02-28 16:43:40.000000000","message":"Closes-Bug:","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}],"neutron/agent/linux/openvswitch_firewall/firewall.py":[{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        self.int_br.br.add_flow("},{"line_number":451,"context_line":"            table\u003dovs_consts.ACCEPTED_EGRESS_TRAFFIC_TABLE,"},{"line_number":452,"context_line":"            priority\u003d1,"},{"line_number":453,"context_line":"            actions\u003d\u0027resubmit(,%d)\u0027 % ("},{"line_number":454,"context_line":"                ovs_consts.INPUT_TAGGING_TABLE))"},{"line_number":455,"context_line":"        for table in (ovs_consts.ACCEPTED_INGRESS_TRAFFIC_TABLE,"},{"line_number":456,"context_line":"                      ovs_consts.DROPPED_TRAFFIC_TABLE):"},{"line_number":457,"context_line":"            self.int_br.br.add_flow("}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_6a38d0d2","line":454,"range":{"start_line":453,"start_character":21,"end_line":454,"end_character":48},"updated":"2018-02-28 16:43:40.000000000","message":"How about aligning with \".format()\" like #918?","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}],"neutron/agent/linux/openvswitch_firewall/iptables.py":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"a44c30c0b6dd685acd92893ee570c0fabb759a8e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    class HybridIptablesHelper("},{"line_number":28,"context_line":"            iptables_firewall.OVSHybridIptablesFirewallDriver):"},{"line_number":29,"context_line":"        \"\"\"Don\u0027t remove conntrack when removing iptables rules.\"\"\""},{"line_number":30,"context_line":"        def _remove_conntrack_entries_from_port_deleted(self, port):"},{"line_number":31,"context_line":"            pass"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    return HybridIptablesHelper()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_e3db6eea","line":30,"range":{"start_line":30,"start_character":56,"end_line":30,"end_character":62},"updated":"2017-11-14 17:28:32.000000000","message":"There is a patch to fix this actually, I\u0027ll leave it in for now to make sure all the tests are ok.","commit_id":"64e0b2fa0e3e4cdba15afb3ff4ba3e98273d09f1"}],"neutron/common/exceptions.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class OpenFlowPipelineTableConflict(e.NeutronException):"},{"line_number":338,"context_line":"    message \u003d _(\"A table used by the OpenFlowManager is being used\""},{"line_number":339,"context_line":"                \"By another feature\")"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_01675dbf","line":338,"updated":"2017-04-10 11:54:22.000000000","message":"Add a space","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class OpenFlowPipelineTableConflict(e.NeutronException):"},{"line_number":338,"context_line":"    message \u003d _(\"A table used by the OpenFlowManager is being used\""},{"line_number":339,"context_line":"                \"By another feature\")"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"class OpenFlowPipelineInvalidFunctionName(e.NeutronException):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_81724d7a","line":339,"range":{"start_line":339,"start_character":17,"end_line":339,"end_character":18},"updated":"2017-04-10 11:54:22.000000000","message":"This should be lowercase","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    message \u003d _(\"Both tenant_id and project_id passed as filters.\")"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class OpenFlowPipelineTableConflict(e.NeutronException):"},{"line_number":338,"context_line":"    message \u003d _(\"A table used by the OpenFlowManager is being used\""},{"line_number":339,"context_line":"                \"By another feature\")"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"class OpenFlowPipelineInvalidFunctionName(e.NeutronException):"},{"line_number":343,"context_line":"    message \u003d _(\"An unknown OpenFlowFunction has been registered\")"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"class OpenFlowPipelineTablesExhausted(e.NeutronException):"},{"line_number":347,"context_line":"    message \u003d _(\"Pool of unused tables depleted\")"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"class OpenFlowPipelineRegistersExhausted(e.NeutronException):"},{"line_number":351,"context_line":"    message \u003d _(\"Pool of unused registers depleted\")"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"class OpenFlowFunctionInvalidTable(e.NeutronException):"},{"line_number":355,"context_line":"    message \u003d _(\"The OpenFlowFunction cannot find the table requested\")"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"class OpenFlowFunctionInvalidRegister(e.NeutronException):"},{"line_number":359,"context_line":"    message \u003d _(\"The OpenFlowFunction cannot find the register requested\")"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"class OpenFlowRegisterInvalidRange(e.NeutronException):"},{"line_number":363,"context_line":"    message \u003d _(\"The OpenFlowRegister size is invalid\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_f427f1b5","line":363,"range":{"start_line":337,"start_character":0,"end_line":363,"end_character":55},"updated":"2017-06-09 12:58:00.000000000","message":"To help troubleshooting, I think many of these exceptions should have a parameter that would be used in the message: in particular table name and register size.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"class OpenFlowPipelineTableConflict(e.NeutronException):"},{"line_number":362,"context_line":"    message \u003d _(\"A table used by the OpenFlowManager is being used \""},{"line_number":363,"context_line":"                \"by another feature\")"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_021c2476","line":362,"updated":"2017-11-15 15:54:58.000000000","message":"maybe You could put here number of table?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":359,"context_line":""},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"class OpenFlowPipelineTableConflict(e.NeutronException):"},{"line_number":362,"context_line":"    message \u003d _(\"A table used by the OpenFlowManager is being used \""},{"line_number":363,"context_line":"                \"by another feature\")"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_5237b2b1","line":362,"in_reply_to":"1f485f77_021c2476","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"class OpenFlowPipelineInvalidFunctionName(e.NeutronException):"},{"line_number":367,"context_line":"    message \u003d _(\"An OpenFlowFunction has been registered without and \""},{"line_number":368,"context_line":"                \" identifying suffix: $(table_name)s\")"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_e220e8ae","line":367,"updated":"2017-11-15 15:54:58.000000000","message":"and? shouldn\u0027t be \"an\" maybe?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"class OpenFlowPipelineInvalidFunctionName(e.NeutronException):"},{"line_number":367,"context_line":"    message \u003d _(\"An OpenFlowFunction has been registered without and \""},{"line_number":368,"context_line":"                \" identifying suffix: $(table_name)s\")"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_b2bcfe05","line":367,"in_reply_to":"1f485f77_e220e8ae","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                \"to device %(device)s.\")"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class OpenFlowManagerInvalidBridge(e.NeutronException):"},{"line_number":381,"context_line":"    message \u003d _(\"The Bridge %(bridge)s already exists in the OpenFlowManager\")"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_6a3d30ba","line":380,"updated":"2018-02-28 16:43:40.000000000","message":"It\u0027s better to add period(\".\") at the end of sentence.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}],"neutron/plugins/ml2/drivers/openvswitch/agent/common/constants.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":146,"context_line":"### Elements of the OVS Pipeline"},{"line_number":147,"context_line":"INPUT_TAGGING_TABLE \u003d 50"},{"line_number":148,"context_line":"INGRESS_DEFLECTOR_TABLE \u003d 127"},{"line_number":149,"context_line":"OUTPUT_TABLE \u003d 253"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"OVS_PIPELINE \u003d ["},{"line_number":152,"context_line":"    INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_020d1ce7","line":149,"range":{"start_line":149,"start_character":15,"end_line":149,"end_character":18},"updated":"2017-04-10 11:54:22.000000000","message":"nit: again, if I\u0027m not wrong, max table number is 254 (from 0 to 254). Would you prefer to use it?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"### Elements of the OVS Pipeline"},{"line_number":147,"context_line":"INPUT_TAGGING_TABLE \u003d 50"},{"line_number":148,"context_line":"INGRESS_DEFLECTOR_TABLE \u003d 127"},{"line_number":149,"context_line":"OUTPUT_TABLE \u003d 253"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"OVS_PIPELINE \u003d ["},{"line_number":152,"context_line":"    INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_7c6b6784","line":149,"range":{"start_line":149,"start_character":15,"end_line":149,"end_character":18},"in_reply_to":"bff0334d_020d1ce7","updated":"2017-10-03 16:39:11.000000000","message":"Table 254 can\u0027t have flows placed on it, any packet that gets to table 254 is auto-dropped.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"TOTAL_OPENFLOW_TABLES \u003d 254"},{"line_number":44,"context_line":"INPUT_TAGGING_TABLE \u003d 50"},{"line_number":45,"context_line":"INGRESS_DEFLECTOR_TABLE \u003d 127"},{"line_number":46,"context_line":"OUTPUT_TABLE \u003d 253"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"OVS_PIPELINE \u003d ["},{"line_number":49,"context_line":"    INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_9f6771b8","line":46,"range":{"start_line":46,"start_character":0,"end_line":46,"end_character":18},"updated":"2017-08-22 16:04:15.000000000","message":"Rodolpho had a comment on PS7: why not 254 here ?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":43,"context_line":"TOTAL_OPENFLOW_TABLES \u003d 254"},{"line_number":44,"context_line":"INPUT_TAGGING_TABLE \u003d 50"},{"line_number":45,"context_line":"INGRESS_DEFLECTOR_TABLE \u003d 127"},{"line_number":46,"context_line":"OUTPUT_TABLE \u003d 253"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"OVS_PIPELINE \u003d ["},{"line_number":49,"context_line":"    INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_f83b6599","line":46,"range":{"start_line":46,"start_character":0,"end_line":46,"end_character":18},"in_reply_to":"9f436f4f_9f6771b8","updated":"2017-08-23 16:36:44.000000000","message":"Sorry, I responded on IRC.\n254 is a drop table for Openflow, You can\u0027t write flows to it.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":226,"context_line":"SKIP_CLEANUP \u003d \u0027skip_cleanup\u0027"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"# OpenFlow registers"},{"line_number":229,"context_line":"OPENFLOW_TOTAL_REG \u003d 8"},{"line_number":230,"context_line":"OPENFLOW_REG_SIZE \u003d 32"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_064635c1","line":230,"range":{"start_line":229,"start_character":0,"end_line":230,"end_character":22},"updated":"2017-08-29 15:32:28.000000000","message":"I think the allocation mechanism will be much more efficient using, instead of 4-byte registers, the larger 16-byte registers available at xxreg0/xxreg1/xxreg2/xxreg3 (see [1]).\n\n[1] http://openvswitch.org/support/dist-docs/ovs-fields.7.txt","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"SKIP_CLEANUP \u003d \u0027skip_cleanup\u0027"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"# OpenFlow registers"},{"line_number":229,"context_line":"OPENFLOW_TOTAL_REG \u003d 8"},{"line_number":230,"context_line":"OPENFLOW_REG_SIZE \u003d 32"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_1544de1a","line":230,"range":{"start_line":229,"start_character":0,"end_line":230,"end_character":22},"in_reply_to":"7f287b81_064635c1","updated":"2017-10-03 16:39:11.000000000","message":"This will be an easy change to make, will we need to bump the minimum version of OvS to make it though?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    UCAST_TO_TUN,"},{"line_number":153,"context_line":"    ARP_RESPONDER,"},{"line_number":154,"context_line":"    FLOOD_TO_TUN,"},{"line_number":155,"context_line":")"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"## Physical Bridges (phys_brs)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_e252283b","line":155,"updated":"2017-11-15 15:54:58.000000000","message":"I\u0027m just courious, there is no tables for external bridge?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    UCAST_TO_TUN,"},{"line_number":153,"context_line":"    ARP_RESPONDER,"},{"line_number":154,"context_line":"    FLOOD_TO_TUN,"},{"line_number":155,"context_line":")"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"## Physical Bridges (phys_brs)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_989cea6a","line":155,"in_reply_to":"1f485f77_e252283b","updated":"2017-11-24 17:33:59.000000000","message":"I put this one together because it sounded like someone wanted to make a pipeline for the tunnel bridge, but it\u0027s unused in this patch, so I should remove it.","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":38,"context_line":"### OpenFlow table IDs"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"### Elements of the OVS Pipeline"},{"line_number":41,"context_line":"#Note(davidsha) openflow tables range from 0-\u003e254, flows cannot be written to"},{"line_number":42,"context_line":"# table 254 as any traffic reaching there is dropped."},{"line_number":43,"context_line":"TOTAL_OPENFLOW_TABLES \u003d 254"},{"line_number":44,"context_line":"INPUT_TAGGING_TABLE \u003d 100"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_8a7d1c70","line":41,"range":{"start_line":41,"start_character":1,"end_line":41,"end_character":5},"updated":"2018-02-28 16:43:40.000000000","message":"# NOTE","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"e5998f252b4047680a7e9f5ca3039d36f3385f45","unresolved":false,"context_lines":[{"line_number":224,"context_line":"# ovs_cleanup script is used."},{"line_number":225,"context_line":"SKIP_CLEANUP \u003d \u0027skip_cleanup\u0027"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"# OpenFlow registers"},{"line_number":228,"context_line":"OPENFLOW_TOTAL_REG \u003d 8"},{"line_number":229,"context_line":"OPENFLOW_REG_SIZE \u003d 32"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_b4bce805","line":229,"range":{"start_line":227,"start_character":0,"end_line":229,"end_character":22},"updated":"2018-03-01 16:21:26.000000000","message":"As said earlier, I think this change would really be better if using the largest possible registers.  At the very least, if we end up not doing it, it would be great to have discussed the pros/cons first.\n\n( See https://review.openstack.org/#/c/323963/8/neutron/plugins/ml2/drivers/openvswitch/agent/common/constants.py@230 )","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"788da5c663b64d818127dddc79b7ad5a1a919e59","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    OUTPUT_TABLE,"},{"line_number":60,"context_line":"]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# OpenFlow feature priority"},{"line_number":63,"context_line":"TAAS_EGRESS_PREFILTER \u003d \"TAP-PRE-EG\""},{"line_number":64,"context_line":"BGPVPN_EGRESS_PREFILTER \u003d \"BGP-PRE-EG\""},{"line_number":65,"context_line":"SFC_EGRESS_PREFILTER \u003d \"SFC-PRE-EG\""},{"line_number":66,"context_line":"QOS_EGRESS_DSCP \u003d \"DSCP-EG\""},{"line_number":67,"context_line":"QOS_EGRESS_MIN_BW \u003d \"MIN-BW-EG\""},{"line_number":68,"context_line":"TAAS_EGRESS_POSTFILTER \u003d \"TAP-POST-EG\""},{"line_number":69,"context_line":"SFC_EGRESS_POSTFILTER \u003d \"SFC-POST-EG\""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"TAAS_INGRESS_PREFILTER \u003d \"TAP-PRE-IN\""},{"line_number":72,"context_line":"SFC_INGRESS_PREFILTER \u003d \"SFC-PRE-IN\""},{"line_number":73,"context_line":"TAAS_INGRESS_POSTFILTER \u003d \"TAP-POST-IN\""},{"line_number":74,"context_line":"SFC_INGRESS_POSTFILTER \u003d \"SFC-POST-IN\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"INT_BR_EGRESS_PRIORITY \u003d [TAAS_EGRESS_PREFILTER, BGPVPN_EGRESS_PREFILTER,"},{"line_number":77,"context_line":"    SFC_EGRESS_PREFILTER, QOS_EGRESS_MIN_BW, QOS_EGRESS_DSCP,"}],"source_content_type":"text/x-python","patch_set":60,"id":"5f7c97a3_d87e3a69","line":74,"range":{"start_line":62,"start_character":0,"end_line":74,"end_character":38},"updated":"2018-06-20 14:50:10.000000000","message":"Will these constants be needed in external repositories like SFC or TAAS?  If so, is the plan to migrate them to neutron-lib?  If so, leave a #TODO.","commit_id":"05832b2c74c1101de9a29c950dd1f576455a4c13"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"5237809c110134372c68dc9241cb7e87e47b08ea","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    OUTPUT_TABLE,"},{"line_number":60,"context_line":"]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# OpenFlow feature priority"},{"line_number":63,"context_line":"TAAS_EGRESS_PREFILTER \u003d \"TAP-PRE-EG\""},{"line_number":64,"context_line":"BGPVPN_EGRESS_PREFILTER \u003d \"BGP-PRE-EG\""},{"line_number":65,"context_line":"SFC_EGRESS_PREFILTER \u003d \"SFC-PRE-EG\""},{"line_number":66,"context_line":"QOS_EGRESS_DSCP \u003d \"DSCP-EG\""},{"line_number":67,"context_line":"QOS_EGRESS_MIN_BW \u003d \"MIN-BW-EG\""},{"line_number":68,"context_line":"TAAS_EGRESS_POSTFILTER \u003d \"TAP-POST-EG\""},{"line_number":69,"context_line":"SFC_EGRESS_POSTFILTER \u003d \"SFC-POST-EG\""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"TAAS_INGRESS_PREFILTER \u003d \"TAP-PRE-IN\""},{"line_number":72,"context_line":"SFC_INGRESS_PREFILTER \u003d \"SFC-PRE-IN\""},{"line_number":73,"context_line":"TAAS_INGRESS_POSTFILTER \u003d \"TAP-POST-IN\""},{"line_number":74,"context_line":"SFC_INGRESS_POSTFILTER \u003d \"SFC-POST-IN\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"INT_BR_EGRESS_PRIORITY \u003d [TAAS_EGRESS_PREFILTER, BGPVPN_EGRESS_PREFILTER,"},{"line_number":77,"context_line":"    SFC_EGRESS_PREFILTER, QOS_EGRESS_MIN_BW, QOS_EGRESS_DSCP,"}],"source_content_type":"text/x-python","patch_set":60,"id":"5f7c97a3_ee3a4396","line":74,"range":{"start_line":62,"start_character":0,"end_line":74,"end_character":38},"in_reply_to":"5f7c97a3_d87e3a69","updated":"2018-06-21 01:56:16.000000000","message":"Yes, you are right. Thanks for the review.\nDone","commit_id":"05832b2c74c1101de9a29c950dd1f576455a4c13"}],"neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"503a946617e511ed1bf2faf070ad01bad1af7ceb","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.l2.extensions import qos"},{"line_number":21,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.agent.common import ("},{"line_number":22,"context_line":"    constants)"},{"line_number":23,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.mech_driver import ("},{"line_number":24,"context_line":"    mech_openvswitch)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_aa1a7a7a","line":22,"updated":"2016-07-13 20:55:40.000000000","message":"nit: I think it\u0027s not neccessary here to split it into 2 lines","commit_id":"6615a3fa3286a07e046c92b310dfa24208ec7c4d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"5a00a01c7665b4d23a6bde3ceabc57caf13db8ad","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.l2.extensions import qos"},{"line_number":21,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.agent.common import ("},{"line_number":22,"context_line":"    constants)"},{"line_number":23,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.mech_driver import ("},{"line_number":24,"context_line":"    mech_openvswitch)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_09e1019b","line":22,"in_reply_to":"1aa78d24_aa1a7a7a","updated":"2016-07-14 10:53:01.000000000","message":"ack, though this will probably be removed when I return the QoS driver back to normal. This file was just modified to demonstrate the pipeline can be constructed when tables are added randomly.","commit_id":"6615a3fa3286a07e046c92b310dfa24208ec7c4d"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_int.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def setup_canary_table(self):"},{"line_number":49,"context_line":"        self.install_drop(constants.CANARY_TABLE)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def install_normal(self, table_id\u003d0, priority\u003d0,"},{"line_number":52,"context_line":"                       match\u003dNone, **match_kwargs):"},{"line_number":53,"context_line":"        self.install_goto(dest_table_id\u003dconstants.INPUT_TAGGING_TABLE,"},{"line_number":54,"context_line":"                          table_id\u003dtable_id, priority\u003dpriority,"},{"line_number":55,"context_line":"                          match\u003dmatch, **match_kwargs)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def construct_pipeline(self):"},{"line_number":58,"context_line":"        (_dp, ofp, _ofpp) \u003d self._get_dp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_d4c06d53","line":55,"range":{"start_line":51,"start_character":0,"end_line":55,"end_character":54},"updated":"2017-06-09 12:58:00.000000000","message":"See my comment on the same method in ovs_ofctl/br_int.py","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def construct_pipeline(self):"},{"line_number":58,"context_line":"        (_dp, ofp, _ofpp) \u003d self._get_dp()"},{"line_number":59,"context_line":"        self.install_output(port\u003dofp.OFPP_NORMAL,"},{"line_number":60,"context_line":"                            table_id\u003dconstants.OUTPUT_TABLE, priority\u003d1,"},{"line_number":61,"context_line":"                            match\u003dNone)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        self.install_goto(dest_table_id\u003dconstants.OUTPUT_TABLE,"},{"line_number":64,"context_line":"                          table_id\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":65,"context_line":"                          priority\u003d1)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        self.install_goto(dest_table_id\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":68,"context_line":"                          table_id\u003dconstants.INPUT_TAGGING_TABLE,"},{"line_number":69,"context_line":"                          priority\u003d1)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def check_canary_table(self):"},{"line_number":72,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_14ff05ab","line":69,"range":{"start_line":59,"start_character":0,"end_line":69,"end_character":37},"updated":"2017-06-09 12:58:00.000000000","message":"nit: I would find it easier to read/understand with table_id as the first argument, and with the install_goto statement in the reverse order, so that the flow of traffic follows top-down reading\n\nINPUT_TAGGING\n-\u003e INGRESS_DEFLECTOR \n\nINGRESS_DEFLECTOR\n-\u003e OUTPUT_TABLE\n\nOUTPUT_TABLE\n-\u003e NORMAL","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"}],"neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/br_int.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    \"\"\"openvswitch agent br-int specific logic.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def setup_default_table(self):"},{"line_number":37,"context_line":"        self.install_normal()"},{"line_number":38,"context_line":"        self.construct_pipeline()"},{"line_number":39,"context_line":"        self.setup_canary_table()"},{"line_number":40,"context_line":"        self.install_normal()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_d42f4df4","line":37,"range":{"start_line":37,"start_character":6,"end_line":37,"end_character":29},"updated":"2017-06-09 12:58:00.000000000","message":"this is already called on line 40,","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.install_normal()"},{"line_number":41,"context_line":"        self.install_drop(table_id\u003dconstants.ARP_SPOOF_TABLE)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def install_normal(self, table_id\u003d0, priority\u003d0, **kwargs):"},{"line_number":44,"context_line":"        self.add_flow(table\u003dtable_id,"},{"line_number":45,"context_line":"                      priority\u003dpriority,"},{"line_number":46,"context_line":"                      actions\u003d\"resubmit(,%i)\" % constants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_b48299c7","line":43,"range":{"start_line":43,"start_character":6,"end_line":43,"end_character":23},"updated":"2017-06-09 12:58:00.000000000","message":"This overrides a method from a mother class [1], but the behavior seems different. If this really is the intended behavior, that would be worth explaining, and perhaps renaming the method would be better.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/ofswitch.py#L60","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_agent_extension_api.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"503a946617e511ed1bf2faf070ad01bad1af7ceb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    \u0027\u0027\u0027"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __init__(self, bridge):"},{"line_number":87,"context_line":"        super(OVSCookieBridge, self).__init__(bridge)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class OpenFlowTable(OVSCookieBridgeMixin):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_2dbfc4fd","line":87,"updated":"2016-07-13 20:55:40.000000000","message":"sorry but I don\u0027t understand why You need this new class here :/","commit_id":"6615a3fa3286a07e046c92b310dfa24208ec7c4d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"5a00a01c7665b4d23a6bde3ceabc57caf13db8ad","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    \u0027\u0027\u0027"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __init__(self, bridge):"},{"line_number":87,"context_line":"        super(OVSCookieBridge, self).__init__(bridge)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class OpenFlowTable(OVSCookieBridgeMixin):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_32ca6a1b","line":87,"in_reply_to":"1aa78d24_2dbfc4fd","updated":"2016-07-14 10:53:01.000000000","message":"With the way I was using the OVSCookieBridge I was advised to make it into a Mixin to show explicitly what I was doing. There are already instances of the cookie bridge being used out of tree so I added this call so out of tree calls would not break.","commit_id":"6615a3fa3286a07e046c92b310dfa24208ec7c4d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1681dd818c34c8f4c99c323deb17e1d66bf0b918","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return ovs_lib.DeferredOVSBridge(self, **kwargs)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class OVSCookieBridge(OVSCookieBridgeMixin):"},{"line_number":73,"context_line":"    \u0027\u0027\u0027Passthrough bridge adding cookies before calling the underlying bridge"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    This class creates a bridge that will pass all calls to its underlying"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_0afda2b3","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":44},"updated":"2016-11-29 11:01:56.000000000","message":"Why do you create this \"empty\" class?","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4339f255b29c319dab704316fe3dd3a0c235b2f2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return ovs_lib.DeferredOVSBridge(self, **kwargs)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class OVSCookieBridge(OVSCookieBridgeMixin):"},{"line_number":73,"context_line":"    \u0027\u0027\u0027Passthrough bridge adding cookies before calling the underlying bridge"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    This class creates a bridge that will pass all calls to its underlying"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_3f3d1edd","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":44},"in_reply_to":"5a74a57a_0afda2b3","updated":"2016-11-29 11:30:48.000000000","message":"It\u0027s the Cookie bridge used by the AgentExtensionsAPI, I converted it to a mixin but would still need a OVSCookieBridge class to use for the extensions API.","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_flow_manager.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1681dd818c34c8f4c99c323deb17e1d66bf0b918","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":51,"context_line":"        super(OpenFlowManager, self).__init__(bridge)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        for table in constants.OVS_PIPELINE:"},{"line_number":54,"context_line":"            if table in table_whitelist:"},{"line_number":55,"context_line":"                raise exceptions.AttributeError()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self._pipeline \u003d []"},{"line_number":58,"context_line":"        self._registers \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_9fc71263","line":55,"range":{"start_line":53,"start_character":0,"end_line":55,"end_character":49},"updated":"2016-11-29 11:01:56.000000000","message":"Maybe you should check better the flow tables to be use.\n\nWhite list if oging to be OVS_INT_TABLES and OVS_PIPELINE. You should check flow table indexes in both lists are unique, like:\nlen(table_whitelist) \u003d\u003d len(set(table_whitelist))\nlen(constants.OVS_PIPELINE) \u003d\u003d len(set(constants.OVS_PIPELINE))\nset(constants.OVS_PIPELINE) \u0026 set(table_whitelist) \u003d\u003d set([])","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4339f255b29c319dab704316fe3dd3a0c235b2f2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":51,"context_line":"        super(OpenFlowManager, self).__init__(bridge)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        for table in constants.OVS_PIPELINE:"},{"line_number":54,"context_line":"            if table in table_whitelist:"},{"line_number":55,"context_line":"                raise exceptions.AttributeError()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self._pipeline \u003d []"},{"line_number":58,"context_line":"        self._registers \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_bf284d87","line":55,"range":{"start_line":53,"start_character":0,"end_line":55,"end_character":49},"in_reply_to":"5a74a57a_9fc71263","updated":"2016-11-29 11:30:48.000000000","message":"ack.","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1681dd818c34c8f4c99c323deb17e1d66bf0b918","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                raise exceptions.AttributeError()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self._pipeline \u003d []"},{"line_number":58,"context_line":"        self._registers \u003d []"},{"line_number":59,"context_line":"        self._registered_functions \u003d []"},{"line_number":60,"context_line":"        self.ingress_prio \u003d ingress_prio"},{"line_number":61,"context_line":"        self.egress_prio \u003d egress_prio"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_7f24f60b","line":58,"range":{"start_line":58,"start_character":7,"end_line":58,"end_character":28},"updated":"2016-11-29 11:01:56.000000000","message":"Why do you need this instance variable? You are using the class variable instead and this one is not used.","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4339f255b29c319dab704316fe3dd3a0c235b2f2","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                raise exceptions.AttributeError()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        self._pipeline \u003d []"},{"line_number":58,"context_line":"        self._registers \u003d []"},{"line_number":59,"context_line":"        self._registered_functions \u003d []"},{"line_number":60,"context_line":"        self.ingress_prio \u003d ingress_prio"},{"line_number":61,"context_line":"        self.egress_prio \u003d egress_prio"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_1f7061a3","line":58,"range":{"start_line":58,"start_character":7,"end_line":58,"end_character":28},"in_reply_to":"5a74a57a_7f24f60b","updated":"2016-11-29 11:30:48.000000000","message":"Ack, I\u0027ll remove it.","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1681dd818c34c8f4c99c323deb17e1d66bf0b918","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.add_flow(table\u003dfeature_table, priority\u003d1,"},{"line_number":260,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def update_port(self, port):"},{"line_number":263,"context_line":"        self._resolve_pipeline()"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        port_name \u003d port[\"vif_port\"].port_name"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_9f763204","line":262,"range":{"start_line":262,"start_character":3,"end_line":262,"end_character":32},"updated":"2016-11-29 11:01:56.000000000","message":"You are not using this function in the ovs agent, maybe because this is a WIP","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"4339f255b29c319dab704316fe3dd3a0c235b2f2","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.add_flow(table\u003dfeature_table, priority\u003d1,"},{"line_number":260,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def update_port(self, port):"},{"line_number":263,"context_line":"        self._resolve_pipeline()"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        port_name \u003d port[\"vif_port\"].port_name"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a74a57a_c2eb6e11","line":262,"range":{"start_line":262,"start_character":3,"end_line":262,"end_character":32},"in_reply_to":"5a74a57a_9f763204","updated":"2016-11-29 11:30:48.000000000","message":"This function is in the ovs agent, however the delete_port isn\u0027t, I\u0027ll change this in the next patch.","commit_id":"da37f7473830fe24ae2e4efe89df619fdf99f09c"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Intel Corporation."},{"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":5,"id":"5a3905b3_571708a3","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2017-01-19 22:59:40.000000000","message":"2017","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    return(of_func)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def clear_OpenFlowManager():"},{"line_number":33,"context_line":"    OpenFlowManager._available_tables \u003d []"},{"line_number":34,"context_line":"    OpenFlowManager._registers \u003d []"},{"line_number":35,"context_line":"    OpenFlowManager._assigned_tables \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_346d0499","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":25},"updated":"2017-01-19 22:59:40.000000000","message":"Consider clear_open_flow_manager, clear_manager, or something else that consistent with the casing of other functions.","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":270,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        if \"qvo\" in port_name or \"vhu\" in port_name:"},{"line_number":273,"context_line":"            self.add_flow(in_port\u003dof_port,"},{"line_number":274,"context_line":"                          priority\u003d10,"},{"line_number":275,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_ff743efe","line":272,"updated":"2017-01-19 22:59:40.000000000","message":"These constants are defined in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L288.","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    _registers \u003d []"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __getattr__(self, funct):"},{"line_number":51,"context_line":"        return getattr(self.proxy_bridge, funct)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":54,"context_line":"        self.proxy_bridge \u003d copy.copy(bridge)"},{"line_number":55,"context_line":"        self.proxy_bridge.set_agent_uuid_stamp(bridge.request_cookie())"},{"line_number":56,"context_line":"        self.bridge \u003d bridge"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":59,"context_line":"            len(table_whitelist) !\u003d len(set(table_whitelist)) or"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_9ac58991","line":56,"range":{"start_line":51,"start_character":0,"end_line":56,"end_character":28},"updated":"2017-06-09 12:58:00.000000000","message":"I\u0027m not sure I understand what the intended pattern is: having an OpenFLowManager instance be itself a proxy to an OVS bridge having a distinct ?\n\nI think this could be confusing: for instance OpenFlowManager.delete_port would mask proxy_bridge.delete_port which also exist (in OVSBridge).\n\nI would find it simpler to:\n- not have the getattr procy\n- have self.bridge \u003d copy of the bridge with a different cookie\n\n(btw, you can use bridge.clone() which does a copy.copy() but is a place where other things needed for clones would be done when/if needed)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    _registers \u003d []"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __getattr__(self, funct):"},{"line_number":51,"context_line":"        return getattr(self.proxy_bridge, funct)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":54,"context_line":"        self.proxy_bridge \u003d copy.copy(bridge)"},{"line_number":55,"context_line":"        self.proxy_bridge.set_agent_uuid_stamp(bridge.request_cookie())"},{"line_number":56,"context_line":"        self.bridge \u003d bridge"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":59,"context_line":"            len(table_whitelist) !\u003d len(set(table_whitelist)) or"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f0e0f27_f9238a04","line":56,"range":{"start_line":51,"start_character":0,"end_line":56,"end_character":28},"in_reply_to":"bf091321_9ac58991","updated":"2017-10-03 16:39:11.000000000","message":"This was actually a work around for a change to the OVSCookieBridge which broke the entire flow manager.\nI\u0027ll have it fixed in the next PS.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self._ingress \u003d []"},{"line_number":74,"context_line":"        self._post_ingress \u003d []"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        for reg in range(8):"},{"line_number":77,"context_line":"            OpenFlowManager._registers.append(32)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        OpenFlowManager._available_tables \u003d (OpenFlowManager."}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_8f7d421e","line":76,"range":{"start_line":76,"start_character":19,"end_line":76,"end_character":27},"updated":"2017-06-09 12:58:00.000000000","message":"see below, use a constant here ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        OpenFlowManager._available_tables \u003d (OpenFlowManager."},{"line_number":80,"context_line":"                                _available_tables if"},{"line_number":81,"context_line":"                                 OpenFlowManager._available_tables else"},{"line_number":82,"context_line":"                                 [x for x in (set(range(254)) ^ set("},{"line_number":83,"context_line":"                                  table_whitelist +"},{"line_number":84,"context_line":"                                  constants.OVS_PIPELINE))])"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_e132395e","line":82,"range":{"start_line":82,"start_character":45,"end_line":82,"end_character":61},"updated":"2017-04-10 11:54:22.000000000","message":"If I\u0027m not wrong, in OVS you have tables from 0 to 254. This set goes from 0 to 253.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        OpenFlowManager._available_tables \u003d (OpenFlowManager."},{"line_number":80,"context_line":"                                _available_tables if"},{"line_number":81,"context_line":"                                 OpenFlowManager._available_tables else"},{"line_number":82,"context_line":"                                 [x for x in (set(range(254)) ^ set("},{"line_number":83,"context_line":"                                  table_whitelist +"},{"line_number":84,"context_line":"                                  constants.OVS_PIPELINE))])"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_fcdad748","line":82,"range":{"start_line":82,"start_character":45,"end_line":82,"end_character":61},"in_reply_to":"bff0334d_e132395e","updated":"2017-10-03 16:39:11.000000000","message":"254 is an auto drop table so it can\u0027t be allocated.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                  constants.OVS_PIPELINE))])"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _extract_table_nums(self, functions):"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        tables \u003d []"},{"line_number":89,"context_line":"        for funct in functions:"},{"line_number":90,"context_line":"            tables \u003d tables + funct.get_tables()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        return tables"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_table_by_table_num(self, table_num):"},{"line_number":95,"context_line":"        for function in self.functions:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_6a665cf0","line":92,"range":{"start_line":87,"start_character":0,"end_line":92,"end_character":21},"updated":"2017-06-09 12:58:00.000000000","message":"a good case for using reduce() ?\n\n  return reduce(lambda tables, f: tables + f.get_tables(),\n                functions, [])","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_table_by_table_num(self, table_num):"},{"line_number":95,"context_line":"        for function in self.functions:"},{"line_number":96,"context_line":"            if table_num in function.get_tables():"},{"line_number":97,"context_line":"                for table in function.declares_tables:"},{"line_number":98,"context_line":"                    if table_num \u003d\u003d table.table_num:"},{"line_number":99,"context_line":"                        return table"},{"line_number":100,"context_line":"        if table_num in self._white_list:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_91117455","line":97,"range":{"start_line":96,"start_character":0,"end_line":97,"end_character":54},"updated":"2017-04-10 11:54:22.000000000","message":"David, correct me if I\u0027m wrong.\n\nI took a look at your patch implementing DSCP functionality (https://review.openstack.org/#/c/399680/). In this patch you are implementing QosDscpOpenFlowFunction(OpenFlowFunction).\n\nThere you are initializating the class variable \"declares_tables\" to [ovs_flow_manager.OpenFlowTable(\"dscp_table\")]. But then you never modify it. May I asume QosDscpOpenFlowFunction.declares_tables will be always the same in all instances? In this case\n  (classmethod) function.get_tables() \u003c-- table numbers\n  function.declares_tables            \u003c-- tables\n\nfunction.declares_tables will contain the same table numbers as function.get_tables(). That means the next condition (if table_num \u003d\u003d table.table_num:) will be eventually always true.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        for funct in functions:"},{"line_number":105,"context_line":"            name \u003d funct.name"},{"line_number":106,"context_line":"            if name not in self.ingress_prio and name not in self.egress_prio:"},{"line_number":107,"context_line":"                raise exceptions.OpenFlowPipelineInvalidFunctionName()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            if \"EG\" in name[-2:]:"},{"line_number":110,"context_line":"                if \"PRE\" in name:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_3a8e7d78","line":107,"range":{"start_line":107,"start_character":68,"end_line":107,"end_character":70},"updated":"2017-06-09 12:58:00.000000000","message":"passing name here ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            for needed_funct in needed_functs:"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"                for funct in self._registered_functions:"},{"line_number":167,"context_line":"                    if (funct.name \u003d\u003d needed_funct and"},{"line_number":168,"context_line":"                        funct.extension \u003d\u003d func.extension):"},{"line_number":169,"context_line":"                        new_needed_functions.append(funct)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_ba828d4e","line":166,"range":{"start_line":166,"start_character":20,"end_line":166,"end_character":25},"updated":"2017-06-09 12:58:00.000000000","message":"the mix of \"func\" and \"funct\" makes the code pretty hard to read, perhaps using \"f\" could hint that this is the one of innermost loop (yes, well, I don\u0027t have a fantastic suggestion to make...)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                        funct.extension \u003d\u003d func.extension):"},{"line_number":169,"context_line":"                        new_needed_functions.append(funct)"},{"line_number":170,"context_line":"                        continue"},{"line_number":171,"context_line":"                    elif funct.name \u003d\u003d needed_funct:"},{"line_number":172,"context_line":"                        LOG.error(_LE(\"OpenFlowFunction %s requested access \""},{"line_number":173,"context_line":"                                  \"to another OpenFlowFunction which is owned\""},{"line_number":174,"context_line":"                                  \" by another extension\"), func.name)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"            if len(new_needed_functions) !\u003d len(func.needs_functions):"},{"line_number":177,"context_line":"                LOG.error(_LE(\"OpenFlowFunction %s could not find all needed\""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_7a94f58b","line":174,"range":{"start_line":171,"start_character":0,"end_line":174,"end_character":70},"updated":"2017-06-09 12:58:00.000000000","message":"I\u0027m wondering why we should prevent this: aren\u0027t there legitimate cases where a function may want to use, e.g. another function table as next table, or read another function register ?\n\nEven assuming we should prevent that, since function A wrongly accessing another function B is something that perhaps can be done by instantiated function B directly, so I wonder if this safeguard is the kind of thing we need ? Perhaps a lightweight approach would be document, trust that people don\u0027t do bad things and review code, rather than try to enforce this by code ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                        funct.extension \u003d\u003d func.extension):"},{"line_number":169,"context_line":"                        new_needed_functions.append(funct)"},{"line_number":170,"context_line":"                        continue"},{"line_number":171,"context_line":"                    elif funct.name \u003d\u003d needed_funct:"},{"line_number":172,"context_line":"                        LOG.error(_LE(\"OpenFlowFunction %s requested access \""},{"line_number":173,"context_line":"                                  \"to another OpenFlowFunction which is owned\""},{"line_number":174,"context_line":"                                  \" by another extension\"), func.name)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"            if len(new_needed_functions) !\u003d len(func.needs_functions):"},{"line_number":177,"context_line":"                LOG.error(_LE(\"OpenFlowFunction %s could not find all needed\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_bc38949f","line":174,"range":{"start_line":171,"start_character":0,"end_line":174,"end_character":70},"in_reply_to":"bf091321_7a94f58b","updated":"2017-11-15 16:37:30.000000000","message":"Can you answer this one ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            func.needs_functions \u003d new_needed_functions"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            for needed_reg in needed_regs:"},{"line_number":183,"context_line":"                for funct in func.needs_functions:"},{"line_number":184,"context_line":"                    for reg in funct.declares_registers:"},{"line_number":185,"context_line":"                        if reg.name \u003d\u003d needed_reg:"},{"line_number":186,"context_line":"                            new_needed_registers.append(reg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_7a3d15ba","line":183,"range":{"start_line":182,"start_character":2,"end_line":183,"end_character":50},"updated":"2017-06-09 12:58:00.000000000","message":"use collections.product ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            func.needs_functions \u003d new_needed_functions"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            for needed_reg in needed_regs:"},{"line_number":183,"context_line":"                for funct in func.needs_functions:"},{"line_number":184,"context_line":"                    for reg in funct.declares_registers:"},{"line_number":185,"context_line":"                        if reg.name \u003d\u003d needed_reg:"},{"line_number":186,"context_line":"                            new_needed_registers.append(reg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_dc4ec036","line":183,"range":{"start_line":182,"start_character":2,"end_line":183,"end_character":50},"in_reply_to":"bf091321_7a3d15ba","updated":"2017-11-15 16:37:30.000000000","message":"?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def _resolve_pipeline(self):"},{"line_number":195,"context_line":"        pipeline \u003d self._extract_table_nums(self._pre_egress)"},{"line_number":196,"context_line":"        pipeline.append(constants.BASE_EGRESS_TABLE)"},{"line_number":197,"context_line":"        pipeline \u003d pipeline + self._extract_table_nums(self._egress)"},{"line_number":198,"context_line":"        pipeline \u003d pipeline + self._extract_table_nums(self._post_egress)"},{"line_number":199,"context_line":"        pipeline.append(constants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":200,"context_line":"        pipeline \u003d pipeline + self._extract_table_nums(self._pre_ingress)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_aa0d9438","line":197,"range":{"start_line":197,"start_character":8,"end_line":197,"end_character":68},"updated":"2017-06-09 12:58:00.000000000","message":"pipeline.extend(self._extract_table_nums(self._egress)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":209,"context_line":"            else:"},{"line_number":210,"context_line":"                if (table in self._white_list or"},{"line_number":211,"context_line":"                    self._get_table_by_table_num(table).default_action \u003d\u003d"},{"line_number":212,"context_line":"                    \"NEXT\"):"},{"line_number":213,"context_line":"                    self._redirect_pipeline(table,"},{"line_number":214,"context_line":"                                        pipeline[pipeline.index(table) + 1])"},{"line_number":215,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_d70d1a91","line":212,"range":{"start_line":212,"start_character":20,"end_line":212,"end_character":26},"updated":"2017-06-09 12:58:00.000000000","message":"I think we need a constant for \"NEXT\", and a constant for \"DROP\" and handle the case where default_action is none of these.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                break"},{"line_number":209,"context_line":"            else:"},{"line_number":210,"context_line":"                if (table in self._white_list or"},{"line_number":211,"context_line":"                    self._get_table_by_table_num(table).default_action \u003d\u003d"},{"line_number":212,"context_line":"                    \"NEXT\"):"},{"line_number":213,"context_line":"                    self._redirect_pipeline(table,"},{"line_number":214,"context_line":"                                        pipeline[pipeline.index(table) + 1])"},{"line_number":215,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_ab0c0b41","line":212,"range":{"start_line":211,"start_character":27,"end_line":212,"end_character":27},"updated":"2017-04-10 11:54:22.000000000","message":"You need to indent these lines","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                table_index \u003d self._pipeline.index(table.table_num)"},{"line_number":242,"context_line":"                table.next_table \u003d self._pipeline[table_index + 1]"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _redirect_pipeline(self, feature_table, next_table):"},{"line_number":245,"context_line":"        self.add_flow(table\u003dfeature_table, priority\u003d1,"},{"line_number":246,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_4fabaa1c","line":244,"range":{"start_line":244,"start_character":8,"end_line":244,"end_character":26},"updated":"2017-06-09 12:58:00.000000000","message":"_add_resubmit ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                table_index \u003d self._pipeline.index(table.table_num)"},{"line_number":242,"context_line":"                table.next_table \u003d self._pipeline[table_index + 1]"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _redirect_pipeline(self, feature_table, next_table):"},{"line_number":245,"context_line":"        self.add_flow(table\u003dfeature_table, priority\u003d1,"},{"line_number":246,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":247,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_2fa8761d","line":244,"range":{"start_line":244,"start_character":33,"end_line":244,"end_character":46},"updated":"2017-06-09 12:58:00.000000000","message":"from_table ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":252,"context_line":"        port_name \u003d port[\"vif_port\"].port_name"},{"line_number":253,"context_line":"        of_port \u003d port[\"vif_port\"].ofport"},{"line_number":254,"context_line":"        ip_addr \u003d []"},{"line_number":255,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":256,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        if (n_const.VETH_DEVICE_PREFIX in port_name or"},{"line_number":259,"context_line":"            n_const.VHOST_USER_DEVICE_PREFIX in port_name):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_f7f49e5d","line":256,"range":{"start_line":254,"start_character":8,"end_line":256,"end_character":45},"updated":"2017-06-09 12:58:00.000000000","message":"you could use a list comprehension here","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":267,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            for ip in ip_addr:"},{"line_number":270,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":271,"context_line":"                    self.add_flow(ipv6_dst\u003dip,"},{"line_number":272,"context_line":"                          dl_type\u003d\"0x86dd\","}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_916854b9","line":269,"range":{"start_line":269,"start_character":12,"end_line":269,"end_character":30},"updated":"2017-04-10 11:54:22.000000000","message":"You should use common.utils.get_ip_version","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":267,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            for ip in ip_addr:"},{"line_number":270,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":271,"context_line":"                    self.add_flow(ipv6_dst\u003dip,"},{"line_number":272,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":273,"context_line":"                          priority\u003d10,"},{"line_number":274,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":275,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":276,"context_line":"                else:"},{"line_number":277,"context_line":"                    self.add_flow(ip_dst\u003dip,"},{"line_number":278,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":279,"context_line":"                          priority\u003d10,"},{"line_number":280,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":281,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def delete_port(self, port):"},{"line_number":284,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_1795d2e4","line":281,"range":{"start_line":269,"start_character":30,"end_line":281,"end_character":63},"updated":"2017-06-09 12:58:00.000000000","message":"two questions:\n- why is it necessary to look at the ip addresses of the port here ?  (it seems a priori out of place to look at an IP without the match being scoped to the particular local vlan for the network of the port)\n- I\u0027m wondering if something would be necessary to handle the hypothetical case where a fixed IP of a port is removed ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":267,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            for ip in ip_addr:"},{"line_number":270,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":271,"context_line":"                    self.add_flow(ipv6_dst\u003dip,"},{"line_number":272,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":273,"context_line":"                          priority\u003d10,"},{"line_number":274,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":275,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":276,"context_line":"                else:"},{"line_number":277,"context_line":"                    self.add_flow(ip_dst\u003dip,"},{"line_number":278,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":279,"context_line":"                          priority\u003d10,"},{"line_number":280,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":281,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def delete_port(self, port):"},{"line_number":284,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f231b9d_5603740e","line":281,"range":{"start_line":269,"start_character":30,"end_line":281,"end_character":63},"in_reply_to":"bf091321_1795d2e4","updated":"2017-10-03 16:39:11.000000000","message":"I need some way to catch traffic and see if it\u0027s going to a IP on the host.\nIf it isn\u0027t going to an IP on the host it hits a catch all resubmit to the output table.\nThis is just to determine if traffic is coming into the switch (or staying within).","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if \"qvo\" in port_name or \"vhu\" in port_name:"},{"line_number":295,"context_line":"            self.del_flow(in_port\u003dof_port,"},{"line_number":296,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"            for ip in ip_addr:"},{"line_number":299,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":300,"context_line":"                    self.del_flow(ipv6_dst\u003dip,"},{"line_number":301,"context_line":"                          dl_type\u003d\"0x86dd\","}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_d15c9cee","line":298,"range":{"start_line":297,"start_character":0,"end_line":298,"end_character":30},"updated":"2017-04-10 11:54:22.000000000","message":"ditto","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def update(self):"},{"line_number":309,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"},{"line_number":310,"context_line":"                       set(self._registered_functions))]"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        self._sort_functions(unreg_funct)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_f7c25ee9","line":309,"range":{"start_line":309,"start_character":8,"end_line":309,"end_character":19},"updated":"2017-06-09 12:58:00.000000000","message":"(plural would help see that this is not a function)\n\nBut (see other comments) I\u0027m thinking that perhaps moving all the calls below to __init__ would be simpler.  Perhaps I\u0027ve overlooked something and this is not possible.  That would also avoid tracking the registered vs. unregistered functions (all function would be registered during __init__).","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    @staticmethod"},{"line_number":329,"context_line":"    def _request_register(reg_size, flow_register):"},{"line_number":330,"context_line":"        for reg in range(8):"},{"line_number":331,"context_line":"            print(\"David, reg: %s\" % reg)"},{"line_number":332,"context_line":"            print(\"David, reg_size: %s\" % reg_size)"},{"line_number":333,"context_line":"            print(\"David, flow_register: %s\" % flow_register)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_4fc96a76","line":330,"range":{"start_line":330,"start_character":19,"end_line":330,"end_character":27},"updated":"2017-06-09 12:58:00.000000000","message":"use the OPENFLOW_REGISTERS constant ?\nor perhaps avoid some used for other things, and use OPENFLOW_GLOBAL_REG instead ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":328,"context_line":"    @staticmethod"},{"line_number":329,"context_line":"    def _request_register(reg_size, flow_register):"},{"line_number":330,"context_line":"        for reg in range(8):"},{"line_number":331,"context_line":"            print(\"David, reg: %s\" % reg)"},{"line_number":332,"context_line":"            print(\"David, reg_size: %s\" % reg_size)"},{"line_number":333,"context_line":"            print(\"David, flow_register: %s\" % flow_register)"},{"line_number":334,"context_line":"            if OpenFlowManager._registers[reg] \u003e\u003d reg_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_b1235856","line":331,"range":{"start_line":331,"start_character":19,"end_line":331,"end_character":24},"updated":"2017-04-10 11:54:22.000000000","message":"Who is David? ;p","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":328,"context_line":"    @staticmethod"},{"line_number":329,"context_line":"    def _request_register(reg_size, flow_register):"},{"line_number":330,"context_line":"        for reg in range(8):"},{"line_number":331,"context_line":"            print(\"David, reg: %s\" % reg)"},{"line_number":332,"context_line":"            print(\"David, reg_size: %s\" % reg_size)"},{"line_number":333,"context_line":"            print(\"David, flow_register: %s\" % flow_register)"},{"line_number":334,"context_line":"            if OpenFlowManager._registers[reg] \u003e\u003d reg_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_3ca39fb4","line":331,"range":{"start_line":331,"start_character":19,"end_line":331,"end_character":24},"in_reply_to":"bff0334d_b1235856","updated":"2017-10-03 16:39:11.000000000","message":"Opps!","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    extension \u003d \"\""},{"line_number":345,"context_line":"    name \u003d \"\""},{"line_number":346,"context_line":"    bridge \u003d None"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    declares_registers \u003d []"},{"line_number":349,"context_line":"    declares_tables \u003d []"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_fa3b6599","line":346,"range":{"start_line":346,"start_character":0,"end_line":346,"end_character":17},"updated":"2017-06-09 12:58:00.000000000","message":"(unless I missed something:) Whatever the function declares here, the register_openflow_function will add the function to the OpenFlowManager _class_, which would not distinguish among different OpenFlowManager instances created for different bridges.\n\nI think there are two possible way to resolve this:\n- approach a), have the OpenFlowManager (rather than the l2 agent extension) instantiate the OpenFlowFunction with the same bridge as the one passed to  OpenFlowManager __init__, and have the OpenFlowManager expose a get_function method to let l2 agent extension retrieve an OpenFlowFunction instance\n- approach b), not too far from the current code, would consist in removing the \"bridge\" attribute above, and have a check when the OpenFlowFunction is instantiated that the name of the bridge passed at __init__ matches the name of the bridge for which the OpenFlowManager was instantiated\n\nAdditionally, to support multiple bridges with different pipelines and functions, the current implementation seems limiting because the OpenFlowManager keeps track of functions/tables/registers in class attributes and not in per-instance attributes, ditto for the OpenFlowFunction registration. \n\nI would leaning in favor of doing (b) and delaying further thinking about supporting the openflowmanager for multiple bridges for the Future.\n\n(the alternative would be to rework the code to have per-OpenFlowManager-instance function registration hook, and per-OpenFlowManager-instance pipeline computation, but I feel this would be overengineering because the key target really seems to be only br-int)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":350,"context_line":"    needs_registers \u003d []"},{"line_number":351,"context_line":"    needs_functions \u003d []"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __init__(self):"},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @classmethod"},{"line_number":357,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_65687286","line":354,"range":{"start_line":353,"start_character":4,"end_line":354,"end_character":12},"updated":"2017-04-10 11:54:22.000000000","message":"Do you need this function?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":350,"context_line":"    needs_registers \u003d []"},{"line_number":351,"context_line":"    needs_functions \u003d []"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def __init__(self):"},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @classmethod"},{"line_number":357,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f0e0f27_a313a5b8","line":354,"range":{"start_line":353,"start_character":4,"end_line":354,"end_character":12},"in_reply_to":"bff0334d_65687286","updated":"2017-06-09 12:58:00.000000000","message":"(see my comment on QoS PoC code, and my comment on line 346)\n\nI think we need to:\n- have a _bridge_name field on this class that would be set\n  by the OpenFlowManager\n- have this __init__ accept an OVSBridge instance parameter\n- have this __init__ check that the .br_name of the provided OVSBridge instance matches ._bridge_name","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @classmethod"},{"line_number":357,"context_line":"    def get_tables(cls):"},{"line_number":358,"context_line":"        tables \u003d []"},{"line_number":359,"context_line":"        for table in cls.declares_tables:"},{"line_number":360,"context_line":"            tables.append(table.table_num)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_c8de356c","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":18},"updated":"2017-04-10 11:54:22.000000000","message":"Sorry if I\u0027m pedantic. I had some problems understanding sometimes the code. This function will return a list of table numbers, not a list OpenFlowTable(). Can you rename it to get_table_numbers?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @classmethod"},{"line_number":357,"context_line":"    def get_tables(cls):"},{"line_number":358,"context_line":"        tables \u003d []"},{"line_number":359,"context_line":"        for table in cls.declares_tables:"},{"line_number":360,"context_line":"            tables.append(table.table_num)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        return tables"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @classmethod"},{"line_number":365,"context_line":"    def get_table_name_by_num(cls, table_num):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_8bc38738","line":362,"range":{"start_line":358,"start_character":7,"end_line":362,"end_character":21},"updated":"2017-04-10 11:54:22.000000000","message":"Maybe you can rewrite this in one line:\n  return [table.table_num for table in cls.declares_tables]\n\nAnd is faster","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    @classmethod"},{"line_number":357,"context_line":"    def get_tables(cls):"},{"line_number":358,"context_line":"        tables \u003d []"},{"line_number":359,"context_line":"        for table in cls.declares_tables:"},{"line_number":360,"context_line":"            tables.append(table.table_num)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        return tables"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @classmethod"},{"line_number":365,"context_line":"    def get_table_name_by_num(cls, table_num):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_a5cb97a3","line":362,"range":{"start_line":358,"start_character":7,"end_line":362,"end_character":21},"in_reply_to":"bff0334d_8bc38738","updated":"2017-06-09 12:58:00.000000000","message":"+1","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            if table.table_name \u003d\u003d table_name:"},{"line_number":375,"context_line":"                return table.table_num"},{"line_number":376,"context_line":"        raise exceptions.OpenFlowFunctionInvalidTable()"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    @classmethod"},{"line_number":379,"context_line":"    def get_reg_by_name(cls, reg_name):"},{"line_number":380,"context_line":"        for register in cls.declares_registers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_11bcc903","line":377,"updated":"2017-06-09 12:58:00.000000000","message":"add a .get_table(cls, table_name) ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        raise exceptions.OpenFlowFunctionInvalidTable()"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    @classmethod"},{"line_number":379,"context_line":"    def get_reg_by_name(cls, reg_name):"},{"line_number":380,"context_line":"        for register in cls.declares_registers:"},{"line_number":381,"context_line":"            if register.name \u003d\u003d reg_name:"},{"line_number":382,"context_line":"                return register"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_85f773f6","line":379,"range":{"start_line":379,"start_character":8,"end_line":379,"end_character":23},"updated":"2017-06-09 12:58:00.000000000","message":"I would suggest get_register() as a simpler name, unless there are obvious and frequent ways to access the register via something else than its name.","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":386,"context_line":"class OpenFlowTable(object):"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def __init__(self, name, default_action\u003d\"NEXT\"):"},{"line_number":389,"context_line":"        self._table_name \u003d name"},{"line_number":390,"context_line":"        self._default_action \u003d default_action"},{"line_number":391,"context_line":"        self._table_num \u003d None"},{"line_number":392,"context_line":"        self.next_table \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_9113390e","line":389,"range":{"start_line":389,"start_character":13,"end_line":389,"end_character":24},"updated":"2017-06-09 12:58:00.000000000","message":"nit: \u0027_table_name\u0027 is a bit redundant, \u0027_name\u0027 would be better","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":388,"context_line":"    def __init__(self, name, default_action\u003d\"NEXT\"):"},{"line_number":389,"context_line":"        self._table_name \u003d name"},{"line_number":390,"context_line":"        self._default_action \u003d default_action"},{"line_number":391,"context_line":"        self._table_num \u003d None"},{"line_number":392,"context_line":"        self.next_table \u003d None"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"    def init_table(self, table_num):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_71f8a5c3","line":391,"range":{"start_line":391,"start_character":13,"end_line":391,"end_character":23},"updated":"2017-06-09 12:58:00.000000000","message":"ditto: self.num ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        self._table_num \u003d table_num"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    @property"},{"line_number":398,"context_line":"    def table_num(self):"},{"line_number":399,"context_line":"        return self._table_num"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"    @property"},{"line_number":402,"context_line":"    def table_name(self):"},{"line_number":403,"context_line":"        return self._table_name"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    @property"},{"line_number":406,"context_line":"    def default_action(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_f12dd546","line":403,"range":{"start_line":398,"start_character":0,"end_line":403,"end_character":31},"updated":"2017-06-09 12:58:00.000000000","message":"ditto, table.num() and table.name() would lead to shorter/nicer code elsewhere","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b1acb1f96ed18d54edee7ca45dd9a5b7a924acbd","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"class OpenFlowRegister(object):"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def __init__(self, name, reg_size\u003d8):"},{"line_number":413,"context_line":"        self.name \u003d name"},{"line_number":414,"context_line":"        self.reg \u003d None"},{"line_number":415,"context_line":"        self.reg_offset \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"bff0334d_5199ac76","line":412,"range":{"start_line":412,"start_character":29,"end_line":412,"end_character":39},"updated":"2017-04-10 11:54:22.000000000","message":"Why are you setting the default reg size to 8? OVS registers size is 32 bits. Why this default limitation?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        self.reg_offset \u003d register_offset"},{"line_number":422,"context_line":"        self.reg \u003d register"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    def get_reg_check(self, value, hex_mask\u003d0):"},{"line_number":425,"context_line":"        #NOTE(davidsha)"},{"line_number":426,"context_line":"        # The hex mask should be in integer form"},{"line_number":427,"context_line":"        # so it can be shifted then converted to hex."}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_2f32b6f2","line":424,"range":{"start_line":424,"start_character":8,"end_line":424,"end_character":21},"updated":"2017-06-09 12:58:00.000000000","message":"perhaps rename this method get_match ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            hex(self.reg_size \u003c\u003c self.reg_offset)"},{"line_number":431,"context_line":"        return reg_string + hex_offset"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def get_reg_load(self, value, start\u003dNone, end\u003dNone):"},{"line_number":434,"context_line":"        start_offset \u003d start + self.reg_offset if start and start \u003c \\"},{"line_number":435,"context_line":"            self.reg_size and start \u003e\u003d 0 else self.reg_offset"},{"line_number":436,"context_line":"        end_offset \u003d end + self.reg_offset if end and end \u003c\u003d self.reg_size \\"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_cf0e9ae4","line":433,"range":{"start_line":433,"start_character":34,"end_line":433,"end_character":55},"updated":"2017-06-09 12:58:00.000000000","message":"I\u0027m wondering if we need to offer the possibility into loading in the middle of an OpenFlowRegister: it seems to me that the need for storing multiple small things in OVS registers is nicely met by creating multiple OpenFlowRegisters, isn\u0027t it ?\n\nUnless there is today a well identified need, I would suggest perhaps consider this only as a future addition ? (YAGNI, etc.)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            hex(self.reg_size \u003c\u003c self.reg_offset)"},{"line_number":431,"context_line":"        return reg_string + hex_offset"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def get_reg_load(self, value, start\u003dNone, end\u003dNone):"},{"line_number":434,"context_line":"        start_offset \u003d start + self.reg_offset if start and start \u003c \\"},{"line_number":435,"context_line":"            self.reg_size and start \u003e\u003d 0 else self.reg_offset"},{"line_number":436,"context_line":"        end_offset \u003d end + self.reg_offset if end and end \u003c\u003d self.reg_size \\"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_4f4a8a55","line":433,"range":{"start_line":433,"start_character":8,"end_line":433,"end_character":20},"updated":"2017-06-09 12:58:00.000000000","message":"get_load_action ?","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    _available_tables \u003d []"},{"line_number":46,"context_line":"    _registers \u003d []"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":49,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":50,"context_line":"            len(table_whitelist) !\u003d len(set(table_whitelist)) or"},{"line_number":51,"context_line":"            set(table_whitelist) \u0026 set(constants.OVS_PIPELINE) !\u003d set([])):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_abcdec31","line":48,"range":{"start_line":48,"start_character":21,"end_line":48,"end_character":73},"updated":"2017-08-29 15:32:28.000000000","message":"I would suggest to remove these parameters and:\n- loop over all the bridges appearing as OpenFlowManager.function[x].bridge to create an OpenFlowBridge\n- introduce a dict mapping a bridge name to the (whitelist, egress_prio, ingress_prio) tuple for the bridge ; this bridge would be initialized with values from constants.X and a register function could be introduced if extensions want to build pipelines on other bridges","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    _available_tables \u003d []"},{"line_number":46,"context_line":"    _registers \u003d []"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":49,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":50,"context_line":"            len(table_whitelist) !\u003d len(set(table_whitelist)) or"},{"line_number":51,"context_line":"            set(table_whitelist) \u0026 set(constants.OVS_PIPELINE) !\u003d set([])):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_86454a46","line":48,"range":{"start_line":48,"start_character":21,"end_line":48,"end_character":73},"in_reply_to":"7f287b81_abcdec31","updated":"2017-10-03 16:39:11.000000000","message":"I haven\u0027t done the dictionary part, but I\u0027ve added the registration part for Bridge objects similar to the Function objects, they hold the priority pipelines and whitelists like the functions hold tables and registers.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.egress_prio \u003d egress_prio"},{"line_number":58,"context_line":"        self._registered_functions \u003d []"},{"line_number":59,"context_line":"        self._white_list \u003d table_whitelist + constants.OVS_PIPELINE"},{"line_number":60,"context_line":"        self._bridges \u003d {}"},{"line_number":61,"context_line":"        self._bridges[self.bridge.br_name] \u003d OpenFlowBridge(bridge,"},{"line_number":62,"context_line":"                                                            self._white_list,"},{"line_number":63,"context_line":"                                                            self.egress_prio,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_7f9f70b4","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":26},"updated":"2017-08-22 16:04:15.000000000","message":"it looks as if this should not be a per-instance dict, but a class level dict, but as said on IRC I think the code would be more readable if the datastructures storing functions/bridges/priorities would be at the module scope, rather than at the class scope","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.egress_prio \u003d egress_prio"},{"line_number":58,"context_line":"        self._registered_functions \u003d []"},{"line_number":59,"context_line":"        self._white_list \u003d table_whitelist + constants.OVS_PIPELINE"},{"line_number":60,"context_line":"        self._bridges \u003d {}"},{"line_number":61,"context_line":"        self._bridges[self.bridge.br_name] \u003d OpenFlowBridge(bridge,"},{"line_number":62,"context_line":"                                                            self._white_list,"},{"line_number":63,"context_line":"                                                            self.egress_prio,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_e66974be","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":26},"in_reply_to":"7f287b81_7f9f70b4","updated":"2017-08-23 16:36:44.000000000","message":"Understood. The _bridges are a module scoped variable.\nHowever The _bridges may need to be instantiated similar to the OpenFlowFunctions if we\u0027re going to allow bridges to be generated and pipelines created on them.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.egress_prio \u003d egress_prio"},{"line_number":58,"context_line":"        self._registered_functions \u003d []"},{"line_number":59,"context_line":"        self._white_list \u003d table_whitelist + constants.OVS_PIPELINE"},{"line_number":60,"context_line":"        self._bridges \u003d {}"},{"line_number":61,"context_line":"        self._bridges[self.bridge.br_name] \u003d OpenFlowBridge(bridge,"},{"line_number":62,"context_line":"                                                            self._white_list,"},{"line_number":63,"context_line":"                                                            self.egress_prio,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_4bfb2878","line":60,"range":{"start_line":60,"start_character":8,"end_line":60,"end_character":26},"in_reply_to":"7f287b81_e66974be","updated":"2017-08-29 15:32:28.000000000","message":"We agree that _bridges needs to be module scoped, or class scoped.\n\nI suggest we discuss the other question independently (see my other comments).","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                                                            self.egress_prio,"},{"line_number":64,"context_line":"                                                            self.ingress_prio)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def update_port(self, port):"},{"line_number":67,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":68,"context_line":"        for bridge in self._bridges.values():"},{"line_number":69,"context_line":"            bridge.update_port(port)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def delete_port(self, port):"},{"line_number":72,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":73,"context_line":"        if port_object:"},{"line_number":74,"context_line":"            for bridge in self._bridges.values():"},{"line_number":75,"context_line":"                bridge.delete_port(port_object)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def update_flow_pipelines(self):"},{"line_number":78,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_6230b69f","line":75,"range":{"start_line":66,"start_character":0,"end_line":75,"end_character":47},"updated":"2017-08-22 16:04:15.000000000","message":"I don\u0027t get why one would need to update/delete a port on everybridge: a port is only present on one bridge, and one generally knows  which one when operating on a port.\n\nWhat am I missing?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                                                            self.egress_prio,"},{"line_number":64,"context_line":"                                                            self.ingress_prio)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def update_port(self, port):"},{"line_number":67,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":68,"context_line":"        for bridge in self._bridges.values():"},{"line_number":69,"context_line":"            bridge.update_port(port)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def delete_port(self, port):"},{"line_number":72,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":73,"context_line":"        if port_object:"},{"line_number":74,"context_line":"            for bridge in self._bridges.values():"},{"line_number":75,"context_line":"                bridge.delete_port(port_object)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def update_flow_pipelines(self):"},{"line_number":78,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_6bcee4b4","line":75,"range":{"start_line":66,"start_character":0,"end_line":75,"end_character":47},"in_reply_to":"7f287b81_b85efde3","updated":"2017-08-29 15:32:28.000000000","message":"See my comment in ovs_neutron_agent.py, I think that the bridge on which these ports are plugged would always be br-int, and that hence we shouldn\u0027t need to have these methods in the manager.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                                                            self.egress_prio,"},{"line_number":64,"context_line":"                                                            self.ingress_prio)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def update_port(self, port):"},{"line_number":67,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":68,"context_line":"        for bridge in self._bridges.values():"},{"line_number":69,"context_line":"            bridge.update_port(port)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def delete_port(self, port):"},{"line_number":72,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":73,"context_line":"        if port_object:"},{"line_number":74,"context_line":"            for bridge in self._bridges.values():"},{"line_number":75,"context_line":"                bridge.delete_port(port_object)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def update_flow_pipelines(self):"},{"line_number":78,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_b85efde3","line":75,"range":{"start_line":66,"start_character":0,"end_line":75,"end_character":47},"in_reply_to":"9f436f4f_6230b69f","updated":"2017-08-23 16:36:44.000000000","message":"These are for Neutron ports, This is to allow the pipeline to route traffic into the Ingress and Egress pipelines.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            for bridge in self._bridges.values():"},{"line_number":75,"context_line":"                bridge.delete_port(port_object)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def update_flow_pipelines(self):"},{"line_number":78,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"},{"line_number":79,"context_line":"                       set(self._registered_functions))]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        for funct in unreg_funct:"},{"line_number":82,"context_line":"            self._registered_functions.append(funct)"},{"line_number":83,"context_line":"            if funct.bridge in self._bridges.keys():"},{"line_number":84,"context_line":"                self._bridges[funct.bridge].add_function(funct)"},{"line_number":85,"context_line":"            else:"},{"line_number":86,"context_line":"                br_name \u003d funct.bridge"},{"line_number":87,"context_line":"                br \u003d self.bridge.clone()"},{"line_number":88,"context_line":"                br.br_name \u003d br_name"},{"line_number":89,"context_line":"                if not br.bridge_exists(br_name):"},{"line_number":90,"context_line":"                    br.create()"},{"line_number":91,"context_line":"                self._bridges[br_name] \u003d OpenFlowBridge(br, self._white_list,"},{"line_number":92,"context_line":"                                                        self.egress_prio,"},{"line_number":93,"context_line":"                                                        self.ingress_prio)"},{"line_number":94,"context_line":"                self._bridges[funct.bridge].add_function(funct)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_81a20ffb","line":97,"range":{"start_line":77,"start_character":0,"end_line":97,"end_character":41},"updated":"2017-08-29 15:32:28.000000000","message":"As discussed through other comments, I think all this can move to __init__ (and be simplified: you won\u0027t need to clone and modify some self.bridge anymore).","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            for bridge in self._bridges.values():"},{"line_number":75,"context_line":"                bridge.delete_port(port_object)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def update_flow_pipelines(self):"},{"line_number":78,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"},{"line_number":79,"context_line":"                       set(self._registered_functions))]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        for funct in unreg_funct:"},{"line_number":82,"context_line":"            self._registered_functions.append(funct)"},{"line_number":83,"context_line":"            if funct.bridge in self._bridges.keys():"},{"line_number":84,"context_line":"                self._bridges[funct.bridge].add_function(funct)"},{"line_number":85,"context_line":"            else:"},{"line_number":86,"context_line":"                br_name \u003d funct.bridge"},{"line_number":87,"context_line":"                br \u003d self.bridge.clone()"},{"line_number":88,"context_line":"                br.br_name \u003d br_name"},{"line_number":89,"context_line":"                if not br.bridge_exists(br_name):"},{"line_number":90,"context_line":"                    br.create()"},{"line_number":91,"context_line":"                self._bridges[br_name] \u003d OpenFlowBridge(br, self._white_list,"},{"line_number":92,"context_line":"                                                        self.egress_prio,"},{"line_number":93,"context_line":"                                                        self.ingress_prio)"},{"line_number":94,"context_line":"                self._bridges[funct.bridge].add_function(funct)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_f548222f","line":97,"range":{"start_line":77,"start_character":0,"end_line":97,"end_character":41},"in_reply_to":"7f287b81_81a20ffb","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"},{"line_number":101,"context_line":"        w_list \u003d white_list or self._white_list"},{"line_number":102,"context_line":"        egress \u003d egress_prio or self._egress_prio"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_9fe8dc16","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":18},"updated":"2017-08-22 16:04:15.000000000","message":"as discussed on IRC, it looks like this method should be @classmethod and self._bridges should be a class variable (or, even better I think, both could be module-scope function and variable)\n\n(but, as discussed, it needs to be clarified first if this function is needed)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"},{"line_number":101,"context_line":"        w_list \u003d white_list or self._white_list"},{"line_number":102,"context_line":"        egress \u003d egress_prio or self._egress_prio"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_d5452617","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":18},"in_reply_to":"7f287b81_2bd9fcf1","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"},{"line_number":101,"context_line":"        w_list \u003d white_list or self._white_list"},{"line_number":102,"context_line":"        egress \u003d egress_prio or self._egress_prio"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_2bd9fcf1","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":18},"in_reply_to":"7f287b81_781e550d","updated":"2017-08-29 15:32:28.000000000","message":"(See my suggestions above)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for bridge in self._bridges.values():"},{"line_number":97,"context_line":"            bridge.update_flow_pipeline()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def add_bridge(self, bridge, white_list\u003dNone, egress_prio\u003dNone,"},{"line_number":100,"context_line":"                   ingress_prio\u003dNone):"},{"line_number":101,"context_line":"        w_list \u003d white_list or self._white_list"},{"line_number":102,"context_line":"        egress \u003d egress_prio or self._egress_prio"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_781e550d","line":99,"range":{"start_line":99,"start_character":8,"end_line":99,"end_character":18},"in_reply_to":"7f287b81_9fe8dc16","updated":"2017-08-23 16:36:44.000000000","message":"I think this function is needed if we\u0027re looking to add pipelines to bridges other than just br-int.\nOr at least something along this idea. I\u0027m considering converting the OpenFlowBridge into a base class similar to the OpenFlowFunctions.\nWith a statically specified priority list and white list of unusable tables inside each class.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            raise exceptions.OpenFlowManagerInvalidBridge(bridge\u003dbr_name)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class OpenFlowBridge(object):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    _assigned_tables \u003d {}"},{"line_number":116,"context_line":"    _available_tables \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f436f4f_e2bf06fa","line":113,"range":{"start_line":113,"start_character":6,"end_line":113,"end_character":20},"updated":"2017-08-22 16:04:15.000000000","message":"The name is unfortunate/incomplete, the code would read better with a name that includes the idea that this is a bridge managed by the OpenFlowManager.  But perhaps there would also be a better name than OpenFlowManager in the first place, avoiding the idea that the thing is a thing generic to OpenFlow.\n\nWhat about:\n- OVSPipelineManager\n- OVSPipelineBridge\n-...\n\n?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            raise exceptions.OpenFlowManagerInvalidBridge(bridge\u003dbr_name)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class OpenFlowBridge(object):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    _assigned_tables \u003d {}"},{"line_number":116,"context_line":"    _available_tables \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_86b51034","line":113,"range":{"start_line":113,"start_character":6,"end_line":113,"end_character":20},"in_reply_to":"9f436f4f_e2bf06fa","updated":"2017-08-23 16:36:44.000000000","message":"I\u0027ll look into it, The OpenFlowX naming scheme was specifically set out in the spec so I\u0027m hesitant to deviate from it. That said this particular feature (Dynamically making pipelines on bridge other than br-int) was never set out in the spec so this name isn\u0027t set in stone.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class OpenFlowBridge(object):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    _assigned_tables \u003d {}"},{"line_number":116,"context_line":"    _available_tables \u003d []"},{"line_number":117,"context_line":"    _registers \u003d []"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_2187dbb7","line":116,"range":{"start_line":115,"start_character":0,"end_line":116,"end_character":26},"updated":"2017-08-29 15:32:28.000000000","message":"These should be instance scope, not class scope.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    _assigned_tables \u003d {}"},{"line_number":116,"context_line":"    _available_tables \u003d []"},{"line_number":117,"context_line":"    _registers \u003d []"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def __init__(self, bridge, table_whitelist, egress_prio, ingress_prio):"},{"line_number":120,"context_line":"        self.br \u003d bridge.clone()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_01a97f22","line":117,"range":{"start_line":117,"start_character":4,"end_line":117,"end_character":14},"updated":"2017-08-29 15:32:28.000000000","message":"Should also be instance scope, not class scope.\n\nAnd additionally, since it keeps track of the number of free bits in each register, a name such as register_free_bits would make the code a tiny bit more readable.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":176,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            for ip in ip_addr:"},{"line_number":179,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":180,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":181,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":182,"context_line":"                          priority\u003d10,"},{"line_number":183,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":184,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":185,"context_line":"                else:"},{"line_number":186,"context_line":"                    self.br.add_flow(ip_dst\u003dip,"},{"line_number":187,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":188,"context_line":"                          priority\u003d10,"},{"line_number":189,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":190,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def delete_port(self, port):"},{"line_number":193,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_26b0118a","line":190,"range":{"start_line":178,"start_character":0,"end_line":190,"end_character":63},"updated":"2017-08-29 15:32:28.000000000","message":"Can you explain why this is needed ?\n\n(additionally to the lack of explanation, it seems incorrect that a match on an IP address is done without matching also on a specific local vlan or network-specific register)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":176,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            for ip in ip_addr:"},{"line_number":179,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":180,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":181,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":182,"context_line":"                          priority\u003d10,"},{"line_number":183,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":184,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":185,"context_line":"                else:"},{"line_number":186,"context_line":"                    self.br.add_flow(ip_dst\u003dip,"},{"line_number":187,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":188,"context_line":"                          priority\u003d10,"},{"line_number":189,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":190,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def delete_port(self, port):"},{"line_number":193,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_e6acfeef","line":190,"range":{"start_line":178,"start_character":0,"end_line":190,"end_character":63},"in_reply_to":"7f287b81_26b0118a","updated":"2017-10-03 16:39:11.000000000","message":"This is for separating the the traffic between the 2 pipelines on the Input tagging table and Deflector table.\nIt shouldn\u0027t need to match on other criteria, because it\u0027s only checking if the destination IP address is a local address to send it into the ingress pipeline or send it to the output table.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":201,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        if \"qvo\" in port_name or \"vhu\" in port_name:"},{"line_number":204,"context_line":"            self.br.del_flow(in_port\u003dof_port,"},{"line_number":205,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            for ip in ip_addr:"},{"line_number":208,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":209,"context_line":"                    self.br.del_flow(ipv6_dst\u003dip,"},{"line_number":210,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":211,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":212,"context_line":"                else:"},{"line_number":213,"context_line":"                    self.br.del_flow(ip_dst\u003dip,"},{"line_number":214,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":215,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def add_function(self, function):"},{"line_number":218,"context_line":"        self._unreg_funct.append(function)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_017e1fae","line":215,"range":{"start_line":203,"start_character":0,"end_line":215,"end_character":66},"updated":"2017-08-29 15:32:28.000000000","message":"(same comment as above at L190)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        self._unreg_funct.append(function)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def update_flow_pipeline(self):"},{"line_number":221,"context_line":"        self._sort_functions(self._unreg_funct)"},{"line_number":222,"context_line":"        self._assign_tables(self._unreg_funct)"},{"line_number":223,"context_line":"        self._assign_registers(self._unreg_funct)"},{"line_number":224,"context_line":"        self._resolve_dependencies(self._unreg_funct)"},{"line_number":225,"context_line":"        self._resolve_pipeline()"},{"line_number":226,"context_line":"        self._update_next_tables(self._unreg_funct)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _extract_table_nums(self, functions):"},{"line_number":229,"context_line":"        return reduce(lambda tables, f: tables + f.get_tables(),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_613de3db","line":226,"range":{"start_line":221,"start_character":7,"end_line":226,"end_character":51},"updated":"2017-08-29 15:32:28.000000000","message":"it looks like these methods always receive self._unreg_funct as param, so why not remove the parameter ?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        self._unreg_funct.append(function)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def update_flow_pipeline(self):"},{"line_number":221,"context_line":"        self._sort_functions(self._unreg_funct)"},{"line_number":222,"context_line":"        self._assign_tables(self._unreg_funct)"},{"line_number":223,"context_line":"        self._assign_registers(self._unreg_funct)"},{"line_number":224,"context_line":"        self._resolve_dependencies(self._unreg_funct)"},{"line_number":225,"context_line":"        self._resolve_pipeline()"},{"line_number":226,"context_line":"        self._update_next_tables(self._unreg_funct)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _extract_table_nums(self, functions):"},{"line_number":229,"context_line":"        return reduce(lambda tables, f: tables + f.get_tables(),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_46f3d274","line":226,"range":{"start_line":221,"start_character":7,"end_line":226,"end_character":51},"in_reply_to":"7f287b81_613de3db","updated":"2017-10-03 16:39:11.000000000","message":"done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                      functions, [])"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _get_table_by_table_num(self, table_num):"},{"line_number":233,"context_line":"        for function in self._registered_functions:"},{"line_number":234,"context_line":"            if table_num in function.get_tables():"},{"line_number":235,"context_line":"                for table in function.declares_tables:"},{"line_number":236,"context_line":"                    if table_num \u003d\u003d table.table_num:"},{"line_number":237,"context_line":"                        return table"},{"line_number":238,"context_line":"        if table_num in self._white_list:"},{"line_number":239,"context_line":"            raise exceptions.OpenFlowPipelineTableConflict()"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_615cc3ec","line":237,"range":{"start_line":233,"start_character":1,"end_line":237,"end_character":36},"updated":"2017-08-29 15:32:28.000000000","message":"it seems that this could be implemented by looking up a dict that would map a table_num to a table, dict that would be populated by _assign_tables\n\nI think this would be more efficient than looping over all stuctures.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                      functions, [])"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _get_table_by_table_num(self, table_num):"},{"line_number":233,"context_line":"        for function in self._registered_functions:"},{"line_number":234,"context_line":"            if table_num in function.get_tables():"},{"line_number":235,"context_line":"                for table in function.declares_tables:"},{"line_number":236,"context_line":"                    if table_num \u003d\u003d table.table_num:"},{"line_number":237,"context_line":"                        return table"},{"line_number":238,"context_line":"        if table_num in self._white_list:"},{"line_number":239,"context_line":"            raise exceptions.OpenFlowPipelineTableConflict()"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_e6019e3b","line":237,"range":{"start_line":233,"start_character":1,"end_line":237,"end_character":36},"in_reply_to":"7f287b81_615cc3ec","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            raise exceptions.OpenFlowPipelineTableConflict()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _sort_functions(self, functions):"},{"line_number":242,"context_line":"        def _sort_key(function_1, function_2\u003dNone):"},{"line_number":243,"context_line":"            if not function_2:"},{"line_number":244,"context_line":"                #NOTE(davidsha) function_2\u003dNone means only 1 element"},{"line_number":245,"context_line":"                return 0"},{"line_number":246,"context_line":"            name_1 \u003d function_1.name"},{"line_number":247,"context_line":"            name_2 \u003d function_2.name"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"            len_1 \u003d len(name_1)"},{"line_number":250,"context_line":"            len_2 \u003d len(name_2)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"            alpha_check \u003d 0"},{"line_number":253,"context_line":"            for i in range(len_1 if len_1 \u003c len_2 else len_2):"},{"line_number":254,"context_line":"                alpha_check \u003d name_1[i] - name_2[i]"},{"line_number":255,"context_line":"                if alpha_check:"},{"line_number":256,"context_line":"                    return alpha_check"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"            return len_1 - len_2"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        for funct in sorted(functions, key\u003d_sort_key):"},{"line_number":261,"context_line":"            name \u003d funct.name"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"            if \"EG\" in name[-2:]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_61028371","line":260,"range":{"start_line":242,"start_character":0,"end_line":260,"end_character":54},"updated":"2017-08-29 15:32:28.000000000","message":"This looks a bit convoluted, but it seems that the goal is to sort based on function names.\n\nWhy not simply do:\n\n   sorted(function, key\u003dlambda f: f.name) \n\n?\n\n(it seems you misuses the key parameter: it only takes one parameter ; see \nhttps://wiki.python.org/moin/HowTo/Sorting#line-32 )","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            raise exceptions.OpenFlowPipelineTableConflict()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def _sort_functions(self, functions):"},{"line_number":242,"context_line":"        def _sort_key(function_1, function_2\u003dNone):"},{"line_number":243,"context_line":"            if not function_2:"},{"line_number":244,"context_line":"                #NOTE(davidsha) function_2\u003dNone means only 1 element"},{"line_number":245,"context_line":"                return 0"},{"line_number":246,"context_line":"            name_1 \u003d function_1.name"},{"line_number":247,"context_line":"            name_2 \u003d function_2.name"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"            len_1 \u003d len(name_1)"},{"line_number":250,"context_line":"            len_2 \u003d len(name_2)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"            alpha_check \u003d 0"},{"line_number":253,"context_line":"            for i in range(len_1 if len_1 \u003c len_2 else len_2):"},{"line_number":254,"context_line":"                alpha_check \u003d name_1[i] - name_2[i]"},{"line_number":255,"context_line":"                if alpha_check:"},{"line_number":256,"context_line":"                    return alpha_check"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"            return len_1 - len_2"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        for funct in sorted(functions, key\u003d_sort_key):"},{"line_number":261,"context_line":"            name \u003d funct.name"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"            if \"EG\" in name[-2:]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_c6fea237","line":260,"range":{"start_line":242,"start_character":0,"end_line":260,"end_character":54},"in_reply_to":"7f287b81_61028371","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def _request_table(self, name):"},{"line_number":409,"context_line":"        table_num \u003d self._available_tables.pop() if ("},{"line_number":410,"context_line":"                    len(self._available_tables)) else None"},{"line_number":411,"context_line":"        if table_num is None:"},{"line_number":412,"context_line":"            raise exceptions.OpenFlowPipelineTablesExhausted()"},{"line_number":413,"context_line":"        self._assigned_tables[table_num] \u003d name"},{"line_number":414,"context_line":"        return table_num"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _request_register(self, reg_size, flow_register):"},{"line_number":417,"context_line":"        for reg in range(8):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_41578759","line":414,"range":{"start_line":409,"start_character":8,"end_line":414,"end_character":24},"updated":"2017-08-29 15:32:28.000000000","message":"This, would I think be more readable:\n\n try:\n    table_num \u003d x.pop()\n    self._assigned_tables[table_num] \u003d name\n    return table_num\n except KeyError:\n    raise exceptions.OpenFlowPipelineTablesExhausted()","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                      actions\u003d\u0027resubmit(,%i)\u0027 % next_table)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def _request_table(self, name):"},{"line_number":409,"context_line":"        table_num \u003d self._available_tables.pop() if ("},{"line_number":410,"context_line":"                    len(self._available_tables)) else None"},{"line_number":411,"context_line":"        if table_num is None:"},{"line_number":412,"context_line":"            raise exceptions.OpenFlowPipelineTablesExhausted()"},{"line_number":413,"context_line":"        self._assigned_tables[table_num] \u003d name"},{"line_number":414,"context_line":"        return table_num"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _request_register(self, reg_size, flow_register):"},{"line_number":417,"context_line":"        for reg in range(8):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_a6fba645","line":414,"range":{"start_line":409,"start_character":8,"end_line":414,"end_character":24},"in_reply_to":"7f287b81_41578759","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        return table_num"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _request_register(self, reg_size, flow_register):"},{"line_number":417,"context_line":"        for reg in range(8):"},{"line_number":418,"context_line":"            if self._registers[reg] \u003e\u003d reg_size:"},{"line_number":419,"context_line":"                flow_register.init_register(reg, 32 -"},{"line_number":420,"context_line":"                                            self._registers[reg])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_c1f1376d","line":417,"range":{"start_line":417,"start_character":25,"end_line":417,"end_character":26},"updated":"2017-08-29 15:32:28.000000000","message":"shouldn\u0027t this use OPENFLOW_TOTAL_REG ?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        return table_num"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def _request_register(self, reg_size, flow_register):"},{"line_number":417,"context_line":"        for reg in range(8):"},{"line_number":418,"context_line":"            if self._registers[reg] \u003e\u003d reg_size:"},{"line_number":419,"context_line":"                flow_register.init_register(reg, 32 -"},{"line_number":420,"context_line":"                                            self._registers[reg])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_86f8aa49","line":417,"range":{"start_line":417,"start_character":25,"end_line":417,"end_character":26},"in_reply_to":"7f287b81_c1f1376d","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":522,"context_line":"            self.reg_offset + self.reg_size"},{"line_number":523,"context_line":"        load_value \u003d hex(value)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        action \u003d \"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (load_value, self.reg,"},{"line_number":526,"context_line":"                  start_offset, end_offset)"},{"line_number":527,"context_line":"        return action"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_bc0654cd","line":525,"range":{"start_line":525,"start_character":27,"end_line":525,"end_character":37},"updated":"2017-08-29 15:32:28.000000000","message":"would be xxreg if we choose to use 16-byte registers","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":522,"context_line":"            self.reg_offset + self.reg_size"},{"line_number":523,"context_line":"        load_value \u003d hex(value)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        action \u003d \"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (load_value, self.reg,"},{"line_number":526,"context_line":"                  start_offset, end_offset)"},{"line_number":527,"context_line":"        return action"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_66936e02","line":525,"range":{"start_line":525,"start_character":27,"end_line":525,"end_character":37},"in_reply_to":"7f287b81_bc0654cd","updated":"2017-10-03 16:39:11.000000000","message":"Would we need to increment the minimum version of Open vSwitch that neutron uses to use 16-byte?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def register_openflow_function(of_func):"},{"line_number":25,"context_line":"    OpenFlowManager.functions.append(of_func)"},{"line_number":26,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_func.name)"},{"line_number":27,"context_line":"    return(of_func)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_d2d15efd","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":45},"updated":"2017-11-15 16:37:30.000000000","message":"It would seem natural/helpful to register the function with a per-bridge dict, since each function is not a specific bridge.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def register_openflow_function(of_func):"},{"line_number":25,"context_line":"    OpenFlowManager.functions.append(of_func)"},{"line_number":26,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_func.name)"},{"line_number":27,"context_line":"    return(of_func)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_a38775b5","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":45},"in_reply_to":"1f485f77_d2d15efd","updated":"2017-11-24 17:33:59.000000000","message":"ack, I\u0027ll do this before I put the patch up.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"def register_openflow_function(of_func):"},{"line_number":25,"context_line":"    OpenFlowManager.functions.append(of_func)"},{"line_number":26,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_func.name)"},{"line_number":27,"context_line":"    return(of_func)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def register_openflow_bridge(of_bridge):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_52d44e20","line":27,"range":{"start_line":27,"start_character":4,"end_line":27,"end_character":19},"updated":"2017-11-15 16:37:30.000000000","message":"why the parentheses ?","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"def register_openflow_function(of_func):"},{"line_number":25,"context_line":"    OpenFlowManager.functions.append(of_func)"},{"line_number":26,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_func.name)"},{"line_number":27,"context_line":"    return(of_func)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def register_openflow_bridge(of_bridge):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_5e69bb88","line":27,"range":{"start_line":27,"start_character":4,"end_line":27,"end_character":19},"in_reply_to":"1f485f77_52d44e20","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"def register_openflow_bridge(of_bridge):"},{"line_number":31,"context_line":"    OpenFlowManager.bridges[of_bridge.name] \u003d of_bridge"},{"line_number":32,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_bridge.name)"},{"line_number":33,"context_line":"    return(of_bridge)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def clear_openflow_manager():"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_12ded63e","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":21},"updated":"2017-11-15 16:37:30.000000000","message":"ditto","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"def register_openflow_bridge(of_bridge):"},{"line_number":31,"context_line":"    OpenFlowManager.bridges[of_bridge.name] \u003d of_bridge"},{"line_number":32,"context_line":"    LOG.debug(\"%s added to OpenFlowManager\", of_bridge.name)"},{"line_number":33,"context_line":"    return(of_bridge)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def clear_openflow_manager():"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_fe052fc3","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":21},"in_reply_to":"1f485f77_12ded63e","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    functions \u003d []"},{"line_number":47,"context_line":"    bridges \u003d {}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __init__(self, bridge):"},{"line_number":50,"context_line":"        self.ovs_bridge \u003d bridge"},{"line_number":51,"context_line":"        self.ports \u003d {}"},{"line_number":52,"context_line":"        self._registered_functions \u003d []"},{"line_number":53,"context_line":"        self._bridges \u003d {}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":56,"context_line":"            self._bridges[bridge.name] \u003d bridge(self.ovs_bridge)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._update_flow_pipelines()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def update_port(self, port):"},{"line_number":61,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_f211faad","line":58,"range":{"start_line":49,"start_character":0,"end_line":58,"end_character":37},"updated":"2017-11-15 16:37:30.000000000","message":"I really have a hard time understanding the intent behind this part of the code (and _update_flow_pipeline).\n\nIf you are creating an instance of OpenFlowManager() for a given bridge, then why does this instance have a self._bridges (plural) that supposedly would contain multiple bridges, but will in fact be populated with multiple bridges all instantiated based on the same bridge ? (L56)\n\nI also see that you may, at end of L56, instantiate an OpenFlowBridge with OpenFlowBridge.name \u003d\u003d \"br-tun\", and passing it a br-int object (which is what ovs_neutron_agent instantiates OpenFlowManager with).  \n\n\nHere are suggestions (they maybe wrong because I haven\u0027t understood the intent yet):\n- avoid class-scope variables and make them module-scope: it does not make a huge difference technically, but it may make your code clearer\n- it would seem natural to have everyting related to a specific bridge happen in OpenFlowBridge, and the work consisting in looping over all the registered bridges done in OpenFlowManager (which leads me to think that OpenFlowManager.__init__ should not have a bridge argument\n- having the registered_functions dict be a dict of lists, with bridge names as keys, would allow to naturally loop over the function registered for a bridge in OpenFlowBridge","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    functions \u003d []"},{"line_number":47,"context_line":"    bridges \u003d {}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def __init__(self, bridge):"},{"line_number":50,"context_line":"        self.ovs_bridge \u003d bridge"},{"line_number":51,"context_line":"        self.ports \u003d {}"},{"line_number":52,"context_line":"        self._registered_functions \u003d []"},{"line_number":53,"context_line":"        self._bridges \u003d {}"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":56,"context_line":"            self._bridges[bridge.name] \u003d bridge(self.ovs_bridge)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._update_flow_pipelines()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def update_port(self, port):"},{"line_number":61,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_be46c77b","line":58,"range":{"start_line":49,"start_character":0,"end_line":58,"end_character":37},"in_reply_to":"1f485f77_f211faad","updated":"2017-11-24 17:33:59.000000000","message":"There isn\u0027t a 1:1 relationship between the OpenFlowManager and OpenFlowBridge, There is a single OpenFlowManager running in the agent and multiple OpenFlowBridges aimed at multiple different bridges.\nThe bridge class type (OVSIntegrationBridge, OVSTunnelBridge, OVSBridge, etc) can be overwritten inside each of the OpenFlowBridges.\nBy using Wrapper based registry of the OpenFlowBridges and Functions we need the class based variables for the values to be stored in before they can be initialized.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._update_flow_pipelines()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def update_port(self, port):"},{"line_number":61,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":62,"context_line":"        for bridge in self._bridges.values():"},{"line_number":63,"context_line":"            bridge.update_port(port)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def delete_port(self, port):"},{"line_number":66,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":67,"context_line":"        if port_object:"},{"line_number":68,"context_line":"            for bridge in self._bridges.values():"},{"line_number":69,"context_line":"                bridge.delete_port(port_object)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _update_flow_pipelines(self):"},{"line_number":72,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_16dfcad6","line":69,"range":{"start_line":60,"start_character":0,"end_line":69,"end_character":47},"updated":"2017-11-15 16:37:30.000000000","message":"I still don\u0027t get why something related to a specific port ends up involving a call on all ports.  I would expect the ovs_neutron_agent main loop, since it knows the bridge on which a device is added or removed, to call update_port or delete_port on the OpenFlowBridge corresponding to the bridge (assuming OpenFlowManager can provide a method giving the OpenFlowBridge for a given bridge name).","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._update_flow_pipelines()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def update_port(self, port):"},{"line_number":61,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":62,"context_line":"        for bridge in self._bridges.values():"},{"line_number":63,"context_line":"            bridge.update_port(port)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def delete_port(self, port):"},{"line_number":66,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":67,"context_line":"        if port_object:"},{"line_number":68,"context_line":"            for bridge in self._bridges.values():"},{"line_number":69,"context_line":"                bridge.delete_port(port_object)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _update_flow_pipelines(self):"},{"line_number":72,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_c306391d","line":69,"range":{"start_line":60,"start_character":0,"end_line":69,"end_character":47},"in_reply_to":"1f485f77_16dfcad6","updated":"2017-11-24 17:33:59.000000000","message":"Just on the first sentence, did you mean \"involving a call on all bridges\"?\nWhat I\u0027ve been considering isn\u0027t bridges created by the OVSNeutronAgent, I\u0027ve been thinking more about bridges created by extensions and how they\u0027ll need to be updated. My thinking around this is \u0027br-int \"belongs\" to OVSNeutronAgent so it can be trusted to modify it responsibly, however other anything else must use the pipeline\u0027.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"e5998f252b4047680a7e9f5ca3039d36f3385f45","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self._update_flow_pipelines()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def update_port(self, port):"},{"line_number":61,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":62,"context_line":"        for bridge in self._bridges.values():"},{"line_number":63,"context_line":"            bridge.update_port(port)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def delete_port(self, port):"},{"line_number":66,"context_line":"        port_object \u003d self.ports.pop(port[\u0027port_id\u0027])"},{"line_number":67,"context_line":"        if port_object:"},{"line_number":68,"context_line":"            for bridge in self._bridges.values():"},{"line_number":69,"context_line":"                bridge.delete_port(port_object)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _update_flow_pipelines(self):"},{"line_number":72,"context_line":"        unreg_funct \u003d [x for x in (set(OpenFlowManager.functions) ^"}],"source_content_type":"text/x-python","patch_set":10,"id":"df87a7cf_f4b55dce","line":69,"range":{"start_line":60,"start_character":0,"end_line":69,"end_character":47},"in_reply_to":"ff82abbf_c306391d","updated":"2018-03-01 16:21:26.000000000","message":"\u003e Just on the first sentence, did you mean \"involving a call on all bridges\"?\n\nYes, sorry.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":173,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if (n_const.VETH_DEVICE_PREFIX in port_name or"},{"line_number":176,"context_line":"            n_const.VHOST_USER_DEVICE_PREFIX in port_name):"},{"line_number":177,"context_line":"            self.br.add_flow(in_port\u003dof_port,"},{"line_number":178,"context_line":"                          priority\u003d10,"},{"line_number":179,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_963dfade","line":176,"range":{"start_line":175,"start_character":0,"end_line":176,"end_character":58},"updated":"2017-11-15 16:37:30.000000000","message":"Make this test a method and reuse at line 211 ?","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":173,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if (n_const.VETH_DEVICE_PREFIX in port_name or"},{"line_number":176,"context_line":"            n_const.VHOST_USER_DEVICE_PREFIX in port_name):"},{"line_number":177,"context_line":"            self.br.add_flow(in_port\u003dof_port,"},{"line_number":178,"context_line":"                          priority\u003d10,"},{"line_number":179,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_28c584f1","line":176,"range":{"start_line":175,"start_character":0,"end_line":176,"end_character":58},"in_reply_to":"1f485f77_963dfade","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":184,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"            for ip in ip_addr:"},{"line_number":187,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":188,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":189,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":190,"context_line":"                          priority\u003d10,"},{"line_number":191,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":192,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":193,"context_line":"                else:"},{"line_number":194,"context_line":"                    self.br.add_flow(ip_dst\u003dip,"},{"line_number":195,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":196,"context_line":"                          priority\u003d10,"},{"line_number":197,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":198,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def delete_port(self, port):"},{"line_number":201,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_198c9b7d","line":198,"range":{"start_line":186,"start_character":0,"end_line":198,"end_character":63},"updated":"2017-11-15 16:37:30.000000000","message":"I have a feeling this can\u0027t be the right solution, for all the following reasons:\n- this can\u0027t solve the \"without these flows traffic would skip both pipelines and go straight to the output table\" for non-IP traffic\n- multiple networks may simultaneously use the same IP, so the del_flow at lines 217 and 221 may kill the flows defined here for overlapping IPs that are still in use\n- matching on MAC instead will not work, because the same MAC can be used in multiple networks as well\n\nI don\u0027t have the solution, but would suggest exploring these directions:\n- do we need per-port rules to direct traffic to INGRESS_DEFLECTOR ? (shouldn\u0027t all traffic go in this table ?)\n- assuming we need to, look at how the OVS firewall uses registries to mark the destination network (and perhaps destination port) as well and reuse that\n\n(?)","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":184,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"            for ip in ip_addr:"},{"line_number":187,"context_line":"                if \u0027:\u0027 in str(ip):"},{"line_number":188,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":189,"context_line":"                          dl_type\u003d\"0x86dd\","},{"line_number":190,"context_line":"                          priority\u003d10,"},{"line_number":191,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":192,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":193,"context_line":"                else:"},{"line_number":194,"context_line":"                    self.br.add_flow(ip_dst\u003dip,"},{"line_number":195,"context_line":"                          dl_type\u003d\"0x0800\","},{"line_number":196,"context_line":"                          priority\u003d10,"},{"line_number":197,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":198,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def delete_port(self, port):"},{"line_number":201,"context_line":"        port \u003d self.ports.get(port) if port else None"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_08c0c0e0","line":198,"range":{"start_line":186,"start_character":0,"end_line":198,"end_character":63},"in_reply_to":"1f485f77_198c9b7d","updated":"2017-11-24 17:33:59.000000000","message":"I\u0027ve changed this slightly in the next version I\u0027ll be putting up, rather than just using the destination IPv4/6 address, I\u0027ll also match on the destination mac address. The mac + IP match should be unique and reduce the probability of multiple ports matching on the same criteria.\nI\u0027ve also stopped using the in_port to match on traffic egressing from an instance, I\u0027m using the same mac + ip match. I stopped this because the traffic won\u0027t have common in_ports if it gets sent to another bridge connected to br-int before being sent back.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    extension \u003d \"\""},{"line_number":405,"context_line":"    name \u003d \"\""},{"line_number":406,"context_line":"    bridge \u003d None"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    declares_registers \u003d []"},{"line_number":409,"context_line":"    declares_tables \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_9685fad1","line":406,"range":{"start_line":406,"start_character":4,"end_line":406,"end_character":10},"updated":"2017-11-15 16:37:30.000000000","message":"perhaps bridge_name would be better here, to make it obvious that it\u0027s not an object but just a name","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    extension \u003d \"\""},{"line_number":405,"context_line":"    name \u003d \"\""},{"line_number":406,"context_line":"    bridge \u003d None"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    declares_registers \u003d []"},{"line_number":409,"context_line":"    declares_tables \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_c7116c06","line":406,"range":{"start_line":406,"start_character":4,"end_line":406,"end_character":10},"in_reply_to":"1f485f77_9685fad1","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    needs_functions \u003d []"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def __init__(self):"},{"line_number":414,"context_line":"        pass"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @classmethod"},{"line_number":417,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_a8f52fef","line":414,"range":{"start_line":414,"start_character":8,"end_line":414,"end_character":12},"updated":"2017-11-15 16:37:30.000000000","message":"In https://review.openstack.org/#/c/399680/5/neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py this class is subclassed into a class which is instantiated with a bridge parameter.\n\nWhy not have this mother class accept a bridge parameter and take the opportunity of checking that the bridge passed at init matches the class .bridge ? (as a consistency check)","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    needs_functions \u003d []"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    def __init__(self):"},{"line_number":414,"context_line":"        pass"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @classmethod"},{"line_number":417,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_83b35198","line":414,"range":{"start_line":414,"start_character":8,"end_line":414,"end_character":12},"in_reply_to":"1f485f77_a8f52fef","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":"class OpenFlowTable(object):"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def __init__(self, name, default_action\u003d\"NEXT\"):"},{"line_number":449,"context_line":"        self._table_name \u003d name"},{"line_number":450,"context_line":"        self._default_action \u003d default_action"},{"line_number":451,"context_line":"        self._table_num \u003d None"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_194ffb34","line":448,"range":{"start_line":448,"start_character":44,"end_line":448,"end_character":50},"updated":"2017-11-15 16:37:30.000000000","message":"introduce a constant for this one?","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":"class OpenFlowTable(object):"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def __init__(self, name, default_action\u003d\"NEXT\"):"},{"line_number":449,"context_line":"        self._table_name \u003d name"},{"line_number":450,"context_line":"        self._default_action \u003d default_action"},{"line_number":451,"context_line":"        self._table_num \u003d None"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_39aac070","line":448,"range":{"start_line":448,"start_character":44,"end_line":448,"end_character":50},"in_reply_to":"1f485f77_194ffb34","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"253ab7db091ec628122471e447883676795c77b0","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            self.reg_offset + self.reg_size"},{"line_number":499,"context_line":"        load_value \u003d hex(value)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        action \u003d \"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (load_value, self.reg,"},{"line_number":502,"context_line":"                  start_offset, end_offset)"},{"line_number":503,"context_line":"        return action"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f485f77_5920d348","line":501,"range":{"start_line":501,"start_character":27,"end_line":501,"end_character":37},"updated":"2017-11-15 16:37:30.000000000","message":"Back to an earlier question: don\u0027t you like the idea of using xxreg ? if not can we discuss why ?\n\n(having to upgrade the version of OpenFlow used, seems to me as acceptable, do you think otherwise ?)","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            self.reg_offset + self.reg_size"},{"line_number":499,"context_line":"        load_value \u003d hex(value)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        action \u003d \"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (load_value, self.reg,"},{"line_number":502,"context_line":"                  start_offset, end_offset)"},{"line_number":503,"context_line":"        return action"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_fe299689","line":501,"range":{"start_line":501,"start_character":27,"end_line":501,"end_character":37},"in_reply_to":"1f485f77_5920d348","updated":"2017-11-24 17:33:59.000000000","message":"I do like the idea and I\u0027ll include it in the next patch.","commit_id":"678731e5592b7d480b8feedcb73569da8cb33d4f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.br.set_agent_uuid_stamp(bridge.request_cookie())"},{"line_number":100,"context_line":"        self.br.br_name \u003d self.name"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":103,"context_line":"                len(self.table_whitelist) !\u003d len(set(self.table_whitelist)) or"},{"line_number":104,"context_line":"                set(self.table_whitelist) \u0026"},{"line_number":105,"context_line":"                set(constants.OVS_PIPELINE) !\u003d set([])):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_02330416","line":102,"updated":"2017-11-15 15:54:58.000000000","message":"hmm, do You need this check of constants defined in code? can\u0027t it be moved e.g. to unit test?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.br.set_agent_uuid_stamp(bridge.request_cookie())"},{"line_number":100,"context_line":"        self.br.br_name \u003d self.name"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if (len(constants.OVS_PIPELINE) !\u003d len(set(constants.OVS_PIPELINE)) or"},{"line_number":103,"context_line":"                len(self.table_whitelist) !\u003d len(set(self.table_whitelist)) or"},{"line_number":104,"context_line":"                set(self.table_whitelist) \u0026"},{"line_number":105,"context_line":"                set(constants.OVS_PIPELINE) !\u003d set([])):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_d8a4a2a8","line":102,"in_reply_to":"1f485f77_02330416","updated":"2017-11-24 17:33:59.000000000","message":"Done, I added this piece of the code just in case an extension overwrote the constant.","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_port(self, port):"},{"line_number":170,"context_line":"        #NOTE(davidsha)"},{"line_number":171,"context_line":"        # This function and delete_port add flows to the pipeline to route"},{"line_number":172,"context_line":"        # traffic between the egress and ingress pipelines."},{"line_number":173,"context_line":"        # without these flows traffic would skip both pipelines and go"},{"line_number":174,"context_line":"        # straight to the output table."}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_e237c8fe","line":171,"updated":"2017-11-15 15:54:58.000000000","message":"delete_port() adds flows? not removes them?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_port(self, port):"},{"line_number":170,"context_line":"        #NOTE(davidsha)"},{"line_number":171,"context_line":"        # This function and delete_port add flows to the pipeline to route"},{"line_number":172,"context_line":"        # traffic between the egress and ingress pipelines."},{"line_number":173,"context_line":"        # without these flows traffic would skip both pipelines and go"},{"line_number":174,"context_line":"        # straight to the output table."}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_98aaaa6e","line":171,"in_reply_to":"1f485f77_e237c8fe","updated":"2017-11-24 17:33:59.000000000","message":"Oops!","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":207,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def delete_port(self, port):"},{"line_number":210,"context_line":"        port \u003d self.ports.get(port) if port else None"},{"line_number":211,"context_line":"        if port is None:"},{"line_number":212,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_c2384cef","line":209,"updated":"2017-11-15 15:54:58.000000000","message":"why description of what this method is doing is in NOTE at the beginning of update_port() method?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":218,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        if \"qvo\" in port_name or \"vhu\" in port_name:"},{"line_number":221,"context_line":"            self.br.del_flow(in_port\u003dof_port,"},{"line_number":222,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE)"},{"line_number":223,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_a23d50de","line":220,"updated":"2017-11-15 15:54:58.000000000","message":"qvo and vhu aren\u0027t defined somewhere in constants maybe?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":218,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        if \"qvo\" in port_name or \"vhu\" in port_name:"},{"line_number":221,"context_line":"            self.br.del_flow(in_port\u003dof_port,"},{"line_number":222,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE)"},{"line_number":223,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_fe60cfa7","line":220,"in_reply_to":"1f485f77_a23d50de","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        for funct in self._unreg_funct:"},{"line_number":242,"context_line":"            name \u003d funct.name"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"            if \"EG\" in name[-2:]:"},{"line_number":245,"context_line":"                if \"PRE\" in name:"},{"line_number":246,"context_line":"                    self._pre_egress.append(funct)"},{"line_number":247,"context_line":"                    self._pre_egress \u003d self._resolve_segment(self._pre_egress,"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_8226d4cd","line":244,"updated":"2017-11-15 15:54:58.000000000","message":"maybe You can add it to constants? and same question for all other strings in this method :)","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        for funct in self._unreg_funct:"},{"line_number":242,"context_line":"            name \u003d funct.name"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"            if \"EG\" in name[-2:]:"},{"line_number":245,"context_line":"                if \"PRE\" in name:"},{"line_number":246,"context_line":"                    self._pre_egress.append(funct)"},{"line_number":247,"context_line":"                    self._pre_egress \u003d self._resolve_segment(self._pre_egress,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_1e6493b8","line":244,"in_reply_to":"1f485f77_8226d4cd","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                break"},{"line_number":354,"context_line":"            else:"},{"line_number":355,"context_line":"                if (table in self._table_whitelist or"},{"line_number":356,"context_line":"                        self._tables[table].default_action \u003d\u003d \"NEXT\"):"},{"line_number":357,"context_line":"                    self._redirect_pipeline(table,"},{"line_number":358,"context_line":"                                        pipeline[pipeline.index(table) + 1])"},{"line_number":359,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_6223d8be","line":356,"updated":"2017-11-15 15:54:58.000000000","message":"same here about constants","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                break"},{"line_number":354,"context_line":"            else:"},{"line_number":355,"context_line":"                if (table in self._table_whitelist or"},{"line_number":356,"context_line":"                        self._tables[table].default_action \u003d\u003d \"NEXT\"):"},{"line_number":357,"context_line":"                    self._redirect_pipeline(table,"},{"line_number":358,"context_line":"                                        pipeline[pipeline.index(table) + 1])"},{"line_number":359,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_be5a47f0","line":356,"in_reply_to":"1f485f77_6223d8be","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":420,"context_line":"    needs_functions \u003d []"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def __init__(self):"},{"line_number":423,"context_line":"        pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    @classmethod"},{"line_number":426,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_422c5cab","line":423,"updated":"2017-11-15 15:54:58.000000000","message":"do You need this __init__ method here?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":420,"context_line":"    needs_functions \u003d []"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def __init__(self):"},{"line_number":423,"context_line":"        pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    @classmethod"},{"line_number":426,"context_line":"    def get_tables(cls):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_de5dcbe9","line":423,"in_reply_to":"1f485f77_422c5cab","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    def get_tables(cls):"},{"line_number":427,"context_line":"        tables \u003d []"},{"line_number":428,"context_line":"        for table in cls.declares_tables:"},{"line_number":429,"context_line":"            tables.append(table.table_num)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        return tables"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_2229609a","line":429,"updated":"2017-11-15 15:54:58.000000000","message":"can\u0027t You do something like:\n\n    return [t.table_num for t in cls.declares_tables]\n\n? IMHO it\u0027s better than those few lines :)","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"d1491d5f70a5afc7883d102bcc3547126655087c","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    def get_tables(cls):"},{"line_number":427,"context_line":"        tables \u003d []"},{"line_number":428,"context_line":"        for table in cls.declares_tables:"},{"line_number":429,"context_line":"            tables.append(table.table_num)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        return tables"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff82abbf_7e74bf68","line":429,"in_reply_to":"1f485f77_2229609a","updated":"2017-11-24 17:33:59.000000000","message":"Done","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":25805,"name":"Yu Shengzuo","email":"yu.shengzuo@99cloud.net","username":"yuc"},"change_message_id":"5ec35a2c4f9da7be96f9f7cf9ec7719b350810e3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self._bridges \u003d {}"},{"line_number":62,"context_line":"        self._br_names_mapping \u003d {}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        if set(self.functions.keys()) and \\"},{"line_number":65,"context_line":"            set(self.functions.keys()) ^ set(self.bridges.keys()):"},{"line_number":66,"context_line":"            raise exceptions.OpenFlowManagerInvalidBridge("},{"line_number":67,"context_line":"                      bridge\u003d\u0027,\u0027.join(bridge for bridge in"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_6121da9f","line":64,"range":{"start_line":64,"start_character":42,"end_line":64,"end_character":43},"updated":"2018-01-11 10:02:59.000000000","message":"bad code style","commit_id":"c6fef3544830349c13a148fb1cc15213a54580c4"},{"author":{"_account_id":25805,"name":"Yu Shengzuo","email":"yu.shengzuo@99cloud.net","username":"yuc"},"change_message_id":"5ec35a2c4f9da7be96f9f7cf9ec7719b350810e3","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            for funct in self.functions.get(br.name, []):"},{"line_number":110,"context_line":"                br.add_function(funct)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            self._functions[br_name] \u003d \\"},{"line_number":113,"context_line":"                copy.deepcopy(self.functions.get(br.name, []))"},{"line_number":114,"context_line":"            br.update_flow_pipeline()"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_41385ed2","line":112,"range":{"start_line":112,"start_character":39,"end_line":112,"end_character":40},"updated":"2018-01-11 10:02:59.000000000","message":"Better:\n  self._functions[br_name] \u003d (\n      xxxx","commit_id":"c6fef3544830349c13a148fb1cc15213a54580c4"},{"author":{"_account_id":25805,"name":"Yu Shengzuo","email":"yu.shengzuo@99cloud.net","username":"yuc"},"change_message_id":"5ec35a2c4f9da7be96f9f7cf9ec7719b350810e3","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def _extract_table_nums(self, functions):"},{"line_number":290,"context_line":"        tables \u003d []"},{"line_number":291,"context_line":"        for function in functions:"},{"line_number":292,"context_line":"            tables \u003d tables + function.get_tables()"},{"line_number":293,"context_line":"        return tables"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _sort_functions(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_c1d6ae50","line":292,"range":{"start_line":290,"start_character":0,"end_line":292,"end_character":51},"updated":"2018-01-11 10:02:59.000000000","message":"Better use some efficient function like reduce() or map()","commit_id":"c6fef3544830349c13a148fb1cc15213a54580c4"},{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"d07300e907a6c0b3e480341481061a2a043703bc","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            bridge.update_port(port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def delete_port(self, port):"},{"line_number":102,"context_line":"        port_object \u003d self.ports.pop(port, none)"},{"line_number":103,"context_line":"        if port_object:"},{"line_number":104,"context_line":"            for bridge in self._bridges.values():"},{"line_number":105,"context_line":"                bridge.delete_port(port_object)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f96bb07_448269ca","line":102,"range":{"start_line":102,"start_character":43,"end_line":102,"end_character":47},"updated":"2018-01-23 11:06:47.000000000","message":"None","commit_id":"8665b01d604a57a2ec5e435a315c5f0972ba1a04"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"6e42f9a7150d7a5108047611a9302dd36952df8c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            bridge.update_port(port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def delete_port(self, port):"},{"line_number":102,"context_line":"        port_object \u003d self.ports.pop(port, none)"},{"line_number":103,"context_line":"        if port_object:"},{"line_number":104,"context_line":"            for bridge in self._bridges.values():"},{"line_number":105,"context_line":"                bridge.delete_port(port_object)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f96bb07_fad0edcb","line":102,"range":{"start_line":102,"start_character":43,"end_line":102,"end_character":47},"in_reply_to":"7f96bb07_448269ca","updated":"2018-01-23 13:46:30.000000000","message":"Done","commit_id":"8665b01d604a57a2ec5e435a315c5f0972ba1a04"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Intel Corporation."},{"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":30,"id":"1f9dbf25_0a910c9a","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2018-02-28 16:43:40.000000000","message":"2018?","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"e5998f252b4047680a7e9f5ca3039d36f3385f45","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Intel Corporation."},{"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":30,"id":"1f9dbf25_91777e3b","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"1f9dbf25_0a910c9a","updated":"2018-03-01 16:21:26.000000000","message":"(IANAL but the work was initially published before 2018, so perhaps there is no rationale to switch this statement; that is unless we know for a fact that we should)","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"e5998f252b4047680a7e9f5ca3039d36f3385f45","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                      self.functions.keys()))"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":71,"context_line":"            # Initialize the statically registered bridges."},{"line_number":72,"context_line":"            #"},{"line_number":73,"context_line":"            # Functional tests append a random number to standard"},{"line_number":74,"context_line":"            # bridge names (e.g. \u0027br-int\u0027) by mocking Config.Opts."},{"line_number":75,"context_line":"            # However, this happens after the openflow bridges are"},{"line_number":76,"context_line":"            # registered by decorators which is at importing time."},{"line_number":77,"context_line":"            # So match the bridges by brige.name as prefix."},{"line_number":78,"context_line":"            ovs_bridge_exists \u003d False"},{"line_number":79,"context_line":"            for ovs_bridge in bridge_list:"},{"line_number":80,"context_line":"                if ovs_bridge.br_name.startswith(bridge.name):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_9180de8d","line":77,"range":{"start_line":71,"start_character":0,"end_line":77,"end_character":59},"updated":"2018-03-01 16:21:26.000000000","message":"Usually, we try to avoid having production code being complexified to make testing possible/easier.\n\nHere the code is hard to read because there are many kinds of bridge collections: OpenFlowManager.bridges, bridge_list, self._bridges .\n\nI\u0027m trying to understand better the issue your are explaining about functional test using different names, to see if we have the right solution.  It seems to me that the right solution should be to have all the pieces in place so that at the time when [1] happens, it retrieves the bridge name after mocking by the functional test code.\n\nIf this isn\u0027t doable, then I believe that at the very least, the piece of code here 70-84 should not be in the production code but added during tests by monkeypatching. But this isn\u0027t a great solution and would still be a last resort.\n\n[1] https://review.openstack.org/#/c/399680/9/neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_openflow_function.py@26","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"7cd4f8b72cec564f7969f6f4c495788407c9b3b6","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                      self.functions.keys()))"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":71,"context_line":"            # Initialize the statically registered bridges."},{"line_number":72,"context_line":"            #"},{"line_number":73,"context_line":"            # Functional tests append a random number to standard"},{"line_number":74,"context_line":"            # bridge names (e.g. \u0027br-int\u0027) by mocking Config.Opts."},{"line_number":75,"context_line":"            # However, this happens after the openflow bridges are"},{"line_number":76,"context_line":"            # registered by decorators which is at importing time."},{"line_number":77,"context_line":"            # So match the bridges by brige.name as prefix."},{"line_number":78,"context_line":"            ovs_bridge_exists \u003d False"},{"line_number":79,"context_line":"            for ovs_bridge in bridge_list:"},{"line_number":80,"context_line":"                if ovs_bridge.br_name.startswith(bridge.name):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_87c26933","line":77,"range":{"start_line":71,"start_character":0,"end_line":77,"end_character":59},"in_reply_to":"1f9dbf25_2463bd1c","updated":"2018-03-14 06:51:34.000000000","message":"Done","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"e69bdeb51231bbc75b63f4e980435f1a6c54b2ac","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                      self.functions.keys()))"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":71,"context_line":"            # Initialize the statically registered bridges."},{"line_number":72,"context_line":"            #"},{"line_number":73,"context_line":"            # Functional tests append a random number to standard"},{"line_number":74,"context_line":"            # bridge names (e.g. \u0027br-int\u0027) by mocking Config.Opts."},{"line_number":75,"context_line":"            # However, this happens after the openflow bridges are"},{"line_number":76,"context_line":"            # registered by decorators which is at importing time."},{"line_number":77,"context_line":"            # So match the bridges by brige.name as prefix."},{"line_number":78,"context_line":"            ovs_bridge_exists \u003d False"},{"line_number":79,"context_line":"            for ovs_bridge in bridge_list:"},{"line_number":80,"context_line":"                if ovs_bridge.br_name.startswith(bridge.name):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_b5d28b5b","line":77,"range":{"start_line":71,"start_character":0,"end_line":77,"end_character":59},"in_reply_to":"1f9dbf25_2463bd1c","updated":"2018-03-03 06:47:54.000000000","message":"This will get removed if we postpone the registration of OpenFlowFunction and OpenFlowBridge to agent and extension initialization time. (https://review.openstack.org/#/c/549392/)\nCurrently, OpenFlowFunction and OpenFlowBridge are registered before config is mocked.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                      self.functions.keys()))"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for bridge in OpenFlowManager.bridges.values():"},{"line_number":71,"context_line":"            # Initialize the statically registered bridges."},{"line_number":72,"context_line":"            #"},{"line_number":73,"context_line":"            # Functional tests append a random number to standard"},{"line_number":74,"context_line":"            # bridge names (e.g. \u0027br-int\u0027) by mocking Config.Opts."},{"line_number":75,"context_line":"            # However, this happens after the openflow bridges are"},{"line_number":76,"context_line":"            # registered by decorators which is at importing time."},{"line_number":77,"context_line":"            # So match the bridges by brige.name as prefix."},{"line_number":78,"context_line":"            ovs_bridge_exists \u003d False"},{"line_number":79,"context_line":"            for ovs_bridge in bridge_list:"},{"line_number":80,"context_line":"                if ovs_bridge.br_name.startswith(bridge.name):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_2463bd1c","line":77,"range":{"start_line":71,"start_character":0,"end_line":77,"end_character":59},"in_reply_to":"1f9dbf25_9180de8d","updated":"2018-03-02 12:30:14.000000000","message":"Discussed today with davidsha who agrees this should be removed, and the problem rather solved in the test code.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            for bridge in self._bridges.values():"},{"line_number":105,"context_line":"                bridge.delete_port(port_object)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            LOG.debug(\"delet_port was received for port %s, \""},{"line_number":108,"context_line":"                      \"but port was not found, it seems that \""},{"line_number":109,"context_line":"                      \"it has already been deleted\", port)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_a92486c7","line":107,"range":{"start_line":107,"start_character":23,"end_line":107,"end_character":33},"updated":"2018-03-02 12:30:14.000000000","message":"delete","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        for bridge in self._bridges.values():"},{"line_number":94,"context_line":"            bridge.init_pipeline()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def update_port(self, port):"},{"line_number":97,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":98,"context_line":"        for bridge in self._bridges.values():"},{"line_number":99,"context_line":"            bridge.update_port(port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def delete_port(self, port):"},{"line_number":102,"context_line":"        port_object \u003d self.ports.pop(port, None)"},{"line_number":103,"context_line":"        if port_object:"},{"line_number":104,"context_line":"            for bridge in self._bridges.values():"},{"line_number":105,"context_line":"                bridge.delete_port(port_object)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            LOG.debug(\"delet_port was received for port %s, \""},{"line_number":108,"context_line":"                      \"but port was not found, it seems that \""},{"line_number":109,"context_line":"                      \"it has already been deleted\", port)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _update_flow_pipelines(self):"},{"line_number":112,"context_line":"        for br_name, br in self._bridges.items():"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_446849f4","line":109,"range":{"start_line":96,"start_character":0,"end_line":109,"end_character":58},"updated":"2018-03-02 12:30:14.000000000","message":"as discussed today, this shouldn\u0027t be needed and calling update_port and delete_port seems only needed in br-int\ndavidsha suggested to move this code into the br-int OpenFlowBridge definition","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"e69bdeb51231bbc75b63f4e980435f1a6c54b2ac","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        for bridge in self._bridges.values():"},{"line_number":94,"context_line":"            bridge.init_pipeline()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def update_port(self, port):"},{"line_number":97,"context_line":"        self.ports[port[\u0027port_id\u0027]] \u003d port"},{"line_number":98,"context_line":"        for bridge in self._bridges.values():"},{"line_number":99,"context_line":"            bridge.update_port(port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def delete_port(self, port):"},{"line_number":102,"context_line":"        port_object \u003d self.ports.pop(port, None)"},{"line_number":103,"context_line":"        if port_object:"},{"line_number":104,"context_line":"            for bridge in self._bridges.values():"},{"line_number":105,"context_line":"                bridge.delete_port(port_object)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            LOG.debug(\"delet_port was received for port %s, \""},{"line_number":108,"context_line":"                      \"but port was not found, it seems that \""},{"line_number":109,"context_line":"                      \"it has already been deleted\", port)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _update_flow_pipelines(self):"},{"line_number":112,"context_line":"        for br_name, br in self._bridges.items():"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_b537ebb0","line":109,"range":{"start_line":96,"start_character":0,"end_line":109,"end_character":58},"in_reply_to":"1f9dbf25_446849f4","updated":"2018-03-03 06:47:54.000000000","message":"Isn\u0027t this how br-int OpenFlowBridge.{update_port|delete_port} are called?\nThe code path is agent -\u003e flow_manager.update_port() -\u003e each OpenFlowBridge\u0027s update_port().","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class OpenFlowBridge(object):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    # This twist of cls.name v.s. self.br_name came from the"},{"line_number":124,"context_line":"    # fact that the OpenFlowBridge classes are registered by"},{"line_number":125,"context_line":"    # register_openflow_bridge() used as decorators."},{"line_number":126,"context_line":"    # That being said, OpenFlowBridge classes are registered"},{"line_number":127,"context_line":"    # at module importing time. Thus the cls.name is set at"},{"line_number":128,"context_line":"    # that time. However, functional tests change the bridge"},{"line_number":129,"context_line":"    # names in config options afterwards. So the OVS bridges"},{"line_number":130,"context_line":"    # are instantiated  with a different name (by appending"},{"line_number":131,"context_line":"    # a random number)."},{"line_number":132,"context_line":"    # In that reason, self.br_name is set to the name of the"},{"line_number":133,"context_line":"    # corresponding OVS bridge, and being used dominantly after"},{"line_number":134,"context_line":"    # instantiation."},{"line_number":135,"context_line":"    name \u003d \"\""},{"line_number":136,"context_line":"    table_whitelist \u003d []"},{"line_number":137,"context_line":"    egress_prio \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_e46cf509","line":134,"range":{"start_line":123,"start_character":0,"end_line":134,"end_character":20},"updated":"2018-03-02 12:30:14.000000000","message":"Similar comment as the one for lines 70-84 of this file: if the only reason to make production code complex, it should be (unless really not feasible) the test code that should adapt.\n\n(Besides, this also looks broken: if a bridge is regsitered after another, using different bridge names, won\u0027t this overwrite cls.name ??)","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"7cd4f8b72cec564f7969f6f4c495788407c9b3b6","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"class OpenFlowBridge(object):"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    # This twist of cls.name v.s. self.br_name came from the"},{"line_number":124,"context_line":"    # fact that the OpenFlowBridge classes are registered by"},{"line_number":125,"context_line":"    # register_openflow_bridge() used as decorators."},{"line_number":126,"context_line":"    # That being said, OpenFlowBridge classes are registered"},{"line_number":127,"context_line":"    # at module importing time. Thus the cls.name is set at"},{"line_number":128,"context_line":"    # that time. However, functional tests change the bridge"},{"line_number":129,"context_line":"    # names in config options afterwards. So the OVS bridges"},{"line_number":130,"context_line":"    # are instantiated  with a different name (by appending"},{"line_number":131,"context_line":"    # a random number)."},{"line_number":132,"context_line":"    # In that reason, self.br_name is set to the name of the"},{"line_number":133,"context_line":"    # corresponding OVS bridge, and being used dominantly after"},{"line_number":134,"context_line":"    # instantiation."},{"line_number":135,"context_line":"    name \u003d \"\""},{"line_number":136,"context_line":"    table_whitelist \u003d []"},{"line_number":137,"context_line":"    egress_prio \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_47de9111","line":134,"range":{"start_line":123,"start_character":0,"end_line":134,"end_character":20},"in_reply_to":"1f9dbf25_e46cf509","updated":"2018-03-14 06:51:34.000000000","message":"Done","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    # corresponding OVS bridge, and being used dominantly after"},{"line_number":134,"context_line":"    # instantiation."},{"line_number":135,"context_line":"    name \u003d \"\""},{"line_number":136,"context_line":"    table_whitelist \u003d []"},{"line_number":137,"context_line":"    egress_prio \u003d []"},{"line_number":138,"context_line":"    ingress_prio \u003d []"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def __init__(self, bridge):"},{"line_number":141,"context_line":"        self.br \u003d bridge.clone()"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_0419e183","line":138,"range":{"start_line":136,"start_character":3,"end_line":138,"end_character":21},"updated":"2018-03-02 12:30:14.000000000","message":"All these should be per-bridge right ?\nWhy aren\u0027t they instance constants ?","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"7cd4f8b72cec564f7969f6f4c495788407c9b3b6","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    # corresponding OVS bridge, and being used dominantly after"},{"line_number":134,"context_line":"    # instantiation."},{"line_number":135,"context_line":"    name \u003d \"\""},{"line_number":136,"context_line":"    table_whitelist \u003d []"},{"line_number":137,"context_line":"    egress_prio \u003d []"},{"line_number":138,"context_line":"    ingress_prio \u003d []"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def __init__(self, bridge):"},{"line_number":141,"context_line":"        self.br \u003d bridge.clone()"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_67e395da","line":138,"range":{"start_line":136,"start_character":3,"end_line":138,"end_character":21},"in_reply_to":"1f9dbf25_0419e183","updated":"2018-03-14 06:51:34.000000000","message":"Done","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"e69bdeb51231bbc75b63f4e980435f1a6c54b2ac","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    # corresponding OVS bridge, and being used dominantly after"},{"line_number":134,"context_line":"    # instantiation."},{"line_number":135,"context_line":"    name \u003d \"\""},{"line_number":136,"context_line":"    table_whitelist \u003d []"},{"line_number":137,"context_line":"    egress_prio \u003d []"},{"line_number":138,"context_line":"    ingress_prio \u003d []"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def __init__(self, bridge):"},{"line_number":141,"context_line":"        self.br \u003d bridge.clone()"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_d53ab796","line":138,"range":{"start_line":136,"start_character":3,"end_line":138,"end_character":21},"in_reply_to":"1f9dbf25_0419e183","updated":"2018-03-03 06:47:54.000000000","message":"This is the downside of registration by decorators at module importing time. That is one of the reasons to switch to dynamic registration.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":233,"context_line":"            for ip in ip_addr:"},{"line_number":234,"context_line":"                if utils.get_ip_version(ip) \u003d\u003d 6:"},{"line_number":235,"context_line":"                    self.br.add_flow(ipv6_src\u003dip,"},{"line_number":236,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":237,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":238,"context_line":"                          priority\u003d10,"},{"line_number":239,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_248f3d24","line":236,"range":{"start_line":235,"start_character":37,"end_line":236,"end_character":61},"updated":"2018-03-02 12:30:14.000000000","message":"matching on IP might should not be required (in INPUT_TAGGING, matching on in_port should be sufficient) and will actually restrict uses, because non IP traffic, or IP traffic toward another IP address will not reach the port (e.g. traffic to a secondary address that the VM uses with allowed_address_pairs)","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"7cd4f8b72cec564f7969f6f4c495788407c9b3b6","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":233,"context_line":"            for ip in ip_addr:"},{"line_number":234,"context_line":"                if utils.get_ip_version(ip) \u003d\u003d 6:"},{"line_number":235,"context_line":"                    self.br.add_flow(ipv6_src\u003dip,"},{"line_number":236,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":237,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":238,"context_line":"                          priority\u003d10,"},{"line_number":239,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_87734916","line":236,"range":{"start_line":235,"start_character":37,"end_line":236,"end_character":61},"in_reply_to":"1f9dbf25_248f3d24","updated":"2018-03-14 06:51:34.000000000","message":"IMHO, this update_port() and delete_port() need not exist for both OpenFlowManager and OpenFlowBridge. After sorting out pipelines properly at initialization, it is up to each extension driver to react to port update/delete events and install flows accordingly.\nAnd furthermore, we do not need to _resolve_pipeline() for each port update event since we do not allow adding OpenFlowFunctions on the fly, once the pipeline is resolved at initialization, it is fixed.\nWhat do you think? I am making such a change.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"13e31eaceb859ea443b9b9265c3cbfe739ebc1a3","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":233,"context_line":"            for ip in ip_addr:"},{"line_number":234,"context_line":"                if utils.get_ip_version(ip) \u003d\u003d 6:"},{"line_number":235,"context_line":"                    self.br.add_flow(ipv6_src\u003dip,"},{"line_number":236,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":237,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":238,"context_line":"                          priority\u003d10,"},{"line_number":239,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_3d1d9273","line":236,"range":{"start_line":235,"start_character":37,"end_line":236,"end_character":61},"in_reply_to":"df7087c5_87734916","updated":"2018-03-15 06:55:49.000000000","message":"Had a second thought: in update_port(), to identify ingress, should match dst_mac and (reg_net\u003d\u003dport.vlan). To identify egress, just match in_port.\nDelet_port() need to delete those flows.\nStill believe _resolve_pipeline() needs not be called for every update_port()","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":243,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":244,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":245,"context_line":"                          priority\u003d10,"},{"line_number":246,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":247,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_64c5453c","line":244,"range":{"start_line":244,"start_character":26,"end_line":244,"end_character":58},"updated":"2018-03-02 12:30:14.000000000","message":"as discussed today with davidsha, matching on in_port in INGRESS_DEFLECTOR_TABLE will not work in all cases, in particular not when the traffic has jumped into INGRESS_DEFLECTOR right from INPUT_TAGGING because it didn\u0027t match there.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":247,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":248,"context_line":"                else:"},{"line_number":249,"context_line":"                    self.br.add_flow(ip_src\u003dip,"},{"line_number":250,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IP,"},{"line_number":251,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":252,"context_line":"                          priority\u003d10,"},{"line_number":253,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_4494c937","line":250,"range":{"start_line":249,"start_character":37,"end_line":250,"end_character":59},"updated":"2018-03-02 12:30:14.000000000","message":"ditto","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"e5998f252b4047680a7e9f5ca3039d36f3385f45","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        return (n_const.VETH_DEVICE_PREFIX in port_name or"},{"line_number":214,"context_line":"                n_const.VHOST_USER_DEVICE_PREFIX in port_name)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def update_port(self, port):"},{"line_number":217,"context_line":"        #NOTE(davidsha)"},{"line_number":218,"context_line":"        # This function add flows to the pipeline to route"},{"line_number":219,"context_line":"        # traffic between the egress and ingress pipelines."},{"line_number":220,"context_line":"        # without these flows traffic would skip both pipelines and go"},{"line_number":221,"context_line":"        # straight to the output table."},{"line_number":222,"context_line":"        self._resolve_pipeline()"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        port_name \u003d port[\"vif_port\"].port_name"},{"line_number":225,"context_line":"        ip_addr \u003d []"},{"line_number":226,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":227,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        if self._check_port_type(port_name):"},{"line_number":230,"context_line":"            deflector_index \u003d self._pipeline.index(constants."},{"line_number":231,"context_line":"                                                   INGRESS_DEFLECTOR_TABLE)"},{"line_number":232,"context_line":"            next_table \u003d self._pipeline[deflector_index + 1]"},{"line_number":233,"context_line":"            for ip in ip_addr:"},{"line_number":234,"context_line":"                if utils.get_ip_version(ip) \u003d\u003d 6:"},{"line_number":235,"context_line":"                    self.br.add_flow(ipv6_src\u003dip,"},{"line_number":236,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":237,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":238,"context_line":"                          priority\u003d10,"},{"line_number":239,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"},{"line_number":240,"context_line":"                          actions\u003d\"resubmit(,%i)\" % self._pipeline[0])"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"                    self.br.add_flow(ipv6_dst\u003dip,"},{"line_number":243,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":244,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":245,"context_line":"                          priority\u003d10,"},{"line_number":246,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":247,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":248,"context_line":"                else:"},{"line_number":249,"context_line":"                    self.br.add_flow(ip_src\u003dip,"},{"line_number":250,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IP,"},{"line_number":251,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":252,"context_line":"                          priority\u003d10,"},{"line_number":253,"context_line":"                          table\u003dconstants.INPUT_TAGGING_TABLE,"},{"line_number":254,"context_line":"                          actions\u003d\"resubmit(,%i)\" % self._pipeline[0])"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"                    self.br.add_flow(ip_dst\u003dip,"},{"line_number":257,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IP,"},{"line_number":258,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":259,"context_line":"                          priority\u003d10,"},{"line_number":260,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE,"},{"line_number":261,"context_line":"                          actions\u003d\"resubmit(,%i)\" % next_table)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def delete_port(self, port):"},{"line_number":264,"context_line":"        if port is None:"},{"line_number":265,"context_line":"            return"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        port_name \u003d port[\"vif_port\"].port_name"},{"line_number":268,"context_line":"        ip_addr \u003d []"},{"line_number":269,"context_line":"        for ips in port[\"fixed_ips\"]:"},{"line_number":270,"context_line":"            ip_addr.append(ips[\"ip_address\"])"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        if self._check_port_type(port_name):"},{"line_number":273,"context_line":"            for ip in ip_addr:"},{"line_number":274,"context_line":"                if utils.get_ip_version(ip) \u003d\u003d 6:"},{"line_number":275,"context_line":"                    self.br.delete_flows(ipv6_dst\u003dip,"},{"line_number":276,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":277,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":278,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":279,"context_line":"                    self.br.delete_flows(ipv6_src\u003dip,"},{"line_number":280,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IPV6,"},{"line_number":281,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":282,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":283,"context_line":"                else:"},{"line_number":284,"context_line":"                    self.br.delete_flows(ip_dst\u003dip,"},{"line_number":285,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IP,"},{"line_number":286,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":287,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":288,"context_line":"                    self.br.delete_flows(ip_src\u003dip,"},{"line_number":289,"context_line":"                          dl_type\u003dn_constants.ETHERTYPE_IP,"},{"line_number":290,"context_line":"                          in_port\u003dport[\u0027vif_port\u0027].ofport,"},{"line_number":291,"context_line":"                          table\u003dconstants.INGRESS_DEFLECTOR_TABLE)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def _extract_table_nums(self, functions):"},{"line_number":294,"context_line":"        tables \u003d []"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_5484845e","line":291,"range":{"start_line":216,"start_character":0,"end_line":291,"end_character":66},"updated":"2018-03-01 16:21:26.000000000","message":"Perhaps I had already mentioned this: this is, I think, not ready, because to properly support IP address overlap, you cannot match an IP address without also matching on something that identifies the relevant neutron network (local vlan, when possible, or here in the case of br-int, the register carrying the network id like in the OVS firewall driver)","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":470,"context_line":""},{"line_number":471,"context_line":"class OpenFlowFunction(object):"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    extension \u003d \"\""},{"line_number":474,"context_line":"    name \u003d \"\""},{"line_number":475,"context_line":"    bridge_name \u003d \"\""},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    declares_registers \u003d []"},{"line_number":478,"context_line":"    declares_tables \u003d []"},{"line_number":479,"context_line":"    needs_registers \u003d []"},{"line_number":480,"context_line":"    needs_functions \u003d []"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def __init__(self, bridge):"},{"line_number":483,"context_line":"        if self.bridge_name !\u003d bridge.br_name and not \\"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_1f4da871","line":480,"range":{"start_line":473,"start_character":0,"end_line":480,"end_character":24},"updated":"2018-03-02 12:30:14.000000000","message":"I need to understand why all these are class variables.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":11347,"name":"Rui Zang","email":"rui.zang@yandex.com","username":"rzang"},"change_message_id":"7cd4f8b72cec564f7969f6f4c495788407c9b3b6","unresolved":false,"context_lines":[{"line_number":470,"context_line":""},{"line_number":471,"context_line":"class OpenFlowFunction(object):"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    extension \u003d \"\""},{"line_number":474,"context_line":"    name \u003d \"\""},{"line_number":475,"context_line":"    bridge_name \u003d \"\""},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    declares_registers \u003d []"},{"line_number":478,"context_line":"    declares_tables \u003d []"},{"line_number":479,"context_line":"    needs_registers \u003d []"},{"line_number":480,"context_line":"    needs_functions \u003d []"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"    def __init__(self, bridge):"},{"line_number":483,"context_line":"        if self.bridge_name !\u003d bridge.br_name and not \\"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_6768751c","line":480,"range":{"start_line":473,"start_character":0,"end_line":480,"end_character":24},"in_reply_to":"1f9dbf25_1f4da871","updated":"2018-03-14 06:51:34.000000000","message":"Done","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        self.name \u003d name"},{"line_number":545,"context_line":"        self.reg \u003d None"},{"line_number":546,"context_line":"        self.reg_offset \u003d None"},{"line_number":547,"context_line":"        if reg_size \u003e 32 or reg_size \u003c 1:"},{"line_number":548,"context_line":"            raise exceptions.OpenFlowRegisterInvalidRange(size\u003dreg_size)"},{"line_number":549,"context_line":"        self.reg_size \u003d reg_size"},{"line_number":550,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_3f0ae4d1","line":547,"range":{"start_line":547,"start_character":22,"end_line":547,"end_character":24},"updated":"2018-03-02 12:30:14.000000000","message":"This needs to be a const, a const consistently chosen with the reg/xreg/xxreg that we choose.","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"b522e323a05e4a2405230ea19fde9d38a0377d1a","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        self.reg_offset \u003d register_offset"},{"line_number":553,"context_line":"        self.reg \u003d register"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    def get_reg_check(self, value, hex_mask\u003d0):"},{"line_number":556,"context_line":"        #NOTE(davidsha)"},{"line_number":557,"context_line":"        # The hex mask should be in integer form"},{"line_number":558,"context_line":"        # so it can be shifted then converted to hex."},{"line_number":559,"context_line":"        reg_string \u003d \"reg%i\u003d%s/\" % (self.reg, hex(value \u003c\u003c self.reg_offset))"},{"line_number":560,"context_line":"        hex_offset \u003d hex(hex_mask \u003c\u003c self.reg_offset) or \\"},{"line_number":561,"context_line":"            hex(self.reg_size \u003c\u003c self.reg_offset)"},{"line_number":562,"context_line":"        return reg_string + hex_offset"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"    def get_reg_load(self, value, start\u003dNone, end\u003dNone):"},{"line_number":565,"context_line":"        start_offset \u003d start + self.reg_offset if start and start \u003c \\"},{"line_number":566,"context_line":"            self.reg_size and start \u003e\u003d 0 else self.reg_offset"},{"line_number":567,"context_line":"        end_offset \u003d end + self.reg_offset if end and end \u003c\u003d self.reg_size \\"},{"line_number":568,"context_line":"            and end \u003e 0 and end + self.reg_offset \u003e start_offset else \\"},{"line_number":569,"context_line":"            self.reg_offset + self.reg_size"},{"line_number":570,"context_line":"        load_value \u003d hex(value)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        action \u003d \"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (load_value, self.reg,"},{"line_number":573,"context_line":"                  start_offset, end_offset)"},{"line_number":574,"context_line":"        return action"}],"source_content_type":"text/x-python","patch_set":30,"id":"1f9dbf25_7f470c4d","line":574,"range":{"start_line":555,"start_character":0,"end_line":574,"end_character":21},"updated":"2018-03-02 12:30:14.000000000","message":"this is all formated as ovs-ofctl match or actions, but the same values will need to be exposed to be easily reused in flow definition with the ryu/native openflow bridges -- this possibly can be done in a separate change","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            ext_manager.L2AgentExtensionsManager(self.conf))"},{"line_number":394,"context_line":"        self.agent_api \u003d ovs_ext_api.OVSAgentExtensionAPI(self.int_br,"},{"line_number":395,"context_line":"                                                          self.tun_br)"},{"line_number":396,"context_line":"        self.flow_manager.update()"},{"line_number":397,"context_line":"        self.ext_manager.initialize("},{"line_number":398,"context_line":"            connection, constants.EXTENSION_DRIVER_TYPE,"},{"line_number":399,"context_line":"            self.agent_api)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_9404357d","line":396,"range":{"start_line":396,"start_character":0,"end_line":396,"end_character":34},"updated":"2017-06-09 12:58:00.000000000","message":"I would think that doing the OpenFlowManager instanciation here would allow to do all the steps that currently are in OpenFlowManager.update in OpenFlowManager.__init__ .","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                                                     start_listening\u003dFalse)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def init_extension_manager(self, connection):"},{"line_number":385,"context_line":"        self.flow_manager \u003d ovs_flow_manager.OpenFlowManager(self.int_br,"},{"line_number":386,"context_line":"                                             constants.OVS_INT_TABLES,"},{"line_number":387,"context_line":"                                             constants.INT_BR_EGRESS_PRIORITY,"},{"line_number":388,"context_line":"                                             constants.INT_BR_INGRESS_PRIORITY)"},{"line_number":389,"context_line":"        ext_manager.register_opts(self.conf)"},{"line_number":390,"context_line":"        self.ext_manager \u003d ("},{"line_number":391,"context_line":"            ext_manager.L2AgentExtensionsManager(self.conf))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_26201148","line":388,"range":{"start_line":385,"start_character":6,"end_line":388,"end_character":79},"updated":"2017-08-29 15:32:28.000000000","message":"As discussed on IRC, why not do this call later, right before the update_flow_pipelines call ?","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                                                     start_listening\u003dFalse)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def init_extension_manager(self, connection):"},{"line_number":385,"context_line":"        self.flow_manager \u003d ovs_flow_manager.OpenFlowManager(self.int_br,"},{"line_number":386,"context_line":"                                             constants.OVS_INT_TABLES,"},{"line_number":387,"context_line":"                                             constants.INT_BR_EGRESS_PRIORITY,"},{"line_number":388,"context_line":"                                             constants.INT_BR_INGRESS_PRIORITY)"},{"line_number":389,"context_line":"        ext_manager.register_opts(self.conf)"},{"line_number":390,"context_line":"        self.ext_manager \u003d ("},{"line_number":391,"context_line":"            ext_manager.L2AgentExtensionsManager(self.conf))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_7a74219d","line":388,"range":{"start_line":385,"start_character":6,"end_line":388,"end_character":79},"in_reply_to":"7f287b81_26201148","updated":"2017-10-03 16:39:11.000000000","message":"Done","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":1541,"context_line":"                self._update_port_network(details[\u0027port_id\u0027],"},{"line_number":1542,"context_line":"                                          details[\u0027network_id\u0027])"},{"line_number":1543,"context_line":"                self.ext_manager.handle_port(self.context, details)"},{"line_number":1544,"context_line":"                self.flow_manager.update_port(details)"},{"line_number":1545,"context_line":"            else:"},{"line_number":1546,"context_line":"                LOG.warning("},{"line_number":1547,"context_line":"                    _LW(\"Device %s not defined on plugin or binding failed\"),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_cbea780d","line":1544,"range":{"start_line":1544,"start_character":16,"end_line":1544,"end_character":54},"updated":"2017-08-29 15:32:28.000000000","message":"Since ports are always plugged on br-int I think this call should be done directly on the OpenFlowBridge created for br-int, and that OpenFlowManager.update_port method is not needed.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"ec4ae9d0a9b23997a4ccc55f80900d516859181e","unresolved":false,"context_lines":[{"line_number":1541,"context_line":"                self._update_port_network(details[\u0027port_id\u0027],"},{"line_number":1542,"context_line":"                                          details[\u0027network_id\u0027])"},{"line_number":1543,"context_line":"                self.ext_manager.handle_port(self.context, details)"},{"line_number":1544,"context_line":"                self.flow_manager.update_port(details)"},{"line_number":1545,"context_line":"            else:"},{"line_number":1546,"context_line":"                LOG.warning("},{"line_number":1547,"context_line":"                    _LW(\"Device %s not defined on plugin or binding failed\"),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_da6435e8","line":1544,"range":{"start_line":1544,"start_character":16,"end_line":1544,"end_character":54},"in_reply_to":"7f287b81_cbea780d","updated":"2017-10-03 16:39:11.000000000","message":"This isn\u0027t about br-int creating and configuring ports, this is for the flow manager generating the flows for each instance\u0027s traffic to be diverted to the correct pipelines.\n\nIt needs to add these flows on neutron port updates and remove them on neutron port deletes.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"55b4d07af4d0781ca00ea56b2308661353b54b59","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"        failed_devices \u003d set(devices_down.get(\u0027failed_devices_down\u0027))"},{"line_number":1591,"context_line":"        LOG.debug(\"Port removal failed for %s\", failed_devices)"},{"line_number":1592,"context_line":"        for device in devices:"},{"line_number":1593,"context_line":"            self.flow_manager.delete_port(device)"},{"line_number":1594,"context_line":"            self.ext_manager.delete_port(self.context, {\u0027port_id\u0027: device})"},{"line_number":1595,"context_line":"            self.port_unbound(device)"},{"line_number":1596,"context_line":"        return failed_devices"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_6bf5c4ec","line":1593,"range":{"start_line":1593,"start_character":0,"end_line":1593,"end_character":49},"updated":"2017-08-29 15:32:28.000000000","message":"Same comment as above (L1544) but for delete_port method.","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_flow_manager.py":[{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Intel Corporation."},{"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":5,"id":"5a3905b3_742cec4a","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2017-01-19 22:59:40.000000000","message":"2017","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        self.assertEqual(extracted_tab, requested_tab)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def test_extract_mulitple_table_nums(self):"},{"line_number":247,"context_line":"        extracted_tab \u003d self.flow_manager._extract_table_nums("},{"line_number":248,"context_line":"                                         [self.test_inst_1,"},{"line_number":249,"context_line":"                                          self.test_inst_2])"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_41d9eb20","line":246,"range":{"start_line":246,"start_character":21,"end_line":246,"end_character":29},"updated":"2017-01-19 22:59:40.000000000","message":"multiple","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        self.assertEqual(all_tables, tables_left + len(tables))"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def test_assign_registers(self):"},{"line_number":388,"context_line":"        #Note Adding these tests later for when I have a better register"},{"line_number":389,"context_line":"        #Assignment method."},{"line_number":390,"context_line":"        pass"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def test_resolve_dependancies(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_e1dbb7eb","line":389,"range":{"start_line":388,"start_character":0,"end_line":389,"end_character":27},"updated":"2017-01-19 22:59:40.000000000","message":"TODO","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        #Assignment method."},{"line_number":390,"context_line":"        pass"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def test_resolve_dependancies(self):"},{"line_number":393,"context_line":"        functions \u003d [self.test_inst_1, self.test_inst_2]"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        self.flow_manager._sort_functions(functions)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_c1eddb8c","line":392,"range":{"start_line":392,"start_character":21,"end_line":392,"end_character":33},"updated":"2017-01-19 22:59:40.000000000","message":"dependencies","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        self.assertEqual(self.test_inst_2.needs_functions[0],"},{"line_number":401,"context_line":"                         self.test_inst_1)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def test_different_ext_resolve_dependancies(self):"},{"line_number":404,"context_line":"        functions \u003d [self.test_inst_1, self.test_inst_3]"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        self.flow_manager._sort_functions(functions)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_3c740634","line":403,"range":{"start_line":403,"start_character":35,"end_line":403,"end_character":47},"updated":"2017-01-19 22:59:40.000000000","message":"dependencies","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":736,"context_line":"                         self.register.reg_offset + end),"},{"line_number":737,"context_line":"                         result)"},{"line_number":738,"context_line":""},{"line_number":739,"context_line":"    def test_get_reg_load_negitive_end(self):"},{"line_number":740,"context_line":"        end \u003d -4"},{"line_number":741,"context_line":"        result \u003d self.register.get_reg_load(10, end\u003dend)"},{"line_number":742,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_5c88f222","line":739,"range":{"start_line":739,"start_character":26,"end_line":739,"end_character":34},"updated":"2017-01-19 22:59:40.000000000","message":"negative","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":9396,"name":"igordcard","email":"igordcard@gmail.com","username":"igordcard"},"change_message_id":"493789358f8a3038eb307e8e00fb69f9c400dbe5","unresolved":false,"context_lines":[{"line_number":747,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":748,"context_line":"                         result)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def test_get_reg_load_negitive_start(self):"},{"line_number":751,"context_line":"        start \u003d -4"},{"line_number":752,"context_line":"        result \u003d self.register.get_reg_load(10, start)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_bc87160e","line":750,"range":{"start_line":750,"start_character":26,"end_line":750,"end_character":34},"updated":"2017-01-19 22:59:40.000000000","message":"negative","commit_id":"a6e6caac72554138d8c8050052aa63225d1ce1ce"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"0fb7ab8f4b7e6aad8ec5f258e61f5f4c574676d7","unresolved":false,"context_lines":[{"line_number":698,"context_line":"                         self.register.reg_offset + end),"},{"line_number":699,"context_line":"                         result)"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"    def test_get_reg_load_negitive_end(self):"},{"line_number":702,"context_line":"        end \u003d -4"},{"line_number":703,"context_line":"        result \u003d self.register.get_reg_load(10, end\u003dend)"},{"line_number":704,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf091321_944af57d","line":701,"range":{"start_line":701,"start_character":26,"end_line":701,"end_character":34},"updated":"2017-06-09 12:58:00.000000000","message":"negative\n(also below)","commit_id":"e9df9cd2c2b7d019b1b3befbbdf33a1dce0e36a5"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                         self.register.reg_offset + end),"},{"line_number":689,"context_line":"                         result)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def test_get_reg_load_negitive_end(self):"},{"line_number":692,"context_line":"        end \u003d -4"},{"line_number":693,"context_line":"        result \u003d self.register.get_reg_load(10, end\u003dend)"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_84d76f24","line":691,"range":{"start_line":691,"start_character":26,"end_line":691,"end_character":34},"updated":"2017-08-22 16:04:15.000000000","message":"(typo)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                         self.register.reg_offset + end),"},{"line_number":689,"context_line":"                         result)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def test_get_reg_load_negitive_end(self):"},{"line_number":692,"context_line":"        end \u003d -4"},{"line_number":693,"context_line":"        result \u003d self.register.get_reg_load(10, end\u003dend)"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_46896873","line":691,"range":{"start_line":691,"start_character":26,"end_line":691,"end_character":34},"in_reply_to":"7f287b81_84d76f24","updated":"2017-08-23 16:36:44.000000000","message":"ack","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"064da39dde96135d062461bf3bb5a2e8f0fa6e0c","unresolved":false,"context_lines":[{"line_number":699,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":700,"context_line":"                         result)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"    def test_get_reg_load_negitive_start(self):"},{"line_number":703,"context_line":"        start \u003d -4"},{"line_number":704,"context_line":"        result \u003d self.register.get_reg_load(10, start)"},{"line_number":705,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_a4bb8be3","line":702,"range":{"start_line":702,"start_character":26,"end_line":702,"end_character":34},"updated":"2017-08-22 16:04:15.000000000","message":"(typo)","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"34b44a63791e444e54eced3f0767ee8fb72f5414","unresolved":false,"context_lines":[{"line_number":699,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":700,"context_line":"                         result)"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"    def test_get_reg_load_negitive_start(self):"},{"line_number":703,"context_line":"        start \u003d -4"},{"line_number":704,"context_line":"        result \u003d self.register.get_reg_load(10, start)"},{"line_number":705,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_267e5c6b","line":702,"range":{"start_line":702,"start_character":26,"end_line":702,"end_character":34},"in_reply_to":"7f287b81_a4bb8be3","updated":"2017-08-23 16:36:44.000000000","message":"ack","commit_id":"3c2380bff067d6b7e143235213304505ab0f533d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        def __init__(self):"},{"line_number":75,"context_line":"            \u0027\u0027\u0027init function 2"},{"line_number":76,"context_line":"            \u0027\u0027\u0027"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    class _test_function_3(ovs_flow_manager.OpenFlowFunction):"},{"line_number":79,"context_line":"        extension \u003d \"Different Extension\""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_c243ac6b","line":76,"updated":"2017-11-15 15:54:58.000000000","message":"sorry but why You need this __init__ method definition here and above in _Test_function_1?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        def __init__(self, name):"},{"line_number":103,"context_line":"            \u0027\u0027\u0027init function 3"},{"line_number":104,"context_line":"            \u0027\u0027\u0027"},{"line_number":105,"context_line":"            self.name \u003d name"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_a248b086","line":104,"updated":"2017-11-15 15:54:58.000000000","message":"do You need this comment really?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":446,"context_line":"        ]"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        self.assertNotEqual(init_pipeline, self.flow_manager._pipeline)"},{"line_number":449,"context_line":"        self.assertEqual(expected_pipeline, self.flow_manager._pipeline)"},{"line_number":450,"context_line":"        self._verify_mock_call(self.flow_manager.br.add_flow,"},{"line_number":451,"context_line":"                               mock_dummy_flow_pipeline)"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_82613408","line":449,"updated":"2017-11-15 15:54:58.000000000","message":"isn\u0027t this one assertion enough?","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        self.assertEqual(\"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (value,"},{"line_number":761,"context_line":"                         self.register.reg, self.register.reg_offset,"},{"line_number":762,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":763,"context_line":"                         result)"},{"line_number":764,"context_line":""},{"line_number":765,"context_line":"    def test_get_reg_load_negative_start(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_625e3845","line":762,"updated":"2017-11-15 15:54:58.000000000","message":"IMHO it would be more readable if You could move this expected string to separate variable","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":770,"context_line":""},{"line_number":771,"context_line":"        self.assertEqual(\"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (value,"},{"line_number":772,"context_line":"                         self.register.reg, self.register.reg_offset,"},{"line_number":773,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":774,"context_line":"                         result)"},{"line_number":775,"context_line":""},{"line_number":776,"context_line":"    def test_get_reg_load_end_less_than_start(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_4257bc27","line":773,"updated":"2017-11-15 15:54:58.000000000","message":"ditto","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"20fb36af75323ca759e7a3f5dbcb9699976b7747","unresolved":false,"context_lines":[{"line_number":782,"context_line":""},{"line_number":783,"context_line":"        self.assertEqual(\"load:%s-\u003eNXM_NX_REG%i[%i..%i]\" % (value,"},{"line_number":784,"context_line":"                         self.register.reg, self.register.reg_offset + start,"},{"line_number":785,"context_line":"                         self.register.reg_offset + self.register.reg_size),"},{"line_number":786,"context_line":"                         result)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_2254c020","line":785,"updated":"2017-11-15 15:54:58.000000000","message":"ditto","commit_id":"06c227241a569d05c426ebf72ead98f29418fdbf"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"027beb11081e282c6401c355e1193f5f1ee6d0cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 Intel Corporation."},{"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":30,"id":"1f9dbf25_cabd6469","line":1,"range":{"start_line":1,"start_character":11,"end_line":1,"end_character":16},"updated":"2018-02-28 16:43:40.000000000","message":"ditto","commit_id":"d0b9329eaf2f20df89acca3eba5b657b1e1e94e1"}]}
