)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"aa0f42e0ce40e7c1776a936a348b298a10b258c1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[WIP]Support MACVLAN"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support for MACVLAN, including inferring MACVLAN from Nuetron port +"},{"line_number":10,"context_line":"allowed address pair."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Closes-Bug: #1720734"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f4b6375_470cd341","line":9,"range":{"start_line":9,"start_character":58,"end_line":9,"end_character":65},"updated":"2017-10-30 05:36:25.000000000","message":"typo","commit_id":"773a626db4e3d6c426707365d2bfbca788e9736f"}],"dragonflow/neutron/ml2/mech_driver.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d693485ed195cc5f148cf96596bbc99c0824c3d5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.port_status \u003d n_const.PORT_STATUS_ACTIVE"},{"line_number":68,"context_line":"        self.trunk_driver \u003d trunk_driver.DfTrunkDriver()"},{"line_number":69,"context_line":"        if cfg.CONF.df.auto_detect_port_behind_port:"},{"line_number":70,"context_line":"            self._port_behind_port_detector \u003d \\"},{"line_number":71,"context_line":"                port_behind_port.DfPortBehindPortDetector()"},{"line_number":72,"context_line":"        self.subscribe_registries()"},{"line_number":73,"context_line":"        df_qos.register()"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_401c68c0","line":70,"range":{"start_line":70,"start_character":46,"end_line":70,"end_character":47},"updated":"2017-12-07 06:47:58.000000000","message":"please try to avoid","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.port_status \u003d n_const.PORT_STATUS_ACTIVE"},{"line_number":68,"context_line":"        self.trunk_driver \u003d trunk_driver.DfTrunkDriver()"},{"line_number":69,"context_line":"        if cfg.CONF.df.auto_detect_port_behind_port:"},{"line_number":70,"context_line":"            self._port_behind_port_detector \u003d \\"},{"line_number":71,"context_line":"                port_behind_port.DfPortBehindPortDetector()"},{"line_number":72,"context_line":"        self.subscribe_registries()"},{"line_number":73,"context_line":"        df_qos.register()"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_03486a84","line":70,"range":{"start_line":70,"start_character":46,"end_line":70,"end_character":47},"in_reply_to":"df87a7cf_401c68c0","updated":"2017-12-11 19:25:37.000000000","message":"Done.","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"}],"dragonflow/neutron/services/trunk/driver.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"aa0f42e0ce40e7c1776a936a348b298a10b258c1","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _detect_macvlan(self, context, updated_port, orig_port):"},{"line_number":201,"context_line":"        \"\"\""},{"line_number":202,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":203,"context_line":"        For each allowed-address-pair modification, scan to see if there are"},{"line_number":204,"context_line":"        ports with those IPs/MACs. If so, these are MACVLAN ports, and create"},{"line_number":205,"context_line":"        the relevant NB objects"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_c2fd5109","line":202,"range":{"start_line":202,"start_character":30,"end_line":202,"end_character":37},"updated":"2017-10-30 05:36:25.000000000","message":"this can be non macvlan port as well, like with Octavia Amphora","commit_id":"773a626db4e3d6c426707365d2bfbca788e9736f"}],"dragonflow/neutron/services/trunk/port_behind_port.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d693485ed195cc5f148cf96596bbc99c0824c3d5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            new_status \u003d n_constants.PORT_STATUS_DOWN"},{"line_number":39,"context_line":"        return new_status"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _detect_macvlan(self, a_context, updated_port, orig_port\u003dNone):"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":44,"context_line":"        For each allowed-address-pair modification, scan to see if there are"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_40d548e4","line":41,"range":{"start_line":41,"start_character":8,"end_line":41,"end_character":23},"updated":"2017-12-07 06:47:58.000000000","message":"_detect_xxx_ports?","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d693485ed195cc5f148cf96596bbc99c0824c3d5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            new_status \u003d n_constants.PORT_STATUS_DOWN"},{"line_number":39,"context_line":"        return new_status"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _detect_macvlan(self, a_context, updated_port, orig_port\u003dNone):"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":44,"context_line":"        For each allowed-address-pair modification, scan to see if there are"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_60cdec64","line":41,"range":{"start_line":41,"start_character":16,"end_line":41,"end_character":23},"updated":"2017-12-07 06:47:58.000000000","message":"why is this specific to macvlan?","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            new_status \u003d n_constants.PORT_STATUS_DOWN"},{"line_number":39,"context_line":"        return new_status"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _detect_macvlan(self, a_context, updated_port, orig_port\u003dNone):"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":44,"context_line":"        For each allowed-address-pair modification, scan to see if there are"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_f2267168","line":41,"range":{"start_line":41,"start_character":16,"end_line":41,"end_character":23},"in_reply_to":"df87a7cf_60cdec64","updated":"2017-12-11 19:25:37.000000000","message":"renamed","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d693485ed195cc5f148cf96596bbc99c0824c3d5","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":44,"context_line":"        For each allowed-address-pair modification, scan to see if there are"},{"line_number":45,"context_line":"        ports with those IPs/MACs. If so, these are MACVLAN ports, and create"},{"line_number":46,"context_line":"        the relevant NB objects"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_a0e454e1","line":45,"range":{"start_line":45,"start_character":52,"end_line":45,"end_character":59},"updated":"2017-12-07 06:47:58.000000000","message":"nested port?","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        A heuristic to detect MACVLAN ports (i.e. ports behind ports)."},{"line_number":44,"context_line":"        For each allowed-address-pair modification, scan to see if there are"},{"line_number":45,"context_line":"        ports with those IPs/MACs. If so, these are MACVLAN ports, and create"},{"line_number":46,"context_line":"        the relevant NB objects"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_122af52a","line":45,"range":{"start_line":45,"start_character":52,"end_line":45,"end_character":59},"in_reply_to":"df87a7cf_a0e454e1","updated":"2017-12-11 19:25:37.000000000","message":"Done","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d693485ed195cc5f148cf96596bbc99c0824c3d5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":50,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":51,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"},{"line_number":52,"context_line":"        new_aaps \u003d [e for e in updated_port_aaps if e not in orig_port_aaps]"},{"line_number":53,"context_line":"        removed_aaps \u003d [e for e in orig_port_aaps"},{"line_number":54,"context_line":"                        if e not in updated_port_aaps]"},{"line_number":55,"context_line":"        core_plugin \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_60d2cc02","line":52,"range":{"start_line":52,"start_character":20,"end_line":52,"end_character":21},"updated":"2017-12-07 06:47:58.000000000","message":"aap?","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":50,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":51,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"},{"line_number":52,"context_line":"        new_aaps \u003d [e for e in updated_port_aaps if e not in orig_port_aaps]"},{"line_number":53,"context_line":"        removed_aaps \u003d [e for e in orig_port_aaps"},{"line_number":54,"context_line":"                        if e not in updated_port_aaps]"},{"line_number":55,"context_line":"        core_plugin \u003d directory.get_plugin()"}],"source_content_type":"text/x-python","patch_set":8,"id":"df87a7cf_b224695f","line":52,"range":{"start_line":52,"start_character":20,"end_line":52,"end_character":21},"in_reply_to":"df87a7cf_60d2cc02","updated":"2017-12-11 19:25:37.000000000","message":"Done","commit_id":"833e6d5637faf6d7acd1365226eed06b84b10aef"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"edc4eef4e83b5bb0ec0e42d8266a74091ff63499","unresolved":false,"context_lines":[{"line_number":32,"context_line":"@registry.has_registry_receivers"},{"line_number":33,"context_line":"class DfPortBehindPortDetector(mixins.LazyNbApiMixin):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _get_child_port_status(self, parent_port):"},{"line_number":36,"context_line":"        new_status \u003d n_constants.PORT_STATUS_ACTIVE"},{"line_number":37,"context_line":"        if parent_port[\u0027status\u0027] !\u003d n_constants.PORT_STATUS_ACTIVE:"},{"line_number":38,"context_line":"            new_status \u003d n_constants.PORT_STATUS_DOWN"}],"source_content_type":"text/x-python","patch_set":9,"id":"df87a7cf_720101af","line":35,"range":{"start_line":35,"start_character":8,"end_line":35,"end_character":30},"updated":"2017-12-10 14:26:56.000000000","message":"As you mentioned at patch 526057, please use the method from dragonflow/neutron/services/trunk/driver.py","commit_id":"d8dbfe74f059ffa8bdb2ba8c75ad06b4ceae3574"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"3bf53f934e76cc2d31f00a982bd0a20b82acb956","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        ports with those IPs/MACs. If so, these are nested ports, and create"},{"line_number":42,"context_line":"        the relevant NB objects"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"},{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":46,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":47,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_4c9a11b9","line":44,"updated":"2017-12-11 16:22:59.000000000","message":"I didn\u0027t understood this comment ..","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        ports with those IPs/MACs. If so, these are nested ports, and create"},{"line_number":42,"context_line":"        the relevant NB objects"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"},{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":46,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":47,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_ab9db9bc","line":44,"in_reply_to":"df87a7cf_4c9a11b9","updated":"2017-12-11 19:25:37.000000000","message":"The heuristic assumes that the allowed address pair exists only if the two ports exist. i.e. it is created after both ports are created, and removed before either of the ports are removed.","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"3bf53f934e76cc2d31f00a982bd0a20b82acb956","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _find_macvlan_port(self, context, pair, port):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            ip \u003d netaddr.IPAddress(pair[\u0027ip_address\u0027])"},{"line_number":99,"context_line":"        except ValueError:"},{"line_number":100,"context_line":"            return None  # Skip. This is a network, not a host"},{"line_number":101,"context_line":"        mac_address \u003d pair.get(\u0027mac_address\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_ec0be58a","line":98,"updated":"2017-12-11 16:22:59.000000000","message":"according to https://developer.openstack.org/api-ref/network/v2/index.html#ports  ip adders is required.","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"469b3a46cef0a1fe586c8d16c9d462840261857f","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _find_macvlan_port(self, context, pair, port):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            ip \u003d netaddr.IPAddress(pair[\u0027ip_address\u0027])"},{"line_number":99,"context_line":"        except ValueError:"},{"line_number":100,"context_line":"            return None  # Skip. This is a network, not a host"},{"line_number":101,"context_line":"        mac_address \u003d pair.get(\u0027mac_address\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_99292f38","line":98,"in_reply_to":"df87a7cf_6ba33101","updated":"2017-12-11 20:42:35.000000000","message":"cool , maybe add that in a comment (that this not supported )","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _find_macvlan_port(self, context, pair, port):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            ip \u003d netaddr.IPAddress(pair[\u0027ip_address\u0027])"},{"line_number":99,"context_line":"        except ValueError:"},{"line_number":100,"context_line":"            return None  # Skip. This is a network, not a host"},{"line_number":101,"context_line":"        mac_address \u003d pair.get(\u0027mac_address\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_6ba33101","line":98,"in_reply_to":"df87a7cf_ec0be58a","updated":"2017-12-11 19:25:37.000000000","message":"The value error occurs if pair[\u0027ip_address\u0027] is a network, and not a single IP. This scenario is not supported.","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"3bf53f934e76cc2d31f00a982bd0a20b82acb956","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        if ports:"},{"line_number":114,"context_line":"            segmentation_type \u003d (trunk_models.TYPE_MACVLAN if mac_address"},{"line_number":115,"context_line":"                                 else trunk_models.TYPE_IPVLAN)"},{"line_number":116,"context_line":"            return ports[0], segmentation_type"},{"line_number":117,"context_line":"        return None"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @registry.receives(resources.PORT,"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_ec67654c","line":116,"updated":"2017-12-11 16:22:59.000000000","message":"can\u0027t it be many ports ? (for example IPVLAN  where allowed adders pair contain CIDR an there is some port behind this CIDR )","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"c16e885220fbca50afc65df5f71e58d6cd8a7bb7","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        if ports:"},{"line_number":114,"context_line":"            segmentation_type \u003d (trunk_models.TYPE_MACVLAN if mac_address"},{"line_number":115,"context_line":"                                 else trunk_models.TYPE_IPVLAN)"},{"line_number":116,"context_line":"            return ports[0], segmentation_type"},{"line_number":117,"context_line":"        return None"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    @registry.receives(resources.PORT,"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_0bb2a549","line":116,"in_reply_to":"df87a7cf_ec67654c","updated":"2017-12-11 19:25:37.000000000","message":"This scenario is not supported. It has to be a single IP address/port. For multiple ports, each port must be added discretely to the allowed address pairs.","commit_id":"ca94563a4914c1e9dd76a714ae35d647cbd8c555"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"6b0a2f68b0ca309351365e5b820f5c81016b4d1a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        A heuristic to detect nested ports (i.e. ports behind ports)."},{"line_number":40,"context_line":"        For each allowed-address-pair modification, scan to see if there are"},{"line_number":41,"context_line":"        ports with those IPs/MACs. If so, these are nested ports, and create"},{"line_number":42,"context_line":"        the relevant NB objects"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"},{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"}],"source_content_type":"text/x-python","patch_set":12,"id":"df87a7cf_4d7f4f65","line":42,"updated":"2017-12-12 12:32:12.000000000","message":"there is also status changes of the ports, worth to add this in the docstring","commit_id":"8d932ac7e7a6e2f8e33ffef1d40b5718af6f48b0"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"5edecfe5745d47f6a672eacfbdae673bdd31de07","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        A heuristic to detect nested ports (i.e. ports behind ports)."},{"line_number":40,"context_line":"        For each allowed-address-pair modification, scan to see if there are"},{"line_number":41,"context_line":"        ports with those IPs/MACs. If so, these are nested ports, and create"},{"line_number":42,"context_line":"        the relevant NB objects"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        # TODO(oanson) We assume that the AAP is removed before the port"},{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"}],"source_content_type":"text/x-python","patch_set":12,"id":"df87a7cf_94c54d0d","line":42,"in_reply_to":"df87a7cf_4d7f4f65","updated":"2017-12-13 09:27:27.000000000","message":"Done","commit_id":"8d932ac7e7a6e2f8e33ffef1d40b5718af6f48b0"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"b5521b7a64e64efc33dffec463911c7219b9d93c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":46,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":47,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"},{"line_number":48,"context_line":"        new_aaps \u003d [aap_ for aap_ in updated_port_aaps"},{"line_number":49,"context_line":"                    if aap_ not in orig_port_aaps]"},{"line_number":50,"context_line":"        removed_aaps \u003d [aap_ for aap_ in orig_port_aaps"},{"line_number":51,"context_line":"                        if aap_ not in updated_port_aaps]"},{"line_number":52,"context_line":"        core_plugin \u003d directory.get_plugin()"},{"line_number":53,"context_line":"        new_status \u003d trunk_driver.get_child_port_status(updated_port)"},{"line_number":54,"context_line":"        LOG.debug(\u0027_detect_port_behind_port: id: %s \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_bfedae8c","line":51,"range":{"start_line":48,"start_character":0,"end_line":51,"end_character":57},"updated":"2017-12-14 06:00:27.000000000","message":"Nit: you can use dicts/sets to reduce n^2 to n :)","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d05e24327c879e659898a41c4fac427e31aad3c4","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":46,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":47,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"},{"line_number":48,"context_line":"        new_aaps \u003d [aap_ for aap_ in updated_port_aaps"},{"line_number":49,"context_line":"                    if aap_ not in orig_port_aaps]"},{"line_number":50,"context_line":"        removed_aaps \u003d [aap_ for aap_ in orig_port_aaps"},{"line_number":51,"context_line":"                        if aap_ not in updated_port_aaps]"},{"line_number":52,"context_line":"        core_plugin \u003d directory.get_plugin()"},{"line_number":53,"context_line":"        new_status \u003d trunk_driver.get_child_port_status(updated_port)"},{"line_number":54,"context_line":"        LOG.debug(\u0027_detect_port_behind_port: id: %s \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_fa26e4ba","line":51,"range":{"start_line":48,"start_character":0,"end_line":51,"end_character":57},"in_reply_to":"df87a7cf_bfedae8c","updated":"2017-12-18 19:24:06.000000000","message":"aap_ is a dict, i.e. it isn\u0027t hashable. Therefore, it can\u0027t be used in a dict/set.","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"a9fa739344eef57419336d263f4ab004eeb4f7dc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        updated_port_aaps \u003d updated_port.get(aap.ADDRESS_PAIRS, [])"},{"line_number":46,"context_line":"        orig_port_aaps \u003d ([] if not orig_port else"},{"line_number":47,"context_line":"                          orig_port.get(aap.ADDRESS_PAIRS, []))"},{"line_number":48,"context_line":"        new_aaps \u003d [aap_ for aap_ in updated_port_aaps"},{"line_number":49,"context_line":"                    if aap_ not in orig_port_aaps]"},{"line_number":50,"context_line":"        removed_aaps \u003d [aap_ for aap_ in orig_port_aaps"},{"line_number":51,"context_line":"                        if aap_ not in updated_port_aaps]"},{"line_number":52,"context_line":"        core_plugin \u003d directory.get_plugin()"},{"line_number":53,"context_line":"        new_status \u003d trunk_driver.get_child_port_status(updated_port)"},{"line_number":54,"context_line":"        LOG.debug(\u0027_detect_port_behind_port: id: %s \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_04c3a158","line":51,"range":{"start_line":48,"start_character":0,"end_line":51,"end_character":57},"in_reply_to":"df87a7cf_fa26e4ba","updated":"2017-12-20 06:23:09.000000000","message":"Technically, a pair is a tuple, but its not all that important.","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"b5521b7a64e64efc33dffec463911c7219b9d93c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                segmentation_type\u003dsegmentation_type,"},{"line_number":73,"context_line":"            )"},{"line_number":74,"context_line":"            self.nb_api.create(model)"},{"line_number":75,"context_line":"            core_plugin.update_port_status(context.get_admin_context(),"},{"line_number":76,"context_line":"                                           nested_port[\u0027id\u0027], new_status)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        for pair in removed_aaps:"},{"line_number":79,"context_line":"            nested_port, _segmentation_type \u003d self._find_nested_port("}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_5f5ee245","line":76,"range":{"start_line":75,"start_character":0,"end_line":76,"end_character":73},"updated":"2017-12-14 06:00:27.000000000","message":"Further parent port status updates are not reflected on child ports.","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"b5521b7a64e64efc33dffec463911c7219b9d93c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                           nested_port[\u0027id\u0027],"},{"line_number":94,"context_line":"                                           n_constants.PORT_STATUS_DOWN)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _find_nested_port(self, context, pair, port):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            ip \u003d netaddr.IPAddress(pair[\u0027ip_address\u0027])"},{"line_number":99,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_dfbc326e","line":96,"range":{"start_line":96,"start_character":10,"end_line":96,"end_character":25},"updated":"2017-12-14 06:00:27.000000000","message":"I think its a bit confusing, the name suggest it returns a port, but it actually returns a tuple","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d05e24327c879e659898a41c4fac427e31aad3c4","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                           nested_port[\u0027id\u0027],"},{"line_number":94,"context_line":"                                           n_constants.PORT_STATUS_DOWN)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _find_nested_port(self, context, pair, port):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            ip \u003d netaddr.IPAddress(pair[\u0027ip_address\u0027])"},{"line_number":99,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":13,"id":"df87a7cf_c0eb9875","line":96,"range":{"start_line":96,"start_character":10,"end_line":96,"end_character":25},"in_reply_to":"df87a7cf_dfbc326e","updated":"2017-12-18 19:24:06.000000000","message":"Done","commit_id":"c9dd9c7fdfaa7d34adbd964c364174ed6b701c0b"}]}
