)]}'
{"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"089e6dc5a835d6a88cb6ead7f95fcafa1601de8d","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        for port in router.attached_ports:"},{"line_number":317,"context_line":"            p \u003d port[\u0027port\u0027]"},{"line_number":318,"context_line":"            valid_net_with_ipv6 \u003d ("},{"line_number":319,"context_line":"                p[\u0027network_id\u0027] \u003d\u003d net_id and self._port_has_ipv6_address(p))"},{"line_number":320,"context_line":"            if (valid_net_with_ipv6 and"},{"line_number":321,"context_line":"                p[\u0027device_owner\u0027] !\u003d DEVICE_OWNER_DVR_SNAT):"},{"line_number":322,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_6c760b40","line":319,"updated":"2015-07-06 23:00:06.000000000","message":"Consider overriding _port_has_ipv6_address like this.  It reduces the amount of special behavior.\n\n    def _port_has_ipv6_address(self, port):\n        if port[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_DVR_SNAT:\n            return False\n        return super(..., self)._port_has_ipv6_address(port)","commit_id":"e8d5aaf253674007ee6df8513d9499f922e6954d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"56c5f17519233237462e7a5d6c8d3f4dab13b0f9","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        for port in router.attached_ports:"},{"line_number":317,"context_line":"            p \u003d port[\u0027port\u0027]"},{"line_number":318,"context_line":"            valid_net_with_ipv6 \u003d ("},{"line_number":319,"context_line":"                p[\u0027network_id\u0027] \u003d\u003d net_id and self._port_has_ipv6_address(p))"},{"line_number":320,"context_line":"            if (valid_net_with_ipv6 and"},{"line_number":321,"context_line":"                p[\u0027device_owner\u0027] !\u003d DEVICE_OWNER_DVR_SNAT):"},{"line_number":322,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_ed81b5fc","line":319,"in_reply_to":"ba3cc151_6c760b40","updated":"2015-07-07 00:55:49.000000000","message":"Done","commit_id":"e8d5aaf253674007ee6df8513d9499f922e6954d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2e9bcbc76d89a589010055cba71ff70c94b6d2ab","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    def _port_has_ipv6_address(self, port):"},{"line_number":315,"context_line":"        \"\"\"Overridden to return False if DVR SNAT port.\"\"\""},{"line_number":316,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_DVR_SNAT:"},{"line_number":317,"context_line":"            return False"},{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"},{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_21465e7b","line":317,"updated":"2015-07-08 19:19:41.000000000","message":"I\u0027m confused, as the qg- device in the snat- namespace in my devstack config does have an IPv6 address.  Although looking further it seems it\u0027s only concerned with internal ports, not external (public) ones.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fefaf1fa8fc4c6cc7bb28aaa9c33c1ca47a5c69e","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    def _port_has_ipv6_address(self, port):"},{"line_number":315,"context_line":"        \"\"\"Overridden to return False if DVR SNAT port.\"\"\""},{"line_number":316,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_DVR_SNAT:"},{"line_number":317,"context_line":"            return False"},{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"},{"line_number":319,"context_line":"                     self)._port_has_ipv6_address(port)"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_84d8981f","line":317,"in_reply_to":"ba3cc151_21465e7b","updated":"2015-07-08 19:28:33.000000000","message":"Brian, this is not the qg- interface, these are the \"sg- interface\" ports that we create internally.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        return router_interface_info"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _port_has_ipv6_address(self, port):"},{"line_number":315,"context_line":"        \"\"\"Overridden to return False if DVR SNAT port.\"\"\""},{"line_number":316,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_DVR_SNAT:"},{"line_number":317,"context_line":"            return False"},{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_6e19ec87","line":315,"updated":"2015-07-14 11:53:41.000000000","message":"is this a logically separate change?","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"771b32a167ccf465a975d9ed6e48003f5d36af5f","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        return router_interface_info"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _port_has_ipv6_address(self, port):"},{"line_number":315,"context_line":"        \"\"\"Overridden to return False if DVR SNAT port.\"\"\""},{"line_number":316,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_DVR_SNAT:"},{"line_number":317,"context_line":"            return False"},{"line_number":318,"context_line":"        return super(L3_NAT_with_dvr_db_mixin,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_8760c1a6","line":315,"in_reply_to":"9a41bdd9_6e19ec87","updated":"2015-07-14 17:19:46.000000000","message":"This is a change that is required to fix the DVR test failure.\nIn order to address this bug, I have included it as part of this patch.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"742e09656e8d9012aa0abb8c722acf312c66942a","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            # The normal Portbinding context does not have the status"},{"line_number":1144,"context_line":"            # of the ports."},{"line_number":1145,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1146,"context_line":"            is_dvr_routed_port \u003d False"},{"line_number":1147,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1148,"context_line":"                is_dvr_routed_port \u003d True"},{"line_number":1149,"context_line":"                bindings \u003d db.get_dvr_port_bindings(session, id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_583f4cb4","line":1146,"updated":"2015-06-30 05:08:13.000000000","message":"It\u0027 better to move the two lines to L.1101.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"33faa054d84867e909123ec776530af4673ee5de","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            # The normal Portbinding context does not have the status"},{"line_number":1144,"context_line":"            # of the ports."},{"line_number":1145,"context_line":"            bound_mech_contexts \u003d []"},{"line_number":1146,"context_line":"            is_dvr_routed_port \u003d False"},{"line_number":1147,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1148,"context_line":"                is_dvr_routed_port \u003d True"},{"line_number":1149,"context_line":"                bindings \u003d db.get_dvr_port_bindings(session, id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_f1441d1c","line":1146,"in_reply_to":"ba3cc151_583f4cb4","updated":"2015-06-30 17:31:22.000000000","message":"will move it up.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"255874440a2056ca02b6340c9aaae61968b07db9","unresolved":false,"context_lines":[{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_df37a5ae","line":1161,"updated":"2015-06-30 16:38:26.000000000","message":"are L1159-1161 appropriate for dvr case?\n\u0027mech_context\u0027 here is assigned by L1154, which seems random one.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7e858ed824e7d84cde27127ba5e87d1ea03bd9fa","unresolved":false,"context_lines":[{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_a6d72422","line":1161,"in_reply_to":"ba3cc151_31a5a5b4","updated":"2015-07-01 03:23:15.000000000","message":"but L1159-1161 is executed for dvr cases as well.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5d0216a48df33ed86ac8077679bac58d8b7b6ccb","unresolved":false,"context_lines":[{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_c2a77709","line":1161,"in_reply_to":"ba3cc151_a6d72422","updated":"2015-07-02 03:20:21.000000000","message":"in dvr case, mech_context is assigned by L1138, and then overwritten by L1154.\nso the value used by L1159-1161 is the one from L1154.\nam i missing something?","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"33faa054d84867e909123ec776530af4673ee5de","unresolved":false,"context_lines":[{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_31a5a5b4","line":1161,"in_reply_to":"ba3cc151_df37a5ae","updated":"2015-06-30 17:31:22.000000000","message":"No mech_context here is assigned by 1138. \nSo this should not affect the DVR case, this is applicable for a non-dvr port.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"255874440a2056ca02b6340c9aaae61968b07db9","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1192,"context_line":"            mech_context,"},{"line_number":1193,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1194,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1195,"context_line":"        return bound_context.current"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def _post_update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_1f042dbe","line":1194,"updated":"2015-06-30 16:38:26.000000000","message":"are L1191-1194 appropriate for dvr case?\n\nmy gut feeling is that it\u0027s simpler to reject update_port requests which can affect dvr bindings.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"33faa054d84867e909123ec776530af4673ee5de","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1192,"context_line":"            mech_context,"},{"line_number":1193,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1194,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1195,"context_line":"        return bound_context.current"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def _post_update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_b1d9b585","line":1194,"in_reply_to":"ba3cc151_1f042dbe","updated":"2015-06-30 17:31:22.000000000","message":"The reason we need to handle the update_port case here is because of the IPv6 handling multiple subnets on a single network associated with a router interface port is different than IPv4. \nWhile IPv4 creates a new port, IPv6 update the router interface port and if it is a dvr port, we have to handle it.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7e858ed824e7d84cde27127ba5e87d1ea03bd9fa","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1192,"context_line":"            mech_context,"},{"line_number":1193,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1194,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1195,"context_line":"        return bound_context.current"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def _post_update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_c6c9087a","line":1194,"in_reply_to":"ba3cc151_b1d9b585","updated":"2015-07-01 03:23:15.000000000","message":"they don\u0027t affect bindings, do they?","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"742e09656e8d9012aa0abb8c722acf312c66942a","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1209,"context_line":"                LOG.error(_LE(\"mechanism_manager.delete_port_postcommit \""},{"line_number":1210,"context_line":"                          \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1211,"context_line":"        else:"},{"line_number":1212,"context_line":"            self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1213,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_55007534","line":1210,"updated":"2015-06-30 05:08:13.000000000","message":"Error statement is not proper since it describes method of code.\n\nAnd indent issue?","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"33faa054d84867e909123ec776530af4673ee5de","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1209,"context_line":"                LOG.error(_LE(\"mechanism_manager.delete_port_postcommit \""},{"line_number":1210,"context_line":"                          \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1211,"context_line":"        else:"},{"line_number":1212,"context_line":"            self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1213,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_d1ab1988","line":1210,"in_reply_to":"ba3cc151_55007534","updated":"2015-06-30 17:31:22.000000000","message":"will fix it.","commit_id":"155a72db7e70886cd98a263000fc3263db1686f3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"45b1d33f8c2871fc62014ba7700c7931fa00a6ce","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"        attrs \u003d port[attributes.PORT]"},{"line_number":1099,"context_line":"        need_port_update_notify \u003d False"},{"line_number":1100,"context_line":"        session \u003d context.session"},{"line_number":1101,"context_line":"        bound_mech_contexts \u003d []"},{"line_number":1102,"context_line":"        is_dvr_routed_port \u003d False"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"        # REVISIT: Serialize this operation with a semaphore to"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_e6a9ac7c","line":1101,"updated":"2015-07-01 03:26:28.000000000","message":"it\u0027s cleaner to use the list even for non-dvr case,\nas it\u0027s done in delete_port.","commit_id":"f1f2fdefcb694054a82ef553d1bccd1b24234f66"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"11a3846c7f2051da1f08682e110791ead0fd6ec7","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"        attrs \u003d port[attributes.PORT]"},{"line_number":1099,"context_line":"        need_port_update_notify \u003d False"},{"line_number":1100,"context_line":"        session \u003d context.session"},{"line_number":1101,"context_line":"        bound_mech_contexts \u003d []"},{"line_number":1102,"context_line":"        is_dvr_routed_port \u003d False"},{"line_number":1103,"context_line":""},{"line_number":1104,"context_line":"        # REVISIT: Serialize this operation with a semaphore to"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_fbbb4fe3","line":1101,"in_reply_to":"ba3cc151_e6a9ac7c","updated":"2015-07-01 22:44:20.000000000","message":"I am not sure if I understood your suggestion here.\nAre you asking to use the same \"bound_mech_context list variable for both the DVR and no DVR port bindings?\n\nIn the case of delete_port there are only two instances where they use the \"bound_mech_context\", ( precommit and postcommit) so it is more generic.\n\nBut in the case of  update, there are couple of places where they use the \"mech_context\" which is specific to the port-binding and not \"dvr-port-binding\".\n\nSo I think it makes sense to keep it in two different variable and use it.","commit_id":"f1f2fdefcb694054a82ef553d1bccd1b24234f66"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"            need_port_update_notify |\u003d self._update_extra_dhcp_opts_on_port("},{"line_number":1138,"context_line":"                context, id, port, updated_port)"},{"line_number":1139,"context_line":"            levels \u003d db.get_binding_levels(session, id, binding.host)"},{"line_number":1140,"context_line":"            mech_context \u003d driver_context.PortContext("},{"line_number":1141,"context_line":"                self, context, updated_port, network, binding, levels,"},{"line_number":1142,"context_line":"                original_port\u003doriginal_port)"},{"line_number":1143,"context_line":"            # For DVR router interface ports we need to retrieve the"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1b9537e3","line":1140,"updated":"2015-07-06 21:42:00.000000000","message":"I\u0027m wondering if it will read better if we use bound_mech_contexts for both cases.  There is a lot of overloading of variables below, I wonder if trying to write a little more generic code would help.","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"            need_port_update_notify |\u003d self._update_extra_dhcp_opts_on_port("},{"line_number":1138,"context_line":"                context, id, port, updated_port)"},{"line_number":1139,"context_line":"            levels \u003d db.get_binding_levels(session, id, binding.host)"},{"line_number":1140,"context_line":"            mech_context \u003d driver_context.PortContext("},{"line_number":1141,"context_line":"                self, context, updated_port, network, binding, levels,"},{"line_number":1142,"context_line":"                original_port\u003doriginal_port)"},{"line_number":1143,"context_line":"            # For DVR router interface ports we need to retrieve the"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_6dc84575","line":1140,"in_reply_to":"ba3cc151_1b9537e3","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"            # of the ports."},{"line_number":1147,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1148,"context_line":"                is_dvr_routed_port \u003d True"},{"line_number":1149,"context_line":"                bindings \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1150,"context_line":"                LOG.warning(_LW(\"binding host does not exist\"))"},{"line_number":1151,"context_line":"                for bind in bindings:"},{"line_number":1152,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_db826fc8","line":1149,"updated":"2015-07-06 21:42:00.000000000","message":"Could we use a little more descriptive name here to avoid confusing with \"binding\" and also to avoid having to say \"for bind in bindings\" on L1151 to avoid accidentally using \"binding\".  There is too much reuse of the same variable names in this method.","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"            # of the ports."},{"line_number":1147,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1148,"context_line":"                is_dvr_routed_port \u003d True"},{"line_number":1149,"context_line":"                bindings \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1150,"context_line":"                LOG.warning(_LW(\"binding host does not exist\"))"},{"line_number":1151,"context_line":"                for bind in bindings:"},{"line_number":1152,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_8dc34957","line":1149,"in_reply_to":"ba3cc151_db826fc8","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"                for bind in bindings:"},{"line_number":1152,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1153,"context_line":"                                                   bind.host)"},{"line_number":1154,"context_line":"                    mech_context \u003d driver_context.PortContext("},{"line_number":1155,"context_line":"                        self, context, updated_port, network, bind, levels,"},{"line_number":1156,"context_line":"                        original_port\u003doriginal_port)"},{"line_number":1157,"context_line":"                    bound_mech_contexts.append(mech_context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_58e505a6","line":1154,"updated":"2015-07-06 21:42:00.000000000","message":"This overwrites the assignment on L1140.  Is it okay that the mech_context used on L1159 and L1161 comes from here (last iteration through the loop)?  I\u0027m having trouble trying to figure out if mech_context as assigned on L1140 still matters after here.\n\nMaybe you should name this variable bound_mech_context?","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"                for bind in bindings:"},{"line_number":1152,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1153,"context_line":"                                                   bind.host)"},{"line_number":1154,"context_line":"                    mech_context \u003d driver_context.PortContext("},{"line_number":1155,"context_line":"                        self, context, updated_port, network, bind, levels,"},{"line_number":1156,"context_line":"                        original_port\u003doriginal_port)"},{"line_number":1157,"context_line":"                    bound_mech_contexts.append(mech_context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_2da1dda9","line":1154,"in_reply_to":"ba3cc151_58e505a6","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1165,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_98f94dcb","line":1162,"updated":"2015-07-06 21:42:00.000000000","message":"nit:  Why not just check \"if port-db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE\" again?","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1165,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_4da461b8","line":1162,"in_reply_to":"ba3cc151_98f94dcb","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1165,"context_line":"            else:"},{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_bebf59fb","line":1163,"updated":"2015-07-06 21:42:00.000000000","message":"for bound_mech_context in bound_mech_contexts:\n\nAgain, too much reuse of variable names confuses things.","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1161,"context_line":"                mech_context, attrs)"},{"line_number":1162,"context_line":"            if is_dvr_routed_port:"},{"line_number":1163,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1164,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1165,"context_line":"            else:"},{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_edaa1585","line":1163,"in_reply_to":"ba3cc151_bebf59fb","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def _post_update_port("},{"line_number":1198,"context_line":"            self, bound_mech_contexts, mech_context,"},{"line_number":1199,"context_line":"            is_dvr_routed_port, port):"},{"line_number":1200,"context_line":"        if is_dvr_routed_port:"},{"line_number":1201,"context_line":"            try:"},{"line_number":1202,"context_line":"                # Note that DVR Interface ports will have bindings on"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1e5e85e9","line":1199,"updated":"2015-07-06 21:42:00.000000000","message":"Passing a boolean to a method to choose between two completely different method behaviors make things difficult to read.  Just split it up in to two methods.  Actually, since this method is only used here, I\u0027m not sure it is worth creating, especially given the extra confusing indirection it adds.","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"    def _post_update_port("},{"line_number":1198,"context_line":"            self, bound_mech_contexts, mech_context,"},{"line_number":1199,"context_line":"            is_dvr_routed_port, port):"},{"line_number":1200,"context_line":"        if is_dvr_routed_port:"},{"line_number":1201,"context_line":"            try:"},{"line_number":1202,"context_line":"                # Note that DVR Interface ports will have bindings on"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_ad95ed40","line":1199,"in_reply_to":"ba3cc151_1e5e85e9","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6feeeb5f05d0b2f9ddd1adb249b4372d65519a56","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1203,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1204,"context_line":"                # while other ports typically have just one."},{"line_number":1205,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1206,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_9eddb572","line":1205,"updated":"2015-07-06 21:42:00.000000000","message":"ditto (L1163)","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5af1cc82b9a89e4162e1c52e199d7856956ff3c3","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1203,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1204,"context_line":"                # while other ports typically have just one."},{"line_number":1205,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1206,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_cd907151","line":1205,"in_reply_to":"ba3cc151_9eddb572","updated":"2015-07-07 00:55:21.000000000","message":"Done","commit_id":"3c823b426a261dbc5fd4675e0b8c92a06d80f6b0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"527dba750cafae74a86051dae1f162f8009fca4b","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            # The normal Portbinding context does not have the status"},{"line_number":1144,"context_line":"            # of the ports."},{"line_number":1145,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1146,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1147,"context_line":"                for dvr_binding in dvr_binding_list:"},{"line_number":1148,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1149,"context_line":"                                                   dvr_binding.host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_fcc5b03c","line":1146,"updated":"2015-07-07 22:06:26.000000000","message":"Right now I am seeing that the \"get_dvr_port_bindings\" is not returing any binding information for the dvr routed ports.\nI am currently debugging this issue and will post a patch once I understand more on this.\n\nIf anyone can help me debug this problem that would be great.!!","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"dc54232cc428990d74f508805dff64ea0fb416f8","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"            # The normal Portbinding context does not have the status"},{"line_number":1144,"context_line":"            # of the ports."},{"line_number":1145,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1146,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1147,"context_line":"                for dvr_binding in dvr_binding_list:"},{"line_number":1148,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1149,"context_line":"                                                   dvr_binding.host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_d27773d2","line":1146,"in_reply_to":"ba3cc151_fcc5b03c","updated":"2015-07-07 23:17:00.000000000","message":"for the first iteration it is not returning the binding list.\n2015-07-07 15:26:25.966 WARNING neutron.plugins.ml2.plugin [req-de694a65-5a09-4bb0-b1a2-c9154b3039b4 tempest-TestGettingAddress-1882606743 53eb0b3dee6245e48c8df4ab693d2e17] In DVR context: {\u0027status\u0027: u\u0027DOWN\u0027, \u0027binding:host_id\u0027: \u0027\u0027, \u0027allowed_address_pairs\u0027: [], \u0027extra_dhcp_opts\u0027: [], \u0027device_owner\u0027: u\u0027network:router_interface_distributed\u0027, \u0027port_security_enabled\u0027: False, \u0027binding:profile\u0027: {}, \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: u\u0027927e8359-bb89-4728-b9e0-de0b8c55afc0\u0027, \u0027ip_address\u0027: u\u00272003::1\u0027}, {\u0027subnet_id\u0027: u\u00276ec03011-e368-4c62-be63-54fce70d43bd\u0027, \u0027ip_address\u0027: u\u00272003:0:0:1::1\u0027}], \u0027id\u0027: u\u00276cac6b2d-ba30-4491-973c-d977bbe091cf\u0027, \u0027security_groups\u0027: [], \u0027device_id\u0027: u\u0027f6d9a1d2-943c-4a51-b642-c0e8fc72ac99\u0027, \u0027name\u0027: u\u0027\u0027, \u0027admin_state_up\u0027: True, \u0027network_id\u0027: u\u0027f5256b9a-72b5-4dda-a3d9-a7876e9f5070\u0027, \u0027tenant_id\u0027: u\u002753eb0b3dee6245e48c8df4ab693d2e17\u0027, \u0027binding:vif_details\u0027: {}, \u0027binding:vnic_type\u0027: u\u0027normal\u0027, \u0027binding:vif_type\u0027: \u0027distributed\u0027, \u0027mac_address\u0027: u\u0027fa:16:3e:87:6e:4c\u0027}\n2015-07-07 15:26:25.971 DEBUG neutron.plugins.ml2.db [req-de694a65-5a09-4bb0-b1a2-c9154b3039b4 tempest-TestGettingAddress-1882606743 53eb0b3dee6245e48c8df4ab693d2e17] No bindings for DVR port 6cac6b2d-ba30-4491-973c-d977bbe091cf from (pid\u003d42433) get_dvr_port_bindings /opt/stack/neutron/neutron/plugins/ml2/db.py:365\n2015-07-07 15:26:25.972 WARNING neutron.plugins.ml2.db [req-de694a65-5a09-4bb0-b1a2-c9154b3039b4 tempest-TestGettingAddress-1882606743 53eb0b3dee6245e48c8df4ab693d2e17] #### bindings: []\n\n\nFor the same port it is returing the binding list later.\n2015-07-07 15:28:13.931 WARNING neutron.plugins.ml2.plugin [req-1f345941-50ce-4d2b-8f9c-b952f55455be tempest-TestGettingAddress-1882606743 53eb0b3dee6245e48c8df4ab693d2e17] In DVR context: {\u0027status\u0027: u\u0027ACTIVE\u0027, \u0027binding:host_id\u0027: \u0027\u0027, \u0027allowed_address_pairs\u0027: [], \u0027extra_dhcp_opts\u0027: [], \u0027device_owner\u0027: u\u0027network:router_interface_distributed\u0027, \u0027port_security_enabled\u0027: False, \u0027binding:profile\u0027: {}, \u0027fixed_ips\u0027: [{\u0027subnet_id\u0027: u\u0027927e8359-bb89-4728-b9e0-de0b8c55afc0\u0027, \u0027ip_address\u0027: u\u00272003::1\u0027}], \u0027id\u0027: u\u00276cac6b2d-ba30-4491-973c-d977bbe091cf\u0027, \u0027security_groups\u0027: [], \u0027device_id\u0027: u\u0027f6d9a1d2-943c-4a51-b642-c0e8fc72ac99\u0027, \u0027name\u0027: u\u0027\u0027, \u0027admin_state_up\u0027: True, \u0027network_id\u0027: u\u0027f5256b9a-72b5-4dda-a3d9-a7876e9f5070\u0027, \u0027tenant_id\u0027: u\u002753eb0b3dee6245e48c8df4ab693d2e17\u0027, \u0027binding:vif_details\u0027: {}, \u0027binding:vnic_type\u0027: u\u0027normal\u0027, \u0027binding:vif_type\u0027: \u0027distributed\u0027, \u0027mac_address\u0027: u\u0027fa:16:3e:87:6e:4c\u0027}\n2015-07-07 15:28:13.933 WARNING neutron.plugins.ml2.db [req-1f345941-50ce-4d2b-8f9c-b952f55455be tempest-TestGettingAddress-1882606743 53eb0b3dee6245e48c8df4ab693d2e17] #### bindings: [\u003cneutron.plugins.ml2.models.DVRPortBinding[object at 7fa5b35ab450] {port_id\u003du\u00276cac6b2d-ba30-4491-973c-d977bbe091cf\u0027, host\u003du\u0027ubuntu-ctlr\u0027, router_id\u003du\u0027f6d9a1d2-943c-4a51-b642-c0e8fc72ac99\u0027, vif_type\u003du\u0027ovs\u0027, vif_details\u003du\u0027{\"port_filter\": true, \"ovs_hybrid_plug\": true}\u0027, vnic_type\u003du\u0027normal\u0027, profile\u003du\u0027\u0027, status\u003du\u0027ACTIVE\u0027}\u003e]","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"45b767d71d35fe0821ef93cf33ceb314c914e57f","unresolved":false,"context_lines":[{"line_number":1145,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1146,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1147,"context_line":"                for dvr_binding in dvr_binding_list:"},{"line_number":1148,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1149,"context_line":"                                                   dvr_binding.host)"},{"line_number":1150,"context_line":"                    mech_context \u003d driver_context.PortContext("},{"line_number":1151,"context_line":"                        self, context, updated_port, network,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_e102eb3d","line":1148,"updated":"2015-07-07 22:02:10.000000000","message":"Any reason you use context.session here instead of just session ?  It could all go away if you refactor based on Henry\u0027s comments.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1145,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1146,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1147,"context_line":"                for dvr_binding in dvr_binding_list:"},{"line_number":1148,"context_line":"                    levels \u003d db.get_binding_levels(context.session, id,"},{"line_number":1149,"context_line":"                                                   dvr_binding.host)"},{"line_number":1150,"context_line":"                    mech_context \u003d driver_context.PortContext("},{"line_number":1151,"context_line":"                        self, context, updated_port, network,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_7d008c34","line":1148,"in_reply_to":"ba3cc151_e102eb3d","updated":"2015-07-08 18:12:37.000000000","message":"Fixed it in the next patch.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4811afd5d67b5fa49c5955f461570f7d9b3c79b2","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"                        self, context, updated_port, network,"},{"line_number":1152,"context_line":"                        dvr_binding, levels, original_port\u003doriginal_port)"},{"line_number":1153,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1154,"context_line":"            else:"},{"line_number":1155,"context_line":"                levels \u003d db.get_binding_levels(session, id, binding.host)"},{"line_number":1156,"context_line":"                mech_context \u003d driver_context.PortContext("},{"line_number":1157,"context_line":"                    self, context, updated_port, network, binding, levels,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_8e625cd7","line":1154,"updated":"2015-07-07 05:20:06.000000000","message":"The body of this else is the same a the body of the for-loop above. Instead of cloning the code, just treat the non-dvr case as a list of one binding.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"                        self, context, updated_port, network,"},{"line_number":1152,"context_line":"                        dvr_binding, levels, original_port\u003doriginal_port)"},{"line_number":1153,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1154,"context_line":"            else:"},{"line_number":1155,"context_line":"                levels \u003d db.get_binding_levels(session, id, binding.host)"},{"line_number":1156,"context_line":"                mech_context \u003d driver_context.PortContext("},{"line_number":1157,"context_line":"                    self, context, updated_port, network, binding, levels,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_1da70051","line":1154,"in_reply_to":"ba3cc151_8e625cd7","updated":"2015-07-08 18:12:37.000000000","message":"Yes I tried to create a list of one binding, but unfortunately the dvr port binding is missing at certain times, so I need to have two different context to work around this issue.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"            new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1162,"context_line":"                bound_mech_contexts[0], attrs)"},{"line_number":1163,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1164,"context_line":"                bound_mech_contexts[0], attrs)"},{"line_number":1165,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1166,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_d7d51be5","line":1164,"updated":"2015-07-08 05:05:34.000000000","message":"This should be retained only under the \u0027else:\u0027 case, becuase the process_port_binding is only for non-DVR interfaces.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"            new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1162,"context_line":"                bound_mech_contexts[0], attrs)"},{"line_number":1163,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1164,"context_line":"                bound_mech_contexts[0], attrs)"},{"line_number":1165,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1166,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_1d55c01c","line":1164,"in_reply_to":"ba3cc151_d7d51be5","updated":"2015-07-08 18:12:37.000000000","message":"The reason I need to keep it out of the else loop is because the \"kwargs\" requires the \"new_host_port\". so it makes sense to keep it outside .","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4811afd5d67b5fa49c5955f461570f7d9b3c79b2","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1166,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":"            else:"},{"line_number":1169,"context_line":"                self.mechanism_manager.update_port_precommit("},{"line_number":1170,"context_line":"                    bound_mech_contexts[0])"},{"line_number":1171,"context_line":"        # Notifications must be sent after the above transaction is complete"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_ceaf04e2","line":1168,"updated":"2015-07-07 05:20:06.000000000","message":"The non-dvr case is a list of one, so you can use the for-loop at 1166-67 without checking for dvr.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1166,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":"            else:"},{"line_number":1169,"context_line":"                self.mechanism_manager.update_port_precommit("},{"line_number":1170,"context_line":"                    bound_mech_contexts[0])"},{"line_number":1171,"context_line":"        # Notifications must be sent after the above transaction is complete"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5d26e8ce","line":1168,"in_reply_to":"ba3cc151_ceaf04e2","updated":"2015-07-08 18:12:37.000000000","message":"I moved this into the else.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":"            else:"},{"line_number":1169,"context_line":"                self.mechanism_manager.update_port_precommit("},{"line_number":1170,"context_line":"                    bound_mech_contexts[0])"},{"line_number":1171,"context_line":"        # Notifications must be sent after the above transaction is complete"},{"line_number":1172,"context_line":"        kwargs \u003d {"},{"line_number":1173,"context_line":"            \u0027context\u0027: context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_57002b66","line":1170,"updated":"2015-07-08 05:05:34.000000000","message":"One \u0027for:\u0027 loop is sufficient for port-precommit case as put by Henry.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":"            else:"},{"line_number":1169,"context_line":"                self.mechanism_manager.update_port_precommit("},{"line_number":1170,"context_line":"                    bound_mech_contexts[0])"},{"line_number":1171,"context_line":"        # Notifications must be sent after the above transaction is complete"},{"line_number":1172,"context_line":"        kwargs \u003d {"},{"line_number":1173,"context_line":"            \u0027context\u0027: context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_bd137464","line":1170,"in_reply_to":"ba3cc151_57002b66","updated":"2015-07-08 18:12:37.000000000","message":"done.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"            \u0027context\u0027: context,"},{"line_number":1174,"context_line":"            \u0027port\u0027: new_host_port,"},{"line_number":1175,"context_line":"            \u0027mac_address_updated\u0027: mac_address_updated,"},{"line_number":1176,"context_line":"        }"},{"line_number":1177,"context_line":"        registry.notify(resources.PORT, events.AFTER_UPDATE, self, **kwargs)"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        # TODO(apech) - handle errors raised by update_port, potentially"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_b7aad76f","line":1176,"updated":"2015-07-08 05:05:34.000000000","message":"Please try if we can update a port mac-address for a DVR Router Interface.\n\nIf not possible, this entire notification bunch can be done just for non-DVR interfaces.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"            \u0027context\u0027: context,"},{"line_number":1174,"context_line":"            \u0027port\u0027: new_host_port,"},{"line_number":1175,"context_line":"            \u0027mac_address_updated\u0027: mac_address_updated,"},{"line_number":1176,"context_line":"        }"},{"line_number":1177,"context_line":"        registry.notify(resources.PORT, events.AFTER_UPDATE, self, **kwargs)"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        # TODO(apech) - handle errors raised by update_port, potentially"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_3d00c401","line":1176,"in_reply_to":"ba3cc151_b7aad76f","updated":"2015-07-08 18:12:37.000000000","message":"will check this out.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1191,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1192,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_77ea0f11","line":1193,"updated":"2015-07-08 05:05:34.000000000","message":"DVR Interface ports are bound only via calls to  update_dvr_binding.  Binding them here again need not be done.\n\nFurther, if you want to pursue binding of DVR ports here, you should run through all bound-mech-contexts.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"45b767d71d35fe0821ef93cf33ceb314c914e57f","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1191,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1192,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_1c5894f9","line":1193,"updated":"2015-07-07 22:02:10.000000000","message":"Is this safe?  Based on Henry\u0027s question below, bound_mech_contexts[0] could be a failure case if we allow just a single postcommit success to be considered valid.  Hopefully that makes sense.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1191,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1192,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5897d68f","line":1193,"in_reply_to":"ba3cc151_1c5894f9","updated":"2015-07-08 18:12:37.000000000","message":"addressed this in the next patch.\nSince DVR port binding is not done here, this is only for non-dvr ports.\nso for now I will just handle this _bind_port_if_needed only with the portContext and not with the DVRContext.\n\nSince I don\u0027t receive the attrs.get(portbindings.HOST_ID), I can do a port binding for the DVR related ports.\n\nBut still we need to return a valid context, so I need to handle with the portContext.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1191,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1192,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_98ef9e1c","line":1193,"in_reply_to":"ba3cc151_77ea0f11","updated":"2015-07-08 18:12:37.000000000","message":"see the reply above.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"    def _post_update_port("},{"line_number":1199,"context_line":"            self, bound_mech_contexts, port):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_d7f67b5c","line":1196,"updated":"2015-07-08 05:05:34.000000000","message":"For DVR Ports, you have to figure out which dvr-binding from ou r dvrportbinding table, to pick using input binding.HOST_ID passed in update_port.\n\nConstruct a mech-context for that recovered dvr-binding and return that context.current.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            bound_mech_contexts[0],"},{"line_number":1194,"context_line":"            allow_notify\u003dTrue,"},{"line_number":1195,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1196,"context_line":"        return bound_context.current"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"    def _post_update_port("},{"line_number":1199,"context_line":"            self, bound_mech_contexts, port):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_58def66d","line":1196,"in_reply_to":"ba3cc151_d7f67b5c","updated":"2015-07-08 18:12:37.000000000","message":"yes the portbinding.HOST_ID is not passed.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4811afd5d67b5fa49c5955f461570f7d9b3c79b2","unresolved":false,"context_lines":[{"line_number":1205,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1206,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1209,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1210,"context_line":"                              \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1211,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_0e35ec44","line":1208,"updated":"2015-07-07 05:20:06.000000000","message":"Isn\u0027t it a failure if update_port_postcommit fails for all the mech_contexts? (In other words, if none of them succeed.)","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ab7b1b77c2962c776db4f0ff6d487b743985a8e3","unresolved":false,"context_lines":[{"line_number":1205,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1206,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1207,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1208,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1209,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1210,"context_line":"                              \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1211,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_d85e86e8","line":1208,"in_reply_to":"ba3cc151_0e35ec44","updated":"2015-07-08 18:12:37.000000000","message":"Yes, this is how it is handled in the \"delete_port\" postcommit case.\nSo I was following the same model.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a0beabba1bf39eba7806782172de8a8b1ed7fd58","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            mech_context \u003d driver_context.PortContext("},{"line_number":1142,"context_line":"                self, context, updated_port, network, binding, levels,"},{"line_number":1143,"context_line":"                original_port\u003doriginal_port)"},{"line_number":1144,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1145,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1146,"context_line":"                mech_context, attrs)"},{"line_number":1147,"context_line":"            self.mechanism_manager.update_port_precommit(mech_context)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_9e8d47d5","side":"PARENT","line":1144,"updated":"2015-07-08 19:06:21.000000000","message":"These are under the transaction.","commit_id":"cc6f9bb60c3d23626bdd2d5651e6c3c0272e4678"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2e9bcbc76d89a589010055cba71ff70c94b6d2ab","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"                    self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1164,"context_line":"                    bound_mech_contexts.append(mech_context)"},{"line_number":1165,"context_line":"            else:"},{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1169,"context_line":"            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_a4459c43","line":1166,"updated":"2015-07-08 19:19:41.000000000","message":"Can you do a bound_mech_contexts.append(mech_context) here too? ...","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a0beabba1bf39eba7806782172de8a8b1ed7fd58","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"            else:"},{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1169,"context_line":"            mech_context, attrs)"},{"line_number":1170,"context_line":"        need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1171,"context_line":"            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_1ea13746","line":1168,"updated":"2015-07-08 19:06:21.000000000","message":"Should these be under the transaction?","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fefaf1fa8fc4c6cc7bb28aaa9c33c1ca47a5c69e","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"            else:"},{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1169,"context_line":"            mech_context, attrs)"},{"line_number":1170,"context_line":"        need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1171,"context_line":"            mech_context, attrs)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_016a3aed","line":1168,"in_reply_to":"ba3cc151_1ea13746","updated":"2015-07-08 19:28:33.000000000","message":"sorry I will put it back inside the transaction.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a0beabba1bf39eba7806782172de8a8b1ed7fd58","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1169,"context_line":"            mech_context, attrs)"},{"line_number":1170,"context_line":"        need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1171,"context_line":"            mech_context, attrs)"},{"line_number":1172,"context_line":"        # Notifications must be sent after the above transaction is complete"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_417a82f2","line":1169,"updated":"2015-07-08 19:06:21.000000000","message":"The value of mech_context here in the case of a dvr interface is the value from the last time through the loop on L1157.  This might be what you intended but it is difficult for the reader to know if the assignment on L1160 intentionally overwrites the one outside of the loop on L1142 or if that is a mistake.\n\nI think it would be better to use \"dvr_mech_context\" as the variable name inside the loop.  Then, if mech_context should be overwritten, do it explicit.  I think this could avoid some eye-brow raising from code reviewers and maintainers.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fefaf1fa8fc4c6cc7bb28aaa9c33c1ca47a5c69e","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":"        new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1169,"context_line":"            mech_context, attrs)"},{"line_number":1170,"context_line":"        need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1171,"context_line":"            mech_context, attrs)"},{"line_number":1172,"context_line":"        # Notifications must be sent after the above transaction is complete"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_c178d2c6","line":1169,"in_reply_to":"ba3cc151_417a82f2","updated":"2015-07-08 19:28:33.000000000","message":"Makes sense I will rename the mech_context, so that it does not confuse.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2e9bcbc76d89a589010055cba71ff70c94b6d2ab","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"        # by re-calling update_port with the previous attributes. For"},{"line_number":1182,"context_line":"        # now the error is propogated to the caller, which is expected to"},{"line_number":1183,"context_line":"        # either undo/retry the operation or delete the resource."},{"line_number":1184,"context_line":"        self._post_update_port(bound_mech_contexts, mech_context, updated_port)"},{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"        self.check_and_notify_security_group_member_changed("},{"line_number":1187,"context_line":"            context, original_port, updated_port)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_4475b095","line":1184,"updated":"2015-07-08 19:19:41.000000000","message":"... then you just need bound_mech_contexts passed here ... or in whatever for() loop processes them.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a0beabba1bf39eba7806782172de8a8b1ed7fd58","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1203,"context_line":"        return bound_context.current"},{"line_number":1204,"context_line":""},{"line_number":1205,"context_line":"    def _post_update_port("},{"line_number":1206,"context_line":"            self, bound_mech_contexts, mech_context, port):"},{"line_number":1207,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1208,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_9e522734","line":1205,"updated":"2015-07-08 19:06:21.000000000","message":"IMHO, this method should just be inlined.  I don\u0027t think it provides any kind of useful encapsulation and it is a bit awkward.  It takes both bound_mech_contexts and mech_context and does two completely different things based on a boolean condition.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fefaf1fa8fc4c6cc7bb28aaa9c33c1ca47a5c69e","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"            need_notify\u003dneed_port_update_notify)"},{"line_number":1203,"context_line":"        return bound_context.current"},{"line_number":1204,"context_line":""},{"line_number":1205,"context_line":"    def _post_update_port("},{"line_number":1206,"context_line":"            self, bound_mech_contexts, mech_context, port):"},{"line_number":1207,"context_line":"        if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1208,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_414b6287","line":1205,"in_reply_to":"ba3cc151_9e522734","updated":"2015-07-08 19:28:33.000000000","message":"Sure will inline it.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"a0beabba1bf39eba7806782172de8a8b1ed7fd58","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1210,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1211,"context_line":"                # while other ports typically have just one."},{"line_number":1212,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1213,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1214,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1215,"context_line":"                # One or more mechanism driver failed to update the port."}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_01a23afc","line":1212,"updated":"2015-07-08 19:06:21.000000000","message":"Use:  \"for bound_mech_context in bound_mech_contexts:\"\n\nAvoid repurposing mech_context too much.  It puts cognitive load on reviewers and code maintainers.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fefaf1fa8fc4c6cc7bb28aaa9c33c1ca47a5c69e","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1210,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1211,"context_line":"                # while other ports typically have just one."},{"line_number":1212,"context_line":"                for mech_context in bound_mech_contexts:"},{"line_number":1213,"context_line":"                    self.mechanism_manager.update_port_postcommit(mech_context)"},{"line_number":1214,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1215,"context_line":"                # One or more mechanism driver failed to update the port."}],"source_content_type":"text/x-python","patch_set":10,"id":"ba3cc151_0141da62","line":1212,"in_reply_to":"ba3cc151_01a23afc","updated":"2015-07-08 19:28:33.000000000","message":"Sure will fix it.","commit_id":"759193278cc7a0f7a991f7c17ea47ac1a498736a"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bfc82b879a6c3c075e1a761ef2930dfe2e83b1f7","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        }"},{"line_number":1179,"context_line":"        registry.notify(resources.PORT, events.AFTER_UPDATE, self, **kwargs)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1182,"context_line":"            try:"},{"line_number":1183,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1184,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_4dbcf3ba","line":1181,"updated":"2015-07-08 20:49:29.000000000","message":"I still think you can get rid of this second check completely if in the non-DVR case you append the single mech_context to bound_mech_contexts above.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b850961b9bea0dca8a95305c58a70d40073b7393","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"        }"},{"line_number":1179,"context_line":"        registry.notify(resources.PORT, events.AFTER_UPDATE, self, **kwargs)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1182,"context_line":"            try:"},{"line_number":1183,"context_line":"                # Note that DVR Interface ports will have bindings on"},{"line_number":1184,"context_line":"                # multiple hosts, and so will have multiple mech_contexts,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_c800ee36","line":1181,"in_reply_to":"ba3cc151_4dbcf3ba","updated":"2015-07-08 23:33:00.000000000","message":"I don\u0027t think it would help. It would rather confuse. I understand your concerns on reducing the second check, but this would be more straigtforward.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bfc82b879a6c3c075e1a761ef2930dfe2e83b1f7","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                # while other ports typically have just one."},{"line_number":1186,"context_line":"                for dvr_mech_context in bound_mech_contexts:"},{"line_number":1187,"context_line":"                    self.mechanism_manager.update_port_postcommit("},{"line_number":1188,"context_line":"                        dvr_mech_context)"},{"line_number":1189,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1191,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_0d5a6bf2","line":1188,"updated":"2015-07-08 20:49:29.000000000","message":"So if this throws an exception on the first context, it will get caught, but we won\u0027t process the rest.  Seems like you want to do what _call_on_drivers() does and have the try/except inside the for() loop.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b850961b9bea0dca8a95305c58a70d40073b7393","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                # while other ports typically have just one."},{"line_number":1186,"context_line":"                for dvr_mech_context in bound_mech_contexts:"},{"line_number":1187,"context_line":"                    self.mechanism_manager.update_port_postcommit("},{"line_number":1188,"context_line":"                        dvr_mech_context)"},{"line_number":1189,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1191,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_e8e372d6","line":1188,"in_reply_to":"ba3cc151_0d5a6bf2","updated":"2015-07-08 23:33:00.000000000","message":"that would work out.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bfc82b879a6c3c075e1a761ef2930dfe2e83b1f7","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1191,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1192,"context_line":"                              \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1193,"context_line":"        else:"},{"line_number":1194,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1195,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_7290b2ed","line":1192,"updated":"2015-07-08 20:49:29.000000000","message":"The \u0027id\u0027 argument is the UUID of the port, so this can just use that directly.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b850961b9bea0dca8a95305c58a70d40073b7393","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"            except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                # One or more mechanism driver failed to update the port."},{"line_number":1191,"context_line":"                LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1192,"context_line":"                              \"failed for port %s\"), port[\u0027id\u0027])"},{"line_number":1193,"context_line":"        else:"},{"line_number":1194,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1195,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_48e37ed9","line":1192,"in_reply_to":"ba3cc151_7290b2ed","updated":"2015-07-08 23:33:00.000000000","message":"Yes will fix it.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bfc82b879a6c3c075e1a761ef2930dfe2e83b1f7","unresolved":false,"context_lines":[{"line_number":1206,"context_line":"        # DVR routed interfaces. But still since we don\u0027t have the"},{"line_number":1207,"context_line":"        # mech_context for the DVR router interfaces at certain times, we"},{"line_number":1208,"context_line":"        # just pass the port-context and return it, so that we don\u0027t"},{"line_number":1209,"context_line":"        # disturb other methods that are expecting a return value."},{"line_number":1210,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1211,"context_line":"            mech_context,"},{"line_number":1212,"context_line":"            allow_notify\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_0ddfcb3a","line":1209,"updated":"2015-07-08 20:49:29.000000000","message":"Vivek had a comment on PS8 about returning the context related to the host_id, does that need to be saved and used here?","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b850961b9bea0dca8a95305c58a70d40073b7393","unresolved":false,"context_lines":[{"line_number":1206,"context_line":"        # DVR routed interfaces. But still since we don\u0027t have the"},{"line_number":1207,"context_line":"        # mech_context for the DVR router interfaces at certain times, we"},{"line_number":1208,"context_line":"        # just pass the port-context and return it, so that we don\u0027t"},{"line_number":1209,"context_line":"        # disturb other methods that are expecting a return value."},{"line_number":1210,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1211,"context_line":"            mech_context,"},{"line_number":1212,"context_line":"            allow_notify\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba3cc151_c8c8ee57","line":1209,"in_reply_to":"ba3cc151_0ddfcb3a","updated":"2015-07-08 23:33:00.000000000","message":"the host_id is not  returned by the attributes, so not handling it right now.","commit_id":"d106788bfc64a77df60f1c608f6eaf3f999bd8b6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0e5ed1ee97aedd551f9d0f66b3890b233a920b67","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"        # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1183,"context_line":"        # while other ports typically have just one."},{"line_number":1184,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1185,"context_line":"            for mech_context in bound_mech_contexts:"},{"line_number":1186,"context_line":"                try:"},{"line_number":1187,"context_line":"                    self.mechanism_manager.update_port_postcommit("},{"line_number":1188,"context_line":"                        mech_context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_3fd87c52","line":1185,"updated":"2015-07-09 16:09:43.000000000","message":"This changed back to \u0027mech_context\u0027 from dvr_mech_context in PS13, which will impact L1210 below.","commit_id":"7bc2710b4d302c1022dd13f2a7645d7ff6e7b5d7"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5c5361a11355ae3fff26d068872e788a8fda0314","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"        # multiple hosts, and so will have multiple mech_contexts,"},{"line_number":1183,"context_line":"        # while other ports typically have just one."},{"line_number":1184,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1185,"context_line":"            for mech_context in bound_mech_contexts:"},{"line_number":1186,"context_line":"                try:"},{"line_number":1187,"context_line":"                    self.mechanism_manager.update_port_postcommit("},{"line_number":1188,"context_line":"                        mech_context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_f5b473f1","line":1185,"in_reply_to":"ba3cc151_3fd87c52","updated":"2015-07-09 16:49:32.000000000","message":"will fix this.","commit_id":"7bc2710b4d302c1022dd13f2a7645d7ff6e7b5d7"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"0e5ed1ee97aedd551f9d0f66b3890b233a920b67","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                    LOG.error(_LE(\"mechanism_manager.delete_port_postcommit \""},{"line_number":1191,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1192,"context_line":"        else:"},{"line_number":1193,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1194,"context_line":"                mech_context)"},{"line_number":1195,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_1fb818c7","line":1192,"updated":"2015-07-09 16:09:43.000000000","message":"This loop is better, but will not raise an error at all - is that the correct thing to do?","commit_id":"7bc2710b4d302c1022dd13f2a7645d7ff6e7b5d7"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5c5361a11355ae3fff26d068872e788a8fda0314","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                    LOG.error(_LE(\"mechanism_manager.delete_port_postcommit \""},{"line_number":1191,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1192,"context_line":"        else:"},{"line_number":1193,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1194,"context_line":"                mech_context)"},{"line_number":1195,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_b5790b31","line":1192,"in_reply_to":"ba3cc151_1fb818c7","updated":"2015-07-09 16:49:32.000000000","message":"I was concerned in raising an error in this case because there was a couple of existing UT\u0027s that raised error when I handled the exception here.\nSo I need some ML2 experts to say if it is right or not.","commit_id":"7bc2710b4d302c1022dd13f2a7645d7ff6e7b5d7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b96b4e0359bb75a43827dd9ef8140ec26d5bcb42","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            new_host_port \u003d self._get_host_port_if_changed("},{"line_number":1170,"context_line":"                mech_context, attrs)"},{"line_number":1171,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("},{"line_number":1172,"context_line":"                mech_context, attrs)"},{"line_number":1173,"context_line":"        # Notifications must be sent after the above transaction is complete"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_6f0d8f3d","line":1170,"updated":"2015-07-13 17:24:24.000000000","message":"nit:  Changed whitespace.  Please avoid doing this.","commit_id":"80effd0f8843ac85fb8b1575891b08a75c46df0e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"004c2f10e9f55a037fa5e1530d877a6c742d5dfc","unresolved":false,"context_lines":[{"line_number":1188,"context_line":"                        dvr_mech_context)"},{"line_number":1189,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1191,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1192,"context_line":"        else:"},{"line_number":1193,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1194,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_52b5d02e","line":1191,"updated":"2015-07-13 17:25:23.000000000","message":"So this loop is where my only question is - should it raise an error like the non-DVR case?  Or only raise if all failed?  Or if one failed?","commit_id":"80effd0f8843ac85fb8b1575891b08a75c46df0e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c73c04242bade6b5800e16d9f28c173d2cfdbd78","unresolved":false,"context_lines":[{"line_number":1188,"context_line":"                        dvr_mech_context)"},{"line_number":1189,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1190,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1191,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1192,"context_line":"        else:"},{"line_number":1193,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1194,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a41bdd9_9d57e901","line":1191,"in_reply_to":"9a41bdd9_52b5d02e","updated":"2015-07-13 17:48:32.000000000","message":"It is a good question, @Brian.  What happens when the legacy path raises?  Does the error propagate back to the API call and fail it?  Since this is after the transaction, it shouldn\u0027t affect the transaction.","commit_id":"80effd0f8843ac85fb8b1575891b08a75c46df0e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"            # NOTE:Sometimes during the update_port call, the DVR router"},{"line_number":1152,"context_line":"            # interface port may not have the port binding, so we cannot"},{"line_number":1153,"context_line":"            # create a generic bindinglist that will address both the"},{"line_number":1154,"context_line":"            # DVR and non-DVR cases here. This code need to be revisited."},{"line_number":1155,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1156,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1157,"context_line":"                for dvr_binding in dvr_binding_list:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_719c6dc0","line":1154,"updated":"2015-07-14 11:53:41.000000000","message":"i agree this should be revisited.\n\nmy impression is that ml2 driver api is not well defined\nwrt dvr bindings.  probably it isn\u0027t in the scope of this patch, though.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"771b32a167ccf465a975d9ed6e48003f5d36af5f","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"            # NOTE:Sometimes during the update_port call, the DVR router"},{"line_number":1152,"context_line":"            # interface port may not have the port binding, so we cannot"},{"line_number":1153,"context_line":"            # create a generic bindinglist that will address both the"},{"line_number":1154,"context_line":"            # DVR and non-DVR cases here. This code need to be revisited."},{"line_number":1155,"context_line":"            if port_db[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":1156,"context_line":"                dvr_binding_list \u003d db.get_dvr_port_bindings(session, id)"},{"line_number":1157,"context_line":"                for dvr_binding in dvr_binding_list:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_e7674db5","line":1154,"in_reply_to":"9a41bdd9_719c6dc0","updated":"2015-07-14 17:19:46.000000000","message":"Yes we will revisit this.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"18df22c6f86b220daa265dda42371106bba0900a","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"                        dvr_mech_context)"},{"line_number":1165,"context_line":"                    bound_mech_contexts.append(dvr_mech_context)"},{"line_number":1166,"context_line":"            else:"},{"line_number":1167,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1170,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_4f62dd3f","line":1167,"updated":"2015-07-14 14:17:56.000000000","message":"I know I\u0027ve mentioned it before, but let\u0027s mimic what delete_port() does and add this here:\n\nbound_mech_contexts.append(mech_context)\n\nThen we can remove the other DVR check below and have a single for() loop for both cases.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"771b32a167ccf465a975d9ed6e48003f5d36af5f","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"                        dvr_mech_context)"},{"line_number":1165,"context_line":"                    bound_mech_contexts.append(dvr_mech_context)"},{"line_number":1166,"context_line":"            else:"},{"line_number":1167,"context_line":"                self.mechanism_manager.update_port_precommit(mech_context)"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            new_host_port \u003d self._get_host_port_if_changed(mech_context, attrs)"},{"line_number":1170,"context_line":"            need_port_update_notify |\u003d self._process_port_binding("}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_a73385aa","line":1167,"in_reply_to":"9a41bdd9_4f62dd3f","updated":"2015-07-14 17:19:46.000000000","message":"Ok will address this.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"501b04419bcbda1aea1386faa65465c46f0736e1","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                        dvr_mech_context)"},{"line_number":1188,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1189,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1190,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1191,"context_line":"        else:"},{"line_number":1192,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1193,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_32e60cb5","line":1190,"updated":"2015-07-13 17:41:30.000000000","message":"Just carrying my question from PS18 forward.\n\nSo this loop is where my only question is - should it raise an error like the non-DVR case? Or only raise if all failed? Or if one failed?  I\u0027m thinking if all failed there is a big problem.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                        dvr_mech_context)"},{"line_number":1188,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1189,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1190,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1191,"context_line":"        else:"},{"line_number":1192,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1193,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_91ed7127","line":1190,"in_reply_to":"9a41bdd9_1c60a800","updated":"2015-07-14 11:53:41.000000000","message":"at least it should be consistent with delete_port, which currently exits the loop on an exception.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e04843d4e12cd5a1517dae16506937a3bf36216a","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                        dvr_mech_context)"},{"line_number":1188,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1189,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1190,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1191,"context_line":"        else:"},{"line_number":1192,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1193,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_1c60a800","line":1190,"in_reply_to":"9a41bdd9_32e60cb5","updated":"2015-07-14 03:56:21.000000000","message":"I guess it should probably raise an error if any of them fail.  What do you think @Brian and Swami?  We could just remove the try/except  Is this failure expected often?  Under what conditions would it fail?","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"771b32a167ccf465a975d9ed6e48003f5d36af5f","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                        dvr_mech_context)"},{"line_number":1188,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1189,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1190,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1191,"context_line":"        else:"},{"line_number":1192,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1193,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_4724f95e","line":1190,"in_reply_to":"9a41bdd9_8f3225f1","updated":"2015-07-14 17:19:46.000000000","message":"Ok, will revert it to the old model, then.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"18df22c6f86b220daa265dda42371106bba0900a","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                        dvr_mech_context)"},{"line_number":1188,"context_line":"                except ml2_exc.MechanismDriverError:"},{"line_number":1189,"context_line":"                    LOG.error(_LE(\"mechanism_manager.update_port_postcommit \""},{"line_number":1190,"context_line":"                                  \"failed for port %s\"), id)"},{"line_number":1191,"context_line":"        else:"},{"line_number":1192,"context_line":"            self.mechanism_manager.update_port_postcommit("},{"line_number":1193,"context_line":"                mech_context)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_8f3225f1","line":1190,"in_reply_to":"9a41bdd9_91ed7127","updated":"2015-07-14 14:17:56.000000000","message":"Good find @Yamamoto - we should do what the delete_port() code in _post_delete_port() does then, which is how Swami had this code originally before I had him change it :(","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1201,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1202,"context_line":"        # NOTE: In the case of DVR ports, the port-binding is done in a"},{"line_number":1203,"context_line":"        # different place and so this call below may not be required for"},{"line_number":1204,"context_line":"        # DVR routed interfaces. But still since we don\u0027t have the"},{"line_number":1205,"context_line":"        # mech_context for the DVR router interfaces at certain times, we"},{"line_number":1206,"context_line":"        # just pass the port-context and return it, so that we don\u0027t"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_515cc9ec","line":1203,"updated":"2015-07-14 11:53:41.000000000","message":"better to be specific.\nie. s/a different place/update_dvr_port_binding/","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"771b32a167ccf465a975d9ed6e48003f5d36af5f","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d updated_port[\u0027admin_state_up\u0027]:"},{"line_number":1201,"context_line":"            need_port_update_notify \u003d True"},{"line_number":1202,"context_line":"        # NOTE: In the case of DVR ports, the port-binding is done in a"},{"line_number":1203,"context_line":"        # different place and so this call below may not be required for"},{"line_number":1204,"context_line":"        # DVR routed interfaces. But still since we don\u0027t have the"},{"line_number":1205,"context_line":"        # mech_context for the DVR router interfaces at certain times, we"},{"line_number":1206,"context_line":"        # just pass the port-context and return it, so that we don\u0027t"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_87d5211d","line":1203,"in_reply_to":"9a41bdd9_515cc9ec","updated":"2015-07-14 17:19:46.000000000","message":"Sure will address this.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def setup_port_has_ipv6_address(self, port):"},{"line_number":248,"context_line":"        with mock.patch.object(l3_dvr_db.l3_db.L3_NAT_db_mixin,"},{"line_number":249,"context_line":"                               \u0027_port_has_ipv6_address\u0027) as pv6:"},{"line_number":250,"context_line":"            result \u003d self.mixin._port_has_ipv6_address(port)"},{"line_number":251,"context_line":"            return result, pv6"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_ae59345c","line":249,"updated":"2015-07-14 11:53:41.000000000","message":"better to have return_value\u003dTrue","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"19c22c4cb9d1fade5a43e3fb5771f4ee5dacce07","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def setup_port_has_ipv6_address(self, port):"},{"line_number":248,"context_line":"        with mock.patch.object(l3_dvr_db.l3_db.L3_NAT_db_mixin,"},{"line_number":249,"context_line":"                               \u0027_port_has_ipv6_address\u0027) as pv6:"},{"line_number":250,"context_line":"            result \u003d self.mixin._port_has_ipv6_address(port)"},{"line_number":251,"context_line":"            return result, pv6"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_e7f0a893","line":249,"in_reply_to":"9a41bdd9_ae59345c","updated":"2015-07-14 19:04:14.000000000","message":"Done","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"35d726e9a8801fcd355ee1f3cbe0d4208baa28da","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_6d2265bb","line":260,"updated":"2015-07-14 02:39:49.000000000","message":"fixed_ips must be list.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"19c22c4cb9d1fade5a43e3fb5771f4ee5dacce07","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_274210af","line":260,"in_reply_to":"9a41bdd9_0e22a0b9","updated":"2015-07-14 19:04:14.000000000","message":"Done","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"eada3f7fb3e0a28760a322479cd4da782868535d","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_0e22a0b9","line":260,"in_reply_to":"9a41bdd9_5c0dd08e","updated":"2015-07-14 11:53:41.000000000","message":"+1","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"19c22c4cb9d1fade5a43e3fb5771f4ee5dacce07","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_473f1424","line":260,"in_reply_to":"9a41bdd9_5c0dd08e","updated":"2015-07-14 19:04:14.000000000","message":"Done","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e04843d4e12cd5a1517dae16506937a3bf36216a","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_5c0dd08e","line":260,"in_reply_to":"9a41bdd9_6d2265bb","updated":"2015-07-14 03:56:21.000000000","message":"It doesn\u0027t seem like this data is needed.  Could just remove it from the tests.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"19c22c4cb9d1fade5a43e3fb5771f4ee5dacce07","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":258,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":259,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":260,"context_line":"            }"},{"line_number":261,"context_line":"        }"},{"line_number":262,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":263,"context_line":"        self.assertFalse(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_07eeecb3","line":260,"in_reply_to":"9a41bdd9_6d2265bb","updated":"2015-07-14 19:04:14.000000000","message":"Will remove it based on the feedback below.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"35d726e9a8801fcd355ee1f3cbe0d4208baa28da","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":271,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":272,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":273,"context_line":"            }"},{"line_number":274,"context_line":"        }"},{"line_number":275,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":276,"context_line":"        self.assertTrue(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_2d2c5daa","line":273,"updated":"2015-07-14 02:39:49.000000000","message":"ditto","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"19c22c4cb9d1fade5a43e3fb5771f4ee5dacce07","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            \u0027fixed_ips\u0027: {"},{"line_number":271,"context_line":"                \u0027subnet_id\u0027: \u0027test_subnet_id\u0027,"},{"line_number":272,"context_line":"                \u0027ip_address\u0027: \u00272003::f816:3eff:fe44:3648\u0027"},{"line_number":273,"context_line":"            }"},{"line_number":274,"context_line":"        }"},{"line_number":275,"context_line":"        result, pv6 \u003d self.setup_port_has_ipv6_address(port)"},{"line_number":276,"context_line":"        self.assertTrue(result)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a41bdd9_670a587b","line":273,"in_reply_to":"9a41bdd9_2d2c5daa","updated":"2015-07-14 19:04:14.000000000","message":"See my comment above.","commit_id":"e16f95137ee1d86cc6277c7af3b720138b1a3ac1"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b7d2b08a241a63be196dfed1c461dc2045b4f7a6","unresolved":false,"context_lines":[{"line_number":1549,"context_line":"                        self.assertTrue(port_post.called)"},{"line_number":1550,"context_line":"                        port \u003d self._show(\u0027ports\u0027, port_id)"},{"line_number":1551,"context_line":"                        self.assertEqual(new_name, port[\u0027port\u0027][\u0027name\u0027])"},{"line_number":1552,"context_line":"                        self._delete(\u0027ports\u0027, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1553,"context_line":""},{"line_number":1554,"context_line":""},{"line_number":1555,"context_line":"class TestMl2PluginCreateUpdateDeletePort(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_57b82b75","line":1552,"updated":"2015-07-08 05:05:34.000000000","message":"Please fix the unit-tests here also based on source review comments.","commit_id":"64acf0af5f2b3b26997a84e36ac9eb359d8e4378"}]}
