def delete_virtual_disk_spec(client_factory, device):
 virtual_device_config = client_factory.create('ns0:VirtualDeviceConfigSpec')
 virtual_device_config.operation = 'remove'
 virtual_device_config.fileOperation = 'destroy'
 virtual_device_config.device = device
 return virtual_device_config

def delete_virtual_disk_spec ( client_factory , device ) : virtual_device_config = client_factory . create ( 'ns0:VirtualDeviceConfigSpec' ) virtual_device_config . operation = 'remove' virtual_device_config . fileOperation = 'destroy' virtual_device_config . device = device return virtual_device_config
builds spec for the deletion of an already existing virtual disk from vm .