)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Nova already has support for hotplugging neutorn ports in the libvirt"},{"line_number":10,"context_line":"driver. This extends the support to the XenAPI driver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The code path used for attaching/detaching VIFs when VM\u0027s power state"},{"line_number":13,"context_line":"is running, pausing or shutdown."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I22f3fe52d07100592015007653c7f8c47c25d22c"},{"line_number":16,"context_line":"Implements: blueprint xenapi-vif-hotplug"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"da4df55a_a0530838","line":13,"range":{"start_line":12,"start_character":47,"end_line":13,"end_character":32},"updated":"2016-12-27 16:16:54.000000000","message":"This doesn\u0027t actually plug/unplug the VIF if the power state is paused for shutdown...can you clarify this statement?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Nova already has support for hotplugging neutorn ports in the libvirt"},{"line_number":10,"context_line":"driver. This extends the support to the XenAPI driver."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The code path used for attaching/detaching VIFs when VM\u0027s power state"},{"line_number":13,"context_line":"is running, pausing or shutdown."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I22f3fe52d07100592015007653c7f8c47c25d22c"},{"line_number":16,"context_line":"Implements: blueprint xenapi-vif-hotplug"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"ba5201f7_f3cfe67c","line":13,"range":{"start_line":12,"start_character":47,"end_line":13,"end_character":32},"in_reply_to":"da4df55a_a0530838","updated":"2017-01-05 01:33:23.000000000","message":"Yes, when the VM\u0027s power state is paused or shutdown, it won\u0027t plug/unplug, but when the VM is power on, the VIF will be there automatically as we have attached it","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d65e684ad69aa192a9e8e1787a3b402de46dceae","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: support the hotplug of a neutron port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nova already has support for hotplugging neutorn ports in the libvirt"},{"line_number":10,"context_line":"driver. This extends the support to the XenAPI driver, implement"},{"line_number":11,"context_line":"attaching/detaching VIFs"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"ba5201f7_190e1a3b","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":48},"updated":"2017-01-11 22:13:59.000000000","message":"nit: neutron :-)","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"}],"nova/tests/unit/virt/xenapi/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        driver \u003d self._get_driver()"},{"line_number":204,"context_line":"        driver.attach_interface(\u0027fake_context\u0027, \u0027fake_instance\u0027,"},{"line_number":205,"context_line":"                                \u0027fake_image_meta\u0027, \u0027fake_vif\u0027)"},{"line_number":206,"context_line":"        self.assertTrue(mock_attach_interface.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(xenapi_driver.vmops.VMOps, \u0027detach_interface\u0027)"},{"line_number":209,"context_line":"    def test_detach_interface(self, mock_detach_interface):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_003934f2","line":206,"updated":"2016-12-27 16:16:54.000000000","message":"nit: mock_attach_interface.assert_called_once_with(\u0027fake_instance\u0027, \u0027fake_vif\u0027) would be better.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        driver \u003d self._get_driver()"},{"line_number":204,"context_line":"        driver.attach_interface(\u0027fake_context\u0027, \u0027fake_instance\u0027,"},{"line_number":205,"context_line":"                                \u0027fake_image_meta\u0027, \u0027fake_vif\u0027)"},{"line_number":206,"context_line":"        self.assertTrue(mock_attach_interface.called)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(xenapi_driver.vmops.VMOps, \u0027detach_interface\u0027)"},{"line_number":209,"context_line":"    def test_detach_interface(self, mock_detach_interface):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_1392aa57","line":206,"in_reply_to":"da4df55a_003934f2","updated":"2017-01-05 01:33:23.000000000","message":"Thanks a lot, will change this","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def test_detach_interface(self, mock_detach_interface):"},{"line_number":210,"context_line":"        driver \u003d self._get_driver()"},{"line_number":211,"context_line":"        driver.detach_interface(\u0027fake_context\u0027, \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":212,"context_line":"        self.assertTrue(mock_detach_interface.called)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_6024c0c4","line":212,"updated":"2016-12-27 16:16:54.000000000","message":"same as above","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def test_detach_interface(self, mock_detach_interface):"},{"line_number":210,"context_line":"        driver \u003d self._get_driver()"},{"line_number":211,"context_line":"        driver.detach_interface(\u0027fake_context\u0027, \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":212,"context_line":"        self.assertTrue(mock_detach_interface.called)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_539c3269","line":212,"in_reply_to":"da4df55a_6024c0c4","updated":"2017-01-05 01:33:23.000000000","message":"Done, thanks","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"}],"nova/tests/unit/virt/xenapi/test_vif.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        else:"},{"line_number":50,"context_line":"            raise exception.Exception(\"Failed get vif record\")"},{"line_number":51,"context_line":"    if method \u003d\u003d \"VIF.unplug\":"},{"line_number":52,"context_line":"        pass"},{"line_number":53,"context_line":"    if method \u003d\u003d \"VIF.destroy\":"},{"line_number":54,"context_line":"        if args[0] \u003d\u003d \"fake_vif_ref\":"},{"line_number":55,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_657ee6af","line":52,"updated":"2016-09-20 09:52:16.000000000","message":"Didn\u0027t understand why fake_call_xenapi returns \"Unexpected call ...\" for plug and unplug.","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.base_driver.unplug(instance, fake_vif, vm_ref)"},{"line_number":138,"context_line":"        expected \u003d [mock.call(\u0027VIF.destroy\u0027, \u0027fake_vif_ref\u0027)]"},{"line_number":139,"context_line":"        self.assertEqual(expected, self._session.call_xenapi.call_args_list)"},{"line_number":140,"context_line":"        self.assertTrue(mock_hot_unplug.called)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    @mock.patch.object(vif.XenVIFDriver, \u0027_get_vif_ref\u0027,"},{"line_number":143,"context_line":"                       return_value\u003d\u0027missing_vif_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_a02a288e","line":140,"updated":"2016-12-27 16:16:54.000000000","message":"Using assert_called_once_with on the mock would be better.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.base_driver.unplug(instance, fake_vif, vm_ref)"},{"line_number":138,"context_line":"        expected \u003d [mock.call(\u0027VIF.destroy\u0027, \u0027fake_vif_ref\u0027)]"},{"line_number":139,"context_line":"        self.assertEqual(expected, self._session.call_xenapi.call_args_list)"},{"line_number":140,"context_line":"        self.assertTrue(mock_hot_unplug.called)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    @mock.patch.object(vif.XenVIFDriver, \u0027_get_vif_ref\u0027,"},{"line_number":143,"context_line":"                       return_value\u003d\u0027missing_vif_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_f37d261d","line":140,"in_reply_to":"da4df55a_a02a288e","updated":"2017-01-05 01:33:23.000000000","message":"sure, done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        self.assertTrue(mock_create_vif_interim_network.called)"},{"line_number":196,"context_line":"        self.assertTrue(mock_create_vif.called)"},{"line_number":197,"context_line":"        self.assertEqual(\u0027fake_vif_ref\u0027, ret_vif_ref)"},{"line_number":198,"context_line":"        self.assertTrue(mock_hot_plug.called)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_bridge\u0027)"},{"line_number":201,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_port\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_e01ef06e","line":198,"updated":"2016-12-27 16:16:54.000000000","message":"Use assert_called_once_with.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        self.assertTrue(mock_create_vif_interim_network.called)"},{"line_number":196,"context_line":"        self.assertTrue(mock_create_vif.called)"},{"line_number":197,"context_line":"        self.assertEqual(\u0027fake_vif_ref\u0027, ret_vif_ref)"},{"line_number":198,"context_line":"        self.assertTrue(mock_hot_plug.called)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_bridge\u0027)"},{"line_number":201,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_port\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_5373524d","line":198,"in_reply_to":"da4df55a_e01ef06e","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        mock_VIF_plug \u003d self.mock_patch_object("},{"line_number":319,"context_line":"                                self._session.VIF, \u0027plug\u0027, return_val\u003dNone)"},{"line_number":320,"context_line":"        self.ovs_driver.hot_plug(vif, instance, vm_ref, vif_ref)"},{"line_number":321,"context_line":"        self.assertTrue(mock_VIF_plug.called)"},{"line_number":322,"context_line":"        self.assertTrue(mock_post_start_actions.called)"},{"line_number":323,"context_line":"        self.assertTrue(mock_get_power_state.called)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @mock.patch.object(vm_utils, \u0027get_power_state\u0027)"},{"line_number":326,"context_line":"    def test_hot_plug_power_off(self, mock_get_power_state):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_20155848","line":323,"range":{"start_line":321,"start_character":8,"end_line":323,"end_character":52},"updated":"2016-12-27 16:16:54.000000000","message":"Please use assert_called_once_with.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        mock_VIF_plug \u003d self.mock_patch_object("},{"line_number":319,"context_line":"                                self._session.VIF, \u0027plug\u0027, return_val\u003dNone)"},{"line_number":320,"context_line":"        self.ovs_driver.hot_plug(vif, instance, vm_ref, vif_ref)"},{"line_number":321,"context_line":"        self.assertTrue(mock_VIF_plug.called)"},{"line_number":322,"context_line":"        self.assertTrue(mock_post_start_actions.called)"},{"line_number":323,"context_line":"        self.assertTrue(mock_get_power_state.called)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @mock.patch.object(vm_utils, \u0027get_power_state\u0027)"},{"line_number":326,"context_line":"    def test_hot_plug_power_off(self, mock_get_power_state):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_9393fa4e","line":323,"range":{"start_line":321,"start_character":8,"end_line":323,"end_character":52},"in_reply_to":"da4df55a_20155848","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        mock_VIF_unplug \u003d self.mock_patch_object("},{"line_number":344,"context_line":"                                self._session.VIF, \u0027unplug\u0027, return_val\u003dNone)"},{"line_number":345,"context_line":"        self.ovs_driver.hot_unplug(fake_vif, vm_ref, vif_ref)"},{"line_number":346,"context_line":"        self.assertTrue(mock_VIF_unplug.called)"},{"line_number":347,"context_line":"        self.assertTrue(mock_get_power_state.called)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch.object(vm_utils, \u0027get_power_state\u0027)"},{"line_number":350,"context_line":"    def test_hot_unplug_power_off(self, mock_get_power_state):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_600be02a","line":347,"range":{"start_line":346,"start_character":8,"end_line":347,"end_character":52},"updated":"2016-12-27 16:16:54.000000000","message":"assert_called_once_with","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        mock_VIF_unplug \u003d self.mock_patch_object("},{"line_number":344,"context_line":"                                self._session.VIF, \u0027unplug\u0027, return_val\u003dNone)"},{"line_number":345,"context_line":"        self.ovs_driver.hot_unplug(fake_vif, vm_ref, vif_ref)"},{"line_number":346,"context_line":"        self.assertTrue(mock_VIF_unplug.called)"},{"line_number":347,"context_line":"        self.assertTrue(mock_get_power_state.called)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch.object(vm_utils, \u0027get_power_state\u0027)"},{"line_number":350,"context_line":"    def test_hot_unplug_power_off(self, mock_get_power_state):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_73905644","line":347,"range":{"start_line":346,"start_character":8,"end_line":347,"end_character":52},"in_reply_to":"da4df55a_600be02a","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"}],"nova/tests/unit/virt/xenapi/test_vmops.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"            self.assertTrue(fake_devices.called)"},{"line_number":1784,"context_line":"            self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1785,"context_line":"            self.assertTrue(mock_get_power_state.called)"},{"line_number":1786,"context_line":"            self.assertTrue(mock_plug.called)"},{"line_number":1787,"context_line":""},{"line_number":1788,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"},{"line_number":1789,"context_line":"    def test_hot_plug_no_devices(self, mock_get_vm_opaque_ref):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_b7b5857f","line":1786,"updated":"2016-09-20 09:52:16.000000000","message":"Shouldn\u0027t we check hot_plug wasn\u0027t called here?","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":1819,"context_line":"        self.vmops.hot_unplug_vif(\u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1820,"context_line":"        self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1821,"context_line":"        self.assertTrue(mock_get_power_state.called)"},{"line_number":1822,"context_line":"        self.assertTrue(mock_unplug.called)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_37aa551a","line":1822,"updated":"2016-09-20 09:52:16.000000000","message":"ditto","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"add835e6e5c8d1ba90c9e1c5e65938e76b6185ed","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"    def test_detach_interface_exception(self, mock_get_vm_opaque_ref,"},{"line_number":1784,"context_line":"                                        mock_unplug):"},{"line_number":1785,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \u0027fake_vm_ref\u0027"},{"line_number":1786,"context_line":"        mock_unplug.side_effect \u003d Exception(\"mock_unplug_exception\")"},{"line_number":1787,"context_line":""},{"line_number":1788,"context_line":"        self.assertRaises(exception.InterfaceDetachFailed,"},{"line_number":1789,"context_line":"                          self.vmops.detach_interface,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_915a0bf1","line":1786,"updated":"2016-10-20 10:18:30.000000000","message":"Can we have a realistic exception here?","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"14cf7467ef1f3b8c5cccc6a58f01a0b54e539651","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"    def test_detach_interface_exception(self, mock_get_vm_opaque_ref,"},{"line_number":1784,"context_line":"                                        mock_unplug):"},{"line_number":1785,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \u0027fake_vm_ref\u0027"},{"line_number":1786,"context_line":"        mock_unplug.side_effect \u003d Exception(\"mock_unplug_exception\")"},{"line_number":1787,"context_line":""},{"line_number":1788,"context_line":"        self.assertRaises(exception.InterfaceDetachFailed,"},{"line_number":1789,"context_line":"                          self.vmops.detach_interface,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_aa14f443","line":1786,"in_reply_to":"fa6399be_915a0bf1","updated":"2016-11-02 07:31:51.000000000","message":"sure, will raise a meaning exception","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1730,"context_line":"    \"\"\"Test VIF hot plug/unplug\"\"\""},{"line_number":1731,"context_line":"    def setUp(self):"},{"line_number":1732,"context_line":"        super(AttachInterfaceTestCase, self).setUp()"},{"line_number":1733,"context_line":"        self.vmops.vif_driver \u003d vif.XenAPIOpenVswitchDriver(self._session)"},{"line_number":1734,"context_line":""},{"line_number":1735,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027plug\u0027)"},{"line_number":1736,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_c3001604","line":1733,"range":{"start_line":1733,"start_character":36,"end_line":1733,"end_character":59},"updated":"2016-12-27 16:16:54.000000000","message":"Why does using a real vif driver matter here? Couldn\u0027t this be mocked out, or a fake implementation of XenVIFDriver be used? My worry is that the tests in here are tightly coupled with the OVS vif driver implementation, which also ignores the bridge vif driver implementation - so seems a mock or a fake would be better suited for unit testing the vmops code.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1730,"context_line":"    \"\"\"Test VIF hot plug/unplug\"\"\""},{"line_number":1731,"context_line":"    def setUp(self):"},{"line_number":1732,"context_line":"        super(AttachInterfaceTestCase, self).setUp()"},{"line_number":1733,"context_line":"        self.vmops.vif_driver \u003d vif.XenAPIOpenVswitchDriver(self._session)"},{"line_number":1734,"context_line":""},{"line_number":1735,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027plug\u0027)"},{"line_number":1736,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_1592879e","line":1733,"range":{"start_line":1733,"start_character":36,"end_line":1733,"end_character":59},"in_reply_to":"da4df55a_c3001604","updated":"2017-01-05 01:33:23.000000000","message":"Yes, your suggestion make sense, I will use a mock object","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1735,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027plug\u0027)"},{"line_number":1736,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"},{"line_number":1737,"context_line":"    def test_attach_interface(self, mock_get_vm_opaque_ref,"},{"line_number":1738,"context_line":"                               mock_plug):"},{"line_number":1739,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \"fake_vm_ref\""},{"line_number":1740,"context_line":"        with mock.patch.object(self._session.VM, \u0027get_allowed_VIF_devices\u0027)\\"},{"line_number":1741,"context_line":"            as fake_devices:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_2323a2a8","line":1738,"updated":"2016-12-27 16:16:54.000000000","message":"nit: align this with self above.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1735,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027plug\u0027)"},{"line_number":1736,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"},{"line_number":1737,"context_line":"    def test_attach_interface(self, mock_get_vm_opaque_ref,"},{"line_number":1738,"context_line":"                               mock_plug):"},{"line_number":1739,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \"fake_vm_ref\""},{"line_number":1740,"context_line":"        with mock.patch.object(self._session.VM, \u0027get_allowed_VIF_devices\u0027)\\"},{"line_number":1741,"context_line":"            as fake_devices:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_13ce2a5a","line":1738,"in_reply_to":"da4df55a_2323a2a8","updated":"2017-01-05 01:33:23.000000000","message":"yes, it\u0027s my fault, I will fix it, thanks a lot","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"            as fake_devices:"},{"line_number":1742,"context_line":"            fake_devices.return_value \u003d [2, 3, 4]"},{"line_number":1743,"context_line":"            self.vmops.attach_interface(\u0027fake_instance\u0027, \u0027vif\u0027)"},{"line_number":1744,"context_line":"            self.assertTrue(fake_devices.called)"},{"line_number":1745,"context_line":"            self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1746,"context_line":"            self.assertTrue(mock_plug.called)"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"},{"line_number":1749,"context_line":"    def test_attach_interface_no_devices(self, mock_get_vm_opaque_ref):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_036cdece","line":1746,"range":{"start_line":1744,"start_character":12,"end_line":1746,"end_character":45},"updated":"2016-12-27 16:16:54.000000000","message":"Use assert_called_once_with, especially as we\u0027re picking the first allowed device so we want to make sure 2 is used in this case.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1741,"context_line":"            as fake_devices:"},{"line_number":1742,"context_line":"            fake_devices.return_value \u003d [2, 3, 4]"},{"line_number":1743,"context_line":"            self.vmops.attach_interface(\u0027fake_instance\u0027, \u0027vif\u0027)"},{"line_number":1744,"context_line":"            self.assertTrue(fake_devices.called)"},{"line_number":1745,"context_line":"            self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1746,"context_line":"            self.assertTrue(mock_plug.called)"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"},{"line_number":1749,"context_line":"    def test_attach_interface_no_devices(self, mock_get_vm_opaque_ref):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_55ea4f10","line":1746,"range":{"start_line":1744,"start_character":12,"end_line":1746,"end_character":45},"in_reply_to":"da4df55a_036cdece","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"            fake_devices.return_value \u003d [2, 3, 4]"},{"line_number":1767,"context_line":"            mock_plug.side_effect \u003d exception.VirtualInterfacePlugException("},{"line_number":1768,"context_line":"                \"Failed to plug VIF\")"},{"line_number":1769,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":1770,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1771,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1772,"context_line":"            self.assertTrue(mock_unplug.called)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_e3efda1b","line":1769,"range":{"start_line":1769,"start_character":40,"end_line":1769,"end_character":53},"updated":"2016-12-27 16:16:54.000000000","message":"You should assert that VirtualInterfacePlugException is raised up, right?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1766,"context_line":"            fake_devices.return_value \u003d [2, 3, 4]"},{"line_number":1767,"context_line":"            mock_plug.side_effect \u003d exception.VirtualInterfacePlugException("},{"line_number":1768,"context_line":"                \"Failed to plug VIF\")"},{"line_number":1769,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":1770,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1771,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1772,"context_line":"            self.assertTrue(mock_unplug.called)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_953cb7e3","line":1769,"range":{"start_line":1769,"start_character":40,"end_line":1769,"end_character":53},"in_reply_to":"da4df55a_e3efda1b","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":1770,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1771,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1772,"context_line":"            self.assertTrue(mock_unplug.called)"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027unplug\u0027)"},{"line_number":1775,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_23448219","line":1772,"updated":"2016-12-27 16:16:54.000000000","message":"assert_called_once_with","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1769,"context_line":"            self.assertRaises(exception.NovaException,"},{"line_number":1770,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1771,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1772,"context_line":"            self.assertTrue(mock_unplug.called)"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027unplug\u0027)"},{"line_number":1775,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_f5d98384","line":1772,"in_reply_to":"da4df55a_23448219","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"    def test_detach_interface(self, mock_get_vm_opaque_ref, mock_unplug):"},{"line_number":1777,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \u0027fake_vm_ref\u0027"},{"line_number":1778,"context_line":"        self.vmops.detach_interface(\u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1779,"context_line":"        self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1780,"context_line":"        self.assertTrue(mock_unplug.called)"},{"line_number":1781,"context_line":""},{"line_number":1782,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027unplug\u0027)"},{"line_number":1783,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_634a0a28","line":1780,"range":{"start_line":1779,"start_character":8,"end_line":1780,"end_character":43},"updated":"2016-12-27 16:16:54.000000000","message":"assert_called_once_with","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1776,"context_line":"    def test_detach_interface(self, mock_get_vm_opaque_ref, mock_unplug):"},{"line_number":1777,"context_line":"        mock_get_vm_opaque_ref.return_value \u003d \u0027fake_vm_ref\u0027"},{"line_number":1778,"context_line":"        self.vmops.detach_interface(\u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1779,"context_line":"        self.assertTrue(mock_get_vm_opaque_ref.called)"},{"line_number":1780,"context_line":"        self.assertTrue(mock_unplug.called)"},{"line_number":1781,"context_line":""},{"line_number":1782,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027unplug\u0027)"},{"line_number":1783,"context_line":"    @mock.patch.object(vmops.VMOps, \u0027_get_vm_opaque_ref\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_15e9a714","line":1780,"range":{"start_line":1779,"start_character":8,"end_line":1780,"end_character":43},"in_reply_to":"da4df55a_634a0a28","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"        mock_unplug.side_effect \u003d exception.VirtualInterfaceUnplugException("},{"line_number":1788,"context_line":"            \"Failed to delete bridge\")"},{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        self.assertRaises(exception.NovaException,"},{"line_number":1791,"context_line":"                          self.vmops.detach_interface,"},{"line_number":1792,"context_line":"                          \u0027fake_instance\u0027, \u0027fake_vif\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_83536ee1","line":1790,"range":{"start_line":1790,"start_character":36,"end_line":1790,"end_character":49},"updated":"2016-12-27 16:16:54.000000000","message":"VirtualInterfaceUnplugException?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"        mock_unplug.side_effect \u003d exception.VirtualInterfaceUnplugException("},{"line_number":1788,"context_line":"            \"Failed to delete bridge\")"},{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        self.assertRaises(exception.NovaException,"},{"line_number":1791,"context_line":"                          self.vmops.detach_interface,"},{"line_number":1792,"context_line":"                          \u0027fake_instance\u0027, \u0027fake_vif\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_753593f5","line":1790,"range":{"start_line":1790,"start_character":36,"end_line":1790,"end_character":49},"in_reply_to":"da4df55a_83536ee1","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"            self.vmops.vif_driver.unplug.side_effect \u003d\\"},{"line_number":1784,"context_line":"                exception.VirtualInterfaceUnplugException("},{"line_number":1785,"context_line":"                    \"Failed to unplug VIF\")"},{"line_number":1786,"context_line":"            self.assertRaises(exception.VirtualInterfacePlugException,"},{"line_number":1787,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1788,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1789,"context_line":"            self.vmops.vif_driver.plug.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_b993115a","line":1786,"range":{"start_line":1786,"start_character":40,"end_line":1786,"end_character":69},"updated":"2017-01-06 17:02:58.000000000","message":"This should be the original plug exception with message \u0027Failed to plug VIF\u0027. Can we ensure that\u0027s what\u0027s raised up rather than the unplug exception by doing something like this:\n\nex \u003d self.assertRaises(...)\nself.assertEqual(\u0027Failed to plug VIF\u0027, six.text_type(ex))\n\n?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":1783,"context_line":"            self.vmops.vif_driver.unplug.side_effect \u003d\\"},{"line_number":1784,"context_line":"                exception.VirtualInterfaceUnplugException("},{"line_number":1785,"context_line":"                    \"Failed to unplug VIF\")"},{"line_number":1786,"context_line":"            self.assertRaises(exception.VirtualInterfacePlugException,"},{"line_number":1787,"context_line":"                              self.vmops.attach_interface,"},{"line_number":1788,"context_line":"                              \u0027fake_instance\u0027, \u0027fake_vif\u0027)"},{"line_number":1789,"context_line":"            self.vmops.vif_driver.plug.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_9b1aa1c4","line":1786,"range":{"start_line":1786,"start_character":40,"end_line":1786,"end_character":69},"in_reply_to":"ba5201f7_b993115a","updated":"2017-01-09 05:40:01.000000000","message":"yes, I\u0027ll try to check the exception message","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"}],"nova/virt/xenapi/driver.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"add835e6e5c8d1ba90c9e1c5e65938e76b6185ed","unresolved":false,"context_lines":[{"line_number":67,"context_line":"class XenAPIDriver(driver.ComputeDriver):"},{"line_number":68,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":69,"context_line":"    capabilities \u003d {"},{"line_number":70,"context_line":"        \"has_imagecache\": True,"},{"line_number":71,"context_line":"        \"supports_recreate\": True,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": True,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_51ef931d","line":70,"updated":"2016-10-20 10:18:30.000000000","message":"I\u0027m not sure that XenAPI does have imagecache?","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"14cf7467ef1f3b8c5cccc6a58f01a0b54e539651","unresolved":false,"context_lines":[{"line_number":67,"context_line":"class XenAPIDriver(driver.ComputeDriver):"},{"line_number":68,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":69,"context_line":"    capabilities \u003d {"},{"line_number":70,"context_line":"        \"has_imagecache\": True,"},{"line_number":71,"context_line":"        \"supports_recreate\": True,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": True,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_84d632ef","line":70,"in_reply_to":"fa6399be_51ef931d","updated":"2016-11-02 07:31:51.000000000","message":"Thanks for your reminder, I have checked that our driver didn\u0027t implement \"manage_image_cache(self, context, all_instances)\" in virt/xenapi/driver.py, see https://github.com/openstack/nova/blob/1bd4d7fb082469ba1a578db413dfd93c9a168995/nova/compute/manager.py#L6723\nSo I will set \"has_imagecache\" to False","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        :return: None"},{"line_number":680,"context_line":"        \"\"\""},{"line_number":681,"context_line":"        self._vmops.attach_interface(instance, vif)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":684,"context_line":"        \"\"\"Use hotunplug to remove a network interface from a running instance."}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_83ca346d","line":681,"updated":"2016-11-14 11:08:05.000000000","message":"Not sure these two are tested.","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        :return: None"},{"line_number":680,"context_line":"        \"\"\""},{"line_number":681,"context_line":"        self._vmops.attach_interface(instance, vif)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":684,"context_line":"        \"\"\"Use hotunplug to remove a network interface from a running instance."}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_d8a6ad52","line":681,"in_reply_to":"9a629dbe_83ca346d","updated":"2016-11-16 02:43:00.000000000","message":"will check, if not, will add UT","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a1cfbf6c31015d729030b00e47fcdd8bf1c34c8e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":69,"context_line":"    capabilities \u003d {"},{"line_number":70,"context_line":"        \"has_imagecache\": False,"},{"line_number":71,"context_line":"        \"supports_recreate\": True,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": True,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"},{"line_number":74,"context_line":"        \"supports_device_tagging\": False,"},{"line_number":75,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_80bc4407","line":72,"range":{"start_line":71,"start_character":8,"end_line":72,"end_character":46},"updated":"2016-12-27 15:44:53.000000000","message":"These would have been inherited from the base ComputeDriver capabilities which defaults them to False. Were those just not enabled/tested before this change?\n\nsupports_recreate is for evacuate, and supports_migrate_to_same_host is for resize on the same host. These are separate features from what\u0027s needed here, which is supports_attach_interface. Therefore I think these should default to False as they did when capabilities was inherited from the base ComputeDriver, and then you can enable them in separate patches later, along with enabling the CI testing for them (at least for supports_migrate_to_same_host since we don\u0027t test evacuate with Tempest).","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\"A connection to XenServer or Xen Cloud Platform.\"\"\""},{"line_number":69,"context_line":"    capabilities \u003d {"},{"line_number":70,"context_line":"        \"has_imagecache\": False,"},{"line_number":71,"context_line":"        \"supports_recreate\": True,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": True,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"},{"line_number":74,"context_line":"        \"supports_device_tagging\": False,"},{"line_number":75,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_6bcbfe1e","line":72,"range":{"start_line":71,"start_character":8,"end_line":72,"end_character":46},"in_reply_to":"da4df55a_80bc4407","updated":"2017-01-05 01:33:23.000000000","message":"I see, thanks for your advice, I will set them False in this patch and make other patches for the two features","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"has_imagecache\": False,"},{"line_number":71,"context_line":"        \"supports_recreate\": False,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": False,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"},{"line_number":74,"context_line":"        \"supports_device_tagging\": False,"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_d9f1b596","line":73,"range":{"start_line":73,"start_character":37,"end_line":73,"end_character":41},"updated":"2017-01-06 17:02:58.000000000","message":"Once https://review.openstack.org/#/c/409967/ merges we should update the support matrix for the xenserver driver. You may also want to note in the support matrix any limitations with using this feature with this driver, i.e. if the server has to be running for attach/detach of interfaces to work.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"has_imagecache\": False,"},{"line_number":71,"context_line":"        \"supports_recreate\": False,"},{"line_number":72,"context_line":"        \"supports_migrate_to_same_host\": False,"},{"line_number":73,"context_line":"        \"supports_attach_interface\": True,"},{"line_number":74,"context_line":"        \"supports_device_tagging\": False,"},{"line_number":75,"context_line":"    }"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_edc854aa","line":73,"range":{"start_line":73,"start_character":37,"end_line":73,"end_character":41},"in_reply_to":"ba5201f7_d9f1b596","updated":"2017-01-09 05:40:01.000000000","message":"Thanks for notify me this important patch, I will update the support matrix for xenserver.\nI meantioned that the VM must be running for attach/detach interfaces, so I should modify some of my code logic. ATM, the code also support attach/detach for power off VM, when the VM power on, the new interface will take affect, but seems this don\u0027t meet the requirements","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"03f45fd187201ebcdd7d491d3caa86924cb2213d","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            The instance which will get an additional network interface."},{"line_number":672,"context_line":"        :param nova.objects.ImageMeta image_meta:"},{"line_number":673,"context_line":"            The metadata of the image of the instance."},{"line_number":674,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":675,"context_line":"            The object which has the information about the interface to attach."},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        :raise nova.exception.NovaException: If the attach fails."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_84434412","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":45},"updated":"2017-01-06 17:10:17.000000000","message":"VIF right?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            The instance which will get an additional network interface."},{"line_number":672,"context_line":"        :param nova.objects.ImageMeta image_meta:"},{"line_number":673,"context_line":"            The metadata of the image of the instance."},{"line_number":674,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":675,"context_line":"            The object which has the information about the interface to attach."},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        :raise nova.exception.NovaException: If the attach fails."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_8d4348ae","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":45},"in_reply_to":"ba5201f7_84434412","updated":"2017-01-09 05:40:01.000000000","message":"Yes, have checked the code, it should be VIF, thanks for pointing out this. I copied this from the base class https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L491, I will change to VIF. For the common drvier in nova/virt/driver.p, I can make another patch to change it from NetworkInfo to VIF, are you agree?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6c71162149340a6ea82169446fb69a8de112628","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            The instance which will get an additional network interface."},{"line_number":672,"context_line":"        :param nova.objects.ImageMeta image_meta:"},{"line_number":673,"context_line":"            The metadata of the image of the instance."},{"line_number":674,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":675,"context_line":"            The object which has the information about the interface to attach."},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"        :raise nova.exception.NovaException: If the attach fails."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_b7d758ec","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":45},"in_reply_to":"ba5201f7_8d4348ae","updated":"2017-01-09 17:27:41.000000000","message":"Yes, fix the base driver docstring in a separate cleanup patch.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"03f45fd187201ebcdd7d491d3caa86924cb2213d","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        :param context: The request context."},{"line_number":689,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":690,"context_line":"            The instance which gets a network interface removed."},{"line_number":691,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":692,"context_line":"            The object which has the information about the interface to detach."},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        :raise nova.exception.NovaException: If the detach fails."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_e45410cb","line":691,"range":{"start_line":691,"start_character":34,"end_line":691,"end_character":45},"updated":"2017-01-06 17:10:17.000000000","message":"VIF","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        :param context: The request context."},{"line_number":689,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":690,"context_line":"            The instance which gets a network interface removed."},{"line_number":691,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":692,"context_line":"            The object which has the information about the interface to detach."},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        :raise nova.exception.NovaException: If the detach fails."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_ad148c9f","line":691,"range":{"start_line":691,"start_character":34,"end_line":691,"end_character":45},"in_reply_to":"ba5201f7_e45410cb","updated":"2017-01-09 05:40:01.000000000","message":"Done","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d65e684ad69aa192a9e8e1787a3b402de46dceae","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        :param nova.network.model.VIF vif:"},{"line_number":676,"context_line":"            The object which has the information about the interface to attach."},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        :raise nova.exception.NovaException: If the attach fails."},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        :return: None"},{"line_number":681,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_dc7f2015","line":678,"range":{"start_line":678,"start_character":15,"end_line":678,"end_character":43},"updated":"2017-01-11 22:13:59.000000000","message":"it could be any child class, but okay.","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"}],"nova/virt/xenapi/vif.py":[{"author":{"_account_id":17169,"name":"John Hua","email":"ihuazhihao@gmail.com","username":"johnhua"},"change_message_id":"393646b5cdc1ed3e5290ee629b6eaebed7ea9fd9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif_ref):"},{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_b3c25e83","line":84,"updated":"2016-09-08 08:46:44.000000000","message":"Add try except?","commit_id":"cde88d17c4a7e5e3285179c1b3a4ac2cb8a86a94"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"5f764e3641d591ecb1d39055acd519172417cc7a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif_ref):"},{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_32aff195","line":84,"in_reply_to":"9a89bdaa_b3c25e83","updated":"2016-09-09 03:25:04.000000000","message":"yes, will catch exception in caller function","commit_id":"cde88d17c4a7e5e3285179c1b3a4ac2cb8a86a94"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif_ref):"},{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_c3116fae","line":84,"updated":"2016-09-29 11:15:55.000000000","message":"self._session.VIF.plug(vif_ref)","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif_ref):"},{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_ccfa3f43","line":84,"in_reply_to":"3a98d1f4_c3116fae","updated":"2016-10-08 09:28:32.000000000","message":"sure","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","},{"line_number":88,"context_line":"                  {\u0027vif\u0027: vif, \u0027vm_ref\u0027: vm_ref})"},{"line_number":89,"context_line":"        vif_ref \u003d self._get_vif_ref(vif, vm_ref)"},{"line_number":90,"context_line":"        if not vif_ref:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_63125bb6","line":87,"updated":"2016-09-29 11:15:55.000000000","message":"If we\u0027re logging the unplug, we should also log the plug.\nHowever, don\u0027t log using vm_ref - that is an opaque identifier and we should only be logging UUIDs so they can be traced.","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._session.call_xenapi(\u0027VIF.plug\u0027, vif_ref)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_unplug(self, vif, vm_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot unplug vif, vif:%(vif)s, vm_ref:%(vm_ref)s\","},{"line_number":88,"context_line":"                  {\u0027vif\u0027: vif, \u0027vm_ref\u0027: vm_ref})"},{"line_number":89,"context_line":"        vif_ref \u003d self._get_vif_ref(vif, vm_ref)"},{"line_number":90,"context_line":"        if not vif_ref:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_8c8bd7c2","line":87,"in_reply_to":"3a98d1f4_63125bb6","updated":"2016-10-08 09:28:32.000000000","message":"yes, I seee","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"cabf14f0d9dce84189c2617165cc2a5f5a6e6305","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            raise exception.NovaException("},{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif, vif_ref):"},{"line_number":84,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":85,"context_line":"        self._session.VIF.plug(vif_ref)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_b6beb662","line":83,"updated":"2016-10-17 10:24:28.000000000","message":"I\u0027m not sure this is the right logic; I\u0027m thinking that our vif.plug / vif.unplug methods should actually just \"do the right thing\" whether the VM is running or not.\n\nThe decision to call hot_plug / hot_unplug should occur in this class, not higher up.\n\nFor example, it\u0027d make sense to me for an \u0027unplug\u0027 call to effectively \u0027do everything I need to remove this VIF safely\u0027.  Currently the caller has to check if the VM is powered on and if it is call hot_unplug first.\n\nThoughts?","commit_id":"63c3d0b7910251f6444aee7eccd6088f95e980e2"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"149f11af6d8c006a149fba2228e74e4c0c7e621b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            raise exception.NovaException("},{"line_number":81,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def hot_plug(self, vif, vif_ref):"},{"line_number":84,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":85,"context_line":"        self._session.VIF.plug(vif_ref)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_25f92ac9","line":83,"in_reply_to":"fa6399be_b6beb662","updated":"2016-10-19 09:26:01.000000000","message":"I agree that move the logic down, will try that way. I also considered about that way, but for VM spawn, we cannot call VIF.plug but only VIF.create and the VIF will be there when the VM is power on. And there will be a post_start_action https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L345 during VM spawn. But for attaching interface, this function will only be called when VM is power_on.\nI will first change and test to see whether I can move the logic down to hotplug/hotunplug without affect existing spawn VM scenario","commit_id":"63c3d0b7910251f6444aee7eccd6088f95e980e2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"add835e6e5c8d1ba90c9e1c5e65938e76b6185ed","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            raise exception.NovaException("},{"line_number":84,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":88,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":89,"context_line":"        if state !\u003d power_state.RUNNING:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_513233a8","line":86,"updated":"2016-10-20 10:18:30.000000000","message":"Add a comment about this call being a noop if the VM is not powered on?","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"14cf7467ef1f3b8c5cccc6a58f01a0b54e539651","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            raise exception.NovaException("},{"line_number":84,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":87,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":88,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":89,"context_line":"        if state !\u003d power_state.RUNNING:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_67093584","line":86,"in_reply_to":"fa6399be_513233a8","updated":"2016-11-02 07:31:51.000000000","message":"Done","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self.hot_unplug(vif, vm_ref, vif_ref)"},{"line_number":78,"context_line":"            self._session.call_xenapi(\u0027VIF.destroy\u0027, vif_ref)"},{"line_number":79,"context_line":"        except Exception as e:"},{"line_number":80,"context_line":"            LOG.warning("},{"line_number":81,"context_line":"                _LW(\"Fail to unplug vif:%(vif)s, exception:%(exception)s\"),"},{"line_number":82,"context_line":"                {\u0027vif\u0027: vif, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":83,"context_line":"            raise exception.NovaException("}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_c38c2c82","line":80,"updated":"2016-11-14 11:08:05.000000000","message":"This doesn\u0027t look quite correct. If a hot plug fails, we don\u0027t see to raise an exception.\n\nI suspect this unplug is only used during deletes right now, so swallowing exceptions was previously the correct thing to do.","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            self.hot_unplug(vif, vm_ref, vif_ref)"},{"line_number":78,"context_line":"            self._session.call_xenapi(\u0027VIF.destroy\u0027, vif_ref)"},{"line_number":79,"context_line":"        except Exception as e:"},{"line_number":80,"context_line":"            LOG.warning("},{"line_number":81,"context_line":"                _LW(\"Fail to unplug vif:%(vif)s, exception:%(exception)s\"),"},{"line_number":82,"context_line":"                {\u0027vif\u0027: vif, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":83,"context_line":"            raise exception.NovaException("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_f84d2973","line":80,"in_reply_to":"9a629dbe_c38c2c82","updated":"2016-11-16 02:43:00.000000000","message":"yeah, I see, if hot plug failed, there is no need to raise exception if hot unplug also failed. But this function is also used by detach_interface scenario. So could I capture the exception in https://review.openstack.org/#/c/365505/10/nova/virt/xenapi/vmops.py Line:2509","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        else:"},{"line_number":146,"context_line":"            vif_rec[\u0027qos_algorithm_type\u0027] \u003d \u0027\u0027"},{"line_number":147,"context_line":"            vif_rec[\u0027qos_algorithm_params\u0027] \u003d {}"},{"line_number":148,"context_line":"        return self._create_vif(vif, vif_rec, vm_ref)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _ensure_vlan_bridge(self, network):"},{"line_number":151,"context_line":"        \"\"\"Ensure that a VLAN bridge exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_83c0747e","line":148,"updated":"2016-11-14 11:08:05.000000000","message":"Don\u0027t you need hot plug here?","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        else:"},{"line_number":146,"context_line":"            vif_rec[\u0027qos_algorithm_type\u0027] \u003d \u0027\u0027"},{"line_number":147,"context_line":"            vif_rec[\u0027qos_algorithm_params\u0027] \u003d {}"},{"line_number":148,"context_line":"        return self._create_vif(vif, vif_rec, vm_ref)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _ensure_vlan_bridge(self, network):"},{"line_number":151,"context_line":"        \"\"\"Ensure that a VLAN bridge exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_38b7a187","line":148,"in_reply_to":"9a629dbe_83c0747e","updated":"2016-11-16 02:43:00.000000000","message":"With Neutron + XenServer, we use ML2 ovs plugin, so there is need for Do0 to have OVS installed, so ATM, we only use XenServer with OVS as backend, so we didn\u0027t tried Linux bridge. So this patch didn\u0027t Linux bridge part","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"87812aab05d0d0b9937dd9651f4f139766206747","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        vif, instance\u003dinstance)"},{"line_number":75,"context_line":"                return"},{"line_number":76,"context_line":"            # hot unplug the VIF first"},{"line_number":77,"context_line":"            self.hot_unplug(vif, vm_ref, vif_ref)"},{"line_number":78,"context_line":"            self._session.call_xenapi(\u0027VIF.destroy\u0027, vif_ref)"},{"line_number":79,"context_line":"        except Exception as e:"},{"line_number":80,"context_line":"            LOG.warning("}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_d46a95ec","line":77,"updated":"2016-11-17 17:46:59.000000000","message":"It\u0027s dodgy that the hot_unplug is called from the generic code, but the hot_plug is called from the ovs-specific code... ... ...\nPut both in the ovs specific code","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c9490002fba99201dd13ce03291a15bff04b11b5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        vif, instance\u003dinstance)"},{"line_number":75,"context_line":"                return"},{"line_number":76,"context_line":"            # hot unplug the VIF first"},{"line_number":77,"context_line":"            self.hot_unplug(vif, vm_ref, vif_ref)"},{"line_number":78,"context_line":"            self._session.call_xenapi(\u0027VIF.destroy\u0027, vif_ref)"},{"line_number":79,"context_line":"        except Exception as e:"},{"line_number":80,"context_line":"            LOG.warning("}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_6c1442e8","line":77,"in_reply_to":"7a77a97e_d46a95ec","updated":"2016-11-21 02:22:58.000000000","message":"We can only call VIF.unplug() before VIF.destroy() (see Line:78), there is no plug() function in generic code, so hot_plug is called in ovs-specific code, but hot_unplug() is call in generic code.\nCan I keep hot_unplug() but with empty implementation, but set the ovs-specific implementation in XenAPIOpenVswitchDriver?","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            raise exception.NovaException("},{"line_number":84,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":87,"context_line":"        # hot plug vif only when VM\u0027s power state is running"},{"line_number":88,"context_line":"        pass"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def hot_unplug(self, vif, vm_ref, vif_ref):"},{"line_number":91,"context_line":"        # hot unplug vif only when VM\u0027s power state is running"},{"line_number":92,"context_line":"        pass"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def post_start_actions(self, instance, vif_ref):"},{"line_number":95,"context_line":"        \"\"\"no further actions needed for this driver type\"\"\""},{"line_number":96,"context_line":"        pass"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class XenAPIBridgeDriver(XenVIFDriver):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_e066f04f","line":96,"range":{"start_line":86,"start_character":4,"end_line":96,"end_character":12},"updated":"2016-12-27 16:16:54.000000000","message":"nit: not necessary to address this in this patch, but it seems these should be abstract methods and XenVIFDriver should be an abstract base class.\n\nIt would also be good to further document these methods with docstrings, i.e. a full description of what the method does along with describing the input and output parameters.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            raise exception.NovaException("},{"line_number":84,"context_line":"                reason\u003d_(\"Failed to unplug vif %s\") % vif)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":87,"context_line":"        # hot plug vif only when VM\u0027s power state is running"},{"line_number":88,"context_line":"        pass"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def hot_unplug(self, vif, vm_ref, vif_ref):"},{"line_number":91,"context_line":"        # hot unplug vif only when VM\u0027s power state is running"},{"line_number":92,"context_line":"        pass"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def post_start_actions(self, instance, vif_ref):"},{"line_number":95,"context_line":"        \"\"\"no further actions needed for this driver type\"\"\""},{"line_number":96,"context_line":"        pass"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class XenAPIBridgeDriver(XenVIFDriver):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_1923ab06","line":96,"range":{"start_line":86,"start_character":4,"end_line":96,"end_character":12},"in_reply_to":"da4df55a_e066f04f","updated":"2017-01-05 01:33:23.000000000","message":"Yes, adding this for abstraction in base class and certainly","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":309,"context_line":"        # hot plug vif only when VM\u0027s power state is running"},{"line_number":310,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":311,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":312,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":313,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_80fa8441","line":310,"updated":"2016-12-27 16:16:54.000000000","message":"nit: add instance\u003dinstance kwarg for context.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":309,"context_line":"        # hot plug vif only when VM\u0027s power state is running"},{"line_number":310,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":311,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":312,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":313,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_136aaa1a","line":310,"in_reply_to":"da4df55a_80fa8441","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":311,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":312,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":313,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif)"},{"line_number":314,"context_line":"            return"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        self._session.VIF.plug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_a0f78857","line":313,"updated":"2016-12-27 16:16:54.000000000","message":"same","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif)"},{"line_number":311,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":312,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":313,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif)"},{"line_number":314,"context_line":"            return"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"        self._session.VIF.plug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_33796ef7","line":313,"in_reply_to":"da4df55a_a0f78857","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def hot_unplug(self, vif, vm_ref, vif_ref):"},{"line_number":320,"context_line":"        # hot unplug vif only when VM\u0027s power state is running"},{"line_number":321,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif)"},{"line_number":322,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":323,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":324,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_40b25c95","line":321,"updated":"2016-12-27 16:16:54.000000000","message":"Since you don\u0027t have instance in scope, can you get the instance uuid from the vm_ref and use the instance_uuid kwarg to the LOG.debug method?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def hot_unplug(self, vif, vm_ref, vif_ref):"},{"line_number":320,"context_line":"        # hot unplug vif only when VM\u0027s power state is running"},{"line_number":321,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif)"},{"line_number":322,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":323,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":324,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_93f21a6e","line":321,"in_reply_to":"da4df55a_40b25c95","updated":"2017-01-05 01:33:23.000000000","message":"I see, but vm_ref and instance uuid is different, vm_ref is from hypervisor\u0027s point of view, but instance uuid is the nova concept, I think we can add the instance as input param, which can help trace the instance activities","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif)"},{"line_number":322,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":323,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":324,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif)"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._session.VIF.unplug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_20471878","line":324,"updated":"2016-12-27 16:16:54.000000000","message":"Should have the VM id somewhere in here for context, same as above.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif)"},{"line_number":322,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":323,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":324,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif)"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        self._session.VIF.unplug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_d3eca291","line":324,"in_reply_to":"da4df55a_20471878","updated":"2017-01-05 01:33:23.000000000","message":"will do","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":87,"context_line":"        \"\"\"hotplug virtual interface to running instance."},{"line_number":88,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":89,"context_line":"            The object which has the information about the interface to attach."},{"line_number":90,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":91,"context_line":"            The instance which will get an additional network interface."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7e5c2f7d","line":88,"range":{"start_line":88,"start_character":34,"end_line":88,"end_character":45},"updated":"2017-01-06 17:02:58.000000000","message":"This would actually be VIF wouldn\u0027t it?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def hot_unplug(self, vif, instance, vm_ref, vif_ref):"},{"line_number":101,"context_line":"        \"\"\"hot unplug virtual interface from running instance."},{"line_number":102,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":103,"context_line":"            The object which has the information about the interface to attach."},{"line_number":104,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":105,"context_line":"            The instance which will get an additional network interface."}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_3ecd4731","line":102,"range":{"start_line":102,"start_character":34,"end_line":102,"end_character":45},"updated":"2017-01-06 17:02:58.000000000","message":"VIF","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":103,"context_line":"            The object which has the information about the interface to attach."},{"line_number":104,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":105,"context_line":"            The instance which will get an additional network interface."},{"line_number":106,"context_line":"        :param string vm_ref:"},{"line_number":107,"context_line":"            The instance\u0027s reference from hypervisor\u0027s point of view."},{"line_number":108,"context_line":"        :param string vif_ref:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7eea6f75","line":105,"range":{"start_line":105,"start_character":36,"end_line":105,"end_character":39},"updated":"2017-01-06 17:02:58.000000000","message":"remove? unplug? something besides \u0027get\u0027. :)","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        :param nova.network.model.NetworkInfo vif:"},{"line_number":103,"context_line":"            The object which has the information about the interface to attach."},{"line_number":104,"context_line":"        :param nova.objects.instance.Instance instance:"},{"line_number":105,"context_line":"            The instance which will get an additional network interface."},{"line_number":106,"context_line":"        :param string vm_ref:"},{"line_number":107,"context_line":"            The instance\u0027s reference from hypervisor\u0027s point of view."},{"line_number":108,"context_line":"        :param string vif_ref:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_3b7a95bd","line":105,"range":{"start_line":105,"start_character":36,"end_line":105,"end_character":39},"in_reply_to":"ba5201f7_7eea6f75","updated":"2017-01-09 05:40:01.000000000","message":"yes, this is my fault copying from the hot_plug(), I will fix it","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif, instance\u003dinstance)"},{"line_number":337,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":338,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":339,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif,"},{"line_number":340,"context_line":"                      instance\u003dinstance)"},{"line_number":341,"context_line":"            return"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self._session.VIF.plug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_598225c9","line":340,"range":{"start_line":339,"start_character":12,"end_line":340,"end_character":40},"updated":"2017-01-06 17:02:58.000000000","message":"Shouldn\u0027t this raise an exception since the driver couldn\u0027t support the operation? I can already see someone reporting a bug because they tried to attach an interface to a stopped server and it didn\u0027t actually attach the interface but the operation didn\u0027t fail either.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif, instance\u003dinstance)"},{"line_number":337,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":338,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":339,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif,"},{"line_number":340,"context_line":"                      instance\u003dinstance)"},{"line_number":341,"context_line":"            return"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self._session.VIF.plug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_eda3f4fd","line":340,"range":{"start_line":339,"start_character":12,"end_line":340,"end_character":40},"in_reply_to":"ba5201f7_598225c9","updated":"2017-01-09 05:40:01.000000000","message":"This function hot_plug() is not only used for hot_plug an interface. But also other scenario:\nWhen booting VM, it will call plug() and then hot_plug() Line:264, but at this time, VM is in start_pause state, so won\u0027t plug the VIF actually, in this scenario, I should not raise exception\n\nIf the user want to attach interface, the VM must be running(I mean power on, not paused or suspend?) for this part, I will add checking in vmops.py attach_interface() for VM\u0027s power state, will raise exception there is the VM is not running","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"11a6b7aed3d4e74f7169c22a2734ac0594238eaa","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        LOG.debug(\"Hot plug vif, vif: %s\", vif, instance\u003dinstance)"},{"line_number":337,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":338,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":339,"context_line":"            LOG.debug(\"Skip hot plug VIF, VM is not running, vif: %s\", vif,"},{"line_number":340,"context_line":"                      instance\u003dinstance)"},{"line_number":341,"context_line":"            return"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self._session.VIF.plug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_d980a7fa","line":340,"range":{"start_line":339,"start_character":12,"end_line":340,"end_character":40},"in_reply_to":"ba5201f7_eda3f4fd","updated":"2017-01-09 10:37:24.000000000","message":"If the VM is not running and we attempt to plug a vif, that\u0027s fine because the VIF record will be created but we won\u0027t hot-plug it.  When the VM is started the VIF will be plugged at that point.\n\nVIF.plug is only used for running VMs, so I don\u0027t think we will suffer from the described bug.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif, instance\u003dinstance)"},{"line_number":349,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":350,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":351,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif,"},{"line_number":352,"context_line":"                      instance\u003dinstance)"},{"line_number":353,"context_line":"            return"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        self._session.VIF.unplug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_39664151","line":352,"range":{"start_line":351,"start_character":12,"end_line":352,"end_character":40},"updated":"2017-01-06 17:02:58.000000000","message":"same here, seems this should raise an exception","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        LOG.debug(\"Hot unplug vif, vif: %s\", vif, instance\u003dinstance)"},{"line_number":349,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":350,"context_line":"        if state !\u003d power_state.RUNNING:"},{"line_number":351,"context_line":"            LOG.debug(\"Skip hot unplug VIF, VM is not running, vif: %s\", vif,"},{"line_number":352,"context_line":"                      instance\u003dinstance)"},{"line_number":353,"context_line":"            return"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        self._session.VIF.unplug(vif_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_cd87105f","line":352,"range":{"start_line":351,"start_character":12,"end_line":352,"end_character":40},"in_reply_to":"ba5201f7_39664151","updated":"2017-01-09 05:40:01.000000000","message":"ditto","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"5a03b1bbd7e7486d1f9c77187401b3923aefe198","unresolved":false,"context_lines":[{"line_number":2513,"context_line":"                reason\u003d_(\"No allowed devices to use\"))"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        # plug VIF"},{"line_number":2516,"context_line":"        vif_ref \u003d self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref,"},{"line_number":2517,"context_line":"                                       device\u003ddevice)"},{"line_number":2518,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":2519,"context_line":"        if state \u003d\u003d power_state.RUNNING or state \u003d\u003d power_state.PAUSED:"},{"line_number":2520,"context_line":"            self.vif_driver.hot_plug(vif_ref)"},{"line_number":2521,"context_line":"            self.vif_driver.post_start_actions(instance, vif_ref)"},{"line_number":2522,"context_line":""},{"line_number":2523,"context_line":"            # set firewall filtering"},{"line_number":2524,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2525,"context_line":""},{"line_number":2526,"context_line":"    def hot_unplug_vif(self, instance, vif):"},{"line_number":2527,"context_line":"        LOG.debug(\"VIF hot unplug, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_333d6e8f","line":2524,"range":{"start_line":2516,"start_character":0,"end_line":2524,"end_character":71},"updated":"2016-09-08 08:44:02.000000000","message":"I need clean the created resources if failed to hotplug VIF","commit_id":"cde88d17c4a7e5e3285179c1b3a4ac2cb8a86a94"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":2500,"context_line":""},{"line_number":2501,"context_line":"        return sr_uuid_map"},{"line_number":2502,"context_line":""},{"line_number":2503,"context_line":"    def hot_plug_vif(self, instance, image_meta, vif):"},{"line_number":2504,"context_line":"        LOG.debug(\"VIF hot plug, vif info: %s\", vif, instance\u003dinstance)"},{"line_number":2505,"context_line":""},{"line_number":2506,"context_line":"        # find device"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_ffe60915","line":2503,"updated":"2016-09-20 09:52:16.000000000","message":"Is the image_meta param needed here?","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":2538,"context_line":""},{"line_number":2539,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2540,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":2541,"context_line":"        if state \u003d\u003d power_state.RUNNING or state \u003d\u003d power_state.PAUSED:"},{"line_number":2542,"context_line":"            self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2543,"context_line":"        self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_df394d43","line":2541,"updated":"2016-09-20 09:52:16.000000000","message":"Possibly, the state determination can be moved to separate function to reduce duplication.","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"66d652eabfc5d057b010aa0ad05df49cce49a313","unresolved":false,"context_lines":[{"line_number":2540,"context_line":"        state \u003d vm_utils.get_power_state(self._session, vm_ref)"},{"line_number":2541,"context_line":"        if state \u003d\u003d power_state.RUNNING or state \u003d\u003d power_state.PAUSED:"},{"line_number":2542,"context_line":"            self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2543,"context_line":"        self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8ec9b2_ff944945","line":2543,"updated":"2016-09-20 09:52:16.000000000","message":"Shouldn\u0027t we use InterfaceDetachFailed here?","commit_id":"93ab7c5c6ac1e2fd10fde165db59455c36455370"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2511,"context_line":"        # find device"},{"line_number":2512,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2513,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2514,"context_line":"        if allowed_devices is not None and len(allowed_devices) \u003e 0:"},{"line_number":2515,"context_line":"            device \u003d allowed_devices[0]"},{"line_number":2516,"context_line":"        else:"},{"line_number":2517,"context_line":"            LOG.error(_LE(\"No allowed devices to use\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_23a0539f","line":2514,"updated":"2016-09-29 11:15:55.000000000","message":"I\u0027d suggest swapping this around:\n\nif allowed_devices is None or len(allowed_devices) \u003d 0:\n  LOG.error(); raise\ndevice\u003dallowed_devices[0]","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2511,"context_line":"        # find device"},{"line_number":2512,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2513,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2514,"context_line":"        if allowed_devices is not None and len(allowed_devices) \u003e 0:"},{"line_number":2515,"context_line":"            device \u003d allowed_devices[0]"},{"line_number":2516,"context_line":"        else:"},{"line_number":2517,"context_line":"            LOG.error(_LE(\"No allowed devices to use\"), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_4cb46f81","line":2514,"in_reply_to":"3a98d1f4_23a0539f","updated":"2016-10-08 09:28:32.000000000","message":"Done","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2519,"context_line":"                                _(\"No allowed devices to use\"))"},{"line_number":2520,"context_line":""},{"line_number":2521,"context_line":"        power_on \u003d self.is_power_on(vm_ref)"},{"line_number":2522,"context_line":"        try:"},{"line_number":2523,"context_line":"            # plug VIF"},{"line_number":2524,"context_line":"            vif_ref \u003d self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_83bf67cf","line":2521,"updated":"2016-09-29 11:15:55.000000000","message":"Is it valid to receive a hot_plug request when Nova thinks the VM is shut down?","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2519,"context_line":"                                _(\"No allowed devices to use\"))"},{"line_number":2520,"context_line":""},{"line_number":2521,"context_line":"        power_on \u003d self.is_power_on(vm_ref)"},{"line_number":2522,"context_line":"        try:"},{"line_number":2523,"context_line":"            # plug VIF"},{"line_number":2524,"context_line":"            vif_ref \u003d self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_c3448e4b","line":2521,"in_reply_to":"3a98d1f4_83bf67cf","updated":"2016-10-08 09:28:32.000000000","message":"As my current understanding and test against devstack environment, it\u0027s not only for hotplug, but also support plug an interface when VM is shutdown, when VM boot again, it can succesfully plug the VIF as we have done vif.create in function self.vif_driver.plug() no matter the VM is running or shutdown.\nAlso if the VM is running, we will call vif_driver.hot_plug() which is the real \"hotplug\", i.e. vif.plug","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2528,"context_line":"            if power_on:"},{"line_number":2529,"context_line":"                self.vif_driver.hot_plug(vif_ref)"},{"line_number":2530,"context_line":"                self.vif_driver.post_start_actions(instance, vif_ref)"},{"line_number":2531,"context_line":"        except Exception:"},{"line_number":2532,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2533,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2534,"context_line":"            if power_on:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_a3dd4344","line":2531,"updated":"2016-09-29 11:15:55.000000000","message":"Don\u0027t catch Exception here - too broad.","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2528,"context_line":"            if power_on:"},{"line_number":2529,"context_line":"                self.vif_driver.hot_plug(vif_ref)"},{"line_number":2530,"context_line":"                self.vif_driver.post_start_actions(instance, vif_ref)"},{"line_number":2531,"context_line":"        except Exception:"},{"line_number":2532,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2533,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2534,"context_line":"            if power_on:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_c36baeb5","line":2531,"in_reply_to":"3a98d1f4_a3dd4344","updated":"2016-10-08 09:28:32.000000000","message":"I see, just I want to catch the exception here to deal with the failure scenario, when vif plug failed, we must clean the alreay done steps, so I catch the common Exception to make sure I can have chance to unplug and hot_unplug","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2532,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2533,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2534,"context_line":"            if power_on:"},{"line_number":2535,"context_line":"                self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2536,"context_line":"            self.vif_driver.unplug(instance, vif)"},{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_c3e24f03","line":2535,"updated":"2016-09-29 11:15:55.000000000","message":"Is this guaranteed to succeed even if the hot_plug did not succeed?","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2532,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2533,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2534,"context_line":"            if power_on:"},{"line_number":2535,"context_line":"                self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2536,"context_line":"            self.vif_driver.unplug(instance, vif)"},{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_a3430212","line":2535,"in_reply_to":"3a98d1f4_c3e24f03","updated":"2016-10-08 09:28:32.000000000","message":"yeah, it\u0027s not guarenteed, but when got exception here, maybe it failed at vif_driver.hot_plug() or failed at vif_driver.post_start_actions(). Also, if it\u0027s already plugged when VM is running, if we don\u0027t call vif.unplug() but call vif.destroy(), it will fail as the vif is still plugged.\nI have changed to use UndoManager to deal with the multi failed scenario","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2534,"context_line":"            if power_on:"},{"line_number":2535,"context_line":"                self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2536,"context_line":"            self.vif_driver.unplug(instance, vif)"},{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2539,"context_line":""},{"line_number":2540,"context_line":"    def hot_unplug_vif(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_e3e74b10","line":2537,"updated":"2016-09-29 11:15:55.000000000","message":"Just \"raise\" to re-raise the original exception?","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2534,"context_line":"            if power_on:"},{"line_number":2535,"context_line":"                self.vif_driver.hot_unplug(vif, vm_ref)"},{"line_number":2536,"context_line":"            self.vif_driver.unplug(instance, vif)"},{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2539,"context_line":""},{"line_number":2540,"context_line":"    def hot_unplug_vif(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_2350d2d3","line":2537,"in_reply_to":"3a98d1f4_e3e74b10","updated":"2016-10-08 09:28:32.000000000","message":"Since there is such exception and libvirt also use this exception, so I suggest use InterfaceAttachFailed exception","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"2b1c52a9cc8dbbb3105dfdc5e2e4ffc585c9ec9f","unresolved":false,"context_lines":[{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2539,"context_line":""},{"line_number":2540,"context_line":"    def hot_unplug_vif(self, instance, vif):"},{"line_number":2541,"context_line":"        LOG.debug(\"VIF hot unplug, vif info: %s\", vif, instance\u003dinstance)"},{"line_number":2542,"context_line":""},{"line_number":2543,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_e3caeb4e","line":2540,"updated":"2016-09-29 11:15:55.000000000","message":"Mostly same questions as above","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"758375545168f3a95d972bf624c5c8d0caa6c1a4","unresolved":false,"context_lines":[{"line_number":2537,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2538,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2539,"context_line":""},{"line_number":2540,"context_line":"    def hot_unplug_vif(self, instance, vif):"},{"line_number":2541,"context_line":"        LOG.debug(\"VIF hot unplug, vif info: %s\", vif, instance\u003dinstance)"},{"line_number":2542,"context_line":""},{"line_number":2543,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_43615ea8","line":2540,"in_reply_to":"3a98d1f4_e3caeb4e","updated":"2016-10-08 09:28:32.000000000","message":"see the above","commit_id":"5382fca2d2c927801fdce07569d2e4b13b47238e"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a238fd8e627eb09806c4051028fb11ee3291c117","unresolved":false,"context_lines":[{"line_number":2511,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2512,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2513,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2514,"context_line":"            LOG.error(_LE(\"No allowed devices to use\"), instance\u003dinstance)"},{"line_number":2515,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2516,"context_line":"                                _(\"No allowed devices to use\"))"},{"line_number":2517,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_8cf2b304","line":2514,"range":{"start_line":2514,"start_character":38,"end_line":2514,"end_character":45},"updated":"2016-10-08 10:04:13.000000000","message":"Generally it looks good. If there is another patch, suggest change to \"VIF devices\".","commit_id":"63c3d0b7910251f6444aee7eccd6088f95e980e2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"add835e6e5c8d1ba90c9e1c5e65938e76b6185ed","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"            LOG.error(_LE(\"No allowed VIF devices to use\"), instance\u003dinstance)"},{"line_number":2511,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2512,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2513,"context_line":"        else:"},{"line_number":2514,"context_line":"            device \u003d allowed_devices[0]"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_71dad74c","line":2513,"updated":"2016-10-20 10:18:30.000000000","message":"Since we\u0027re raising in the if-clause, it makes more sense not to use an else here - just set device\u003dallowed_devices[0]","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"14cf7467ef1f3b8c5cccc6a58f01a0b54e539651","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"            LOG.error(_LE(\"No allowed VIF devices to use\"), instance\u003dinstance)"},{"line_number":2511,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2512,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2513,"context_line":"        else:"},{"line_number":2514,"context_line":"            device \u003d allowed_devices[0]"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_27057d79","line":2513,"in_reply_to":"fa6399be_71dad74c","updated":"2016-11-02 07:31:51.000000000","message":"Done","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"add835e6e5c8d1ba90c9e1c5e65938e76b6185ed","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"},{"line_number":2519,"context_line":"            # set firewall filtering"},{"line_number":2520,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2521,"context_line":"        except Exception:"},{"line_number":2522,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2523,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2524,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_bf0a7b24","line":2521,"updated":"2016-10-20 10:18:30.000000000","message":"I\u0027m still nervous about broadly catching Exception.\nWhat exceptions can be raised by the above?\n\nCatching Exception also seems to catch KeyboardInterrupt and SystemExit exceptions, neither of which we should attempt to recover from?","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"14cf7467ef1f3b8c5cccc6a58f01a0b54e539651","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"},{"line_number":2519,"context_line":"            # set firewall filtering"},{"line_number":2520,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2521,"context_line":"        except Exception:"},{"line_number":2522,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2523,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2524,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_f081f64e","line":2521,"in_reply_to":"fa6399be_bf0a7b24","updated":"2016-11-02 07:31:51.000000000","message":"got it, will check this part","commit_id":"7812ff4869d31c291ea58e3ebd1229db15391ba3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"        except exception.NovaException:"},{"line_number":2507,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2508,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2509,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2511,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2512,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_b847634a","line":2509,"updated":"2016-11-14 11:08:05.000000000","message":"Do we only want to call this if plug worked? Is this OK when you have a plug failure? I would expect plug to either work or fail and clean up?","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"        except exception.NovaException:"},{"line_number":2507,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2508,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2509,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2511,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2512,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_4d13bd0d","line":2509,"in_reply_to":"9a629dbe_b847634a","updated":"2016-11-16 02:43:00.000000000","message":"If vif_driver.plug() failed, we want to delete the things we had done but not needed, so the environment is clean, just as the VIF is never plugged","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2509,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2511,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_0330e49d","line":2511,"updated":"2016-11-14 11:08:05.000000000","message":"Not sure I can see a test for this bit of error handling.","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2509,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2511,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_0dd46545","line":2511,"in_reply_to":"9a629dbe_0330e49d","updated":"2016-11-16 02:43:00.000000000","message":"will check the test, if not, will add unit tests","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a29d10c125e651e63de848a49f34a7a120df463d","unresolved":false,"context_lines":[{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        try:"},{"line_number":2517,"context_line":"            vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2518,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2519,"context_line":"        except exception.NovaException:"},{"line_number":2520,"context_line":"            LOG.error(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2521,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_38a993e0","line":2518,"updated":"2016-11-14 11:08:05.000000000","message":"Do we need to do any firewall things here to clean up? I guess not?","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"38228774f58698bd199f94a85b5db43d1ec0b68f","unresolved":false,"context_lines":[{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        try:"},{"line_number":2517,"context_line":"            vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2518,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2519,"context_line":"        except exception.NovaException:"},{"line_number":2520,"context_line":"            LOG.error(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2521,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_ade8d111","line":2518,"in_reply_to":"9a629dbe_38a993e0","updated":"2016-11-16 02:43:00.000000000","message":"With neutron, firewall related things were done by neutron, so no action here","commit_id":"3e238b7ad8f38800049d15c4e0fc38be6cab5021"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"87812aab05d0d0b9937dd9651f4f139766206747","unresolved":false,"context_lines":[{"line_number":2492,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2493,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            LOG.error(_LE(\"No allowed VIF devices to use\"), instance\u003dinstance)"},{"line_number":2496,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2497,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2498,"context_line":"        device \u003d allowed_devices[0]"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_d4a8d58e","line":2495,"updated":"2016-11-17 17:46:59.000000000","message":"why do we need to log + raise the exception?\nI\u0027d just raise the exception here; it\u0027s pretty fatal so will be logged elsewhere.","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c9490002fba99201dd13ce03291a15bff04b11b5","unresolved":false,"context_lines":[{"line_number":2492,"context_line":"        vm_ref \u003d self._get_vm_opaque_ref(instance)"},{"line_number":2493,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            LOG.error(_LE(\"No allowed VIF devices to use\"), instance\u003dinstance)"},{"line_number":2496,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2497,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2498,"context_line":"        device \u003d allowed_devices[0]"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_ecf4d2f1","line":2495,"in_reply_to":"7a77a97e_d4a8d58e","updated":"2016-11-21 02:22:58.000000000","message":"Sure, will remove the log","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"87812aab05d0d0b9937dd9651f4f139766206747","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"            try:"},{"line_number":2509,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            except exception.NovaException:"},{"line_number":2511,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2512,"context_line":"                pass"},{"line_number":2513,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2514,"context_line":"                                _(\u0027attaching network interface failed\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_54fa0544","line":2511,"updated":"2016-11-17 17:46:59.000000000","message":"but it might be worth logging the exception at debug level - for example, if we end up with resources not being cleaned up","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c9490002fba99201dd13ce03291a15bff04b11b5","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"            try:"},{"line_number":2509,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2510,"context_line":"            except exception.NovaException:"},{"line_number":2511,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2512,"context_line":"                pass"},{"line_number":2513,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2514,"context_line":"                                _(\u0027attaching network interface failed\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_acd57a43","line":2511,"in_reply_to":"7a77a97e_54fa0544","updated":"2016-11-21 02:22:58.000000000","message":"I see, will add warning log here","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"87812aab05d0d0b9937dd9651f4f139766206747","unresolved":false,"context_lines":[{"line_number":2511,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2512,"context_line":"                pass"},{"line_number":2513,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2514,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2517,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_94b73dd7","line":2514,"updated":"2016-11-17 17:46:59.000000000","message":"Is it wise to just log the Nova exception and raise it as InterfaceAttachFailed instead?\nSurely we want the NovaException to be re-raised?","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"e1b6d0879c45c5763c7cbd46fe78a49b006ec0aa","unresolved":false,"context_lines":[{"line_number":2511,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2512,"context_line":"                pass"},{"line_number":2513,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2514,"context_line":"                                _(\u0027attaching network interface failed\u0027))"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2517,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_4c80668b","line":2514,"in_reply_to":"7a77a97e_94b73dd7","updated":"2016-11-21 03:09:49.000000000","message":"I see, will re-raise the original NovaException","commit_id":"08658a413a4fd3f8270303bb19785eca75510180"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_4097bc47","line":2496,"range":{"start_line":2496,"start_character":32,"end_line":2496,"end_character":67},"updated":"2016-12-27 16:16:54.000000000","message":"This results in a 500 for the REST API:\n\nhttps://github.com/openstack/nova/blob/d442488ebe19a6b3ddea6ec8668f92c7e2a0a644/nova/api/openstack/compute/attach_interfaces.py#L134\n\nIs this a recoverable error, i.e. how does one go about getting allowed VIF devices for a VM and is it something a user can do and then retry the request? I\u0027m looking for some more detail for the error message to avoid a user opening a support ticket if possible.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"        allowed_devices \u003d self._session.VM.get_allowed_VIF_devices(vm_ref)"},{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_6ba5beb3","line":2496,"range":{"start_line":2496,"start_character":32,"end_line":2496,"end_character":67},"in_reply_to":"da4df55a_4097bc47","updated":"2017-01-05 01:33:23.000000000","message":"allowed-VIF-devices is got from XenServer Dom0, if it\u0027s none or empty, it means there is no VIF devices from the hypervisor\u0027s point of view for this VM, so we cannot do others.\n\nBelow is copied from \"xe vm-param-list uuid\u003dXXXX\"\nallowed-VIF-devices (SRO): 3; 4; 5; 6","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"        try:"},{"line_number":2500,"context_line":"            # plug VIF"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_0097743a","line":2497,"range":{"start_line":2497,"start_character":17,"end_line":2497,"end_character":32},"updated":"2016-12-27 16:16:54.000000000","message":"If there is more than one allowed device, how do we know the first one is correct, or doesn\u0027t it matter? Or do we only expect to ever get 0 or 1, and anything more than 1 is unexpected (and should maybe be logged as a warning?).","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e9f5260fee49f22dca6691381b18908efaede94","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"        try:"},{"line_number":2500,"context_line":"            # plug VIF"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_f9459942","line":2497,"range":{"start_line":2497,"start_character":17,"end_line":2497,"end_character":32},"in_reply_to":"ba5201f7_6b8cde35","updated":"2017-01-06 17:03:22.000000000","message":"OK...I guess we could have a race here where two concurrent requests for attaching VIFs hit this code at the same time and try to plug the same device, and the first wins and the 2nd fails.\n\nWe could add a retry loop for handling that if the device was taken, but that could also maybe be a separate follow on improvement.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":""},{"line_number":2499,"context_line":"        try:"},{"line_number":2500,"context_line":"            # plug VIF"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_6b8cde35","line":2497,"range":{"start_line":2497,"start_character":17,"end_line":2497,"end_character":32},"in_reply_to":"da4df55a_0097743a","updated":"2017-01-05 01:33:23.000000000","message":"The allowed device means the availabe from hypervisor\u0027s point of view, and means users can create and plug a VIF. So we just pick the first one to use","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2503,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2504,"context_line":"        except exception.NovaException:"},{"line_number":2505,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_80ab6474","line":2506,"range":{"start_line":2506,"start_character":41,"end_line":2506,"end_character":54},"updated":"2016-12-27 16:16:54.000000000","message":"nit: you could just use LOG.exception and get the same result (the traceback in the logs).\n\nIs ERROR the correct logging level for this? In other words, should an operator get paged in the middle of the night if this happens?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2503,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2504,"context_line":"        except exception.NovaException:"},{"line_number":2505,"context_line":"            LOG.error(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_35178bee","line":2506,"range":{"start_line":2506,"start_character":41,"end_line":2506,"end_character":54},"in_reply_to":"da4df55a_80ab6474","updated":"2017-01-05 01:33:23.000000000","message":"using LOG.exception is much suitable here, I\u0027ll use this","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_e018b0d5","line":2509,"updated":"2016-12-27 16:16:54.000000000","message":"I think using excutils.save_and_reraise_exception would be more appropriate here, then we don\u0027t have to explicitly raise on L2514 below.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_2329e237","line":2509,"range":{"start_line":2509,"start_character":29,"end_line":2509,"end_character":42},"updated":"2016-12-27 16:16:54.000000000","message":"You don\u0027t have any unit test coverage of unplug failing but making sure that exception is swallowed and the original exception is the one that\u0027s raised back up to the caller.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_155a874f","line":2509,"range":{"start_line":2509,"start_character":29,"end_line":2509,"end_character":42},"in_reply_to":"da4df55a_2329e237","updated":"2017-01-05 01:33:23.000000000","message":"will add one UT","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2507,"context_line":"            try:"},{"line_number":2508,"context_line":"                self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_d55f1f3f","line":2509,"in_reply_to":"da4df55a_e018b0d5","updated":"2017-01-05 01:33:23.000000000","message":"yes, you are right, will change it","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2513,"context_line":"                pass"},{"line_number":2514,"context_line":"            raise"},{"line_number":2515,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_40fa5c76","line":2512,"range":{"start_line":2512,"start_character":47,"end_line":2512,"end_character":60},"updated":"2016-12-27 16:16:54.000000000","message":"Rather than trace this out, I\u0027d rather us just include the error in the warning message logged, i.e.:\n\nLOG.warning(_LW(\u0027Unplug VIF failed. Error: %s\u0027), ex, instance\u003dinstance)","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"            except exception.NovaException:"},{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2513,"context_line":"                pass"},{"line_number":2514,"context_line":"            raise"},{"line_number":2515,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_cbcb0a52","line":2512,"range":{"start_line":2512,"start_character":47,"end_line":2512,"end_character":60},"in_reply_to":"da4df55a_40fa5c76","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2513,"context_line":"                pass"},{"line_number":2514,"context_line":"            raise"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"    def detach_interface(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_00ae9480","line":2513,"range":{"start_line":2513,"start_character":16,"end_line":2513,"end_character":20},"updated":"2016-12-27 16:16:54.000000000","message":"This isn\u0027t needed.","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"                # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                LOG.warning(_LW(\u0027Unplug VIF failed.\u0027),"},{"line_number":2512,"context_line":"                            instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2513,"context_line":"                pass"},{"line_number":2514,"context_line":"            raise"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"    def detach_interface(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_ab9de65a","line":2513,"range":{"start_line":2513,"start_character":16,"end_line":2513,"end_character":20},"in_reply_to":"da4df55a_00ae9480","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43b812e481a720470a6a7ae7fdf3bb04caab715a","unresolved":false,"context_lines":[{"line_number":2521,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2522,"context_line":"        except exception.NovaException:"},{"line_number":2523,"context_line":"            LOG.error(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2524,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2525,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":15,"id":"da4df55a_6025a007","line":2524,"range":{"start_line":2524,"start_character":41,"end_line":2524,"end_character":54},"updated":"2016-12-27 16:16:54.000000000","message":"Similar point as above, you could use LOG.exception but is ERROR the proper logging level for this?","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"7c0cad3cb66517251aa9b305644f95f5fa2b2370","unresolved":false,"context_lines":[{"line_number":2521,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2522,"context_line":"        except exception.NovaException:"},{"line_number":2523,"context_line":"            LOG.error(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2524,"context_line":"                      instance\u003dinstance, exc_info\u003dTrue)"},{"line_number":2525,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_95de773d","line":2524,"range":{"start_line":2524,"start_character":41,"end_line":2524,"end_character":54},"in_reply_to":"da4df55a_6025a007","updated":"2017-01-05 01:33:23.000000000","message":"Done","commit_id":"8b500790cbf5b9ecf2db9ee64a1963e0859962a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_39880171","line":2497,"updated":"2017-01-06 17:02:58.000000000","message":"See comment in patch set 15, but we do have a race here if multiple concurrent requests to attach VIFs to the same server hit this code at the same time, the first plug would pass and the 2nd would presumably fail because the device is now in use. We could handle that with a retry in the code, and do it in a later separate change. But if we handle it later, I\u0027d suggest adding a TODO comment in here for that issue.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"54f2e7144722afd2050e195236d3a3671da2db98","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_b975d1cb","line":2497,"in_reply_to":"ba5201f7_39880171","updated":"2017-01-06 17:04:13.000000000","message":"Alternatively we could try putting this into a semaphore.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_5b003934","line":2497,"in_reply_to":"ba5201f7_39880171","updated":"2017-01-09 05:40:01.000000000","message":"yeah, I should consider the race condition, thanks for your suggestion","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_9bf6215b","line":2497,"in_reply_to":"ba5201f7_a4a688ab","updated":"2017-01-09 05:40:01.000000000","message":"Yes, I will add this to avoid race condition","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"17364b1118a382103b4e32ac9da8da67fa7b3437","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_a4a688ab","line":2497,"in_reply_to":"ba5201f7_b975d1cb","updated":"2017-01-06 17:14:40.000000000","message":"Let\u0027s use a @utils.synchronized(\u0027xenapi-vif-\u0027 + vm_ref) decorator on this method","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2494,"context_line":"        if allowed_devices is None or len(allowed_devices) \u003d\u003d 0:"},{"line_number":2495,"context_line":"            raise exception.InterfaceAttachFailed("},{"line_number":2496,"context_line":"                _(\"No allowed VIF devices to use\"))"},{"line_number":2497,"context_line":"        device \u003d allowed_devices[0]"},{"line_number":2498,"context_line":"        try:"},{"line_number":2499,"context_line":"            # plug VIF"},{"line_number":2500,"context_line":"            self.vif_driver.plug(instance, vif, vm_ref\u003dvm_ref, device\u003ddevice)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7bfb3d47","line":2497,"in_reply_to":"ba5201f7_b975d1cb","updated":"2017-01-09 05:40:01.000000000","message":"yes, we can do that","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":2502,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2503,"context_line":"        except exception.NovaException:"},{"line_number":2504,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2505,"context_line":"                LOG.exception(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2506,"context_line":"                              instance\u003dinstance)"},{"line_number":2507,"context_line":"                try:"},{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_f9b83913","line":2505,"range":{"start_line":2505,"start_character":35,"end_line":2505,"end_character":69},"updated":"2017-01-06 17:02:58.000000000","message":"It would be good to have something in here for the VIF context (maybe the vif[\u0027id\u0027]?) and device for context when this fails - e.g. for a case of the device being in use as noted above.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2502,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2503,"context_line":"        except exception.NovaException:"},{"line_number":2504,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2505,"context_line":"                LOG.exception(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2506,"context_line":"                              instance\u003dinstance)"},{"line_number":2507,"context_line":"                try:"},{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_bb9765ea","line":2505,"range":{"start_line":2505,"start_character":35,"end_line":2505,"end_character":69},"in_reply_to":"ba5201f7_f9b83913","updated":"2017-01-09 05:40:01.000000000","message":"sure","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":20382,"name":"YuYang","email":"yuyangwang1985@gmail.com","username":"YuYangWang"},"change_message_id":"5606e8cf08102f453534596565bbb455b1ef1925","unresolved":false,"context_lines":[{"line_number":2502,"context_line":"            self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2503,"context_line":"        except exception.NovaException:"},{"line_number":2504,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2505,"context_line":"                LOG.exception(_LE(\u0027attaching network interface failed.\u0027),"},{"line_number":2506,"context_line":"                              instance\u003dinstance)"},{"line_number":2507,"context_line":"                try:"},{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_664ac156","line":2506,"range":{"start_line":2505,"start_character":16,"end_line":2506,"end_character":48},"updated":"2017-01-09 05:57:43.000000000","message":"i think in all invoke xapi exception  should get xapi xapi\u0027s error message,and then print in the log.this will get quick fix the problem! thanks!","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"},{"line_number":2510,"context_line":"                    # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                    LOG.exception(_LE(\u0027Unplug VIF failed.\u0027), instance\u003dinstance)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_79436913","line":2511,"range":{"start_line":2511,"start_character":46,"end_line":2511,"end_character":49},"updated":"2017-01-06 17:02:58.000000000","message":"Can we put the VIF id in this error message for context?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"},{"line_number":2510,"context_line":"                    # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                    LOG.exception(_LE(\u0027Unplug VIF failed.\u0027), instance\u003dinstance)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_590ea5e5","line":2511,"range":{"start_line":2511,"start_character":24,"end_line":2511,"end_character":33},"updated":"2017-01-06 17:02:58.000000000","message":"I don\u0027t think this needs to be an exception - if the plug failed, then there is nothing to unplug - so I\u0027d probably make this a warning rather than error/exception.","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":20382,"name":"YuYang","email":"yuyangwang1985@gmail.com","username":"YuYangWang"},"change_message_id":"5606e8cf08102f453534596565bbb455b1ef1925","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"},{"line_number":2510,"context_line":"                    # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                    LOG.exception(_LE(\u0027Unplug VIF failed.\u0027), instance\u003dinstance)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_26443948","line":2511,"range":{"start_line":2511,"start_character":20,"end_line":2511,"end_character":79},"updated":"2017-01-09 05:57:43.000000000","message":"i think in all invoke xapi exception  should get xapi xapi\u0027s error message,and then print in the log.this will get quick fix the problem! thanks!","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"},{"line_number":2510,"context_line":"                    # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                    LOG.exception(_LE(\u0027Unplug VIF failed.\u0027), instance\u003dinstance)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7b925df7","line":2511,"range":{"start_line":2511,"start_character":24,"end_line":2511,"end_character":33},"in_reply_to":"ba5201f7_590ea5e5","updated":"2017-01-09 05:40:01.000000000","message":"sure, will change to warning","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2508,"context_line":"                    self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2509,"context_line":"                except exception.NovaException:"},{"line_number":2510,"context_line":"                    # if unplug failed, no need to raise exception"},{"line_number":2511,"context_line":"                    LOG.exception(_LE(\u0027Unplug VIF failed.\u0027), instance\u003dinstance)"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"    def detach_interface(self, instance, vif):"},{"line_number":2514,"context_line":"        LOG.debug(\"Detach interface, vif info: %s\", vif, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_1ba15146","line":2511,"range":{"start_line":2511,"start_character":46,"end_line":2511,"end_character":49},"in_reply_to":"ba5201f7_79436913","updated":"2017-01-09 05:40:01.000000000","message":"will do","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7923b6e4d6006b8b34e8bff01c6678fd8f736716","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2519,"context_line":"        except exception.NovaException:"},{"line_number":2520,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2521,"context_line":"                LOG.exception(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2522,"context_line":"                              instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_d90295b3","line":2521,"range":{"start_line":2521,"start_character":35,"end_line":2521,"end_character":69},"updated":"2017-01-06 17:02:58.000000000","message":"Can we add the vif id to the error message for context?","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6c5a06648fa5cf7ccce1c67c4442823e9a10debd","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2519,"context_line":"        except exception.NovaException:"},{"line_number":2520,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2521,"context_line":"                LOG.exception(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2522,"context_line":"                              instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_bbbe8562","line":2521,"range":{"start_line":2521,"start_character":35,"end_line":2521,"end_character":69},"in_reply_to":"ba5201f7_d90295b3","updated":"2017-01-09 05:40:01.000000000","message":"sure","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":20382,"name":"YuYang","email":"yuyangwang1985@gmail.com","username":"YuYangWang"},"change_message_id":"5606e8cf08102f453534596565bbb455b1ef1925","unresolved":false,"context_lines":[{"line_number":2518,"context_line":"            self.vif_driver.unplug(instance, vif, vm_ref)"},{"line_number":2519,"context_line":"        except exception.NovaException:"},{"line_number":2520,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":2521,"context_line":"                LOG.exception(_LE(\u0027detaching network interface failed.\u0027),"},{"line_number":2522,"context_line":"                              instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_a67669a1","line":2522,"range":{"start_line":2521,"start_character":16,"end_line":2522,"end_character":48},"updated":"2017-01-09 05:57:43.000000000","message":"i think in all invoke xapi exception  should get xapi xapi\u0027s error message,and then print in the log.this will get quick fix the problem! thanks!","commit_id":"92b7e3a20c517783da2bb04ff7a5c0346c5c39ec"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d65e684ad69aa192a9e8e1787a3b402de46dceae","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                                     device\u003ddevice)"},{"line_number":2506,"context_line":"                # set firewall filtering"},{"line_number":2507,"context_line":"                self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2508,"context_line":"            except exception.NovaException:"},{"line_number":2509,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":2510,"context_line":"                    LOG.exception(_LE(\u0027attach network interface %s failed.\u0027),"},{"line_number":2511,"context_line":"                                  vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_5c5330e2","line":2508,"range":{"start_line":2508,"start_character":19,"end_line":2508,"end_character":42},"updated":"2017-01-11 22:13:59.000000000","message":"thanks for that, better than just except Exception:","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0461721e10543e1f80d5bf348ff3532463390ad1","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                                     device\u003ddevice)"},{"line_number":2506,"context_line":"                # set firewall filtering"},{"line_number":2507,"context_line":"                self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2508,"context_line":"            except exception.NovaException:"},{"line_number":2509,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":2510,"context_line":"                    LOG.exception(_LE(\u0027attach network interface %s failed.\u0027),"},{"line_number":2511,"context_line":"                                  vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_f246cb79","line":2508,"range":{"start_line":2508,"start_character":19,"end_line":2508,"end_character":42},"in_reply_to":"ba5201f7_5c5330e2","updated":"2017-01-11 23:24:10.000000000","message":"On the Hyper-V VIF plug/unplug patch, I just got finished asking them to please use a non-generic exception like VirtualInterfacePlugException:\n\nhttps://review.openstack.org/#/c/140045/\n\nWould be great if the Xen driver also did.","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"1beb435218e8b143ba7583a68eec3310c382768a","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                                     device\u003ddevice)"},{"line_number":2506,"context_line":"                # set firewall filtering"},{"line_number":2507,"context_line":"                self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2508,"context_line":"            except exception.NovaException:"},{"line_number":2509,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":2510,"context_line":"                    LOG.exception(_LE(\u0027attach network interface %s failed.\u0027),"},{"line_number":2511,"context_line":"                                  vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_5ed6c0f1","line":2508,"range":{"start_line":2508,"start_character":19,"end_line":2508,"end_character":42},"in_reply_to":"ba5201f7_5c5330e2","updated":"2017-01-12 01:35:46.000000000","message":"Thanks","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"1beb435218e8b143ba7583a68eec3310c382768a","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                                     device\u003ddevice)"},{"line_number":2506,"context_line":"                # set firewall filtering"},{"line_number":2507,"context_line":"                self.firewall_driver.setup_basic_filtering(instance, [vif])"},{"line_number":2508,"context_line":"            except exception.NovaException:"},{"line_number":2509,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":2510,"context_line":"                    LOG.exception(_LE(\u0027attach network interface %s failed.\u0027),"},{"line_number":2511,"context_line":"                                  vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_fef93481","line":2508,"range":{"start_line":2508,"start_character":19,"end_line":2508,"end_character":42},"in_reply_to":"ba5201f7_f246cb79","updated":"2017-01-12 01:35:46.000000000","message":"Thanks Jay, sorry that I missed your comments this morning","commit_id":"5dedd0b22a2ab929d65e91ae6df1ffa2feece5f1"}],"releasenotes/notes/bp-xenapi-vif-hotplug-2a2b913c49123fe0.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8235255cd1260b40890d1964bc9125d6590f8a7b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Nova has already support hotplugging neutorn ports in"},{"line_number":4,"context_line":"    libvirt driver. This change is to extend the support"},{"line_number":5,"context_line":"    to XenServer driver, implement attaching and detaching"},{"line_number":6,"context_line":"    virtual interfaces to instances."}],"source_content_type":"text/x-yaml","patch_set":21,"id":"ba5201f7_a6142244","line":6,"range":{"start_line":3,"start_character":4,"end_line":6,"end_character":36},"updated":"2017-01-11 14:51:34.000000000","message":"We should re-word this. Let\u0027s just say:\n\n\"The XenServer compute driver now supports hot-plugging virtual network interfaces.\"","commit_id":"823b0532707d9a6bb06a2a0fa2ecac4df2725a3e"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"6916c5418ad14e76c23d88b458fb9447673d5d42","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Nova has already support hotplugging neutorn ports in"},{"line_number":4,"context_line":"    libvirt driver. This change is to extend the support"},{"line_number":5,"context_line":"    to XenServer driver, implement attaching and detaching"},{"line_number":6,"context_line":"    virtual interfaces to instances."}],"source_content_type":"text/x-yaml","patch_set":21,"id":"ba5201f7_46a1b6f7","line":6,"range":{"start_line":3,"start_character":4,"end_line":6,"end_character":36},"in_reply_to":"ba5201f7_a6142244","updated":"2017-01-11 14:53:50.000000000","message":"Sure, I will modify release note","commit_id":"823b0532707d9a6bb06a2a0fa2ecac4df2725a3e"}]}
