)]}'
{"manila/network/linux/interface.py":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"169d7a8d20fbae2a24c375fdd0b10aad6789f352","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                \u0027external-ids:attached-mac\u003d%s\u0027 % mac_address]"},{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            utils.execute(*cmd, run_as_root\u003dTrue)"},{"line_number":133,"context_line":"\texcept Exception as e:"},{"line_number":134,"context_line":"                LOG.error(_LE(\"\u0027%s\u0027\"),e)"},{"line_number":135,"context_line":"                raise"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_23c3468c","line":133,"updated":"2017-02-27 15:49:29.000000000","message":"TAB! No tabs.","commit_id":"f35d0c300bb7a053686d22aeb564658420f61190"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"169d7a8d20fbae2a24c375fdd0b10aad6789f352","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            utils.execute(*cmd, run_as_root\u003dTrue)"},{"line_number":133,"context_line":"\texcept Exception as e:"},{"line_number":134,"context_line":"                LOG.error(_LE(\"\u0027%s\u0027\"),e)"},{"line_number":135,"context_line":"                raise"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @device_name_synchronized"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_43475a1d","line":134,"range":{"start_line":134,"start_character":30,"end_line":134,"end_character":37},"updated":"2017-02-27 15:49:29.000000000","message":"There is nothing to localize here.  _LE is for localization.","commit_id":"f35d0c300bb7a053686d22aeb564658420f61190"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"169d7a8d20fbae2a24c375fdd0b10aad6789f352","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            utils.execute(*cmd, run_as_root\u003dTrue)"},{"line_number":133,"context_line":"\texcept Exception as e:"},{"line_number":134,"context_line":"                LOG.error(_LE(\"\u0027%s\u0027\"),e)"},{"line_number":135,"context_line":"                raise"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @device_name_synchronized"},{"line_number":138,"context_line":"    def plug(self, device_name, port_id, mac_address,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da36d5c6_e30daee9","line":135,"range":{"start_line":135,"start_character":16,"end_line":135,"end_character":21},"updated":"2017-02-27 15:49:29.000000000","message":"So I guess you are only catching it so that you can log it.  Isn\u0027t the exception logged at all after it is raised?","commit_id":"f35d0c300bb7a053686d22aeb564658420f61190"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"a4b65cdaa911ddce089fd5da385f06ba473ccd37","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                \u0027external-ids:iface-status\u003dactive\u0027,"},{"line_number":129,"context_line":"                \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, device_name,"},{"line_number":130,"context_line":"                \u0027external-ids:attached-mac\u003d%s\u0027 % mac_address]"},{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            utils.execute(*cmd, run_as_root\u003dTrue)"},{"line_number":133,"context_line":"        except Exception as e:"},{"line_number":134,"context_line":"            msg \u003d _(\"%s\") % e"},{"line_number":135,"context_line":"            raise exception.InvalidResults(msg)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @device_name_synchronized"},{"line_number":138,"context_line":"    def plug(self, device_name, port_id, mac_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da36d5c6_5ababdc1","line":135,"range":{"start_line":131,"start_character":0,"end_line":135,"end_character":47},"updated":"2017-02-28 09:56:52.000000000","message":"Please take a look at similar code running an ovs command at\n\nhttps://github.com/openstack/manila/blob/master/manila/network/linux/ovs_lib.py#L44-L50\n\nWe should use LOG.exception similarly here I think.\n\nPerhaps we should consider replacing _ovs_add_port with an ovs_lib.OVSBridge.add_port method and call it from the plug method here, analogous to the ovs_lib.OVSBridge.delete_port method that is called from the unplug method here.","commit_id":"72f0b392ba18eeb6f578bb0a36076bd7f51066a7"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"24afe76769120b0fb7bc68c6e7966904cf8fbc1e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                ovs.add_port(tap_name, port_id, mac_address)"},{"line_number":138,"context_line":"            except RuntimeError:"},{"line_number":139,"context_line":"                LOG.error(_LE(\"Failed plugging interface \u0027%s\u0027\"),"},{"line_number":140,"context_line":"                      device_name)"},{"line_number":141,"context_line":"            ns_dev.link.set_address(mac_address)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            # Add an interface created by ovs to the namespace."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_3f1df473","line":140,"range":{"start_line":140,"start_character":21,"end_line":140,"end_character":34},"updated":"2017-03-01 10:43:51.000000000","message":"pep complains that this line is under-indented: put the \u0027d\u0027 under the \u0027_\u0027 in the previous line.","commit_id":"932a16c98a07d9cc0bb25c1bb1ec3d4f9af8c95f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"e50aed1e791c8c82d168f5c0b0eea32e83761b81","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            tap_name \u003d self._get_tap_name(device_name)"},{"line_number":134,"context_line":"            ovs \u003d ovs_lib.OVSBridge(bridge)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            try:"},{"line_number":137,"context_line":"                ovs.add_port(tap_name, port_id, mac_address)"},{"line_number":138,"context_line":"            except RuntimeError:"},{"line_number":139,"context_line":"                LOG.error(_LE(\"Failed plugging interface \u0027%s\u0027\"),"},{"line_number":140,"context_line":"                          device_name)"},{"line_number":141,"context_line":"            ns_dev.link.set_address(mac_address)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            # Add an interface created by ovs to the namespace."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba2be162_25df256a","line":140,"range":{"start_line":136,"start_character":12,"end_line":140,"end_character":38},"updated":"2017-03-03 13:36:31.000000000","message":"Wrapping exception with some handled thing is ok, but you change logic here suppressing error. Why?","commit_id":"23a198711681d241d971c10f3f2e424839b19e44"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"0c981c45808fb701973ecbc1c4746541180bb79c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            tap_name \u003d self._get_tap_name(device_name)"},{"line_number":134,"context_line":"            ovs \u003d ovs_lib.OVSBridge(bridge)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            try:"},{"line_number":137,"context_line":"                ovs.add_port(tap_name, port_id, mac_address)"},{"line_number":138,"context_line":"            except RuntimeError:"},{"line_number":139,"context_line":"                LOG.error(_LE(\"Failed plugging interface \u0027%s\u0027\"),"},{"line_number":140,"context_line":"                          device_name)"},{"line_number":141,"context_line":"            ns_dev.link.set_address(mac_address)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            # Add an interface created by ovs to the namespace."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba2be162_01c3e7ed","line":140,"range":{"start_line":136,"start_character":12,"end_line":140,"end_character":38},"in_reply_to":"ba2be162_25df256a","updated":"2017-03-03 18:07:37.000000000","message":"Good question.  The same thing is done for unplug, but in that case continuing on instead of raising may make sense since it\u0027s a tear-down operation.  Not sure ...","commit_id":"23a198711681d241d971c10f3f2e424839b19e44"}],"manila/network/linux/ovs_lib.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"24afe76769120b0fb7bc68c6e7966904cf8fbc1e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        return re.compile(_re, re.M | re.X)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def run_vsctl(self, args):"},{"line_number":45,"context_line":"        full_args \u003d [\"ovs-vsctl\", \"--timeout\u003d2\"] + args"},{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            return utils.execute(*full_args, run_as_root\u003dTrue)"},{"line_number":48,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_1abafee1","line":45,"range":{"start_line":45,"start_character":33,"end_line":45,"end_character":47},"updated":"2017-03-01 10:43:51.000000000","message":"To get your unit tests to pass you\u0027ll need not only to make the correction mentioned in the next comment, but also add the \u0027--timeout\u003d2\u0027 to the vsctl_cmd variable in manila.tests.network.linux.test_interface.TestOVSInterfaceDriver._test_plug.","commit_id":"932a16c98a07d9cc0bb25c1bb1ec3d4f9af8c95f"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"24afe76769120b0fb7bc68c6e7966904cf8fbc1e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                        port_name])"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def add_port(self, device_name, port_name, mac_address, internal\u003dTrue):"},{"line_number":61,"context_line":"        cmd \u003d [\u0027ovs-vsctl\u0027, \u0027--\u0027, \u0027--may-exist\u0027,"},{"line_number":62,"context_line":"               \u0027add-port\u0027, self.br_name, device_name]"},{"line_number":63,"context_line":"        if internal:"},{"line_number":64,"context_line":"            cmd +\u003d [\u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, device_name, \u0027type\u003dinternal\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_3aa0a2f4","line":61,"range":{"start_line":61,"start_character":1,"end_line":61,"end_character":48},"updated":"2017-03-01 10:43:51.000000000","message":"The run_vsctl method puts \u0027ovs-vsctl\u0027 and \u0027--timeout\u003d2\u0027 at the head of the command, so leave out the \u0027ovs-vsctl\u0027 here.  Also, since the part of the command line that you build up and pass to run_vsctl will not be the whole command call the variable \u0027cmd_args\u0027 or something like that instead of \u0027cmd\u0027.","commit_id":"932a16c98a07d9cc0bb25c1bb1ec3d4f9af8c95f"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"f0f14e7f8e6fa015d2b04b47b009973b147d92a2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, device_name,"},{"line_number":70,"context_line":"                \u0027external-ids:attached-mac\u003d%s\u0027 % mac_address]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.run_addvsctl(cmd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba2be162_95451544","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":30},"updated":"2017-03-06 13:21:21.000000000","message":"typo?","commit_id":"40048fa5a00e4801c500581bacbbdc427f5d8327"}]}
