)]}'
{"nova/tests/unit/virt/xenapi/test_vmops.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f8b2fccc1953aecf4f2c9d7358b15af1a5a3951","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        result \u003d self.vmops.pre_live_migration("},{"line_number":1385,"context_line":"                None, None, \"bdi\", None, None, migrate_data)"},{"line_number":1386,"context_line":""},{"line_number":1387,"context_line":"        self.assertTrue(result.block_migration)"},{"line_number":1388,"context_line":"        self.assertEqual(result.sr_uuid_map, sr_uuid_map)"},{"line_number":1389,"context_line":"        mock_connect.assert_called_once_with(\"bdi\")"},{"line_number":1390,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_dd7a8323","line":1387,"range":{"start_line":1387,"start_character":8,"end_line":1387,"end_character":47},"updated":"2016-03-18 13:47:02.000000000","message":"nit: this isn\u0027t really needed, it\u0027s just testing a flag set on the object before it\u0027s passed in, maybe it\u0027s here to just make sure the value isn\u0027t changed?","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"}],"nova/tests/unit/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"3e7c2679cb9ca76cac5216357bd64675bc4dab08","unresolved":false,"context_lines":[{"line_number":3348,"context_line":"        self.assertTrue(fake_live_migrate.called)"},{"line_number":3349,"context_line":""},{"line_number":3350,"context_line":"    def test_pre_live_migration(self):"},{"line_number":3351,"context_line":"        # ensure method is present"},{"line_number":3352,"context_line":"        stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests)"},{"line_number":3353,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3354,"context_line":"        self.conn.pre_live_migration(None, None, None, None, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_88403ba7","side":"PARENT","line":3351,"updated":"2016-03-16 13:28:37.000000000","message":"The only thing this test does is ensuring the method is there... so keep the comment?","commit_id":"fba6b905d293342d53a938c3cf8e793ddad440bf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2841ae8983492a3fca01e42b230d2945b5141750","unresolved":false,"context_lines":[{"line_number":3348,"context_line":"        self.assertTrue(fake_live_migrate.called)"},{"line_number":3349,"context_line":""},{"line_number":3350,"context_line":"    def test_pre_live_migration(self):"},{"line_number":3351,"context_line":"        # ensure method is present"},{"line_number":3352,"context_line":"        stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests)"},{"line_number":3353,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3354,"context_line":"        self.conn.pre_live_migration(None, None, None, None, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_72e31906","side":"PARENT","line":3351,"in_reply_to":"1af94dfe_88403ba7","updated":"2016-03-16 14:08:23.000000000","message":"the new test makes sure it calls vmops correctly.","commit_id":"fba6b905d293342d53a938c3cf8e793ddad440bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f8b2fccc1953aecf4f2c9d7358b15af1a5a3951","unresolved":false,"context_lines":[{"line_number":3352,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3353,"context_line":""},{"line_number":3354,"context_line":"        with mock.patch.object(self.conn._vmops, \"pre_live_migration\") as pre:"},{"line_number":3355,"context_line":"            pre.return_value \u003d True"},{"line_number":3356,"context_line":""},{"line_number":3357,"context_line":"            result \u003d self.conn.pre_live_migration("},{"line_number":3358,"context_line":"                    \"ctx\", \"inst\", \"bdi\", \"nw\", \"di\", \"data\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_5d531317","line":3355,"range":{"start_line":3355,"start_character":12,"end_line":3355,"end_character":35},"updated":"2016-03-18 13:47:02.000000000","message":"This should actually be returning a XenapiLiveMigrateData object. Since it\u0027s a mock it doesn\u0027t really matter, but it\u0027s confusing when someone looks at this a year later.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e164d420e715b193f90a4229ed51c649294bfbf6","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"            pre.return_value \u003d True"},{"line_number":3356,"context_line":""},{"line_number":3357,"context_line":"            result \u003d self.conn.pre_live_migration("},{"line_number":3358,"context_line":"                    \"ctx\", \"inst\", \"bdi\", \"nw\", \"di\", \"data\")"},{"line_number":3359,"context_line":""},{"line_number":3360,"context_line":"            self.assertTrue(result)"},{"line_number":3361,"context_line":"            pre.assert_called_with(\"ctx\", \"inst\", \"bdi\", \"nw\", \"di\", \"data\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_dd3d632c","line":3358,"range":{"start_line":3358,"start_character":54,"end_line":3358,"end_character":60},"updated":"2016-03-18 13:50:05.000000000","message":"This should be a XenapiLiveMigrateData object too.\n\nI\u0027m probably just over-thinking this, but it would be better if we were just at least sending mock sentinels. This test is really just testing that what we pass in is returned.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e164d420e715b193f90a4229ed51c649294bfbf6","unresolved":false,"context_lines":[{"line_number":3357,"context_line":"            result \u003d self.conn.pre_live_migration("},{"line_number":3358,"context_line":"                    \"ctx\", \"inst\", \"bdi\", \"nw\", \"di\", \"data\")"},{"line_number":3359,"context_line":""},{"line_number":3360,"context_line":"            self.assertTrue(result)"},{"line_number":3361,"context_line":"            pre.assert_called_with(\"ctx\", \"inst\", \"bdi\", \"nw\", \"di\", \"data\")"},{"line_number":3362,"context_line":""},{"line_number":3363,"context_line":"    def test_post_live_migration_at_destination(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_bd0b377c","line":3360,"range":{"start_line":3360,"start_character":12,"end_line":3360,"end_character":35},"updated":"2016-03-18 13:50:05.000000000","message":"Technically, this would be \u0027data\u0027.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"}],"nova/virt/xenapi/driver.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"3e7c2679cb9ca76cac5216357bd64675bc4dab08","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                                                           block_device_info)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":568,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":569,"context_line":"        \"\"\"Preparation live migration."},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        :param block_device_info:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_88731b80","line":568,"updated":"2016-03-16 13:28:37.000000000","message":"UT failure; baseclass requires migrate_data\u003dNone","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2841ae8983492a3fca01e42b230d2945b5141750","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                                                           block_device_info)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":568,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":569,"context_line":"        \"\"\"Preparation live migration."},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        :param block_device_info:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_b2eda1f1","line":568,"in_reply_to":"1af94dfe_88731b80","updated":"2016-03-16 14:08:23.000000000","message":"yeah.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"16015374f1a9ef16d4434e81a64846d9f162f22e","unresolved":false,"context_lines":[{"line_number":2367,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2368,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2369,"context_line":"        if migrate_data is not None:"},{"line_number":2370,"context_line":"            migrate_base_obj \u003d migrate_data_obj.LiveMigrateData"},{"line_number":2371,"context_line":"            if not isinstance(migrate_data, migrate_base_obj):"},{"line_number":2372,"context_line":"                obj \u003d objects.XenapiLiveMigrateData()"},{"line_number":2373,"context_line":"                obj.from_legacy_dict(migrate_data)"},{"line_number":2374,"context_line":"                migrate_data \u003d obj"},{"line_number":2375,"context_line":"        else:"},{"line_number":2376,"context_line":"            migrate_data \u003d objects.XenapiLiveMigrateData()"},{"line_number":2377,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_1fc2a833","line":2374,"range":{"start_line":2370,"start_character":12,"end_line":2374,"end_character":34},"updated":"2016-03-16 11:05:01.000000000","message":"We will get object from manager layer https://github.com/openstack/nova/blob/dae13c5153a3aee25c8ded1cb154cc56a04cd7a2/nova/compute/manager.py#L5201","commit_id":"63e3dcad4d5a4640fd72bca8aca766cb56fc6ed8"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"3e7c2679cb9ca76cac5216357bd64675bc4dab08","unresolved":false,"context_lines":[{"line_number":2340,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2341,"context_line":"        # is required for XenAPI live migration commands"},{"line_number":2342,"context_line":"        migrate_send_data \u003d None"},{"line_number":2343,"context_line":"        if \u0027migrate_send_data\u0027 in migrate_data:"},{"line_number":2344,"context_line":"            migrate_send_data \u003d migrate_data.migrate_send_data"},{"line_number":2345,"context_line":"        if not migrate_send_data:"},{"line_number":2346,"context_line":"            raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_c81b631a","line":2343,"updated":"2016-03-16 13:28:37.000000000","message":"Can we simplify this?\n\nif \u0027migrate_send_data\u0027 not in migrate_data:\n  raise exception.InvalidParameterValue(...)\nmigrate_send_data \u003d dict(migrate_data.migrate_send_data)?","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2841ae8983492a3fca01e42b230d2945b5141750","unresolved":false,"context_lines":[{"line_number":2340,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2341,"context_line":"        # is required for XenAPI live migration commands"},{"line_number":2342,"context_line":"        migrate_send_data \u003d None"},{"line_number":2343,"context_line":"        if \u0027migrate_send_data\u0027 in migrate_data:"},{"line_number":2344,"context_line":"            migrate_send_data \u003d migrate_data.migrate_send_data"},{"line_number":2345,"context_line":"        if not migrate_send_data:"},{"line_number":2346,"context_line":"            raise exception.InvalidParameterValue("}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_92cfc57e","line":2343,"in_reply_to":"1af94dfe_c81b631a","updated":"2016-03-16 14:08:23.000000000","message":"not quite, we need to check if migrate_send_data is not None as well, technically. But thats probably overkill.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"3e7c2679cb9ca76cac5216357bd64675bc4dab08","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_489ab364","line":2358,"updated":"2016-03-16 13:28:37.000000000","message":"Can\u0027t we still use the .get(\u0027sr_uuid_map\u0027, []) syntax?  It\u0027d make this cleaner.\nOf course, if we can\u0027t use .get() then this is OK.\n\nIt could be cleaner as with the above, i.e.\nif \u0027sr_uuid_map\u0027 in migrate_data:\n  sr_uuid_map \u003d migrate_data.sr_uuid_map\n  for sr_uuid in sr_uuid_map:\n...","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8f3a23fd3ab7be8a99660e4c53d3895b4b53af28","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_f5bf135e","line":2358,"in_reply_to":"1af94dfe_15b71fd9","updated":"2016-03-16 14:26:32.000000000","message":"I think getattr is failing because you\u0027re using the generic object in some places and probably leaking it in.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4914533b6bf5252d619c5f182b5573d1e4b72652","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_15b71fd9","line":2358,"in_reply_to":"1af94dfe_15ea7f0f","updated":"2016-03-16 14:22:41.000000000","message":"getattr also seemed to fail, I think thats what we used elsewhere?","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2841ae8983492a3fca01e42b230d2945b5141750","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_729f9950","line":2358,"in_reply_to":"1af94dfe_489ab364","updated":"2016-03-16 14:08:23.000000000","message":"it didn\u0027t work, I think because the base class is not registered, I need to dig into that.\n\nThat simplification fails when the sr_uuid_map is None, possible in the object definition, although not actually possible given the current code.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8fc4c2452aef4d9a29707c1b969d69c637ff4fd2","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_15ea7f0f","line":2358,"in_reply_to":"1af94dfe_729f9950","updated":"2016-03-16 14:17:51.000000000","message":"You can\u0027t use .get because it\u0027s an object without dict compat. The syntax in the above code is correct.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"51fcd864c684c42dca3ddbeed56d4aebd12edb72","unresolved":false,"context_lines":[{"line_number":2355,"context_line":"        # as part of the pre migration callback"},{"line_number":2356,"context_line":"        sr_uuid_map \u003d None"},{"line_number":2357,"context_line":"        if \"sr_uuid_map\" in migrate_data:"},{"line_number":2358,"context_line":"            sr_uuid_map \u003d migrate_data.sr_uuid_map"},{"line_number":2359,"context_line":"        if sr_uuid_map:"},{"line_number":2360,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2361,"context_line":"                # Source and destination SRs have the same UUID, so get the"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_8563fcdb","line":2358,"in_reply_to":"1af94dfe_f5bf135e","updated":"2016-03-16 15:25:43.000000000","message":"hmm, I think its more about not being assigned, we never use the base class, we only have that horrid conversion code.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"afb1522728120feec4ebe8de292f57ba0721fcbb","unresolved":false,"context_lines":[{"line_number":2373,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2374,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2375,"context_line":"        if migrate_data is not None:"},{"line_number":2376,"context_line":"            migrate_base_obj \u003d migrate_data_obj.LiveMigrateData"},{"line_number":2377,"context_line":"            if not isinstance(migrate_data, migrate_base_obj):"},{"line_number":2378,"context_line":"                obj \u003d objects.XenapiLiveMigrateData()"},{"line_number":2379,"context_line":"                obj.from_legacy_dict(migrate_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_32a35151","line":2376,"updated":"2016-03-16 14:12:45.000000000","message":"we shouldn\u0027t need to do this nonsense, now we have \"migrate_data_obj.LiveMigrateData.detect_implementation\" in the compute manager, but it needs a closer look.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8fc4c2452aef4d9a29707c1b969d69c637ff4fd2","unresolved":false,"context_lines":[{"line_number":2373,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2374,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2375,"context_line":"        if migrate_data is not None:"},{"line_number":2376,"context_line":"            migrate_base_obj \u003d migrate_data_obj.LiveMigrateData"},{"line_number":2377,"context_line":"            if not isinstance(migrate_data, migrate_base_obj):"},{"line_number":2378,"context_line":"                obj \u003d objects.XenapiLiveMigrateData()"},{"line_number":2379,"context_line":"                obj.from_legacy_dict(migrate_data)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_350dfb37","line":2376,"in_reply_to":"1af94dfe_32a35151","updated":"2016-03-16 14:17:51.000000000","message":"This is not right. You should never have that base class in your driver.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8fc4c2452aef4d9a29707c1b969d69c637ff4fd2","unresolved":false,"context_lines":[{"line_number":2374,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2375,"context_line":"        if migrate_data is not None:"},{"line_number":2376,"context_line":"            migrate_base_obj \u003d migrate_data_obj.LiveMigrateData"},{"line_number":2377,"context_line":"            if not isinstance(migrate_data, migrate_base_obj):"},{"line_number":2378,"context_line":"                obj \u003d objects.XenapiLiveMigrateData()"},{"line_number":2379,"context_line":"                obj.from_legacy_dict(migrate_data)"},{"line_number":2380,"context_line":"                migrate_data \u003d obj"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_154eff6e","line":2377,"updated":"2016-03-16 14:17:51.000000000","message":"You should always be getting an object at this point. The upper layers should be converting for you.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4914533b6bf5252d619c5f182b5573d1e4b72652","unresolved":false,"context_lines":[{"line_number":2374,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2375,"context_line":"        if migrate_data is not None:"},{"line_number":2376,"context_line":"            migrate_base_obj \u003d migrate_data_obj.LiveMigrateData"},{"line_number":2377,"context_line":"            if not isinstance(migrate_data, migrate_base_obj):"},{"line_number":2378,"context_line":"                obj \u003d objects.XenapiLiveMigrateData()"},{"line_number":2379,"context_line":"                obj.from_legacy_dict(migrate_data)"},{"line_number":2380,"context_line":"                migrate_data \u003d obj"}],"source_content_type":"text/x-python","patch_set":6,"id":"1af94dfe_75c6634a","line":2377,"in_reply_to":"1af94dfe_154eff6e","updated":"2016-03-16 14:22:41.000000000","message":"yeah, this was a dead end, that got in here, and I stupidly wrote tests for.","commit_id":"dd910477ba67d27b85a52c5b98a30a8772913812"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"0fb592af8fde301e1dde88cf9eb5b4b9eab30f67","unresolved":false,"context_lines":[{"line_number":2332,"context_line":"        \"\"\"unpack xapi specific parameters, and call a live migrate command.\"\"\""},{"line_number":2333,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2334,"context_line":"        # is required for XenAPI live migration commands"},{"line_number":2335,"context_line":"        migrate_send_data \u003d None"},{"line_number":2336,"context_line":"        if \u0027migrate_send_data\u0027 in migrate_data:"},{"line_number":2337,"context_line":"            migrate_send_data \u003d migrate_data.migrate_send_data"},{"line_number":2338,"context_line":"        if not migrate_send_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1af94dfe_34066686","line":2335,"updated":"2016-03-17 12:28:43.000000000","message":"I still think this is more verbose than is necessary, but not worth a -1.","commit_id":"4c77b9aa204aa174b9bb8372e452cca007fcff1e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"819a494a9b15ae1b1d38f57e45c1b1a1ad097e17","unresolved":false,"context_lines":[{"line_number":2332,"context_line":"        \"\"\"unpack xapi specific parameters, and call a live migrate command.\"\"\""},{"line_number":2333,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2334,"context_line":"        # is required for XenAPI live migration commands"},{"line_number":2335,"context_line":"        migrate_send_data \u003d None"},{"line_number":2336,"context_line":"        if \u0027migrate_send_data\u0027 in migrate_data:"},{"line_number":2337,"context_line":"            migrate_send_data \u003d migrate_data.migrate_send_data"},{"line_number":2338,"context_line":"        if not migrate_send_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1af94dfe_ff74d736","line":2335,"in_reply_to":"1af94dfe_34066686","updated":"2016-03-17 12:41:08.000000000","message":"this needs to check its present, its not None, and not empty. This way you only have to raise the exception in one place.","commit_id":"4c77b9aa204aa174b9bb8372e452cca007fcff1e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"819a494a9b15ae1b1d38f57e45c1b1a1ad097e17","unresolved":false,"context_lines":[{"line_number":2365,"context_line":""},{"line_number":2366,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2367,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2368,"context_line":"        if migrate_data is None:"},{"line_number":2369,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":2370,"context_line":"                    \u0027XenAPI requires migrate data\u0027)"},{"line_number":2371,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1af94dfe_ffd97723","line":2368,"updated":"2016-03-17 12:41:08.000000000","message":"we might want to drop this, its overkill really.","commit_id":"4c77b9aa204aa174b9bb8372e452cca007fcff1e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb56be50be3dc3b919707076740d5dcaeba48fa0","unresolved":false,"context_lines":[{"line_number":2350,"context_line":""},{"line_number":2351,"context_line":"        # Add destination SR refs for all of the VDIs that we created"},{"line_number":2352,"context_line":"        # as part of the pre migration callback"},{"line_number":2353,"context_line":"        if \u0027pre_live_migration_result\u0027 in migrate_data:"},{"line_number":2354,"context_line":"            pre_migrate_data \u003d migrate_data[\u0027pre_live_migration_result\u0027]"},{"line_number":2355,"context_line":"            sr_uuid_map \u003d pre_migrate_data.get(\u0027sr_uuid_map\u0027, [])"},{"line_number":2356,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2357,"context_line":"                # Source and destination SRs have the same UUID, so get the"},{"line_number":2358,"context_line":"                # reference for the local SR"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_0eafb22a","side":"PARENT","line":2355,"range":{"start_line":2353,"start_character":8,"end_line":2355,"end_character":65},"updated":"2016-03-18 01:22:40.000000000","message":"So, do we not need to worry about live migrating from the legacy (liberty) case? Since the object is handling that here:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/migrate_data.py#L234\n\nAnd here:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/migrate_data.py#L252","commit_id":"38738d79e0774cf71dfff8185330b1f45b64d9fc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6178a666bbfc5b0b47c5032978cd4aa4c4fa5de9","unresolved":false,"context_lines":[{"line_number":2350,"context_line":""},{"line_number":2351,"context_line":"        # Add destination SR refs for all of the VDIs that we created"},{"line_number":2352,"context_line":"        # as part of the pre migration callback"},{"line_number":2353,"context_line":"        if \u0027pre_live_migration_result\u0027 in migrate_data:"},{"line_number":2354,"context_line":"            pre_migrate_data \u003d migrate_data[\u0027pre_live_migration_result\u0027]"},{"line_number":2355,"context_line":"            sr_uuid_map \u003d pre_migrate_data.get(\u0027sr_uuid_map\u0027, [])"},{"line_number":2356,"context_line":"            for sr_uuid in sr_uuid_map:"},{"line_number":2357,"context_line":"                # Source and destination SRs have the same UUID, so get the"},{"line_number":2358,"context_line":"                # reference for the local SR"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_31b12f48","side":"PARENT","line":2355,"range":{"start_line":2353,"start_character":8,"end_line":2355,"end_character":65},"in_reply_to":"1af94dfe_0eafb22a","updated":"2016-03-18 01:26:21.000000000","message":"No, the reason we don\u0027t need to worry about this is that it\u0027s all handled in the rpc api now. This is cruft I didn\u0027t remove when I finished that work on libvirt and in the core.","commit_id":"38738d79e0774cf71dfff8185330b1f45b64d9fc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb56be50be3dc3b919707076740d5dcaeba48fa0","unresolved":false,"context_lines":[{"line_number":2334,"context_line":"                                                    vm_ref, sr_ref)"},{"line_number":2335,"context_line":"        return {vdi: destination_sr_ref for vdi in vm_vdis}"},{"line_number":2336,"context_line":""},{"line_number":2337,"context_line":"    def _call_live_migrate_command(self, command_name, vm_ref, migrate_data):"},{"line_number":2338,"context_line":"        \"\"\"unpack xapi specific parameters, and call a live migrate command.\"\"\""},{"line_number":2339,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2340,"context_line":"        # is required for XenAPI live migration commands"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_3115af3f","line":2337,"range":{"start_line":2337,"start_character":8,"end_line":2337,"end_character":34},"updated":"2016-03-18 01:22:40.000000000","message":"This is called from both live_migrate and check_can_live_migrate_source, and now pre_live_migration sets the sr_uuid_map, does that cause any problems for the check_can_live_migrate_source method, which I think is called before live_migrate (but I could be wrong since there are like 20 methods involved in doing a live migration).","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"176f8f348c948253bf78b4ca78a824d0d96e14e5","unresolved":false,"context_lines":[{"line_number":2334,"context_line":"                                                    vm_ref, sr_ref)"},{"line_number":2335,"context_line":"        return {vdi: destination_sr_ref for vdi in vm_vdis}"},{"line_number":2336,"context_line":""},{"line_number":2337,"context_line":"    def _call_live_migrate_command(self, command_name, vm_ref, migrate_data):"},{"line_number":2338,"context_line":"        \"\"\"unpack xapi specific parameters, and call a live migrate command.\"\"\""},{"line_number":2339,"context_line":"        # NOTE(coreywright): though a nullable object field, migrate_send_data"},{"line_number":2340,"context_line":"        # is required for XenAPI live migration commands"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_1b6085a4","line":2337,"range":{"start_line":2337,"start_character":8,"end_line":2337,"end_character":34},"in_reply_to":"1af94dfe_3115af3f","updated":"2016-03-18 08:52:38.000000000","message":"pre_live_migration always used to set the sr_uuid_map, but that got broken during mitaka.\n\nYou are correctly, basically the check call doesn\u0027t get all the info on the disks. But it will always say yes if it had that info. Totally should fix that at somepoint, but trying to minimize the change.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb56be50be3dc3b919707076740d5dcaeba48fa0","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        # NOTE(coreywright): convert to xmlrpc marshallable type"},{"line_number":2348,"context_line":"        migrate_send_data \u003d dict(migrate_send_data)"},{"line_number":2349,"context_line":""},{"line_number":2350,"context_line":"        destination_sr_ref \u003d migrate_data.destination_sr_ref"},{"line_number":2351,"context_line":"        vdi_map \u003d self._generate_vdi_map(destination_sr_ref, vm_ref)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        # Add destination SR refs for all of the VDIs that we created"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_8e9bc217","line":2350,"range":{"start_line":2350,"start_character":29,"end_line":2350,"end_character":60},"updated":"2016-03-18 01:22:40.000000000","message":"This is a nullable field, are sure it\u0027s set when we get here?","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a272e5813bf92b0bc682873c8e5b81ecf625d615","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        # NOTE(coreywright): convert to xmlrpc marshallable type"},{"line_number":2348,"context_line":"        migrate_send_data \u003d dict(migrate_send_data)"},{"line_number":2349,"context_line":""},{"line_number":2350,"context_line":"        destination_sr_ref \u003d migrate_data.destination_sr_ref"},{"line_number":2351,"context_line":"        vdi_map \u003d self._generate_vdi_map(destination_sr_ref, vm_ref)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        # Add destination SR refs for all of the VDIs that we created"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_7153b7e2","line":2350,"range":{"start_line":2350,"start_character":29,"end_line":2350,"end_character":60},"in_reply_to":"1af94dfe_515ddb13","updated":"2016-03-18 01:31:53.000000000","message":"Yeah, OK, but is it set?","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"176f8f348c948253bf78b4ca78a824d0d96e14e5","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        # NOTE(coreywright): convert to xmlrpc marshallable type"},{"line_number":2348,"context_line":"        migrate_send_data \u003d dict(migrate_send_data)"},{"line_number":2349,"context_line":""},{"line_number":2350,"context_line":"        destination_sr_ref \u003d migrate_data.destination_sr_ref"},{"line_number":2351,"context_line":"        vdi_map \u003d self._generate_vdi_map(destination_sr_ref, vm_ref)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        # Add destination SR refs for all of the VDIs that we created"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_9bd01521","line":2350,"range":{"start_line":2350,"start_character":29,"end_line":2350,"end_character":60},"in_reply_to":"1af94dfe_7153b7e2","updated":"2016-03-18 08:52:38.000000000","message":"So its always set when migrate_send_data is set. Which is a terrible answer, but here is where that happens:\nhttps://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L2200\n\nBoth should always be set when we hit this code path, as we only hit this method for block_migrate, the above is just defensive, largely because no one understands the code path fully. Its nasty try to retro-fit this stuff into the libvirt workflow.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6178a666bbfc5b0b47c5032978cd4aa4c4fa5de9","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        # NOTE(coreywright): convert to xmlrpc marshallable type"},{"line_number":2348,"context_line":"        migrate_send_data \u003d dict(migrate_send_data)"},{"line_number":2349,"context_line":""},{"line_number":2350,"context_line":"        destination_sr_ref \u003d migrate_data.destination_sr_ref"},{"line_number":2351,"context_line":"        vdi_map \u003d self._generate_vdi_map(destination_sr_ref, vm_ref)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        # Add destination SR refs for all of the VDIs that we created"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_515ddb13","line":2350,"range":{"start_line":2350,"start_character":29,"end_line":2350,"end_character":60},"in_reply_to":"1af94dfe_8e9bc217","updated":"2016-03-18 01:26:21.000000000","message":"Nullable and \"set\" are different things.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f8b2fccc1953aecf4f2c9d7358b15af1a5a3951","unresolved":false,"context_lines":[{"line_number":2347,"context_line":"        # NOTE(coreywright): convert to xmlrpc marshallable type"},{"line_number":2348,"context_line":"        migrate_send_data \u003d dict(migrate_send_data)"},{"line_number":2349,"context_line":""},{"line_number":2350,"context_line":"        destination_sr_ref \u003d migrate_data.destination_sr_ref"},{"line_number":2351,"context_line":"        vdi_map \u003d self._generate_vdi_map(destination_sr_ref, vm_ref)"},{"line_number":2352,"context_line":""},{"line_number":2353,"context_line":"        # Add destination SR refs for all of the VDIs that we created"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_5d05d30e","line":2350,"range":{"start_line":2350,"start_character":29,"end_line":2350,"end_character":60},"in_reply_to":"1af94dfe_9bd01521","updated":"2016-03-18 13:47:02.000000000","message":"OK, and if migrate_send_data isn\u0027t set we don\u0027t get here because of the check on L2344 above.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb56be50be3dc3b919707076740d5dcaeba48fa0","unresolved":false,"context_lines":[{"line_number":2371,"context_line":""},{"line_number":2372,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2373,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2374,"context_line":"        if migrate_data is None:"},{"line_number":2375,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":2376,"context_line":"                    \u0027XenAPI requires migrate data\u0027)"},{"line_number":2377,"context_line":""},{"line_number":2378,"context_line":"        migrate_data.sr_uuid_map \u003d self.connect_block_device_volumes("},{"line_number":2379,"context_line":"                block_device_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_4e153ae3","line":2376,"range":{"start_line":2374,"start_character":8,"end_line":2376,"end_character":51},"updated":"2016-03-18 01:22:40.000000000","message":"Is this a case we can hit?\n\nThe libvirt driver just creates one and returns it if not provided:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L6707\n\nBut I think the compute manager will create one here and pass it down:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5202","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"176f8f348c948253bf78b4ca78a824d0d96e14e5","unresolved":false,"context_lines":[{"line_number":2371,"context_line":""},{"line_number":2372,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2373,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2374,"context_line":"        if migrate_data is None:"},{"line_number":2375,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":2376,"context_line":"                    \u0027XenAPI requires migrate data\u0027)"},{"line_number":2377,"context_line":""},{"line_number":2378,"context_line":"        migrate_data.sr_uuid_map \u003d self.connect_block_device_volumes("},{"line_number":2379,"context_line":"                block_device_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_bbd6b1ee","line":2376,"range":{"start_line":2374,"start_character":8,"end_line":2376,"end_character":51},"in_reply_to":"1af94dfe_4e153ae3","updated":"2016-03-18 08:52:38.000000000","message":"You are correct, you can\u0027t ever hit this, if everything goes to plan. It was really just being defensive during the debugging. We could drop this.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f8b2fccc1953aecf4f2c9d7358b15af1a5a3951","unresolved":false,"context_lines":[{"line_number":2371,"context_line":""},{"line_number":2372,"context_line":"    def pre_live_migration(self, context, instance, block_device_info,"},{"line_number":2373,"context_line":"                           network_info, disk_info, migrate_data):"},{"line_number":2374,"context_line":"        if migrate_data is None:"},{"line_number":2375,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":2376,"context_line":"                    \u0027XenAPI requires migrate data\u0027)"},{"line_number":2377,"context_line":""},{"line_number":2378,"context_line":"        migrate_data.sr_uuid_map \u003d self.connect_block_device_volumes("},{"line_number":2379,"context_line":"                block_device_info)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_3d1d6766","line":2376,"range":{"start_line":2374,"start_character":8,"end_line":2376,"end_character":51},"in_reply_to":"1af94dfe_bbd6b1ee","updated":"2016-03-18 13:47:02.000000000","message":"OK, I won\u0027t block on this point.","commit_id":"8e5188af4c5221faaa60b21fa9c35550a1380e9f"}]}
