)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"06728896713a69e3c9b26ad637d71581bcae99f5","unresolved":false,"context_lines":[{"line_number":4430,"context_line":"        else:"},{"line_number":4431,"context_line":"            # image will be None in case of volume backed instance"},{"line_number":4432,"context_line":"            image_meta \u003d compute_utils.get_bdm_image_metadata("},{"line_number":4433,"context_line":"                context, bdms, self.volume_api, self.image_api)"},{"line_number":4434,"context_line":""},{"line_number":4435,"context_line":"        self.network_api.setup_instance_network_on_host(context, instance,"},{"line_number":4436,"context_line":"                                                        self.host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aa745d1_150ae826","line":4433,"updated":"2015-04-16 15:11:06.000000000","message":"legacy_bdm\u0027s default value is True. Looks like wrong at here, the bdms isn\u0027t the legacy.","commit_id":"d60577d3223283e562c27fc68169a31b74c20dff"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"a534cdd19eca32fbdb5fd5bf5256155835f9ace5","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            image_meta \u003d image"},{"line_number":4430,"context_line":"        else:"},{"line_number":4431,"context_line":"            # image will be None in case of volume backed instance"},{"line_number":4432,"context_line":"            image_meta \u003d compute_utils.get_bdm_image_metadata("},{"line_number":4433,"context_line":"                    context, bdms, self.volume_api, self.image_api,"},{"line_number":4434,"context_line":"                    legacy_bdm\u003dFalse)"},{"line_number":4435,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_04c049df","line":4432,"updated":"2015-05-02 11:08:28.000000000","message":"Could we use utils.get_image_from_system_metadata instead?\n\nThe reason is that get_bdm_image_metadata looks to be intended for processing of bdm during instance launch. For example, if snapshot_id property is set for a root bdm record, image metadata will be collected from an original volume of the snapshot, not from a volume defined by volume_id property.\n\nIf we boot an instance from a bootable volume snapshot, and then delete the snapshot, get_bdm_image_metadata will fail due to the snapshot absent.\n\nAn other reason is that instance system metadata contains properties exactly used for the instance. And if we change some this properties for the running instance in the future, we will store actual values in instance system metadata, not in volume image metadata.","commit_id":"cfdc77ade11f183b52c14354f0572f515193f91f"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"c6d8ffb8d7599a6f639105efd4e48288b5b7d295","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            image_meta \u003d image"},{"line_number":4430,"context_line":"        else:"},{"line_number":4431,"context_line":"            # image will be None in case of volume backed instance"},{"line_number":4432,"context_line":"            image_meta \u003d compute_utils.get_bdm_image_metadata("},{"line_number":4433,"context_line":"                    context, bdms, self.volume_api, self.image_api,"},{"line_number":4434,"context_line":"                    legacy_bdm\u003dFalse)"},{"line_number":4435,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_9f42623d","line":4432,"in_reply_to":"3acd31a7_04c049df","updated":"2015-05-02 11:21:10.000000000","message":"And probably it would be better to initialize image_meta for volume backed instance nearby with meta initialization for regular instance. I.e. in conductor.manager.ConductorManager.unshelve_instance.","commit_id":"cfdc77ade11f183b52c14354f0572f515193f91f"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"2a59b8b10de9a4c59f05d78b743ea843a002dbda","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            image_meta \u003d image"},{"line_number":4430,"context_line":"        else:"},{"line_number":4431,"context_line":"            # image will be None in case of volume backed instance"},{"line_number":4432,"context_line":"            image_meta \u003d compute_utils.get_bdm_image_metadata("},{"line_number":4433,"context_line":"                    context, bdms, self.volume_api, self.image_api,"},{"line_number":4434,"context_line":"                    legacy_bdm\u003dFalse)"},{"line_number":4435,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_984f1cbd","line":4432,"in_reply_to":"3acd31a7_04c049df","updated":"2015-05-13 13:04:36.000000000","message":"Done","commit_id":"cfdc77ade11f183b52c14354f0572f515193f91f"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"2a59b8b10de9a4c59f05d78b743ea843a002dbda","unresolved":false,"context_lines":[{"line_number":4429,"context_line":"            image_meta \u003d image"},{"line_number":4430,"context_line":"        else:"},{"line_number":4431,"context_line":"            # image will be None in case of volume backed instance"},{"line_number":4432,"context_line":"            image_meta \u003d compute_utils.get_bdm_image_metadata("},{"line_number":4433,"context_line":"                    context, bdms, self.volume_api, self.image_api,"},{"line_number":4434,"context_line":"                    legacy_bdm\u003dFalse)"},{"line_number":4435,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_58c88422","line":4432,"in_reply_to":"3acd31a7_9f42623d","updated":"2015-05-13 13:04:36.000000000","message":"If we initialize image_meta for volume backed instance in conductor.manager.ConductorManager.unshelve_instance, image_meta returned by utils.get_image_from_system_metadata() doesn\u0027t contain image[\u0027id\u0027] hence it will raise KeyError at line #4428\n\nMaking this change here only.","commit_id":"cfdc77ade11f183b52c14354f0572f515193f91f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6eb16de3a63dbc95e42d8a4b7d8540a1c3e2fa16","unresolved":false,"context_lines":[{"line_number":4171,"context_line":"            image_meta \u003d image"},{"line_number":4172,"context_line":"        else:"},{"line_number":4173,"context_line":"            image_meta \u003d utils.get_image_from_system_metadata("},{"line_number":4174,"context_line":"                instance.system_metadata)"},{"line_number":4175,"context_line":""},{"line_number":4176,"context_line":"        self.network_api.setup_instance_network_on_host(context, instance,"},{"line_number":4177,"context_line":"                                                        self.host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_1e67d2e9","line":4174,"updated":"2015-08-07 00:27:15.000000000","message":"Dan Smith, is the above correct? I thought we were moving away from using system_metadata to get image metadata. Or is that only for flavor metadata?","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cb178ab855fc5229ebe46037908b2af5f603a71b","unresolved":false,"context_lines":[{"line_number":4171,"context_line":"            image_meta \u003d image"},{"line_number":4172,"context_line":"        else:"},{"line_number":4173,"context_line":"            image_meta \u003d utils.get_image_from_system_metadata("},{"line_number":4174,"context_line":"                instance.system_metadata)"},{"line_number":4175,"context_line":""},{"line_number":4176,"context_line":"        self.network_api.setup_instance_network_on_host(context, instance,"},{"line_number":4177,"context_line":"                                                        self.host)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_3bfddcb0","line":4174,"in_reply_to":"1a4dcd0f_1e67d2e9","updated":"2015-08-07 15:41:00.000000000","message":"For now, this is still correct. We\u0027re transitioning to ImageMeta in places, but for this kind of thing it still needs to be done this way. Flavor stuff is already out, yeah.","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"}],"nova/tests/unit/compute/test_shelve.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"344b682fc84ae8cfd1b9eab893518022c5e0734f","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.assertEqual(self.compute.host, instance.host)"},{"line_number":260,"context_line":"        self.assertFalse(instance.auto_disk_config)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    @mock.patch(\u0027nova.utils.get_image_from_system_metadata\u0027)"},{"line_number":263,"context_line":"    def test_unshelve_volume_backed(self, mock_image_meta):"},{"line_number":264,"context_line":"        instance \u003d self._create_fake_instance_obj()"},{"line_number":265,"context_line":"        node \u003d test_compute.NODENAME"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_9c5e3244","line":262,"updated":"2015-05-14 09:57:18.000000000","message":"I don\u0027t understand why to mix two different techniques in one test, mock and mox. Is there any recommedation how to extend existed mox-based tests?","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"235a8f9525110e4b874f2a3a5becc6d3d36d5fed","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        self.rt.instance_claim(self.context, instance, limits).AndReturn("},{"line_number":306,"context_line":"                claims.Claim(self.context, instance, self.rt,"},{"line_number":307,"context_line":"                             _fake_resources()))"},{"line_number":308,"context_line":"        self.compute.driver.spawn(self.context, instance, image_meta,"},{"line_number":309,"context_line":"                injected_files\u003d[], admin_password\u003dNone,"},{"line_number":310,"context_line":"                network_info\u003d[],"},{"line_number":311,"context_line":"                block_device_info\u003d\u0027fake_bdm\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_fb776f9d","line":308,"updated":"2015-08-07 17:23:56.000000000","message":"Since you\u0027re sending image_meta here, you actually are not going to use the newly-added code path that uses utils.get_image_from_system_metadata(). If you added a:\n\n mock_image_meta.assert_called_once_with(instance)\n\nYou would likely see an assertion failure.\n\nI recommend adding that assertion and changing this back to sending None for the image parameter.","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"b82c41f42cb060790ddaab84515fd11f59c38166","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        self.rt.instance_claim(self.context, instance, limits).AndReturn("},{"line_number":306,"context_line":"                claims.Claim(self.context, instance, self.rt,"},{"line_number":307,"context_line":"                             _fake_resources()))"},{"line_number":308,"context_line":"        self.compute.driver.spawn(self.context, instance, image_meta,"},{"line_number":309,"context_line":"                injected_files\u003d[], admin_password\u003dNone,"},{"line_number":310,"context_line":"                network_info\u003d[],"},{"line_number":311,"context_line":"                block_device_info\u003d\u0027fake_bdm\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_f4f99cc9","line":308,"in_reply_to":"1a4dcd0f_b2055d15","updated":"2015-09-14 13:11:27.000000000","message":"a unit test with both mox and mock is hard to read and understand, but from what I see, self.compute.driver.spawn is moxed, basically, it tells mox it should expect image_meta as an argument, as defined above, which will be returned by the mocked \"nova.utils.get_image_from_system_metadata\".\n\nanyways, the true unshelve call is below, at L319, where the image\u003dNone is passed. IMO, the testcase stays true, it tests the newly added code path. lgtm.","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"6568512526d797fe47bedb2c3cde6dcab853ff1a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        self.rt.instance_claim(self.context, instance, limits).AndReturn("},{"line_number":306,"context_line":"                claims.Claim(self.context, instance, self.rt,"},{"line_number":307,"context_line":"                             _fake_resources()))"},{"line_number":308,"context_line":"        self.compute.driver.spawn(self.context, instance, image_meta,"},{"line_number":309,"context_line":"                injected_files\u003d[], admin_password\u003dNone,"},{"line_number":310,"context_line":"                network_info\u003d[],"},{"line_number":311,"context_line":"                block_device_info\u003d\u0027fake_bdm\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_b2055d15","line":308,"in_reply_to":"1a4dcd0f_fb776f9d","updated":"2015-08-10 07:31:02.000000000","message":"Hi Jay,\n\nI have checked that this test gets passed with mock_image_meta.assert_called_once_with(instance.system_metadata).\n\nDo I need to submit new patch set with this \u0027assert_called_once_with\u0027 statement?","commit_id":"95ca590303c531697e8f4e38a1ce1f5bcf0fd0ba"}]}
