)]}'
{"quantumclient/quantum/v2_0/router.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"5f33f00e3211f9af9c615e731c57ceb56167875b","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if self.action \u003d\u003d \u0027remove\u0027:"},{"line_number":143,"context_line":"            quantum_client.remove_interface_router(_router_id, body)"},{"line_number":144,"context_line":"            ret \u003d {}"},{"line_number":145,"context_line":"            msg \u003d (_(\u0027Removed interface \"%(port)s\" fromm router \"%(router)s\"\u0027)"},{"line_number":146,"context_line":"                   % {\u0027router\u0027: parsed_args.router_id,"},{"line_number":147,"context_line":"                      \u0027port\u0027: getattr(parsed_args, \u0027port_id\u0027, \u0027\u0027)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F518%3D","line":144,"updated":"2013-03-07 00:32:59.000000000","message":"no need for it.","commit_id":"916e17753c9c8c6e834d0f44ceb0cb5bb77d7a2b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if self.action \u003d\u003d \u0027remove\u0027:"},{"line_number":143,"context_line":"            quantum_client.remove_interface_router(_router_id, body)"},{"line_number":144,"context_line":"            ret \u003d {}"},{"line_number":145,"context_line":"            msg \u003d (_(\u0027Removed interface \"%(port)s\" fromm router \"%(router)s\"\u0027)"},{"line_number":146,"context_line":"                   % {\u0027router\u0027: parsed_args.router_id,"},{"line_number":147,"context_line":"                      \u0027port\u0027: getattr(parsed_args, \u0027port_id\u0027, \u0027\u0027)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5p4%3D","line":144,"in_reply_to":"AAAAN3%2F%2F518%3D","updated":"2013-03-07 04:55:56.000000000","message":"Done","commit_id":"916e17753c9c8c6e834d0f44ceb0cb5bb77d7a2b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"5f33f00e3211f9af9c615e731c57ceb56167875b","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            ret \u003d {}"},{"line_number":145,"context_line":"            msg \u003d (_(\u0027Removed interface \"%(port)s\" fromm router \"%(router)s\"\u0027)"},{"line_number":146,"context_line":"                   % {\u0027router\u0027: parsed_args.router_id,"},{"line_number":147,"context_line":"                      \u0027port\u0027: getattr(parsed_args, \u0027port_id\u0027, \u0027\u0027)})"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            ret \u003d quantum_client.add_interface_router(_router_id, body)"},{"line_number":150,"context_line":"            msg \u003d (_(\u0027Added interface \"%(port)s\" to router \"%(router)s\"\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F52A%3D","line":147,"updated":"2013-03-07 00:32:59.000000000","message":"if we are not adding port, the msg will be \"removed interface \"\" from router\", right?","commit_id":"916e17753c9c8c6e834d0f44ceb0cb5bb77d7a2b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"            ret \u003d {}"},{"line_number":145,"context_line":"            msg \u003d (_(\u0027Removed interface \"%(port)s\" fromm router \"%(router)s\"\u0027)"},{"line_number":146,"context_line":"                   % {\u0027router\u0027: parsed_args.router_id,"},{"line_number":147,"context_line":"                      \u0027port\u0027: getattr(parsed_args, \u0027port_id\u0027, \u0027\u0027)})"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            ret \u003d quantum_client.add_interface_router(_router_id, body)"},{"line_number":150,"context_line":"            msg \u003d (_(\u0027Added interface \"%(port)s\" to router \"%(router)s\"\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F5kI%3D","line":147,"in_reply_to":"AAAAN3%2F%2F52A%3D","updated":"2013-03-07 04:55:56.000000000","message":"Thanks. I\u0027ll reconsider the messages.\n\nIn case of router-interface-add with subnet_id, \"Add interface \u003cport_id\u003e to router routerX\" below also needs to be improved.","commit_id":"916e17753c9c8c6e834d0f44ceb0cb5bb77d7a2b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"5f33f00e3211f9af9c615e731c57ceb56167875b","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            _subnet_id \u003d quantumv20.find_resourceid_by_name_or_id("},{"line_number":139,"context_line":"                quantum_client, \u0027subnet\u0027, parsed_args.subnet_id)"},{"line_number":140,"context_line":"            body \u003d {\u0027subnet_id\u0027: _subnet_id}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if self.action \u003d\u003d \u0027remove\u0027:"},{"line_number":143,"context_line":"            quantum_client.remove_interface_router(_router_id, body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOX%2F%2F6Xw%3D","line":140,"updated":"2013-04-07 11:27:56.000000000","message":"How about using method override in subclass to do this kind of stuff instead of branches?\nfor example:\n\ndef find_resource_id(client, _id){}\n\ndef call_api(router_id, body){}\n\nclass AddInterfaceRouter(RouterInterfaceCommand):\n\n    def find_resource_id(client, _id){\n\n          _subnet_id \u003d quantumv20.find_resourceid_by_name_or_id(\n\n               client, \u0027subnet\u0027, _id)\n\n          return (_subnet_id,  {\u0027subnet_id\u0027: _subnet_id})\n\n   def call_api(router_id, body){\n\n          quantum_client.add_interface_router(router_id, body)\n\n       }\n....","commit_id":"b9ebbe14c4d19b59640a10ae85848e0e91716120"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            _subnet_id \u003d quantumv20.find_resourceid_by_name_or_id("},{"line_number":139,"context_line":"                quantum_client, \u0027subnet\u0027, parsed_args.subnet_id)"},{"line_number":140,"context_line":"            body \u003d {\u0027subnet_id\u0027: _subnet_id}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if self.action \u003d\u003d \u0027remove\u0027:"},{"line_number":143,"context_line":"            quantum_client.remove_interface_router(_router_id, body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2F6u4%3D","line":140,"in_reply_to":"AAAAOX%2F%2F6Xw%3D","updated":"2013-04-11 17:13:17.000000000","message":"Done. According to your suggestion, I updated the code. I hope it is what you expected.","commit_id":"b9ebbe14c4d19b59640a10ae85848e0e91716120"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":113,"context_line":"        parser \u003d super(RouterInterfaceCommand, self).get_parser(prog_name)"},{"line_number":114,"context_line":"        parser.add_argument("},{"line_number":115,"context_line":"            \u0027router_id\u0027, metavar\u003d\u0027ROUTER\u0027,"},{"line_number":116,"context_line":"            help\u003d\u0027ID or name of the router\u0027)"},{"line_number":117,"context_line":"        parser.add_argument("},{"line_number":118,"context_line":"            \u0027interface\u0027, metavar\u003d\u0027INTERFACE\u0027,"},{"line_number":119,"context_line":"            help\u003d\u0027The format is \"SUBNET|subnet\u003dSUBNET|port\u003dPORT\". \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Furk%3D","line":116,"updated":"2013-04-25 21:14:04.000000000","message":"why is this change part of this patchset? Aren\u0027t we dealing with just the support for adding router interface by port id? It sounds like this should be part of a different patch. Could you clarify?","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":113,"context_line":"        parser \u003d super(RouterInterfaceCommand, self).get_parser(prog_name)"},{"line_number":114,"context_line":"        parser.add_argument("},{"line_number":115,"context_line":"            \u0027router_id\u0027, metavar\u003d\u0027ROUTER\u0027,"},{"line_number":116,"context_line":"            help\u003d\u0027ID or name of the router\u0027)"},{"line_number":117,"context_line":"        parser.add_argument("},{"line_number":118,"context_line":"            \u0027interface\u0027, metavar\u003d\u0027INTERFACE\u0027,"},{"line_number":119,"context_line":"            help\u003d\u0027The format is \"SUBNET|subnet\u003dSUBNET|port\u003dPORT\". \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuWE%3D","line":116,"in_reply_to":"AAAAOn%2F%2Furk%3D","updated":"2013-04-26 02:56:29.000000000","message":"As you said my patch is just changing router-interface-add/delete command. ROUTER positional argument is not a part of the patch, but the message is wrong and it is a part of router-interface-add/delete. This is the only reason I changed.\n\nThere are similar cases throughout this file, so I think it is better to fix them in a separate patch and dropped it from my patch. It applies to around L.201 and L.232 too.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":117,"context_line":"        parser.add_argument("},{"line_number":118,"context_line":"            \u0027interface\u0027, metavar\u003d\u0027INTERFACE\u0027,"},{"line_number":119,"context_line":"            help\u003d\u0027The format is \"SUBNET|subnet\u003dSUBNET|port\u003dPORT\". \u0027"},{"line_number":120,"context_line":"            \u0027Either of subnet or port must be specified. \u0027"},{"line_number":121,"context_line":"            \u0027Both ID and name are accepted as SUBNET or PORT. \u0027"},{"line_number":122,"context_line":"            \u0027Note that \"subnet\u003d\" can be omitted when specifying subnet.\u0027)"},{"line_number":123,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FurA%3D","line":120,"updated":"2013-04-25 21:14:04.000000000","message":"s/of/a","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":117,"context_line":"        parser.add_argument("},{"line_number":118,"context_line":"            \u0027interface\u0027, metavar\u003d\u0027INTERFACE\u0027,"},{"line_number":119,"context_line":"            help\u003d\u0027The format is \"SUBNET|subnet\u003dSUBNET|port\u003dPORT\". \u0027"},{"line_number":120,"context_line":"            \u0027Either of subnet or port must be specified. \u0027"},{"line_number":121,"context_line":"            \u0027Both ID and name are accepted as SUBNET or PORT. \u0027"},{"line_number":122,"context_line":"            \u0027Note that \"subnet\u003d\" can be omitted when specifying subnet.\u0027)"},{"line_number":123,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuV8%3D","line":120,"in_reply_to":"AAAAOn%2F%2FurA%3D","updated":"2013-04-26 02:56:29.000000000","message":"Done","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":128,"context_line":"        quantum_client.format \u003d parsed_args.request_format"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if \u0027\u003d\u0027 in parsed_args.interface:"},{"line_number":131,"context_line":"            interface \u003d utils.str2dict(parsed_args.interface)"},{"line_number":132,"context_line":"            if (len(interface.keys()) \u003e 1 or"},{"line_number":133,"context_line":"                interface.keys()[0] not in [\u0027subnet\u0027, \u0027port\u0027]):"},{"line_number":134,"context_line":"                exceptions.CommandError(\u0027You must specify either subnet or \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuqI%3D","line":131,"updated":"2013-04-25 21:14:04.000000000","message":"str2dict looks a bit like an overkill, but I can see how it\u0027s more bullet-proof this way.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if (len(interface.keys()) \u003e 1 or"},{"line_number":133,"context_line":"                interface.keys()[0] not in [\u0027subnet\u0027, \u0027port\u0027]):"},{"line_number":134,"context_line":"                exceptions.CommandError(\u0027You must specify either subnet or \u0027"},{"line_number":135,"context_line":"                                        \u0027port for INTERFACE parameter.\u0027)"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            interface \u003d {\u0027subnet\u0027: parsed_args.interface}"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Fuok%3D","line":135,"updated":"2013-04-25 21:14:04.000000000","message":"if here you did:\n\nelse:\n    res_label, res_value \u003d interface.popitem()\n    _interface_id \u003d quantumv20.find_resourceid_by_name_or_id(quantum_client, res_label, res_value)\n    body \u003d {\u0027%s_id\u0027 % res_label: _interface_id}\n\nYou wouldn\u0027t need to have so much repetition below (line 142+).","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"            if (len(interface.keys()) \u003e 1 or"},{"line_number":133,"context_line":"                interface.keys()[0] not in [\u0027subnet\u0027, \u0027port\u0027]):"},{"line_number":134,"context_line":"                exceptions.CommandError(\u0027You must specify either subnet or \u0027"},{"line_number":135,"context_line":"                                        \u0027port for INTERFACE parameter.\u0027)"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            interface \u003d {\u0027subnet\u0027: parsed_args.interface}"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuVk%3D","line":135,"in_reply_to":"AAAAOn%2F%2Fuok%3D","updated":"2013-04-26 02:56:29.000000000","message":"Done. Thanks for the advice.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":149,"context_line":"            body \u003d {\u0027subnet_id\u0027: _subnet_id}"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        self.call_api(quantum_client, _router_id, body)"},{"line_number":152,"context_line":"        print \u003e\u003eself.app.stdout, self.success_message(_router_id, interface)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"class AddInterfaceRouter(RouterInterfaceCommand):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuoA%3D","line":152,"updated":"2013-04-25 21:14:04.000000000","message":"if you followed comment below you\u0027d need to change the signature of this method by passing res_label and res_value and the else at line 136 would become:\n\nelse:\n    res_label \u003d \u0027subnet\u0027\n    res_value \u003d parsed_args.interface","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":161,"context_line":"        quantum_client.add_interface_router(router_id, body)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def success_message(self, router_id, interface):"},{"line_number":164,"context_line":"        if \u0027port\u0027 in interface:"},{"line_number":165,"context_line":"            return (_(\u0027Added interface %(port)s to router %(router)s.\u0027) %"},{"line_number":166,"context_line":"                    {\u0027router\u0027: router_id, \u0027port\u0027: interface[\u0027port\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuoM%3D","line":163,"updated":"2013-04-25 21:14:04.000000000","message":"this feels unnecessary; You could parametrize this by doing:\n\ndef success_message(self, router_id, res_label, res_value):\n    return (_(\u0027Added interface %(res_label)s to router %(router)s.\u0027) % {\u0027router\u0027: router_id, res_label: res_value})","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":161,"context_line":"        quantum_client.add_interface_router(router_id, body)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def success_message(self, router_id, interface):"},{"line_number":164,"context_line":"        if \u0027port\u0027 in interface:"},{"line_number":165,"context_line":"            return (_(\u0027Added interface %(port)s to router %(router)s.\u0027) %"},{"line_number":166,"context_line":"                    {\u0027router\u0027: router_id, \u0027port\u0027: interface[\u0027port\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuVI%3D","line":163,"in_reply_to":"AAAAOn%2F%2FuoM%3D","updated":"2013-04-26 02:56:29.000000000","message":"\"Added interface \u003csubnet-id\u003e to router \u003crouter-id\u003e.\" (in case of subnet) looks strange since \u003csubnet-id\u003e is not an interface.\n\nI changed the message to \"Added interface 62344463-832a-4207-b57c-f7e5aa087283 to router router1.\" The original message is \"Added interface to router %s\" and it solves TODO (print port ID that is added). I think it provides enough information.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":179,"context_line":"        quantum_client.remove_interface_router(router_id, body)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def success_message(self, router_id, interface):"},{"line_number":182,"context_line":"        if \u0027port\u0027 in interface:"},{"line_number":183,"context_line":"            return (_(\u0027Removed interface %(port)s from router %(router)s.\u0027) %"},{"line_number":184,"context_line":"                    {\u0027router\u0027: router_id, \u0027port\u0027: interface[\u0027port\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuoI%3D","line":181,"updated":"2013-04-25 21:14:04.000000000","message":"same comment as above","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":202,"context_line":"            help\u003d\u0027ID or name of the router\u0027)"},{"line_number":203,"context_line":"        parser.add_argument("},{"line_number":204,"context_line":"            \u0027external_network_id\u0027, metavar\u003d\u0027EXTERNAL_NETWORK\u0027,"},{"line_number":205,"context_line":"            help\u003d\u0027ID or name of the external network for the gateway\u0027)"},{"line_number":206,"context_line":"        return parser"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def run(self, parsed_args):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuV4%3D","line":205,"updated":"2013-04-26 02:56:29.000000000","message":"Removed from the patch.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":230,"context_line":"        parser \u003d super(RemoveGatewayRouter, self).get_parser(prog_name)"},{"line_number":231,"context_line":"        parser.add_argument("},{"line_number":232,"context_line":"            \u0027router_id\u0027, metavar\u003d\u0027ROUTER\u0027,"},{"line_number":233,"context_line":"            help\u003d\u0027ID or name of the router\u0027)"},{"line_number":234,"context_line":"        return parser"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def run(self, parsed_args):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FuV0%3D","line":233,"updated":"2013-04-26 02:56:29.000000000","message":"Removed from the patch.","commit_id":"8837a36cdea760507a02d5d5adf8e92f42d3917f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    log \u003d logging.getLogger(__name__ + \u0027.AddInterfaceRouter\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":157,"context_line":"        return quantum_client.add_interface_router(router_id, body)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def success_message(self, router_id, portinfo):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtkY%3D","line":156,"updated":"2013-04-26 16:18:55.000000000","message":"The call_api methods are nothing more than a pass through; could you clarify their introduction?","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    log \u003d logging.getLogger(__name__ + \u0027.AddInterfaceRouter\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":157,"context_line":"        return quantum_client.add_interface_router(router_id, body)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def success_message(self, router_id, portinfo):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtPk%3D","line":156,"in_reply_to":"AAAAOn%2F%2FtV8%3D","updated":"2013-04-26 19:25:06.000000000","message":"What I meant was that I couldn\u0027t see the benefit of adding an extra call and the extra level of abstraction, if all we\u0027re doing here is to call the quantum_client method.\n\nWe could save the extra call, that\u0027s all. I could say the same for method success_message() but I can see that it could be called multiple places and future needs might require to change the output message. With a separate method the change happens all at once.","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    log \u003d logging.getLogger(__name__ + \u0027.AddInterfaceRouter\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def call_api(self, quantum_client, router_id, body):"},{"line_number":157,"context_line":"        return quantum_client.add_interface_router(router_id, body)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def success_message(self, router_id, portinfo):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtV8%3D","line":156,"in_reply_to":"AAAAOn%2F%2FtkY%3D","updated":"2013-04-26 18:33:54.000000000","message":"I just want to switch the method. Is it better to pass \"add\" or \"remove\" by class variable or something?","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"}],"tests/unit/test_cli20_router.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self._test_show_resource(resource, cmd, self.test_id, args,"},{"line_number":130,"context_line":"                                 [\u0027id\u0027, \u0027name\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Ftjw%3D","line":132,"updated":"2013-04-26 16:18:55.000000000","message":"wouldn\u0027t it be better to use \u0027interface\u0027 instead of \u0027mode\u0027?","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self._test_show_resource(resource, cmd, self.test_id, args,"},{"line_number":130,"context_line":"                                 [\u0027id\u0027, \u0027name\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtP8%3D","line":132,"in_reply_to":"AAAAOn%2F%2FtVU%3D","updated":"2013-04-26 19:25:06.000000000","message":"how about resource?","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self._test_show_resource(resource, cmd, self.test_id, args,"},{"line_number":130,"context_line":"                                 [\u0027id\u0027, \u0027name\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtVU%3D","line":132,"in_reply_to":"AAAAOn%2F%2Ftjw%3D","updated":"2013-04-26 18:33:54.000000000","message":"\"interface\" is better from the point of consistency with the main code. Honestly I am wondering a good word which fits both \"subnet\" and \"port\".","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"},{"line_number":136,"context_line":"            body \u003d {\u0027port_id\u0027: \u0027portid\u0027}"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            body \u003d {\u0027subnet_id\u0027: \u0027subnetid\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtjY%3D","line":135,"updated":"2013-04-26 16:18:55.000000000","message":"you\u0027re testing for equality here, why are you using the is operator? Besides, you could just do:\n\nbody \u003d {\u0027%s_id\u0027 % mode: \u0027%sid\" % mode}\n\nand avoid the if/else altogether.","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"},{"line_number":136,"context_line":"            body \u003d {\u0027port_id\u0027: \u0027portid\u0027}"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            body \u003d {\u0027subnet_id\u0027: \u0027subnetid\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtP0%3D","line":135,"in_reply_to":"AAAAOn%2F%2FtWg%3D","updated":"2013-04-26 19:25:06.000000000","message":"up to you; this part of the code is pretty straightforward anyway.","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"    def _test_add_remove_interface(self, action, mode, cmd, args):"},{"line_number":133,"context_line":"        resource \u003d \u0027router\u0027"},{"line_number":134,"context_line":"        subcmd \u003d \u0027%s_router_interface\u0027 % action"},{"line_number":135,"context_line":"        if mode is \u0027port\u0027:"},{"line_number":136,"context_line":"            body \u003d {\u0027port_id\u0027: \u0027portid\u0027}"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            body \u003d {\u0027subnet_id\u0027: \u0027subnetid\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FtWg%3D","line":135,"in_reply_to":"AAAAOn%2F%2FtjY%3D","updated":"2013-04-26 18:33:54.000000000","message":"At the first point, thanks. It should be \u003d\u003d.\n\nAt the second point, I try to keep the logic clear and would like to use other logic than the code itself. I thought the same as your comment once. What do you think?","commit_id":"d4adfd9798b9debbebb9033e016624e16d10d9bd"}]}
