)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: External ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing identifying SR-IOV ports as external and adding them to the"},{"line_number":10,"context_line":"default HA Chassis Group."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Also we need a new release of ovsdbapp with the Depends-On patch"},{"line_number":13,"context_line":"included."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_9e49c3b8","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":25},"updated":"2019-08-27 15:23:18.000000000","message":"Maybe we should reference a LP RFE bug for the SR-IOV functionality? It may help identifying the patches later as at some point we\u0027ll need to write code for both baremetal provisioning and baremetal to tenant use cases. Just thinking out loud...","commit_id":"899e1fe950322f978dab1023e9a7762739506f59"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need proper tests and a new release of ovsdbapp with the Depends-On patch"},{"line_number":10,"context_line":"included."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: https://review.opendev.org/#/c/677779"},{"line_number":13,"context_line":"Change-Id: Ib5de01a6339da923c610e0dadee8fbdd10ffd59c"},{"line_number":14,"context_line":"Signed-off-by: Lucas Alvares Gomes \u003clucasagomes@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_3aaf5e2c","line":11,"updated":"2019-08-27 15:23:18.000000000","message":"External ports here are just being worked in the context of \u0027SR-IOV\u0027 RFE as it\u0027s leaving apart another cases like ironic ports (am I right?). Commit message and a release note should explain it clearly I guess","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fe5fab1cb2879d099b3c085d562f8460155a8fc0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need proper tests and a new release of ovsdbapp with the Depends-On patch"},{"line_number":10,"context_line":"included."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Depends-On: https://review.opendev.org/#/c/677779"},{"line_number":13,"context_line":"Change-Id: Ib5de01a6339da923c610e0dadee8fbdd10ffd59c"},{"line_number":14,"context_line":"Signed-off-by: Lucas Alvares Gomes \u003clucasagomes@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_fc3303f6","line":11,"in_reply_to":"7faddb67_3aaf5e2c","updated":"2019-08-27 15:32:36.000000000","message":"++ yes, that\u0027s correct","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4956f18c416306d88d514ae09977f1cc896d76f3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"wasn\u0027t able to reply to things such as DHCP requests packets since the OVS"},{"line_number":14,"context_line":"port was skipped. Core OVN then introduced the concept of \"external\" ports"},{"line_number":15,"context_line":"which are ports deployed on a different node than the one that the VM"},{"line_number":16,"context_line":"is running and is able to reply to such requests on behalf of the that VM."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"With this patch, when a port with the VNIC type \"direct\" is created,"},{"line_number":19,"context_line":"networking-ovn will then create a logical port with the type \"external\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa7e38b_0da76baa","line":16,"range":{"start_line":16,"start_character":66,"end_line":16,"end_character":70},"updated":"2019-11-20 10:13:26.000000000","message":"remove :)","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a927b44c03ad8a99f77d0b5ea68b805a262c4632","unresolved":false,"context_lines":[{"line_number":13,"context_line":"wasn\u0027t able to reply to things such as DHCP requests packets since the OVS"},{"line_number":14,"context_line":"port was skipped. Core OVN then introduced the concept of \"external\" ports"},{"line_number":15,"context_line":"which are ports deployed on a different node than the one that the VM"},{"line_number":16,"context_line":"is running and is able to reply to such requests on behalf of the that VM."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"With this patch, when a port with the VNIC type \"direct\" is created,"},{"line_number":19,"context_line":"networking-ovn will then create a logical port with the type \"external\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa7e38b_7037d2e4","line":16,"range":{"start_line":16,"start_character":66,"end_line":16,"end_character":70},"in_reply_to":"3fa7e38b_0da76baa","updated":"2019-11-20 10:26:08.000000000","message":"Done","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"}],"networking_ovn/common/maintenance.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4956f18c416306d88d514ae09977f1cc896d76f3","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        # NOTE(lucasagomes): Find the existing chassis with the highest"},{"line_number":471,"context_line":"        # priority and keep it as being the highest to avoid moving"},{"line_number":472,"context_line":"        # things around"},{"line_number":473,"context_line":"        high_prio_ch \u003d None"},{"line_number":474,"context_line":"        for ch in default_ch_grp.ha_chassis:"},{"line_number":475,"context_line":"            if not high_prio_ch or ch.priority \u003e high_prio_ch.priority:"},{"line_number":476,"context_line":"                high_prio_ch \u003d ch"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        all_ch \u003d self._sb_idl.get_all_chassis()"},{"line_number":479,"context_line":"        gw_ch \u003d self._sb_idl.get_gateway_chassis_from_cms_options()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_edc1afe5","line":476,"range":{"start_line":473,"start_character":0,"end_line":476,"end_character":33},"updated":"2019-11-20 10:13:26.000000000","message":"could be written idiomatic:\n\n high_prio_ch \u003d max(default_ch_grp.ha_chassis, default\u003dNone, key\u003dlambda x: x.priority)","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a927b44c03ad8a99f77d0b5ea68b805a262c4632","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        # NOTE(lucasagomes): Find the existing chassis with the highest"},{"line_number":471,"context_line":"        # priority and keep it as being the highest to avoid moving"},{"line_number":472,"context_line":"        # things around"},{"line_number":473,"context_line":"        high_prio_ch \u003d None"},{"line_number":474,"context_line":"        for ch in default_ch_grp.ha_chassis:"},{"line_number":475,"context_line":"            if not high_prio_ch or ch.priority \u003e high_prio_ch.priority:"},{"line_number":476,"context_line":"                high_prio_ch \u003d ch"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        all_ch \u003d self._sb_idl.get_all_chassis()"},{"line_number":479,"context_line":"        gw_ch \u003d self._sb_idl.get_gateway_chassis_from_cms_options()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_90512e10","line":476,"range":{"start_line":473,"start_character":0,"end_line":476,"end_character":33},"in_reply_to":"3fa7e38b_edc1afe5","updated":"2019-11-20 10:26:08.000000000","message":"Nice! Looks good","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"}],"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            if self.is_external_ports_supported():"},{"line_number":248,"context_line":"                vnic_type, capabilities \u003d ("},{"line_number":249,"context_line":"                    utils.get_port_vnic_type_and_capabilities(port))"},{"line_number":250,"context_line":"                if (vnic_type \u003d\u003d portbindings.VNIC_DIRECT and"},{"line_number":251,"context_line":"                   \u0027switchdev\u0027 not in capabilities):"},{"line_number":252,"context_line":"                    port_type \u003d ovn_const.LSP_TYPE_EXTERNAL"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_9add3243","line":251,"range":{"start_line":250,"start_character":0,"end_line":251,"end_character":52},"updated":"2019-08-27 15:23:18.000000000","message":"What if it\u0027s in legacy mode? I made a similar comment in :\nhttps://review.opendev.org/#/c/678261/2/networking_ovn/ml2/mech_driver.py@664","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"119447f4be2a9fcdb115fce7f1882c5b72d642fb","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            if (self.is_external_ports_supported() and"},{"line_number":471,"context_line":"               port_info.type \u003d\u003d ovn_const.LSP_TYPE_EXTERNAL):"},{"line_number":472,"context_line":"                columns_dict[\u0027ha_chassis_group\u0027] \u003d ("},{"line_number":473,"context_line":"                    self._get_default_ha_chassis_group())"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"            # NOTE(lizk): Fail port updating if port doesn\u0027t exist. This"},{"line_number":476,"context_line":"            # prevents any new inserted resources to be orphan, such as port"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_5ad33ad4","line":473,"updated":"2019-08-27 15:15:11.000000000","message":"We should unset the ha_chassis_group here if the vnic type changes.","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a7a0a0f50514cad7245a3fde4db9b3b98e645a88","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                txn.add(cmd)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def is_external_ports_supported(self):"},{"line_number":96,"context_line":"        return self._nb_idl.is_table_present(\u0027HA_Chassis_Group\u0027)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _get_allowed_addresses_from_port(self, port):"},{"line_number":99,"context_line":"        if not port.get(psec.PORTSECURITY):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_927bbd27","line":96,"updated":"2019-08-28 20:30:55.000000000","message":"Should we make this a property so we can cache it like above?\n\nif self._is_external_ports_supported is None:\n    self._is_external_ports_supported \u003d self._nb_idl.is_table...\nreturn self._is_external_ports_supported\n\nJust not sure of what the overhead is of checking for the table, or if it will ever change once we\u0027re running.\n\nActually, nevermind, it\u0027s like is_port_groups_supported(), so don\u0027t think there\u0027s any overhead.","commit_id":"b03cbc36e4d2749bd3339f6c81add631374eb178"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a7a0a0f50514cad7245a3fde4db9b3b98e645a88","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            vnic_type \u003d port.get(portbindings.VNIC_TYPE,"},{"line_number":248,"context_line":"                                 portbindings.VNIC_NORMAL)"},{"line_number":249,"context_line":"            if (self.is_external_ports_supported() and"},{"line_number":250,"context_line":"               vnic_type \u003d\u003d portbindings.VNIC_DIRECT):"},{"line_number":251,"context_line":"                port_type \u003d ovn_const.LSP_TYPE_EXTERNAL"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_f228f133","line":250,"updated":"2019-08-28 20:30:55.000000000","message":"super nit: should be indented 8 spaces","commit_id":"b03cbc36e4d2749bd3339f6c81add631374eb178"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"846228eab3c8058333b497031735b581e24eb3d9","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            vnic_type \u003d port.get(portbindings.VNIC_TYPE,"},{"line_number":248,"context_line":"                                 portbindings.VNIC_NORMAL)"},{"line_number":249,"context_line":"            if (self.is_external_ports_supported() and"},{"line_number":250,"context_line":"               vnic_type \u003d\u003d portbindings.VNIC_DIRECT):"},{"line_number":251,"context_line":"                port_type \u003d ovn_const.LSP_TYPE_EXTERNAL"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        dhcpv4_options \u003d self._get_port_dhcp_options(port, const.IP_VERSION_4)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_33298f9b","line":250,"in_reply_to":"7faddb67_f228f133","updated":"2019-08-30 11:02:57.000000000","message":"Thanks I will apply it to the next patch-set!","commit_id":"b03cbc36e4d2749bd3339f6c81add631374eb178"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a7a0a0f50514cad7245a3fde4db9b3b98e645a88","unresolved":false,"context_lines":[{"line_number":337,"context_line":"            }"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            if (self.is_external_ports_supported() and"},{"line_number":340,"context_line":"               port_info.type \u003d\u003d ovn_const.LSP_TYPE_EXTERNAL):"},{"line_number":341,"context_line":"                kwargs[\u0027ha_chassis_group\u0027] \u003d ("},{"line_number":342,"context_line":"                    self._get_default_ha_chassis_group())"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_721401ea","line":340,"updated":"2019-08-28 20:30:55.000000000","message":"same super-nit","commit_id":"b03cbc36e4d2749bd3339f6c81add631374eb178"}],"networking_ovn/common/utils.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"def is_gateway_chassis(chassis):"},{"line_number":421,"context_line":"    \"\"\"Check if the given chassis is a gateway chassis\"\"\""},{"line_number":422,"context_line":"    external_ids \u003d getattr(chassis, \u0027external_ids\u0027, {})"},{"line_number":423,"context_line":"    return (\u0027enable-chassis-as-gw\u0027 in external_ids.get("},{"line_number":424,"context_line":"        \u0027ovn-cms-options\u0027, \u0027\u0027).split(\u0027,\u0027))"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"def get_port_vnic_type_and_capabilities(neutron_port):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_dab88ac8","line":424,"range":{"start_line":421,"start_character":0,"end_line":424,"end_character":41},"updated":"2019-08-27 15:23:18.000000000","message":"The current logic that we have is to check first for ovn-cms-options but there could be a chance that this is not set and then the criteria will be to schedule gw ports on all the chassises with bridge mappings.\n\nPerhaps we can just assume that this option is always set on gw chassis. In that case, we might want to change this:\n\nhttps://github.com/openstack/networking-ovn/blob/e07d4316c9a2c9912d47b8e36e2d81807f8dabe3/networking_ovn/common/ovn_client.py#L1114","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fe5fab1cb2879d099b3c085d562f8460155a8fc0","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"def is_gateway_chassis(chassis):"},{"line_number":421,"context_line":"    \"\"\"Check if the given chassis is a gateway chassis\"\"\""},{"line_number":422,"context_line":"    external_ids \u003d getattr(chassis, \u0027external_ids\u0027, {})"},{"line_number":423,"context_line":"    return (\u0027enable-chassis-as-gw\u0027 in external_ids.get("},{"line_number":424,"context_line":"        \u0027ovn-cms-options\u0027, \u0027\u0027).split(\u0027,\u0027))"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"def get_port_vnic_type_and_capabilities(neutron_port):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_3c5afbf1","line":424,"range":{"start_line":421,"start_character":0,"end_line":424,"end_character":41},"in_reply_to":"7faddb67_dab88ac8","updated":"2019-08-27 15:32:36.000000000","message":"Ah good point! Makes sense, I will change it","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"d56b0eb453a0f56e21fcdd1090dfd68ac5bc568d","unresolved":false,"context_lines":[{"line_number":447,"context_line":"    return AddrPairsDiff(added, removed, changed\u003dany(added or removed))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"def is_gateway_chassis(chassis):"},{"line_number":451,"context_line":"    \"\"\"Check if the given chassis is a gateway chassis\"\"\""},{"line_number":452,"context_line":"    external_ids \u003d getattr(chassis, \u0027external_ids\u0027, {})"},{"line_number":453,"context_line":"    return (\u0027enable-chassis-as-gw\u0027 in external_ids.get("}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_9d2242a3","line":450,"range":{"start_line":450,"start_character":4,"end_line":450,"end_character":22},"updated":"2019-11-27 13:40:07.000000000","message":"It is not true? Gateway chassis could be a chassis even without this external_id set. If there is no chassis with `enable-chassis-as-gw` then chassis that are configured with proper bridge mappings are the gateways right?","commit_id":"f657ba6196b7e34eef4113d4981f6107cdfe97d9"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"04f7745a7213fcefc4716fc02a5d60b678e2986e","unresolved":false,"context_lines":[{"line_number":447,"context_line":"    return AddrPairsDiff(added, removed, changed\u003dany(added or removed))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"def is_gateway_chassis(chassis):"},{"line_number":451,"context_line":"    \"\"\"Check if the given chassis is a gateway chassis\"\"\""},{"line_number":452,"context_line":"    external_ids \u003d getattr(chassis, \u0027external_ids\u0027, {})"},{"line_number":453,"context_line":"    return (\u0027enable-chassis-as-gw\u0027 in external_ids.get("}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_bd47fe7a","line":450,"range":{"start_line":450,"start_character":4,"end_line":450,"end_character":22},"in_reply_to":"3fa7e38b_7d3c2692","updated":"2019-11-27 14:26:05.000000000","message":"+1 thanks for clarification, lets clean it after.","commit_id":"f657ba6196b7e34eef4113d4981f6107cdfe97d9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"55796a4ac1126cbd023e98ab1994b426c79038b9","unresolved":false,"context_lines":[{"line_number":447,"context_line":"    return AddrPairsDiff(added, removed, changed\u003dany(added or removed))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"def is_gateway_chassis(chassis):"},{"line_number":451,"context_line":"    \"\"\"Check if the given chassis is a gateway chassis\"\"\""},{"line_number":452,"context_line":"    external_ids \u003d getattr(chassis, \u0027external_ids\u0027, {})"},{"line_number":453,"context_line":"    return (\u0027enable-chassis-as-gw\u0027 in external_ids.get("}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_7d3c2692","line":450,"range":{"start_line":450,"start_character":4,"end_line":450,"end_character":22},"in_reply_to":"3fa7e38b_9d2242a3","updated":"2019-11-27 13:52:57.000000000","message":"True, long ago we didn\u0027t have have this \"enable-chassis-as-gw\" flag set so we had to look at bridge-mappings, but, nowadays we always set it and that\u0027s why I ignored the bridge-mappings (to avoid having 2 ways to do the same thing from now on). I left a TODO at https://review.opendev.org/#/c/678261/15/networking_ovn/common/ovn_client.py@1235\n\nLet me know if u agree, otherwise I can change this to include the bridge mappings as well (","commit_id":"f657ba6196b7e34eef4113d4981f6107cdfe97d9"}],"networking_ovn/ml2/mech_driver.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                      {\u0027port_id\u0027: port[\u0027id\u0027], \u0027vnic_type\u0027: vnic_type})"},{"line_number":662,"context_line":"            return"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        # TODO(lucasagomes): Check in an SRIOV setup whether we should"},{"line_number":665,"context_line":"        # continue to refuse to bind the external port here or if we can"},{"line_number":666,"context_line":"        # remove the conditional below"},{"line_number":667,"context_line":"        if (vnic_type \u003d\u003d portbindings.VNIC_DIRECT and"},{"line_number":668,"context_line":"           \u0027switchdev\u0027 not in capabilities):"},{"line_number":669,"context_line":"            LOG.debug(\"Refusing to bind port due to unsupported vnic_type: %s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ba2b4e31","line":666,"range":{"start_line":664,"start_character":0,"end_line":666,"end_character":38},"updated":"2019-08-27 15:23:18.000000000","message":"I\u0027m not an SR-IOV expert but I believe we can have an SRIOV port in legacy mode. If I\u0027m not mistaken \u0027switchdev\u0027 would be just for OVS HW offload [0] and it seems to me that unless we test it properly we want to keep the conditional in L667. Would be good to check with Rodolfo.\n\n[0] https://github.com/openstack/neutron/blob/134f1c5553c803a89f3a5de5ef118893fe2759ac/doc/source/admin/config-ovs-offload.rst#configure-open-vswitch-hardware-offloading","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fe5fab1cb2879d099b3c085d562f8460155a8fc0","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                      {\u0027port_id\u0027: port[\u0027id\u0027], \u0027vnic_type\u0027: vnic_type})"},{"line_number":662,"context_line":"            return"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        # TODO(lucasagomes): Check in an SRIOV setup whether we should"},{"line_number":665,"context_line":"        # continue to refuse to bind the external port here or if we can"},{"line_number":666,"context_line":"        # remove the conditional below"},{"line_number":667,"context_line":"        if (vnic_type \u003d\u003d portbindings.VNIC_DIRECT and"},{"line_number":668,"context_line":"           \u0027switchdev\u0027 not in capabilities):"},{"line_number":669,"context_line":"            LOG.debug(\"Refusing to bind port due to unsupported vnic_type: %s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_9c476f4d","line":666,"range":{"start_line":664,"start_character":0,"end_line":666,"end_character":38},"in_reply_to":"7faddb67_ba2b4e31","updated":"2019-08-27 15:32:36.000000000","message":"Thanks for the tips, yeah I\u0027m not an expert either that\u0027s why I left this TODO in place.\n\nI will follow up with Rodolfo on this.","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"8f2b19a049c3e7e9c8caa031cbec3840bfa7a7bf","unresolved":false,"context_lines":[{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        capabilities \u003d utils.get_port_capabilities(port)"},{"line_number":665,"context_line":"        if (vnic_type \u003d\u003d portbindings.VNIC_DIRECT and"},{"line_number":666,"context_line":"           ovn_const.PORT_CAP_SWITCHDEV not in capabilities):"},{"line_number":667,"context_line":"            LOG.debug(\"Refusing to bind port due to unsupported vnic_type: %s \""},{"line_number":668,"context_line":"                      \"with no switchdev capability\", portbindings.VNIC_DIRECT)"},{"line_number":669,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_b6ef4985","line":666,"updated":"2019-11-25 09:16:40.000000000","message":"indentation here?","commit_id":"f657ba6196b7e34eef4113d4981f6107cdfe97d9"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a772538a653cf3912be824276169482d8fc151a9","unresolved":false,"context_lines":[{"line_number":663,"context_line":""},{"line_number":664,"context_line":"        capabilities \u003d utils.get_port_capabilities(port)"},{"line_number":665,"context_line":"        if (vnic_type \u003d\u003d portbindings.VNIC_DIRECT and"},{"line_number":666,"context_line":"           ovn_const.PORT_CAP_SWITCHDEV not in capabilities):"},{"line_number":667,"context_line":"            LOG.debug(\"Refusing to bind port due to unsupported vnic_type: %s \""},{"line_number":668,"context_line":"                      \"with no switchdev capability\", portbindings.VNIC_DIRECT)"},{"line_number":669,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_aa31f90c","line":666,"in_reply_to":"3fa7e38b_b6ef4985","updated":"2019-11-27 10:25:25.000000000","message":"It\u0027s actually fine, at least pep8/pylint is not complaining about it","commit_id":"f657ba6196b7e34eef4113d4981f6107cdfe97d9"}],"networking_ovn/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ba88f981cf127f154d9425fd4d6cab68035a41d0","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.driver.delete_mac_binding_entries(row.external_ip)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class HAChassisGroupEvent(row_event.RowEvent):"},{"line_number":274,"context_line":"    \"\"\"Chassis create update delete event.\"\"\""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def __init__(self, driver):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_fa730615","line":273,"range":{"start_line":273,"start_character":6,"end_line":273,"end_character":25},"updated":"2019-08-27 15:23:18.000000000","message":"Actually this is monitoring Chassis events to update an HaChassisGroup that we\u0027ll use for external ports.  Can\u0027t we reuse the one in L115 and handle external ports there? ie. move most of the code in this class to a method and call it from the aforementioned event?","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fe5fab1cb2879d099b3c085d562f8460155a8fc0","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.driver.delete_mac_binding_entries(row.external_ip)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"class HAChassisGroupEvent(row_event.RowEvent):"},{"line_number":274,"context_line":"    \"\"\"Chassis create update delete event.\"\"\""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def __init__(self, driver):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_1cc93fab","line":273,"range":{"start_line":273,"start_character":6,"end_line":273,"end_character":25},"in_reply_to":"7faddb67_fa730615","updated":"2019-08-27 15:32:36.000000000","message":"I think it\u0027s possible, I will give it a go and look how the code will turn out. Cause the advantage of having it separated is that it looks more tidy.\n\nThe disadvantage is that we generate two events for the same changes.\n\nI wondered a bit about it when I was coding and I was thinking that since this is just adding/updating/removing entries from the chassis table it should be fine because its not going to be updated very often.","commit_id":"822464287c05130493bb3928df13572a89422488"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4956f18c416306d88d514ae09977f1cc896d76f3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":159,"context_line":"            for ch in default_group.ha_chassis:"},{"line_number":160,"context_line":"                if min_priority \u003e ch.priority:"},{"line_number":161,"context_line":"                    min_priority \u003d ch.priority"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_4d87a3b7","line":161,"range":{"start_line":159,"start_character":12,"end_line":161,"end_character":46},"updated":"2019-11-20 10:13:26.000000000","message":"Could be written idiomatic:\n\n min_priority \u003d min([ch.priority for ch in default_group.ha_chassis])","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a927b44c03ad8a99f77d0b5ea68b805a262c4632","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":159,"context_line":"            for ch in default_group.ha_chassis:"},{"line_number":160,"context_line":"                if min_priority \u003e ch.priority:"},{"line_number":161,"context_line":"                    min_priority \u003d ch.priority"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_503f36b4","line":161,"range":{"start_line":159,"start_character":12,"end_line":161,"end_character":46},"in_reply_to":"3fa7e38b_4d87a3b7","updated":"2019-11-20 10:26:08.000000000","message":"Done","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"dd04956a3b181e0de64512a2cf7e1171ed0a3e64","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":159,"context_line":"            for ch in default_group.ha_chassis:"},{"line_number":160,"context_line":"                if min_priority \u003e ch.priority:"},{"line_number":161,"context_line":"                    min_priority \u003d ch.priority"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_b0cb0aa2","line":161,"range":{"start_line":159,"start_character":12,"end_line":161,"end_character":46},"in_reply_to":"3fa7e38b_503f36b4","updated":"2019-11-20 10:34:51.000000000","message":"Just a note here, in case HA_Chassis not yet populated the min([]) will return a ValueError. I need to account for that too.","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0f41095d7973c0ec574ba02fe57c446daf9b7d10","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":159,"context_line":"            for ch in default_group.ha_chassis:"},{"line_number":160,"context_line":"                if min_priority \u003e ch.priority:"},{"line_number":161,"context_line":"                    min_priority \u003d ch.priority"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_90228e53","line":161,"range":{"start_line":159,"start_character":12,"end_line":161,"end_character":46},"in_reply_to":"3fa7e38b_b0cb0aa2","updated":"2019-11-20 10:42:34.000000000","message":"You can do\n\n min(..., default\u003dovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY)","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4956f18c416306d88d514ae09977f1cc896d76f3","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"},{"line_number":165,"context_line":"                priority\u003dmin_priority - 1).execute(check_error\u003dTrue)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        elif event \u003d\u003d self.ROW_DELETE:"},{"line_number":168,"context_line":"            self.driver._nb_ovn.ha_chassis_group_del_chassis("}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_4d7563cb","line":165,"range":{"start_line":165,"start_character":25,"end_line":165,"end_character":41},"updated":"2019-11-20 10:13:26.000000000","message":"Can the priority be negative? e.g. if min_priority is 0, we would pass -1 here","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a927b44c03ad8a99f77d0b5ea68b805a262c4632","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":164,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"},{"line_number":165,"context_line":"                priority\u003dmin_priority - 1).execute(check_error\u003dTrue)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        elif event \u003d\u003d self.ROW_DELETE:"},{"line_number":168,"context_line":"            self.driver._nb_ovn.ha_chassis_group_del_chassis("}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_906a8eb2","line":165,"range":{"start_line":165,"start_character":25,"end_line":165,"end_character":41},"in_reply_to":"3fa7e38b_4d7563cb","updated":"2019-11-20 10:26:08.000000000","message":"Good point, I need to investigate. Since it\u0027s an integer I *believe* we could have it negative but it would be strange since we are starting priorities at 32767","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8179a9f4ce8d692a6a8a905d8cf52859c7468d34","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            try:"},{"line_number":159,"context_line":"                min_priority \u003d min([ch.priority for ch in"},{"line_number":160,"context_line":"                                    default_group.ha_chassis])"},{"line_number":161,"context_line":"            except ValueError:"},{"line_number":162,"context_line":"                min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":165,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_f0a422bb","line":162,"range":{"start_line":158,"start_character":0,"end_line":162,"end_character":74},"updated":"2019-11-20 10:48:29.000000000","message":"Oh, I was too slow, sorry :(\n\nI left a comment in the previous PS, you can do:\n\n min_priority \u003d min([ch.priority for ch in default_group.ha_chassis],\n                    default\u003dovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY)","commit_id":"3b8b627a3b04393950b533876a5f828bfeb63588"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0de4e1ff85295d81abac1f38179114f72eb4d874","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # Find what\u0027s the lowest priority number current in the group"},{"line_number":157,"context_line":"            # and add the new chassis as the new lowest"},{"line_number":158,"context_line":"            try:"},{"line_number":159,"context_line":"                min_priority \u003d min([ch.priority for ch in"},{"line_number":160,"context_line":"                                    default_group.ha_chassis])"},{"line_number":161,"context_line":"            except ValueError:"},{"line_number":162,"context_line":"                min_priority \u003d ovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            self.driver._nb_ovn.ha_chassis_group_add_chassis("},{"line_number":165,"context_line":"                ovn_const.HA_CHASSIS_GROUP_DEFAULT_NAME, row.name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_d077a607","line":162,"range":{"start_line":158,"start_character":0,"end_line":162,"end_character":74},"in_reply_to":"3fa7e38b_f0a422bb","updated":"2019-11-21 10:35:27.000000000","message":"hah no worries! Lemme fix it!","commit_id":"3b8b627a3b04393950b533876a5f828bfeb63588"}],"networking_ovn/tests/functional/test_ovn_db_sync.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4956f18c416306d88d514ae09977f1cc896d76f3","unresolved":false,"context_lines":[{"line_number":911,"context_line":"                db_metadata_ports_ids.add(port[\u0027id\u0027])"},{"line_number":912,"context_line":"                db_metadata_ports_nets.add(port[\u0027network_id\u0027])"},{"line_number":913,"context_line":"        db_networks \u003d self._list(\u0027networks\u0027)"},{"line_number":914,"context_line":"        db_net_ids \u003d set([net[\u0027id\u0027] for net in db_networks[\u0027networks\u0027]])"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"        # Retrieve all localports in OVN"},{"line_number":917,"context_line":"        _plugin_nb_ovn \u003d self.mech_driver._nb_ovn"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_2d7827bf","line":914,"range":{"start_line":914,"start_character":21,"end_line":914,"end_character":72},"updated":"2019-11-20 10:13:26.000000000","message":"You can do:\n\n {net[\u0027id\u0027] for net in db_networks[\u0027networks\u0027}","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a927b44c03ad8a99f77d0b5ea68b805a262c4632","unresolved":false,"context_lines":[{"line_number":911,"context_line":"                db_metadata_ports_ids.add(port[\u0027id\u0027])"},{"line_number":912,"context_line":"                db_metadata_ports_nets.add(port[\u0027network_id\u0027])"},{"line_number":913,"context_line":"        db_networks \u003d self._list(\u0027networks\u0027)"},{"line_number":914,"context_line":"        db_net_ids \u003d set([net[\u0027id\u0027] for net in db_networks[\u0027networks\u0027]])"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"        # Retrieve all localports in OVN"},{"line_number":917,"context_line":"        _plugin_nb_ovn \u003d self.mech_driver._nb_ovn"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_506896b8","line":914,"range":{"start_line":914,"start_character":21,"end_line":914,"end_character":72},"in_reply_to":"3fa7e38b_2d7827bf","updated":"2019-11-20 10:26:08.000000000","message":"++","commit_id":"f179033c613088045c5c6e1719b8a8b9fcd1d107"}]}
