)]}'
{"neutron/plugins/ofagent/agent/ofa_neutron_agent.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    under the License."},{"line_number":18,"context_line":"# @author: Fumihiko Kakuma, VA Linux Systems Japan K.K."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"import time"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1u8%3D","line":20,"updated":"2014-03-23 15:55:20.000000000","message":"netaddr is third party module.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"#    under the License."},{"line_number":18,"context_line":"# @author: Fumihiko Kakuma, VA Linux Systems Japan K.K."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":"import time"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B0o8%3D","line":20,"in_reply_to":"AAAAWH%2F%2B1u8%3D","updated":"2014-03-24 05:33:54.000000000","message":"Done","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _get_ip_in_hex(self, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            return \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1t4%3D","line":301,"updated":"2014-03-23 15:55:20.000000000","message":"LOG message is specific to tunnel port creation. How about merge _get_ip_in_hex and _create_port_name_from_ip? In addition, _create_tunnel_port_name_from_ip sounds reasonable if the log message contains \"tunnel port\".","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"8864d2b5726b2dda6464930dae18057eb5c60e36","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _get_ip_in_hex(self, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            return \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1m4%3D","line":301,"in_reply_to":"AAAAWH%2F%2B1t4%3D","updated":"2014-03-23 17:26:03.000000000","message":"+1 with the ovs-agent, it was a little more complicated, because it depended on the plugin: ovs or ml2. With the ovs plugin the tunnel port names were like gre-0.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _get_ip_in_hex(self, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            return \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B0HI%3D","line":301,"in_reply_to":"AAAAWH%2F%2B1t4%3D","updated":"2014-03-24 05:33:54.000000000","message":"I will merge _get_ip_in_hex and _create_port_name_from_ip.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        except Exception:"},{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def _create_port_name_from_ip(self, type, ip):"},{"line_number":310,"context_line":"        ip_hex \u003d self._get_ip_in_hex(ip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1uk%3D","line":307,"updated":"2014-03-23 15:55:20.000000000","message":"Nit: \"return\" is unnecessary and it would be more consistent with other places in this file.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        except Exception:"},{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def _create_port_name_from_ip(self, type, ip):"},{"line_number":310,"context_line":"        ip_hex \u003d self._get_ip_in_hex(ip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bz%2B4%3D","line":307,"in_reply_to":"AAAAWH%2F%2B1uk%3D","updated":"2014-03-24 05:33:54.000000000","message":"I will merge _get_ip_in_hex and _create_port_name_from_ip.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"8864d2b5726b2dda6464930dae18057eb5c60e36","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def _create_port_name_from_ip(self, type, ip):"},{"line_number":310,"context_line":"        ip_hex \u003d self._get_ip_in_hex(ip)"},{"line_number":311,"context_line":"        if not ip_hex:"},{"line_number":312,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1n0%3D","line":309,"updated":"2014-03-23 17:26:03.000000000","message":"type is a python built-in and should not be shadowed","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def _create_port_name_from_ip(self, type, ip):"},{"line_number":310,"context_line":"        ip_hex \u003d self._get_ip_in_hex(ip)"},{"line_number":311,"context_line":"        if not ip_hex:"},{"line_number":312,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B0Hk%3D","line":309,"in_reply_to":"AAAAWH%2F%2B1n0%3D","updated":"2014-03-24 05:33:54.000000000","message":"I will merge _get_ip_in_hex and _create_port_name_from_ip.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        ip_hex \u003d self._get_ip_in_hex(ip)"},{"line_number":311,"context_line":"        if not ip_hex:"},{"line_number":312,"context_line":"            return"},{"line_number":313,"context_line":"        return \u0027%s-%s\u0027 % (type, ip_hex)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def ryu_send_msg(self, msg):"},{"line_number":316,"context_line":"        result \u003d ryu_api.send_msg(self.ryuapp, msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1uY%3D","line":313,"updated":"2014-03-23 15:55:20.000000000","message":"Nit: It can be written:\n\n    if ip_hex:\n       return \u0027%s-%s\u0027 % (type, ip_hex)","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"},{"line_number":402,"context_line":"            return"},{"line_number":403,"context_line":"        tun_name \u003d self._create_port_name_from_ip(tunnel_type, tunnel_ip)"},{"line_number":404,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1tw%3D","line":403,"updated":"2014-03-23 15:55:20.000000000","message":"Don\u0027t we need to handle a case _create_port_name_from_ip returns None? If we don\u0027t consider the case, it is worth commented here.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        if tunnel_ip \u003d\u003d self.local_ip:"},{"line_number":402,"context_line":"            return"},{"line_number":403,"context_line":"        tun_name \u003d self._create_port_name_from_ip(tunnel_type, tunnel_ip)"},{"line_number":404,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B0GA%3D","line":403,"in_reply_to":"AAAAWH%2F%2B1tw%3D","updated":"2014-03-24 05:33:54.000000000","message":"Done","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3617476b16ddcfdf8ae0972d57e3482dee7ed2e4","unresolved":false,"context_lines":[{"line_number":1074,"context_line":"            for remote_ip, ofport in self.tun_br_ofports[tunnel_type].items():"},{"line_number":1075,"context_line":"                if ofport \u003d\u003d tun_ofport:"},{"line_number":1076,"context_line":"                    port_name \u003d self._create_port_name_from_ip("},{"line_number":1077,"context_line":"                        tunnel_type, remote_ip)"},{"line_number":1078,"context_line":"                    self.tun_br.delete_port(port_name)"},{"line_number":1079,"context_line":"                    self.tun_br_ofports[tunnel_type].pop(remote_ip, None)"},{"line_number":1080,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1ts%3D","line":1077,"updated":"2014-03-23 15:55:20.000000000","message":"Same as the above.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":1074,"context_line":"            for remote_ip, ofport in self.tun_br_ofports[tunnel_type].items():"},{"line_number":1075,"context_line":"                if ofport \u003d\u003d tun_ofport:"},{"line_number":1076,"context_line":"                    port_name \u003d self._create_port_name_from_ip("},{"line_number":1077,"context_line":"                        tunnel_type, remote_ip)"},{"line_number":1078,"context_line":"                    self.tun_br.delete_port(port_name)"},{"line_number":1079,"context_line":"                    self.tun_br_ofports[tunnel_type].pop(remote_ip, None)"},{"line_number":1080,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bz%2Bs%3D","line":1077,"in_reply_to":"AAAAWH%2F%2B1ts%3D","updated":"2014-03-24 05:33:54.000000000","message":"Sorry, I was not aware that this method was no longer in use. So I will remove it.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"9d2b10f73985cf754acfa2c46c452c4f316b1c19","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FODw%3D","line":1235,"updated":"2014-03-19 11:11:05.000000000","message":"Is the expectation that the IP address should always be valid, and hence we shouldn\u0027t see this occur?\n\nIf so, should we just let it raise an exception and not have a test?\nIf not, should we log some indication of the problem?","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bz%2Bc%3D","line":1235,"in_reply_to":"AAAAWH%2F%2B1mQ%3D","updated":"2014-03-24 05:33:54.000000000","message":"local_ip should be specified in a configuration file. If not, it will raise ValueError in create_agent_config_map.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"8864d2b5726b2dda6464930dae18057eb5c60e36","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1mQ%3D","line":1235,"in_reply_to":"AAAAWH%2F%2FFms%3D","updated":"2014-03-23 17:26:03.000000000","message":"unfortunately local_ip is not validated at startup","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5d86d48d6e8b50df4c4e2caf4cf06871d4727ea5","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FFms%3D","line":1235,"in_reply_to":"AAAAWH%2F%2FI1U%3D","updated":"2014-03-20 11:22:17.000000000","message":"Gotcha, missed the log in _get_ip_in_hex().","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"40f73cb9b7cbf6f4e9b4de9257c71d41f80b1b19","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FGHo%3D","line":1235,"in_reply_to":"AAAAWH%2F%2FI1U%3D","updated":"2014-03-20 09:59:36.000000000","message":"In which cases would be tun_name\u003d\u003dNone ? \n\nI think that\u0027s Paul\u0027s concern, the continue would be un-logged.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"e269e8bb58199f1c0688faeeeeb0401dfa529f05","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                        tun_name \u003d self._create_port_name_from_ip("},{"line_number":1233,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1234,"context_line":"                        if not tun_name:"},{"line_number":1235,"context_line":"                            continue"},{"line_number":1236,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1237,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1238,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FI1U%3D","line":1235,"in_reply_to":"AAAAWH%2F%2FODw%3D","updated":"2014-03-20 00:29:08.000000000","message":"Thank you for your comment.\nI think that in the case of invalid ip, warning log in _get_ip_in_hex will be logged.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"6cf9e7865d91ba12d18484758c480f6b6ed638c1","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _create_tunnel_port_name_from_ip(self, tunnel_type, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            ip_hex \u003d \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2ByDw%3D","line":301,"updated":"2014-03-24 12:09:42.000000000","message":"this name is very long and causes lines to wrap later on. Something like _get_tunnel_port_name would be enough.","commit_id":"7545d2225fc8b87832ac13659ba2634fc08a0786"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"ddeb0c253beaddce6d7492e9cb70108369539465","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _create_tunnel_port_name_from_ip(self, tunnel_type, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            ip_hex \u003d \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BxD0%3D","line":301,"in_reply_to":"AAAAWH%2F%2BxQ0%3D","updated":"2014-03-24 14:27:56.000000000","message":"thanks - I think it is better because it is a bit shorter. But also the _from_ip part was not needed, as there is no other way to create the port name.","commit_id":"7545d2225fc8b87832ac13659ba2634fc08a0786"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"d0d6cc2eb02fb2a7f838fac3a48deee745366b57","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        except Exception:"},{"line_number":299,"context_line":"            LOG.exception(_(\"Failed reporting state!\"))"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _create_tunnel_port_name_from_ip(self, tunnel_type, ip_address):"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            ip_hex \u003d \u0027%08x\u0027 % netaddr.IPAddress(ip_address, version\u003d4)"},{"line_number":304,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BxQ0%3D","line":301,"in_reply_to":"AAAAWH%2F%2ByDw%3D","updated":"2014-03-24 14:09:20.000000000","message":"Hmm, I don\u0027t think so but then I will name it _create_tunnel_port_name.","commit_id":"7545d2225fc8b87832ac13659ba2634fc08a0786"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"2c981c91e9deea66fe5cf8eb152c89458c675c96","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        except Exception:"},{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        return \u0027%s-%s\u0027 % (tunnel_type, ip_hex)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def ryu_send_msg(self, msg):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F94EY%3D","line":307,"updated":"2014-04-01 14:17:14.000000000","message":"nit: maybe better returning an empty string?\n\nreturn \u0027\u0027","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"0df0fe30f99be2517557e3b02932ffed8afcdf5d","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        except Exception:"},{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        return \u0027%s-%s\u0027 % (tunnel_type, ip_hex)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def ryu_send_msg(self, msg):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9yvo%3D","line":307,"in_reply_to":"AAAAWH%2F94EY%3D","updated":"2014-04-02 05:21:32.000000000","message":"I think that return None.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0866db6c9fff270cb4533cb3c4911a44c91a75bc","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        return \u0027%s-%s\u0027 % (tunnel_type, ip_hex)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def ryu_send_msg(self, msg):"},{"line_number":311,"context_line":"        result \u003d ryu_api.send_msg(self.ryuapp, msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F94DU%3D","line":308,"updated":"2014-04-01 13:58:05.000000000","message":"Nit: Can L.308 be moved to L.303?","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"0df0fe30f99be2517557e3b02932ffed8afcdf5d","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            LOG.warn(_(\"Unable to create tunnel port. Invalid remote IP: %s\"),"},{"line_number":306,"context_line":"                     ip_address)"},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        return \u0027%s-%s\u0027 % (tunnel_type, ip_hex)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def ryu_send_msg(self, msg):"},{"line_number":311,"context_line":"        result \u003d ryu_api.send_msg(self.ryuapp, msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9yv8%3D","line":308,"in_reply_to":"AAAAWH%2F94DU%3D","updated":"2014-04-02 05:21:32.000000000","message":"Done","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0866db6c9fff270cb4533cb3c4911a44c91a75bc","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F94C4%3D","line":400,"updated":"2014-04-01 13:58:05.000000000","message":"Do we need to handle a port with old format name?","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"0df0fe30f99be2517557e3b02932ffed8afcdf5d","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9yss%3D","line":400,"in_reply_to":"AAAAWH%2F94C4%3D","updated":"2014-04-02 05:21:32.000000000","message":"The bug #1281098 for this problem is reported but we can say old format name is not supported.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"079e1117f8f01b14e6c73efbe85515aa507cbc0d","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9rHA%3D","line":400,"in_reply_to":"AAAAWH%2F9v8E%3D","updated":"2014-04-02 22:00:29.000000000","message":"Darragh is right. And OFA is not released so now I think fixing of this is better.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1dc9a6c650b9ccaeede1749fd9844a60b007cd6a","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9wC0%3D","line":400,"in_reply_to":"AAAAWH%2F9wdU%3D","updated":"2014-04-02 11:47:04.000000000","message":"+1 to Akihiro","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"05121caa858a1db8fc8474bc4bc44869db0a6a3a","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9v8E%3D","line":400,"in_reply_to":"AAAAWH%2F9wdU%3D","updated":"2014-04-02 12:11:14.000000000","message":"Applying the patch will require restarting the agent. Then br-tun gets reset - L847 - which deletes the bridge (and all existing ports), and recreates the bridge.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"396e49f0e43d51a0c463194354f9cefaadb8cc95","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            return"},{"line_number":398,"context_line":"        tun_name \u003d self._create_tunnel_port_name(tunnel_type, tunnel_ip)"},{"line_number":399,"context_line":"        if not tun_name:"},{"line_number":400,"context_line":"            return"},{"line_number":401,"context_line":"        self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def create_rpc_dispatcher(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9wdU%3D","line":400,"in_reply_to":"AAAAWH%2F9yss%3D","updated":"2014-04-02 10:30:38.000000000","message":"If an IP address is 10.1.1.1, a tunnel device can be created before this patch. Do you mean such interface is not considered and do we need to delete or recreacte it manually? If Icehouse is shipped without the change, we need to consider the migration.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0866db6c9fff270cb4533cb3c4911a44c91a75bc","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"                        tun_name \u003d self._create_tunnel_port_name("},{"line_number":1216,"context_line":"                            tunnel_type, tunnel[\u0027ip_address\u0027])"},{"line_number":1217,"context_line":"                        if not tun_name:"},{"line_number":1218,"context_line":"                            continue"},{"line_number":1219,"context_line":"                        self.setup_tunnel_port(tun_name,"},{"line_number":1220,"context_line":"                                               tunnel[\u0027ip_address\u0027],"},{"line_number":1221,"context_line":"                                               tunnel_type)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F94C0%3D","line":1218,"updated":"2014-04-01 13:58:05.000000000","message":"Same question on old format name.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"}],"neutron/tests/unit/ofagent/test_ofa_neutron_agent.py":[{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"8864d2b5726b2dda6464930dae18057eb5c60e36","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                {\u0027type\u0027: p_const.TYPE_GRE, \u0027ip\u0027: \u0027remote_ip\u0027})"},{"line_number":603,"context_line":"            self.assertEqual(ofport, 0)"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def test_tunnel_sync_with_ovs_plugin(self):"},{"line_number":606,"context_line":"        fake_tunnel_details \u003d {\u0027tunnels\u0027: [{\u0027ip_address\u0027: \u0027100.101.102.103\u0027}]}"},{"line_number":607,"context_line":"        with contextlib.nested("},{"line_number":608,"context_line":"            mock.patch.object(self.agent.plugin_rpc, \u0027tunnel_sync\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B1mk%3D","line":605,"updated":"2014-03-23 17:26:03.000000000","message":"the ofa_agent cannot be used with the ovs plugin","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"fea3d4df55cc19a65461c19794f8542ddd595cf8","unresolved":false,"context_lines":[{"line_number":602,"context_line":"                {\u0027type\u0027: p_const.TYPE_GRE, \u0027ip\u0027: \u0027remote_ip\u0027})"},{"line_number":603,"context_line":"            self.assertEqual(ofport, 0)"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def test_tunnel_sync_with_ovs_plugin(self):"},{"line_number":606,"context_line":"        fake_tunnel_details \u003d {\u0027tunnels\u0027: [{\u0027ip_address\u0027: \u0027100.101.102.103\u0027}]}"},{"line_number":607,"context_line":"        with contextlib.nested("},{"line_number":608,"context_line":"            mock.patch.object(self.agent.plugin_rpc, \u0027tunnel_sync\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bz%2BY%3D","line":605,"in_reply_to":"AAAAWH%2F%2B1mk%3D","updated":"2014-03-24 05:33:54.000000000","message":"Oops. Thank you for your comment.","commit_id":"96d461bab601483e0c71c40a6b72eb442061f545"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"2c981c91e9deea66fe5cf8eb152c89458c675c96","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def setUp(self):"},{"line_number":43,"context_line":"        super(OFAAgentTestCase, self).setUp()"},{"line_number":44,"context_line":"        self.fake_oflib_of \u003d fake_oflib.patch_fake_oflib_of().start()"},{"line_number":45,"context_line":"        self.mod_agent \u003d importutils.import_module(self._AGENT_NAME)"},{"line_number":46,"context_line":"        cfg.CONF.set_default(\u0027firewall_driver\u0027,"},{"line_number":47,"context_line":"                             \u0027neutron.agent.firewall.NoopFirewallDriver\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F94CU%3D","line":44,"updated":"2014-04-01 14:17:14.000000000","message":"why did you move those lines?\nnit: undo this change","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"0df0fe30f99be2517557e3b02932ffed8afcdf5d","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def setUp(self):"},{"line_number":43,"context_line":"        super(OFAAgentTestCase, self).setUp()"},{"line_number":44,"context_line":"        self.fake_oflib_of \u003d fake_oflib.patch_fake_oflib_of().start()"},{"line_number":45,"context_line":"        self.mod_agent \u003d importutils.import_module(self._AGENT_NAME)"},{"line_number":46,"context_line":"        cfg.CONF.set_default(\u0027firewall_driver\u0027,"},{"line_number":47,"context_line":"                             \u0027neutron.agent.firewall.NoopFirewallDriver\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9ywE%3D","line":44,"in_reply_to":"AAAAWH%2F94CU%3D","updated":"2014-04-02 05:21:32.000000000","message":"SECURITYGROUP group is not available before an agent module is imported.","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"2c981c91e9deea66fe5cf8eb152c89458c675c96","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        ) as (tunnel_sync_rpc_fn, setup_tunnel_port_fn):"},{"line_number":612,"context_line":"            self.agent.tunnel_types \u003d [\u0027gre\u0027]"},{"line_number":613,"context_line":"            self.agent.tunnel_sync()"},{"line_number":614,"context_line":"            expected_calls \u003d [mock.call(\u0027gre-64656667\u0027,"},{"line_number":615,"context_line":"                                        \u0027100.101.102.103\u0027, \u0027gre\u0027)]"},{"line_number":616,"context_line":"            setup_tunnel_port_fn.assert_has_calls(expected_calls)"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F93%2Bw%3D","line":614,"updated":"2014-04-01 14:17:14.000000000","message":"nit: try not to hard code the variables. \nIf you define:\n\ntunnel_ip \u003d \u0027100.101.102.103\u0027 before line 606\n\nmodify line 606 like this:\n\nfake_tunnel_details \u003d {\u0027tunnels\u0027: [{\u0027ip_address\u0027: tunnel_ip}]}\n\nBefore line 614 put define these\n\nip_hex \u003d \u0027%08x\u0027 % netaddr.IPAddress(tunnel_ip, version\u003d4)\n\ntunnel_name \u003d \u0027%s-%s\u0027 % (self.agent.tunnel_types[0], ip_hex)\n\nSo you can substitute all the hard coded variables in line 614:\n\nmock.call(tunnel_name, tunnel_ip, self.agent.tunnel_types[0])","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"},{"author":{"_account_id":8344,"name":"fumihiko kakuma","email":"kakuma@valinux.co.jp","username":"kakuma"},"change_message_id":"0df0fe30f99be2517557e3b02932ffed8afcdf5d","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        ) as (tunnel_sync_rpc_fn, setup_tunnel_port_fn):"},{"line_number":612,"context_line":"            self.agent.tunnel_types \u003d [\u0027gre\u0027]"},{"line_number":613,"context_line":"            self.agent.tunnel_sync()"},{"line_number":614,"context_line":"            expected_calls \u003d [mock.call(\u0027gre-64656667\u0027,"},{"line_number":615,"context_line":"                                        \u0027100.101.102.103\u0027, \u0027gre\u0027)]"},{"line_number":616,"context_line":"            setup_tunnel_port_fn.assert_has_calls(expected_calls)"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9y1o%3D","line":614,"in_reply_to":"AAAAWH%2F93%2Bw%3D","updated":"2014-04-02 05:21:32.000000000","message":"Done","commit_id":"d487f03e7ee4a34fcb131a58fe6d4a2a6a10b3bb"}]}
