)]}'
{"neutron/common/ovn/utils.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":60,"context_line":"    # is a UUID. If so then there will be no matches."},{"line_number":61,"context_line":"    # We prefix the UUID to enable us to use the Neutron UUID when"},{"line_number":62,"context_line":"    # updating, deleting etc."},{"line_number":63,"context_line":"    return constants.OVN_NAME_PREFIX + \u0027%s\u0027 % id"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def ovn_lrouter_port_name(id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"88ac6e57_3071169a","line":63,"range":{"start_line":63,"start_character":11,"end_line":63,"end_character":48},"updated":"2021-07-16 10:39:58.000000000","message":"nit:\n\n \"%s%s\" % (constants.OVN_NAME_PREFIX, id)","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    # is a UUID. If so then there will be no matches."},{"line_number":61,"context_line":"    # We prefix the UUID to enable us to use the Neutron UUID when"},{"line_number":62,"context_line":"    # updating, deleting etc."},{"line_number":63,"context_line":"    return constants.OVN_NAME_PREFIX + \u0027%s\u0027 % id"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def ovn_lrouter_port_name(id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"283a96a9_cc34374a","line":63,"range":{"start_line":63,"start_character":11,"end_line":63,"end_character":48},"in_reply_to":"88ac6e57_3071169a","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"def get_chassis_in_azs(chassis_list, az_list):"},{"line_number":539,"context_line":"    \"\"\"Returns a list of Chassis that belongs to the AZs."},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    Given a list of Chassis and a list of availability zones (AZs),"},{"line_number":542,"context_line":"    return a list of Chassis that belongs to one or more AZs."}],"source_content_type":"text/x-python","patch_set":10,"id":"dd530dc6_438db704","line":539,"range":{"start_line":539,"start_character":17,"end_line":539,"end_character":21},"updated":"2021-07-16 10:39:58.000000000","message":"It returns a set not a list","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"def get_chassis_in_azs(chassis_list, az_list):"},{"line_number":539,"context_line":"    \"\"\"Returns a list of Chassis that belongs to the AZs."},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    Given a list of Chassis and a list of availability zones (AZs),"},{"line_number":542,"context_line":"    return a list of Chassis that belongs to one or more AZs."}],"source_content_type":"text/x-python","patch_set":10,"id":"47eed253_973e3705","line":539,"range":{"start_line":539,"start_character":7,"end_line":539,"end_character":14},"updated":"2021-07-16 10:39:58.000000000","message":"nit: Should be imperative: \"Return\" or maybe \"Get\"","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"def get_chassis_in_azs(chassis_list, az_list):"},{"line_number":539,"context_line":"    \"\"\"Returns a list of Chassis that belongs to the AZs."},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    Given a list of Chassis and a list of availability zones (AZs),"},{"line_number":542,"context_line":"    return a list of Chassis that belongs to one or more AZs."}],"source_content_type":"text/x-python","patch_set":10,"id":"892e68bc_873a187a","line":539,"range":{"start_line":539,"start_character":7,"end_line":539,"end_character":14},"in_reply_to":"47eed253_973e3705","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"def get_chassis_in_azs(chassis_list, az_list):"},{"line_number":539,"context_line":"    \"\"\"Returns a list of Chassis that belongs to the AZs."},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    Given a list of Chassis and a list of availability zones (AZs),"},{"line_number":542,"context_line":"    return a list of Chassis that belongs to one or more AZs."}],"source_content_type":"text/x-python","patch_set":10,"id":"a2883258_c99fcd48","line":539,"range":{"start_line":539,"start_character":17,"end_line":539,"end_character":21},"in_reply_to":"dd530dc6_438db704","updated":"2021-07-16 11:08:49.000000000","message":"Ops, indeed","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":545,"context_line":"    :param az_list: A list of availability zones"},{"line_number":546,"context_line":"    :returns: A set of Chassis names"},{"line_number":547,"context_line":"    \"\"\""},{"line_number":548,"context_line":"    return {ch.name for ch in chassis_list"},{"line_number":549,"context_line":"            for az in az_list"},{"line_number":550,"context_line":"            if az in get_chassis_availability_zones(ch)}"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"def get_gateway_chassis_without_azs(chassis_list):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a1ee934_97b1ed6c","line":550,"range":{"start_line":548,"start_character":0,"end_line":550,"end_character":56},"updated":"2021-07-16 10:39:58.000000000","message":"This is basically O(n^3). Given that get_chassis_availability_zones(chassis) will always return the same set, we could avoid calling it \"len(az_list)\" time for the same chassis by avoiding set comprehension:\n\n chassis \u003d set()\n for ch in chassis_list:\n     chassis_azs \u003d get_chassis_availability_zones(ch)\n     if chassis_azs.intersection(az_list):\n         chassis.add(ch.name)\n\nBut not sure if ^^ is just premature optimization but given that chassis might be in order of hundred, it might be worth thinking about.","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":545,"context_line":"    :param az_list: A list of availability zones"},{"line_number":546,"context_line":"    :returns: A set of Chassis names"},{"line_number":547,"context_line":"    \"\"\""},{"line_number":548,"context_line":"    return {ch.name for ch in chassis_list"},{"line_number":549,"context_line":"            for az in az_list"},{"line_number":550,"context_line":"            if az in get_chassis_availability_zones(ch)}"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"def get_gateway_chassis_without_azs(chassis_list):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5745d23b_55b8c996","line":550,"range":{"start_line":548,"start_character":0,"end_line":550,"end_character":56},"in_reply_to":"9a1ee934_97b1ed6c","updated":"2021-07-16 11:08:49.000000000","message":"Thanks for this, it\u0027s a great point and suggestion! I wouldn\u0027t count it as pre-optimization, it\u0027s just a better way of doing what this method is suppose to do without compromising readability so, win-win.","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":551,"context_line":""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"def get_gateway_chassis_without_azs(chassis_list):"},{"line_number":554,"context_line":"    \"\"\"Returns a list of Chassis that does not belong to any AZs."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    Filter a list of Chassis and return only the Chassis that does not"},{"line_number":557,"context_line":"    belong to any availability zones."}],"source_content_type":"text/x-python","patch_set":10,"id":"bd05bdec_ef2fa143","line":554,"updated":"2021-07-16 10:39:58.000000000","message":"ditto","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":551,"context_line":""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"def get_gateway_chassis_without_azs(chassis_list):"},{"line_number":554,"context_line":"    \"\"\"Returns a list of Chassis that does not belong to any AZs."},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    Filter a list of Chassis and return only the Chassis that does not"},{"line_number":557,"context_line":"    belong to any availability zones."}],"source_content_type":"text/x-python","patch_set":10,"id":"9187f7fc_4102b958","line":554,"in_reply_to":"bd05bdec_ef2fa143","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py":[{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"78b2680c6a8fd68f0102a6446bda7795e4cec3a2","unresolved":true,"context_lines":[{"line_number":1257,"context_line":""},{"line_number":1258,"context_line":"    azs \u003d {az[\u0027name\u0027] for az in"},{"line_number":1259,"context_line":"           _driver.list_availability_zones(context).values()}"},{"line_number":1260,"context_line":"    diff \u003d set(availability_zones) - azs"},{"line_number":1261,"context_line":"    if diff:"},{"line_number":1262,"context_line":"        raise az_exc.AvailabilityZoneNotFound("},{"line_number":1263,"context_line":"            availability_zone\u003d\u0027, \u0027.join(diff))"}],"source_content_type":"text/x-python","patch_set":13,"id":"44014c48_439c25bb","line":1260,"updated":"2021-08-16 15:03:04.000000000","message":"nit: I\u0027m not sure about code convention of using set operation but this can be replaced by difference","commit_id":"781500daa5fe190c26291bcd96a80fe64f0d1bca"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"31f1ef73b6ca3d180c4b24a5165386f45b0b8efe","unresolved":true,"context_lines":[{"line_number":797,"context_line":"        return [ch.name if name_only else ch"},{"line_number":798,"context_line":"                for ch in self.chassis_list().execute(check_error\u003dTrue)"},{"line_number":799,"context_line":"                if ovn_const.CMS_OPT_CHASSIS_AS_GW in"},{"line_number":800,"context_line":"                ch.external_ids.get(ovn_const.OVN_CMS_OPTIONS, \u0027\u0027)]"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def get_chassis_and_physnets(self):"},{"line_number":803,"context_line":"        chassis_info_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"e8ffa125_815ffba0","line":800,"range":{"start_line":800,"start_character":16,"end_line":800,"end_character":66},"updated":"2021-04-30 18:02:36.000000000","message":"nit: without doing the split(\u0027,\u0027) on the \u0027ovn-cms-options\u0027, I think this would match strings that contained \u0027enable-chassis-as-gw\u0027 (which are unlikely to ever exist), e.g. ovn-cms-options: \u0027never-enable-chassis-as-gw,availability_zones\u003daz-0\u0027.","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7b167bbe9c78c8c5a0fa29753d83291ae2439d79","unresolved":true,"context_lines":[{"line_number":797,"context_line":"        return [ch.name if name_only else ch"},{"line_number":798,"context_line":"                for ch in self.chassis_list().execute(check_error\u003dTrue)"},{"line_number":799,"context_line":"                if ovn_const.CMS_OPT_CHASSIS_AS_GW in"},{"line_number":800,"context_line":"                ch.external_ids.get(ovn_const.OVN_CMS_OPTIONS, \u0027\u0027)]"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"    def get_chassis_and_physnets(self):"},{"line_number":803,"context_line":"        chassis_info_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":8,"id":"115dcaa3_471a3708","line":800,"range":{"start_line":800,"start_character":16,"end_line":800,"end_character":66},"in_reply_to":"e8ffa125_815ffba0","updated":"2021-05-04 08:46:51.000000000","message":"Great point! I will keep the split()","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":594,"context_line":"        external_ports \u003d self._nb_idl.db_find_rows("},{"line_number":595,"context_line":"            \u0027Logical_Switch_Port\u0027, (\u0027type\u0027, \u0027\u003d\u0027, ovn_const.LSP_TYPE_EXTERNAL)"},{"line_number":596,"context_line":"        ).execute(check_error\u003dTrue)"},{"line_number":597,"context_line":"        if not external_ports:"},{"line_number":598,"context_line":"            self._delete_default_ha_chassis_group()"},{"line_number":599,"context_line":"            raise periodics.NeverAgain()"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        context \u003d n_context.get_admin_context()"},{"line_number":602,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"}],"source_content_type":"text/x-python","patch_set":7,"id":"763d201a_f9b5d252","line":599,"range":{"start_line":597,"start_character":0,"end_line":599,"end_character":40},"updated":"2021-04-29 21:54:00.000000000","message":"NIT: are these 3 lines needed? \nOther than saving ourselves from getting a context, the for loop below would simply iterate over an empty list and be a noop, right?\n\nAssuming so, we could even make txn in _delete_default_ha_chassis_group a non-optional and simplt call txn.add()","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":true,"context_lines":[{"line_number":594,"context_line":"        external_ports \u003d self._nb_idl.db_find_rows("},{"line_number":595,"context_line":"            \u0027Logical_Switch_Port\u0027, (\u0027type\u0027, \u0027\u003d\u0027, ovn_const.LSP_TYPE_EXTERNAL)"},{"line_number":596,"context_line":"        ).execute(check_error\u003dTrue)"},{"line_number":597,"context_line":"        if not external_ports:"},{"line_number":598,"context_line":"            self._delete_default_ha_chassis_group()"},{"line_number":599,"context_line":"            raise periodics.NeverAgain()"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        context \u003d n_context.get_admin_context()"},{"line_number":602,"context_line":"        with self._nb_idl.transaction(check_error\u003dTrue) as txn:"}],"source_content_type":"text/x-python","patch_set":7,"id":"797e9cdf_af95436d","line":599,"range":{"start_line":597,"start_character":0,"end_line":599,"end_character":40},"in_reply_to":"763d201a_f9b5d252","updated":"2021-04-30 08:42:02.000000000","message":"Good point, I think it could be removed indeed.","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        raise periodics.NeverAgain()"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"    def _delete_default_ha_chassis_group(self, txn\u003dNone):"},{"line_number":575,"context_line":"        # TODO(lucasgomes): Remove the deletion of the"},{"line_number":576,"context_line":"        # HA_CHASSIS_GROUP_DEFAULT_NAME in the Y cycle. We no longer"},{"line_number":577,"context_line":"        # have a default HA Chassis Group."}],"source_content_type":"text/x-python","patch_set":10,"id":"b334212a_dce2c4ff","line":574,"range":{"start_line":574,"start_character":47,"end_line":574,"end_character":55},"updated":"2021-07-16 10:39:58.000000000","message":"Seems like it\u0027s called only from one place and there is always a transaction passed? Perhaps not needed a default value?","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        raise periodics.NeverAgain()"},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"    def _delete_default_ha_chassis_group(self, txn\u003dNone):"},{"line_number":575,"context_line":"        # TODO(lucasgomes): Remove the deletion of the"},{"line_number":576,"context_line":"        # HA_CHASSIS_GROUP_DEFAULT_NAME in the Y cycle. We no longer"},{"line_number":577,"context_line":"        # have a default HA Chassis Group."}],"source_content_type":"text/x-python","patch_set":10,"id":"86d29ca2_df3534c2","line":574,"range":{"start_line":574,"start_character":47,"end_line":574,"end_character":55},"in_reply_to":"b334212a_dce2c4ff","updated":"2021-07-16 11:08:49.000000000","message":"Indeed, we don\u0027t need the default value","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"cf25deec5e7ab9e6fee6fb35e77508ae4648ba15","unresolved":true,"context_lines":[{"line_number":603,"context_line":"                        ovn_const.OVN_NAME_PREFIX, \u0027\u0027)"},{"line_number":604,"context_line":"                ha_ch_grp \u003d self._ovn_client.sync_ha_chassis_group("},{"line_number":605,"context_line":"                    context, network_id, txn)"},{"line_number":606,"context_line":"                if port.ha_chassis_group !\u003d ha_ch_grp:"},{"line_number":607,"context_line":"                    txn.add(self._nb_idl.set_lswitch_port("},{"line_number":608,"context_line":"                        port.name, ha_chassis_group\u003dha_ch_grp))"},{"line_number":609,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"aa132f26_949a5c5f","line":606,"range":{"start_line":606,"start_character":41,"end_line":606,"end_character":43},"updated":"2021-07-16 11:58:22.000000000","message":"Hi, This is a BUG. Should modify it like this:\n\n   if port.ha_chassis_group[0].uuid !\u003d ha_ch_grp:","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a2fe5bfd9b472eadfa1ca8a815f1e3b088140e06","unresolved":true,"context_lines":[{"line_number":603,"context_line":"                        ovn_const.OVN_NAME_PREFIX, \u0027\u0027)"},{"line_number":604,"context_line":"                ha_ch_grp \u003d self._ovn_client.sync_ha_chassis_group("},{"line_number":605,"context_line":"                    context, network_id, txn)"},{"line_number":606,"context_line":"                if port.ha_chassis_group !\u003d ha_ch_grp:"},{"line_number":607,"context_line":"                    txn.add(self._nb_idl.set_lswitch_port("},{"line_number":608,"context_line":"                        port.name, ha_chassis_group\u003dha_ch_grp))"},{"line_number":609,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"15148997_13321516","line":606,"range":{"start_line":606,"start_character":41,"end_line":606,"end_character":43},"in_reply_to":"aa132f26_949a5c5f","updated":"2021-07-16 12:12:10.000000000","message":"Hi,\n\nThanks much for pointing it out! I will investigate the issue","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":323,"context_line":"        \"\"\"Returns the UUID of the HA Chassis Group."},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        Given the Neutron Network ID, this method will return (or create"},{"line_number":326,"context_line":"        and then return) the appropriated HA Chassis Group the external"},{"line_number":327,"context_line":"        port (in that network) needs to be associated with."},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        :param context: Neutron API context."}],"source_content_type":"text/x-python","patch_set":7,"id":"67344765_84da501e","line":326,"range":{"start_line":326,"start_character":29,"end_line":326,"end_character":41},"updated":"2021-04-29 21:54:00.000000000","message":"nit: appropriate","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        \"\"\"Returns the UUID of the HA Chassis Group."},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        Given the Neutron Network ID, this method will return (or create"},{"line_number":326,"context_line":"        and then return) the appropriated HA Chassis Group the external"},{"line_number":327,"context_line":"        port (in that network) needs to be associated with."},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        :param context: Neutron API context."}],"source_content_type":"text/x-python","patch_set":7,"id":"e5890692_5babd8c9","line":326,"range":{"start_line":326,"start_character":29,"end_line":326,"end_character":41},"in_reply_to":"67344765_84da501e","updated":"2021-04-30 08:42:02.000000000","message":"Done","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":329,"context_line":"        :param context: Neutron API context."},{"line_number":330,"context_line":"        :param network_id: The Neutron network ID."},{"line_number":331,"context_line":"        :param txn: The ovsdbapp transaction object."},{"line_number":332,"context_line":"        :returns: A HA Chassis Group UUID."},{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        az_hints \u003d utils.get_az_hints("},{"line_number":335,"context_line":"            self._plugin.get_network(context, network_id))"}],"source_content_type":"text/x-python","patch_set":7,"id":"0ed1cb64_8283ad36","line":332,"range":{"start_line":332,"start_character":18,"end_line":332,"end_character":19},"updated":"2021-04-29 21:54:00.000000000","message":"NIT: An HA\n  or A high-availability\n(English is hard! 😊)","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        :param context: Neutron API context."},{"line_number":330,"context_line":"        :param network_id: The Neutron network ID."},{"line_number":331,"context_line":"        :param txn: The ovsdbapp transaction object."},{"line_number":332,"context_line":"        :returns: A HA Chassis Group UUID."},{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        az_hints \u003d utils.get_az_hints("},{"line_number":335,"context_line":"            self._plugin.get_network(context, network_id))"}],"source_content_type":"text/x-python","patch_set":7,"id":"4c561e33_80adc1a1","line":332,"range":{"start_line":332,"start_character":18,"end_line":332,"end_character":19},"in_reply_to":"0ed1cb64_8283ad36","updated":"2021-04-30 08:42:02.000000000","message":"Done","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":343,"context_line":"            sub_txn.add(self._nb_idl.ha_chassis_group_add("},{"line_number":344,"context_line":"                ha_ch_grp_name, may_exist\u003dTrue))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        ha_ch_grp \u003d self._nb_idl.ha_chassis_group_get("},{"line_number":347,"context_line":"            ha_ch_grp_name).execute(check_error\u003dTrue)"},{"line_number":348,"context_line":"        txn.add(self._nb_idl.db_set("},{"line_number":349,"context_line":"            \u0027HA_Chassis_Group\u0027, ha_ch_grp_name, (\u0027external_ids\u0027,"},{"line_number":350,"context_line":"            {ovn_const.OVN_AZ_HINTS_EXT_ID_KEY: \u0027,\u0027.join(az_hints)})))"}],"source_content_type":"text/x-python","patch_set":7,"id":"bc4c8e00_65576b55","line":347,"range":{"start_line":346,"start_character":8,"end_line":347,"end_character":53},"updated":"2021-04-29 21:54:00.000000000","message":"Question: could it ever happen that ha_chassis_group_get returns None? I\u0027m thinking not, because we are going to do a lookup with \"default\u003d_NO_DEFAULT\", right?","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":true,"context_lines":[{"line_number":343,"context_line":"            sub_txn.add(self._nb_idl.ha_chassis_group_add("},{"line_number":344,"context_line":"                ha_ch_grp_name, may_exist\u003dTrue))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        ha_ch_grp \u003d self._nb_idl.ha_chassis_group_get("},{"line_number":347,"context_line":"            ha_ch_grp_name).execute(check_error\u003dTrue)"},{"line_number":348,"context_line":"        txn.add(self._nb_idl.db_set("},{"line_number":349,"context_line":"            \u0027HA_Chassis_Group\u0027, ha_ch_grp_name, (\u0027external_ids\u0027,"},{"line_number":350,"context_line":"            {ovn_const.OVN_AZ_HINTS_EXT_ID_KEY: \u0027,\u0027.join(az_hints)})))"}],"source_content_type":"text/x-python","patch_set":7,"id":"afc62f73_d51c39a1","line":347,"range":{"start_line":346,"start_character":8,"end_line":347,"end_character":53},"in_reply_to":"bc4c8e00_65576b55","updated":"2021-04-30 08:42:02.000000000","message":"I don\u0027t think this will ever return None, the chassis group is being added on the transaction above (L343-344)","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":349,"context_line":"            \u0027HA_Chassis_Group\u0027, ha_ch_grp_name, (\u0027external_ids\u0027,"},{"line_number":350,"context_line":"            {ovn_const.OVN_AZ_HINTS_EXT_ID_KEY: \u0027,\u0027.join(az_hints)})))"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Get the chassis belonging to the AZ hints. If not found,"},{"line_number":353,"context_line":"        ch_list \u003d self._sb_idl.get_gateway_chassis_from_cms_options("},{"line_number":354,"context_line":"            name_only\u003dFalse)"},{"line_number":355,"context_line":"        if not az_hints:"}],"source_content_type":"text/x-python","patch_set":7,"id":"e6fab489_2b04081c","line":352,"range":{"start_line":352,"start_character":53,"end_line":352,"end_character":66},"updated":"2021-04-29 21:54:00.000000000","message":"NIT: remove \"If not found,\"","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":false,"context_lines":[{"line_number":349,"context_line":"            \u0027HA_Chassis_Group\u0027, ha_ch_grp_name, (\u0027external_ids\u0027,"},{"line_number":350,"context_line":"            {ovn_const.OVN_AZ_HINTS_EXT_ID_KEY: \u0027,\u0027.join(az_hints)})))"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Get the chassis belonging to the AZ hints. If not found,"},{"line_number":353,"context_line":"        ch_list \u003d self._sb_idl.get_gateway_chassis_from_cms_options("},{"line_number":354,"context_line":"            name_only\u003dFalse)"},{"line_number":355,"context_line":"        if not az_hints:"}],"source_content_type":"text/x-python","patch_set":7,"id":"08aee39a_a58318fb","line":352,"range":{"start_line":352,"start_character":53,"end_line":352,"end_character":66},"in_reply_to":"e6fab489_2b04081c","updated":"2021-04-30 08:42:02.000000000","message":"Done","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":352,"context_line":"        # Get the chassis belonging to the AZ hints. If not found,"},{"line_number":353,"context_line":"        ch_list \u003d self._sb_idl.get_gateway_chassis_from_cms_options("},{"line_number":354,"context_line":"            name_only\u003dFalse)"},{"line_number":355,"context_line":"        if not az_hints:"},{"line_number":356,"context_line":"            az_chassis \u003d utils.get_gateway_chassis_without_azs(ch_list)"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            az_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":361,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"}],"source_content_type":"text/x-python","patch_set":7,"id":"511020d1_4d65aece","line":358,"range":{"start_line":355,"start_character":8,"end_line":358,"end_character":68},"updated":"2021-04-29 21:54:00.000000000","message":"NIT (just a possibly stupid suggestion):\n\naz_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints) \\\n             if az_hints else utils.get_gateway_chassis_without_azs(ch_list)","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":true,"context_lines":[{"line_number":352,"context_line":"        # Get the chassis belonging to the AZ hints. If not found,"},{"line_number":353,"context_line":"        ch_list \u003d self._sb_idl.get_gateway_chassis_from_cms_options("},{"line_number":354,"context_line":"            name_only\u003dFalse)"},{"line_number":355,"context_line":"        if not az_hints:"},{"line_number":356,"context_line":"            az_chassis \u003d utils.get_gateway_chassis_without_azs(ch_list)"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            az_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":361,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"}],"source_content_type":"text/x-python","patch_set":7,"id":"7cd0efdf_856eed58","line":358,"range":{"start_line":355,"start_character":8,"end_line":358,"end_character":68},"in_reply_to":"511020d1_4d65aece","updated":"2021-04-30 08:42:02.000000000","message":"I will keep as-is now for readability. These methods have a long name so doing 1 liners with them makes the indentation fun.","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"df6e886afa7862bb0ab3465e998997e44c4599f8","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        # Get the chassis belonging to the AZ hints. If not found,"},{"line_number":353,"context_line":"        ch_list \u003d self._sb_idl.get_gateway_chassis_from_cms_options("},{"line_number":354,"context_line":"            name_only\u003dFalse)"},{"line_number":355,"context_line":"        if not az_hints:"},{"line_number":356,"context_line":"            az_chassis \u003d utils.get_gateway_chassis_without_azs(ch_list)"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            az_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":361,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ef4bc93_65eb99bb","line":358,"range":{"start_line":355,"start_character":8,"end_line":358,"end_character":68},"in_reply_to":"7cd0efdf_856eed58","updated":"2021-04-30 13:21:04.000000000","message":"Ack","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"31f1ef73b6ca3d180c4b24a5165386f45b0b8efe","unresolved":true,"context_lines":[{"line_number":331,"context_line":"            self._plugin.get_network(context, network_id))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        ha_ch_grp_name \u003d utils.ovn_name(network_id)"},{"line_number":334,"context_line":"        # FIXME(lucasagomes): Couldn\u0027t find a better way of doing this"},{"line_number":335,"context_line":"        # without a sub-transaction. This shouldn\u0027t be a problem since"},{"line_number":336,"context_line":"        # the HA Chassis Group associated with a network will be deleted"},{"line_number":337,"context_line":"        # as part of the network delete method (if present)"}],"source_content_type":"text/x-python","patch_set":8,"id":"532dbe52_137b0d37","line":334,"range":{"start_line":334,"start_character":30,"end_line":334,"end_character":56},"updated":"2021-04-30 18:02:36.000000000","message":"I\u0027d probably write a custom SyncHAChassisGroupCommand object that does all of the things we need to do. If you create a new ha_chassis_group in it then you can easily reference it within the transaction in the same Command. You can probably re-use a lot of the logic by directly adding other Command object calls directly in that command like\n\n HAChassisGroupAddChassisCommand(*args, **kwargs).run_idl(txn)\n\nNot sure if it\u0027s more trouble than it\u0027s worth it or not, but you probably do. :D","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7b167bbe9c78c8c5a0fa29753d83291ae2439d79","unresolved":true,"context_lines":[{"line_number":331,"context_line":"            self._plugin.get_network(context, network_id))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        ha_ch_grp_name \u003d utils.ovn_name(network_id)"},{"line_number":334,"context_line":"        # FIXME(lucasagomes): Couldn\u0027t find a better way of doing this"},{"line_number":335,"context_line":"        # without a sub-transaction. This shouldn\u0027t be a problem since"},{"line_number":336,"context_line":"        # the HA Chassis Group associated with a network will be deleted"},{"line_number":337,"context_line":"        # as part of the network delete method (if present)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f06b789_e658f39b","line":334,"range":{"start_line":334,"start_character":30,"end_line":334,"end_character":56},"in_reply_to":"532dbe52_137b0d37","updated":"2021-05-04 08:46:51.000000000","message":"Thanks terry! Indeed, I haven\u0027t thought about having a custom OVSDB command for it like that tho, I like the simplicity in the OVSDB commands and adding too much logic to it as it would be needed for this seems not ideal IMHO.\n\nAnother alternative I thought was to create the HA Chassis Group as part of the network creation (as we have a 1:1 map between network and Ha Chassis Group now) but, since environments with external ports are not the majority (I think) it would just leave a bunch of empty HA Chassis Groups around. Hence my implementation here that only creates the HA Chassis Group when an external port is created and it only creates it for the first port as well, so shouldn\u0027t be a big of a deal I think.","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"b1c591ea4b6bb5693c846ccc72fd499b9da0d48a","unresolved":true,"context_lines":[{"line_number":374,"context_line":"            az_chassis.remove(high_prio_ch.chassis_name)"},{"line_number":375,"context_line":"            priority -\u003d 1"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        for ch in az_chassis:"},{"line_number":378,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":379,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":380,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"41232d6b_fde10084","line":377,"range":{"start_line":377,"start_character":18,"end_line":377,"end_character":28},"updated":"2021-07-15 03:56:01.000000000","message":"I have the following doubts: \nIf networks have the same azs, then they also have the same az_chaasis. Finally, there is only one chassis with the highest priority for all networks. \nIs right?","commit_id":"dbe9f97ad2df607909535dd0d1768031092c2052"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1aca644426d5c6b6d912c5fd1300f4e753b4a22e","unresolved":true,"context_lines":[{"line_number":374,"context_line":"            az_chassis.remove(high_prio_ch.chassis_name)"},{"line_number":375,"context_line":"            priority -\u003d 1"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        for ch in az_chassis:"},{"line_number":378,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":379,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":380,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"fe817a09_9b8b6e96","line":377,"range":{"start_line":377,"start_character":18,"end_line":377,"end_character":28},"in_reply_to":"41232d6b_fde10084","updated":"2021-07-15 09:16:01.000000000","message":"Not necessarily. Each network has it\u0027s own HA Chassis Group now and priorities are set between the members each group.\n\nSo you could HA_Chassis_NET_A and HA_Chassis_NET_B with the same members but in the first one Chassis-0 has the highest prio and on the other Chassis-2 has the high priority. We could perhaps randomize the az_chassis list here for that to be more apparent.","commit_id":"dbe9f97ad2df607909535dd0d1768031092c2052"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"696e0c4cb279268a370f0fd6566abe19587d8390","unresolved":true,"context_lines":[{"line_number":374,"context_line":"            az_chassis.remove(high_prio_ch.chassis_name)"},{"line_number":375,"context_line":"            priority -\u003d 1"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        for ch in az_chassis:"},{"line_number":378,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":379,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":380,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"689192b4_ae220bd8","line":377,"range":{"start_line":377,"start_character":18,"end_line":377,"end_character":28},"in_reply_to":"d65d6b31_ffbb422a","updated":"2021-07-15 11:26:13.000000000","message":"Thank you for review and suggestion. I\u0027ve incorporated the shuffling of this list in the new patch-set.","commit_id":"dbe9f97ad2df607909535dd0d1768031092c2052"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"1a8d24baf30300eb383f6f72221f5084ec4d67c3","unresolved":true,"context_lines":[{"line_number":374,"context_line":"            az_chassis.remove(high_prio_ch.chassis_name)"},{"line_number":375,"context_line":"            priority -\u003d 1"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        for ch in az_chassis:"},{"line_number":378,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":379,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":380,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"d65d6b31_ffbb422a","line":377,"range":{"start_line":377,"start_character":18,"end_line":377,"end_character":28},"in_reply_to":"fe817a09_9b8b6e96","updated":"2021-07-15 09:47:02.000000000","message":"Yeah,randomize the az_chassis list is a good solution.\nMaybe we can take into account least loaded scheduling like l3-ha in the future.","commit_id":"dbe9f97ad2df607909535dd0d1768031092c2052"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":322,"context_line":"                           cidrs.strip(), device_owner, sg_ids)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def sync_ha_chassis_group(self, context, network_id, txn):"},{"line_number":325,"context_line":"        \"\"\"Returns the UUID of the HA Chassis Group."},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        Given the Neutron Network ID, this method will return (or create"},{"line_number":328,"context_line":"        and then return) the appropriate HA Chassis Group the external"}],"source_content_type":"text/x-python","patch_set":10,"id":"80f4d1aa_85887691","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":18},"updated":"2021-07-16 10:39:58.000000000","message":"Imperative :)","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                           cidrs.strip(), device_owner, sg_ids)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    def sync_ha_chassis_group(self, context, network_id, txn):"},{"line_number":325,"context_line":"        \"\"\"Returns the UUID of the HA Chassis Group."},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        Given the Neutron Network ID, this method will return (or create"},{"line_number":328,"context_line":"        and then return) the appropriate HA Chassis Group the external"}],"source_content_type":"text/x-python","patch_set":10,"id":"f4432137_aa872c4f","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":18},"in_reply_to":"80f4d1aa_85887691","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":341,"context_line":"        # without a sub-transaction. This shouldn\u0027t be a problem since"},{"line_number":342,"context_line":"        # the HA Chassis Group associated with a network will be deleted"},{"line_number":343,"context_line":"        # as part of the network delete method (if present)"},{"line_number":344,"context_line":"        with self._nb_idl.create_transaction(check_error\u003dTrue) as sub_txn:"},{"line_number":345,"context_line":"            sub_txn.add(self._nb_idl.ha_chassis_group_add("},{"line_number":346,"context_line":"                ha_ch_grp_name, may_exist\u003dTrue))"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        ha_ch_grp \u003d self._nb_idl.ha_chassis_group_get("},{"line_number":349,"context_line":"            ha_ch_grp_name).execute(check_error\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"204b02f8_78ece6ad","line":346,"range":{"start_line":344,"start_character":0,"end_line":346,"end_character":48},"updated":"2021-07-16 10:39:58.000000000","message":"And do we need to add it in sub-transaction? We\u0027re not using the uuid anywhere, only referencing the name, so perhaps it\u0027s not a problem the object doesn\u0027t exist in the NB DB while performing commands below?","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":341,"context_line":"        # without a sub-transaction. This shouldn\u0027t be a problem since"},{"line_number":342,"context_line":"        # the HA Chassis Group associated with a network will be deleted"},{"line_number":343,"context_line":"        # as part of the network delete method (if present)"},{"line_number":344,"context_line":"        with self._nb_idl.create_transaction(check_error\u003dTrue) as sub_txn:"},{"line_number":345,"context_line":"            sub_txn.add(self._nb_idl.ha_chassis_group_add("},{"line_number":346,"context_line":"                ha_ch_grp_name, may_exist\u003dTrue))"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        ha_ch_grp \u003d self._nb_idl.ha_chassis_group_get("},{"line_number":349,"context_line":"            ha_ch_grp_name).execute(check_error\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"90c05924_4a914362","line":346,"range":{"start_line":344,"start_character":0,"end_line":346,"end_character":48},"in_reply_to":"204b02f8_78ece6ad","updated":"2021-07-16 11:08:49.000000000","message":"We still need the sub-transaction, otherwise when we try to create the HA_Chassis_Group and add the HA_Chassis as a member to the group won\u0027t work in the same transaction because of the lookups we have in the ha_chassis_group_add_chassis and ha_chassis_group_del_chassis commands [0]\n\n[0] https://opendev.org/openstack/ovsdbapp/src/branch/master/ovsdbapp/schema/ovn_northbound/commands.py#L1449","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":360,"context_line":"            az_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":363,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"},{"line_number":364,"context_line":"        ch_to_del \u003d set(all_ch) - set(az_chassis)"},{"line_number":365,"context_line":"        for ch in ch_to_del:"},{"line_number":366,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_del_chassis("}],"source_content_type":"text/x-python","patch_set":10,"id":"5ee03aa6_ed57ae3f","line":363,"updated":"2021-07-16 10:39:58.000000000","message":"Nit: Maybe we could use set comprehension here and avoid retyping from list to set on L364 below","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            az_chassis \u003d utils.get_chassis_in_azs(ch_list, az_hints)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":363,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"},{"line_number":364,"context_line":"        ch_to_del \u003d set(all_ch) - set(az_chassis)"},{"line_number":365,"context_line":"        for ch in ch_to_del:"},{"line_number":366,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_del_chassis("}],"source_content_type":"text/x-python","patch_set":10,"id":"f71c6148_fefded46","line":363,"in_reply_to":"5ee03aa6_ed57ae3f","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":363,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"},{"line_number":364,"context_line":"        ch_to_del \u003d set(all_ch) - set(az_chassis)"},{"line_number":365,"context_line":"        for ch in ch_to_del:"},{"line_number":366,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_del_chassis("},{"line_number":367,"context_line":"                    ha_ch_grp_name, ch, if_exists\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bbac8223_e9a47004","line":364,"range":{"start_line":364,"start_character":34,"end_line":364,"end_character":49},"updated":"2021-07-16 10:39:58.000000000","message":"This should be already a set, no need to type it","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        # Remove any chassis that no longer belongs to the AZ hints"},{"line_number":363,"context_line":"        all_ch \u003d [ch.chassis_name for ch in ha_ch_grp.ha_chassis]"},{"line_number":364,"context_line":"        ch_to_del \u003d set(all_ch) - set(az_chassis)"},{"line_number":365,"context_line":"        for ch in ch_to_del:"},{"line_number":366,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_del_chassis("},{"line_number":367,"context_line":"                    ha_ch_grp_name, ch, if_exists\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":10,"id":"01c9d60e_503c1ee6","line":364,"range":{"start_line":364,"start_character":34,"end_line":364,"end_character":49},"in_reply_to":"bbac8223_e9a47004","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":383,"context_line":"        # Randomize the order so that networks belonging to the same"},{"line_number":384,"context_line":"        # availability zones do not necessarily end up with the same"},{"line_number":385,"context_line":"        # Chassis as the highest priority one."},{"line_number":386,"context_line":"        for ch in random.sample(list(az_chassis), len(az_chassis)):"},{"line_number":387,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":388,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":389,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":10,"id":"b44a3b05_150d8316","line":386,"range":{"start_line":386,"start_character":32,"end_line":386,"end_character":48},"updated":"2021-07-16 10:39:58.000000000","message":"sample() can consume set object too","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"20c0b49be1313fbc487ca733e6d3c980598a7f06","unresolved":true,"context_lines":[{"line_number":383,"context_line":"        # Randomize the order so that networks belonging to the same"},{"line_number":384,"context_line":"        # availability zones do not necessarily end up with the same"},{"line_number":385,"context_line":"        # Chassis as the highest priority one."},{"line_number":386,"context_line":"        for ch in random.sample(list(az_chassis), len(az_chassis)):"},{"line_number":387,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":388,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":389,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":10,"id":"09ce3f2d_d18fdad5","line":386,"range":{"start_line":386,"start_character":32,"end_line":386,"end_character":48},"in_reply_to":"700db085_f180f627","updated":"2021-08-12 14:24:31.000000000","message":"aha, didn\u0027t know that, thanks for teaching me :)","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":383,"context_line":"        # Randomize the order so that networks belonging to the same"},{"line_number":384,"context_line":"        # availability zones do not necessarily end up with the same"},{"line_number":385,"context_line":"        # Chassis as the highest priority one."},{"line_number":386,"context_line":"        for ch in random.sample(list(az_chassis), len(az_chassis)):"},{"line_number":387,"context_line":"            txn.add(self._nb_idl.ha_chassis_group_add_chassis("},{"line_number":388,"context_line":"                    ha_ch_grp_name, ch, priority\u003dpriority))"},{"line_number":389,"context_line":"            priority -\u003d 1"}],"source_content_type":"text/x-python","patch_set":10,"id":"700db085_f180f627","line":386,"range":{"start_line":386,"start_character":32,"end_line":386,"end_character":48},"in_reply_to":"b44a3b05_150d8316","updated":"2021-07-16 11:08:49.000000000","message":"It\u0027s deprecated in python3.9 and will be removed on later versions:\n\nIn [4]: random.sample(test_set, len(test_set))\n\u003cipython-input-4-c10e6c5640c0\u003e:1: DeprecationWarning: Sampling from a set deprecated\nsince Python 3.9 and will be removed in a subsequent version.\n  random.sample(test_set, len(test_set))","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        # NOTE(lucasgomes): If the external_ids column wasn\u0027t updated"},{"line_number":175,"context_line":"        # (meaning, Chassis \"gateway\" status didn\u0027t change) just returns"},{"line_number":176,"context_line":"        if not hasattr(old, \u0027external_ids\u0027) and event \u003d\u003d self.ROW_UPDATE:"},{"line_number":177,"context_line":"            return"},{"line_number":178,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":179,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":180,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"f3957fb6_2f1464b5","line":177,"range":{"start_line":177,"start_character":12,"end_line":177,"end_character":18},"updated":"2021-04-29 21:54:00.000000000","message":"Super NIT: for consistency sake on type being returned, maybe return False ?","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        # NOTE(lucasgomes): If the external_ids column wasn\u0027t updated"},{"line_number":175,"context_line":"        # (meaning, Chassis \"gateway\" status didn\u0027t change) just returns"},{"line_number":176,"context_line":"        if not hasattr(old, \u0027external_ids\u0027) and event \u003d\u003d self.ROW_UPDATE:"},{"line_number":177,"context_line":"            return"},{"line_number":178,"context_line":"        if (old.external_ids.get(\u0027ovn-bridge-mappings\u0027) !\u003d"},{"line_number":179,"context_line":"                row.external_ids.get(\u0027ovn-bridge-mappings\u0027)):"},{"line_number":180,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"cbde08e0_c9a840dd","line":177,"range":{"start_line":177,"start_character":12,"end_line":177,"end_character":18},"in_reply_to":"f3957fb6_2f1464b5","updated":"2021-04-30 08:42:02.000000000","message":"lol I agree tho, will add even tho it\u0027s not really part of this patch","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":187,"context_line":"        if is_gw !\u003d is_gw_old:"},{"line_number":188,"context_line":"            return True"},{"line_number":189,"context_line":"        elif azs !\u003d old_azs:"},{"line_number":190,"context_line":"            return True"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def run(self, event, row, old):"},{"line_number":193,"context_line":"        host \u003d row.hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"a8781e75_893ea5f3","line":190,"updated":"2021-04-29 21:54:00.000000000","message":"Same as comment above: return False as a last line?","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        if is_gw !\u003d is_gw_old:"},{"line_number":188,"context_line":"            return True"},{"line_number":189,"context_line":"        elif azs !\u003d old_azs:"},{"line_number":190,"context_line":"            return True"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def run(self, event, row, old):"},{"line_number":193,"context_line":"        host \u003d row.hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"ed0e13dc_c5ffe8fa","line":190,"in_reply_to":"a8781e75_893ea5f3","updated":"2021-04-30 08:42:02.000000000","message":"Done","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"31f1ef73b6ca3d180c4b24a5165386f45b0b8efe","unresolved":true,"context_lines":[{"line_number":70,"context_line":"        self.driver \u003d driver"},{"line_number":71,"context_line":"        self.l3_plugin \u003d directory.get_plugin(constants.L3)"},{"line_number":72,"context_line":"        table \u003d \u0027Chassis\u0027"},{"line_number":73,"context_line":"        events \u003d (self.ROW_CREATE, self.ROW_UPDATE, self.ROW_DELETE)"},{"line_number":74,"context_line":"        super(ChassisEvent, self).__init__(events, table, None)"},{"line_number":75,"context_line":"        self.event_name \u003d \u0027ChassisEvent\u0027"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"8abf91c7_0d3f2510","line":73,"updated":"2021-04-30 18:02:36.000000000","message":"note for future: this looks like it would be a lot easier to read if this was 3 different events. Lots of if event \u003d\u003d X: elif event \u003d\u003d Y blocks that don\u0027t really share much code.","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7b167bbe9c78c8c5a0fa29753d83291ae2439d79","unresolved":true,"context_lines":[{"line_number":70,"context_line":"        self.driver \u003d driver"},{"line_number":71,"context_line":"        self.l3_plugin \u003d directory.get_plugin(constants.L3)"},{"line_number":72,"context_line":"        table \u003d \u0027Chassis\u0027"},{"line_number":73,"context_line":"        events \u003d (self.ROW_CREATE, self.ROW_UPDATE, self.ROW_DELETE)"},{"line_number":74,"context_line":"        super(ChassisEvent, self).__init__(events, table, None)"},{"line_number":75,"context_line":"        self.event_name \u003d \u0027ChassisEvent\u0027"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"417bd0e4_17117ac2","line":73,"in_reply_to":"8abf91c7_0d3f2510","updated":"2021-05-04 08:46:51.000000000","message":"++ indeed, at some point it would be good to separate these own their own event","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"31f1ef73b6ca3d180c4b24a5165386f45b0b8efe","unresolved":true,"context_lines":[{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d list(filter(None, hcg.external_ids.get("},{"line_number":91,"context_line":"                ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027)))"},{"line_number":92,"context_line":"            # Find which Ha Chassis Group that is included in the"},{"line_number":93,"context_line":"            # Availability Zone hints"}],"source_content_type":"text/x-python","patch_set":8,"id":"5b873674_4344e1b7","line":90,"updated":"2021-04-30 18:02:36.000000000","message":"Could make this a set comprehension:\n\n azs \u003d {az for az in hcg.external_ids.get(ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027) if az}\n\nand then since az_hints is also a set, I think below could be:\n\n if az_hints.intersection(azs):\n     ha_chassis_list.append(hcg)","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7b167bbe9c78c8c5a0fa29753d83291ae2439d79","unresolved":true,"context_lines":[{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d list(filter(None, hcg.external_ids.get("},{"line_number":91,"context_line":"                ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027)))"},{"line_number":92,"context_line":"            # Find which Ha Chassis Group that is included in the"},{"line_number":93,"context_line":"            # Availability Zone hints"}],"source_content_type":"text/x-python","patch_set":8,"id":"0e9745bc_a0595030","line":90,"in_reply_to":"5b873674_4344e1b7","updated":"2021-05-04 08:46:51.000000000","message":"Nice, will update the code with it! Thanks a lot","commit_id":"6dc9c496c242837f5fae1fcfeb9ee21989eaf3da"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":85,"context_line":"                \u0027HA_Chassis_Group\u0027).execute(check_error\u003dTrue):"},{"line_number":86,"context_line":"            if not hcg.name.startswith(ovn_const.OVN_NAME_PREFIX):"},{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d {az for az in"},{"line_number":91,"context_line":"                   hcg.external_ids.get("}],"source_content_type":"text/x-python","patch_set":10,"id":"c38d0e8d_f425e19d","line":88,"range":{"start_line":88,"start_character":48,"end_line":88,"end_character":60},"updated":"2021-07-16 10:39:58.000000000","message":"But that happens only for case when AZ HINTS is not in external ids, no? Maybe better would be to check this corner case instead of iterating over the all azs?\n\nOr is it to support things like\n\n\"az1,az2,\" with the trailing coma?","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":true,"context_lines":[{"line_number":85,"context_line":"                \u0027HA_Chassis_Group\u0027).execute(check_error\u003dTrue):"},{"line_number":86,"context_line":"            if not hcg.name.startswith(ovn_const.OVN_NAME_PREFIX):"},{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d {az for az in"},{"line_number":91,"context_line":"                   hcg.external_ids.get("}],"source_content_type":"text/x-python","patch_set":10,"id":"74b0c514_47017821","line":88,"range":{"start_line":88,"start_character":48,"end_line":88,"end_character":60},"in_reply_to":"c38d0e8d_f425e19d","updated":"2021-07-16 11:08:49.000000000","message":"Exactly it\u0027s to eliminate the problem of the trailing comma, in our case, a double colon (\":\") as our syntax uses colons to separated different AZs and comma to separated different options in ovn-cms-options:\n\navailability-zones\u003daz-0:az-1:az-2\"\n\nOne you could have:\n\navailability-zones\u003daz-0:az-1::az-2\"","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a4fc122fc1a1387b21ff94a67e55042e578db46","unresolved":true,"context_lines":[{"line_number":86,"context_line":"            if not hcg.name.startswith(ovn_const.OVN_NAME_PREFIX):"},{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d {az for az in"},{"line_number":91,"context_line":"                   hcg.external_ids.get("},{"line_number":92,"context_line":"                       ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027) if az}"}],"source_content_type":"text/x-python","patch_set":10,"id":"7b840ef2_d02fc02f","line":89,"range":{"start_line":89,"start_character":31,"end_line":89,"end_character":37},"updated":"2021-07-16 10:39:58.000000000","message":"returned","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5ee6aa7d7fc01468fd5b29038818d9a192dd6290","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if not hcg.name.startswith(ovn_const.OVN_NAME_PREFIX):"},{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            # The filter() is to get rid of the empty string in"},{"line_number":89,"context_line":"            # the list that is return because of split()"},{"line_number":90,"context_line":"            azs \u003d {az for az in"},{"line_number":91,"context_line":"                   hcg.external_ids.get("},{"line_number":92,"context_line":"                       ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027) if az}"}],"source_content_type":"text/x-python","patch_set":10,"id":"2765cc3b_04db96d6","line":89,"range":{"start_line":89,"start_character":31,"end_line":89,"end_character":37},"in_reply_to":"7b840ef2_d02fc02f","updated":"2021-07-16 11:08:49.000000000","message":"Done","commit_id":"60538f35fd0883833b5751dc090b4103b1fbac41"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6ab7b9737b2ba82aa1d9177e6ac773e2faaaf444","unresolved":true,"context_lines":[{"line_number":185,"context_line":"        is_gw_old \u003d utils.is_gateway_chassis(old)"},{"line_number":186,"context_line":"        azs \u003d utils.get_chassis_availability_zones(row)"},{"line_number":187,"context_line":"        old_azs \u003d utils.get_chassis_availability_zones(old)"},{"line_number":188,"context_line":"        if is_gw !\u003d is_gw_old:"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":"        elif azs !\u003d old_azs:"},{"line_number":191,"context_line":"            return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":12,"id":"24e12e0a_8aa61b48","line":191,"range":{"start_line":188,"start_character":8,"end_line":191,"end_character":23},"updated":"2021-08-16 09:54:57.000000000","message":"nit: this could be merged into one \"if\" with \"or\"","commit_id":"6b013c4865422cda29f931c8fd9c953043509043"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e61006351a2cb45a2097e9eb23c3d6f67e29246c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        is_gw_old \u003d utils.is_gateway_chassis(old)"},{"line_number":186,"context_line":"        azs \u003d utils.get_chassis_availability_zones(row)"},{"line_number":187,"context_line":"        old_azs \u003d utils.get_chassis_availability_zones(old)"},{"line_number":188,"context_line":"        if is_gw !\u003d is_gw_old:"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":"        elif azs !\u003d old_azs:"},{"line_number":191,"context_line":"            return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def run(self, event, row, old):"}],"source_content_type":"text/x-python","patch_set":12,"id":"e28aed18_59ae30c6","line":191,"range":{"start_line":188,"start_character":8,"end_line":191,"end_character":23},"in_reply_to":"24e12e0a_8aa61b48","updated":"2021-08-16 11:04:19.000000000","message":"Done","commit_id":"6b013c4865422cda29f931c8fd9c953043509043"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"78b2680c6a8fd68f0102a6446bda7795e4cec3a2","unresolved":true,"context_lines":[{"line_number":92,"context_line":"                       ovn_const.OVN_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027) if az}"},{"line_number":93,"context_line":"            # Find which Ha Chassis Group that is included in the"},{"line_number":94,"context_line":"            # Availability Zone hints"},{"line_number":95,"context_line":"            if az_hints.intersection(azs):"},{"line_number":96,"context_line":"                ha_chassis_list.append(hcg)"},{"line_number":97,"context_line":"            # If the Availability Zone hints is empty return a list"},{"line_number":98,"context_line":"            # of HA Chassis Groups that does not belong to any AZ"}],"source_content_type":"text/x-python","patch_set":13,"id":"03a546b1_7972b84c","line":95,"updated":"2021-08-16 15:03:04.000000000","message":"nit: can be one if-statement","commit_id":"781500daa5fe190c26291bcd96a80fe64f0d1bca"},{"author":{"_account_id":11082,"name":"Kamil Sambor","email":"ksambor@redhat.com","username":"ksambor"},"change_message_id":"78b2680c6a8fd68f0102a6446bda7795e4cec3a2","unresolved":true,"context_lines":[{"line_number":101,"context_line":"        return ha_chassis_list"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _get_min_priority_in_hcg(self, ha_chassis_group):"},{"line_number":104,"context_line":"        \"\"\"Find the next lowest priority number within a HA Chassis Group.\"\"\""},{"line_number":105,"context_line":"        min_priority \u003d min("},{"line_number":106,"context_line":"            [ch.priority for ch in ha_chassis_group.ha_chassis],"},{"line_number":107,"context_line":"            default\u003dovn_const.HA_CHASSIS_GROUP_HIGHEST_PRIORITY)"}],"source_content_type":"text/x-python","patch_set":13,"id":"b44f7ac0_5b6b1352","line":104,"updated":"2021-08-16 15:03:04.000000000","message":"nit: miss param and returns in doc string","commit_id":"781500daa5fe190c26291bcd96a80fe64f0d1bca"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"6601f49a1b3e8377b26db7c998b92081e1e452dc","unresolved":true,"context_lines":[{"line_number":693,"context_line":"        ext_ids \u003d {"},{"line_number":694,"context_line":"            \u0027ovn-cms-options\u0027: \u0027enable-chassis-as-gw,availability-zones\u003daz-0\u0027}"},{"line_number":695,"context_line":"        new \u003d fakes.FakeOvsdbTable.create_one_ovsdb_table("},{"line_number":696,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027SpongeBob\u0027, \u0027external_ids\u0027: ext_ids})"},{"line_number":697,"context_line":"        old \u003d new"},{"line_number":698,"context_line":"        self.assertIsNone(self.event.handle_ha_chassis_group_changes("},{"line_number":699,"context_line":"            self.event.ROW_UPDATE, new, old))"}],"source_content_type":"text/x-python","patch_set":7,"id":"e9f1a57f_7cf75230","line":696,"range":{"start_line":696,"start_character":28,"end_line":696,"end_character":37},"updated":"2021-04-29 21:54:00.000000000","message":"square pants! :)","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9949f6d91c83439f7108bb62ddc17cd25e1009d8","unresolved":true,"context_lines":[{"line_number":693,"context_line":"        ext_ids \u003d {"},{"line_number":694,"context_line":"            \u0027ovn-cms-options\u0027: \u0027enable-chassis-as-gw,availability-zones\u003daz-0\u0027}"},{"line_number":695,"context_line":"        new \u003d fakes.FakeOvsdbTable.create_one_ovsdb_table("},{"line_number":696,"context_line":"            attrs\u003d{\u0027name\u0027: \u0027SpongeBob\u0027, \u0027external_ids\u0027: ext_ids})"},{"line_number":697,"context_line":"        old \u003d new"},{"line_number":698,"context_line":"        self.assertIsNone(self.event.handle_ha_chassis_group_changes("},{"line_number":699,"context_line":"            self.event.ROW_UPDATE, new, old))"}],"source_content_type":"text/x-python","patch_set":7,"id":"c1e5d77b_ffed9221","line":696,"range":{"start_line":696,"start_character":28,"end_line":696,"end_character":37},"in_reply_to":"e9f1a57f_7cf75230","updated":"2021-04-30 08:42:02.000000000","message":":D","commit_id":"111c60afc57ee0205116cdc8f77ad50dc495d013"}]}
