)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"75735180503af97c0ba588fa3dc011c2838cd98a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: Ensure all the disk files of VM could be deleted along with VM deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sometimes openstack users will add disks for VM via vcenter to other datastores"},{"line_number":10,"context_line":"which the VM doesn\u0027t locate, in this situation, if VM is deleted in openstack,"},{"line_number":11,"context_line":"only the disk files in same datastore with VM will got deleted, while the disk"},{"line_number":12,"context_line":"files in different datastores with VM won\u0027t be deleted. Although it\u0027s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba8a016a_bc07511c","line":9,"updated":"2015-11-23 09:10:45.000000000","message":"i do not think that this is a case that openstack should support\nwhy is this not done via cinder?","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":14003,"name":"Man Li Qi","email":"qimanli@cn.ibm.com","username":"qimanli"},"change_message_id":"230fd7189ce7af1701e00a762222566711503011","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: Ensure all the disk files of VM could be deleted along with VM deletion"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sometimes openstack users will add disks for VM via vcenter to other datastores"},{"line_number":10,"context_line":"which the VM doesn\u0027t locate, in this situation, if VM is deleted in openstack,"},{"line_number":11,"context_line":"only the disk files in same datastore with VM will got deleted, while the disk"},{"line_number":12,"context_line":"files in different datastores with VM won\u0027t be deleted. Although it\u0027s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba8a016a_8c49c6d2","line":9,"in_reply_to":"ba8a016a_bc07511c","updated":"2015-11-24 06:30:18.000000000","message":"Yes, it\u0027s not an recommended operation, but some vcenter users will do that. If we do such a change in this commit, no matter where the disks locate, all of them could be deleted.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"}],"nova/tests/unit/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"998f4b7f835ea11cbf3b3269d442312522fa7f1a","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"        virtual_devices \u003d vm.get(\u0027config.hardware.device\u0027)"},{"line_number":1469,"context_line":"        virtual_devices_num \u003d len(virtual_devices.VirtualDevice)"},{"line_number":1470,"context_line":"        for i in range(virtual_devices_num):"},{"line_number":1471,"context_line":"            if virtual_devices.VirtualDevice[i].__class__.__name__ \u003d\u003d \\"},{"line_number":1472,"context_line":"                \u0027VirtualDisk\u0027:"},{"line_number":1473,"context_line":"                vm.delete(virtual_devices.VirtualDevice[i]."},{"line_number":1474,"context_line":"                          backing.fileName)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_453f1624","line":1471,"updated":"2015-11-06 15:08:00.000000000","message":"ditto","commit_id":"d7dff272f362f7f962060d16c0e0753176e55979"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"75735180503af97c0ba588fa3dc011c2838cd98a","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertEqual(1, len(instances))"},{"line_number":1497,"context_line":"        # Delete the vmPathName"},{"line_number":1498,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1499,"context_line":"        virtual_devices \u003d vm.get(\u0027config.hardware.device\u0027)"},{"line_number":1500,"context_line":"        for vdev in virtual_devices.VirtualDevice:"},{"line_number":1501,"context_line":"            if vdev.__class__.__name__ \u003d\u003d \u0027VirtualDisk\u0027:"},{"line_number":1502,"context_line":"                vm.set(vdev.backing.fileName, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_7c53293a","line":1499,"updated":"2015-11-23 09:10:45.000000000","message":"this test is when there is no datastore so i am not sure what you are actually testing here","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":14003,"name":"Man Li Qi","email":"qimanli@cn.ibm.com","username":"qimanli"},"change_message_id":"1786c02a519cb0b3bf13c749c7bb0a72224190e5","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertEqual(1, len(instances))"},{"line_number":1497,"context_line":"        # Delete the vmPathName"},{"line_number":1498,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1499,"context_line":"        virtual_devices \u003d vm.get(\u0027config.hardware.device\u0027)"},{"line_number":1500,"context_line":"        for vdev in virtual_devices.VirtualDevice:"},{"line_number":1501,"context_line":"            if vdev.__class__.__name__ \u003d\u003d \u0027VirtualDisk\u0027:"},{"line_number":1502,"context_line":"                vm.set(vdev.backing.fileName, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_d1f8c57e","line":1499,"in_reply_to":"ba8a016a_7c53293a","updated":"2015-11-24 05:54:54.000000000","message":"Yes, although I changed the code of _destroy_instance in vmops.py, I only modified the deletion path, this change could be covered by the existing unit test case for destroy, such as: test_destroy, test_destroy_no_datastore, test_destroy_non_existent...so I didn\u0027t add new unit test case for this change.\n\nI change this test case for no datastore, just to make sure that there is no any datastore for the VM. Because if disk is added to other datastores which VM doesn\u0027t located, deleting the content of config.files.vmPathName won\u0027t delete all the datastores which VM disks locate.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":10327,"name":"Feng Xi Yan","email":"yanfengxi@cn.ibm.com","username":"yanfengxi"},"change_message_id":"77b0f045df66a88f6d20ee39cb51a8216f40cb0a","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"            config_hardware_device \u003d props[\u0027config.hardware.device\u0027]"},{"line_number":1012,"context_line":"            device_num \u003d len(config_hardware_device.VirtualDevice)"},{"line_number":1013,"context_line":"            vm_config_pathname \u003d []"},{"line_number":1014,"context_line":"            for i in range(device_num):"},{"line_number":1015,"context_line":"                if config_hardware_device.VirtualDevice[i].__class__.__name__ \u003d\u003d \\"},{"line_number":1016,"context_line":"                    \u0027VirtualDisk\u0027:"},{"line_number":1017,"context_line":"                    vm_config_pathname.append(config_hardware_device."}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_568f4123","line":1014,"updated":"2015-11-09 09:55:36.000000000","message":"for vdisk in config_hardware_device.VirtualDevice:\n    if vdisk.__class__.__name__ \u003d\u003d \u0027VirtualDisk\u0027:\n       ....\n\nI think this will be better.","commit_id":"d7dff272f362f7f962060d16c0e0753176e55979"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"998f4b7f835ea11cbf3b3269d442312522fa7f1a","unresolved":false,"context_lines":[{"line_number":1012,"context_line":"            device_num \u003d len(config_hardware_device.VirtualDevice)"},{"line_number":1013,"context_line":"            vm_config_pathname \u003d []"},{"line_number":1014,"context_line":"            for i in range(device_num):"},{"line_number":1015,"context_line":"                if config_hardware_device.VirtualDevice[i].__class__.__name__ \u003d\u003d \\"},{"line_number":1016,"context_line":"                    \u0027VirtualDisk\u0027:"},{"line_number":1017,"context_line":"                    vm_config_pathname.append(config_hardware_device."},{"line_number":1018,"context_line":"                                              VirtualDevice[i]."}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_65e57ada","line":1015,"updated":"2015-11-06 15:08:00.000000000","message":"if (config_hardware_device.VirtualDevice[i].__class__.__name__ \u003d\u003d\u0027VirtualDisk\u0027):\n\nUse \"\\\" may not accepted.","commit_id":"d7dff272f362f7f962060d16c0e0753176e55979"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"998f4b7f835ea11cbf3b3269d442312522fa7f1a","unresolved":false,"context_lines":[{"line_number":1039,"context_line":"            if vm_vd_device_num \u003e 0:"},{"line_number":1040,"context_line":"                for i in range(vm_vd_device_num):"},{"line_number":1041,"context_line":"                    vm_ds_path \u003d ds_obj.DatastorePath.parse("},{"line_number":1042,"context_line":"                            vm_config_pathname[i])"},{"line_number":1043,"context_line":"                    if vm_ds_path.datastore in issued_datastore:"},{"line_number":1044,"context_line":"                        continue"},{"line_number":1045,"context_line":"                    if vm_ds_path.datastore not in issued_datastore:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_85389e3e","line":1042,"updated":"2015-11-06 15:08:00.000000000","message":"small nit about indentation","commit_id":"d7dff272f362f7f962060d16c0e0753176e55979"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"18ef2362d25d45e55b9400414ceca18bfdefb1e6","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"            pwr_state \u003d props[\u0027runtime.powerState\u0027]"},{"line_number":1011,"context_line":"            config_hardware_device \u003d props[\u0027config.hardware.device\u0027]"},{"line_number":1012,"context_line":"            vm_vdevice_filename \u003d []"},{"line_number":1013,"context_line":"            for vdev in config_hardware_device.VirtualDevice:"},{"line_number":1014,"context_line":"                if vdev.__class__.__name__ \u003d\u003d \u0027VirtualDisk\u0027:"},{"line_number":1015,"context_line":"                    vm_vdevice_filename.append(vdev.backing.fileName)"},{"line_number":1016,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_aee2bbff","line":1013,"updated":"2015-11-23 08:09:32.000000000","message":"I think we can not assume VirtualDevice property exists. Please look at https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vm_util.py#L619","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"18ef2362d25d45e55b9400414ceca18bfdefb1e6","unresolved":false,"context_lines":[{"line_number":1012,"context_line":"            vm_vdevice_filename \u003d []"},{"line_number":1013,"context_line":"            for vdev in config_hardware_device.VirtualDevice:"},{"line_number":1014,"context_line":"                if vdev.__class__.__name__ \u003d\u003d \u0027VirtualDisk\u0027:"},{"line_number":1015,"context_line":"                    vm_vdevice_filename.append(vdev.backing.fileName)"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"            # Power off the VM if it is in PoweredOn state."},{"line_number":1018,"context_line":"            if pwr_state \u003d\u003d \"poweredOn\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_4e9f8f5f","line":1015,"updated":"2015-11-23 08:09:32.000000000","message":"I think filename property only exists in VirtualDeviceFileBackingInfo. Backing property of VirtualDisk should be its parent class, which is VirtualDeviceBackingInfo.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"18ef2362d25d45e55b9400414ceca18bfdefb1e6","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"                # To avoid repeated deletion on the same datastore"},{"line_number":1035,"context_line":"                if vm_ds_path.datastore in issued_datastore:"},{"line_number":1036,"context_line":"                    continue"},{"line_number":1037,"context_line":"                issued_datastore.append(vm_ds_path.datastore)"},{"line_number":1038,"context_line":"                # Delete the folder holding the VM related content on"},{"line_number":1039,"context_line":"                # the datastore."},{"line_number":1040,"context_line":"                if destroy_disks and vm_ds_path:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_aec5db3d","line":1037,"updated":"2015-11-23 08:09:32.000000000","message":"Personally, I will prefer to construct this datastore path list at line 1014, so that we can make this loop likes a little simpler.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":14003,"name":"Man Li Qi","email":"qimanli@cn.ibm.com","username":"qimanli"},"change_message_id":"5dd4d56dd020e76ae440ceab3085730b3729657c","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"                # To avoid repeated deletion on the same datastore"},{"line_number":1035,"context_line":"                if vm_ds_path.datastore in issued_datastore:"},{"line_number":1036,"context_line":"                    continue"},{"line_number":1037,"context_line":"                issued_datastore.append(vm_ds_path.datastore)"},{"line_number":1038,"context_line":"                # Delete the folder holding the VM related content on"},{"line_number":1039,"context_line":"                # the datastore."},{"line_number":1040,"context_line":"                if destroy_disks and vm_ds_path:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_9a25a35d","line":1037,"in_reply_to":"ba8a016a_1c4a1d84","updated":"2015-11-24 02:39:08.000000000","message":"\"issued_datastore\" records if a datastore has been issued/deleted or not, if a datastore has been issued and deleted, the left code for deletion won\u0027t be executed. It could avoid repeated deletion on the same datastore.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"75735180503af97c0ba588fa3dc011c2838cd98a","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"                # To avoid repeated deletion on the same datastore"},{"line_number":1035,"context_line":"                if vm_ds_path.datastore in issued_datastore:"},{"line_number":1036,"context_line":"                    continue"},{"line_number":1037,"context_line":"                issued_datastore.append(vm_ds_path.datastore)"},{"line_number":1038,"context_line":"                # Delete the folder holding the VM related content on"},{"line_number":1039,"context_line":"                # the datastore."},{"line_number":1040,"context_line":"                if destroy_disks and vm_ds_path:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_1c4a1d84","line":1037,"in_reply_to":"ba8a016a_6ef7f359","updated":"2015-11-23 09:10:45.000000000","message":"where do you use this variable?","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":10327,"name":"Feng Xi Yan","email":"yanfengxi@cn.ibm.com","username":"yanfengxi"},"change_message_id":"a8dc59a1272a2864ec9fba3208aac6b5fd21f7d7","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"                # To avoid repeated deletion on the same datastore"},{"line_number":1035,"context_line":"                if vm_ds_path.datastore in issued_datastore:"},{"line_number":1036,"context_line":"                    continue"},{"line_number":1037,"context_line":"                issued_datastore.append(vm_ds_path.datastore)"},{"line_number":1038,"context_line":"                # Delete the folder holding the VM related content on"},{"line_number":1039,"context_line":"                # the datastore."},{"line_number":1040,"context_line":"                if destroy_disks and vm_ds_path:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_6ef7f359","line":1037,"in_reply_to":"ba8a016a_aec5db3d","updated":"2015-11-23 08:21:39.000000000","message":"Good catch. There is no need to fetch the all the full file name paths, just need to fetch all the datastores that are involved.","commit_id":"61b8246e1ecbad31d2ae888fac313adbe71af2aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5e2889ec4c7c3c4296cfb80e049f47a5a9bf97a2","unresolved":false,"context_lines":[{"line_number":1000,"context_line":"        # Destroy a VM instance"},{"line_number":1001,"context_line":"        try:"},{"line_number":1002,"context_line":"            vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":1003,"context_line":"            lst_properties \u003d [\"runtime.powerState\","},{"line_number":1004,"context_line":"                              \"config.hardware.device\","},{"line_number":1005,"context_line":"                              \"datastore\"]"},{"line_number":1006,"context_line":"            props \u003d self._session._call_method(vutil,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_1fb1b88f","line":1003,"updated":"2015-11-25 09:30:56.000000000","message":"this change may break cases when the instance is not booted and the vmx file exists","commit_id":"ed7c39a1a925feadbce5d1abff2dc3e00b98887c"}]}
