)]}'
{"networking_baremetal/agent/l2vni_trunk_manager.py":[{"author":{"_account_id":5890,"name":"Doug Goldstein","email":"cardoe@cardoe.com","username":"cardoe"},"change_message_id":"011d5f1941985bb0c81519764cf596e78bd0d185","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        for chassis in self.ovn_sb_idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":162,"context_line":"            # Only cache chassis this agent should manage"},{"line_number":163,"context_line":"            if self._should_manage_chassis(chassis.name):"},{"line_number":164,"context_line":"                cache[chassis.name] \u003d chassis"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return cache"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"27b0487b_96059145","line":164,"updated":"2026-03-26 14:53:06.000000000","message":"If you really wanted to optimize this Python will be much more efficient with a comprehension:\n\n```\ncache \u003d {\n  chassis.name: chassis\n  for chassis in self.ovn_sb_idl.tables[\u0027Chassis\u0027].rows.values()\n  if self._should_manage_chassis(chassis.name)\n}\n```","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0dae4bac824af8615f56a22e831037a97e344a16","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        for chassis in self.ovn_sb_idl.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":162,"context_line":"            # Only cache chassis this agent should manage"},{"line_number":163,"context_line":"            if self._should_manage_chassis(chassis.name):"},{"line_number":164,"context_line":"                cache[chassis.name] \u003d chassis"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        return cache"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"09ebaf86_d91b91d7","line":164,"in_reply_to":"27b0487b_96059145","updated":"2026-03-26 22:34:16.000000000","message":"Done.","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"},{"author":{"_account_id":5890,"name":"Doug Goldstein","email":"cardoe@cardoe.com","username":"cardoe"},"change_message_id":"011d5f1941985bb0c81519764cf596e78bd0d185","unresolved":true,"context_lines":[{"line_number":728,"context_line":"        \"\"\""},{"line_number":729,"context_line":"        try:"},{"line_number":730,"context_line":"            if not hasattr(self.ovn_nb_idl, \u0027tables\u0027):"},{"line_number":731,"context_line":"                return None"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"            if \u0027Logical_Switch\u0027 not in self.ovn_nb_idl.tables:"},{"line_number":734,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"874cdb68_0c211a7c","line":731,"updated":"2026-03-26 14:53:06.000000000","message":"Can\u0027t we just check if the nb_idl has \"tables\" when we first get the nb_idl? Otherwise it\u0027s invalid and should be tossed away.","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0dae4bac824af8615f56a22e831037a97e344a16","unresolved":true,"context_lines":[{"line_number":728,"context_line":"        \"\"\""},{"line_number":729,"context_line":"        try:"},{"line_number":730,"context_line":"            if not hasattr(self.ovn_nb_idl, \u0027tables\u0027):"},{"line_number":731,"context_line":"                return None"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"            if \u0027Logical_Switch\u0027 not in self.ovn_nb_idl.tables:"},{"line_number":734,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba1357cd_855d149e","line":731,"in_reply_to":"874cdb68_0c211a7c","updated":"2026-03-26 22:34:16.000000000","message":"I\u0027ll propose a follow up for this.","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"},{"author":{"_account_id":5890,"name":"Doug Goldstein","email":"cardoe@cardoe.com","username":"cardoe"},"change_message_id":"011d5f1941985bb0c81519764cf596e78bd0d185","unresolved":true,"context_lines":[{"line_number":738,"context_line":"                if ls.name \u003d\u003d ls_name:"},{"line_number":739,"context_line":"                    return ls"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        except (AttributeError, KeyError):"},{"line_number":742,"context_line":"            LOG.exception(\"Failed to get logical switch %s\", ls_name)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"5086a334_3934a14f","line":741,"updated":"2026-03-26 14:53:06.000000000","message":"You cannot get a KeyError cause you already checked that the key is there.\n\nYou cannot get an AttributeError because \u0027name\u0027 is a required field of the schema.","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0dae4bac824af8615f56a22e831037a97e344a16","unresolved":true,"context_lines":[{"line_number":738,"context_line":"                if ls.name \u003d\u003d ls_name:"},{"line_number":739,"context_line":"                    return ls"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        except (AttributeError, KeyError):"},{"line_number":742,"context_line":"            LOG.exception(\"Failed to get logical switch %s\", ls_name)"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"2ca4e06a_fb2bab33","line":741,"in_reply_to":"5086a334_3934a14f","updated":"2026-03-26 22:34:16.000000000","message":"Good catch, there is a number of functions where the same try/except blocks are also not neeeded. I will do a separate follow up.","commit_id":"46c67e59019f3482631e59f63128b371fa972eaf"}]}
