)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b560a953b6f41fef9188ef2806f2d0a33a7906fe","unresolved":false,"context_lines":[{"line_number":2736,"context_line":"                      instance\u003dinstance)"},{"line_number":2737,"context_line":"            with timeutils.StopWatch() as timer:"},{"line_number":2738,"context_line":"                src_or_trgt \u003d self._is_source_or_target(context, instance)"},{"line_number":2739,"context_line":"                self.driver.destroy(context, instance, network_info,"},{"line_number":2740,"context_line":"                                    block_device_info, host\u003dsrc_or_trgt)"},{"line_number":2741,"context_line":"            LOG.info(\u0027Took %0.2f seconds to destroy the instance on the \u0027"},{"line_number":2742,"context_line":"                     \u0027hypervisor.\u0027, timer.elapsed(), instance\u003dinstance)"},{"line_number":2743,"context_line":"        except exception.InstancePowerOffFailure:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_2fe4a0df","line":2740,"range":{"start_line":2739,"start_character":16,"end_line":2740,"end_character":72},"updated":"2020-03-05 07:08:12.000000000","message":"I\u0027m thinking we can use \"instance.mutated_migration_context\" at here. Then we needn\u0027t modify all the virt driver method, and all the virt driver needn\u0027t care about it is source or target.\n\nSo you can write something like this:\n\nwith instance.mutated_migration_context(src_or_trgt):\n     self.driver.destroy(......)\n\n\nYou only need add new parameter to \u0027instance.mutated_migration_context\u0027 for identify which migration_context you want to switch.","commit_id":"2652404cb691ebf23f2b1010fc55d3273a5fea9b"},{"author":{"_account_id":23598,"name":"Zhong Luyao","email":"luyao.zhong@intel.com","username":"ZhongLuyao"},"change_message_id":"3a0ce2d9219fc1c221630a34ff6877c788f77b79","unresolved":false,"context_lines":[{"line_number":2736,"context_line":"                      instance\u003dinstance)"},{"line_number":2737,"context_line":"            with timeutils.StopWatch() as timer:"},{"line_number":2738,"context_line":"                src_or_trgt \u003d self._is_source_or_target(context, instance)"},{"line_number":2739,"context_line":"                self.driver.destroy(context, instance, network_info,"},{"line_number":2740,"context_line":"                                    block_device_info, host\u003dsrc_or_trgt)"},{"line_number":2741,"context_line":"            LOG.info(\u0027Took %0.2f seconds to destroy the instance on the \u0027"},{"line_number":2742,"context_line":"                     \u0027hypervisor.\u0027, timer.elapsed(), instance\u003dinstance)"},{"line_number":2743,"context_line":"        except exception.InstancePowerOffFailure:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1fa4df85_1998e419","line":2740,"range":{"start_line":2739,"start_character":16,"end_line":2740,"end_character":72},"in_reply_to":"1fa4df85_2fe4a0df","updated":"2020-03-09 03:04:08.000000000","message":"Good suggestion，I\u0027ll try using this in next patch version.","commit_id":"2652404cb691ebf23f2b1010fc55d3273a5fea9b"}]}
