)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"32cbbcbdb5a518b4345c69ce44860f4a8568216e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"VMware: fix resize of ephemeral disks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Ensure that a resize opertaion will work on ephemeral disks. This"},{"line_number":10,"context_line":"will onlytake place if the new flavor has a epehemeral disk larger"},{"line_number":11,"context_line":"than the current flavor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4b45299fdce59f4c52458d7515d0092b9f3b8db5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_a8289697","line":10,"updated":"2014-09-15 07:25:56.000000000","message":"typos: \"only take\", \"ephemeral\"","commit_id":"a5545abb6c83ad750a52bb88f0083f89f646a691"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0890b4b9f7894fb81cddf6853c364a73ceb0ee3d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"VMware: fix resize of ephemeral disks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Ensure that a resize opertaion will work on ephemeral disks. This"},{"line_number":10,"context_line":"will onlytake place if the new flavor has a epehemeral disk larger"},{"line_number":11,"context_line":"than the current flavor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4b45299fdce59f4c52458d7515d0092b9f3b8db5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa98f980_36040417","line":10,"in_reply_to":"fa98f980_a8289697","updated":"2014-09-15 10:51:54.000000000","message":"Done","commit_id":"a5545abb6c83ad750a52bb88f0083f89f646a691"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"68960b5fa7bf383fe519839ee7d47a82a2c2da28","unresolved":false,"context_lines":[{"line_number":10,"context_line":"flavor or block device mapping require ephemerals then these will be"},{"line_number":11,"context_line":"updated or created. The user is able to go from a flavor with or without"},{"line_number":12,"context_line":"ephemerals to a flavor with or without ephemerals."},{"line_number":13,"context_line":"The resize will honr the configuration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Completes blueprint vmware-ephemeral-disk-support"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"da86d52c_da6c8339","line":13,"updated":"2015-01-31 18:12:20.000000000","message":"s/honr/honor/ or \"honour\" if you wish ;)","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"821fbe1294ee1dc4f9b9748786bb4e7443481bfd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"flavor or block device mapping require ephemerals then these will be"},{"line_number":11,"context_line":"updated or created. The user is able to go from a flavor with or without"},{"line_number":12,"context_line":"ephemerals to a flavor with or without ephemerals."},{"line_number":13,"context_line":"The resize will honr the configuration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Completes blueprint vmware-ephemeral-disk-support"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"da86d52c_497894f2","line":13,"in_reply_to":"da86d52c_da6c8339","updated":"2015-02-02 23:15:47.000000000","message":"Done","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"21413af142c87dc8e60658416b64dee9ff20fc49","unresolved":false,"context_lines":[{"line_number":12,"context_line":"ephemerals to a flavor with or without ephemerals."},{"line_number":13,"context_line":"The resize will honor the configuration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"DocImpact - Resize of ephemeral disks no works for VMware driver."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I4b45299fdce59f4c52458d7515d0092b9f3b8db5"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"da86d52c_90234c04","line":15,"range":{"start_line":15,"start_character":37,"end_line":15,"end_character":38},"updated":"2015-02-18 05:09:51.000000000","message":"s/no/now/","commit_id":"cb0f64af75f818a9453250a4b84c6152d1a76ec5"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f9e2c1a6f6f75da4ff3ef357bc158b0210c8219a","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                mock.call(self._context, self._instance, step\u003d6,"},{"line_number":437,"context_line":"                          total_steps\u003dvmops.RESIZE_TOTAL_STEPS)]"},{"line_number":438,"context_line":"        self.assertEqual(calls,"},{"line_number":439,"context_line":"                         fake_update_instance_progress.call_args_list)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    def test_finish_migration_power_on(self):"},{"line_number":442,"context_line":"        self._test_finish_migration(power_on\u003dTrue, resize_instance\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a961159_fc4107a7","line":439,"updated":"2015-01-13 12:21:02.000000000","message":"fake_update_instance_progress.assert_has_calls(calls)","commit_id":"3ceb65b5c3c0a45bd29513c87426c809f5f05269"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"7a80e97380aa2d5ba87477566d412ad9ca8c470b","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                          total_steps\u003dvmops.RESIZE_TOTAL_STEPS),"},{"line_number":442,"context_line":"                mock.call(self._context, self._instance, step\u003d6,"},{"line_number":443,"context_line":"                          total_steps\u003dvmops.RESIZE_TOTAL_STEPS)]"},{"line_number":444,"context_line":"        fake_update_instance_progress.iassert_has_calls(calls)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"    def test_finish_migration_power_on(self):"},{"line_number":447,"context_line":"        self._test_finish_migration(power_on\u003dTrue, resize_instance\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_0804ed13","line":444,"updated":"2015-02-09 14:49:08.000000000","message":"typo? assert_has_calls instead of iassert_has_calls?","commit_id":"77fd2d423e5729289569c44134ab13de8f10e5d5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d4f35e536ea99e4fb31b8957aeafa7f3932aaa1e","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                          total_steps\u003dvmops.RESIZE_TOTAL_STEPS),"},{"line_number":442,"context_line":"                mock.call(self._context, self._instance, step\u003d6,"},{"line_number":443,"context_line":"                          total_steps\u003dvmops.RESIZE_TOTAL_STEPS)]"},{"line_number":444,"context_line":"        fake_update_instance_progress.iassert_has_calls(calls)"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"    def test_finish_migration_power_on(self):"},{"line_number":447,"context_line":"        self._test_finish_migration(power_on\u003dTrue, resize_instance\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_954d55c7","line":444,"in_reply_to":"da86d52c_0804ed13","updated":"2015-02-09 16:00:16.000000000","message":"Done","commit_id":"77fd2d423e5729289569c44134ab13de8f10e5d5"}],"nova/tests/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9515e42c643ca690a65b669843223624ed2ec56f","unresolved":false,"context_lines":[{"line_number":2550,"context_line":"                               ephemeral\u003d0):"},{"line_number":2551,"context_line":"        \"\"\"Tests the finish_migration method on VC Driver.\"\"\""},{"line_number":2552,"context_line":"        # setup the test instance in the database"},{"line_number":2553,"context_line":"        self._create_vm(ephemeral\u003dephemeral)"},{"line_number":2554,"context_line":"        if resize_instance:"},{"line_number":2555,"context_line":"            self.instance.system_metadata \u003d {"},{"line_number":2556,"context_line":"                \u0027old_instance_type_root_gb\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_8d5b7d86","line":2553,"updated":"2014-10-21 14:38:39.000000000","message":"bit confusing, that should be the old pre-resize size, so it should be 1 gb, not 50? or am I miss-reading that.","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cf4db599c5ac039679d264e2581a80a144d4394f","unresolved":false,"context_lines":[{"line_number":2550,"context_line":"                               ephemeral\u003d0):"},{"line_number":2551,"context_line":"        \"\"\"Tests the finish_migration method on VC Driver.\"\"\""},{"line_number":2552,"context_line":"        # setup the test instance in the database"},{"line_number":2553,"context_line":"        self._create_vm(ephemeral\u003dephemeral)"},{"line_number":2554,"context_line":"        if resize_instance:"},{"line_number":2555,"context_line":"            self.instance.system_metadata \u003d {"},{"line_number":2556,"context_line":"                \u0027old_instance_type_root_gb\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_7b33f4aa","line":2553,"in_reply_to":"9aa7fdbe_8d5b7d86","updated":"2014-10-26 16:09:35.000000000","message":"Done","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"}],"nova/tests/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6a3e6b2c9aa16cb1757a9cdb4a208ed1dc05e75c","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            instance_type \u003d stubs._fake_flavor_get(None, \u00271\u0027)"},{"line_number":431,"context_line":"            metadata \u003d {}"},{"line_number":432,"context_line":"            flavors.save_flavor_info(metadata, instance_type, \u0027old_\u0027)"},{"line_number":433,"context_line":"            self._instance.system_metadata \u003d metadata"},{"line_number":434,"context_line":"        datastore \u003d ds_util.Datastore(ref\u003d\u0027fake-ref\u0027, name\u003d\u0027fake\u0027)"},{"line_number":435,"context_line":"        dc_info \u003d vmops.DcInfo(ref\u003d\u0027fake_ref\u0027, name\u003d\u0027fake\u0027,"},{"line_number":436,"context_line":"                               vmFolder\u003d\u0027fake_folder\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_a72048b1","line":433,"updated":"2014-11-12 15:59:56.000000000","message":"Can you use set_flavor() here, especially since you\u0027re using get_flavor() in the actual code? That will isolate you from the upcoming flavor migration.","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"365fc2cf727ffee0df191467c5e88f9446974e02","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            instance_type \u003d stubs._fake_flavor_get(None, \u00271\u0027)"},{"line_number":431,"context_line":"            metadata \u003d {}"},{"line_number":432,"context_line":"            flavors.save_flavor_info(metadata, instance_type, \u0027old_\u0027)"},{"line_number":433,"context_line":"            self._instance.system_metadata \u003d metadata"},{"line_number":434,"context_line":"        datastore \u003d ds_util.Datastore(ref\u003d\u0027fake-ref\u0027, name\u003d\u0027fake\u0027)"},{"line_number":435,"context_line":"        dc_info \u003d vmops.DcInfo(ref\u003d\u0027fake_ref\u0027, name\u003d\u0027fake\u0027,"},{"line_number":436,"context_line":"                               vmFolder\u003d\u0027fake_folder\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_ad1bc71a","line":433,"in_reply_to":"5a890539_a72048b1","updated":"2014-11-12 16:32:00.000000000","message":"this could be problematic as the flavors we are using are not really flavor objects. can i change that in a separate patch set? i think that there are a quite a lot of changes related so maybe doing it in an isolated patch will be better","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"f9e2c1a6f6f75da4ff3ef357bc158b0210c8219a","unresolved":false,"context_lines":[{"line_number":1538,"context_line":"    for device in hardware_devices:"},{"line_number":1539,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1540,"context_line":"            if device.backing.__class__.__name__ \u003d\u003d \\"},{"line_number":1541,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\":"},{"line_number":1542,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1543,"context_line":"                    devices.append(device)"},{"line_number":1544,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a961159_fc6f4726","line":1541,"updated":"2015-01-13 12:21:02.000000000","message":"can you use instead:\n\n    if (device.backing.__class__.__name__ \u003d\u003d \n           \"VirtualDiskFlatVer2BackingInfo\"):","commit_id":"3ceb65b5c3c0a45bd29513c87426c809f5f05269"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"68960b5fa7bf383fe519839ee7d47a82a2c2da28","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"            \"config.hardware.device\")"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"    if hardware_devices.__class__.__name__ \u003d\u003d \"ArrayOfVirtualDevice\":"},{"line_number":1467,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"    for device in hardware_devices:"},{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_7a655744","line":1467,"updated":"2015-01-31 18:12:20.000000000","message":"ewww.","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d0822fd89b181536a29d93414bd9d87a7942153e","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"            \"config.hardware.device\")"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"    if hardware_devices.__class__.__name__ \u003d\u003d \"ArrayOfVirtualDevice\":"},{"line_number":1467,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"    for device in hardware_devices:"},{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_9a03d50e","line":1467,"in_reply_to":"da86d52c_7a655744","updated":"2015-02-02 09:44:50.000000000","message":"The problem here is that get_dynamic_property returns a vSphere Managed Object Reference to potentially any vSphere created type. MoRefs contain a reference to their underlying object, but in a field which is dependent on the type. It\u0027s nasty, but it is what it is.","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"821fbe1294ee1dc4f9b9748786bb4e7443481bfd","unresolved":false,"context_lines":[{"line_number":1464,"context_line":"            \"config.hardware.device\")"},{"line_number":1465,"context_line":""},{"line_number":1466,"context_line":"    if hardware_devices.__class__.__name__ \u003d\u003d \"ArrayOfVirtualDevice\":"},{"line_number":1467,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"    for device in hardware_devices:"},{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_89c8cc23","line":1467,"in_reply_to":"da86d52c_9a03d50e","updated":"2015-02-02 23:15:47.000000000","message":"Yes, sadly this is what we have at the moment","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"68960b5fa7bf383fe519839ee7d47a82a2c2da28","unresolved":false,"context_lines":[{"line_number":1469,"context_line":"    for device in hardware_devices:"},{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1471,"context_line":"            if (device.backing.__class__.__name__ \u003d\u003d"},{"line_number":1472,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\"):"},{"line_number":1473,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1474,"context_line":"                    devices.append(device)"},{"line_number":1475,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_ba5fcf71","line":1472,"updated":"2015-01-31 18:12:20.000000000","message":"More ewwww. Is it not possible to use isinstance(device, something.VirtualDisk) instead of comparing class name strings?","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d0822fd89b181536a29d93414bd9d87a7942153e","unresolved":false,"context_lines":[{"line_number":1469,"context_line":"    for device in hardware_devices:"},{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1471,"context_line":"            if (device.backing.__class__.__name__ \u003d\u003d"},{"line_number":1472,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\"):"},{"line_number":1473,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1474,"context_line":"                    devices.append(device)"},{"line_number":1475,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_da09cd96","line":1472,"in_reply_to":"da86d52c_ba5fcf71","updated":"2015-02-02 09:44:50.000000000","message":"Not really. \u0027Something\u0027 is dependent on the SOAP library which generated it. We could potentially abstract that, but it wouldn\u0027t greatly improve clarity.","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"68960b5fa7bf383fe519839ee7d47a82a2c2da28","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1471,"context_line":"            if (device.backing.__class__.__name__ \u003d\u003d"},{"line_number":1472,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\"):"},{"line_number":1473,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1474,"context_line":"                    devices.append(device)"},{"line_number":1475,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_da53a36a","line":1473,"updated":"2015-01-31 18:12:20.000000000","message":"So this is the only way to tell if a backing device is ephemeral? By seeing if a hard-coded \"ephemeral\" string is in the filename? :(","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"821fbe1294ee1dc4f9b9748786bb4e7443481bfd","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1471,"context_line":"            if (device.backing.__class__.__name__ \u003d\u003d"},{"line_number":1472,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\"):"},{"line_number":1473,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1474,"context_line":"                    devices.append(device)"},{"line_number":1475,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_69f8f849","line":1473,"in_reply_to":"da86d52c_0edde670","updated":"2015-02-02 23:15:47.000000000","message":"When we create the disks we give them the name ephemera1. That enables us to do that. Using the description does not help as the VC overwrites that.\nMaybe in later versions we can make use of tagging. I am not sure that is relevant at the moent","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d0822fd89b181536a29d93414bd9d87a7942153e","unresolved":false,"context_lines":[{"line_number":1470,"context_line":"        if device.__class__.__name__ \u003d\u003d \"VirtualDisk\":"},{"line_number":1471,"context_line":"            if (device.backing.__class__.__name__ \u003d\u003d"},{"line_number":1472,"context_line":"                    \"VirtualDiskFlatVer2BackingInfo\"):"},{"line_number":1473,"context_line":"                if \u0027ephemeral\u0027 in device.backing.fileName:"},{"line_number":1474,"context_line":"                    devices.append(device)"},{"line_number":1475,"context_line":"    return devices"}],"source_content_type":"text/x-python","patch_set":33,"id":"da86d52c_0edde670","line":1473,"in_reply_to":"da86d52c_da53a36a","updated":"2015-02-02 09:44:50.000000000","message":"You could potentially add it to the Description of the VirtualDevice, but that wouldn\u0027t be much nicer. Surely it would be best to get this from Nova?","commit_id":"9b52af8ec0140aab0aa15e8b1bc51ae979e714ec"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"32cbbcbdb5a518b4345c69ce44860f4a8568216e","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                self._extend_virtual_disk(instance, root_disk_in_kb, vmdk_path,"},{"line_number":1117,"context_line":"                                          dc_info.ref)"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"            # Resize the ephemeral disk (if iexists and larger)"},{"line_number":1120,"context_line":"            if resize_ephemeral:"},{"line_number":1121,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1122,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_a88c16d8","line":1119,"updated":"2014-09-15 07:25:56.000000000","message":"typo: exists","commit_id":"a5545abb6c83ad750a52bb88f0083f89f646a691"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"0890b4b9f7894fb81cddf6853c364a73ceb0ee3d","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                self._extend_virtual_disk(instance, root_disk_in_kb, vmdk_path,"},{"line_number":1117,"context_line":"                                          dc_info.ref)"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"            # Resize the ephemeral disk (if iexists and larger)"},{"line_number":1120,"context_line":"            if resize_ephemeral:"},{"line_number":1121,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1122,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_56ffc801","line":1119,"in_reply_to":"fa98f980_a88c16d8","updated":"2014-09-15 10:51:54.000000000","message":"Done","commit_id":"a5545abb6c83ad750a52bb88f0083f89f646a691"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4d68e298cb715f1b0d68e16fd2d97a316fd09471","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"        off the instance before the end."},{"line_number":1009,"context_line":"        \"\"\""},{"line_number":1010,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":1011,"context_line":"        for kind in (\u0027root_gb\u0027, \u0027ephemeral_gb\u0027):"},{"line_number":1012,"context_line":"            if flavor[kind] \u003c instance[kind]:"},{"line_number":1013,"context_line":"                reason \u003d _(\"Unable to shrink disk.\")"},{"line_number":1014,"context_line":"                raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_f994c045","line":1011,"updated":"2014-10-13 13:47:58.000000000","message":"maybe disk_type rather than \"kind\"? but its a niggle.","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3934cc7063793d8b78dfd947652ec2ece9d6436","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"        off the instance before the end."},{"line_number":1009,"context_line":"        \"\"\""},{"line_number":1010,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":1011,"context_line":"        for kind in (\u0027root_gb\u0027, \u0027ephemeral_gb\u0027):"},{"line_number":1012,"context_line":"            if flavor[kind] \u003c instance[kind]:"},{"line_number":1013,"context_line":"                reason \u003d _(\"Unable to shrink disk.\")"},{"line_number":1014,"context_line":"                raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_7b448a74","line":1011,"in_reply_to":"baa201ad_f994c045","updated":"2014-10-19 12:17:50.000000000","message":"Done","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"c6a32f41e09013980e56e4ddcd46c6fc41c4f529","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"            # The original root disk size may be zero. This is the case where"},{"line_number":1100,"context_line":"            # the root disk is created from the original image."},{"line_number":1101,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1102,"context_line":"            # We do not extend a ephemerak disk that does not exist"},{"line_number":1103,"context_line":"            resize_ephemeral \u003d (old_ephemeral_gb and"},{"line_number":1104,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1105,"context_line":"            # Retrieve datastore and dc_info if necessary"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_702dec94","line":1102,"updated":"2014-10-06 13:14:52.000000000","message":"typo: ephemeral","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3934cc7063793d8b78dfd947652ec2ece9d6436","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"            # The original root disk size may be zero. This is the case where"},{"line_number":1100,"context_line":"            # the root disk is created from the original image."},{"line_number":1101,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1102,"context_line":"            # We do not extend a ephemerak disk that does not exist"},{"line_number":1103,"context_line":"            resize_ephemeral \u003d (old_ephemeral_gb and"},{"line_number":1104,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1105,"context_line":"            # Retrieve datastore and dc_info if necessary"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_db5ad64f","line":1102,"in_reply_to":"baa201ad_702dec94","updated":"2014-10-19 12:17:50.000000000","message":"Done","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4d68e298cb715f1b0d68e16fd2d97a316fd09471","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"            # the root disk is created from the original image."},{"line_number":1101,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1102,"context_line":"            # We do not extend a ephemerak disk that does not exist"},{"line_number":1103,"context_line":"            resize_ephemeral \u003d (old_ephemeral_gb and"},{"line_number":1104,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1105,"context_line":"            # Retrieve datastore and dc_info if necessary"},{"line_number":1106,"context_line":"            if resize_root or resize_ephemeral:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_b95a3881","line":1103,"updated":"2014-10-13 13:47:58.000000000","message":"should_resize_ephemeral could be a function that hides this complexity, to make this (already large) method easier to read.","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3934cc7063793d8b78dfd947652ec2ece9d6436","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"            # the root disk is created from the original image."},{"line_number":1101,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1102,"context_line":"            # We do not extend a ephemerak disk that does not exist"},{"line_number":1103,"context_line":"            resize_ephemeral \u003d (old_ephemeral_gb and"},{"line_number":1104,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1105,"context_line":"            # Retrieve datastore and dc_info if necessary"},{"line_number":1106,"context_line":"            if resize_root or resize_ephemeral:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_3b31220c","line":1103,"in_reply_to":"baa201ad_b95a3881","updated":"2014-10-19 12:17:50.000000000","message":"Done","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4d68e298cb715f1b0d68e16fd2d97a316fd09471","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"            if resize_root or resize_ephemeral:"},{"line_number":1107,"context_line":"                datastore \u003d ds_util.get_datastore(self._session,"},{"line_number":1108,"context_line":"                    self._cluster, datastore_regex\u003dself._datastore_regex)"},{"line_number":1109,"context_line":"                dc_info \u003d self.get_datacenter_ref_and_name(datastore.ref)"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"            # Resize the disk (if larger)"},{"line_number":1112,"context_line":"            if resize_root:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_b9e8787d","line":1109,"updated":"2014-10-13 13:47:58.000000000","message":"ds_util could have a \"get_datastore_ref\", and that would really make this code less intertwined.\n\nYou just have a ds_ref you can pass into _extend_virtual_disk.","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3934cc7063793d8b78dfd947652ec2ece9d6436","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"            if resize_root or resize_ephemeral:"},{"line_number":1107,"context_line":"                datastore \u003d ds_util.get_datastore(self._session,"},{"line_number":1108,"context_line":"                    self._cluster, datastore_regex\u003dself._datastore_regex)"},{"line_number":1109,"context_line":"                dc_info \u003d self.get_datacenter_ref_and_name(datastore.ref)"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"            # Resize the disk (if larger)"},{"line_number":1112,"context_line":"            if resize_root:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_3b184284","line":1109,"in_reply_to":"baa201ad_b9e8787d","updated":"2014-10-19 12:17:50.000000000","message":"we need the datacenter moref here and not the datastore moref. i agree that the code is a little clunky","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4d68e298cb715f1b0d68e16fd2d97a316fd09471","unresolved":false,"context_lines":[{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"            # Resize the ephemeral disk (if exists and larger)"},{"line_number":1120,"context_line":"            if resize_ephemeral:"},{"line_number":1121,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1122,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1123,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1124,"context_line":"                                                 \u0027ephemeral_disk.vmdk\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_39c4883f","line":1121,"updated":"2014-10-13 13:47:58.000000000","message":"I think pushing the multiplication down into _extent_virtual_disk will help you here.","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b3934cc7063793d8b78dfd947652ec2ece9d6436","unresolved":false,"context_lines":[{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"            # Resize the ephemeral disk (if exists and larger)"},{"line_number":1120,"context_line":"            if resize_ephemeral:"},{"line_number":1121,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1122,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1123,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1124,"context_line":"                                                 \u0027ephemeral_disk.vmdk\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_5b1d0673","line":1121,"in_reply_to":"baa201ad_39c4883f","updated":"2014-10-19 12:17:50.000000000","message":"the extend expects to get the size in KB. I think that will be a lot of changes to add here - this will also have implications on the root disk management.\n\nif you want we can do this in a patch above.","commit_id":"d5f861ff139d4f32edd043f3ad0333e5bb1e9b6c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"92673d6557dc93b3584ddf0d083bd70b8c5428e2","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"        \"\"\""},{"line_number":1021,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":1022,"context_line":"        for disk_type in (\u0027root_gb\u0027, \u0027ephemeral_gb\u0027):"},{"line_number":1023,"context_line":"            if flavor[disk_type] \u003c instance[disk_type]:"},{"line_number":1024,"context_line":"                reason \u003d _(\"Unable to shrink disk.\")"},{"line_number":1025,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":1026,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_cdcae54e","line":1023,"updated":"2014-10-21 14:34:24.000000000","message":"We seem to be missing the extra test for this bit of the change?","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cf4db599c5ac039679d264e2581a80a144d4394f","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"        \"\"\""},{"line_number":1021,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":1022,"context_line":"        for disk_type in (\u0027root_gb\u0027, \u0027ephemeral_gb\u0027):"},{"line_number":1023,"context_line":"            if flavor[disk_type] \u003c instance[disk_type]:"},{"line_number":1024,"context_line":"                reason \u003d _(\"Unable to shrink disk.\")"},{"line_number":1025,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":1026,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_9b0df8ea","line":1023,"in_reply_to":"9aa7fdbe_cdcae54e","updated":"2014-10-26 16:09:35.000000000","message":"correct - will add a test","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4b349c222a98fa6fb2cbe4e616d6ddef39277dce","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"        if power_on:"},{"line_number":1092,"context_line":"            vm_util.power_on_instance(self._session, instance)"},{"line_number":1093,"context_line":""},{"line_number":1094,"context_line":"    def _resize_disks(self, instance):"},{"line_number":1095,"context_line":"        old_root_gb \u003d int("},{"line_number":1096,"context_line":"            instance.system_metadata[\u0027old_instance_type_root_gb\u0027])"},{"line_number":1097,"context_line":"        old_ephemeral_gb \u003d int("}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_261b8b1c","line":1094,"updated":"2014-10-21 19:04:04.000000000","message":"I think this is a really poorly-named function. It sounds like it does something (like, resize some disks) but it doesn\u0027t. Further, I\u0027m not sure breaking it out like this really improves readability of the method below...","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cf4db599c5ac039679d264e2581a80a144d4394f","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"        if power_on:"},{"line_number":1092,"context_line":"            vm_util.power_on_instance(self._session, instance)"},{"line_number":1093,"context_line":""},{"line_number":1094,"context_line":"    def _resize_disks(self, instance):"},{"line_number":1095,"context_line":"        old_root_gb \u003d int("},{"line_number":1096,"context_line":"            instance.system_metadata[\u0027old_instance_type_root_gb\u0027])"},{"line_number":1097,"context_line":"        old_ephemeral_gb \u003d int("}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_a5e61fae","line":1094,"in_reply_to":"9aa7fdbe_261b8b1c","updated":"2014-10-26 16:09:35.000000000","message":"Done","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4b349c222a98fa6fb2cbe4e616d6ddef39277dce","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"        old_root_gb \u003d int("},{"line_number":1096,"context_line":"            instance.system_metadata[\u0027old_instance_type_root_gb\u0027])"},{"line_number":1097,"context_line":"        old_ephemeral_gb \u003d int("},{"line_number":1098,"context_line":"            instance.system_metadata[\u0027old_instance_type_ephemeral_gb\u0027])"},{"line_number":1099,"context_line":"        # The original root disk size may be zero. This is the case where"},{"line_number":1100,"context_line":"        # the root disk is created from the original image."},{"line_number":1101,"context_line":"        resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_46688f87","line":1098,"updated":"2014-10-21 19:04:04.000000000","message":"This is a layering violation. This should be:\n\nold_flavor \u003d instance.get_flavor(\u0027old\u0027)","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cf4db599c5ac039679d264e2581a80a144d4394f","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"        old_root_gb \u003d int("},{"line_number":1096,"context_line":"            instance.system_metadata[\u0027old_instance_type_root_gb\u0027])"},{"line_number":1097,"context_line":"        old_ephemeral_gb \u003d int("},{"line_number":1098,"context_line":"            instance.system_metadata[\u0027old_instance_type_ephemeral_gb\u0027])"},{"line_number":1099,"context_line":"        # The original root disk size may be zero. This is the case where"},{"line_number":1100,"context_line":"        # the root disk is created from the original image."},{"line_number":1101,"context_line":"        resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_458e53d1","line":1098,"in_reply_to":"9aa7fdbe_46688f87","updated":"2014-10-26 16:09:35.000000000","message":"Done","commit_id":"2d7e95edf40c6ee29b100258ee2e8015eee4e268"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6a3e6b2c9aa16cb1757a9cdb4a208ed1dc05e75c","unresolved":false,"context_lines":[{"line_number":1132,"context_line":"            old_ephemeral_gb \u003d old_flavor[\u0027ephemeral_gb\u0027]"},{"line_number":1133,"context_line":"            # The original root disk size may be zero. This is the case where"},{"line_number":1134,"context_line":"            # the root disk is created from the original image."},{"line_number":1135,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1136,"context_line":"            # We do not extend a ephemeral disk that does not exist"},{"line_number":1137,"context_line":"            resize_ephemeral \u003d (block_device_info is None and"},{"line_number":1138,"context_line":"                                old_ephemeral_gb and"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_67eca090","line":1135,"updated":"2014-11-12 15:59:56.000000000","message":"instance is an object here, right?","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"365fc2cf727ffee0df191467c5e88f9446974e02","unresolved":false,"context_lines":[{"line_number":1132,"context_line":"            old_ephemeral_gb \u003d old_flavor[\u0027ephemeral_gb\u0027]"},{"line_number":1133,"context_line":"            # The original root disk size may be zero. This is the case where"},{"line_number":1134,"context_line":"            # the root disk is created from the original image."},{"line_number":1135,"context_line":"            resize_root \u003d instance[\u0027root_gb\u0027] \u003e old_root_gb"},{"line_number":1136,"context_line":"            # We do not extend a ephemeral disk that does not exist"},{"line_number":1137,"context_line":"            resize_ephemeral \u003d (block_device_info is None and"},{"line_number":1138,"context_line":"                                old_ephemeral_gb and"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_6d0d5f37","line":1135,"in_reply_to":"5a890539_67eca090","updated":"2014-11-12 16:32:00.000000000","message":"Done","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6a3e6b2c9aa16cb1757a9cdb4a208ed1dc05e75c","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"            # We do not extend a ephemeral disk that does not exist"},{"line_number":1137,"context_line":"            resize_ephemeral \u003d (block_device_info is None and"},{"line_number":1138,"context_line":"                                old_ephemeral_gb and"},{"line_number":1139,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"            # Retrieve datastore and dc_info if necessary"},{"line_number":1142,"context_line":"            if resize_root or resize_ephemeral:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_87db4cec","line":1139,"updated":"2014-11-12 15:59:56.000000000","message":"instance is an object here, right?","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"365fc2cf727ffee0df191467c5e88f9446974e02","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"            # We do not extend a ephemeral disk that does not exist"},{"line_number":1137,"context_line":"            resize_ephemeral \u003d (block_device_info is None and"},{"line_number":1138,"context_line":"                                old_ephemeral_gb and"},{"line_number":1139,"context_line":"                                instance[\u0027ephemeral_gb\u0027] \u003e old_ephemeral_gb)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"            # Retrieve datastore and dc_info if necessary"},{"line_number":1142,"context_line":"            if resize_root or resize_ephemeral:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_8d136b5b","line":1139,"in_reply_to":"5a890539_87db4cec","updated":"2014-11-12 16:32:00.000000000","message":"Done","commit_id":"84a7a5f33685eab527052037813c5a76963c2f02"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8cef8682c90408329acfe5db1b4a1abb1d3a0e2d","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            ephemerals \u003d driver.block_device_info_get_ephemerals(bdi)"},{"line_number":1037,"context_line":"            for eph in ephemerals:"},{"line_number":1038,"context_line":"                ephemeral_size +\u003d eph[\u0027size\u0027]"},{"line_number":1039,"context_line":"        elif instance.ephemeral_gb:"},{"line_number":1040,"context_line":"            ephemeral_size \u003d instance.ephemeral_gb"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"        # Checks if the migration needs a disk resize down."}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_264cb59d","line":1039,"updated":"2014-11-26 13:26:47.000000000","message":"Same as dependent change, I think there is the same bug here.\n\nShould it not be if ephemerals is empty that we fall back to this also?","commit_id":"7671be4a4acd469ba7d795ae9293f67c23f0c3ed"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"782c0817d4461629419673fd8760a9e74777d141","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            ephemerals \u003d driver.block_device_info_get_ephemerals(bdi)"},{"line_number":1037,"context_line":"            for eph in ephemerals:"},{"line_number":1038,"context_line":"                ephemeral_size +\u003d eph[\u0027size\u0027]"},{"line_number":1039,"context_line":"        elif instance.ephemeral_gb:"},{"line_number":1040,"context_line":"            ephemeral_size \u003d instance.ephemeral_gb"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"        # Checks if the migration needs a disk resize down."}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_e400e5ac","line":1039,"in_reply_to":"5a890539_264cb59d","updated":"2014-11-26 14:08:12.000000000","message":"Done","commit_id":"7671be4a4acd469ba7d795ae9293f67c23f0c3ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8cef8682c90408329acfe5db1b4a1abb1d3a0e2d","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1155,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1156,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1157,"context_line":"                                                 \u0027ephemeral_disk.vmdk\u0027))"},{"line_number":1158,"context_line":"                self._extend_virtual_disk(instance, ephemeral_disk_in_kb, path,"},{"line_number":1159,"context_line":"                                          dc_info.ref)"},{"line_number":1160,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_8613a963","line":1157,"updated":"2014-11-26 13:26:47.000000000","message":"did you not call that:\nfilename \u003d \u0027ephemeral_0_%d.vmdk\u0027 % instance.ephemeral_gb","commit_id":"7671be4a4acd469ba7d795ae9293f67c23f0c3ed"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"782c0817d4461629419673fd8760a9e74777d141","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1155,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1156,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1157,"context_line":"                                                 \u0027ephemeral_disk.vmdk\u0027))"},{"line_number":1158,"context_line":"                self._extend_virtual_disk(instance, ephemeral_disk_in_kb, path,"},{"line_number":1159,"context_line":"                                          dc_info.ref)"},{"line_number":1160,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_a4fa5dba","line":1157,"in_reply_to":"5a890539_8613a963","updated":"2014-11-26 14:08:12.000000000","message":"No, those are the names for the ephemerals created by the BDM flow. This is the for ephemeral if there are no BDMS.","commit_id":"7671be4a4acd469ba7d795ae9293f67c23f0c3ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"252445fbd4bff2a9f092eb7e1070db219fefb4f7","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"            # We do not extend a ephemeral disk that does not exist"},{"line_number":1138,"context_line":"            resize_ephemeral \u003d (block_device_info is None and"},{"line_number":1139,"context_line":"                                old_ephemeral_gb and"},{"line_number":1140,"context_line":"                                instance.ephemeral_gb \u003e old_ephemeral_gb)"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"            # Retrieve datastore and dc_info if necessary"},{"line_number":1143,"context_line":"            if resize_root or resize_ephemeral:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_dae4a23d","line":1140,"updated":"2014-11-26 14:54:01.000000000","message":"If you have a root volume attached, but no epehermal bdms, you might still need to do the resize right?\n\nline 1044 seems to deal with this calculation differently. Maybe share some logic with that line?","commit_id":"7eef6b59a170b9ea51e8772423eae6933a741909"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"252445fbd4bff2a9f092eb7e1070db219fefb4f7","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                ephemeral_disk_in_kb \u003d instance[\u0027ephemeral_gb\u0027] * units.Mi"},{"line_number":1159,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1160,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1161,"context_line":"                                                 \u0027ephemeral_disk.vmdk\u0027))"},{"line_number":1162,"context_line":"                self._extend_virtual_disk(instance, ephemeral_disk_in_kb, path,"},{"line_number":1163,"context_line":"                                          dc_info.ref)"},{"line_number":1164,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_3a792693","line":1161,"updated":"2014-11-26 14:54:01.000000000","message":"look at line 459 in there:\nhttps://review.openstack.org/#/c/109432/26/nova/virt/vmwareapi/vmops.py,cm\n\nI think this is the wrong name? Surely the name should be generated in some helper method you share between the two places you need to generate the name?","commit_id":"7eef6b59a170b9ea51e8772423eae6933a741909"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f49e0bb3ae5b107c8216eec010a89365b5f79a6d","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                    ds_path \u003d ds_util.DatastorePath.parse(file)"},{"line_number":188,"context_line":"                    self._delete_datastore_file(ds_path, dc_ref)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        LOG.debug(\"Extended virtual disk\")"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _delete_datastore_file(self, datastore_path, dc_ref):"},{"line_number":193,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_bcc42d42","line":190,"updated":"2014-11-26 17:40:38.000000000","message":"Erm, but you call this for root and ephemeral?","commit_id":"7b2a40c24d2d7bbb2f6b1f738244f6c6ca5f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f49e0bb3ae5b107c8216eec010a89365b5f79a6d","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"                for eph in ephemerals:"},{"line_number":1147,"context_line":"                    # We do not need to resize block device ephemerals"},{"line_number":1148,"context_line":"                    break"},{"line_number":1149,"context_line":"            if not ephemerals and instance.ephemeral_gb:"},{"line_number":1150,"context_line":"                resize_ephemeral \u003d (old_ephemeral_gb and"},{"line_number":1151,"context_line":"                                    instance.ephemeral_gb \u003e old_ephemeral_gb)"},{"line_number":1152,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_fcc23552","line":1149,"updated":"2014-11-26 17:40:38.000000000","message":"I think you will want to pull all this logic out into a helper method, and have a unit test for it.","commit_id":"7b2a40c24d2d7bbb2f6b1f738244f6c6ca5f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f49e0bb3ae5b107c8216eec010a89365b5f79a6d","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"                root_disk_in_kb \u003d instance[\u0027root_gb\u0027] * units.Mi"},{"line_number":1162,"context_line":"                vmdk_path \u003d vm_util.get_vmdk_path(self._session, vm_ref,"},{"line_number":1163,"context_line":"                                                  instance)"},{"line_number":1164,"context_line":"                self._extend_virtual_disk(instance, root_disk_in_kb, vmdk_path,"},{"line_number":1165,"context_line":"                                          dc_info.ref)"},{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"            # Resize the ephemeral disk (if exists and larger)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_9ce4d10f","line":1164,"updated":"2014-11-26 17:40:38.000000000","message":"I think these two chunks of resize logic should really be pulled out into helper functions.","commit_id":"7b2a40c24d2d7bbb2f6b1f738244f6c6ca5f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f49e0bb3ae5b107c8216eec010a89365b5f79a6d","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"                                                    instance[\u0027ephemeral_gb\u0027])"},{"line_number":1172,"context_line":"                path \u003d str(ds_util.DatastorePath(datastore.name,"},{"line_number":1173,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1174,"context_line":"                                                 filename))"},{"line_number":1175,"context_line":"                self._extend_virtual_disk(instance, ephemeral_disk_in_kb, path,"},{"line_number":1176,"context_line":"                                          dc_info.ref)"},{"line_number":1177,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_7c9c855e","line":1174,"updated":"2014-11-26 17:40:38.000000000","message":"I wonder if _get_ephemeral_name and the above logic should be in vm_util, so you match the above logic better?","commit_id":"7b2a40c24d2d7bbb2f6b1f738244f6c6ca5f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f49e0bb3ae5b107c8216eec010a89365b5f79a6d","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"                                                 instance[\u0027uuid\u0027],"},{"line_number":1174,"context_line":"                                                 filename))"},{"line_number":1175,"context_line":"                self._extend_virtual_disk(instance, ephemeral_disk_in_kb, path,"},{"line_number":1176,"context_line":"                                          dc_info.ref)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"        # 4. Start VM"},{"line_number":1179,"context_line":"        if power_on:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_9c921157","line":1176,"updated":"2014-11-26 17:40:38.000000000","message":"I can\u0027t clearly see any unit tests for this. Do you have one? Try a code coverage to check maybe?","commit_id":"7b2a40c24d2d7bbb2f6b1f738244f6c6ca5f02cf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"cb1e9f801a46c26756e9ea0247da8c15ff3b094a","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        query \u003d vm_util.get_values_from_object_properties(self._session,"},{"line_number":1095,"context_line":"                                                          props)"},{"line_number":1096,"context_line":"        datastore \u003d query[\u0027datastore\u0027]"},{"line_number":1097,"context_line":"        ds_ref \u003d datastore.ManagedObjectReference[0]"},{"line_number":1098,"context_line":"        return ds_util.get_datastore_by_ref(self._session, ds_ref)"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _resize_create_ephemerals(self, vm_ref, instance, block_device_info):"}],"source_content_type":"text/x-python","patch_set":32,"id":"fa81d914_e74b3829","line":1097,"updated":"2015-01-28 23:11:50.000000000","message":"this won\u0027t work if we have volumes attached; you need to get the datastore for the root virtual disk","commit_id":"5896a2aa78dad0f7e45afc900eabaf9698473a9c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"656ac4d18f3dc5989d4f22ec0dc558428e0e4376","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        query \u003d vm_util.get_values_from_object_properties(self._session,"},{"line_number":1095,"context_line":"                                                          props)"},{"line_number":1096,"context_line":"        datastore \u003d query[\u0027datastore\u0027]"},{"line_number":1097,"context_line":"        ds_ref \u003d datastore.ManagedObjectReference[0]"},{"line_number":1098,"context_line":"        return ds_util.get_datastore_by_ref(self._session, ds_ref)"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":"    def _resize_create_ephemerals(self, vm_ref, instance, block_device_info):"}],"source_content_type":"text/x-python","patch_set":32,"id":"fa81d914_eb6202ac","line":1097,"in_reply_to":"fa81d914_e74b3829","updated":"2015-01-29 15:11:25.000000000","message":"Done","commit_id":"5896a2aa78dad0f7e45afc900eabaf9698473a9c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"7a80e97380aa2d5ba87477566d412ad9ca8c470b","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"        # 4. Purge ephemeral disks"},{"line_number":1160,"context_line":"        self._remove_ephemerals(vm_ref)"},{"line_number":1161,"context_line":"        self._update_instance_progress(context, instance,"},{"line_number":1162,"context_line":"                                       step\u003d4,"},{"line_number":1163,"context_line":"                                       total_steps\u003dRESIZE_TOTAL_STEPS)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def confirm_migration(self, migration, instance, network_info):"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_280c5194","line":1162,"updated":"2015-02-09 14:49:08.000000000","message":"I think those steps should be defined as constants somewhere, so It would easier to to understand what \u00274\u0027 is. I wouldn\u0027t know what \u00274\u0027 means if your comment above didn\u0027t exist.\n\nAlso, the constants should be used in the unit tests, so we can clearly see that the \u0027Purge ephemeral disks\u0027 step is called / executed. In the unit tests, instead of step\u003d4.\n\nIt will make the code be more understandable and verifiable.","commit_id":"77fd2d423e5729289569c44134ab13de8f10e5d5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d4f35e536ea99e4fb31b8957aeafa7f3932aaa1e","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"        # 4. Purge ephemeral disks"},{"line_number":1160,"context_line":"        self._remove_ephemerals(vm_ref)"},{"line_number":1161,"context_line":"        self._update_instance_progress(context, instance,"},{"line_number":1162,"context_line":"                                       step\u003d4,"},{"line_number":1163,"context_line":"                                       total_steps\u003dRESIZE_TOTAL_STEPS)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def confirm_migration(self, migration, instance, network_info):"}],"source_content_type":"text/x-python","patch_set":37,"id":"da86d52c_b51c19c3","line":1162,"in_reply_to":"da86d52c_280c5194","updated":"2015-02-09 16:00:16.000000000","message":"i agree that it would make things better. i will post a separate patch to address that. that would be a nice addition","commit_id":"77fd2d423e5729289569c44134ab13de8f10e5d5"}]}
