)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3fe732b25688af3505ea4fae8c6e2842e7cec8bf","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: \u0027\u0027, \u0027device_owner\u0027: \u0027\u0027}}"},{"line_number":511,"context_line":"            port_req_body[\u0027port\u0027][BINDING_HOST_ID] \u003d None"},{"line_number":512,"context_line":"            try:"},{"line_number":513,"context_line":"                port \u003d self._show_port(context, port_id,"},{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"                port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":517,"context_line":"                # NOTE: We\u0027re doing this to remove the binding information"},{"line_number":518,"context_line":"                # for the physical device but don\u0027t want to overwrite the other"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_f8efeead","line":515,"range":{"start_line":513,"start_character":0,"end_line":515,"end_character":62},"updated":"2017-11-20 13:46:45.000000000","message":"Could you just wrap this line in the try-catch, as I assume it\u0027s what would cause the issue. It\u0027s slightly more lines, but it\u0027s clearer where the failure points are. For example...","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ef1636e128d5dfb06f684fbd4aa3636b20014611","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: \u0027\u0027, \u0027device_owner\u0027: \u0027\u0027}}"},{"line_number":511,"context_line":"            port_req_body[\u0027port\u0027][BINDING_HOST_ID] \u003d None"},{"line_number":512,"context_line":"            try:"},{"line_number":513,"context_line":"                port \u003d self._show_port(context, port_id,"},{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"                port_profile \u003d port.get(BINDING_PROFILE, {})"},{"line_number":517,"context_line":"                # NOTE: We\u0027re doing this to remove the binding information"},{"line_number":518,"context_line":"                # for the physical device but don\u0027t want to overwrite the other"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_cd21f1a1","line":515,"range":{"start_line":513,"start_character":0,"end_line":515,"end_character":62},"in_reply_to":"ff82abbf_f8efeead","updated":"2017-11-21 10:37:29.000000000","message":"Done","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3fe732b25688af3505ea4fae8c6e2842e7cec8bf","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                if self._has_dns_extension():"},{"line_number":525,"context_line":"                    port_req_body[\u0027port\u0027][\u0027dns_name\u0027] \u003d \u0027\u0027"},{"line_number":526,"context_line":"                port_client.update_port(port_id, port_req_body)"},{"line_number":527,"context_line":"            except neutron_client_exc.PortNotFoundClient:"},{"line_number":528,"context_line":"                LOG.debug(\u0027Unable to unbind port %s as it no longer exists.\u0027,"},{"line_number":529,"context_line":"                          port_id)"},{"line_number":530,"context_line":"            except Exception:"},{"line_number":531,"context_line":"                LOG.exception(\"Unable to clear device ID for port \u0027%s\u0027\","},{"line_number":532,"context_line":"                              port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_3869d624","line":529,"range":{"start_line":527,"start_character":0,"end_line":529,"end_character":34},"updated":"2017-11-20 13:46:45.000000000","message":"This will never be thrown, because the _show_port function handles this and wraps it in the nova-specific function.\n\nYou might also want to log the actual exception message, even if we don\u0027t raise it?","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ef1636e128d5dfb06f684fbd4aa3636b20014611","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                if self._has_dns_extension():"},{"line_number":525,"context_line":"                    port_req_body[\u0027port\u0027][\u0027dns_name\u0027] \u003d \u0027\u0027"},{"line_number":526,"context_line":"                port_client.update_port(port_id, port_req_body)"},{"line_number":527,"context_line":"            except neutron_client_exc.PortNotFoundClient:"},{"line_number":528,"context_line":"                LOG.debug(\u0027Unable to unbind port %s as it no longer exists.\u0027,"},{"line_number":529,"context_line":"                          port_id)"},{"line_number":530,"context_line":"            except Exception:"},{"line_number":531,"context_line":"                LOG.exception(\"Unable to clear device ID for port \u0027%s\u0027\","},{"line_number":532,"context_line":"                              port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_f8ba75dc","line":529,"range":{"start_line":527,"start_character":0,"end_line":529,"end_character":34},"in_reply_to":"ff82abbf_3869d624","updated":"2017-11-21 10:37:29.000000000","message":"right, not sure how I missed that","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"50239af87cee4fed61642eecced37282ae0bc86f","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"            except exception.PortNotFound as e:"},{"line_number":517,"context_line":"                LOG.debug(e.message)"},{"line_number":518,"context_line":"                return"},{"line_number":519,"context_line":"            except Exception:"},{"line_number":520,"context_line":"                # NOTE: In case we can\u0027t retrieve the binding:profile assume"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_8c59a15b","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":36},"updated":"2017-11-21 15:39:15.000000000","message":"I\u0027m still not sure this is something to do. If we care enough to log the exception, why do we not care enough to raise it? What kind of situation could cause this to happen?","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2ade051698b6c14b63682401fdf7d2e7b1d21c86","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"            except exception.PortNotFound as e:"},{"line_number":517,"context_line":"                LOG.debug(e.message)"},{"line_number":518,"context_line":"                return"},{"line_number":519,"context_line":"            except Exception:"},{"line_number":520,"context_line":"                # NOTE: In case we can\u0027t retrieve the binding:profile assume"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_d2942247","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":36},"in_reply_to":"ff82abbf_322d4e43","updated":"2017-11-21 16:25:12.000000000","message":"Yeah, but we don\u0027t log the exception. That\u0027s what I\u0027m opposed to. Could you give a more helpful log message?","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"21116de598779ce2396acbfabf2719bddda1d3ae","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"            except exception.PortNotFound as e:"},{"line_number":517,"context_line":"                LOG.debug(e.message)"},{"line_number":518,"context_line":"                return"},{"line_number":519,"context_line":"            except Exception:"},{"line_number":520,"context_line":"                # NOTE: In case we can\u0027t retrieve the binding:profile assume"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_322d4e43","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":36},"in_reply_to":"ff82abbf_8c59a15b","updated":"2017-11-21 16:23:22.000000000","message":"this is the problem that was in heat that the port was delete right after delete vm. you can see it is the same as in port update Line 541","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"786625679d2b8c1835e4dbceb37c2cb68e144319","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                       neutron_client\u003dneutron,"},{"line_number":515,"context_line":"                                       fields\u003dBINDING_PROFILE)"},{"line_number":516,"context_line":"            except exception.PortNotFound as e:"},{"line_number":517,"context_line":"                LOG.debug(e.message)"},{"line_number":518,"context_line":"                return"},{"line_number":519,"context_line":"            except Exception:"},{"line_number":520,"context_line":"                # NOTE: In case we can\u0027t retrieve the binding:profile assume"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_32722ee7","line":517,"range":{"start_line":517,"start_character":16,"end_line":517,"end_character":36},"in_reply_to":"ff82abbf_d2942247","updated":"2017-11-27 11:46:39.000000000","message":"Done","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2ade051698b6c14b63682401fdf7d2e7b1d21c86","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            try:"},{"line_number":539,"context_line":"                port_client.update_port(port_id, port_req_body)"},{"line_number":540,"context_line":"            except neutron_client_exc.PortNotFoundClient:"},{"line_number":541,"context_line":"                    LOG.debug(\u0027Unable to unbind port %s as it no longer \u0027"},{"line_number":542,"context_line":"                              \u0027exists.\u0027, port_id)"},{"line_number":543,"context_line":"            except Exception:"},{"line_number":544,"context_line":"                LOG.exception(\"Unable to clear device ID for port \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_929e9a61","line":541,"range":{"start_line":541,"start_character":16,"end_line":541,"end_character":20},"updated":"2017-11-21 16:25:12.000000000","message":"this is indented incorrectly","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"786625679d2b8c1835e4dbceb37c2cb68e144319","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            try:"},{"line_number":539,"context_line":"                port_client.update_port(port_id, port_req_body)"},{"line_number":540,"context_line":"            except neutron_client_exc.PortNotFoundClient:"},{"line_number":541,"context_line":"                    LOG.debug(\u0027Unable to unbind port %s as it no longer \u0027"},{"line_number":542,"context_line":"                              \u0027exists.\u0027, port_id)"},{"line_number":543,"context_line":"            except Exception:"},{"line_number":544,"context_line":"                LOG.exception(\"Unable to clear device ID for port \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_f27366e6","line":541,"range":{"start_line":541,"start_character":16,"end_line":541,"end_character":20},"in_reply_to":"ff82abbf_929e9a61","updated":"2017-11-27 11:46:39.000000000","message":"Done","commit_id":"fb70a4d1aea6c6348ec6eea61b951482d60b98f0"}],"nova/tests/fixtures.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3fe732b25688af3505ea4fae8c6e2842e7cec8bf","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"        for current_port in self._ports:"},{"line_number":1237,"context_line":"            if current_port[\u0027id\u0027] \u003d\u003d port:"},{"line_number":1238,"context_line":"                self._ports.remove(current_port)"},{"line_number":1239,"context_line":"                return"},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":"    def list_networks(self, retrieve_all\u003dTrue, **_params):"},{"line_number":1242,"context_line":"        return copy.deepcopy({\u0027networks\u0027: self._networks})"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_383b1639","line":1239,"range":{"start_line":1239,"start_character":0,"end_line":1239,"end_character":22},"updated":"2017-11-20 13:46:45.000000000","message":"Can you drop this, as it\u0027s not necessary. See https://review.openstack.org/#/c/505613/20/nova/tests/fixtures.py","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"ef1636e128d5dfb06f684fbd4aa3636b20014611","unresolved":false,"context_lines":[{"line_number":1236,"context_line":"        for current_port in self._ports:"},{"line_number":1237,"context_line":"            if current_port[\u0027id\u0027] \u003d\u003d port:"},{"line_number":1238,"context_line":"                self._ports.remove(current_port)"},{"line_number":1239,"context_line":"                return"},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":"    def list_networks(self, retrieve_all\u003dTrue, **_params):"},{"line_number":1242,"context_line":"        return copy.deepcopy({\u0027networks\u0027: self._networks})"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_b3998720","line":1239,"range":{"start_line":1239,"start_character":0,"end_line":1239,"end_character":22},"in_reply_to":"ff82abbf_383b1639","updated":"2017-11-21 10:37:29.000000000","message":"Done","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3fe732b25688af3505ea4fae8c6e2842e7cec8bf","unresolved":false,"context_lines":[{"line_number":4815,"context_line":"                                                      \u0027172.24.4.227\u0027)"},{"line_number":4816,"context_line":"        self.assertIsNone(fip)"},{"line_number":4817,"context_line":""},{"line_number":4818,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._show_port\u0027,"},{"line_number":4819,"context_line":"                side_effect\u003dexceptions.PortNotFoundClient)"},{"line_number":4820,"context_line":"    @mock.patch.object(neutronapi.LOG, \u0027exception\u0027)"},{"line_number":4821,"context_line":"    def test_unbind_ports_port_show_portnotfound(self, mock_log, mock_show):"},{"line_number":4822,"context_line":"        api \u003d neutronapi.API()"},{"line_number":4823,"context_line":"        neutron_client \u003d mock.Mock()"},{"line_number":4824,"context_line":"        mock_show.return_value \u003d {\u0027id\u0027: uuids.port}"},{"line_number":4825,"context_line":"        api._unbind_ports(self.context, [uuids.port_id],"},{"line_number":4826,"context_line":"                          neutron_client, neutron_client)"},{"line_number":4827,"context_line":"        mock_show.assert_called_once_with("},{"line_number":4828,"context_line":"            mock.ANY, uuids.port_id,"},{"line_number":4829,"context_line":"            fields\u003d\u0027binding:profile\u0027,"},{"line_number":4830,"context_line":"            neutron_client\u003dmock.ANY)"},{"line_number":4831,"context_line":"        mock_log.assert_not_called()"},{"line_number":4832,"context_line":""},{"line_number":4833,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.API._show_port\u0027)"},{"line_number":4834,"context_line":"    @mock.patch.object(neutronapi.LOG, \u0027exception\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_580dba8e","line":4831,"range":{"start_line":4818,"start_character":0,"end_line":4831,"end_character":36},"updated":"2017-11-20 13:46:45.000000000","message":"+1","commit_id":"1ec971e333d219c7b3fc9bcfa1f4a28038ccca58"}]}
