)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     sadasu \u003csadasu@cisco.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-05-03 19:22:38 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve checking or return values for functions in linuxbridge agent plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1167780"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAOn%2F%2Fjlg%3D","line":7,"updated":"2013-05-04 00:31:38.000000000","message":"s/or/of/g","commit_id":"4c22a8c698a10022aff80eadf9301d80dcfaea75"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     sadasu \u003csadasu@cisco.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-05-03 19:22:38 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve checking or return values for functions in linuxbridge agent plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1167780"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAOn%2F%2FjYg%3D","line":7,"in_reply_to":"AAAAOn%2F%2Fjlg%3D","updated":"2013-05-04 14:19:56.000000000","message":"Done","commit_id":"4c22a8c698a10022aff80eadf9301d80dcfaea75"}],"quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d432eb3a14f51668b3835723bcd874b47bdf3da4","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""},{"line_number":162,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":163,"context_line":"        self.ensure_bridge(bridge_name)"},{"line_number":164,"context_line":"        return bridge_name"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def ensure_vlan(self, physical_interface, vlan_id):"},{"line_number":167,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoRM%3D","line":164,"updated":"2013-05-01 08:07:56.000000000","message":"Not used in calling code","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""},{"line_number":162,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":163,"context_line":"        self.ensure_bridge(bridge_name)"},{"line_number":164,"context_line":"        return bridge_name"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def ensure_vlan(self, physical_interface, vlan_id):"},{"line_number":167,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FnTo%3D","line":164,"in_reply_to":"AAAAOn%2F%2FoKo%3D","updated":"2013-05-01 20:14:41.000000000","message":"Modifying ensure_bridge() to return True or False so that ensure_local_bridge() can use that return value.","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c8632eff6c099075d51eb7a2bad79e85f3ce00aa","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""},{"line_number":162,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":163,"context_line":"        self.ensure_bridge(bridge_name)"},{"line_number":164,"context_line":"        return bridge_name"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def ensure_vlan(self, physical_interface, vlan_id):"},{"line_number":167,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoKo%3D","line":164,"in_reply_to":"AAAAOn%2F%2FoRM%3D","updated":"2013-05-01 11:55:22.000000000","message":"There is inconsistency in the ensure_* functions. Some return values, some do not. It doesn\u0027t seem like returned value is used (should check all use though).","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d432eb3a14f51668b3835723bcd874b47bdf3da4","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                              physical_interface,"},{"line_number":177,"context_line":"                              \u0027name\u0027, interface, \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027,"},{"line_number":178,"context_line":"                              vlan_id], root_helper\u003dself.root_helper):"},{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoRY%3D","line":179,"updated":"2013-05-01 08:07:56.000000000","message":"IMHO, that would be an incorrect logic:\ncommands did not succeed, but return value is the same.","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                              physical_interface,"},{"line_number":177,"context_line":"                              \u0027name\u0027, interface, \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027,"},{"line_number":178,"context_line":"                              vlan_id], root_helper\u003dself.root_helper):"},{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FnTM%3D","line":179,"in_reply_to":"AAAAOn%2F%2FoLQ%3D","updated":"2013-05-01 20:14:41.000000000","message":"Same as previous comment, not sure if this indicates a failure for me to return False.","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                              physical_interface,"},{"line_number":177,"context_line":"                              \u0027name\u0027, interface, \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027,"},{"line_number":178,"context_line":"                              vlan_id], root_helper\u003dself.root_helper):"},{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FnTY%3D","line":179,"in_reply_to":"AAAAOn%2F%2FoRY%3D","updated":"2013-05-01 20:14:41.000000000","message":"I was thinking the same while making this change, but I don\u0027t think the calls to utils.execute() indicate any type of failure for me to return False.","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c8632eff6c099075d51eb7a2bad79e85f3ce00aa","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                              physical_interface,"},{"line_number":177,"context_line":"                              \u0027name\u0027, interface, \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027,"},{"line_number":178,"context_line":"                              vlan_id], root_helper\u003dself.root_helper):"},{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoLQ%3D","line":179,"in_reply_to":"AAAAOn%2F%2FoRY%3D","updated":"2013-05-01 11:55:22.000000000","message":"return False?  See comment below.","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d432eb3a14f51668b3835723bcd874b47bdf3da4","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"},{"line_number":183,"context_line":"            LOG.debug(_(\"Done creating subinterface %s\"), interface)"},{"line_number":184,"context_line":"        return interface"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoRQ%3D","line":182,"updated":"2013-05-01 08:07:56.000000000","message":"ditto","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                return interface"},{"line_number":180,"context_line":"            if utils.execute([\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027,"},{"line_number":181,"context_line":"                              interface, \u0027up\u0027], root_helper\u003dself.root_helper):"},{"line_number":182,"context_line":"                return interface"},{"line_number":183,"context_line":"            LOG.debug(_(\"Done creating subinterface %s\"), interface)"},{"line_number":184,"context_line":"        return interface"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FnTI%3D","line":182,"in_reply_to":"AAAAOn%2F%2FoRQ%3D","updated":"2013-05-01 20:14:41.000000000","message":"Same as above","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c8632eff6c099075d51eb7a2bad79e85f3ce00aa","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                      physical_network)"},{"line_number":264,"context_line":"            return False"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        if int(vlan_id) \u003d\u003d lconst.FLAT_VLAN_ID:"},{"line_number":267,"context_line":"            self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":268,"context_line":"        else:"},{"line_number":269,"context_line":"            self.ensure_vlan_bridge(network_id, physical_interface,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FoKU%3D","line":266,"updated":"2013-05-01 11:55:22.000000000","message":"Should the result of ensure_physical_in_bridge() depend on the result of the call to ensure_flat_bridge() and ensure_vlan_bridge(), or is it always guaranteed to be True?\n\nIf former, then return value should be checked and the ensure functions should always return a value (or False). If latter, then ensure functions shouldn\u0027t return anything (unless someone is using the output).\n\nThis is the clause that initiated the bug report. In part of blueprint vxlan-linuxbridge (not committed yet), the clause tested an ensure function for flat, vlan, or vxlan, collected the result, and did an ugly \"return ret and True or False\", because some of the ensure functions returned None.\n\nAs mentioned above, either there should be no returns at all from these ensures, or they should have a well defined return value (explicit).","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":263,"context_line":"                      physical_network)"},{"line_number":264,"context_line":"            return False"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        if int(vlan_id) \u003d\u003d lconst.FLAT_VLAN_ID:"},{"line_number":267,"context_line":"            self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":268,"context_line":"        else:"},{"line_number":269,"context_line":"            self.ensure_vlan_bridge(network_id, physical_interface,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FnTE%3D","line":266,"in_reply_to":"AAAAOn%2F%2FoKU%3D","updated":"2013-05-01 20:14:41.000000000","message":"Done","commit_id":"0227b7f9aae2a35a17f94e0799761fb4fbbfb24a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":141,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":142,"context_line":"        if self.ensure_bridge(bridge_name, interface):"},{"line_number":143,"context_line":"            return interface"},{"line_number":144,"context_line":"        return"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def get_interface_details(self, interface):"},{"line_number":147,"context_line":"        device \u003d self.ip.device(interface)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FjFg%3D","line":144,"updated":"2013-05-05 12:26:10.000000000","message":"you do not need the return. by default None is returned","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":142,"context_line":"        if self.ensure_bridge(bridge_name, interface):"},{"line_number":143,"context_line":"            return interface"},{"line_number":144,"context_line":"        return"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def get_interface_details(self, interface):"},{"line_number":147,"context_line":"        device \u003d self.ip.device(interface)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiIA%3D","line":144,"in_reply_to":"AAAAOn%2F%2FjFg%3D","updated":"2013-05-06 16:18:55.000000000","message":"Done","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":157,"context_line":"        ips, gateway \u003d self.get_interface_details(physical_interface)"},{"line_number":158,"context_line":"        if self.ensure_bridge(bridge_name, physical_interface, ips, gateway):"},{"line_number":159,"context_line":"            return physical_interface"},{"line_number":160,"context_line":"        return"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def ensure_local_bridge(self, network_id):"},{"line_number":163,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FjFc%3D","line":160,"updated":"2013-05-05 12:26:10.000000000","message":"ditto","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        ips, gateway \u003d self.get_interface_details(physical_interface)"},{"line_number":158,"context_line":"        if self.ensure_bridge(bridge_name, physical_interface, ips, gateway):"},{"line_number":159,"context_line":"            return physical_interface"},{"line_number":160,"context_line":"        return"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def ensure_local_bridge(self, network_id):"},{"line_number":163,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiH8%3D","line":160,"in_reply_to":"AAAAOn%2F%2FjFc%3D","updated":"2013-05-06 16:18:55.000000000","message":"Done","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":287,"context_line":"        if int(vlan_id) \u003d\u003d lconst.LOCAL_VLAN_ID:"},{"line_number":288,"context_line":"            self.ensure_local_bridge(network_id)"},{"line_number":289,"context_line":"        else:"},{"line_number":290,"context_line":"            if not self.ensure_physical_in_bridge(network_id,"},{"line_number":291,"context_line":"                                                  physical_network,"},{"line_number":292,"context_line":"                                                  vlan_id):"},{"line_number":293,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Figg%3D","line":290,"updated":"2013-05-06 11:28:03.000000000","message":"Can use \"elif not self.ensure...\"","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        if int(vlan_id) \u003d\u003d lconst.LOCAL_VLAN_ID:"},{"line_number":288,"context_line":"            self.ensure_local_bridge(network_id)"},{"line_number":289,"context_line":"        else:"},{"line_number":290,"context_line":"            if not self.ensure_physical_in_bridge(network_id,"},{"line_number":291,"context_line":"                                                  physical_network,"},{"line_number":292,"context_line":"                                                  vlan_id):"},{"line_number":293,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiH0%3D","line":290,"in_reply_to":"AAAAOn%2F%2Figg%3D","updated":"2013-05-06 16:18:55.000000000","message":"Done","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":"            if not self.ensure_physical_in_bridge(network_id,"},{"line_number":291,"context_line":"                                                  physical_network,"},{"line_number":292,"context_line":"                                                  vlan_id):"},{"line_number":293,"context_line":"                return False"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        # Check if device needs to be added to bridge"},{"line_number":296,"context_line":"        tap_device_in_bridge \u003d self.get_bridge_for_tap_device(tap_device_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FigI%3D","line":293,"updated":"2013-05-06 11:28:03.000000000","message":"Should there be a \"return True\" at the end of this function? Otherwise, it is either returning False or None.","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":"            if not self.ensure_physical_in_bridge(network_id,"},{"line_number":291,"context_line":"                                                  physical_network,"},{"line_number":292,"context_line":"                                                  vlan_id):"},{"line_number":293,"context_line":"                return False"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        # Check if device needs to be added to bridge"},{"line_number":296,"context_line":"        tap_device_in_bridge \u003d self.get_bridge_for_tap_device(tap_device_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiG8%3D","line":293,"in_reply_to":"AAAAOn%2F%2FiHw%3D","updated":"2013-05-06 16:29:47.000000000","message":"Sorry, didn\u0027t expand the file out fully.","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            if not self.ensure_physical_in_bridge(network_id,"},{"line_number":291,"context_line":"                                                  physical_network,"},{"line_number":292,"context_line":"                                                  vlan_id):"},{"line_number":293,"context_line":"                return False"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        # Check if device needs to be added to bridge"},{"line_number":296,"context_line":"        tap_device_in_bridge \u003d self.get_bridge_for_tap_device(tap_device_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiHw%3D","line":293,"in_reply_to":"AAAAOn%2F%2FigI%3D","updated":"2013-05-06 16:18:55.000000000","message":"Paul, this is not the end of the function. And, yes there is a return True at the real end of the function.","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def ensure_local_bridge(self, network_id):"},{"line_number":161,"context_line":"        \"\"\"Create a local bridge unless it already exists.\"\"\""},{"line_number":162,"context_line":"        bridge_name \u003d self.get_bridge_name(network_id)"},{"line_number":163,"context_line":"        \"\"\"Returns bridge_name if successful\"\"\""},{"line_number":164,"context_line":"        return self.ensure_bridge(bridge_name)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def ensure_vlan(self, physical_interface, vlan_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fh3k%3D","line":163,"updated":"2013-05-06 18:45:17.000000000","message":"This should be a # comment, or move it up to the method\u0027s docstring.","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":262,"context_line":"                      physical_network)"},{"line_number":263,"context_line":"            return"},{"line_number":264,"context_line":"        if int(vlan_id) \u003d\u003d lconst.FLAT_VLAN_ID:"},{"line_number":265,"context_line":"            \"\"\"Returns physical_interface if successful\"\"\""},{"line_number":266,"context_line":"            return self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            \"\"\"Returns interface if successful\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fh3g%3D","line":265,"updated":"2013-05-06 18:45:17.000000000","message":"This should be a # comment, or move it up to the method\u0027s docstring.","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":265,"context_line":"            \"\"\"Returns physical_interface if successful\"\"\""},{"line_number":266,"context_line":"            return self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            \"\"\"Returns interface if successful\"\"\""},{"line_number":269,"context_line":"            return self.ensure_vlan_bridge(network_id, physical_interface,"},{"line_number":270,"context_line":"                                           vlan_id)"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fh3Y%3D","line":268,"updated":"2013-05-06 18:45:17.000000000","message":"Ditto.","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            \"\"\"Returns physical_interface if successful\"\"\""},{"line_number":266,"context_line":"            return self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            \"\"\"Returns interface if successful\"\"\""},{"line_number":269,"context_line":"            return self.ensure_vlan_bridge(network_id, physical_interface,"},{"line_number":270,"context_line":"                                           vlan_id)"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FhuE%3D","line":268,"in_reply_to":"AAAAOn%2F%2Fh0U%3D","updated":"2013-05-06 19:58:03.000000000","message":"I agree with both Henry and Paul. I am unsure about adding / updating the doc string for some functions and not others in the file. Are there some consistency requirements that I might be breaking?","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":265,"context_line":"            \"\"\"Returns physical_interface if successful\"\"\""},{"line_number":266,"context_line":"            return self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            \"\"\"Returns interface if successful\"\"\""},{"line_number":269,"context_line":"            return self.ensure_vlan_bridge(network_id, physical_interface,"},{"line_number":270,"context_line":"                                           vlan_id)"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fh0U%3D","line":268,"in_reply_to":"AAAAOn%2F%2Fh1s%3D","updated":"2013-05-06 19:13:28.000000000","message":"Makes sense, as they aren\u0027t providing important info. You could indicate in the function docstring that returning I/F or None, but that\u0027s at your discretion.","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            \"\"\"Returns physical_interface if successful\"\"\""},{"line_number":266,"context_line":"            return self.ensure_flat_bridge(network_id, physical_interface)"},{"line_number":267,"context_line":"        else:"},{"line_number":268,"context_line":"            \"\"\"Returns interface if successful\"\"\""},{"line_number":269,"context_line":"            return self.ensure_vlan_bridge(network_id, physical_interface,"},{"line_number":270,"context_line":"                                           vlan_id)"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fh1s%3D","line":268,"in_reply_to":"AAAAOn%2F%2Fh3Y%3D","updated":"2013-05-06 19:01:37.000000000","message":"Would like to remove the 3 comments.","commit_id":"b556d464c5efd17ff9f7010719463d245104861f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":249,"context_line":"                            \"Exception: %(e)s\"),"},{"line_number":250,"context_line":"                          {\u0027interface\u0027: interface, \u0027bridge_name\u0027: bridge_name,"},{"line_number":251,"context_line":"                           \u0027e\u0027: e})"},{"line_number":252,"context_line":"                return"},{"line_number":253,"context_line":"        return bridge_name"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def ensure_physical_in_bridge(self, network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FfH4%3D","line":252,"updated":"2013-05-08 06:29:54.000000000","message":"This is a bit confusing here. Why not return the bridge name?","commit_id":"fa69228606ff42233a3f241a455157e675d398df"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"unresolved":false,"context_lines":[{"line_number":249,"context_line":"                            \"Exception: %(e)s\"),"},{"line_number":250,"context_line":"                          {\u0027interface\u0027: interface, \u0027bridge_name\u0027: bridge_name,"},{"line_number":251,"context_line":"                           \u0027e\u0027: e})"},{"line_number":252,"context_line":"                return"},{"line_number":253,"context_line":"        return bridge_name"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def ensure_physical_in_bridge(self, network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FddM%3D","line":252,"in_reply_to":"AAAAOn%2F%2Fdf8%3D","updated":"2013-05-08 22:34:31.000000000","message":"Ah, my bad...correct, that is what you want to avoid.","commit_id":"fa69228606ff42233a3f241a455157e675d398df"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":249,"context_line":"                            \"Exception: %(e)s\"),"},{"line_number":250,"context_line":"                          {\u0027interface\u0027: interface, \u0027bridge_name\u0027: bridge_name,"},{"line_number":251,"context_line":"                           \u0027e\u0027: e})"},{"line_number":252,"context_line":"                return"},{"line_number":253,"context_line":"        return bridge_name"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def ensure_physical_in_bridge(self, network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fdf8%3D","line":252,"in_reply_to":"AAAAOn%2F%2Fdo8%3D","updated":"2013-05-08 22:08:46.000000000","message":"@Sumit, if this return is removed then we will fall through and return bridge_name.","commit_id":"fa69228606ff42233a3f241a455157e675d398df"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"unresolved":false,"context_lines":[{"line_number":249,"context_line":"                            \"Exception: %(e)s\"),"},{"line_number":250,"context_line":"                          {\u0027interface\u0027: interface, \u0027bridge_name\u0027: bridge_name,"},{"line_number":251,"context_line":"                           \u0027e\u0027: e})"},{"line_number":252,"context_line":"                return"},{"line_number":253,"context_line":"        return bridge_name"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def ensure_physical_in_bridge(self, network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fdo8%3D","line":252,"in_reply_to":"AAAAOn%2F%2Fen4%3D","updated":"2013-05-08 21:27:16.000000000","message":"If you just want to return None, you can remove the explicit \"return\".","commit_id":"fa69228606ff42233a3f241a455157e675d398df"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                            \"Exception: %(e)s\"),"},{"line_number":250,"context_line":"                          {\u0027interface\u0027: interface, \u0027bridge_name\u0027: bridge_name,"},{"line_number":251,"context_line":"                           \u0027e\u0027: e})"},{"line_number":252,"context_line":"                return"},{"line_number":253,"context_line":"        return bridge_name"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def ensure_physical_in_bridge(self, network_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2Fen4%3D","line":252,"in_reply_to":"AAAAOn%2F%2FfH4%3D","updated":"2013-05-08 13:42:12.000000000","message":"Couple of reasons:\n\n1. There was a failure in adding the interface to the bridge. We are indicating any failures by retrurning a None.\n\n2. When ensure_bridge is called with an interface that is not None, this function is expected to add the interface to the bridge. Returning a bridge_name here would indicate that the interface was actually added to the bridge.","commit_id":"fa69228606ff42233a3f241a455157e675d398df"}],"quantum/tests/unit/linuxbridge/test_lb_quantum_agent.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":255,"context_line":"            with mock.patch.object(self.lbm, \u0027ensure_bridge\u0027) as ens:"},{"line_number":256,"context_line":"                res \u003d self.lbm.ensure_flat_bridge(\"123\", \"eth0\")"},{"line_number":257,"context_line":"                if res:"},{"line_number":258,"context_line":"                    self.assertEqual(res, \"eth0\")"},{"line_number":259,"context_line":"                self.assertTrue(list_fn.called)"},{"line_number":260,"context_line":"                self.assertTrue(getgw_fn.called)"},{"line_number":261,"context_line":"                ens.assert_called_once_with(\"brq123\", \"eth0\","}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FjlI%3D","line":258,"updated":"2013-05-04 00:31:38.000000000","message":"No need to change this. Leave lines 256-259 as they were.","commit_id":"4c22a8c698a10022aff80eadf9301d80dcfaea75"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            with mock.patch.object(self.lbm, \u0027ensure_bridge\u0027) as ens:"},{"line_number":256,"context_line":"                res \u003d self.lbm.ensure_flat_bridge(\"123\", \"eth0\")"},{"line_number":257,"context_line":"                if res:"},{"line_number":258,"context_line":"                    self.assertEqual(res, \"eth0\")"},{"line_number":259,"context_line":"                self.assertTrue(list_fn.called)"},{"line_number":260,"context_line":"                self.assertTrue(getgw_fn.called)"},{"line_number":261,"context_line":"                ens.assert_called_once_with(\"brq123\", \"eth0\","}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FjYo%3D","line":258,"in_reply_to":"AAAAOn%2F%2FjlI%3D","updated":"2013-05-04 14:19:56.000000000","message":"Done","commit_id":"4c22a8c698a10022aff80eadf9301d80dcfaea75"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":287,"context_line":"                self.assertEqual(self.lbm.ensure_vlan(\"eth0\", \"1\"), \"eth0.1\")"},{"line_number":288,"context_line":"                exec_fn.assert_called_twice()"},{"line_number":289,"context_line":"                exec_fn.return_value \u003d True"},{"line_number":290,"context_line":"                self.assertFalse(self.lbm.ensure_vlan(\"eth0\", \"1\"))"},{"line_number":291,"context_line":"                exec_fn.assert_called_once()"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def test_update_interface_ip_details(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FigY%3D","line":290,"updated":"2013-05-06 11:28:03.000000000","message":"ensure_vlan is returning a value or None. This should be unchanged and assertIsNone(), right?","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"257d83aa2a2c6d1f6d38a933b6b03da35d6c79e9","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                self.assertEqual(self.lbm.ensure_vlan(\"eth0\", \"1\"), \"eth0.1\")"},{"line_number":288,"context_line":"                exec_fn.assert_called_twice()"},{"line_number":289,"context_line":"                exec_fn.return_value \u003d True"},{"line_number":290,"context_line":"                self.assertFalse(self.lbm.ensure_vlan(\"eth0\", \"1\"))"},{"line_number":291,"context_line":"                exec_fn.assert_called_once()"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def test_update_interface_ip_details(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FiHs%3D","line":290,"in_reply_to":"AAAAOn%2F%2FigY%3D","updated":"2013-05-06 16:18:55.000000000","message":"Done","commit_id":"0a953a01cb81d2d69dad1dd040679175f4f12a38"}]}
