)]}'
{"neutron/plugins/nicira/NeutronPlugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2498b15e2ba838d362ad0c3f9d0b16577aedc5ac","unresolved":false,"context_lines":[{"line_number":396,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""},{"line_number":397,"context_line":"                        \"on network %(network_id)s. The new port id is \""},{"line_number":398,"context_line":"                        \"%(id)s.\"), port_data)"},{"line_number":399,"context_line":"        except Exception:"},{"line_number":400,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":401,"context_line":"                if lport:"},{"line_number":402,"context_line":"                    # Remove orphaned port from NVP"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzVQ%3D","line":399,"updated":"2013-07-11 07:25:21.000000000","message":"This code is very similar to the code on line 482. I have a number of questions:\ni. is it possible to have a common function (maybe this is an overkill)\nii. could it be problematic to interface with the external controller in the exception handling?","commit_id":"a12d84734bda2afbac3c9a0ec28f7fad9710a4c1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"aa82f4b50e5f9d24127440d2dd286b3111ff324f","unresolved":false,"context_lines":[{"line_number":396,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""},{"line_number":397,"context_line":"                        \"on network %(network_id)s. The new port id is \""},{"line_number":398,"context_line":"                        \"%(id)s.\"), port_data)"},{"line_number":399,"context_line":"        except Exception:"},{"line_number":400,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":401,"context_line":"                if lport:"},{"line_number":402,"context_line":"                    # Remove orphaned port from NVP"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FnM0%3D","line":399,"in_reply_to":"AAAAP3%2F%2FzVQ%3D","updated":"2013-07-15 20:48:10.000000000","message":"For your first question, we have another blueprint we\u0027re well do this kind of refacor (nvp-plugin-driver-model).\n\nFor your second question, I think you have a point that we should not go to the controller if the exception came from there in the first place.\nI will therefore have a different handling of the NvpApiException which might be raised from the two nvp operations in this try block.","commit_id":"a12d84734bda2afbac3c9a0ec28f7fad9710a4c1"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ac1998839fb3d5b200a49f692c51e28670e8c7b7","unresolved":false,"context_lines":[{"line_number":468,"context_line":"            if (not port_data[\u0027device_owner\u0027] in"},{"line_number":469,"context_line":"                (l3_db.DEVICE_OWNER_ROUTER_GW,"},{"line_number":470,"context_line":"                 l3_db.DEVICE_OWNER_ROUTER_INTF)):"},{"line_number":471,"context_line":"                nvplib.plug_interface(self.cluster, selected_lswitch[\u0027uuid\u0027],"},{"line_number":472,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":473,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":474,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fg%2Fg%3D","line":471,"updated":"2013-07-29 23:53:52.000000000","message":"if we do this above: nicira_db.add_neutron_nvp_port_mapping() then we do not need to have a method   nicira_db.delete_neutron_nvp_port_mapping()","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3b0b97fb1bd2a748489706fd891bef54a78861ca","unresolved":false,"context_lines":[{"line_number":468,"context_line":"            if (not port_data[\u0027device_owner\u0027] in"},{"line_number":469,"context_line":"                (l3_db.DEVICE_OWNER_ROUTER_GW,"},{"line_number":470,"context_line":"                 l3_db.DEVICE_OWNER_ROUTER_INTF)):"},{"line_number":471,"context_line":"                nvplib.plug_interface(self.cluster, selected_lswitch[\u0027uuid\u0027],"},{"line_number":472,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":473,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":474,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Ff28%3D","line":471,"in_reply_to":"AAAAQn%2F%2Fg%2Fg%3D","updated":"2013-07-30 07:27:42.000000000","message":"The reason I did it this way is because otherwise I would have to handle the \u0027unplug\u0027 of the interface if for any (unlikely) reason add_neutron_nvp_port_mapping failed","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ac1998839fb3d5b200a49f692c51e28670e8c7b7","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""},{"line_number":475,"context_line":"                        \"on network %(network_id)s. The new port id is \""},{"line_number":476,"context_line":"                        \"%(id)s.\"), port_data)"},{"line_number":477,"context_line":"        except Exception:"},{"line_number":478,"context_line":"            self._handle_create_port_exception("},{"line_number":479,"context_line":"                context, port_data[\u0027id\u0027],"},{"line_number":480,"context_line":"                selected_lswitch and selected_lswitch[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FhBI%3D","line":477,"updated":"2013-07-29 23:53:52.000000000","message":"Would be better if it was except NvpApiClient.NvpApiException instead","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3b0b97fb1bd2a748489706fd891bef54a78861ca","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""},{"line_number":475,"context_line":"                        \"on network %(network_id)s. The new port id is \""},{"line_number":476,"context_line":"                        \"%(id)s.\"), port_data)"},{"line_number":477,"context_line":"        except Exception:"},{"line_number":478,"context_line":"            self._handle_create_port_exception("},{"line_number":479,"context_line":"                context, port_data[\u0027id\u0027],"},{"line_number":480,"context_line":"                selected_lswitch and selected_lswitch[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Ff3c%3D","line":477,"in_reply_to":"AAAAQn%2F%2FhBI%3D","updated":"2013-07-30 07:27:42.000000000","message":"I wanted  to catch the NotFound exception which we raise by cancelli NvpApiClient.ResourceNotFound and re-raising a Quantum Exception (which is wrong by the way).\n\nI can catch both exceptions I guess explicitly.","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"ac1998839fb3d5b200a49f692c51e28670e8c7b7","unresolved":false,"context_lines":[{"line_number":557,"context_line":"                        \"%(name)s on network %(network_id)s. The new \""},{"line_number":558,"context_line":"                        \"port id is %(id)s.\"),"},{"line_number":559,"context_line":"                      port_data)"},{"line_number":560,"context_line":"        except Exception:"},{"line_number":561,"context_line":"            self._handle_create_port_exception("},{"line_number":562,"context_line":"                context, port_data[\u0027id\u0027],"},{"line_number":563,"context_line":"                selected_lswitch and selected_lswitch[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FhBA%3D","line":560,"updated":"2013-07-29 23:53:52.000000000","message":"ditto","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3b0b97fb1bd2a748489706fd891bef54a78861ca","unresolved":false,"context_lines":[{"line_number":557,"context_line":"                        \"%(name)s on network %(network_id)s. The new \""},{"line_number":558,"context_line":"                        \"port id is %(id)s.\"),"},{"line_number":559,"context_line":"                      port_data)"},{"line_number":560,"context_line":"        except Exception:"},{"line_number":561,"context_line":"            self._handle_create_port_exception("},{"line_number":562,"context_line":"                context, port_data[\u0027id\u0027],"},{"line_number":563,"context_line":"                selected_lswitch and selected_lswitch[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Ff3Y%3D","line":560,"in_reply_to":"AAAAQn%2F%2FhBA%3D","updated":"2013-07-30 07:27:42.000000000","message":"see above","commit_id":"662da0b4a4a2db8b60484c3d97c68fa009f777ef"}],"neutron/tests/unit/nicira/test_nicira_plugin.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"591fef8153d28a2e49227dabefbd5fc17e05fa90","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  query_params\u003dquery_params)"},{"line_number":167,"context_line":"        # Also verify no orphan port was left on nvp"},{"line_number":168,"context_line":"        # no port should be there at all"},{"line_number":169,"context_line":"        self.assertFalse(len(self.fc._fake_lswitch_lport_dict))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_create_port_nvp_error_no_orphan_left(self):"},{"line_number":172,"context_line":"        with mock.patch.object(nvplib, \u0027create_lport\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2Fz0Y%3D","line":169,"updated":"2013-07-11 04:31:24.000000000","message":"self.assertFalse(self.fc._fake_lswitch_lport_dict)","commit_id":"a12d84734bda2afbac3c9a0ec28f7fad9710a4c1"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"aa82f4b50e5f9d24127440d2dd286b3111ff324f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                  query_params\u003dquery_params)"},{"line_number":167,"context_line":"        # Also verify no orphan port was left on nvp"},{"line_number":168,"context_line":"        # no port should be there at all"},{"line_number":169,"context_line":"        self.assertFalse(len(self.fc._fake_lswitch_lport_dict))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_create_port_nvp_error_no_orphan_left(self):"},{"line_number":172,"context_line":"        with mock.patch.object(nvplib, \u0027create_lport\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FnMc%3D","line":169,"in_reply_to":"AAAAP3%2F%2Fz0Y%3D","updated":"2013-07-15 20:48:10.000000000","message":"yes, this is rather dumb.","commit_id":"a12d84734bda2afbac3c9a0ec28f7fad9710a4c1"}]}
